|
|
f325b2 |
From 381c84511f6adf660189af85ff615e841e00977a Mon Sep 17 00:00:00 2001
|
|
|
f325b2 |
From: Andrzej Hunt <andrzej@ahunt.org>
|
|
|
f325b2 |
Date: Mon, 16 Nov 2015 15:30:53 +0100
|
|
|
f325b2 |
Subject: [PATCH 336/398] sc lok: use client zoom for ViewRowColumnHeaders
|
|
|
f325b2 |
|
|
|
f325b2 |
Change-Id: I85000851f82ea7cdc4b536683adbc8570de9af7e
|
|
|
f325b2 |
(cherry picked from commit 396b5f411f7ecc7d600efdc0bb2381a7d1ed6d88)
|
|
|
f325b2 |
---
|
|
|
f325b2 |
desktop/qa/desktop_lib/test_desktop_lib.cxx | 3 +++
|
|
|
f325b2 |
sc/source/ui/unoobj/docuno.cxx | 5 +++++
|
|
|
f325b2 |
2 files changed, 8 insertions(+)
|
|
|
f325b2 |
|
|
|
f325b2 |
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
|
|
|
f325b2 |
index 930dd21ec081..1edf8d722d2f 100644
|
|
|
f325b2 |
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
|
|
|
f325b2 |
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
|
|
|
f325b2 |
@@ -405,6 +405,9 @@ void DesktopLOKTest::testRowColumnHeaders()
|
|
|
f325b2 |
* "text" has the header label in UTF-8
|
|
|
f325b2 |
*/
|
|
|
f325b2 |
LibLODocument_Impl* pDocument = loadDoc("search.ods");
|
|
|
f325b2 |
+
|
|
|
f325b2 |
+ pDocument->pClass->initializeForRendering(pDocument);
|
|
|
f325b2 |
+
|
|
|
f325b2 |
boost::property_tree::ptree aTree;
|
|
|
f325b2 |
char* pJSON = pDocument->m_pDocumentClass->getCommandValues(pDocument, ".uno:ViewRowColumnHeaders");
|
|
|
f325b2 |
std::stringstream aStream(pJSON);
|
|
|
f325b2 |
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
|
|
|
f325b2 |
index c5a96e1e8255..c0f504d770c6 100644
|
|
|
f325b2 |
--- a/sc/source/ui/unoobj/docuno.cxx
|
|
|
f325b2 |
+++ b/sc/source/ui/unoobj/docuno.cxx
|
|
|
f325b2 |
@@ -885,9 +885,14 @@ void ScModelObj::setClientZoom(int nTilePixelWidth_, int nTilePixelHeight_, int
|
|
|
f325b2 |
OUString ScModelObj::getRowColumnHeaders(const Rectangle& rRectangle)
|
|
|
f325b2 |
{
|
|
|
f325b2 |
ScViewData* pViewData = ScDocShell::GetViewData();
|
|
|
f325b2 |
+
|
|
|
f325b2 |
if (!pViewData)
|
|
|
f325b2 |
return OUString();
|
|
|
f325b2 |
|
|
|
f325b2 |
+ // update the aLogicMode in ScViewData to something predictable
|
|
|
f325b2 |
+ pViewData->SetZoom(Fraction(nTilePixelWidth * TWIPS_PER_PIXEL, nTileTwipWidth),
|
|
|
f325b2 |
+ Fraction(nTilePixelHeight * TWIPS_PER_PIXEL, nTileTwipHeight), true);
|
|
|
f325b2 |
+
|
|
|
f325b2 |
ScTabView* pTabView = pViewData->GetView();
|
|
|
f325b2 |
if (!pTabView)
|
|
|
f325b2 |
return OUString();
|
|
|
f325b2 |
--
|
|
|
f325b2 |
2.12.0
|
|
|
f325b2 |
|