[Libreoffice-commits] core.git: sc/source

Markus Mohrhard markus.mohrhard at googlemail.com
Thu May 21 08:13:39 PDT 2015


 sc/source/ui/view/gridwin.cxx |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

New commits:
commit b45c1cd7e7108a1101c556aae48ababc8832d2a9
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu May 21 15:57:52 2015 +0200

    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

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 5f2a06a..2228a66 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);
 }
 


More information about the Libreoffice-commits mailing list