diff --git a/mozilla/editor/base/nsHTMLEditRules.cpp b/mozilla/editor/base/nsHTMLEditRules.cpp index 6480dd0c68e..52159b44dda 100644 --- a/mozilla/editor/base/nsHTMLEditRules.cpp +++ b/mozilla/editor/base/nsHTMLEditRules.cpp @@ -822,10 +822,12 @@ nsHTMLEditRules::WillInsert(nsISelection *aSelection, PRBool *aCancel) nsCOMPtr selNode, priorNode; PRInt32 selOffset; // get the (collapsed) selection location - res = mHTMLEditor->GetStartNodeAndOffset(aSelection, &selNode, &selOffset); + res = mHTMLEditor->GetStartNodeAndOffset(aSelection, address_of(selNode), + &selOffset); if (NS_FAILED(res)) return res; // get prior node - res = mHTMLEditor->GetPriorHTMLNode(selNode, selOffset, &priorNode); + res = mHTMLEditor->GetPriorHTMLNode(selNode, selOffset, + address_of(priorNode)); if (NS_SUCCEEDED(res) && priorNode && nsHTMLEditUtils::IsMozBR(priorNode)) { nsCOMPtr block1, block2; @@ -838,7 +840,7 @@ nsHTMLEditRules::WillInsert(nsISelection *aSelection, PRBool *aCancel) // if we are here then the selection is right after a mozBR // that is in the same block as the selection. We need to move // the selection start to be before the mozBR. - res = nsEditor::GetNodeLocation(priorNode, &selNode, &selOffset); + res = nsEditor::GetNodeLocation(priorNode, address_of(selNode), &selOffset); if (NS_FAILED(res)) return res; res = aSelection->Collapse(selNode,selOffset); if (NS_FAILED(res)) return res; diff --git a/mozilla/editor/base/nsPlaintextEditor.cpp b/mozilla/editor/base/nsPlaintextEditor.cpp index 6c4d2867e85..762ed7275f5 100644 --- a/mozilla/editor/base/nsPlaintextEditor.cpp +++ b/mozilla/editor/base/nsPlaintextEditor.cpp @@ -597,7 +597,7 @@ NS_IMETHODIMP nsPlaintextEditor::CreateBRImpl(nsCOMPtr *aInOutParent PRInt32 offset; PRUint32 len; nodeAsText->GetLength(&len); - GetNodeLocation(node, &tmp, &offset); + GetNodeLocation(node, address_of(tmp), &offset); if (!tmp) return NS_ERROR_FAILURE; if (!theOffset) { @@ -613,7 +613,7 @@ NS_IMETHODIMP nsPlaintextEditor::CreateBRImpl(nsCOMPtr *aInOutParent // split the text node res = SplitNode(node, theOffset, getter_AddRefs(tmp)); if (NS_FAILED(res)) return res; - res = GetNodeLocation(node, &tmp, &offset); + res = GetNodeLocation(node, address_of(tmp), &offset); if (NS_FAILED(res)) return res; } // create br @@ -638,7 +638,7 @@ NS_IMETHODIMP nsPlaintextEditor::CreateBRImpl(nsCOMPtr *aInOutParent res = GetSelection(getter_AddRefs(selection)); if (NS_FAILED(res)) return res; nsCOMPtr selPriv(do_QueryInterface(selection)); - res = GetNodeLocation(*outBRNode, &parent, &offset); + res = GetNodeLocation(*outBRNode, address_of(parent), &offset); if (NS_FAILED(res)) return res; if (aSelect == eNext) { @@ -661,7 +661,7 @@ NS_IMETHODIMP nsPlaintextEditor::CreateBR(nsIDOMNode *aNode, PRInt32 aOffset, ns { nsCOMPtr parent = aNode; PRInt32 offset = aOffset; - return CreateBRImpl(&parent, &offset, outBRNode, aSelect); + return CreateBRImpl(address_of(parent), &offset, outBRNode, aSelect); } NS_IMETHODIMP nsPlaintextEditor::InsertBR(nsCOMPtr *outBRNode) @@ -687,14 +687,14 @@ NS_IMETHODIMP nsPlaintextEditor::InsertBR(nsCOMPtr *outBRNode) } nsCOMPtr selNode; PRInt32 selOffset; - res = GetStartNodeAndOffset(selection, &selNode, &selOffset); + res = GetStartNodeAndOffset(selection, address_of(selNode), &selOffset); if (NS_FAILED(res)) return res; res = CreateBR(selNode, selOffset, outBRNode); if (NS_FAILED(res)) return res; // position selection after br - res = GetNodeLocation(*outBRNode, &selNode, &selOffset); + res = GetNodeLocation(*outBRNode, address_of(selNode), &selOffset); if (NS_FAILED(res)) return res; selPriv->SetInterlinePosition(PR_TRUE); res = selection->Collapse(selNode, selOffset+1); diff --git a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp index 6480dd0c68e..52159b44dda 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp @@ -822,10 +822,12 @@ nsHTMLEditRules::WillInsert(nsISelection *aSelection, PRBool *aCancel) nsCOMPtr selNode, priorNode; PRInt32 selOffset; // get the (collapsed) selection location - res = mHTMLEditor->GetStartNodeAndOffset(aSelection, &selNode, &selOffset); + res = mHTMLEditor->GetStartNodeAndOffset(aSelection, address_of(selNode), + &selOffset); if (NS_FAILED(res)) return res; // get prior node - res = mHTMLEditor->GetPriorHTMLNode(selNode, selOffset, &priorNode); + res = mHTMLEditor->GetPriorHTMLNode(selNode, selOffset, + address_of(priorNode)); if (NS_SUCCEEDED(res) && priorNode && nsHTMLEditUtils::IsMozBR(priorNode)) { nsCOMPtr block1, block2; @@ -838,7 +840,7 @@ nsHTMLEditRules::WillInsert(nsISelection *aSelection, PRBool *aCancel) // if we are here then the selection is right after a mozBR // that is in the same block as the selection. We need to move // the selection start to be before the mozBR. - res = nsEditor::GetNodeLocation(priorNode, &selNode, &selOffset); + res = nsEditor::GetNodeLocation(priorNode, address_of(selNode), &selOffset); if (NS_FAILED(res)) return res; res = aSelection->Collapse(selNode,selOffset); if (NS_FAILED(res)) return res; diff --git a/mozilla/editor/libeditor/text/nsPlaintextEditor.cpp b/mozilla/editor/libeditor/text/nsPlaintextEditor.cpp index 6c4d2867e85..762ed7275f5 100644 --- a/mozilla/editor/libeditor/text/nsPlaintextEditor.cpp +++ b/mozilla/editor/libeditor/text/nsPlaintextEditor.cpp @@ -597,7 +597,7 @@ NS_IMETHODIMP nsPlaintextEditor::CreateBRImpl(nsCOMPtr *aInOutParent PRInt32 offset; PRUint32 len; nodeAsText->GetLength(&len); - GetNodeLocation(node, &tmp, &offset); + GetNodeLocation(node, address_of(tmp), &offset); if (!tmp) return NS_ERROR_FAILURE; if (!theOffset) { @@ -613,7 +613,7 @@ NS_IMETHODIMP nsPlaintextEditor::CreateBRImpl(nsCOMPtr *aInOutParent // split the text node res = SplitNode(node, theOffset, getter_AddRefs(tmp)); if (NS_FAILED(res)) return res; - res = GetNodeLocation(node, &tmp, &offset); + res = GetNodeLocation(node, address_of(tmp), &offset); if (NS_FAILED(res)) return res; } // create br @@ -638,7 +638,7 @@ NS_IMETHODIMP nsPlaintextEditor::CreateBRImpl(nsCOMPtr *aInOutParent res = GetSelection(getter_AddRefs(selection)); if (NS_FAILED(res)) return res; nsCOMPtr selPriv(do_QueryInterface(selection)); - res = GetNodeLocation(*outBRNode, &parent, &offset); + res = GetNodeLocation(*outBRNode, address_of(parent), &offset); if (NS_FAILED(res)) return res; if (aSelect == eNext) { @@ -661,7 +661,7 @@ NS_IMETHODIMP nsPlaintextEditor::CreateBR(nsIDOMNode *aNode, PRInt32 aOffset, ns { nsCOMPtr parent = aNode; PRInt32 offset = aOffset; - return CreateBRImpl(&parent, &offset, outBRNode, aSelect); + return CreateBRImpl(address_of(parent), &offset, outBRNode, aSelect); } NS_IMETHODIMP nsPlaintextEditor::InsertBR(nsCOMPtr *outBRNode) @@ -687,14 +687,14 @@ NS_IMETHODIMP nsPlaintextEditor::InsertBR(nsCOMPtr *outBRNode) } nsCOMPtr selNode; PRInt32 selOffset; - res = GetStartNodeAndOffset(selection, &selNode, &selOffset); + res = GetStartNodeAndOffset(selection, address_of(selNode), &selOffset); if (NS_FAILED(res)) return res; res = CreateBR(selNode, selOffset, outBRNode); if (NS_FAILED(res)) return res; // position selection after br - res = GetNodeLocation(*outBRNode, &selNode, &selOffset); + res = GetNodeLocation(*outBRNode, address_of(selNode), &selOffset); if (NS_FAILED(res)) return res; selPriv->SetInterlinePosition(PR_TRUE); res = selection->Collapse(selNode, selOffset+1);