зеркало из https://github.com/mozilla/pjs.git
fix build
This commit is contained in:
Родитель
79a42f97e3
Коммит
10c1abc698
|
@ -762,14 +762,14 @@ nsresult nsEditor::CreateTxnForInsertText(const nsString & aStringToInsert,
|
|||
{
|
||||
// XXX: we'll want to deleteRange if the selection isn't just an insertion point
|
||||
// for now, just insert text after the start of the first node
|
||||
nsCOMPtr<nsIDOMRange> range = currentItem;
|
||||
nsCOMPtr<nsIDOMRange> range(currentItem);
|
||||
if (range)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
result = range->GetStartParent(getter_AddRefs(node));
|
||||
if ((NS_SUCCEEDED(result)) && (node))
|
||||
{
|
||||
nsCOMPtr<nsIDOMCharacterData> nodeAsText = (nsISupports*)node;
|
||||
nsCOMPtr<nsIDOMCharacterData> nodeAsText(node);
|
||||
if (nodeAsText)
|
||||
{
|
||||
PRInt32 offset;
|
||||
|
@ -856,7 +856,7 @@ nsresult nsEditor::CreateTxnForDeleteSelection(EditAggregateTxn ** aTxn)
|
|||
result = enumerator->CurrentItem(¤tItem);
|
||||
while ((NS_SUCCEEDED(result)) && (nsnull!=currentItem))
|
||||
{
|
||||
nsCOMPtr<nsIDOMRange> range = currentItem;
|
||||
nsCOMPtr<nsIDOMRange> range(currentItem);
|
||||
DeleteRangeTxn *txn;
|
||||
result = TransactionFactory::GetNewTransaction(kDeleteRangeTxnIID, (EditTxn **)&txn);
|
||||
if (nsnull!=txn)
|
||||
|
|
|
@ -762,14 +762,14 @@ nsresult nsEditor::CreateTxnForInsertText(const nsString & aStringToInsert,
|
|||
{
|
||||
// XXX: we'll want to deleteRange if the selection isn't just an insertion point
|
||||
// for now, just insert text after the start of the first node
|
||||
nsCOMPtr<nsIDOMRange> range = currentItem;
|
||||
nsCOMPtr<nsIDOMRange> range(currentItem);
|
||||
if (range)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
result = range->GetStartParent(getter_AddRefs(node));
|
||||
if ((NS_SUCCEEDED(result)) && (node))
|
||||
{
|
||||
nsCOMPtr<nsIDOMCharacterData> nodeAsText = (nsISupports*)node;
|
||||
nsCOMPtr<nsIDOMCharacterData> nodeAsText(node);
|
||||
if (nodeAsText)
|
||||
{
|
||||
PRInt32 offset;
|
||||
|
@ -856,7 +856,7 @@ nsresult nsEditor::CreateTxnForDeleteSelection(EditAggregateTxn ** aTxn)
|
|||
result = enumerator->CurrentItem(¤tItem);
|
||||
while ((NS_SUCCEEDED(result)) && (nsnull!=currentItem))
|
||||
{
|
||||
nsCOMPtr<nsIDOMRange> range = currentItem;
|
||||
nsCOMPtr<nsIDOMRange> range(currentItem);
|
||||
DeleteRangeTxn *txn;
|
||||
result = TransactionFactory::GetNewTransaction(kDeleteRangeTxnIID, (EditTxn **)&txn);
|
||||
if (nsnull!=txn)
|
||||
|
|
Загрузка…
Ссылка в новой задаче