[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - editeng/source filter/source sd/source

Cao Cuong Ngo cao.cuong.ngo at gmail.com
Sat Apr 13 08:36:14 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 6f504b6307179f00075bd1dadd722ff2e8855ea9
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.
    
    Reviewed-on: https://gerrit.libreoffice.org/3312
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 5785db93c5739846fb0a84b138be485044d4bda5)
    
    Conflicts:
    	sd/source/core/drawdoc4.cxx
    	sd/source/core/stlpool.cxx
    
    Change-Id: I8a34331006abf3de8c170f8dca43ccf9cec92f04

diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 740de3a..0ae4491 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 749dad5..52262c8 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 );
     }
 }
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 306309d..beb774b 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"
@@ -4283,20 +4284,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 3e1b1e1..56b8f08 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 cfe6c82..7c06d27 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


More information about the Libreoffice-commits mailing list