oox/inc/oox/helper/propertymap.hxx |    2 ++
 oox/source/helper/propertymap.cxx  |   24 ++++++++++++++++++++++++
 2 files changed, 26 insertions(+)

New commits:
commit 29b1914fad754ed94e61179f09aac50f1657f2e0
Author: Eike Rathke <[email protected]>
Date:   Fri Feb 24 01:03:55 2012 +0100

    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 ...

diff --git a/oox/inc/oox/helper/propertymap.hxx 
b/oox/inc/oox/helper/propertymap.hxx
index 0542de6..eda19e4 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 955d867..8923d9c 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++)
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to