[Libreoffice-commits] core.git: desktop/qa sc/source
Andrzej Hunt
andrzej at ahunt.org
Mon Nov 16 06:43:12 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 396b5f411f7ecc7d600efdc0bb2381a7d1ed6d88
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
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 5ca573d..3b7e274 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -405,6 +405,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 01ca52d..4729cea 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -884,9 +884,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