add dumpAsXmlEditDoc

to dump the current editing document to editdoc.xml on F12

Change-Id: I1b9cc2edb6429aa0bf651bdd52cac70dfd4db9d0
This commit is contained in:
Noel Grandin
2016-10-19 15:44:39 +02:00
parent c2b48a763d
commit d76027bb78
3 changed files with 9 additions and 0 deletions

View File

@@ -862,6 +862,11 @@ const EditDoc& EditEngine::GetEditDoc() const
return pImpEditEngine->GetEditDoc();
}
void EditEngine::dumpAsXmlEditDoc(struct _xmlTextWriter* pWriter) const
{
pImpEditEngine->GetEditDoc().dumpAsXml(pWriter);
}
ParaPortionList& EditEngine::GetParaPortions()
{
return pImpEditEngine->GetParaPortions();

View File

@@ -533,6 +533,7 @@ public:
EditDoc& GetEditDoc();
const EditDoc& GetEditDoc() const;
void dumpAsXmlEditDoc(struct _xmlTextWriter* pWriter) const;
ParaPortionList& GetParaPortions();
const ParaPortionList& GetParaPortions() const;

View File

@@ -26,6 +26,7 @@
#include <editeng/outliner.hxx>
#include <editeng/editview.hxx>
#include <editeng/editeng.hxx>
#include "app.hrc"
#include "helpids.h"
@@ -224,6 +225,8 @@ void Window::KeyInput(const KeyEvent& rKEvt)
if (getenv("SD_DEBUG") && rKEvt.GetKeyCode().GetCode() == KEY_F12 && mpViewShell)
{
mpViewShell->GetDoc()->dumpAsXml(nullptr);
OutlinerView *pOLV = mpViewShell->GetView()->GetTextEditOutlinerView();
pOLV->GetEditView().GetEditEngine()->dumpAsXmlEditDoc(nullptr);
return;
}