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 15:06:21 +0000 |
commit | 5785db93c5739846fb0a84b138be485044d4bda5 (patch) | |
tree | 24e3aa42bb3f8d618ab25c094d5dfa13e27264df /editeng | |
parent | e70d6fbf4610563b7ff31d0e6393b70b4b0e6510 (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 'editeng')
-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 59086ea31666..c6a008df7eb8 100644 --- a/editeng/source/editeng/eerdll.cxx +++ b/editeng/source/editeng/eerdll.cxx @@ -36,6 +36,7 @@ #include <editeng/flditem.hxx> #include <editeng/emphasismarkitem.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 ea028e1d90aa..cce9583619e2 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 ::com::sun::star::util::XCloneable; using ::com::sun::star::ucb::XAnyCompare; @@ -490,7 +491,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 ); } } |