LibreOffice Module oox (master) 1
slidepersist.hxx
Go to the documentation of this file.
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 INCLUDED_OOX_PPT_SLIDEPERSIST_HXX
21#define INCLUDED_OOX_PPT_SLIDEPERSIST_HXX
22
23#include <vector>
24#include <map>
25#include <memory>
26
28#include <com/sun/star/uno/Reference.hxx>
33#include <oox/ppt/comments.hxx>
35#include <rtl/ustring.hxx>
36#include <sal/types.h>
37
38namespace com::sun::star {
39 namespace animations { class XAnimationNode; }
40 namespace drawing { class XDrawPage; }
41}
42
43namespace oox::core { class XmlFilterBase; }
44namespace oox::vml { class Drawing; }
45
46namespace oox::ppt {
47
49{
52 Slide
53};
54
55
56class TimeNode;
57class SlidePersist;
58
59typedef std::shared_ptr< SlidePersist > SlidePersistPtr;
60
61class SlidePersist : public std::enable_shared_from_this< SlidePersist >
62{
63
64public:
65 SlidePersist( oox::core::XmlFilterBase& rFilter, bool bMaster, bool bNotes,
66 const css::uno::Reference< css::drawing::XDrawPage >&,
69
70
71 const css::uno::Reference< css::drawing::XDrawPage >& getPage() const { return mxPage; };
72
73#if OSL_DEBUG_LEVEL > 0
74 static css::uno::WeakReference< css::drawing::XDrawPage > mxDebugPage;
75#endif
76
77 void setMasterPersist( SlidePersistPtr pMasterPersistPtr ){ mpMasterPagePtr = pMasterPersistPtr; }
79
80 void setPath( const OUString& rPath ) { maPath = rPath; }
81 const OUString& getPath() const { return maPath; }
82
83 void setLayoutPath( const OUString& rLayoutPath ) { maLayoutPath = rLayoutPath; }
84 const OUString& getLayoutPath() const { return maLayoutPath; }
85
86 void setTheme( const oox::drawingml::ThemePtr& rThemePtr ){ mpThemePtr = rThemePtr; }
87 const oox::drawingml::ThemePtr& getTheme() const { return mpThemePtr; }
88
89 void setClrMap( const oox::drawingml::ClrMapPtr pClrMapPtr ){ mpClrMapPtr = pClrMapPtr; }
91
92 void setBackgroundProperties( const oox::drawingml::FillPropertiesPtr& rFillPropertiesPtr ){ mpBackgroundPropertiesPtr = rFillPropertiesPtr; }
95
96 bool isMasterPage() const { return mbMaster; }
97 bool isNotesPage() const { return mbNotes; }
98
99 void setLayoutValueToken( sal_Int32 nLayoutValueToken ) { mnLayoutValueToken = nLayoutValueToken; }
100 sal_Int16 getLayoutFromValueToken() const;
101
102
108
111 ::std::vector< std::shared_ptr< TimeNode > >& getTimeNodeList() { return maTimeNodeList; }
113
115
116 void createXShapes( oox::core::XmlFilterBase& rFilterBase );
117 void createBackground( const oox::core::XmlFilterBase& rFilterBase );
118 void applyTextStyles( const oox::core::XmlFilterBase& rFilterBase );
119
120 std::map< OUString, css::uno::Reference< css::animations::XAnimationNode > >& getAnimNodesMap() { return maAnimNodesMap; };
121 css::uno::Reference<css::animations::XAnimationNode> getAnimationNode(const OUString& sId) const;
122 ::oox::drawingml::ShapePtr getShape( const OUString & id ) { return maShapeMap[ id ]; }
124
127
129
130private:
131 OUString maPath;
132 OUString maLayoutPath;
133 std::shared_ptr< oox::vml::Drawing > mpDrawingPtr;
134 css::uno::Reference< css::drawing::XDrawPage > mxPage;
135 oox::drawingml::ThemePtr mpThemePtr; // the theme that is used
136 oox::drawingml::ClrMapPtr mpClrMapPtr; // color mapping (if any)
138
142 ::std::vector< std::shared_ptr< TimeNode > > maTimeNodeList;
143
148
154
155 std::map< OUString, css::uno::Reference< css::animations::XAnimationNode > > maAnimNodesMap;
156 std::map< OUString, ::oox::drawingml::ShapePtr > maShapeMap;
157
158 // slide comments
161
162 std::vector<OUString> maConnectorShapeId;
163};
164
165}
166
167#endif // INCLUDED_OOX_PPT_SLIDEPERSIST_HXX
168
169/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::map< OUString, css::uno::Reference< css::animations::XAnimationNode > > & getAnimNodesMap()
::oox::drawingml::ShapeIdMap & getShapeMap()
const OUString & getPath() const
oox::drawingml::TextListStylePtr maOtherTextStylePtr
CommentAuthorList & getCommentAuthors()
void setBackgroundProperties(const oox::drawingml::FillPropertiesPtr &rFillPropertiesPtr)
const oox::drawingml::TextListStylePtr & getOtherTextStyle() const
std::map< OUString, ::oox::drawingml::ShapePtr > maShapeMap
void setTheme(const oox::drawingml::ThemePtr &rThemePtr)
void createBackground(const oox::core::XmlFilterBase &rFilterBase)
const oox::drawingml::TextListStylePtr & getBodyTextStyle() const
oox::drawingml::Color & getBackgroundColor()
void setLayoutValueToken(sal_Int32 nLayoutValueToken)
oox::drawingml::TextListStylePtr maBodyTextStylePtr
oox::drawingml::TextListStylePtr maTitleTextStylePtr
::std::vector< std::shared_ptr< TimeNode > > & getTimeNodeList()
const css::uno::Reference< css::drawing::XDrawPage > & getPage() const
oox::drawingml::ShapePtr maShapesPtr
void createXShapes(oox::core::XmlFilterBase &rFilterBase)
static css::uno::WeakReference< css::drawing::XDrawPage > mxDebugPage
void setPath(const OUString &rPath)
const oox::drawingml::TextListStylePtr & getTitleTextStyle() const
CommentList & getCommentsList()
std::vector< OUString > maConnectorShapeId
oox::drawingml::ClrMapPtr mpClrMapPtr
const oox::drawingml::ThemePtr & getTheme() const
const oox::drawingml::ClrMapPtr & getClrMap() const
const oox::drawingml::TextListStylePtr & getNotesTextStyle() const
css::uno::Reference< css::drawing::XDrawPage > mxPage
oox::drawingml::TextListStylePtr maDefaultTextStylePtr
const oox::drawingml::TextListStylePtr & getDefaultTextStyle() const
css::uno::Reference< css::animations::XAnimationNode > getAnimationNode(const OUString &sId) const
oox::drawingml::TextListStylePtr maNotesTextStylePtr
void setMasterPersist(SlidePersistPtr pMasterPersistPtr)
oox::ppt::HeaderFooter maHeaderFooter
std::shared_ptr< oox::vml::Drawing > mpDrawingPtr
void applyTextStyles(const oox::core::XmlFilterBase &rFilterBase)
CommentAuthorList maCommentAuthors
void setClrMap(const oox::drawingml::ClrMapPtr pClrMapPtr)
std::map< OUString, css::uno::Reference< css::animations::XAnimationNode > > maAnimNodesMap
const OUString & getLayoutPath() const
oox::ppt::HeaderFooter & getHeaderFooter()
SlidePersistPtr mpMasterPagePtr
const SlidePersistPtr & getMasterPersist() const
SlidePersist(oox::core::XmlFilterBase &rFilter, bool bMaster, bool bNotes, const css::uno::Reference< css::drawing::XDrawPage > &, oox::drawingml::ShapePtr pShapesPtr, ::oox::drawingml::TextListStylePtr)
oox::drawingml::Color maBackgroundColor
bool isNotesPage() const
oox::vml::Drawing * getDrawing()
::std::vector< std::shared_ptr< TimeNode > > maTimeNodeList
void setLayoutPath(const OUString &rLayoutPath)
oox::drawingml::FillPropertiesPtr mpBackgroundPropertiesPtr
const oox::drawingml::FillPropertiesPtr & getBackgroundProperties() const
::oox::drawingml::ShapePtr getShape(const OUString &id)
oox::drawingml::ThemePtr mpThemePtr
const oox::drawingml::ShapePtr & getShapes() const
bool isMasterPage() const
sal_Int16 getLayoutFromValueToken() const
Represents the collection of VML shapes for a complete draw page.
Definition: vmldrawing.hxx:94
std::shared_ptr< Shape > ShapePtr
std::shared_ptr< Theme > ThemePtr
::std::map< OUString, ShapePtr > ShapeIdMap
Definition: shape.hxx:77
std::shared_ptr< ClrMap > ClrMapPtr
Definition: clrscheme.hxx:64
std::shared_ptr< FillProperties > FillPropertiesPtr
std::shared_ptr< TextListStyle > TextListStylePtr
std::shared_ptr< SlidePersist > SlidePersistPtr