Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3285

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/85/3285/1

fdo#47018 fix Impress crash on modifying bullet

Add verifying of numbering rule to avoid invalidated attribute

Change-Id: Ifc3db3f09f9358d272245f1e00fad2802f5881ee
---
M sd/source/ui/func/fuolbull.cxx
1 file changed, 11 insertions(+), 1 deletion(-)



diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index ae29032..49fd245 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -22,6 +22,7 @@
 #include <svl/intitem.hxx>
 #include <editeng/outliner.hxx>
 #include <editeng/eeitem.hxx>
+#include <editeng/numitem.hxx>
 #include <sfx2/request.hxx>
 
 #include <editeng/editdata.hxx>
@@ -64,7 +65,16 @@
 
         SfxItemSet aNewAttr( mpViewShell->GetPool(),
                              EE_ITEMS_START, EE_ITEMS_END );
-        aNewAttr.Put( aEditAttr, sal_False );
+
+        // fdo#47018 verify numbering rule
+        const SfxPoolItem* pItem;
+        sal_uInt16 nWhich = aEditAttr.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
+        aEditAttr.GetItemState(nWhich, sal_False, &pItem);
+        const sal_uInt16 levelCount = (*((SvxNumBulletItem*)pItem)->GetNumRule()).GetLevelCount();
+
+        // check if the attribute is valid
+        if ( levelCount )
+            aNewAttr.Put( aEditAttr, sal_False );
 
         // create and execute dialog
         SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();

-- 
To view, visit https://gerrit.libreoffice.org/3285
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc3db3f09f9358d272245f1e00fad2802f5881ee
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo <cao.cuong.ngo@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.