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-27 22:37:25 +0100 |
commit | 880ff26edff0f7dfdd0d5b74fd9d7026fd2d8523 (patch) | |
tree | df60b8c0bd7a23894dc1fa4d7859fc2d4758a82c /sw/source/uibase/shells | |
parent | c1f2ffa3e3abcb3b5709197a1e0ee0a5d3f2b1cf (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>
Diffstat (limited to 'sw/source/uibase/shells')
-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 4e31cf1097f4..a8100523c9e5 100644 --- a/sw/source/uibase/shells/drawdlg.cxx +++ b/sw/source/uibase/shells/drawdlg.cxx @@ -254,31 +254,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) @@ -350,7 +325,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: */ |