diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-10 16:13:53 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-16 09:38:05 +0100 |
commit | 0262693b327c947ef69581e61a966546c9ebb8da (patch) | |
tree | 9af58b8060ec4bd5c2d005581899eb9c3f16bf40 /desktop | |
parent | 5fb4e35f3454cb49bf5e5f611224216862f6f611 (diff) |
lok::Document: add resetSelection()
Change-Id: Ib24003178bb576ff1450d674d74ef8978b350b92
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index bf10c6847d86..ee986c515722 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -221,6 +221,7 @@ static void doc_setGraphicSelection (LibreOfficeKitDocument* pThis, int nType, int nX, int nY); +static void doc_resetSelection (LibreOfficeKitDocument* pThis); struct LibLODocument_Impl : public _LibreOfficeKitDocument { @@ -252,6 +253,7 @@ struct LibLODocument_Impl : public _LibreOfficeKitDocument m_pDocumentClass->postMouseEvent = doc_postMouseEvent; m_pDocumentClass->setTextSelection = doc_setTextSelection; m_pDocumentClass->setGraphicSelection = doc_setGraphicSelection; + m_pDocumentClass->resetSelection = doc_resetSelection; gDocumentClass = m_pDocumentClass; } @@ -757,6 +759,18 @@ static void doc_setGraphicSelection(LibreOfficeKitDocument* pThis, int nType, in pDoc->setGraphicSelection(nType, nX, nY); } +static void doc_resetSelection(LibreOfficeKitDocument* pThis) +{ + ITiledRenderable* pDoc = getTiledRenderable(pThis); + if (!pDoc) + { + gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering"; + return; + } + + pDoc->resetSelection(); +} + static char* lo_getError (LibreOfficeKit *pThis) { LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis); |