diff options
Diffstat (limited to 'sw/source/uibase/misc')
-rw-r--r-- | sw/source/uibase/misc/glosdoc.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/misc/redlndlg.cxx | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx index fa503d054a33..44426548e9ab 100644 --- a/sw/source/uibase/misc/glosdoc.cxx +++ b/sw/source/uibase/misc/glosdoc.cxx @@ -440,7 +440,6 @@ void SwGlossaries::RemoveFileFromList( const OUString& rGroup ) { if (*it == rGroup) { - OUString aUName = rGroup; { // tell the UNO AutoTextGroup object that it's not valid anymore for ( UnoAutoTextGroups::iterator aLoop = m_aGlossaryGroups.begin(); @@ -449,7 +448,7 @@ void SwGlossaries::RemoveFileFromList( const OUString& rGroup ) ) { Reference< container::XNamed > xNamed( aLoop->get(), UNO_QUERY ); - if ( xNamed.is() && ( xNamed->getName() == aUName ) ) + if ( xNamed.is() && ( xNamed->getName() == rGroup ) ) { static_cast< SwXAutoTextGroup* >( xNamed.get() )->Invalidate(); // note that this static_cast works because we know that the array only diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index dcdce1d6a3ed..6928993639ef 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -467,7 +467,7 @@ void SwRedlineAcceptDlg::Activate() if (pParent->pTLBParent) { // update only comment - OUString sComment(rRedln.GetComment()); + const OUString& sComment(rRedln.GetComment()); m_pTable->SetEntryText(sComment.replace('\n', ' '), pParent->pTLBParent, 3); } pParent->sComment = rRedln.GetComment(); @@ -757,7 +757,7 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd) pRedlineParent = new SwRedlineDataParent; pRedlineParent->pData = pRedlineData; pRedlineParent->pNext = nullptr; - OUString sComment(rRedln.GetComment()); + const OUString& sComment(rRedln.GetComment()); pRedlineParent->sComment = sComment.replace('\n', ' '); m_RedlineParents.insert(m_RedlineParents.begin() + i, std::unique_ptr<SwRedlineDataParent>(pRedlineParent)); |