summaryrefslogtreecommitdiff
path: root/oox/source/helper
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2011-10-05 17:29:58 +0200
committerRadek Doulik <rodo@novell.com>2011-10-05 17:42:03 +0200
commite36f591dfeb89fded172f4770157bc6cb6dc7454 (patch)
treebc7af62f6a9f81a6d3cda0c0d927f067a12930e1 /oox/source/helper
parentc9f9b6723b40279716b1e34c1441a33e60cceb58 (diff)
custom shapes import improvements
- added new presets generated from definition included in ISO standard - added missing variables (cd3, hd10, ...) - added ifelse shortcut ?: - removed GetAdjAngle because it would make problems with constant vs. equation defined angles, move conversion to the functions using them - implemented arcTo path segment (command) - removed GetTextShapeType as we don't use vml's presets for drawingml anymore - use token number for preset type instead of string, as we don't convert to old vml's preset types anymore - enhanced custom shape properties dump code
Diffstat (limited to 'oox/source/helper')
-rw-r--r--oox/source/helper/propertymap.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx
index 2ac3b3fdfc4b..ae2e495b90f0 100644
--- a/oox/source/helper/propertymap.cxx
+++ b/oox/source/helper/propertymap.cxx
@@ -496,7 +496,7 @@ static const char* lclDumpAnyValueCode( Any value, int level = 0)
if( value >>= strValue ) {
printLevel (level);
fprintf (stderr,"OUString str = CREATE_OUSTRING (\"%s\");\n", USS( strValue ) );
- return "str";
+ return "Any (str)";
} else if( value >>= strArray ) {
printLevel (level);
fprintf (stderr,"Sequence< OUString > aStringSequence (%"SAL_PRIdINT32");\n", strArray.getLength());
@@ -781,22 +781,25 @@ void PropertyMap::dumpCode( Reference< XPropertySet > rXPropSet )
Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo ();
Sequence< Property > props = info->getProperties ();
const OUString sType = CREATE_OUSTRING( "Type" );
-
- OSL_TRACE("dump props, len: %d", props.getLength ());
+ const OUString sViewBox = CREATE_OUSTRING( "ViewBox" );
for (int i=0; i < props.getLength (); i++) {
// ignore Type, it is set elsewhere
- if (props[i].Name.equals (sType))
+ if (props[i].Name.equals (sType) || props[i].Name.equals (sViewBox))
continue;
OString name = OUStringToOString( props [i].Name, RTL_TEXTENCODING_UTF8);
int level = 1;
try {
- const char* var = lclDumpAnyValueCode (rXPropSet->getPropertyValue (props [i].Name), level);
printLevel (level);
- fprintf (stderr,"aPropertyMap [PROP_%s] <<= %s;\n\n", name.getStr(), var);
+ fprintf (stderr, "{\n");
+ const char* var = lclDumpAnyValueCode (rXPropSet->getPropertyValue (props [i].Name), level + 1);
+ printLevel (level + 1);
+ fprintf (stderr,"aPropertyMap [PROP_%s] <<= %s;\n", name.getStr(), var);
+ printLevel (level);
+ fprintf (stderr, "}\n");
} catch (const Exception& e) {
fprintf (stderr,"unable to get '%s' value\n", USS(props [i].Name));
}