From bfa0e40e2e7182928f354ce0bfaa11152080ad5b Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Fri, 20 Jul 2018 17:21:43 +0200 Subject: tdf#116350 Import preset text geometry (text effects) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "Font effect" implementation, instead of normal text, content is converted to "fontwork". Change-Id: I5d02c7faedb66a4b919e64ae1b830bffb69984c1 Reviewed-on: https://gerrit.libreoffice.org/58358 Tested-by: Jenkins Reviewed-by: Szymon Kłos --- oox/inc/drawingml/presetgeometrynames.hxx | 23 +++++++++++++++++++++++ oox/inc/drawingml/textbodycontext.hxx | 2 ++ oox/inc/drawingml/textbodyproperties.hxx | 1 + oox/inc/drawingml/textbodypropertiescontext.hxx | 5 +++++ 4 files changed, 31 insertions(+) create mode 100644 oox/inc/drawingml/presetgeometrynames.hxx (limited to 'oox/inc') diff --git a/oox/inc/drawingml/presetgeometrynames.hxx b/oox/inc/drawingml/presetgeometrynames.hxx new file mode 100644 index 000000000000..51721e41febd --- /dev/null +++ b/oox/inc/drawingml/presetgeometrynames.hxx @@ -0,0 +1,23 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * 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_PRESETGEOMETRYNAMES_HXX +#define INCLUDED_OOX_DRAWINGML_PRESETGEOMETRYNAMES_HXX + +#include +#include + +namespace PresetGeometryTypeNames +{ +OOX_DLLPUBLIC OUString GetFontworkType(const OUString& rMsoType); +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/oox/inc/drawingml/textbodycontext.hxx b/oox/inc/drawingml/textbodycontext.hxx index a3439105493a..39ae7b8a1b59 100644 --- a/oox/inc/drawingml/textbodycontext.hxx +++ b/oox/inc/drawingml/textbodycontext.hxx @@ -32,11 +32,13 @@ class TextBodyContext final : public ::oox::core::ContextHandler2 { public: TextBodyContext( ::oox::core::ContextHandler2Helper const & rParent, TextBody& rTextBody ); + TextBodyContext( ::oox::core::ContextHandler2Helper const & rParent, ShapePtr pShapePtr ); virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; private: TextBody& mrTextBody; + ShapePtr mpShapePtr; }; // CT_RegularTextRun diff --git a/oox/inc/drawingml/textbodyproperties.hxx b/oox/inc/drawingml/textbodyproperties.hxx index bcb75546a688..62ee3190ae58 100644 --- a/oox/inc/drawingml/textbodyproperties.hxx +++ b/oox/inc/drawingml/textbodyproperties.hxx @@ -41,6 +41,7 @@ struct TextBodyProperties boost::optional< sal_Int32 > moTextOffLower; boost::optional< sal_Int32 > moTextOffRight; css::drawing::TextVerticalAdjust meVA; + OUString msPrst; explicit TextBodyProperties(); diff --git a/oox/inc/drawingml/textbodypropertiescontext.hxx b/oox/inc/drawingml/textbodypropertiescontext.hxx index 0ec5fe455185..b6305866e014 100644 --- a/oox/inc/drawingml/textbodypropertiescontext.hxx +++ b/oox/inc/drawingml/textbodypropertiescontext.hxx @@ -21,6 +21,7 @@ #define INCLUDED_OOX_DRAWINGML_TEXTBODYPROPERTIESCONTEXT_HXX #include +#include namespace oox { namespace drawingml { @@ -33,10 +34,14 @@ public: const ::oox::AttributeList& rAttributes, TextBodyProperties& rTextBodyProp ); + TextBodyPropertiesContext( ::oox::core::ContextHandler2Helper const & rParent, + const ::oox::AttributeList& rAttributes, ShapePtr pShapePtr ); + virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; private: TextBodyProperties& mrTextBodyProp; + ShapePtr mpShapePtr; }; } } -- cgit