summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-05-21 15:57:52 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-05-21 17:12:57 +0200
commitb45c1cd7e7108a1101c556aae48ababc8832d2a9 (patch)
treec9b94e9d42462ba017e0707c9c43368ea72a14a5 /sc
parentfb8377fe404564871d7be8cf777abe2108c74951 (diff)
introduce some dbgutil calc data dumps
Currently CTRL+SHIFT+F12 will dump the column width in pixel of the first 20 columns. Change-Id: I7184eae8d1cde9be7ea067aab6b4b5fb1b6b8b0f
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/gridwin.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 5f2a06a1db62..2228a66a18b4 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3507,6 +3507,22 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
}
+#ifdef DBG_UTIL
+
+ if (rKeyCode.IsMod1() && rKeyCode.IsShift() && rKeyCode.GetCode() == KEY_F12)
+ {
+ ScDocument* pDoc = pViewData->GetDocument();
+ for (SCCOL nCol = 0; nCol <= 20; ++nCol)
+ {
+ SCTAB nTab = pViewData->GetTabNo();
+ sal_uInt16 nWidth = pDoc->GetColWidth(nCol, nTab, true);
+ long nPixel = LogicToPixel(Point(nWidth, 0), MapMode(MAP_TWIP)).getX();
+ std::cout << "Column: " << nCol << ", Width: " << nPixel << "px" << std::endl;
+ }
+ }
+
+#endif
+
Window::KeyInput(rKEvt);
}