Kaydet (Commit) 4cee8ccc authored tarafından Marco Cecchetti's avatar Marco Cecchetti Kaydeden (comit) Jan Holesovsky

lok: calc: fix needed when position caching is disabled

In case it would be needed to disable position caching we can't
retrieve the nTotalPixels value from the LOKHeight/WidthHelper.

The new code works in both cases.

Change-Id: I65562dd4458eee40c5db958067fc91af6b3eb79e
Reviewed-on: https://gerrit.libreoffice.org/63039
Tested-by: Jenkins
Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst b0fb5acd
dictionaries @ 6c85a19c
Subproject commit 86921a78c42f4fd499d86a226e34ab97e8b85ed5
Subproject commit 6c85a19c887b6147ec7d3a600b51cb2a44284fa2
......@@ -2479,8 +2479,10 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
SCTAB nTab = aViewData.GetTabNo();
SCROW nStartRow = -1;
SCROW nEndRow = -1;
long nStartHeightPx = 0;
SCCOL nStartCol = -1;
SCCOL nEndCol = -1;
long nStartWidthPx = 0;
tools::Rectangle aOldVisArea(
mnLOKStartHeaderCol + 1, mnLOKStartHeaderRow + 1,
......@@ -2493,7 +2495,6 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
if (rRectangle.Top() < rRectangle.Bottom())
{
SAL_INFO("sc.lok.header", "Row Header: compute start/end rows.");
long nStartHeightPx = 0;
long nEndHeightPx = 0;
long nRectTopPx = rRectangle.Top() / TWIPS_PER_PIXEL;
long nRectBottomPx = rRectangle.Bottom() / TWIPS_PER_PIXEL;
......@@ -2582,7 +2583,7 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
aBuffer.append("\"rows\": [\n");
long nTotalPixels = aViewData.GetLOKHeightHelper().getPosition(nStartRow);
long nTotalPixels = nStartHeightPx;
SAL_INFO("sc.lok.header", "Row Header: [create string data for rows]: start row: "
<< nStartRow << " start height: " << nTotalPixels);
......@@ -2637,7 +2638,6 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
if (rRectangle.Left() < rRectangle.Right())
{
SAL_INFO("sc.lok.header", "Column Header: compute start/end columns.");
long nStartWidthPx = 0;
long nEndWidthPx = 0;
long nRectLeftPx = rRectangle.Left() / TWIPS_PER_PIXEL;
long nRectRightPx = rRectangle.Right() / TWIPS_PER_PIXEL;
......@@ -2723,7 +2723,7 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
aBuffer.append("\"columns\": [\n");
nTotalPixels = aViewData.GetLOKWidthHelper().getPosition(nStartCol);
nTotalPixels = nStartWidthPx;
SAL_INFO("sc.lok.header", "Col Header: [create string data for cols]: start col: "
<< nStartRow << " start width: " << nTotalPixels);
......
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