summaryrefslogtreecommitdiff
path: root/sd/source
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 15:06:21 +0000
commit5785db93c5739846fb0a84b138be485044d4bda5 (patch)
tree24e3aa42bb3f8d618ab25c094d5dfa13e27264df /sd/source
parente70d6fbf4610563b7ff31d0e6393b70b4b0e6510 (diff)
fdo#47018 Impress crashes when modifying bullet
Default numbering rules shouldn't be left zero nor hard-coded. Change-Id: I8a34331006abf3de8c170f8dca43ccf9cec92f04 Reviewed-on: https://gerrit.libreoffice.org/3312 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sd/source')
-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 3cdfe86f373a..abbd02b492d4 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/adjustitem.hxx>
+#include <editeng/numdef.hxx>
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx> // SVX_RESSTR
#include <editeng/bulletitem.hxx>
@@ -1223,7 +1224,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 d11de4298920..4f4fb64fb556 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -49,6 +49,7 @@
#include <editeng/bulletitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/adjustitem.hxx>
+#include <editeng/numdef.hxx>
#include <svl/itempool.hxx>
#include "stlpool.hxx"
@@ -989,7 +990,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++ )
{
@@ -1045,7 +1046,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