summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/tbcontrl.cxx
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-10-23 13:29:37 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2019-10-23 16:26:24 +0200
commitc7b97f2e4b8f47107bc91ded0295dcfffd0c71b6 (patch)
tree1a5b5c5668aa95c22f0159a7c71f2ade1b1e690a /svx/source/tbxctrls/tbcontrl.cxx
parent36a1942bccdf63f26ea3a4497688f367083d2f0e (diff)
jsdilogs: send data for font name & size toolitems
Change-Id: Ia5ea058ba44b3a511a0bdbfc132a7de2d68f2e6b Reviewed-on: https://gerrit.libreoffice.org/81380 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'svx/source/tbxctrls/tbcontrl.cxx')
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx32
1 files changed, 32 insertions, 0 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index b1230050bc06..5f8ec0491977 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -242,6 +242,7 @@ public:
virtual bool EventNotify( NotifyEvent& rNEvt ) override;
virtual Reference< css::accessibility::XAccessible > CreateAccessible() override;
void SetOwnFontList(::std::unique_ptr<FontList> && _aOwnFontList) { m_aOwnFontList = std::move(_aOwnFontList); }
+ virtual boost::property_tree::ptree DumpAsPropertyTree() override;
};
// SelectHdl needs the Modifiers, get them in MouseButtonUp
@@ -1311,6 +1312,7 @@ SvxFontNameBox_Impl::SvxFontNameBox_Impl( vcl::Window* pParent, const Reference<
SetOptimalSize();
EnableControls_Impl();
GetSubEdit()->AddEventListener( LINK( this, SvxFontNameBox_Impl, CheckAndMarkUnknownFont ));
+ set_id("fontnamecombobox");
}
SvxFontNameBox_Impl::~SvxFontNameBox_Impl()
@@ -1585,6 +1587,36 @@ void SvxFontNameBox_Impl::Select()
}
}
+boost::property_tree::ptree SvxFontNameBox_Impl::DumpAsPropertyTree()
+{
+ boost::property_tree::ptree aTree(FontNameBox::DumpAsPropertyTree());
+
+ boost::property_tree::ptree aEntries;
+
+ for (int i = 0; i < GetEntryCount(); ++i)
+ {
+ boost::property_tree::ptree aEntry;
+ aEntry.put("", GetEntry(i));
+ aEntries.push_back(std::make_pair("", aEntry));
+ }
+
+ aTree.add_child("entries", aEntries);
+
+ boost::property_tree::ptree aSelected;
+
+ for (int i = 0; i < GetSelectedEntryCount(); ++i)
+ {
+ boost::property_tree::ptree aEntry;
+ aEntry.put("", GetSelectedEntryPos(i));
+ aSelected.push_back(std::make_pair("", aEntry));
+ }
+
+ aTree.put("selectedCount", GetSelectedEntryCount());
+ aTree.add_child("selectedEntries", aSelected);
+
+ return aTree;
+}
+
SvxColorWindow::SvxColorWindow(const OUString& rCommand,
std::shared_ptr<PaletteManager> const & rPaletteManager,
ColorStatus& rColorStatus,