diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-10 09:40:38 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-16 09:38:03 +0100 |
commit | 65726aae458d5af0e438dd8494a9812770c06186 (patch) | |
tree | 0d6e2efebb0bfc676d8f2bd70e6534367f2ab57e /desktop | |
parent | c08069f2d764c86533c6ea1a17e7437efe6471ac (diff) |
LOK: add lok::Document::setGraphicSelection() API and implement it for Writer
Change-Id: I115cf7e7978622d5108c4c792f7de861beb6efb6
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 922ec882f2ce..bf10c6847d86 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -217,6 +217,10 @@ static void doc_setTextSelection (LibreOfficeKitDocument* pThis, int nType, int nX, int nY); +static void doc_setGraphicSelection (LibreOfficeKitDocument* pThis, + int nType, + int nX, + int nY); struct LibLODocument_Impl : public _LibreOfficeKitDocument { @@ -247,6 +251,7 @@ struct LibLODocument_Impl : public _LibreOfficeKitDocument m_pDocumentClass->postKeyEvent = doc_postKeyEvent; m_pDocumentClass->postMouseEvent = doc_postMouseEvent; m_pDocumentClass->setTextSelection = doc_setTextSelection; + m_pDocumentClass->setGraphicSelection = doc_setGraphicSelection; gDocumentClass = m_pDocumentClass; } @@ -740,6 +745,18 @@ static void doc_setTextSelection(LibreOfficeKitDocument* pThis, int nType, int n pDoc->setTextSelection(nType, nX, nY); } +static void doc_setGraphicSelection(LibreOfficeKitDocument* pThis, int nType, int nX, int nY) +{ + ITiledRenderable* pDoc = getTiledRenderable(pThis); + if (!pDoc) + { + gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering"; + return; + } + + pDoc->setGraphicSelection(nType, nX, nY); +} + static char* lo_getError (LibreOfficeKit *pThis) { LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis); |