LCOV - code coverage report
Current view: top level - xmloff/source/draw - ximppage.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 3 3 100.0 %
Date: 2015-06-13 12:38:46 Functions: 2 2 100.0 %
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_XMLOFF_SOURCE_DRAW_XIMPPAGE_HXX
      21             : #define INCLUDED_XMLOFF_SOURCE_DRAW_XIMPPAGE_HXX
      22             : 
      23             : #include <xmloff/xmlictxt.hxx>
      24             : #include "sdxmlimp_impl.hxx"
      25             : #include <xmloff/nmspmap.hxx>
      26             : #include <com/sun/star/drawing/XShapes.hpp>
      27             : #include <com/sun/star/office/XAnnotationAccess.hpp>
      28             : #include <tools/rtti.hxx>
      29             : #include "ximpshap.hxx"
      30             : 
      31             : // draw:g context (RECURSIVE)
      32             : 
      33             : class SdXMLGenericPageContext : public SvXMLImportContext
      34             : {
      35             :     // the shape group this group is working on
      36             :     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > mxShapes;
      37             :     ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotationAccess > mxAnnotationAccess;
      38             : 
      39             : protected:
      40             :     OUString               maPageLayoutName;
      41             :     OUString               maUseHeaderDeclName;
      42             :     OUString               maUseFooterDeclName;
      43             :     OUString               maUseDateTimeDeclName;
      44             :     OUString               msNavOrder;
      45             : 
      46             :     void SetLocalShapesContext(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rNew)
      47             :         { mxShapes = rNew; }
      48             : 
      49             :     /** sets the page style on this page */
      50             :     void SetStyle( OUString& rStyleName );
      51             : 
      52             :     /** sets the presentation layout at this page. It is used for drawing pages and for the handout master */
      53             :     void SetLayout();
      54             : 
      55             :     /** deletes all shapes on this drawing page */
      56             :     void DeleteAllShapes();
      57             : 
      58             :     const SdXMLImport& GetSdImport() const { return static_cast<const SdXMLImport&>(GetImport()); }
      59        6383 :     SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
      60             : 
      61             :     /** sets the properties from a page master style with the given name on this contexts page */
      62             :     void SetPageMaster( OUString& rsPageMasterName );
      63             : 
      64             :     void SetNavigationOrder();
      65             : 
      66             : public:
      67             :     TYPEINFO_OVERRIDE();
      68             : 
      69             :     SdXMLGenericPageContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName,
      70             :         const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
      71             :         com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
      72             :     virtual ~SdXMLGenericPageContext();
      73             : 
      74             :     virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
      75             :     virtual SvXMLImportContext *CreateChildContext(
      76             :         sal_uInt16 nPrefix, const OUString& rLocalName,
      77             :         const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
      78             :     virtual void EndElement() SAL_OVERRIDE;
      79             : 
      80             :     const com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& GetLocalShapesContext() const
      81             :         { return mxShapes; }
      82         881 :     com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& GetLocalShapesContext()
      83         881 :         { return mxShapes; }
      84             : };
      85             : 
      86             : #endif // INCLUDED_XMLOFF_SOURCE_DRAW_XIMPPAGE_HXX
      87             : 
      88             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11