Kaydet (Commit) 0466c0dc authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Set mxStyleSheetPool before using it

Change-Id: Id5ce3555c487aa7abcf97855a036663c91dd28b1
üst 9665fbad
......@@ -204,11 +204,12 @@ 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.
......
......@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/config.h>
#include <cassert>
#include <com/sun/star/style/XStyle.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
......@@ -1206,6 +1209,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() );
aBulletFont.SetSize(Size(0,846)); // 24 pt
aBulletItem.SetFont(aBulletFont);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment