LCOV - code coverage report
Current view: top level - include/xmloff - XMLPageExport.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 4 4 100.0 %
Date: 2015-06-13 12:38:46 Functions: 6 6 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_XMLPAGEEXPORT_HXX
      21             : #define INCLUDED_XMLOFF_XMLPAGEEXPORT_HXX
      22             : 
      23             : #include <sal/config.h>
      24             : #include <xmloff/dllapi.h>
      25             : #include <sal/types.h>
      26             : #include <rtl/ustring.hxx>
      27             : #include <vector>
      28             : #include <xmloff/attrlist.hxx>
      29             : #include <rtl/ref.hxx>
      30             : #include <salhelper/simplereferenceobject.hxx>
      31             : #include <com/sun/star/container/XIndexAccess.hpp>
      32             : 
      33             : namespace com { namespace sun { namespace star {
      34             :     namespace style { class XStyle; }
      35             :     namespace container { class XIndexReplace; class XNameAccess;}
      36             :     namespace beans { class XPropertySet; }
      37             : } } }
      38             : 
      39             : class SvXMLExport;
      40             : class XMLPropertyHandlerFactory;
      41             : class XMLPropertySetMapper;
      42             : class SvXMLExportPropertyMapper;
      43             : 
      44             : 
      45             : 
      46         704 : struct XMLPageExportNameEntry
      47             : {
      48             :     OUString         sPageMasterName;
      49             :     OUString         sStyleName;
      50             : };
      51             : 
      52             : 
      53             : 
      54             : class XMLOFF_DLLPUBLIC XMLPageExport : public salhelper::SimpleReferenceObject
      55             : {
      56             :     SvXMLExport& rExport;
      57             : 
      58             :     const OUString sIsPhysical;
      59             :     const OUString sFollowStyle;
      60             : 
      61             :     ::com::sun::star::uno::Reference<
      62             :         ::com::sun::star::container::XNameAccess > xPageStyles;
      63             : 
      64             :     ::std::vector< XMLPageExportNameEntry > aNameVector;
      65             :     SAL_DLLPRIVATE bool findPageMasterName( const OUString& rStyleName, OUString& rPMName ) const;
      66             : 
      67             :     rtl::Reference < XMLPropertyHandlerFactory > xPageMasterPropHdlFactory;
      68             :     rtl::Reference < XMLPropertySetMapper > xPageMasterPropSetMapper;
      69             :     rtl::Reference < SvXMLExportPropertyMapper > xPageMasterExportPropMapper;
      70             : 
      71             : protected:
      72             : 
      73        2718 :     SvXMLExport& GetExport() { return rExport; }
      74             : 
      75             :     void collectPageMasterAutoStyle(
      76             :                 const ::com::sun::star::uno::Reference <
      77             :                     ::com::sun::star::beans::XPropertySet > & rPropSet,
      78             :                 OUString& rPageMasterName );
      79             : 
      80             :     virtual void exportMasterPageContent(
      81             :                 const ::com::sun::star::uno::Reference <
      82             :                     ::com::sun::star::beans::XPropertySet > & rPropSet,
      83             :                  bool bAutoStyles );
      84             : 
      85             :     bool exportStyle(
      86             :                 const ::com::sun::star::uno::Reference<
      87             :                     ::com::sun::star::style::XStyle >& rStyle,
      88             :                 bool bAutoStyles );
      89             : 
      90             :     void exportStyles( bool bUsed, bool bAutoStyles );
      91             : 
      92             : public:
      93             :     XMLPageExport( SvXMLExport& rExp );
      94             :     virtual ~XMLPageExport();
      95             : 
      96         102 :     void    collectAutoStyles( bool bUsed )     { exportStyles( bUsed, true ); }
      97             :     void    exportAutoStyles();
      98         102 :     void    exportMasterStyles( bool bUsed )    { exportStyles( bUsed, false ); }
      99             : 
     100             :     //text grid enhancement for better CJK support
     101             :     void exportDefaultStyle();
     102             : };
     103             : 
     104             : #endif // INCLUDED_XMLOFF_XMLPAGEEXPORT_HXX
     105             : 
     106             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11