SdStyleSheetPool::GetBulletFont can be static
...that's why the problem fixed in 0466c0dcdd
"Set
mxStyleSheetPool before using it" had never caused trouble in practice (and its
change to SdDrawDocument ctor can be reverted again)
Change-Id: I662995ab4fcaa7ae461cb9575666825d8a869735
This commit is contained in:
@@ -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; }
|
||||
|
||||
|
@@ -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.
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user