bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / oox / ppt / slidepersist.hxx
blob5708775c25bd1ba8db1b3274ec312bfd559c5298
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_SLIDEPERSIST_HXX
21 #define INCLUDED_OOX_PPT_SLIDEPERSIST_HXX
23 #include <vector>
24 #include <map>
25 #include <memory>
27 #include <cppuhelper/weakref.hxx>
28 #include <com/sun/star/uno/Reference.hxx>
29 #include <oox/drawingml/clrscheme.hxx>
30 #include <oox/drawingml/color.hxx>
31 #include <oox/drawingml/drawingmltypes.hxx>
32 #include <oox/drawingml/shape.hxx>
33 #include <oox/ppt/comments.hxx>
34 #include <oox/ppt/headerfooter.hxx>
35 #include <rtl/ustring.hxx>
36 #include <sal/types.h>
38 namespace com { namespace sun { namespace star {
39 namespace animations { class XAnimationNode; }
40 namespace drawing { class XDrawPage; }
41 } } }
43 namespace oox { namespace core { class XmlFilterBase; } }
44 namespace oox { namespace vml { class Drawing; } }
46 namespace oox { namespace ppt {
48 enum ShapeLocation
50 Master,
51 Layout,
52 Slide
56 class TimeNode;
57 class SlidePersist;
59 typedef std::shared_ptr< SlidePersist > SlidePersistPtr;
61 class SlidePersist : public std::enable_shared_from_this< SlidePersist >
64 public:
65 SlidePersist( oox::core::XmlFilterBase& rFilter, bool bMaster, bool bNotes,
66 const css::uno::Reference< css::drawing::XDrawPage >&,
67 oox::drawingml::ShapePtr const & pShapesPtr, const ::oox::drawingml::TextListStylePtr & );
68 ~SlidePersist();
70 const css::uno::Reference< css::drawing::XDrawPage >& getPage() const { return mxPage; };
72 #if OSL_DEBUG_LEVEL > 0
73 static css::uno::WeakReference< css::drawing::XDrawPage > mxDebugPage;
74 #endif
76 void setMasterPersist( SlidePersistPtr pMasterPersistPtr ){ mpMasterPagePtr = pMasterPersistPtr; }
77 const SlidePersistPtr& getMasterPersist() const { return mpMasterPagePtr; }
79 void setPath( const OUString& rPath ) { maPath = rPath; }
80 const OUString& getPath() const { return maPath; }
82 void setLayoutPath( const OUString& rLayoutPath ) { maLayoutPath = rLayoutPath; }
83 const OUString& getLayoutPath() const { return maLayoutPath; }
85 void setTheme( const oox::drawingml::ThemePtr& rThemePtr ){ mpThemePtr = rThemePtr; }
86 const oox::drawingml::ThemePtr& getTheme() const { return mpThemePtr; }
88 void setClrMap( const oox::drawingml::ClrMapPtr pClrMapPtr ){ mpClrMapPtr = pClrMapPtr; }
89 const oox::drawingml::ClrMapPtr& getClrMap() const { return mpClrMapPtr; }
91 void setBackgroundProperties( const oox::drawingml::FillPropertiesPtr& rFillPropertiesPtr ){ mpBackgroundPropertiesPtr = rFillPropertiesPtr; }
92 const oox::drawingml::FillPropertiesPtr& getBackgroundProperties() const { return mpBackgroundPropertiesPtr; }
93 oox::drawingml::Color& getBackgroundColor() { return maBackgroundColor; }
95 bool isMasterPage() const { return mbMaster; }
96 bool isNotesPage() const { return mbNotes; }
98 void setLayoutValueToken( sal_Int32 nLayoutValueToken ) { mnLayoutValueToken = nLayoutValueToken; }
99 sal_Int16 getLayoutFromValueToken();
102 const oox::drawingml::TextListStylePtr& getDefaultTextStyle() const { return maDefaultTextStylePtr; }
103 const oox::drawingml::TextListStylePtr& getTitleTextStyle() const { return maTitleTextStylePtr; }
104 const oox::drawingml::TextListStylePtr& getBodyTextStyle() const { return maBodyTextStylePtr; }
105 const oox::drawingml::TextListStylePtr& getNotesTextStyle() const { return maNotesTextStylePtr; }
106 const oox::drawingml::TextListStylePtr& getOtherTextStyle() const { return maOtherTextStylePtr; }
108 const oox::drawingml::ShapePtr& getShapes() { return maShapesPtr; }
109 void hideShapesAsMasterShapes();
110 ::std::vector< std::shared_ptr< TimeNode > >& getTimeNodeList() { return maTimeNodeList; }
111 oox::ppt::HeaderFooter& getHeaderFooter(){ return maHeaderFooter; };
113 oox::vml::Drawing* getDrawing() { return mpDrawingPtr.get(); }
115 void createXShapes( oox::core::XmlFilterBase& rFilterBase );
116 void createBackground( const oox::core::XmlFilterBase& rFilterBase );
117 void applyTextStyles( const oox::core::XmlFilterBase& rFilterBase );
119 std::map< OUString, css::uno::Reference< css::animations::XAnimationNode > >& getAnimNodesMap() { return maAnimNodesMap; };
120 css::uno::Reference<css::animations::XAnimationNode> getAnimationNode(const OUString& sId) const;
121 ::oox::drawingml::ShapePtr getShape( const OUString & id ) { return maShapeMap[ id ]; }
122 ::oox::drawingml::ShapeIdMap& getShapeMap() { return maShapeMap; }
124 CommentList& getCommentsList() { return maCommentsList; }
125 CommentAuthorList& getCommentAuthors() { return maCommentAuthors; }
127 private:
128 OUString maPath;
129 OUString maLayoutPath;
130 std::shared_ptr< oox::vml::Drawing > mpDrawingPtr;
131 css::uno::Reference< css::drawing::XDrawPage > mxPage;
132 oox::drawingml::ThemePtr mpThemePtr; // the theme that is used
133 oox::drawingml::ClrMapPtr mpClrMapPtr; // color mapping (if any)
134 SlidePersistPtr mpMasterPagePtr;
136 oox::drawingml::ShapePtr maShapesPtr;
137 oox::drawingml::Color maBackgroundColor;
138 oox::drawingml::FillPropertiesPtr mpBackgroundPropertiesPtr;
139 ::std::vector< std::shared_ptr< TimeNode > > maTimeNodeList;
141 oox::ppt::HeaderFooter maHeaderFooter;
142 sal_Int32 mnLayoutValueToken;
143 bool const mbMaster;
144 bool const mbNotes;
146 oox::drawingml::TextListStylePtr const maDefaultTextStylePtr;
147 oox::drawingml::TextListStylePtr const maTitleTextStylePtr;
148 oox::drawingml::TextListStylePtr const maBodyTextStylePtr;
149 oox::drawingml::TextListStylePtr const maNotesTextStylePtr;
150 oox::drawingml::TextListStylePtr const maOtherTextStylePtr;
152 std::map< OUString, css::uno::Reference< css::animations::XAnimationNode > > maAnimNodesMap;
153 std::map< OUString, ::oox::drawingml::ShapePtr > maShapeMap;
155 // slide comments
156 CommentList maCommentsList;
157 CommentAuthorList maCommentAuthors;
162 #endif // INCLUDED_OOX_PPT_SLIDEPERSIST_HXX
164 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */