summaryrefslogtreecommitdiff
path: root/oox/source/helper
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-02-24 01:03:55 +0100
committerEike Rathke <erack@redhat.com>2012-02-24 01:03:55 +0100
commit29b1914fad754ed94e61179f09aac50f1657f2e0 (patch)
tree6ecc72f5dcf9fe1be73de4ca27ba8fd265cb7d0f /oox/source/helper
parent660cb78cd6900ffebe215ad4b3913bbe35ac9883 (diff)
reintroduced dump methods that are needed if OSL_DEBUG_LEVEL > 0
* Partly reverted commit 660cb78cd6900ffebe215ad4b3913bbe35ac9883 to preserve the oox::PropertyMap::dump() methods that are needed by oox::PropertySet::dump() when building dbgutil. * Did not remove the oox::PropertySet::dump() as well because all is part of the oox dumper, I guess we don't want to remove that in it's entirety ...
Diffstat (limited to 'oox/source/helper')
-rw-r--r--oox/source/helper/propertymap.cxx24
1 files changed, 24 insertions, 0 deletions
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++)