sw/source/core/doc/docnew.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 5b9b855c19fd8b8fb61f49e9d3d8bbf47521caee Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Oct 21 20:03:43 2019 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue Oct 22 08:31:31 2019 +0200 Revert OUString -> OUString& changes Revert the OUString -> OUString& related part of commit b13421c6560e4f189265c96a3145aa11568b4437 ("Use const references to avoid copying") as suggested by Stephan in [1] to avoid "ongoing maintenance effort to guarantee that the references are not dangling, and future maintainers might draw wrong assumptions from the atypical behavior of holding OUString instances by reference." [1] https://gerrit.libreoffice.org/#/c/81029/ Change-Id: I50a81a170ba7c40cd3257e250e17f107d4a9f015 Reviewed-on: https://gerrit.libreoffice.org/81273 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 8235b05d09c9..828913313a52 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(); - const OUString& sFollowPageDesc = pFollowPageDesc->GetName(); + OUString sFollowPageDesc = pFollowPageDesc->GetName(); if (sFollowPageDesc == pCurSourcePageDesc->GetName()) { break; @@ -1054,7 +1054,7 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, sal_uInt16 const nStartPageNu const SwWrtShell *pSourceShell = rSource.GetDocShell()->GetWrtShell(); 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 ); - const 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