summaryrefslogtreecommitdiff
path: root/xmloff/source/forms/controlpropertymap.cxx
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2002-10-22 12:37:16 +0000
committerFrank Schönheit <fs@openoffice.org>2002-10-22 12:37:16 +0000
commite71d1661cb6b3b73978ddc3686461c72ecb2937d (patch)
tree9709547a6f1ba77e27a444efe4e10252acb32659 /xmloff/source/forms/controlpropertymap.cxx
parentfbb63a8752a53df0a204f7bc86d0a5a240e257a7 (diff)
#102407# corrected the MAP macro - old version generated invalid lengths for the PROPERTY_xxx strings
Diffstat (limited to 'xmloff/source/forms/controlpropertymap.cxx')
-rw-r--r--xmloff/source/forms/controlpropertymap.cxx56
1 files changed, 30 insertions, 26 deletions
diff --git a/xmloff/source/forms/controlpropertymap.cxx b/xmloff/source/forms/controlpropertymap.cxx
index 476aad1cf159..49495546d681 100644
--- a/xmloff/source/forms/controlpropertymap.cxx
+++ b/xmloff/source/forms/controlpropertymap.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: controlpropertymap.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: hr $ $Date: 2002-02-21 15:07:27 $
+ * last change: $Author: fs $ $Date: 2002-10-22 13:37:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,34 +88,35 @@ namespace xmloff
{
//.........................................................................
-#define MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context }
+#define MAP_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type, context }
+#define MAP_CONST( name, prefix, token, type, context ) { name, name.length, prefix, token, type, context }
#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0 }
XMLPropertyMapEntry aControlStyleProperties[] =
{
- MAP( PROPERTY_BACKGROUNDCOLOR, XML_NAMESPACE_FO, XML_BACKGROUND_COLOR, XML_TYPE_COLOR, 0 ),
- MAP( PROPERTY_ALIGN, XML_NAMESPACE_STYLE, XML_TEXT_ALIGN, XML_TYPE_TEXT_ALIGN, 0 ),
- MAP( PROPERTY_BORDER, XML_NAMESPACE_FO, XML_BORDER, XML_TYPE_CONTROL_BORDER, 0 ),
- MAP( "FontCharWidth", XML_NAMESPACE_STYLE, XML_FONT_CHAR_WIDTH, XML_TYPE_NUMBER16, 0 ),
- MAP( "FontCharset", XML_NAMESPACE_STYLE, XML_FONT_CHARSET, XML_TYPE_TEXT_FONTENCODING, 0 ),
- MAP( "FontFamily", XML_NAMESPACE_STYLE, XML_FONT_FAMILY_GENERIC, XML_TYPE_TEXT_FONTFAMILY, 0 ),
- MAP( "FontHeight", XML_NAMESPACE_FO, XML_FONT_SIZE, XML_TYPE_CHAR_HEIGHT, 0 ),
- MAP( "FontKerning", XML_NAMESPACE_STYLE, XML_LETTER_KERNING, XML_TYPE_BOOL, 0 ),
- MAP( "FontName", XML_NAMESPACE_STYLE, XML_FONT_NAME, XML_TYPE_STRING, 0 ),
- MAP( "FontOrientation", XML_NAMESPACE_STYLE, XML_ROTATION_ANGLE, XML_TYPE_ROTATION_ANGLE, 0 ),
- MAP( "FontPitch", XML_NAMESPACE_STYLE, XML_FONT_PITCH, XML_TYPE_TEXT_FONTPITCH, 0 ),
- MAP( "FontSlant", XML_NAMESPACE_FO, XML_FONT_STYLE, XML_TYPE_TEXT_POSTURE, 0 ),
- MAP( "FontStrikeout", XML_NAMESPACE_STYLE, XML_TEXT_CROSSING_OUT, XML_TYPE_TEXT_CROSSEDOUT, 0 ),
- MAP( "FontStyleName", XML_NAMESPACE_STYLE, XML_FONT_STYLE_NAME, XML_TYPE_STRING, 0 ),
- MAP( "FontUnderline", XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE, XML_TYPE_TEXT_UNDERLINE, 0 ),
- MAP( "FontWeight", XML_NAMESPACE_FO, XML_FONT_WEIGHT, XML_TYPE_TEXT_WEIGHT, 0 ),
- MAP( "FontWidth", XML_NAMESPACE_STYLE, XML_FONT_WIDTH, XML_TYPE_FONT_WIDTH, 0 ),
- MAP( "FontWordLineMode", XML_NAMESPACE_FO, XML_SCORE_SPACES, XML_TYPE_NBOOL, 0 ),
- MAP( "TextColor", XML_NAMESPACE_FO, XML_COLOR, XML_TYPE_COLOR, 0 ),
- MAP( PROPERTY_FORMATKEY, XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME, XML_TYPE_STRING, 0 ),
- MAP( "FontEmphasisMark", XML_NAMESPACE_STYLE, XML_TEXT_EMPHASIZE, XML_TYPE_CONTROL_TEXT_EMPHASIZE, 0 ),
- MAP( "FontRelief", XML_NAMESPACE_STYLE, XML_FONT_RELIEF, XML_TYPE_TEXT_FONT_RELIEF|MID_FLAG_MULTI_PROPERTY, 0 ),
- MAP( "TextLineColor", XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, 0 ),
+ MAP_CONST( PROPERTY_BACKGROUNDCOLOR, XML_NAMESPACE_FO, XML_BACKGROUND_COLOR, XML_TYPE_COLOR, 0 ),
+ MAP_CONST( PROPERTY_ALIGN, XML_NAMESPACE_STYLE, XML_TEXT_ALIGN, XML_TYPE_TEXT_ALIGN, 0 ),
+ MAP_CONST( PROPERTY_BORDER, XML_NAMESPACE_FO, XML_BORDER, XML_TYPE_CONTROL_BORDER, 0 ),
+ MAP_ASCII( "FontCharWidth", XML_NAMESPACE_STYLE, XML_FONT_CHAR_WIDTH, XML_TYPE_NUMBER16, 0 ),
+ MAP_ASCII( "FontCharset", XML_NAMESPACE_STYLE, XML_FONT_CHARSET, XML_TYPE_TEXT_FONTENCODING, 0 ),
+ MAP_ASCII( "FontFamily", XML_NAMESPACE_STYLE, XML_FONT_FAMILY_GENERIC, XML_TYPE_TEXT_FONTFAMILY, 0 ),
+ MAP_ASCII( "FontHeight", XML_NAMESPACE_FO, XML_FONT_SIZE, XML_TYPE_CHAR_HEIGHT, 0 ),
+ MAP_ASCII( "FontKerning", XML_NAMESPACE_STYLE, XML_LETTER_KERNING, XML_TYPE_BOOL, 0 ),
+ MAP_ASCII( "FontName", XML_NAMESPACE_STYLE, XML_FONT_NAME, XML_TYPE_STRING, 0 ),
+ MAP_ASCII( "FontOrientation", XML_NAMESPACE_STYLE, XML_ROTATION_ANGLE, XML_TYPE_ROTATION_ANGLE, 0 ),
+ MAP_ASCII( "FontPitch", XML_NAMESPACE_STYLE, XML_FONT_PITCH, XML_TYPE_TEXT_FONTPITCH, 0 ),
+ MAP_ASCII( "FontSlant", XML_NAMESPACE_FO, XML_FONT_STYLE, XML_TYPE_TEXT_POSTURE, 0 ),
+ MAP_ASCII( "FontStrikeout", XML_NAMESPACE_STYLE, XML_TEXT_CROSSING_OUT, XML_TYPE_TEXT_CROSSEDOUT, 0 ),
+ MAP_ASCII( "FontStyleName", XML_NAMESPACE_STYLE, XML_FONT_STYLE_NAME, XML_TYPE_STRING, 0 ),
+ MAP_ASCII( "FontUnderline", XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE, XML_TYPE_TEXT_UNDERLINE, 0 ),
+ MAP_ASCII( "FontWeight", XML_NAMESPACE_FO, XML_FONT_WEIGHT, XML_TYPE_TEXT_WEIGHT, 0 ),
+ MAP_ASCII( "FontWidth", XML_NAMESPACE_STYLE, XML_FONT_WIDTH, XML_TYPE_FONT_WIDTH, 0 ),
+ MAP_ASCII( "FontWordLineMode", XML_NAMESPACE_FO, XML_SCORE_SPACES, XML_TYPE_NBOOL, 0 ),
+ MAP_ASCII( "TextColor", XML_NAMESPACE_FO, XML_COLOR, XML_TYPE_COLOR, 0 ),
+ MAP_CONST( PROPERTY_FORMATKEY, XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME, XML_TYPE_STRING, 0 ),
+ MAP_ASCII( "FontEmphasisMark", XML_NAMESPACE_STYLE, XML_TEXT_EMPHASIZE, XML_TYPE_CONTROL_TEXT_EMPHASIZE, 0 ),
+ MAP_ASCII( "FontRelief", XML_NAMESPACE_STYLE, XML_FONT_RELIEF, XML_TYPE_TEXT_FONT_RELIEF|MID_FLAG_MULTI_PROPERTY, 0 ),
+ MAP_ASCII( "TextLineColor", XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, 0 ),
MAP_END()
};
@@ -156,6 +157,9 @@ namespace xmloff
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.13 2002/02/21 15:07:27 hr
+ * #65293#: include <string.h>
+ *
* Revision 1.12 2001/07/13 16:08:24 dvo
* #86004# PropertMap construction improved: strings have lengths
*