diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2017-04-24 13:12:35 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2017-04-24 13:57:16 +0200 |
commit | 92b8b8b04cdceedcdc4e58041d9d4d1c7dee21b8 (patch) | |
tree | f2bd9743d10c56d6cca4b04df30e699ad7dc772a /sfx2 | |
parent | de457f10a7da65a64c032362f391e7046822f91c (diff) |
OUStrings: constify and avoid temporaries some more
Change-Id: I965ea920880bb631e108bd963ac1ab21582222ef
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 36a4fe8492f7..02f6a11747dc 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -482,9 +482,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceDefaultFilter { uno::Sequence< beans::PropertyValue > aProps; - OUString aFilterName = GetModuleProps().getUnpackedValueOrDefault( - "ooSetupFactoryDefaultFilter", - OUString() ); + const OUString aFilterName = GetModuleProps().getUnpackedValueOrDefault( "ooSetupFactoryDefaultFilter", OUString() ); m_pOwner->GetFilterConfiguration()->getByName( aFilterName ) >>= aProps; @@ -697,12 +695,7 @@ sal_Int8 ModelData_Impl::CheckStateForSave() GetMediaDescr() = aAcceptedArgs; // check that the old filter is acceptable - OUString aOldFilterName = GetDocProps().getUnpackedValueOrDefault( - aFilterNameString, - OUString() ); - sal_Int8 nResult = CheckFilter( aOldFilterName ); - - return nResult; + return CheckFilter( GetDocProps().getUnpackedValueOrDefault(aFilterNameString, OUString()) ); } sal_Int8 ModelData_Impl::CheckFilter( const OUString& aFilterName ) @@ -774,10 +767,7 @@ bool ModelData_Impl::CheckFilterOptionsDialogExistence() if ( xFilterEnum->nextElement() >>= aProps ) { ::comphelper::SequenceAsHashMap aPropsHM( aProps ); - OUString aUIServName = aPropsHM.getUnpackedValueOrDefault( - "UIComponent", - OUString() ); - if ( !aUIServName.isEmpty() ) + if ( !aPropsHM.getUnpackedValueOrDefault("UIComponent", OUString()).isEmpty() ) return true; } } @@ -1289,7 +1279,7 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo sal_Int8 nStatusSave = STATUS_NO_ACTION; ::comphelper::SequenceAsHashMap::const_iterator aSaveACopyIter = - aModelData.GetMediaDescr().find( ::rtl::OUString("SaveACopy") ); + aModelData.GetMediaDescr().find( OUString("SaveACopy") ); if ( aSaveACopyIter != aModelData.GetMediaDescr().end() ) { bool bSaveACopy = false; @@ -1664,8 +1654,7 @@ bool SfxStoringHelper::CheckFilterOptionsAppearance( if ( aAny >>= aProps ) { ::comphelper::SequenceAsHashMap aPropsHM( aProps ); - OUString aServiceName = aPropsHM.getUnpackedValueOrDefault( "UIComponent", OUString() ); - if( !aServiceName.isEmpty() ) + if( !aPropsHM.getUnpackedValueOrDefault( "UIComponent", OUString() ).isEmpty() ) bUseFilterOptions = true; } } |