[Libreoffice-commits] .: oox/inc oox/source
Muthu Subramanian
sumuthu at kemper.freedesktop.org
Wed May 16 06:28:42 PDT 2012
oox/inc/oox/drawingml/textliststyle.hxx | 4 +++
oox/inc/oox/drawingml/textparagraphproperties.hxx | 4 +++
oox/inc/oox/helper/propertyset.hxx | 4 +++
oox/source/drawingml/textliststyle.cxx | 10 ++++++++
oox/source/drawingml/textparagraphproperties.cxx | 27 +++++++++++++++++++++-
oox/source/helper/propertyset.cxx | 7 +++++
6 files changed, 55 insertions(+), 1 deletion(-)
New commits:
commit d83463931ef511ba1b43984072626345cf765b8a
Author: Muthu Subramanian <sumuthu at suse.com>
Date: Wed May 16 19:19:29 2012 +0530
Revert selected hunks from various 'unused code' commits.
These functions are required for debugging pptx import problems.
diff --git a/oox/inc/oox/drawingml/textliststyle.hxx b/oox/inc/oox/drawingml/textliststyle.hxx
index 29d8f29..9be1c58 100644
--- a/oox/inc/oox/drawingml/textliststyle.hxx
+++ b/oox/inc/oox/drawingml/textliststyle.hxx
@@ -51,6 +51,10 @@ public:
inline const TextParagraphPropertiesVector& getAggregationListStyle() const { return maAggregationListStyle; };
inline TextParagraphPropertiesVector& getAggregationListStyle() { return maAggregationListStyle; };
+#ifdef DBG_UTIL
+ void dump() const;
+#endif
+
protected:
TextParagraphPropertiesVector maListStyle;
diff --git a/oox/inc/oox/drawingml/textparagraphproperties.hxx b/oox/inc/oox/drawingml/textparagraphproperties.hxx
index e037ff2..9e9fe88 100644
--- a/oox/inc/oox/drawingml/textparagraphproperties.hxx
+++ b/oox/inc/oox/drawingml/textparagraphproperties.hxx
@@ -114,6 +114,10 @@ public:
size can be zero and the default value is returned. */
float getCharHeightPoints( float fDefault ) const;
+#ifdef DBG_UTIL
+ void dump() const;
+#endif
+
protected:
TextCharacterProperties maTextCharacterProperties;
diff --git a/oox/inc/oox/helper/propertyset.hxx b/oox/inc/oox/helper/propertyset.hxx
index 5e9b312..56fbe9b 100644
--- a/oox/inc/oox/helper/propertyset.hxx
+++ b/oox/inc/oox/helper/propertyset.hxx
@@ -124,6 +124,10 @@ public:
@param rPropertyMap The property map. */
void setProperties( const PropertyMap& rPropertyMap );
+#ifdef DBG_UTIL
+ void dump();
+#endif
+
// ------------------------------------------------------------------------
private:
/** Gets the specified property from the property set.
diff --git a/oox/source/drawingml/textliststyle.cxx b/oox/source/drawingml/textliststyle.cxx
index 520c5d6..c85a3fd 100644
--- a/oox/source/drawingml/textliststyle.cxx
+++ b/oox/source/drawingml/textliststyle.cxx
@@ -66,6 +66,16 @@ void TextListStyle::apply( const TextListStyle& rTextListStyle )
applyStyleList( rTextListStyle.getListStyle(), getListStyle() );
}
+#ifdef DBG_UTIL
+void TextListStyle::dump() const
+{
+ for ( int i = 0; i < 9; i++ )
+ {
+ OSL_TRACE("text list style level: %d", i);
+ maListStyle[i]->dump();
+ }
+}
+#endif
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx
index 1aa67ec..741815b 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -468,7 +468,32 @@ float TextParagraphProperties::getCharHeightPoints( float fDefault ) const
return maTextCharacterProperties.getCharHeightPoints( fDefault );
}
-
+#ifdef DBG_UTIL
+// Note: Please don't remove this function. This is required for
+// debugging pptx import problems.
+void TextParagraphProperties::dump() const
+{
+ Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory();
+ Reference< ::com::sun::star::drawing::XShape > xShape( oox::ppt::PowerPointImport::mpDebugFilterBase->getModelFactory()->createInstance( CREATE_OUSTRING( "com.sun.star.presentation.TitleTextShape" ) ), UNO_QUERY );
+ Reference< ::com::sun::star::text::XText > xText( xShape, UNO_QUERY );
+
+ Reference< com::sun::star::drawing::XDrawPage > xDebugPage(ppt::SlidePersist::mxDebugPage.get(), UNO_QUERY);
+ if (xDebugPage.is())
+ xDebugPage->add( xShape );
+
+ PropertyMap emptyMap;
+
+ const OUString sText = CREATE_OUSTRING("debug");
+ xText->setString( sText );
+ Reference< ::com::sun::star::text::XTextCursor > xStart( xText->createTextCursor(), UNO_QUERY );
+ Reference< ::com::sun::star::text::XTextRange > xRange( xStart, UNO_QUERY );
+ xStart->gotoEnd( sal_True );
+ Reference< XPropertySet > xPropSet( xRange, UNO_QUERY );
+ pushToPropSet( NULL, xPropSet, emptyMap, NULL, false, 0 );
+ PropertySet pSet( xPropSet );
+ pSet.dump();
+}
+#endif
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/propertyset.cxx b/oox/source/helper/propertyset.cxx
index 4b143db..c33b0a3 100644
--- a/oox/source/helper/propertyset.cxx
+++ b/oox/source/helper/propertyset.cxx
@@ -154,6 +154,13 @@ bool PropertySet::implSetPropertyValue( const OUString& rPropName, const Any& rV
return false;
}
+#ifdef DBG_UTIL
+void PropertySet::dump()
+{
+ PropertyMap::dump( Reference< XPropertySet >( getXPropertySet(), UNO_QUERY ) );
+}
+#endif
+
} // namespace oox
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list