Bump version to 6.4-15
[LibreOffice.git] / include / oox / ppt / pptshape.hxx
blobc5d9e7be55484e21d248f320fd2290323e036db4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_OOX_PPT_PPTSHAPE_HXX
21 #define INCLUDED_OOX_PPT_PPTSHAPE_HXX
23 #include <vector>
25 #include <com/sun/star/uno/Reference.hxx>
26 #include <oox/drawingml/shape.hxx>
27 #include <oox/drawingml/drawingmltypes.hxx>
28 #include <oox/ppt/slidepersist.hxx>
29 #include <rtl/ustring.hxx>
30 #include <sal/types.h>
32 namespace basegfx { class B2DHomMatrix; }
34 namespace com { namespace sun { namespace star {
35 namespace awt { struct Rectangle; }
36 namespace drawing { class XShapes; }
37 } } }
39 namespace oox {
40 namespace core { class XmlFilterBase; }
41 namespace drawingml { class Theme; }
42 template <typename Type> class OptValue;
45 namespace oox { namespace ppt {
47 class PPTShape final : public oox::drawingml::Shape
49 OUString msModelId; // fallback dgs smartart shape reference
50 ShapeLocation meShapeLocation; // placeholdershapes (mnSubType != 0) on Master are never displayed
51 bool mbReferenced; // placeholdershapes on Layout are displayed only, if they are not referenced
52 // placeholdershapes on Slide are displayed always
53 oox::drawingml::ShapePtr mpPlaceholder;
55 public:
57 PPTShape( const oox::ppt::ShapeLocation eShapeLocation,
58 const sal_Char* pServiceType );
59 virtual ~PPTShape() override;
61 using oox::drawingml::Shape::addShape;
62 // addShape is creating and inserting the corresponding XShape.
63 void addShape(
64 oox::core::XmlFilterBase& rFilterBase,
65 const SlidePersist& rPersist,
66 const oox::drawingml::Theme* pTheme,
67 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
68 basegfx::B2DHomMatrix& aTransformation,
69 ::oox::drawingml::ShapeIdMap* pShapeMap,
70 bool bhasSameSubTypeIndex = false );
72 ShapeLocation getShapeLocation() const { return meShapeLocation; };
73 void setReferenced( bool bReferenced ){ mbReferenced = bReferenced; };
74 void setPlaceholder( oox::drawingml::ShapePtr pPlaceholder ) { mpPlaceholder = pPlaceholder; }
75 void setModelId( const OUString& rId ) { msModelId = rId; }
77 static oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 nFirstSubType,
78 const sal_Int32 nSecondSubType, const OptValue< sal_Int32 >& oSubTypeIndex,
79 std::vector< oox::drawingml::ShapePtr >& rShapes, bool bMasterOnly = false );
80 static oox::drawingml::ShapePtr findPlaceholderByIndex( const sal_Int32 nIdx,
81 std::vector< oox::drawingml::ShapePtr >& rShapes, bool bMasterOnly = false );
83 static oox::drawingml::TextListStylePtr getSubTypeTextListStyle( const SlidePersist& rSlidePersist, sal_Int32 nSubType );
86 } }
88 #endif // INCLUDED_OOX_PPT_PPTSHAPE_HXX
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */