summaryrefslogtreecommitdiffstats
path: root/oox
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
parentunusedcode: remove something from oox (diff)
downloadcore-29b1914fad754ed94e61179f09aac50f1657f2e0.tar.gz
core-29b1914fad754ed94e61179f09aac50f1657f2e0.zip
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')
-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++)