Kaydet (Commit) 984f0d60 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

move the cell property dump code into dbgutil builds

We now allow with a CTRL+SHIFT+F9 to dump the cell properties as a xml
file.

Change-Id: I730e7009bbe95d3105541a9afbd2c8a19c992600
üst 98f3b0e0
......@@ -9,3 +9,8 @@ Dumps the column width of the first 20 columns.
=== CTRL+SHIFT+F11 ===
Dumps the graphic objects and their position and size in pixel.
=== CTRL+SHIFT+F9 ===
Dumps the SfxItemSet representing the cell properties of the
current cell as a xml file.
......@@ -439,8 +439,9 @@ protected:
void ImpDestroyOverlayObjects();
private:
//void dumpCellProperties(); <-- Uncomment this once you put it in DBG_UTIL
#ifdef DBG_UTIL
void dumpCellProperties();
void dumpColumnInformationPixel();
void dumpColumnInformationHmm();
void dumpGraphicInformation();
......
......@@ -142,9 +142,6 @@
#include <memory>
#include <vector>
/*remove this include below as soon as you move the dumpCellProperties() out of here*/
#include <svl/poolitem.hxx>
#include <libxml/xmlwriter.h>
using namespace css;
using namespace css::uno;
......@@ -3500,32 +3497,6 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
}
}
//void dumpCellProperties() <-- Just the function call should remain
//{ This function is already present in gridwin_dbgutils.cxx
ScDocument* pDoc= pViewData->GetDocument();
SCTAB nTab =pViewData->GetTabNo();
SCCOL nCol=pViewData->GetCurY();
SCROW nRow=pViewData->GetCurY();
const ScPatternAttr* pPatternAttr = pDoc->GetPattern(nCol,nRow,nTab);
OStringBuffer aBuffer("dump.xml");
xmlTextWriterPtr writer;
/*Function below first converts the Buffer passed into string
*and then this string becomes the name for the file. This
*method is used instead of directly passing a string for the
*convinience of anyone working on this code in future.
*/
writer = xmlNewTextWriterFilename( aBuffer.makeStringAndClear().getStr(), 0 );
xmlTextWriterStartDocument( writer, NULL, NULL, NULL );
pPatternAttr->GetItemSet().dumpAsXml(writer);
xmlTextWriterEndDocument( writer );
xmlFreeTextWriter (writer);
//}
#ifdef DBG_UTIL
if (rKeyCode.IsMod1() && rKeyCode.IsShift())
......@@ -3542,6 +3513,10 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
{
dumpColumnInformationHmm();
}
else if (rKeyCode.GetCode() == KEY_F9)
{
dumpCellProperties();
}
}
#endif
......
......@@ -63,20 +63,17 @@ void ScGridWindow::dumpColumnInformationHmm()
}
}
/*void dumpCellProperties() <--Uncomment this Once you move it into DBG_UTIL
{
ScDocument* pDoc= pViewData->GetDocument();
void ScGridWindow::dumpCellProperties()
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab =pViewData->GetTabNo();
SCCOL nCol=pViewData->GetCurY();
SCROW nRow=pViewData->GetCurY();
SCTAB nTab = pViewData->GetTabNo();
SCCOL nCol = pViewData->GetCurY();
SCROW nRow = pViewData->GetCurY();
const ScPatternAttr* pPatternAttr = pDoc->GetPattern(nCol,nRow,nTab);
OStringBuffer aBuffer("dump.xml");
xmlTextWriterPtr writer;
writer = xmlNewTextWriterFilename( aBuffer.makeStringAndClear().getStr(), 0 );
OString aOutputFile("dump.xml");
xmlTextWriterPtr writer = xmlNewTextWriterFilename( aOutputFile.getStr(), 0 );
xmlTextWriterStartDocument( writer, NULL, NULL, NULL );
......@@ -84,7 +81,7 @@ void ScGridWindow::dumpColumnInformationHmm()
xmlTextWriterEndDocument( writer );
xmlFreeTextWriter (writer);
}*/
}
void ScGridWindow::dumpGraphicInformation()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment