Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
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/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
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 .
18 : : */
19 : :
20 : : #ifndef OOX_PPT_PRESENTATION_PPTSHAPE_HXX
21 : : #define OOX_PPT_PRESENTATION_PPTSHAPE_HXX
22 : :
23 : : #include "oox/drawingml/shape.hxx"
24 : : #include "oox/ppt/slidepersist.hxx"
25 : :
26 : : namespace oox { namespace ppt {
27 : :
28 : : class PPTShape : public oox::drawingml::Shape
29 : : {
30 : : ShapeLocation meShapeLocation; // placeholdershapes (mnSubType != 0) on Master are never displayed
31 : : sal_Bool mbReferenced; // placeholdershapes on Layout are displayed only, if they are not referenced
32 : : // placeholdershapes on Slide are displayed always
33 : :
34 : : public:
35 : :
36 : : PPTShape( const oox::ppt::ShapeLocation eShapeLocation,
37 : : const sal_Char* pServiceType = NULL );
38 : : virtual ~PPTShape();
39 : :
40 : : using oox::drawingml::Shape::addShape;
41 : : // addShape is creating and inserting the corresponding XShape.
42 : : void addShape(
43 : : oox::core::XmlFilterBase& rFilterBase,
44 : : SlidePersist& rPersist,
45 : : const oox::drawingml::Theme* pTheme,
46 : : const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes,
47 : : basegfx::B2DHomMatrix& aTransformation,
48 : : const com::sun::star::awt::Rectangle* pShapeRect = 0,
49 : : ::oox::drawingml::ShapeIdMap* pShapeMap = 0 );
50 : :
51 : : virtual void applyShapeReference( const oox::drawingml::Shape& rReferencedShape, bool bUseText = true );
52 : :
53 : : void setShapeLocation( const oox::ppt::ShapeLocation eShapeLocation ) { meShapeLocation = eShapeLocation; };
54 : 156 : ShapeLocation getShapeLocation() const { return meShapeLocation; };
55 : : sal_Bool isReferenced() const { return mbReferenced; };
56 : 42 : void setReferenced( sal_Bool bReferenced ){ mbReferenced = bReferenced; };
57 : 42 : void setPlaceholder( oox::drawingml::ShapePtr pPlaceholder ) { mpPlaceholder = pPlaceholder; }
58 : :
59 : : static oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 nMasterPlaceholder, std::vector< oox::drawingml::ShapePtr >& rShapes, bool bMasterOnly = false );
60 : : static oox::drawingml::ShapePtr findPlaceholderByIndex( const sal_Int32 nIdx, std::vector< oox::drawingml::ShapePtr >& rShapes, bool bMasterOnly = false );
61 : :
62 : : static oox::drawingml::TextListStylePtr getSubTypeTextListStyle( const SlidePersist& rSlidePersist, sal_Int32 nSubType );
63 : :
64 : : protected:
65 : :
66 : : oox::drawingml::ShapePtr mpPlaceholder;
67 : : };
68 : :
69 : : } }
70 : :
71 : : #endif // OOX_PPT_PRESENTATION_PPTSHAPE_HXX
72 : :
73 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|