summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorMaarten Bosmans <mkbosmans@gmail.com>2016-09-25 20:28:53 +0200
committerEike Rathke <erack@redhat.com>2016-11-28 13:54:04 +0000
commit852956a271578b9ad7c1ef2983381e109f2a8156 (patch)
treeab1dfc8592318cfe4ff7143afeb9d58537b9b0ab /sc/inc
parent8035a9b8312a52c44290c729d1c303a8fe7a31d5 (diff)
tdf#43544 ScStyleObj: Only call StylePool->find() when necessary
Avoid repeatedly calling GetStyle() when setting/getting multiple properties. By caching the SfxStyleSheet before entering the loop over all properties, performance of loading the document attached to tdf#43544 improves by 12%. Change-Id: Ic3f1314892b4771aa87801b63f854f83ec761d41 Reviewed-on: https://gerrit.libreoffice.org/29274 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 9d99a7b2d1dd973b50a699440ffb69d99d614607) Reviewed-on: https://gerrit.libreoffice.org/31319
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/styleuno.hxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx
index a6fb761e38a9..b1b5fe7184ff 100644
--- a/sc/inc/styleuno.hxx
+++ b/sc/inc/styleuno.hxx
@@ -221,15 +221,20 @@ private:
ScDocShell* pDocShell;
SfxStyleFamily eFamily; // Family
OUString aStyleName;
+ SfxStyleSheetBase* pStyle_cached;
- SfxStyleSheetBase* GetStyle_Impl();
+ SfxStyleSheetBase* GetStyle_Impl( bool useCachedValue = false );
const SfxItemSet* GetStyleItemSet_Impl( const OUString& rPropName, const SfxItemPropertySimpleEntry*& rpEntry );
- void SetOnePropertyValue( const OUString& rPropertyName,
- const SfxItemPropertySimpleEntry* pEntry,
- const css::uno::Any* pValue )
- throw(css::lang::IllegalArgumentException,
- css::uno::RuntimeException,
- std::exception);
+ css::beans::PropertyState getPropertyState_Impl( const OUString& PropertyName )
+ throw(css::beans::UnknownPropertyException, css::uno::RuntimeException, std::exception);
+ css::uno::Any getPropertyDefault_Impl( const OUString& aPropertyName )
+ throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception);
+ css::uno::Any getPropertyValue_Impl( const OUString& aPropertyName )
+ throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception);
+ void setPropertyValue_Impl( const OUString& rPropertyName,
+ const SfxItemPropertySimpleEntry* pEntry,
+ const css::uno::Any* pValue )
+ throw(css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception);
public:
ScStyleObj() = delete;