Kaydet (Commit) 8f6c7f3c authored tarafından Henry Castro's avatar Henry Castro

sc: LOK_CALLBACK_DOCUMENT_SIZE_CHANGED callback

Handle the LOK_CALLBACK_DOCUMENT_SIZE_CHANGED callback.

Change-Id: I855b1e23cfc6ec66e2a0eec603e38e9dd1e28cc5
üst ea29d320
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment