Kaydet (Commit) 396b5f41 authored tarafından Andrzej Hunt's avatar Andrzej Hunt

sc lok: use client zoom for ViewRowColumnHeaders

Change-Id: I85000851f82ea7cdc4b536683adbc8570de9af7e
üst f630b6d5
......@@ -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);
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment