From 148f3e96d4d0c5376d50a93386b1a6411574e29d Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 27 Nov 2020 16:58:38 +0100 Subject: oox: make effectpropertiescontext available to everyone in oox/ I plan to use this from oox/source/drawingml/table/tablecontext.cxx for tdf#129961. (cherry picked from commit f2e1685e489c054ea10afc0df52451c74da10cc0) Change-Id: Id5177467341f9ddf73c6043796ad35e9cc655d37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107562 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- oox/inc/drawingml/effectpropertiescontext.hxx | 37 ++++++++++++++++++++++ oox/source/drawingml/effectpropertiescontext.cxx | 2 +- oox/source/drawingml/effectpropertiescontext.hxx | 40 ------------------------ oox/source/drawingml/shapepropertiescontext.cxx | 2 +- oox/source/drawingml/themeelementscontext.cxx | 2 +- 5 files changed, 40 insertions(+), 43 deletions(-) create mode 100644 oox/inc/drawingml/effectpropertiescontext.hxx delete mode 100644 oox/source/drawingml/effectpropertiescontext.hxx (limited to 'oox') diff --git a/oox/inc/drawingml/effectpropertiescontext.hxx b/oox/inc/drawingml/effectpropertiescontext.hxx new file mode 100644 index 000000000000..09ec2f02ec80 --- /dev/null +++ b/oox/inc/drawingml/effectpropertiescontext.hxx @@ -0,0 +1,37 @@ +/* -*- 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 + +namespace oox::drawingml { + +struct EffectProperties; +struct Effect; + +class EffectPropertiesContext final : public ::oox::core::ContextHandler2 +{ +public: + EffectPropertiesContext( ::oox::core::ContextHandler2Helper const & rParent, + EffectProperties& rEffectProperties ) throw(); + virtual ~EffectPropertiesContext() override; + + virtual ::oox::core::ContextHandlerRef + onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; + +private: + static void saveUnsupportedAttribs( Effect& rEffect, const AttributeList& rAttribs ); + + EffectProperties& mrEffectProperties; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/source/drawingml/effectpropertiescontext.cxx b/oox/source/drawingml/effectpropertiescontext.cxx index f287c897d891..b7cb03bc08b6 100644 --- a/oox/source/drawingml/effectpropertiescontext.cxx +++ b/oox/source/drawingml/effectpropertiescontext.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "effectpropertiescontext.hxx" +#include #include "effectproperties.hxx" #include #include diff --git a/oox/source/drawingml/effectpropertiescontext.hxx b/oox/source/drawingml/effectpropertiescontext.hxx deleted file mode 100644 index ce7b5b3ef363..000000000000 --- a/oox/source/drawingml/effectpropertiescontext.hxx +++ /dev/null @@ -1,40 +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/. - */ - -#ifndef INCLUDED_OOX_DRAWINGML_EFFECTPROPERTIESCONTEXT_HXX -#define INCLUDED_OOX_DRAWINGML_EFFECTPROPERTIESCONTEXT_HXX - -#include - -namespace oox::drawingml { - -struct EffectProperties; -struct Effect; - -class EffectPropertiesContext final : public ::oox::core::ContextHandler2 -{ -public: - EffectPropertiesContext( ::oox::core::ContextHandler2Helper const & rParent, - EffectProperties& rEffectProperties ) throw(); - virtual ~EffectPropertiesContext() override; - - virtual ::oox::core::ContextHandlerRef - onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; - -private: - static void saveUnsupportedAttribs( Effect& rEffect, const AttributeList& rAttribs ); - - EffectProperties& mrEffectProperties; -}; - -} - -#endif // INCLUDED_OOX_DRAWINGML_EFFECTPROPERTIESCONTEXT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/source/drawingml/shapepropertiescontext.cxx b/oox/source/drawingml/shapepropertiescontext.cxx index 4591cb834489..574e0793c89a 100644 --- a/oox/source/drawingml/shapepropertiescontext.cxx +++ b/oox/source/drawingml/shapepropertiescontext.cxx @@ -24,7 +24,7 @@ #include #include #include -#include "effectpropertiescontext.hxx" +#include #include #include #include diff --git a/oox/source/drawingml/themeelementscontext.cxx b/oox/source/drawingml/themeelementscontext.cxx index e5f84e5a02a0..6fbd62e91d18 100644 --- a/oox/source/drawingml/themeelementscontext.cxx +++ b/oox/source/drawingml/themeelementscontext.cxx @@ -27,7 +27,7 @@ #include #include #include "effectproperties.hxx" -#include "effectpropertiescontext.hxx" +#include #include #include -- cgit