summaryrefslogtreecommitdiff
path: root/vcl/source/app/svapp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/app/svapp.cxx')
-rw-r--r--vcl/source/app/svapp.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 36beccb6bcb5..0fc4a2b00e36 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -29,6 +29,7 @@
#include <tools/debug.hxx>
#include <tools/time.hxx>
#include <tools/stream.hxx>
+#include <tools/json_writer.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/resmgr.hxx>
@@ -1829,6 +1830,28 @@ void numberOfViewsChanged(int count)
rCache.setMaxSize(count * 10);
}
+void dumpState(rtl::OStringBuffer &rState)
+{
+ ImplSVData* pSVData = ImplGetSVData();
+ if (!pSVData)
+ return;
+
+ rState.append("\nWindows:\t");
+ rState.append(static_cast<sal_Int32>(Application::GetTopWindowCount()));
+
+ vcl::Window *pWin = Application::GetFirstTopLevelWindow();
+ while (pWin)
+ {
+ tools::JsonWriter props;
+ pWin->DumpAsPropertyTree(props);
+
+ rState.append("\n\tWindow: ");
+ rState.append(props.extractAsOString());
+
+ pWin = Application::GetNextTopLevelWindow( pWin );
+ }
+}
+
} // namespace lok, namespace vcl
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */