From b45c1cd7e7108a1101c556aae48ababc8832d2a9 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Thu, 21 May 2015 15:57:52 +0200 Subject: 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 --- sc/source/ui/view/gridwin.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'sc') 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); } -- cgit