diff options
author | Henry Castro <hcastro@collabora.com> | 2015-08-13 14:00:47 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2015-08-13 14:00:47 -0400 |
commit | 8f6c7f3ca1baa6c29161cbbe41494c03b0a9d000 (patch) | |
tree | 6f08f1872cbf5c2d410befe02561d937e12a355f /sc | |
parent | ea29d320754fdb21b336cb78f816b8081371def9 (diff) |
sc: LOK_CALLBACK_DOCUMENT_SIZE_CHANGED callback
Handle the LOK_CALLBACK_DOCUMENT_SIZE_CHANGED callback.
Change-Id: I855b1e23cfc6ec66e2a0eec603e38e9dd1e28cc5
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/tabview5.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index 768c4b39d5a6..5644feaf7a2e 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -51,7 +51,10 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> +#include <comphelper/lok.hxx> #include <officecfg/Office/Calc.hxx> +#include <LibreOfficeKit/LibreOfficeKitEnums.h> + using namespace com::sun::star; @@ -298,6 +301,22 @@ void ScTabView::TabChanged( bool bSameTabButMoved ) pImp->SheetChanged( bSameTabButMoved ); } } + + if (comphelper::LibreOfficeKit::isActive()) + { + ScDocShell* pDocSh; + ScModelObj* pModelObj; + + if ( ( pDocSh = GetViewData().GetDocShell() ) && + ( pModelObj = ScModelObj::getImplementation( pDocSh->GetModel() )) ) + { + Size aDocSize = pModelObj->getDocumentSize(); + std::stringstream ss; + ss << aDocSize.Width() << ", " << aDocSize.Height(); + OString sRect = ss.str().c_str(); + pDocSh->libreOfficeKitCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, sRect.getStr()); + } + } } void ScTabView::UpdateLayerLocks() |