[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - include/svtools include/vcl svtools/source
Henry Castro (via logerrit)
logerrit at kemper.freedesktop.org
Fri Oct 18 14:48:21 UTC 2019
include/svtools/valueset.hxx | 1 +
include/vcl/image.hxx | 2 +-
svtools/source/control/valueset.cxx | 22 ++++++++++++++++++++++
3 files changed, 24 insertions(+), 1 deletion(-)
New commits:
commit 4b4f3948905debae125cd7368ad6a252a0b90751
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Oct 17 19:03:42 2019 -0400
Commit: Henry Castro <hcastro at collabora.com>
CommitDate: Fri Oct 18 16:47:10 2019 +0200
lok: dump as property tree the valueset control
In order to create a container element at client side dialog
using DialogWizard. It is required to send the items of the
valueset control.
Change-Id: Ib0fdc444c7126e6888e37c8a01f8e7f04c641d18
Reviewed-on: https://gerrit.libreoffice.org/81001
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx
index dacdd25eb5eb..7e05633314b2 100644
--- a/include/svtools/valueset.hxx
+++ b/include/svtools/valueset.hxx
@@ -296,6 +296,7 @@ public:
virtual void RequestHelp( const HelpEvent& rHEvt ) override;
virtual void StateChanged( StateChangedType nStateChange ) override;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
+ virtual boost::property_tree::ptree DumpAsPropertyTree() override;
virtual void Select();
virtual void UserDraw( const UserDrawEvent& rUDEvt );
diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx
index 8ee5faff27a7..31e38ba049da 100644
--- a/include/vcl/image.hxx
+++ b/include/vcl/image.hxx
@@ -69,7 +69,7 @@ public:
bool operator==( const Image& rImage ) const;
bool operator!=( const Image& rImage ) const { return !(Image::operator==( rImage )); }
- SAL_DLLPRIVATE OUString GetStock() const;
+ OUString GetStock() const;
void Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle, const Size* pSize = nullptr);
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 0ccb65e01917..73a91e130b11 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -1437,6 +1437,28 @@ void ValueSet::DataChanged( const DataChangedEvent& rDataChangedEvent )
}
}
+boost::property_tree::ptree ValueSet::DumpAsPropertyTree()
+{
+ boost::property_tree::ptree aTree(Control::DumpAsPropertyTree());
+ boost::property_tree::ptree aEntries;
+
+ const size_t nSize = mItemList.size();
+
+ for ( size_t nIt = 0; nIt < nSize; ++nIt )
+ {
+ boost::property_tree::ptree aEntry;
+ ValueSetItem* pItem = mItemList[nIt].get();
+ aEntry.put("id", pItem->mnId);
+ aEntry.put("text", pItem->maText);
+ aEntry.put("image", pItem->maImage.GetStock());
+ aEntries.push_back(std::make_pair("", aEntry));
+ }
+
+ aTree.put("type", "valueset");
+ aTree.add_child("entries", aEntries);
+ return aTree;
+}
+
void ValueSet::Select()
{
maSelectHdl.Call( this );
More information about the Libreoffice-commits
mailing list