summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-01-29 11:10:22 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-01-29 15:20:59 +0100
commitbb00150ef62ccd256b3e8ec2dabec5eb2d6a667f (patch)
tree9c6d2290f5e9377053826e9552fa83a37dbe4333 /xmloff
parent81a46fc86a530f028a5bd2f5e52fe0372d50ee38 (diff)
xmloff: export Wrtier's RES_FILL_STYLE and RES_FILL_GRADIENT
Change-Id: Id0adf3733ac4c2c08ded659c2d621ddbbbb434c5
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/xmloff/xmltypes.hxx1
-rw-r--r--xmloff/source/text/txtprhdl.cxx15
-rw-r--r--xmloff/source/text/txtprmap.cxx6
3 files changed, 22 insertions, 0 deletions
diff --git a/xmloff/inc/xmloff/xmltypes.hxx b/xmloff/inc/xmloff/xmltypes.hxx
index f97256557c14..b49a1bb95951 100644
--- a/xmloff/inc/xmloff/xmltypes.hxx
+++ b/xmloff/inc/xmloff/xmltypes.hxx
@@ -272,6 +272,7 @@
#define XML_TYPE_TEXT_OVERLINE_COLOR (XML_TEXT_TYPES_START + 112)
#define XML_TYPE_TEXT_OVERLINE_HASCOLOR (XML_TEXT_TYPES_START + 113)
#define XML_TYPE_BOOL_FALSE (XML_TEXT_TYPES_START + 114)
+#define XML_TYPE_FILLSTYLE (XML_TEXT_TYPES_START + 115)
#define XML_SCH_TYPES_START (0x4 << XML_TYPE_APP_SHIFT)
#define XML_PM_TYPES_START (0x5 << XML_TYPE_APP_SHIFT) // page master
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx
index ca7fde13e639..b86be39f7e06 100644
--- a/xmloff/source/text/txtprhdl.cxx
+++ b/xmloff/source/text/txtprhdl.cxx
@@ -21,6 +21,7 @@
#include <rtl/ustrbuf.hxx>
#include <tools/fontenum.hxx>
#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/style/DropCapFormat.hpp>
#include <com/sun/star/text/FontRelief.hpp>
#include <com/sun/star/text/WrapTextMode.hpp>
@@ -49,6 +50,7 @@
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
+using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::style;
using namespace ::com::sun::star::text;
@@ -235,6 +237,16 @@ SvXMLEnumMapEntry const pXML_WrapInfluenceOnPosition_Enum[] =
{ XML_TOKEN_INVALID, 0 }
};
+SvXMLEnumMapEntry const pXML_FillStyle_Enum[] =
+{
+ { XML_NONE, drawing::FillStyle_NONE },
+ { XML_SOLID, drawing::FillStyle_SOLID },
+ { XML_BITMAP, drawing::FillStyle_BITMAP },
+ { XML_GRADIENT, drawing::FillStyle_GRADIENT },
+ { XML_HATCH, drawing::FillStyle_HATCH },
+ { XML_TOKEN_INVALID, 0 }
+};
+
// ---------------------------------------------------------------------------
class XMLDropCapPropHdl_Impl : public XMLPropertyHandler
@@ -1419,6 +1431,9 @@ const XMLPropertyHandler *XMLTextPropertyHandlerFactory_Impl::GetPropertyHandler
case XML_TYPE_TEXT_NUMBER8_ONE_BASED:
pHdl = new XMLNumber8OneBasedHdl();
break;
+ case XML_TYPE_FILLSTYLE:
+ pHdl = new XMLConstantsPropertyHandler( pXML_FillStyle_Enum, XML_TOKEN_INVALID );
+ break;
}
return pHdl;
diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index f571e5d369d4..def83355d0aa 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -628,6 +628,12 @@ XMLPropertyMapEntry aXMLFramePropMap[] =
MG_E( "BackGraphicFilter",STYLE, FILTER_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_FILTER ),
MG_E( "BackGraphicURL", STYLE, BACKGROUND_IMAGE, MID_FLAG_ELEMENT_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_URL ),
+ // RES_FILL_STYLE
+ MG_E( "FillStyle", DRAW, FILL, XML_TYPE_FILLSTYLE, 0 ),
+
+ // RES_FILL_GRADIENT
+ MG_E( "FillGradientName", DRAW, FILL_GRADIENT_NAME, XML_TYPE_STYLENAME, 0 ),
+
// RES_BOX
MG_ED( "LeftBorder", STYLE, BORDER_LINE_WIDTH, XML_TYPE_BORDER_WIDTH, CTF_ALLBORDERWIDTH ),
MG_ED( "LeftBorder", STYLE, BORDER_LINE_WIDTH_LEFT, XML_TYPE_BORDER_WIDTH, CTF_LEFTBORDERWIDTH ),