[ooo-build-commit] .: patches/dev300
Radek DoulÃk
rodo at kemper.freedesktop.org
Tue Apr 13 07:32:30 PDT 2010
patches/dev300/apply | 4
patches/dev300/oox-import-helper-property-map-dump.diff | 99 +++++++++++++++
patches/dev300/oox-pptx-import-fix-text-body-vert-2.diff | 26 +++
3 files changed, 129 insertions(+)
New commits:
commit b116c246ef33df287b5c6bdb74f775e9c1b8cfcc
Author: Radek Doulik <rodo at novell.com>
Date: Tue Apr 13 16:31:31 2010 +0200
fixed regression of n#479829 and added debug dump
* patches/dev300/apply:
* patches/dev300/oox-import-helper-property-map-dump.diff:
* patches/dev300/oox-pptx-import-fix-text-body-vert-2.diff:
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 20eb68b..1cf90eb 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3943,3 +3943,7 @@ captionnumbering-hu.diff, i#110273, timar
SectionOwner => timar
magyarlinuxlibertine-fonts.diff
+
+[ OOXML ]
+oox-import-helper-property-map-dump.diff, rodo
+oox-pptx-import-fix-text-body-vert-2.diff, n#479829, rodo
diff --git a/patches/dev300/oox-import-helper-property-map-dump.diff b/patches/dev300/oox-import-helper-property-map-dump.diff
new file mode 100644
index 0000000..61f4716
--- /dev/null
+++ b/patches/dev300/oox-import-helper-property-map-dump.diff
@@ -0,0 +1,99 @@
+diff -rup ../ooo320-m12-M/oox/inc/oox/helper/propertymap.hxx oox/inc/oox/helper/propertymap.hxx
+--- ../ooo320-m12-M/oox/inc/oox/helper/propertymap.hxx 2009-12-18 13:40:28.000000000 +0100
++++ oox/inc/oox/helper/propertymap.hxx 2010-04-07 18:08:38.000000000 +0200
+@@ -92,6 +92,10 @@ public:
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
+ makePropertySet() const;
+
++#if OSL_DEBUG_LEVEL > 0
++ void dump();
++#endif
++
+ private:
+ const PropertyList* mpPropNames;
+ };
+diff -rup ../ooo320-m12-M/oox/source/helper/propertymap.cxx oox/source/helper/propertymap.cxx
+--- ../ooo320-m12-M/oox/source/helper/propertymap.cxx 2009-12-18 13:40:28.000000000 +0100
++++ oox/source/helper/propertymap.cxx 2010-04-07 18:41:02.000000000 +0200
+@@ -53,6 +53,19 @@ using ::com::sun::star::beans::XProperty
+ using ::com::sun::star::beans::XPropertySetInfo;
+ using ::com::sun::star::beans::XVetoableChangeListener;
+
++#if OSL_DEBUG_LEVEL > 0
++#include <cstdio>
++#include <com/sun/star/style/LineSpacing.hpp>
++#include <com/sun/star/style/LineSpacingMode.hpp>
++#include <com/sun/star/text/WritingMode.hpp>
++#define USS(x) OUStringToOString( x, RTL_TEXTENCODING_UTF8 ).getStr()
++using namespace ::com::sun::star;
++using namespace ::com::sun::star::uno;
++using ::rtl::OString;
++using ::com::sun::star::style::LineSpacing;
++using ::com::sun::star::text::WritingMode;
++#endif
++
+ namespace oox {
+
+ // ============================================================================
+@@ -231,6 +244,61 @@ Reference< XPropertySet > PropertyMap::m
+ return new GenericPropertySet( *this );
+ }
+
++#if OSL_DEBUG_LEVEL > 0
++void PropertyMap::dump()
++{
++ Reference< XPropertySet > rXPropSet( makePropertySet(), UNO_QUERY );
++
++ Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo ();
++ Sequence< beans::Property > props = info->getProperties ();
++
++ for (int i=0; i < props.getLength (); i++) {
++ OString name = OUStringToOString( props [i].Name, RTL_TEXTENCODING_UTF8);
++ fprintf (stderr,"%30s = ", name.getStr() );
++
++ try {
++ Any value = rXPropSet->getPropertyValue( props [i].Name );
++
++ OUString strValue;
++ sal_Int32 intValue;
++ sal_uInt32 uintValue;
++ sal_Int16 int16Value;
++ sal_uInt16 uint16Value;
++ bool boolValue;
++ LineSpacing spacing;
++// RectanglePoint pointValue;
++ WritingMode aWritingMode;
++
++ if( value >>= strValue )
++ fprintf (stderr,"\"%s\"\n", USS( strValue ) );
++ else if( value >>= intValue )
++ fprintf (stderr,"%d (hex: %x)\n", intValue, intValue);
++ else if( value >>= uintValue )
++ fprintf (stderr,"%d (hex: %x)\n", uintValue, uintValue);
++ else if( value >>= int16Value )
++ fprintf (stderr,"%d (hex: %x)\n", int16Value, int16Value);
++ else if( value >>= uint16Value )
++ fprintf (stderr,"%d (hex: %x)\n", uint16Value, uint16Value);
++ else if( value >>= boolValue )
++ fprintf (stderr,"%d (bool)\n", boolValue);
++ else if( value >>= aWritingMode )
++ fprintf (stderr, "%d writing mode\n", aWritingMode);
++ else if( value >>= spacing ) {
++ fprintf (stderr, "mode: %d value: %d\n", spacing.Mode, spacing.Height);
++ } else if( value.isExtractableTo(::getCppuType((const sal_Int32*)0))) {
++ fprintf (stderr,"is extractable to int32\n");
++ }
++// else if( value >>= pointValue )
++// fprintf (stderr,"%d (RectanglePoint)\n", pointValue);
++ else
++ fprintf (stderr,"??? <unhandled type %s>\n", USS(value.getValueTypeName()));
++ } catch(Exception e) {
++ fprintf (stderr,"unable to get '%s' value\n", USS(props [i].Name));
++ }
++ }
++}
++#endif
++
+ // ============================================================================
+
+ } // namespace oox
diff --git a/patches/dev300/oox-pptx-import-fix-text-body-vert-2.diff b/patches/dev300/oox-pptx-import-fix-text-body-vert-2.diff
new file mode 100644
index 0000000..cd620d9
--- /dev/null
+++ b/patches/dev300/oox-pptx-import-fix-text-body-vert-2.diff
@@ -0,0 +1,26 @@
+diff -rup oox/source/drawingml-orig/textbodypropertiescontext.cxx oox/source/drawingml/textbodypropertiescontext.cxx
+--- oox/source/drawingml-orig/textbodypropertiescontext.cxx 2010-04-07 15:05:26.000000000 +0200
++++ oox/source/drawingml/textbodypropertiescontext.cxx 2010-04-07 22:37:49.000000000 +0200
+@@ -121,13 +121,15 @@ TextBodyPropertiesContext::TextBodyPrope
+ bool bRtl = aAttribs.getBool( XML_rtl, false );
+ sal_Int32 tVert = mrTextBodyProp.moVert.get( XML_horz );
+ if( tVert == XML_vert || tVert == XML_eaVert || tVert == XML_vert270 || tVert == XML_mongolianVert ) {
+- mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ]
+- <<= ( bRtl ? WritingMode_RL_TB : WritingMode_LR_TB );
+- // workaround for TB_LR as using WritingMode2 doesn't work
+- if( !bAnchorCenter )
+- mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<=
+- TextHorizontalAdjust_LEFT;
+- }
++ mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ]
++ <<= WritingMode_TB_RL;
++ // workaround for TB_LR as using WritingMode2 doesn't work
++ if( !bAnchorCenter )
++ mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<=
++ TextHorizontalAdjust_LEFT;
++ } else
++ mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ]
++ <<= ( bRtl ? WritingMode_RL_TB : WritingMode_LR_TB );
+ }
+
+ // --------------------------------------------------------------------
More information about the ooo-build-commit
mailing list