diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-21 17:47:10 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-27 20:31:07 +0100 |
commit | dcb31718a238f115f703f1088ba5220e620dec1c (patch) | |
tree | 1044a2713ca5cc3a2621f1a6f8c4f1637e17fa6f /include/svx | |
parent | e55a1dc163165cb79fc9113101d16ee8d3db7298 (diff) |
jsdialogs: dumpAsJSON for SfxItems with FillGradient example
Change-Id: I1b9303af6f52ad071074200bb630c587c8f611c1
Reviewed-on: https://gerrit.libreoffice.org/83875
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/xflgrit.hxx | 2 | ||||
-rw-r--r-- | include/svx/xgrad.hxx | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/svx/xflgrit.hxx b/include/svx/xflgrit.hxx index 5f136e25f824..1b1d860c8fb9 100644 --- a/include/svx/xflgrit.hxx +++ b/include/svx/xflgrit.hxx @@ -56,6 +56,8 @@ public: static bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ); std::unique_ptr<XFillGradientItem> checkForUniqueItem( SdrModel* pModel ) const; + + virtual boost::property_tree::ptree dumpAsJSON() const override; }; #endif diff --git a/include/svx/xgrad.hxx b/include/svx/xgrad.hxx index e31a4d2ef648..268b0e06253b 100644 --- a/include/svx/xgrad.hxx +++ b/include/svx/xgrad.hxx @@ -23,6 +23,7 @@ #include <tools/color.hxx> #include <svx/svxdllapi.h> #include <com/sun/star/awt/GradientStyle.hpp> +#include <boost/property_tree/json_parser.hpp> class Gradient; @@ -39,6 +40,8 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC XGradient final sal_uInt16 nIntensEnd; sal_uInt16 nStepCount; + static std::string GradientStyleToString(css::awt::GradientStyle eStyle); + public: XGradient(); XGradient( const Color& rStart, const Color& rEnd, @@ -70,6 +73,8 @@ public: sal_uInt16 GetStartIntens() const { return nIntensStart; } sal_uInt16 GetEndIntens() const { return nIntensEnd; } sal_uInt16 GetSteps() const { return nStepCount; } + + boost::property_tree::ptree dumpAsJSON() const; }; #endif |