summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-11-28 10:40:23 +0100
committerEike Rathke <erack@redhat.com>2016-11-28 13:54:35 +0000
commit1fe671546218135841d2cb1c99a993b95fd7e12c (patch)
tree25a5afb7ae39aef65432ec1d8803562485cff072
parent852956a271578b9ad7c1ef2983381e109f2a8156 (diff)
nitpicks, tdf#43544 follow-up
Address nitpicks stated in https://gerrit.libreoffice.org/29274 Change-Id: If7ce8a7239a65a2ff619259622b85ce239060e52 (cherry picked from commit dd974413acc6ab00168a301cbb53b3c9caa11e32) Reviewed-on: https://gerrit.libreoffice.org/31320 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/inc/styleuno.hxx2
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx13
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;
}