openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1600631 - in /openoffice/trunk/main/xmloff/source: draw/sdpropls.cxx text/txtprmap.cxx
Date Thu, 05 Jun 2014 12:24:36 GMT
Author: alg
Date: Thu Jun  5 12:24:35 2014
New Revision: 1600631

URL: http://svn.apache.org/r1600631
Log:
i125045 For XMLPropertyMapper using TEXT_PROP_MAP_SHAPE_PARA hide the DrawingLayer FillStyle
entries by moving them to the front of aXMLParaPropMap and using a higher index for construction

Modified:
    openoffice/trunk/main/xmloff/source/draw/sdpropls.cxx
    openoffice/trunk/main/xmloff/source/text/txtprmap.cxx

Modified: openoffice/trunk/main/xmloff/source/draw/sdpropls.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/xmloff/source/draw/sdpropls.cxx?rev=1600631&r1=1600630&r2=1600631&view=diff
==============================================================================
--- openoffice/trunk/main/xmloff/source/draw/sdpropls.cxx (original)
+++ openoffice/trunk/main/xmloff/source/draw/sdpropls.cxx Thu Jun  5 12:24:35 2014
@@ -123,12 +123,11 @@ const XMLPropertyMapEntry aXMLSDProperti
 	GMAP( "FillHatchName",					XML_NAMESPACE_DRAW, XML_FILL_HATCH_NAME,		XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT,
CTF_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_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_FILLTRANSNAME ),
-
-	GMAP( "FillBitmapSizeX",			    	XML_NAMESPACE_DRAW,	XML_FILL_IMAGE_WIDTH,		XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY,
0 ),
+	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_FILLTRANSNAME ),
+	GMAP( "FillBitmapSizeX",			    XML_NAMESPACE_DRAW,	XML_FILL_IMAGE_WIDTH,		XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY,
0 ),
 	GMAP( "FillBitmapLogicalSize",			XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH,		XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY,
0 ),
-	GMAP( "FillBitmapSizeY",			    	XML_NAMESPACE_DRAW,	XML_FILL_IMAGE_HEIGHT,		XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY,
0 ),
+	GMAP( "FillBitmapSizeY",			    XML_NAMESPACE_DRAW,	XML_FILL_IMAGE_HEIGHT,		XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY,
0 ),
 	GMAP( "FillBitmapLogicalSize",			XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT,		XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY,
0 ),
 	GMAP( "FillBitmapMode",					XML_NAMESPACE_STYLE,XML_REPEAT, 				XML_SD_TYPE_BITMAP_MODE|MID_FLAG_MULTI_PROPERTY,
0 ),
 	GMAP( "FillBitmapPositionOffsetX",		XML_NAMESPACE_DRAW,	XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT,
0 ),

Modified: openoffice/trunk/main/xmloff/source/text/txtprmap.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/xmloff/source/text/txtprmap.cxx?rev=1600631&r1=1600630&r2=1600631&view=diff
==============================================================================
--- openoffice/trunk/main/xmloff/source/text/txtprmap.cxx (original)
+++ openoffice/trunk/main/xmloff/source/text/txtprmap.cxx Thu Jun  5 12:24:35 2014
@@ -87,7 +87,32 @@ XMLPropertyMapEntry aXMLParaPropMap[] =
 {
 	// RES_UNKNOWNATR_CONTAINER
 	MP_E( "ParaUserDefinedAttributes", TEXT, XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM,
0 ),
-	// RES_LR_SPACE
+
+    //UUUU fill attributes for paragraph backgrounds
+    // #125045# moved to the front to be able to exclude these in lcl_txtprmap_getMap
+    // for TEXT_PROP_MAP_SHAPE_PARA to not have these double for Shapes (which already have
these)
+    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_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_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_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_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_REPEAT_OFFSET_X ),
+    GMAP( "FillBitmapOffsetY",				XML_NAMESPACE_DRAW,	XML_TILE_REPEAT_OFFSET, 	XML_SW_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY,
CTF_REPEAT_OFFSET_Y ),
+
+    // RES_LR_SPACE
     // !!! DO NOT REORDER THE MARGINS !!!
 	MP_E( "ParaLeftMargin",			FO,	MARGIN,		XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARAMARGINALL
),
 	MP_E( "ParaLeftMarginRelative",	FO,	MARGIN,		XML_TYPE_PERCENT16, CTF_PARAMARGINALL_REL ),
@@ -316,28 +341,6 @@ XMLPropertyMapEntry aXMLParaPropMap[] =
 	MP_E( "ParaBackGraphicFilter",STYLE,	FILTER_NAME,	MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING,
CTF_BACKGROUND_FILTER ),
 	MP_E( "ParaBackGraphicURL",	STYLE,	BACKGROUND_IMAGE,	MID_FLAG_ELEMENT_ITEM|XML_TYPE_STRING,
CTF_BACKGROUND_URL ),
 
-	//UUUU fill attributes for paragraph backgrounds
-	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_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_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_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_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_REPEAT_OFFSET_X ),
-	GMAP( "FillBitmapOffsetY",				XML_NAMESPACE_DRAW,	XML_TILE_REPEAT_OFFSET, 	XML_SW_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY,
CTF_REPEAT_OFFSET_Y ),
-
     // RES_BOX
 	MP_E( "LeftBorder",			STYLE,	BORDER_LINE_WIDTH,		  XML_TYPE_BORDER_WIDTH, CTF_ALLBORDERWIDTH
),
 	MP_E( "LeftBorder",			STYLE,	BORDER_LINE_WIDTH_LEFT,	  XML_TYPE_BORDER_WIDTH, CTF_LEFTBORDERWIDTH
),
@@ -897,7 +900,11 @@ XMLPropertyMapEntry *lcl_txtprmap_getMap
 		pMap = aXMLTextPropMap;
 		break;
 	case TEXT_PROP_MAP_SHAPE_PARA:
-		pMap = &(aXMLParaPropMap[1]);
+        // #125045# use [21] instead of [1] for text props for Shapes, idices
+        // [1..20] contain the DrawingLayer FillStyle attributes corresponding to
+        // [XATTR_FILL_FIRST .. XATTR_FILL_LAST] and would be double since Shapes
+        // already contain these (usually in aXMLSDProperties)
+		pMap = &(aXMLParaPropMap[21]);
         OSL_ENSURE( pMap->meXMLName == XML_MARGIN, "shape para map changed" );
 		break;
 	case TEXT_PROP_MAP_PARA:



Mime
View raw message