diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2024-03-01 22:11:14 +0200 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-03-05 12:22:02 +0100 |
commit | 4ccc2f0e3f45c9d78f74b1848851bedf71f7382d (patch) | |
tree | 912e78ae13267d50c3966f1510b55ed4fb082adf /include | |
parent | 4674134d510b89af935492daa3d911b5a086ed01 (diff) |
cool#8327 use tools::JsonWriter for theme colors
Change-Id: Iebca3781910f9e28100258da8266d51f673f31d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164250
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164413
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/docmodel/color/ComplexColorJSON.hxx | 8 | ||||
-rw-r--r-- | include/svx/PaletteManager.hxx | 3 | ||||
-rw-r--r-- | include/svx/theme/ThemeColorPaletteManager.hxx | 7 |
3 files changed, 13 insertions, 5 deletions
diff --git a/include/docmodel/color/ComplexColorJSON.hxx b/include/docmodel/color/ComplexColorJSON.hxx index b4aa4bfb3354..b35d938f007c 100644 --- a/include/docmodel/color/ComplexColorJSON.hxx +++ b/include/docmodel/color/ComplexColorJSON.hxx @@ -12,12 +12,16 @@ #include <docmodel/dllapi.h> #include <docmodel/color/ComplexColor.hxx> -#include <boost/property_tree/json_parser.hpp> + +namespace tools +{ +class JsonWriter; +} namespace model::color { DOCMODEL_DLLPUBLIC OString convertToJSON(model::ComplexColor const& rComplexColor); -DOCMODEL_DLLPUBLIC void convertToJSONTree(boost::property_tree::ptree& rTree, +DOCMODEL_DLLPUBLIC void convertToJSONTree(tools::JsonWriter& rTree, model::ComplexColor const& rComplexColor); DOCMODEL_DLLPUBLIC bool convertFromJSON(OString const& rJsonString, model::ComplexColor& rComplexColor); diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx index 9e089b0ed495..3a5ad8ba69ff 100644 --- a/include/svx/PaletteManager.hxx +++ b/include/svx/PaletteManager.hxx @@ -33,6 +33,7 @@ namespace com::sun::star::uno { class XComponentContext; } namespace svx { class ToolboxButtonColorUpdaterBase; } namespace weld { class Window; } namespace model { class ColorSet; } +namespace tools { class JsonWriter; } class SVXCORE_DLLPUBLIC PaletteManager { @@ -88,7 +89,7 @@ public: static void DispatchColorCommand(const OUString& aCommand, const NamedColor& rColor); /// Appends node for Document Colors into the ptree - static void generateJSON(boost::property_tree::ptree& aTree, const std::set<Color>& rColors); + static void generateJSON(tools::JsonWriter& aTree, const std::set<Color>& rColors); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/theme/ThemeColorPaletteManager.hxx b/include/svx/theme/ThemeColorPaletteManager.hxx index 8531021bbc84..09469dee9477 100644 --- a/include/svx/theme/ThemeColorPaletteManager.hxx +++ b/include/svx/theme/ThemeColorPaletteManager.hxx @@ -14,12 +14,15 @@ #include <memory> #include <tools/color.hxx> #include <docmodel/theme/ThemeColorType.hxx> -#include <boost/property_tree/json_parser.hpp> namespace model { class ColorSet; } +namespace tools +{ +class JsonWriter; +} namespace svx { @@ -61,7 +64,7 @@ class SVXCORE_DLLPUBLIC ThemeColorPaletteManager final public: ThemeColorPaletteManager(std::shared_ptr<model::ColorSet> const& pColorSet); ThemePaletteCollection generate(); - void generateJSON(boost::property_tree::ptree& aTree); + void generateJSON(tools::JsonWriter& aTree); }; } // end svx namespace |