diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2023-05-08 14:09:00 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2023-05-12 05:00:28 +0200 |
commit | 1df0565fb92972bd410e7db85eef1e4bec3fcc31 (patch) | |
tree | 863c5cf54a5941ca84e2d76b68c4e895159d78de /include/docmodel/uno | |
parent | 99a88c9e55872214ce01d89447d18708e47e956b (diff) |
use ComplexColor instead of ThemeColor for better OOXML compat.
In OOXML a color definition includes more represenations, one of
which is scheme color (which is what is implemented in ThemeColor
currently), but it supports other representations too (RGB, HSL,
System,..). ComplexColor includes all the representations, so to
have a better compatibility with OOXML, this changes all uses of
ThemeColor to ComplexColor.
In many cases the usage of ComplexColor isn't the same as the
usage of ThemeColors, but this cases will need to be changed in a
later commit.
Change-Id: I9cc8acee2ac0a1998fe9b98247bcf4a96273149a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151492
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/docmodel/uno')
-rw-r--r-- | include/docmodel/uno/UnoThemeColor.hxx | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/include/docmodel/uno/UnoThemeColor.hxx b/include/docmodel/uno/UnoThemeColor.hxx deleted file mode 100644 index 50063ab981dd..000000000000 --- a/include/docmodel/uno/UnoThemeColor.hxx +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- 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 <cppuhelper/implbase.hxx> -#include <cppuhelper/supportsservice.hxx> -#include <comphelper/servicehelper.hxx> - -#include <com/sun/star/util/Color.hpp> -#include <com/sun/star/util/XThemeColor.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/uno/XComponentContext.hpp> - -#include <utility> -#include <docmodel/dllapi.h> -#include <docmodel/theme/ThemeColor.hxx> - -class DOCMODEL_DLLPUBLIC UnoThemeColor final - : public cppu::WeakImplHelper<css::util::XThemeColor, css::lang::XUnoTunnel> -{ -private: - model::ThemeColor maThemeColor; - -public: - UnoThemeColor(model::ThemeColor const& rThemeColor) - : maThemeColor(rThemeColor) - { - } - - model::ThemeColor const& getThemeColor() const { return maThemeColor; } - - // XThemeColor - sal_Int16 SAL_CALL getType() override; - - UNO3_GETIMPLEMENTATION_DECL(UnoThemeColor) -}; - -namespace model::theme -{ -DOCMODEL_DLLPUBLIC css::uno::Reference<css::util::XThemeColor> -createXThemeColor(model::ThemeColor const& rThemeColor); - -DOCMODEL_DLLPUBLIC void -setFromXThemeColor(model::ThemeColor& rThemeColor, - css::uno::Reference<css::util::XThemeColor> const& rxThemeColor); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |