LCOV - code coverage report
Current view: top level - include/oox/ppt - slidepersist.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 29 31 93.5 %
Date: 2015-06-13 12:38:46 Functions: 29 31 93.5 %
Legend: Lines: hit not hit

          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 INCLUDED_OOX_PPT_SLIDEPERSIST_HXX
      21             : #define INCLUDED_OOX_PPT_SLIDEPERSIST_HXX
      22             : 
      23             : #include <memory>
      24             : #include <oox/drawingml/shape.hxx>
      25             : #include <oox/drawingml/theme.hxx>
      26             : #include <oox/drawingml/clrscheme.hxx>
      27             : #include <oox/ppt/headerfooter.hxx>
      28             : #include <com/sun/star/frame/XModel.hpp>
      29             : #include <com/sun/star/drawing/XDrawPage.hpp>
      30             : #include <com/sun/star/animations/XAnimationNode.hpp>
      31             : #include <oox/core/fragmenthandler.hxx>
      32             : #include <oox/ppt/comments.hxx>
      33             : 
      34             : #include <list>
      35             : 
      36             : namespace oox { namespace vml { class Drawing; } }
      37             : 
      38             : namespace oox { namespace ppt {
      39             : 
      40             : enum ShapeLocation
      41             : {
      42             :     Master,
      43             :     Layout,
      44             :     Slide
      45             : };
      46             : 
      47             : 
      48             : class TimeNode;
      49             : class SlidePersist;
      50             : 
      51             : typedef std::shared_ptr< SlidePersist > SlidePersistPtr;
      52             : 
      53             : class SlidePersist : public std::enable_shared_from_this< SlidePersist >
      54             : {
      55             : 
      56             : public:
      57             :     SlidePersist( oox::core::XmlFilterBase& rFilter, bool bMaster, bool bNotes,
      58             :                     const com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage >&,
      59             :                     oox::drawingml::ShapePtr pShapesPtr, const ::oox::drawingml::TextListStylePtr & );
      60             :     ~SlidePersist();
      61             : 
      62        1772 :     com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage >    getPage() const { return mxPage; };
      63             : 
      64             : #if OSL_DEBUG_LEVEL > 0
      65             :     static com::sun::star::uno::WeakReference< com::sun::star::drawing::XDrawPage > mxDebugPage;
      66             : #endif
      67             : 
      68         105 :     void setMasterPersist( SlidePersistPtr pMasterPersistPtr ){ mpMasterPagePtr = pMasterPersistPtr; }
      69        3904 :     SlidePersistPtr getMasterPersist() const { return mpMasterPagePtr; }
      70             : 
      71         204 :     void setPath( const OUString& rPath ) { maPath = rPath; }
      72          23 :     const OUString getPath() const { return maPath; }
      73             : 
      74          88 :     void setLayoutPath( const OUString& rLayoutPath ) { maLayoutPath = rLayoutPath; }
      75          11 :     const OUString getLayoutPath() const { return maLayoutPath; }
      76             : 
      77         182 :     void setTheme( const oox::drawingml::ThemePtr& rThemePtr ){ mpThemePtr = rThemePtr; }
      78       22254 :     oox::drawingml::ThemePtr getTheme() const { return mpThemePtr; }
      79             : 
      80             :     void setClrScheme( const oox::drawingml::ClrSchemePtr& rClrSchemePtr ){ mpClrSchemePtr = rClrSchemePtr; }
      81        4275 :     oox::drawingml::ClrSchemePtr getClrScheme() const { return mpClrSchemePtr; }
      82             : 
      83         103 :     void setClrMap( const oox::drawingml::ClrMapPtr pClrMapPtr ){ mpClrMapPtr = pClrMapPtr; }
      84        6517 :     oox::drawingml::ClrMapPtr getClrMap() const { return mpClrMapPtr; }
      85             : 
      86          88 :     void setBackgroundProperties( const oox::drawingml::FillPropertiesPtr& rFillPropertiesPtr ){ mpBackgroundPropertiesPtr = rFillPropertiesPtr; }
      87             :     oox::drawingml::FillPropertiesPtr getBackgroundProperties() const { return mpBackgroundPropertiesPtr; }
      88          49 :     oox::drawingml::Color& getBackgroundColor() { return maBackgroundColor; }
      89             : 
      90         906 :     bool isMasterPage() const { return mbMaster; }
      91         467 :     bool isNotesPage() const { return mbNotes; }
      92             : 
      93          88 :     void setLayoutValueToken( sal_Int32 nLayoutValueToken ) { mnLayoutValueToken = nLayoutValueToken; }
      94             :     short getLayoutFromValueToken();
      95             : 
      96             : 
      97         407 :     oox::drawingml::TextListStylePtr getDefaultTextStyle() const { return maDefaultTextStylePtr; }
      98         144 :     oox::drawingml::TextListStylePtr getTitleTextStyle() const { return maTitleTextStylePtr; }
      99         173 :     oox::drawingml::TextListStylePtr getBodyTextStyle() const { return maBodyTextStylePtr; }
     100          20 :     oox::drawingml::TextListStylePtr getNotesTextStyle() const { return maNotesTextStylePtr; }
     101         540 :     oox::drawingml::TextListStylePtr getOtherTextStyle() const { return maOtherTextStylePtr; }
     102             : 
     103         983 :     oox::drawingml::ShapePtr getShapes() { return maShapesPtr; }
     104             :     void hideShapesAsMasterShapes();
     105          35 :     ::std::list< std::shared_ptr< TimeNode > >& getTimeNodeList() { return maTimeNodeList; }
     106         200 :     oox::ppt::HeaderFooter& getHeaderFooter(){ return maHeaderFooter; };
     107             : 
     108         297 :     oox::vml::Drawing* getDrawing() { return mpDrawingPtr.get(); }
     109             : 
     110             :     void createXShapes( oox::core::XmlFilterBase& rFilterBase );
     111             :     void createBackground( const oox::core::XmlFilterBase& rFilterBase );
     112             :     void applyTextStyles( const oox::core::XmlFilterBase& rFilterBase );
     113             : 
     114          83 :     std::map< OUString, ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode > >& getAnimNodesMap() { return maAnimNodesMap; };
     115          17 :     ::oox::drawingml::ShapePtr getShape( const OUString & id ) { return maShapeMap[ id ]; }
     116        1095 :     ::oox::drawingml::ShapeIdMap& getShapeMap() { return maShapeMap; }
     117             : 
     118           0 :     CommentList& getCommentsList() { return maCommentsList; }
     119           0 :     CommentAuthorList& getCommentAuthors() { return maCommentAuthors; }
     120             : 
     121             : private:
     122             :     OUString                                                           maPath;
     123             :     OUString                                                           maLayoutPath;
     124             :     std::shared_ptr< oox::vml::Drawing >                                mpDrawingPtr;
     125             :     com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage >    mxPage;
     126             :     oox::drawingml::ThemePtr                                                mpThemePtr;         // the theme that is used
     127             :     oox::drawingml::ClrSchemePtr                                            mpClrSchemePtr;     // the local color scheme (if any)
     128             :     oox::drawingml::ClrMapPtr                                               mpClrMapPtr;        // color mapping (if any)
     129             :     SlidePersistPtr                                                         mpMasterPagePtr;
     130             : 
     131             :     oox::drawingml::ShapePtr                                                maShapesPtr;
     132             :     oox::drawingml::Color                                                   maBackgroundColor;
     133             :     oox::drawingml::FillPropertiesPtr                                       mpBackgroundPropertiesPtr;
     134             :     ::std::list< std::shared_ptr< TimeNode > >                            maTimeNodeList;
     135             : 
     136             :     oox::ppt::HeaderFooter                                                  maHeaderFooter;
     137             :     sal_Int32                                                               mnLayoutValueToken;
     138             :     bool                                                                    mbMaster;
     139             :     bool                                                                    mbNotes;
     140             : 
     141             :     oox::drawingml::TextListStylePtr                                        maDefaultTextStylePtr;
     142             :     oox::drawingml::TextListStylePtr                                        maTitleTextStylePtr;
     143             :     oox::drawingml::TextListStylePtr                                        maBodyTextStylePtr;
     144             :     oox::drawingml::TextListStylePtr                                        maNotesTextStylePtr;
     145             :     oox::drawingml::TextListStylePtr                                        maOtherTextStylePtr;
     146             : 
     147             :     std::map< OUString, ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode > > maAnimNodesMap;
     148             :     std::map< OUString, ::oox::drawingml::ShapePtr > maShapeMap;
     149             : 
     150             :     // slide comments
     151             :     CommentList                                                             maCommentsList;
     152             :     CommentAuthorList                                                       maCommentAuthors;
     153             : };
     154             : 
     155             : } }
     156             : 
     157             : #endif // INCLUDED_OOX_PPT_SLIDEPERSIST_HXX
     158             : 
     159             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11