diff options
-rw-r--r-- | sc/inc/styleuno.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/styleuno.cxx | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx index b1b5fe7184ff..ff48b6d092e6 100644 --- a/sc/inc/styleuno.hxx +++ b/sc/inc/styleuno.hxx @@ -223,7 +223,7 @@ private: OUString aStyleName; SfxStyleSheetBase* pStyle_cached; - SfxStyleSheetBase* GetStyle_Impl( bool useCachedValue = false ); + SfxStyleSheetBase* GetStyle_Impl( bool bUseCachedValue = false ); const SfxItemSet* GetStyleItemSet_Impl( const OUString& rPropName, const SfxItemPropertySimpleEntry*& rpEntry ); css::beans::PropertyState getPropertyState_Impl( const OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::uno::RuntimeException, std::exception); diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index f0a2be6d4cdf..d12373484ded 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -582,8 +582,11 @@ void ScStyleFamiliesObj::loadStylesFromDocShell( ScDocShell* pSource, bool bLoadCellStyles = true; bool bLoadPageStyles = true; - for ( const beans::PropertyValue& rProp : aOptions ) + const beans::PropertyValue* pPropArray = aOptions.getConstArray(); + sal_Int32 nPropCount = aOptions.getLength(); + for (sal_Int32 i = 0; i < nPropCount; i++) { + const beans::PropertyValue& rProp = pPropArray[i]; OUString aPropName(rProp.Name); if (aPropName == SC_UNONAME_OVERWSTL) @@ -1013,10 +1016,11 @@ void ScStyleObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) } } -SfxStyleSheetBase* ScStyleObj::GetStyle_Impl( bool useCachedValue ) +SfxStyleSheetBase* ScStyleObj::GetStyle_Impl( bool bUseCachedValue ) { - if ( useCachedValue ) + if ( bUseCachedValue ) return pStyle_cached; + pStyle_cached = nullptr; if ( pDocShell ) { @@ -1249,10 +1253,11 @@ uno::Sequence<beans::PropertyState> SAL_CALL ScStyleObj::getPropertyStates( cons SolarMutexGuard aGuard; GetStyle_Impl(); + const OUString* pNames = aPropertyNames.getConstArray(); uno::Sequence<beans::PropertyState> aRet( aPropertyNames.getLength() ); beans::PropertyState* pStates = aRet.getArray(); for ( sal_Int32 i = 0; i < aPropertyNames.getLength(); i++ ) - pStates[i] = getPropertyState_Impl( aPropertyNames[i] ); + pStates[i] = getPropertyState_Impl( pNames[i] ); return aRet; } |