[Libreoffice-commits] core.git: editeng/source filter/source sd/source
Cao Cuong Ngo
cao.cuong.ngo at gmail.com
Sat Apr 13 08:06:42 PDT 2013
editeng/source/editeng/eerdll.cxx | 6 ++++--
editeng/source/uno/unonrule.cxx | 3 ++-
filter/source/msfilter/svdfppt.cxx | 7 ++++---
sd/source/core/drawdoc4.cxx | 3 ++-
sd/source/core/stlpool.cxx | 5 +++--
5 files changed, 15 insertions(+), 9 deletions(-)
New commits:
commit 5785db93c5739846fb0a84b138be485044d4bda5
Author: Cao Cuong Ngo <cao.cuong.ngo at gmail.com>
Date: Wed Apr 10 20:41:54 2013 +0200
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 at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 59086ea..c6a008d 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 ea028e1..cce9583 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 );
}
}
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 1de1b2e..f8530c1 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -47,6 +47,7 @@
#include <svx/svdocapt.hxx>
#include <svx/svdotable.hxx>
#include <editeng/outlobj.hxx>
+#include <editeng/numdef.hxx>
#include <svx/svdattr.hxx>
#include "svx/xattr.hxx"
#include "svx/svditext.hxx"
@@ -4295,20 +4296,20 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
eNumRuleType = SVX_RULETYPE_NUMBERING;
break;
case TSS_TYPE_SUBTITLE :
- nLevels = 10;
+ nLevels = SVX_MAX_NUM;
eNumRuleType = SVX_RULETYPE_NUMBERING;
break;
case TSS_TYPE_BODY :
case TSS_TYPE_HALFBODY :
case TSS_TYPE_QUARTERBODY :
- nLevels = 10;
+ nLevels = SVX_MAX_NUM;
eNumRuleType = SVX_RULETYPE_PRESENTATION_NUMBERING;
break;
default :
case TSS_TYPE_NOTES :
case TSS_TYPE_UNUSED :
case TSS_TYPE_TEXT_IN_SHAPE :
- nLevels = 10;
+ nLevels = SVX_MAX_NUM;
eNumRuleType = SVX_RULETYPE_NUMBERING;
break;
}
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 3cdfe86..abbd02b 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 d11de42..4f4fb64 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
More information about the Libreoffice-commits
mailing list