Document Colors do not show any color in the Palette
same is true for "Theme Colors", a problem since:
commit 4ccc2f0e3f45c9d78f74b1848851bedf71f7382d
Date: Fri Mar 1 22:11:14 2024 +0200
cool#8327 use tools::JsonWriter for theme colors
Change-Id: Ibaab5df197bd8005037e066181e8a50bdda5ceda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164658
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164669
Tested-by: Jenkins
This commit is contained in:
committed by
Noel Grandin
parent
ed8a6bf198
commit
17dc98b0f0
@@ -46,6 +46,7 @@ public:
|
||||
|
||||
[[nodiscard]] ScopedJsonWriterNode<'}'> startNode(std::string_view nodeName);
|
||||
[[nodiscard]] ScopedJsonWriterNode<']'> startArray(std::string_view nodeName);
|
||||
[[nodiscard]] ScopedJsonWriterNode<']'> startAnonArray();
|
||||
[[nodiscard]] ScopedJsonWriterNode<'}'> startStruct();
|
||||
|
||||
void put(std::u16string_view pPropName, std::u16string_view rPropValue);
|
||||
|
||||
@@ -480,8 +480,7 @@ void PaletteManager::generateJSON(tools::JsonWriter& aTree, const std::set<Color
|
||||
auto aColorIt = rColors.begin();
|
||||
while (aColorIt != rColors.end())
|
||||
{
|
||||
auto aColorRowTree = aTree.startStruct();
|
||||
auto aColorRowTree2 = aTree.startArray("");
|
||||
auto aColorRowTree = aTree.startAnonArray();
|
||||
|
||||
for (sal_uInt32 nColumn = 0; nColumn < nColumnCount; nColumn++)
|
||||
{
|
||||
|
||||
@@ -134,9 +134,11 @@ void ThemeColorPaletteManager::generateJSON(tools::JsonWriter& aTree)
|
||||
|
||||
for (size_t nEffect = 0; nEffect < 6; ++nEffect)
|
||||
{
|
||||
auto aColorRowTree = aTree.startStruct();
|
||||
auto aColorRowTree = aTree.startAnonArray();
|
||||
for (size_t nIndex = 0; nIndex < 12; ++nIndex)
|
||||
{
|
||||
auto aColorTree = aTree.startStruct();
|
||||
|
||||
auto const& rColorData = aThemePaletteCollection.maColors[nIndex];
|
||||
auto const& rEffectData = rColorData.maEffects[nEffect];
|
||||
|
||||
|
||||
@@ -74,6 +74,16 @@ JsonWriter::ScopedJsonWriterNode<']'> JsonWriter::startArray(std::string_view pN
|
||||
return { *this };
|
||||
}
|
||||
|
||||
JsonWriter::ScopedJsonWriterNode<']'> JsonWriter::startAnonArray()
|
||||
{
|
||||
putRaw("[ ");
|
||||
|
||||
mStartNodeCount++;
|
||||
mbFirstFieldInNode = true;
|
||||
|
||||
return { *this };
|
||||
}
|
||||
|
||||
JsonWriter::ScopedJsonWriterNode<'}'> JsonWriter::startStruct()
|
||||
{
|
||||
putRaw("{ ");
|
||||
|
||||
Reference in New Issue
Block a user