summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2014-03-19 16:17:02 +0000
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-03-28 14:31:08 +0100
commit6e61ecd09679a66060f932835622821d39e92f01 (patch)
tree4ce71adaa6da133cab09660b3efc1341104022a2 /xmloff
parentc7190108f02921868cb617040aebdb2d22c02c1f (diff)
Merge back branch alg_writerframes to trunk
(cherry picked from commit b635b4fa4e42053d30ab639643d2236a20243f62) Conflicts: comphelper/inc/comphelper/TypeGeneration.hxx comphelper/source/property/TypeGeneration.cxx cui/source/factory/dlgfact.hxx cui/source/inc/cuitabarea.hxx cui/source/tabpages/tabarea.cxx cui/source/tabpages/tabarea.hrc cui/source/tabpages/tabarea.src cui/source/tabpages/tparea.cxx drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx drawinglayer/source/texture/texture.cxx editeng/inc/editeng/unotext.hxx editeng/source/items/frmitems.cxx include/drawinglayer/texture/texture.hxx include/editeng/brushitem.hxx include/svx/sdr/primitive2d/sdrdecompositiontools.hxx include/svx/svxids.hrc include/xmloff/xmltypes.hxx reportdesign/source/ui/misc/UITools.cxx sc/source/ui/drawfunc/drawsh.cxx sfx2/source/dialog/tabdlg.cxx svl/source/undo/undo.cxx svx/inc/svx/unoshprp.hxx sw/Library_sw.mk sw/inc/doc.hxx sw/inc/format.hxx sw/inc/frmfmt.hxx sw/inc/swatrset.hxx sw/inc/unomap.hxx sw/inc/unoprnms.hxx sw/source/core/access/accpara.cxx sw/source/core/attr/format.cxx sw/source/core/attr/swatrset.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/notxtfrm.cxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/text/inftxt.cxx sw/source/core/text/porfld.cxx sw/source/core/text/txtfly.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/uibase/app/docst.cxx sw/source/core/uibase/app/docstyle.cxx sw/source/core/uibase/shells/drawdlg.cxx sw/source/core/uibase/shells/frmsh.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unostyle.cxx sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/fmtui/tmpdlg.src sw/source/ui/frmdlg/frmdlg.cxx sw/source/ui/frmdlg/frmpage.src sw/source/ui/inc/frmsh.hxx xmloff/source/text/txtprhdl.cxx xmloff/source/text/txtprmap.cxx Change-Id: Id3ffaa83bb5594d287f1ac8f2c1c9cf55c70946d
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/sdpropls.cxx6
-rw-r--r--xmloff/source/text/txtexppr.cxx36
-rw-r--r--xmloff/source/text/txtprhdl.cxx39
-rw-r--r--xmloff/source/text/txtprmap.cxx29
4 files changed, 99 insertions, 11 deletions
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 542d3ffd7eab..9a400972ed4b 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -392,7 +392,7 @@ static SvXMLEnumMapEntry const aXML_LineCap_EnumMap[] =
{ XML_TOKEN_INVALID, 0 }
};
-static SvXMLEnumMapEntry const aXML_FillStyle_EnumMap[] =
+SvXMLEnumMapEntry aXML_FillStyle_EnumMap[] =
{
{ XML_NONE, drawing::FillStyle_NONE },
{ XML_SOLID, drawing::FillStyle_SOLID },
@@ -489,7 +489,7 @@ SvXMLEnumMapEntry const aXML_ConnectionKind_EnumMap[] =
{ XML_TOKEN_INVALID, 0 }
};
-static SvXMLEnumMapEntry const aXML_BitmapMode_EnumMap[] =
+SvXMLEnumMapEntry aXML_BitmapMode_EnumMap[] =
{
{ XML_REPEAT, drawing::BitmapMode_REPEAT },
{ XML_STRETCH, drawing::BitmapMode_STRETCH },
@@ -538,7 +538,7 @@ static SvXMLEnumMapEntry const aXML_TexMode_EnumMap[] =
{ XML_TOKEN_INVALID, 0 }
};
-static SvXMLEnumMapEntry const aXML_RefPoint_EnumMap[] =
+SvXMLEnumMapEntry aXML_RefPoint_EnumMap[] =
{
{ XML_TOP_LEFT, drawing::RectanglePoint_LEFT_TOP },
{ XML_TOP, drawing::RectanglePoint_MIDDLE_TOP },
diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx
index 114319d4c18c..3cffbe180bb4 100644
--- a/xmloff/source/text/txtexppr.cxx
+++ b/xmloff/source/text/txtexppr.cxx
@@ -653,6 +653,10 @@ void XMLTextExportPropertySetMapper::ContextFilter(
XMLPropertyState* pAllParaMargin = NULL;
XMLPropertyState* pAllMargin = NULL;
+ //UUUU
+ XMLPropertyState* pRepeatOffsetX = NULL;
+ XMLPropertyState* pRepeatOffsetY = NULL;
+
sal_Bool bNeedsAnchor = sal_False;
for( ::std::vector< XMLPropertyState >::iterator aIter = rProperties.begin();
@@ -789,9 +793,41 @@ void XMLTextExportPropertySetMapper::ContextFilter(
case CTF_PARAMARGINALL_REL: pAllParaMarginRel = propertie; break;
case CTF_PARAMARGINALL: pAllParaMargin = propertie; break;
case CTF_MARGINALL: pAllMargin = propertie; break;
+
+ //UUUU
+ case CTF_SW_REPEAT_OFFSET_X:
+ pRepeatOffsetX = propertie;
+ break;
+
+ //UUUU
+ case CTF_SW_REPEAT_OFFSET_Y:
+ pRepeatOffsetY = propertie;
+ break;
+
+ //UUUU
+ case CTF_SW_FILLGRADIENTNAME:
+ case CTF_SW_FILLHATCHNAME:
+ case CTF_SW_FILLBITMAPNAME:
+ case CTF_SW_FILLTRANSNAME:
+ {
+ OUString aStr;
+ if( (propertie->maValue >>= aStr) && 0 == aStr.getLength() )
+ propertie->mnIndex = -1;
+ }
+ break;
}
}
+ //UUUU
+ if( pRepeatOffsetX && pRepeatOffsetY )
+ {
+ sal_Int32 nOffset = 0;
+ if( ( pRepeatOffsetX->maValue >>= nOffset ) && ( nOffset == 0 ) )
+ pRepeatOffsetX->mnIndex = -1;
+ else
+ pRepeatOffsetY->mnIndex = -1;
+ }
+
if( pFontNameState )
ContextFontFilter( bEnableFoFontFamily, pFontNameState, pFontFamilyNameState,
pFontStyleNameState, pFontFamilyState,
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx
index 86ba23d758df..2e60acef7ef9 100644
--- a/xmloff/source/text/txtprhdl.cxx
+++ b/xmloff/source/text/txtprhdl.cxx
@@ -52,6 +52,8 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::style;
using namespace ::com::sun::star::text;
using namespace ::xmloff::token;
+//UUUU
+using namespace ::com::sun::star::drawing;
static SvXMLEnumMapEntry const pXML_HoriPos_Enum[] =
{
@@ -1222,6 +1224,18 @@ public:
~XMLTextPropertyHandlerFactory_Impl();
};
+//UUUU
+#include <xmloff/EnumPropertyHdl.hxx>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include "XMLFillBitmapSizePropertyHandler.hxx"
+#include "XMLBitmapLogicalSizePropertyHandler.hxx"
+#include <com/sun/star/drawing/RectanglePoint.hpp>
+#include <com/sun/star/drawing/BitmapMode.hpp>
+#include "XMLBitmapRepeatOffsetPropertyHandler.hxx"
+extern SvXMLEnumMapEntry aXML_FillStyle_EnumMap[];
+extern SvXMLEnumMapEntry aXML_RefPoint_EnumMap[];
+extern SvXMLEnumMapEntry aXML_BitmapMode_EnumMap[];
+
const XMLPropertyHandler *XMLTextPropertyHandlerFactory_Impl::GetPropertyHandler
( sal_Int32 nType ) const
{
@@ -1390,12 +1404,31 @@ 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;
case XML_TYPE_VERTICAL_ALIGN:
pHdl = new XMLConstantsPropertyHandler( pXML_VerticalAlign_Enum, XML_TOKEN_INVALID );
break;
+
+ //UUUU
+ case XML_SW_TYPE_FILLSTYLE:
+ pHdl = new XMLEnumPropertyHdl( aXML_FillStyle_EnumMap, ::getCppuType((const FillStyle*)0) );
+ break;
+ case XML_SW_TYPE_FILLBITMAPSIZE:
+ pHdl = new XMLFillBitmapSizePropertyHandler();
+ break;
+ case XML_SW_TYPE_LOGICAL_SIZE:
+ pHdl = new XMLBitmapLogicalSizePropertyHandler();
+ break;
+ case XML_SW_TYPE_BITMAP_REFPOINT:
+ pHdl = new XMLEnumPropertyHdl( aXML_RefPoint_EnumMap, getCppuType((const RectanglePoint*)0) );
+ break;
+ case XML_SW_TYPE_BITMAP_MODE:
+ pHdl = new XMLEnumPropertyHdl( aXML_BitmapMode_EnumMap, getCppuType((const BitmapMode*)0) );
+ break;
+ case XML_SW_TYPE_BITMAPREPOFFSETX:
+ case XML_SW_TYPE_BITMAPREPOFFSETY:
+ pHdl = new XMLBitmapRepeatOffsetPropertyHandler(XML_SW_TYPE_BITMAPREPOFFSETX == nType);
+ break;
+
}
return pHdl;
diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index b96a433defb7..175b70727181 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -77,6 +77,9 @@ using namespace ::xmloff::token;
#define M_END() \
{ NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false }
+//UUUU
+#define _MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010, false }
+#define GMAP(name,prefix,token,type,context) _MAP(name,prefix,token,static_cast<sal_Int32>(type|XML_TYPE_PROP_GRAPHIC),context)
XMLPropertyMapEntry aXMLParaPropMap[] =
{
@@ -687,11 +690,27 @@ 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 ),
+ //UUUU fill attributes
+ GMAP( "FillStyle", XML_NAMESPACE_DRAW, XML_FILL, XML_SW_TYPE_FILLSTYLE, 0 ),
+ GMAP( "FillColor", XML_NAMESPACE_DRAW, XML_FILL_COLOR, XML_TYPE_COLOR, 0 ),
+ GMAP( "FillColor2", XML_NAMESPACE_DRAW, XML_SECONDARY_FILL_COLOR, XML_TYPE_COLOR, 0 ),
+ GMAP( "FillGradientName", XML_NAMESPACE_DRAW, XML_FILL_GRADIENT_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SW_FILLGRADIENTNAME ),
+ GMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER16, 0 ),
+ GMAP( "FillHatchName", XML_NAMESPACE_DRAW, XML_FILL_HATCH_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SW_FILLHATCHNAME ),
+ GMAP( "FillBackground", XML_NAMESPACE_DRAW, XML_FILL_HATCH_SOLID, XML_TYPE_BOOL, 0 ),
+ GMAP( "FillBitmapName", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SW_FILLBITMAPNAME ),
+ GMAP( "FillTransparence", XML_NAMESPACE_DRAW, XML_OPACITY, XML_TYPE_NEG_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too
+ GMAP( "FillTransparenceGradientName", XML_NAMESPACE_DRAW, XML_OPACITY_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SW_FILLTRANSNAME ),
+ GMAP( "FillBitmapSizeX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SW_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ GMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SW_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ GMAP( "FillBitmapSizeY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT, XML_SW_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ GMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT, XML_SW_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ GMAP( "FillBitmapMode", XML_NAMESPACE_STYLE,XML_REPEAT, XML_SW_TYPE_BITMAP_MODE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ GMAP( "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT, 0 ),
+ GMAP( "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_Y, XML_TYPE_PERCENT, 0 ),
+ GMAP( "FillBitmapRectanglePoint", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT, XML_SW_TYPE_BITMAP_REFPOINT, 0 ),
+ GMAP( "FillBitmapOffsetX", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SW_TYPE_BITMAPREPOFFSETX|MID_FLAG_MULTI_PROPERTY, CTF_SW_REPEAT_OFFSET_X ),
+ GMAP( "FillBitmapOffsetY", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SW_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY, CTF_SW_REPEAT_OFFSET_Y ),
// RES_BOX
MG_ED( "LeftBorder", STYLE, BORDER_LINE_WIDTH, XML_TYPE_BORDER_WIDTH, CTF_ALLBORDERWIDTH ),