summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@suse.com>2012-05-16 19:19:29 +0530
committerMuthu Subramanian <sumuthu@suse.com>2012-05-16 19:20:45 +0530
commitd83463931ef511ba1b43984072626345cf765b8a (patch)
treeebeeab05cd4f0da4e05834fce21cb97d559c9c9f /oox
parent30590f00e44cbe7b2a5253f544302ee5b0c3c08d (diff)
Revert selected hunks from various 'unused code' commits.
These functions are required for debugging pptx import problems.
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/oox/drawingml/textliststyle.hxx4
-rw-r--r--oox/inc/oox/drawingml/textparagraphproperties.hxx4
-rw-r--r--oox/inc/oox/helper/propertyset.hxx4
-rw-r--r--oox/source/drawingml/textliststyle.cxx10
-rw-r--r--oox/source/drawingml/textparagraphproperties.cxx27
-rw-r--r--oox/source/helper/propertyset.cxx7
6 files changed, 55 insertions, 1 deletions
diff --git a/oox/inc/oox/drawingml/textliststyle.hxx b/oox/inc/oox/drawingml/textliststyle.hxx
index 29d8f29a48ce..9be1c589c7a1 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 e037ff2c3726..9e9fe88ef7c4 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 5e9b31218c3f..56fbe9b9596d 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 520c5d6b73d1..c85a3fd361d0 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 1aa67ec17e0d..741815bfbd69 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 4b143db9a757..c33b0a38689b 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: */