summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-03-20 15:04:37 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2018-03-20 17:47:55 +0100
commitb39cd7d5bd451c1498282025ecd650874ce77b62 (patch)
tree626aa4e195c6f01fc03bc0e59fc7daa452a2a94e /sd
parent5163c4850dd7768826eaa22947c403d187c3edd3 (diff)
Exclude a redundant variable
Change-Id: I0a7d6a7068155259313408e8d8e61f72af705cc6 Reviewed-on: https://gerrit.libreoffice.org/51647 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/drawdoc3.cxx16
1 files changed, 6 insertions, 10 deletions
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 03575d4778d9..9bc68bc98710 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -81,12 +81,10 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
{
// now check for duplicate masterpage and layout names
- OUString aFullNameLayout( pBMMPage->GetLayoutName() );
- sal_Int32 nIndex = aFullNameLayout.indexOf( SD_LT_SEPARATOR );
+ OUString aLayout( pBMMPage->GetLayoutName() );
+ sal_Int32 nIndex = aLayout.indexOf( SD_LT_SEPARATOR );
if( nIndex != -1 )
- aFullNameLayout = aFullNameLayout.copy(0, nIndex);
-
- OUString aLayout(aFullNameLayout);
+ aLayout = aLayout.copy(0, nIndex);
std::vector<OUString>::const_iterator pIter =
find(mrLayoutsToTransfer.begin(),mrLayoutsToTransfer.end(),aLayout);
@@ -98,12 +96,10 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
{
// Do the layouts already exist within the document?
SdPage* pTestPage = static_cast<SdPage*>( rDoc.GetMasterPage(nMPage) );
- OUString aFullTest(pTestPage->GetLayoutName());
- sal_Int32 nIndex2 = aFullTest.indexOf( SD_LT_SEPARATOR );
+ OUString aTest(pTestPage->GetLayoutName());
+ sal_Int32 nIndex2 = aTest.indexOf( SD_LT_SEPARATOR );
if( nIndex2 != -1 )
- aFullTest = aFullTest.copy(0, nIndex2);
-
- OUString aTest(aFullTest);
+ aTest = aTest.copy(0, nIndex2);
if (aTest == aLayout && pBMMPage->GetPageKind() == pTestPage->GetPageKind())
{