sc/source/ui/view/tabview5.cxx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
New commits: commit 8f6c7f3ca1baa6c29161cbbe41494c03b0a9d000 Author: Henry Castro <hcas...@collabora.com> Date: Thu Aug 13 14:00:47 2015 -0400 sc: LOK_CALLBACK_DOCUMENT_SIZE_CHANGED callback Handle the LOK_CALLBACK_DOCUMENT_SIZE_CHANGED callback. Change-Id: I855b1e23cfc6ec66e2a0eec603e38e9dd1e28cc5 diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index 768c4b3..5644fea 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() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits