[Libreoffice-commits] core.git: sd/inc sd/source
Stephan Bergmann
sbergman at redhat.com
Fri Jun 13 09:09:45 PDT 2014
sd/inc/stlpool.hxx | 2 +-
sd/source/core/drawdoc.cxx | 3 +--
sd/source/core/drawdoc4.cxx | 7 ++-----
sd/source/core/stlpool.cxx | 2 +-
4 files changed, 5 insertions(+), 9 deletions(-)
New commits:
commit 448c62835b3c28f7b62f336d232c7966ce4c859a
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 13 18:03:37 2014 +0200
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
diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx
index 7af9fe9..ae14609 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 d899597..3a08a8d 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 f6c0131..f47a5d9 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 b4d26217..da88e23 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);
More information about the Libreoffice-commits
mailing list