office-gobmx/include/oox/export/ThemeExport.hxx
Tomaž Vajngerl 9d5a7d9257 ComplexColor various clean-up and (trivial) refactorings
Don't allow access to member variables of ComplexColor and makes
them private. Needs a lot of changes.

Change "scheme" to "theme" to be more consistent. In LO we usually
call the "theme color" what is usually refered to as "scheme color"
in OOXML, where it is sometimes refered to as "scheme" and other times
as theme color.

Remove ThemeColor class which was replaced with CmplexColor some
time ago.

Remove un-needed includes and un-needed components.

Use isValidThemeColor in many places where we check that the
ComplexColor is of "Theme" type and that ThemeColorType is set to
a valid value.

Change-Id: I325595fa65b8e56a4707e9d22acc6330aac28961
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155359
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-15 20:58:13 +02:00

73 lines
2.4 KiB
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#pragma once
#include <sal/config.h>
#include <oox/dllapi.h>
#include <oox/core/xmlfilterbase.hxx>
#include <oox/export/utils.hxx>
namespace model
{
class Theme;
class FontScheme;
class FormatScheme;
class EffectStyle;
class LineStyle;
class FillStyle;
class BlipFill;
class PatternFill;
class GradientFill;
class SolidFill;
class ComplexColor;
struct Transformation;
}
namespace oox
{
class OOX_DLLPUBLIC ThemeExport
{
private:
oox::core::XmlFilterBase* mpFilterBase;
oox::drawingml::DocumentType meDocumentType;
sax_fastparser::FSHelperPtr mpFS;
public:
ThemeExport(oox::core::XmlFilterBase* pFilterBase, oox::drawingml::DocumentType eDocumentType);
void write(OUString const& rPath, model::Theme const& rTheme);
private:
bool writeColorSet(model::Theme const& rTheme);
bool writeFontScheme(model::FontScheme const& rFontScheme);
bool writeFormatScheme(model::FormatScheme const& rFormatScheme);
void writeEffectStyle(model::EffectStyle const& rEffectStyle);
void writeLineStyle(model::LineStyle const& rLineStyle);
void writeBackgroundFillStyle(model::FillStyle const& rFillStyle);
void writeFillStyle(model::FillStyle const& rFillStyle);
void writeBlipFill(model::BlipFill const& rBlipFill);
void writeBlip(model::BlipFill const& rBlipFill);
void writePatternFill(model::PatternFill const& rPatternFill);
void writeGradientFill(model::GradientFill const& rGradientFill);
void writeSolidFill(model::SolidFill const& rSolidFill);
void writeComplexColor(model::ComplexColor const& rComplexColor);
void writeColorPlaceholder(model::ComplexColor const& rComplexColor);
void writeColorSystem(model::ComplexColor const& rComplexColor);
void writeColorTheme(model::ComplexColor const& rComplexColor);
void writeColorHSL(model::ComplexColor const& rComplexColor);
void writeColorCRGB(model::ComplexColor const& rComplexColor);
void writeColorRGB(model::ComplexColor const& rComplexColor);
void writeColorTransformations(std::vector<model::Transformation> const& rTransformations);
};
} // end namespace oox
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */