diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-06-13 18:03:37 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-06-13 18:09:20 +0200 |
commit | 448c62835b3c28f7b62f336d232c7966ce4c859a (patch) | |
tree | 6ae9ca5c71ec532b6a8ebe8ef841eb8016b5131d | |
parent | Resolves: fdo#78151 change style on toggling bullets on master page outliners (diff) | |
download | core-448c62835b3c28f7b62f336d232c7966ce4c859a.tar.gz core-448c62835b3c28f7b62f336d232c7966ce4c859a.zip |
SdStyleSheetPool::GetBulletFont can be static
...that's why the problem fixed in 0466c0dcddd3b5af02c711794e8cd4c3c6c12993 "Set
mxStyleSheetPool before using it" had never caused trouble in practice (and its
change to SdDrawDocument ctor can be reverted again)
Change-Id: I662995ab4fcaa7ae461cb9575666825d8a869735
-rw-r--r-- | sd/inc/stlpool.hxx | 2 | ||||
-rw-r--r-- | sd/source/core/drawdoc.cxx | 3 | ||||
-rw-r--r-- | sd/source/core/drawdoc4.cxx | 7 | ||||
-rw-r--r-- | sd/source/core/stlpool.cxx | 2 |
4 files changed, 5 insertions, 9 deletions
diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx index 7af9fe980c5e..ae146096542d 100644 --- a/sd/inc/stlpool.hxx +++ b/sd/inc/stlpool.hxx @@ -87,7 +87,7 @@ public: void CreatePseudosIfNecessary(); void UpdateStdNames(); static void PutNumBulletItem( SfxStyleSheetBase* pSheet, Font& rBulletFont ); - Font GetBulletFont() const; + static Font GetBulletFont(); SdDrawDocument* GetDoc() const { return mpDoc; } diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index d899597b7bf0..3a08a8de83b3 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -204,12 +204,11 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) pItemPool->SetDefaultMetric(SFX_MAPUNIT_100TH_MM); pItemPool->FreezeIdRanges(); + SetTextDefaults(); // DrawingEngine has to know where it is... FmFormModel::SetStyleSheetPool( new SdStyleSheetPool( GetPool(), this ) ); - SetTextDefaults(); // requires the StyleSheetPool set above - // Set StyleSheetPool for DrawOutliner, so text objects can be read correctly. // The link to the StyleRequest handler of the document is set later, in // NewOrLoadCompleted, because only then do all the templates exist. diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index f6c0131d0274..f47a5d9ffd42 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -19,8 +19,6 @@ #include <sal/config.h> -#include <cassert> - #include <com/sun/star/style/XStyle.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <i18nlangtag/mslangid.hxx> @@ -243,7 +241,7 @@ void SdDrawDocument::CreateLayoutTemplates() aBulletItem.SetStart(1); aBulletItem.SetScale(45); // In percent - Font aBulletFont( pSSPool->GetBulletFont() ); + Font aBulletFont( SdStyleSheetPool::GetBulletFont() ); aBulletFont.SetSize(Size(0,635)); // sj: (i33745) changed default from 24 to 18 pt @@ -1209,8 +1207,7 @@ void SdDrawDocument::SetTextDefaults() const { // BulletItem and BulletFont for Titel and Outline SvxBulletItem aBulletItem(EE_PARA_BULLET); - assert(mxStyleSheetPool.is()); - Font aBulletFont( static_cast<SdStyleSheetPool*>( mxStyleSheetPool.get())->GetBulletFont() ); + Font aBulletFont( SdStyleSheetPool::GetBulletFont() ); aBulletFont.SetSize(Size(0,846)); // 24 pt aBulletItem.SetFont(aBulletFont); aBulletItem.SetStyle(BS_BULLET); diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index b4d262174483..da88e23515ec 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -1223,7 +1223,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet, |* \************************************************************************/ -Font SdStyleSheetPool::GetBulletFont() const +Font SdStyleSheetPool::GetBulletFont() { Font aBulletFont( OUString( "StarSymbol" ), Size(0, 1000) ); aBulletFont.SetCharSet(RTL_TEXTENCODING_UNICODE); |