diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-26 10:47:33 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-28 08:34:20 +0100 |
commit | ae9e1569e736ad63bf2a2e197441657283c3f344 (patch) | |
tree | afdf048444ff0a7836552735cd7f20d61673a5ed /sw | |
parent | cc4dbe473b0b68dbe120065c1d6a64a087f41ba2 (diff) |
jsdialogs: share the commands updates sending code
Change-Id: I34c1e03a8f92efe0c0dd391d16ff907919e65b00
Reviewed-on: https://gerrit.libreoffice.org/83748
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
(cherry picked from commit 880ff26edff0f7dfdd0d5b74fd9d7026fd2d8523)
Reviewed-on: https://gerrit.libreoffice.org/83954
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/shells/drawdlg.cxx | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx index 558942f9d437..d9c82359dc83 100644 --- a/sw/source/uibase/shells/drawdlg.cxx +++ b/sw/source/uibase/shells/drawdlg.cxx @@ -257,31 +257,6 @@ namespace pArgs->Put(aItem); } } - - void lcl_sendAttrUpdatesForLOK(SfxViewShell* pShell, const SfxItemSet& rSet) - { - if (!pShell) - return; - - boost::property_tree::ptree aTree; - boost::property_tree::ptree anArray; - - for(int i = 0; i < rSet.Count(); i++) - { - sal_uInt16 nWhich = rSet.GetWhichByPos(i); - if (rSet.HasItem(nWhich) && SfxItemState::SET >= rSet.GetItemState(nWhich)) - { - boost::property_tree::ptree aItem = rSet.Get(nWhich).dumpAsJSON(); - if (!aItem.empty()) - anArray.push_back(std::make_pair("", aItem)); - } - } - aTree.add_child("items", anArray); - - std::stringstream aStream; - boost::property_tree::write_json(aStream, aTree); - pShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, aStream.str().c_str()); - } } void SwDrawShell::ExecDrawAttrArgs(SfxRequest const & rReq) @@ -353,7 +328,7 @@ void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet) SfxViewShell* pViewShell = GetShell().GetSfxViewShell(); if (pViewShell && comphelper::LibreOfficeKit::isActive()) - lcl_sendAttrUpdatesForLOK( pViewShell, rSet ); + pViewShell->sendUnoStatus( &rSet ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |