[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - svx/source
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 24 06:54:47 UTC 2019
svx/source/tbxctrls/tbcontrl.cxx | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
New commits:
commit 9b5ea9a58200bf7a2075b47930e3f8c0f7c854c8
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Oct 23 17:10:35 2019 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Oct 24 08:53:52 2019 +0200
jsdliaogs: send data for text styles combobox
Change-Id: I5827799f8adf8db697ac2e2a96eaba2a6fd2e2a4
Reviewed-on: https://gerrit.libreoffice.org/81401
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
(cherry picked from commit 00d06dee4b77cf52c927bd2c8687bb1a8d6c7904)
Reviewed-on: https://gerrit.libreoffice.org/81420
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index deecd6b37353..977e3146dafe 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -147,6 +147,7 @@ public:
void SetVisibilityListener( const Link<SvxStyleBox_Impl&,void>& aVisListener ) { aVisibilityListener = aVisListener; }
void SetDefaultStyle( const OUString& rDefault ) { sDefaultStyle = rDefault; }
+ virtual boost::property_tree::ptree DumpAsPropertyTree() override;
protected:
/// Calculate the optimal width of the dropdown. Very expensive operation, triggers lots of font measurement.
@@ -373,6 +374,7 @@ SvxStyleBox_Impl::SvxStyleBox_Impl(vcl::Window* pParent,
EnableUserDraw( true );
AddEventListener(LINK(this, SvxStyleBox_Impl, CalcOptimalExtraUserWidth));
SetUserItemSize( Size( 0, ITEM_HEIGHT ) );
+ set_id("applystyle");
}
SvxStyleBox_Impl::~SvxStyleBox_Impl()
@@ -902,6 +904,36 @@ Color SvxStyleBox_Impl::TestColorsVisible(const Color &FontCol, const Color &Bac
return retCol;
}
+boost::property_tree::ptree SvxStyleBox_Impl::DumpAsPropertyTree()
+{
+ boost::property_tree::ptree aTree(ComboBox::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;
+}
+
static bool lcl_GetDocFontList( const FontList** ppFontList, SvxFontNameBox_Impl* pBox )
{
More information about the Libreoffice-commits
mailing list