summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/inc/oox/helper/propertymap.hxx2
-rw-r--r--oox/source/helper/propertymap.cxx24
2 files changed, 26 insertions, 0 deletions
diff --git a/oox/inc/oox/helper/propertymap.hxx b/oox/inc/oox/helper/propertymap.hxx
index 0542de6bc11b..eda19e45dfa7 100644
--- a/oox/inc/oox/helper/propertymap.hxx
+++ b/oox/inc/oox/helper/propertymap.hxx
@@ -100,6 +100,8 @@ public:
makePropertySet() const;
#if OSL_DEBUG_LEVEL > 0
+ static void dump( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet);
+ void dump();
static void dumpCode( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet);
void dumpCode();
#endif
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx
index 955d867a3a3e..8923d9ca19fb 100644
--- a/oox/source/helper/propertymap.cxx
+++ b/oox/source/helper/propertymap.cxx
@@ -431,6 +431,30 @@ static void lclDumpAnyValue( Any value)
fprintf (stderr,"??? <unhandled type %s>\n", USS(value.getValueTypeName()));
}
+void PropertyMap::dump( Reference< XPropertySet > rXPropSet )
+{
+ Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo ();
+ Sequence< Property > props = info->getProperties ();
+
+ OSL_TRACE("dump props, len: %d", props.getLength ());
+
+ for (int i=0; i < props.getLength (); i++) {
+ OString name = OUStringToOString( props [i].Name, RTL_TEXTENCODING_UTF8);
+ fprintf (stderr,"%30s = ", name.getStr() );
+
+ try {
+ lclDumpAnyValue (rXPropSet->getPropertyValue( props [i].Name ));
+ } catch (const Exception&) {
+ fprintf (stderr,"unable to get '%s' value\n", USS(props [i].Name));
+ }
+ }
+}
+
+void PropertyMap::dump()
+{
+ dump( Reference< XPropertySet >( makePropertySet(), UNO_QUERY ) );
+}
+
static void printLevel (int level)
{
for (int i=0; i<level; i++)