diff options
author | Cao Cuong Ngo <cao.cuong.ngo@gmail.com> | 2013-04-10 20:41:54 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-04-13 17:33:05 +0200 |
commit | 6f504b6307179f00075bd1dadd722ff2e8855ea9 (patch) | |
tree | 56a3e1fd7f4e4d213bb7942ed2cd25de15c35eb4 /editeng/source | |
parent | add46920608b6f5b79c0ca33845eae4e1e59a4b6 (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 'editeng/source')
-rw-r--r-- | editeng/source/editeng/eerdll.cxx | 6 | ||||
-rw-r--r-- | editeng/source/uno/unonrule.cxx | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx index 740de3a76adb..0ae4491b1669 100644 --- a/editeng/source/editeng/eerdll.cxx +++ b/editeng/source/editeng/eerdll.cxx @@ -36,6 +36,7 @@ #include <editeng/flditem.hxx> #include <editeng/emphitem.hxx> #include <editeng/scriptspaceitem.hxx> +#include <editeng/numdef.hxx> #include <svl/itempool.hxx> #include <vcl/virdev.hxx> @@ -98,14 +99,15 @@ SfxPoolItem** GlobalEditData::GetDefItems() ppDefItems = new SfxPoolItem*[EDITITEMCOUNT]; // Paragraph attributes: - SvxNumRule aTmpNumRule( 0, 0, sal_False ); + SvxNumRule aDefaultNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, + SVX_MAX_NUM, sal_False ); ppDefItems[0] = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ); ppDefItems[1] = new SvXMLAttrContainerItem( EE_PARA_XMLATTRIBS ); ppDefItems[2] = new SfxBoolItem( EE_PARA_HANGINGPUNCTUATION, sal_False ); ppDefItems[3] = new SfxBoolItem( EE_PARA_FORBIDDENRULES, sal_True ); ppDefItems[4] = new SvxScriptSpaceItem( sal_True, EE_PARA_ASIANCJKSPACING ); - ppDefItems[5] = new SvxNumBulletItem( aTmpNumRule, EE_PARA_NUMBULLET ); + ppDefItems[5] = new SvxNumBulletItem( aDefaultNumRule, EE_PARA_NUMBULLET ); ppDefItems[6] = new SfxBoolItem( EE_PARA_HYPHENATE, sal_False ); ppDefItems[7] = new SfxBoolItem( EE_PARA_BULLETSTATE, sal_True ); ppDefItems[8] = new SvxLRSpaceItem( EE_PARA_OUTLLRSPACE ); diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx index 749dad5c75d2..52262c84f88e 100644 --- a/editeng/source/uno/unonrule.cxx +++ b/editeng/source/uno/unonrule.cxx @@ -34,6 +34,7 @@ #include <editeng/unofdesc.hxx> #include <editeng/unonrule.hxx> #include <editeng/editids.hrc> +#include <editeng/numdef.hxx> using ::rtl::OUString; using ::com::sun::star::util::XCloneable; @@ -494,7 +495,7 @@ com::sun::star::uno::Reference< com::sun::star::container::XIndexReplace > SvxCr } else { - SvxNumRule aDefaultRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , sal_False); + SvxNumRule aDefaultRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM , sal_False); return new SvxUnoNumberingRules( aDefaultRule ); } } |