diff options
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/lib/init.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 4e7f9210a83e..b0499399b97b 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -66,6 +66,7 @@ #include <sfx2/viewsh.hxx> #include <svx/dialmgr.hxx> #include <svx/dialogs.hrc> +#include <svx/ruler.hxx> #include <svx/svxids.hrc> #include <svx/ucsubset.hxx> #include <vcl/svapp.hxx> @@ -830,6 +831,7 @@ void CallbackFlushHandler::queue(const int type, const char* data) case LOK_CALLBACK_CURSOR_VISIBLE: case LOK_CALLBACK_SET_PART: case LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE: + case LOK_CALLBACK_RULER_UPDATE: { removeAll([type] (const queue_type::value_type& elem) { return (elem.first == type); }); } @@ -2071,6 +2073,18 @@ static char* getPostItsPos(LibreOfficeKitDocument* pThis) return strdup(aComments.toUtf8().getStr()); } +static char* getRulerState(LibreOfficeKitDocument* pThis) +{ + ITiledRenderable* pDoc = getTiledRenderable(pThis); + if (!pDoc) + { + gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering"; + return nullptr; + } + OUString state = pDoc->getRulerState(); + return strdup(state.toUtf8().getStr()); +} + static void doc_postKeyEvent(LibreOfficeKitDocument* pThis, int nType, int nCharCode, int nKeyCode) { SolarMutexGuard aGuard; @@ -2678,6 +2692,10 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo { return getPostItsPos(pThis); } + else if (aCommand == ".uno:RulerState") + { + return getRulerState(pThis); + } else if (aCommand.startsWith(aViewRowColumnHeaders)) { ITiledRenderable* pDoc = getTiledRenderable(pThis); |