summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCao Cuong Ngo <cao.cuong.ngo@gmail.com>2013-04-10 20:41:54 +0200
committerEike Rathke <erack@redhat.com>2013-04-13 17:33:05 +0200
commit6f504b6307179f00075bd1dadd722ff2e8855ea9 (patch)
tree56a3e1fd7f4e4d213bb7942ed2cd25de15c35eb4 /sd
parentadd46920608b6f5b79c0ca33845eae4e1e59a4b6 (diff)
fdo#47018 Impress crashes when modifying bullet
Default numbering rules shouldn't be left zero nor hard-coded. Reviewed-on: https://gerrit.libreoffice.org/3312 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 5785db93c5739846fb0a84b138be485044d4bda5) Conflicts: sd/source/core/drawdoc4.cxx sd/source/core/stlpool.cxx Change-Id: I8a34331006abf3de8c170f8dca43ccf9cec92f04
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/drawdoc4.cxx3
-rw-r--r--sd/source/core/stlpool.cxx5
2 files changed, 5 insertions, 3 deletions
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 3e1b1e197128..56b8f08f77cc 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -40,6 +40,7 @@
#include <editeng/ulspitem.hxx>
#include <editeng/lspcitem.hxx>
#include <editeng/adjitem.hxx>
+#include <editeng/numdef.hxx>
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx> // SVX_RESSTR
#include <editeng/bulitem.hxx>
@@ -1302,7 +1303,7 @@ void SdDrawDocument::SetTextDefaults() const
aNumberFormat.SetStart(1);
aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
- SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10, sal_False);
+ SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM, sal_False);
aNumberFormat.SetLSpace( 0 );
aNumberFormat.SetAbsLSpace( 0 );
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index cfe6c82a54bc..7c06d27ef75a 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -49,6 +49,7 @@
#include <editeng/bulitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/adjitem.hxx>
+#include <editeng/numdef.hxx>
#include <svl/itempool.hxx>
#include "stlpool.hxx"
@@ -994,7 +995,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumberFormat.SetStart(1);
aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
- SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , sal_False);
+ SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM , sal_False);
for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ )
{
@@ -1050,7 +1051,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE|NUM_SYMBOL_ALIGNMENT,
- 10, sal_False );
+ SVX_MAX_NUM, sal_False );
for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ )
{
aNumberFormat.SetBulletChar( 0x25CF ); // StarBats: 0xF000 + 34