summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2017-11-28 23:08:34 +0100
committerJan Holesovsky <kendy@collabora.com>2017-11-30 17:29:36 +0100
commite74fc612fb87d942a5ad74b882b211dcafb3967d (patch)
tree58c2fbc3b1019668822045815fc8475a301bb647 /desktop
parentc854d3f13ee14b194ffe859f605a6c1ad1c3b297 (diff)
lok: calc: set outline state
use a specific message from the client for set the visibility state of a group instead of hijacking the update row/column header message Change-Id: I9634c24bbffaddc916c8ad716ac6d5d31e735a55 Reviewed-on: https://gerrit.libreoffice.org/45471 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx33
1 files changed, 16 insertions, 17 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 62e2def43b8f..82f76bafe2c1 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -619,6 +619,7 @@ static void doc_setClientZoom(LibreOfficeKitDocument* pThis,
int nTileTwipWidth,
int nTileTwipHeight);
static void doc_setClientVisibleArea(LibreOfficeKitDocument* pThis, int nX, int nY, int nWidth, int nHeight);
+static void doc_setOutlineState(LibreOfficeKitDocument* pThis, bool bColumn, int nLevel, int nIndex, bool bHidden);
static int doc_createView(LibreOfficeKitDocument* pThis);
static void doc_destroyView(LibreOfficeKitDocument* pThis, int nId);
static void doc_setView(LibreOfficeKitDocument* pThis, int nId);
@@ -676,6 +677,7 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XCompone
m_pDocumentClass->getCommandValues = doc_getCommandValues;
m_pDocumentClass->setClientZoom = doc_setClientZoom;
m_pDocumentClass->setClientVisibleArea = doc_setClientVisibleArea;
+ m_pDocumentClass->setOutlineState = doc_setOutlineState;
m_pDocumentClass->createView = doc_createView;
m_pDocumentClass->destroyView = doc_destroyView;
@@ -3018,10 +3020,6 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
int nY = 0;
int nWidth = 0;
int nHeight = 0;
- bool bColumn = false;
- int nLevel = -1;
- int nGroupIndex = -2;
- bool bHidden = false;
OString aArguments = aCommand.copy(aViewRowColumnHeaders.getLength() + 1);
sal_Int32 nParamIndex = 0;
do
@@ -3047,23 +3045,10 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
nWidth = aValue.toInt32();
else if (aKey == "height")
nHeight = aValue.toInt32();
- else if (aKey == "columnOutline")
- bColumn = aValue.toBoolean();
- else if (aKey == "groupLevel")
- nLevel = aValue.toInt32();
- else if (aKey == "groupIndex")
- nGroupIndex = aValue.toInt32();
- else if (aKey == "groupHidden")
- bHidden = aValue.toBoolean();
}
while (nParamIndex >= 0);
aRectangle = Rectangle(nX, nY, nX + nWidth, nY + nHeight);
-
- if (nGroupIndex != -2)
- {
- pDoc->setOutlineState(bColumn, nLevel, nGroupIndex, bHidden);
- }
}
OUString aHeaders = pDoc->getRowColumnHeaders(aRectangle);
@@ -3165,6 +3150,20 @@ static void doc_setClientVisibleArea(LibreOfficeKitDocument* pThis, int nX, int
pDoc->setClientVisibleArea(aRectangle);
}
+static void doc_setOutlineState(LibreOfficeKitDocument* pThis, bool bColumn, int nLevel, int nIndex, bool bHidden)
+{
+ SolarMutexGuard aGuard;
+
+ ITiledRenderable* pDoc = getTiledRenderable(pThis);
+ if (!pDoc)
+ {
+ gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering";
+ return;
+ }
+
+ pDoc->setOutlineState(bColumn, nLevel, nIndex, bHidden);
+}
+
static int doc_createView(LibreOfficeKitDocument* /*pThis*/)
{
SolarMutexGuard aGuard;