Branch libreoffice-5-0-4
[LibreOffice.git] / include / oox / ppt / pptshape.hxx
blob18126d36fbfcb66d62d81babee6630b12e398f4c
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 <oox/drawingml/shape.hxx>
24 #include <oox/ppt/slidepersist.hxx>
26 namespace oox { namespace ppt {
28 class PPTShape : public oox::drawingml::Shape
30 OUString msModelId; // fallback dgs smartart shape reference
31 ShapeLocation meShapeLocation; // placeholdershapes (mnSubType != 0) on Master are never displayed
32 bool mbReferenced; // placeholdershapes on Layout are displayed only, if they are not referenced
33 // placeholdershapes on Slide are displayed always
35 public:
37 PPTShape( const oox::ppt::ShapeLocation eShapeLocation,
38 const sal_Char* pServiceType = NULL );
39 virtual ~PPTShape();
41 using oox::drawingml::Shape::addShape;
42 // addShape is creating and inserting the corresponding XShape.
43 void addShape(
44 oox::core::XmlFilterBase& rFilterBase,
45 SlidePersist& rPersist,
46 const oox::drawingml::Theme* pTheme,
47 const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes,
48 basegfx::B2DHomMatrix& aTransformation,
49 const com::sun::star::awt::Rectangle* pShapeRect = 0,
50 ::oox::drawingml::ShapeIdMap* pShapeMap = 0 );
52 virtual void applyShapeReference( const oox::drawingml::Shape& rReferencedShape, bool bUseText = true ) SAL_OVERRIDE;
54 void setShapeLocation( const oox::ppt::ShapeLocation eShapeLocation ) { meShapeLocation = eShapeLocation; };
55 ShapeLocation getShapeLocation() const { return meShapeLocation; };
56 bool isReferenced() const { return mbReferenced; };
57 void setReferenced( bool bReferenced ){ mbReferenced = bReferenced; };
58 void setPlaceholder( oox::drawingml::ShapePtr pPlaceholder ) { mpPlaceholder = pPlaceholder; }
59 void setModelId( const OUString& rId ) { msModelId = rId; }
61 static oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 nFirstSubType,
62 const sal_Int32 nSecondSubType, const OptValue< sal_Int32 >& oSubTypeIndex,
63 std::vector< oox::drawingml::ShapePtr >& rShapes, bool bMasterOnly = false );
64 static oox::drawingml::ShapePtr findPlaceholderByIndex( const sal_Int32 nIdx,
65 std::vector< oox::drawingml::ShapePtr >& rShapes, bool bMasterOnly = false );
67 static oox::drawingml::TextListStylePtr getSubTypeTextListStyle( const SlidePersist& rSlidePersist, sal_Int32 nSubType );
69 protected:
71 oox::drawingml::ShapePtr mpPlaceholder;
74 } }
76 #endif // INCLUDED_OOX_PPT_PPTSHAPE_HXX
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */