summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2019-12-03 10:55:35 +0000
committerMichael Meeks <michael.meeks@collabora.com>2019-12-04 12:38:10 +0100
commit0b245e26dab8f40693fdb7e8e08e662bdba7590e (patch)
tree90b5e47dd9e7729ed21bb33c973170f355714f20 /desktop
parentfae63aea208990590d98990e332f88b24c2958e7 (diff)
lok: cleanup getCellCursor
Switching the zoom is no longer necessary - we now have a known and fixed zoom per view now (as the core has), that saves some complexity. Change-Id: I14c952ca1e06fae016faa8b6ee07115c56312ed6 Reviewed-on: https://gerrit.libreoffice.org/84372 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx2
-rw-r--r--desktop/source/lib/init.cxx40
2 files changed, 3 insertions, 39 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 1effbc2669b8..232d8cb3073a 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -815,7 +815,7 @@ void DesktopLOKTest::testCellCursor()
OString aRectangle(aTree.get<std::string>("commandValues").c_str());
// cell cursor geometry + col + row
- CPPUNIT_ASSERT_EQUAL(OString("0, 0, 1279, 255, 0, 0"), aRectangle);
+ CPPUNIT_ASSERT_EQUAL(OString("0, 0, 1274, 254, 0, 0"), aRectangle);
}
void DesktopLOKTest::testCommandResult()
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index e5f9d6893bf2..679c4f95b471 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -4524,44 +4524,8 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
SetLastExceptionMsg("Document doesn't support tiled rendering");
return nullptr;
}
-
- // Command has parameters.
- int nOutputWidth = 0;
- int nOutputHeight = 0;
- long nTileWidth = 0;
- long nTileHeight = 0;
- if (aCommand.getLength() > aCellCursor.getLength())
- {
- OString aArguments = aCommand.copy(aCellCursor.getLength() + 1);
- sal_Int32 nParamIndex = 0;
- do
- {
- OString aParamToken = aArguments.getToken(0, '&', nParamIndex);
- sal_Int32 nIndex = 0;
- OString aKey;
- OString aValue;
- do
- {
- OString aToken = aParamToken.getToken(0, '=', nIndex);
- if (!aKey.getLength())
- aKey = aToken;
- else
- aValue = aToken;
- }
- while (nIndex >= 0);
- if (aKey == "outputWidth")
- nOutputWidth = aValue.toInt32();
- else if (aKey == "outputHeight")
- nOutputHeight = aValue.toInt32();
- else if (aKey == "tileWidth")
- nTileWidth = aValue.toInt64();
- else if (aKey == "tileHeight")
- nTileHeight = aValue.toInt64();
- }
- while (nParamIndex >= 0);
- }
-
- return convertOString(pDoc->getCellCursor(nOutputWidth, nOutputHeight, nTileWidth, nTileHeight));
+ // Ignore command's deprecated parameters.
+ return convertOString(pDoc->getCellCursor());
}
else if (aCommand.startsWith(aFontSubset))
{