summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2022-06-13 08:53:22 +0200
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2022-06-16 15:44:53 +0200
commitc4cf2e82e8d0aaef9b1daedc033d6edf647e5284 (patch)
tree86baca7fce89d0527d8177a7c4bb9a0e804cfc64 /svx
parent3d2e26d8b7a99d0a622741ef4327e8cbc93bbe02 (diff)
tdf#128150 Add OOXML import/export for "use background fill"
and allow editing this fill property in area dlg Change-Id: Ic63ba11e9d499d4a0fb22f6739587e3e25140b8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134406 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdattr.cxx1
-rw-r--r--svx/source/xoutdev/xattr2.cxx27
-rw-r--r--svx/source/xoutdev/xpool.cxx2
3 files changed, 30 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 920b38882024..c0057b6aee70 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -441,6 +441,7 @@ OUString SdrItemPool::GetItemName(sal_uInt16 nWhich)
case XATTR_FILLBMP_POSOFFSETX : pResId = SIP_XA_FILLBMP_POSOFFSETX;break;
case XATTR_FILLBMP_POSOFFSETY : pResId = SIP_XA_FILLBMP_POSOFFSETY;break;
case XATTR_FILLBACKGROUND : pResId = SIP_XA_FILLBACKGROUND;break;
+ case XATTR_FILLUSESLIDEBACKGROUND: pResId = SIP_XA_FILLUSESLIDEBACKGROUND;break;
case XATTRSET_FILL : pResId = SIP_XATTRSET_FILL;break;
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index e4136c9280ab..ad1b3b2959e5 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -39,6 +39,7 @@
#include <svx/xflbstit.hxx>
#include <svx/xflboxy.hxx>
#include <svx/xflbckit.hxx>
+#include <svx/xfilluseslidebackgrounditem.hxx>
#include <svx/dialmgr.hxx>
#include <svx/xdef.hxx>
#include <AffineMatrixItem.hxx>
@@ -701,4 +702,30 @@ void XFillBackgroundItem::dumpAsXml(xmlTextWriterPtr pWriter) const
(void)xmlTextWriterEndElement(pWriter);
}
+XFillUseSlideBackgroundItem::XFillUseSlideBackgroundItem( bool bFill ) :
+ SfxBoolItem( XATTR_FILLUSESLIDEBACKGROUND, bFill )
+{
+}
+
+XFillUseSlideBackgroundItem* XFillUseSlideBackgroundItem::Clone( SfxItemPool* /*pPool*/) const
+{
+ return new XFillUseSlideBackgroundItem( *this );
+}
+
+bool XFillUseSlideBackgroundItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCoreUnit*/,
+ MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper&) const
+{
+ rText.clear();
+ return true;
+}
+
+void XFillUseSlideBackgroundItem::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("XFillUseSlideBackgroundItem"));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::boolean(GetValue()).getStr()));
+ (void)xmlTextWriterEndElement(pWriter);
+}
+
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx
index 804aed87ca5e..771b79ac4991 100644
--- a/svx/source/xoutdev/xpool.cxx
+++ b/svx/source/xoutdev/xpool.cxx
@@ -42,6 +42,7 @@
#include <svx/xlinjoit.hxx>
#include <svx/xlncapit.hxx>
#include <svx/xfillit0.hxx>
+#include <svx/xfilluseslidebackgrounditem.hxx>
#include <svx/xtextit0.hxx>
#include <svx/xlnasit.hxx>
#include <svx/xlndsit.hxx>
@@ -126,6 +127,7 @@ XOutdevItemPool::XOutdevItemPool(SfxItemPool* _pMaster)
rPoolDefaults[XATTR_FILLFLOATTRANSPARENCE -XATTR_START] = new XFillFloatTransparenceItem( XGradient(COL_BLACK, COL_BLACK), false );
rPoolDefaults[XATTR_SECONDARYFILLCOLOR -XATTR_START] = new XSecondaryFillColorItem(aNullStr, aNullFillCol);
rPoolDefaults[XATTR_FILLBACKGROUND -XATTR_START] = new XFillBackgroundItem;
+ rPoolDefaults[XATTR_FILLUSESLIDEBACKGROUND -XATTR_START] = new XFillUseSlideBackgroundItem;
rPoolDefaults[XATTR_FORMTXTSTYLE -XATTR_START] = new XFormTextStyleItem;
rPoolDefaults[XATTR_FORMTXTADJUST -XATTR_START] = new XFormTextAdjustItem;
rPoolDefaults[XATTR_FORMTXTDISTANCE -XATTR_START] = new XFormTextDistanceItem;