sw/source/core/doc/docnew.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit b13421c6560e4f189265c96a3145aa11568b4437
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Oct 18 11:10:31 2019 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Oct 18 16:36:57 2019 +0200

    Use const references to avoid copying
    
    Change-Id: Iff6d15e3fc44eea24846fca40fb5ce81afde8c5f
    Reviewed-on: https://gerrit.libreoffice.org/81029
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 01ae7cc6ed45..8235b05d09c9 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -969,7 +969,7 @@ static void lcl_CopyFollowPageDesc(
     do
     {
         const SwPageDesc* pFollowPageDesc = pCurSourcePageDesc->GetFollow();
-        OUString sFollowPageDesc = pFollowPageDesc->GetName();
+        const OUString& sFollowPageDesc = pFollowPageDesc->GetName();
         if (sFollowPageDesc == pCurSourcePageDesc->GetName())
         {
             break;
@@ -1052,9 +1052,9 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, 
sal_uInt16 const nStartPageNu
             // if the source uses headers or footers the target document
             // needs inidividual page styles
             const SwWrtShell *pSourceShell = 
rSource.GetDocShell()->GetWrtShell();
-            const SwPageDesc rSourcePageDesc = pSourceShell->GetPageDesc(
+            const SwPageDesc& rSourcePageDesc = pSourceShell->GetPageDesc(
                                                     
pSourceShell->GetCurPageDesc());
-            const OUString sStartingPageDesc = rSourcePageDesc.GetName();
+            const OUString& sStartingPageDesc = rSourcePageDesc.GetName();
             const bool bPageStylesWithHeaderFooter = 
lcl_PageDescOrFollowContainsHeaderFooter(rSourcePageDesc);
             if( bPageStylesWithHeaderFooter )
             {
@@ -1083,7 +1083,7 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, 
sal_uInt16 const nStartPageNu
             bool bIsTextNode = aBreakIdx.GetNode().IsTextNode();
             if ( !bIsTextNode )
                 getIDocumentContentOperations().AppendTextNode( aBreakPos );
-            OUString name = pTargetPageDesc->GetName();
+            const OUString& name = pTargetPageDesc->GetName();
             pTargetShell->InsertPageBreak( &name, nStartPageNumber );
             if ( !bIsTextNode )
             {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to