summaryrefslogtreecommitdiff
path: root/sd/source/core
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-06-13 12:08:04 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-06-13 12:08:04 +0200
commit0466c0dcddd3b5af02c711794e8cd4c3c6c12993 (patch)
tree748aec4a110292c663e425fdfc4d948cf5d78dbd /sd/source/core
parent9665fbad5d1ae9398eba089b685b322df447a32a (diff)
Set mxStyleSheetPool before using it
Change-Id: Id5ce3555c487aa7abcf97855a036663c91dd28b1
Diffstat (limited to 'sd/source/core')
-rw-r--r--sd/source/core/drawdoc.cxx3
-rw-r--r--sd/source/core/drawdoc4.cxx4
2 files changed, 6 insertions, 1 deletions
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 3a08a8de83b3..d899597b7bf0 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -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.
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 2b724a93c7cc..394dd81619cf 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -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);