[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - desktop/qa sc/source

Andrzej Hunt andrzej at ahunt.org
Mon Nov 16 06:43:43 PST 2015


 desktop/qa/desktop_lib/test_desktop_lib.cxx |    3 +++
 sc/source/ui/unoobj/docuno.cxx              |    5 +++++
 2 files changed, 8 insertions(+)

New commits:
commit bbbe7f57d3af266a4e922b4f007472d5139647ee
Author: Andrzej Hunt <andrzej at ahunt.org>
Date:   Mon Nov 16 15:30:53 2015 +0100

    sc lok: use client zoom for ViewRowColumnHeaders
    
    Change-Id: I85000851f82ea7cdc4b536683adbc8570de9af7e
    (cherry picked from commit 396b5f411f7ecc7d600efdc0bb2381a7d1ed6d88)

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index f7c3196..e289be8 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -409,6 +409,9 @@ void DesktopLOKTest::testRowColumnHeaders()
      * "text" has the header label in UTF-8
      */
     LibLODocument_Impl* pDocument = loadDoc("search.ods");
+
+    pDocument->pClass->initializeForRendering(pDocument);
+
     boost::property_tree::ptree aTree;
     char* pJSON = pDocument->m_pDocumentClass->getCommandValues(pDocument, ".uno:ViewRowColumnHeaders");
     std::stringstream aStream(pJSON);
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 5b0caaa..2fc376c 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -867,9 +867,14 @@ void ScModelObj::setClientZoom(int nTilePixelWidth_, int nTilePixelHeight_, int
 OUString ScModelObj::getRowColumnHeaders(const Rectangle& rRectangle)
 {
     ScViewData* pViewData = ScDocShell::GetViewData();
+
     if (!pViewData)
         return OUString();
 
+    // update the aLogicMode in ScViewData to something predictable
+    pViewData->SetZoom(Fraction(nTilePixelWidth * TWIPS_PER_PIXEL, nTileTwipWidth),
+                       Fraction(nTilePixelHeight * TWIPS_PER_PIXEL, nTileTwipHeight), true);
+
     ScTabView* pTabView = pViewData->GetView();
     if (!pTabView)
         return OUString();


More information about the Libreoffice-commits mailing list