[Libreoffice-commits] core.git: editeng/source include/editeng svx/sdi

Michael Stahl mstahl at redhat.com
Thu Oct 5 15:23:18 UTC 2017


 editeng/source/items/textitem.cxx |    3 +++
 include/editeng/udlnitem.hxx      |    4 ++++
 svx/sdi/svx.sdi                   |    4 ++--
 svx/sdi/svxitems.sdi              |    3 ++-
 4 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 03041e0f8d8385847c2e77fcaf08c1d33cad938f
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Oct 5 14:18:51 2017 +0200

    tdf#112817 editeng,svx: fix SvxUnderlineItem/SvxOverlineItem SDI
    
    This was asserting because the superclass SvxTextLineItem
    was instantiated instead of the specific subclasses.
    
    Change-Id: If26847b8fa96dbf00062ba8372fe58e58c786782

diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index be0d87401bec..56b07c8e3588 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -105,6 +105,8 @@ SfxPoolItem* SvxPostureItem::CreateDefault() { return new SvxPostureItem(ITALIC_
 SfxPoolItem* SvxWeightItem::CreateDefault() {return new SvxWeightItem(WEIGHT_NORMAL, 0);}
 SfxPoolItem* SvxFontHeightItem::CreateDefault() {return new SvxFontHeightItem(240, 100, 0);}
 SfxPoolItem* SvxTextLineItem::CreateDefault() {return new SvxTextLineItem(LINESTYLE_NONE, 0);}
+SfxPoolItem* SvxUnderlineItem::CreateDefault() {return new SvxUnderlineItem(LINESTYLE_NONE, 0);}
+SfxPoolItem* SvxOverlineItem::CreateDefault() {return new SvxOverlineItem(LINESTYLE_NONE, 0);}
 SfxPoolItem* SvxCrossedOutItem::CreateDefault() {return new SvxCrossedOutItem(STRIKEOUT_NONE, 0);}
 SfxPoolItem* SvxShadowedItem::CreateDefault() {return new SvxShadowedItem(false, 0);}
 SfxPoolItem* SvxAutoKernItem::CreateDefault() {return new SvxAutoKernItem(false, 0);}
@@ -1234,6 +1236,7 @@ bool SvxTextLineItem::operator==( const SfxPoolItem& rItem ) const
 
 // class SvxUnderlineItem ------------------------------------------------
 
+
 SvxUnderlineItem::SvxUnderlineItem( const FontLineStyle eSt, const sal_uInt16 nId )
     : SvxTextLineItem( eSt, nId )
 {
diff --git a/include/editeng/udlnitem.hxx b/include/editeng/udlnitem.hxx
index 694e92ba43b6..94fcfe06f9b8 100644
--- a/include/editeng/udlnitem.hxx
+++ b/include/editeng/udlnitem.hxx
@@ -85,6 +85,8 @@ public:
 class EDITENG_DLLPUBLIC SvxUnderlineItem : public SvxTextLineItem
 {
 public:
+    static SfxPoolItem* CreateDefault();
+
     SvxUnderlineItem( const FontLineStyle eSt,
                       const sal_uInt16 nId );
 
@@ -100,6 +102,8 @@ public:
 class EDITENG_DLLPUBLIC SvxOverlineItem : public SvxTextLineItem
 {
 public:
+    static SfxPoolItem* CreateDefault();
+
     SvxOverlineItem( const FontLineStyle eSt,
                      const sal_uInt16 nId );
 
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 9b9c45297574..932aef3cb2c2 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -8561,7 +8561,7 @@ SfxVoidItem TwainTransfer SID_TWAIN_TRANSFER
 ]
 
 
-SvxTextLineItem Underline SID_ATTR_CHAR_UNDERLINE
+SvxUnderlineItem Underline SID_ATTR_CHAR_UNDERLINE
 
 [
     AutoUpdate = TRUE,
@@ -8580,7 +8580,7 @@ SvxTextLineItem Underline SID_ATTR_CHAR_UNDERLINE
 ]
 
 
-SvxTextLineItem Overline SID_ATTR_CHAR_OVERLINE
+SvxOverlineItem Overline SID_ATTR_CHAR_OVERLINE
 
 [
     AutoUpdate = TRUE,
diff --git a/svx/sdi/svxitems.sdi b/svx/sdi/svxitems.sdi
index 3d264f483dc2..12946d433f16 100644
--- a/svx/sdi/svxitems.sdi
+++ b/svx/sdi/svxitems.sdi
@@ -225,7 +225,8 @@ struct SvxTextLine
     BOOL            HasColor    MID_TL_HASCOLOR;
     INT32           Color       MID_TL_COLOR;
 };
-item SvxTextLine SvxTextLineItem;
+item SvxTextLine SvxUnderlineItem;
+item SvxTextLine SvxOverlineItem;
 
 struct SvxBrush
 {


More information about the Libreoffice-commits mailing list