LCOV - code coverage report
Current view: top level - sw/source/filter/xml - xmlexp.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 6 33.3 %
Date: 2012-08-25 Functions: 2 5 40.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef _XMLEXP_HXX
      30                 :            : #define _XMLEXP_HXX
      31                 :            : 
      32                 :            : #include <xmloff/xmlexp.hxx>
      33                 :            : #include "xmlitmap.hxx"
      34                 :            : #include <xmloff/uniref.hxx>
      35                 :            : #include <xmloff/xmltoken.hxx>
      36                 :            : #include <vector>
      37                 :            : 
      38                 :            : class SwFmt;
      39                 :            : class SwFrmFmt;
      40                 :            : class SvXMLUnitConverter;
      41                 :            : class SvXMLExportItemMapper;
      42                 :            : class SvXMLAutoStylePoolP;
      43                 :            : class SwTableLine;
      44                 :            : class SwTableLines;
      45                 :            : class SwTableBox;
      46                 :            : class SwXMLTableColumn_Impl;
      47                 :            : class SwXMLTableLines_Impl;
      48                 :            : class SwXMLTableColumnsSortByWidth_Impl;
      49                 :            : class SwXMLTableFrmFmtsSort_Impl;
      50                 :            : class SwXMLTableInfo_Impl;
      51                 :            : class SwTableNode;
      52                 :            : class XMLPropertySetMapper;
      53                 :            : class SwXMLTableLines_Impl;
      54                 :            : 
      55                 :            : typedef ::std::vector< SwXMLTableLines_Impl* > SwXMLTableLinesCache_Impl;
      56                 :            : 
      57                 :            : class SwXMLExport : public SvXMLExport
      58                 :            : {
      59                 :            :     SvXMLUnitConverter*         pTwipUnitConv;
      60                 :            :     SvXMLExportItemMapper*      pTableItemMapper;
      61                 :            :     SwXMLTableLinesCache_Impl*  pTableLines;
      62                 :            : 
      63                 :            :     SvXMLItemMapEntriesRef      xTableItemMap;
      64                 :            :     SvXMLItemMapEntriesRef      xTableRowItemMap;
      65                 :            :     SvXMLItemMapEntriesRef      xTableCellItemMap;
      66                 :            :     UniReference < XMLPropertySetMapper > xParaPropMapper;
      67                 :            : 
      68                 :            :     sal_Bool                    bExportWholeDoc : 1;// export whole document?
      69                 :            :     sal_Bool                    bBlock : 1;         // export text block?
      70                 :            :     sal_Bool                    bExportFirstTableOnly : 1;
      71                 :            :     sal_Bool                    bShowProgress : 1;
      72                 :            :     sal_Bool                    bSavedShowChanges : 1;
      73                 :            : 
      74                 :            :     void _InitItemExport();
      75                 :            :     void _FinitItemExport();
      76                 :            :     void ExportTableLinesAutoStyles( const SwTableLines& rLines,
      77                 :            :                                  sal_uInt32 nAbsWidth,
      78                 :            :                                  sal_uInt32 nBaseWidth,
      79                 :            :                                  const ::rtl::OUString& rNamePrefix,
      80                 :            :                                  SwXMLTableColumnsSortByWidth_Impl& rExpCols,
      81                 :            :                                  SwXMLTableFrmFmtsSort_Impl& rExpRows,
      82                 :            :                                  SwXMLTableFrmFmtsSort_Impl& rExpCells,
      83                 :            :                                  SwXMLTableInfo_Impl& rTblInfo,
      84                 :            :                                  sal_Bool bTop=sal_False );
      85                 :            : 
      86                 :            : 
      87                 :            :     void ExportFmt( const SwFmt& rFmt,  enum ::xmloff::token::XMLTokenEnum eClass = ::xmloff::token::XML_TOKEN_INVALID );
      88                 :            :     void ExportTableFmt( const SwFrmFmt& rFmt, sal_uInt32 nAbsWidth );
      89                 :            : 
      90                 :            :     void ExportTableColumnStyle( const SwXMLTableColumn_Impl& rCol );
      91                 :            :     void ExportTableBox( const SwTableBox& rBox, sal_uInt16 nColSpan, sal_uInt16 nRowSpan,
      92                 :            :                          SwXMLTableInfo_Impl& rTblInfo );
      93                 :            :     void ExportTableLine( const SwTableLine& rLine,
      94                 :            :                           const SwXMLTableLines_Impl& rLines,
      95                 :            :                           SwXMLTableInfo_Impl& rTblInfo );
      96                 :            :     void ExportTableLines( const SwTableLines& rLines,
      97                 :            :                            SwXMLTableInfo_Impl& rTblInfo,
      98                 :            :                            sal_uInt16 nHeaderRows = 0 );
      99                 :            : 
     100                 :            :     virtual void _ExportMeta();
     101                 :            :     virtual void _ExportFontDecls();
     102                 :            :     virtual void _ExportStyles( sal_Bool bUsed );
     103                 :            :     virtual void _ExportAutoStyles();
     104                 :            :     virtual void _ExportMasterStyles();
     105                 :            :     virtual void SetBodyAttributes();
     106                 :            :     virtual void _ExportContent();
     107                 :            :     virtual void GetViewSettings(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aProps);
     108                 :            :     virtual void GetConfigurationSettings(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aProps);
     109                 :            :     virtual sal_Int32 GetDocumentSpecificSettings( ::std::list< SettingsGroup >& _out_rSettings );
     110                 :            : 
     111                 :            :     // string constants for table cell export
     112                 :            :     const ::rtl::OUString sNumberFormat;
     113                 :            :     const ::rtl::OUString sIsProtected;
     114                 :            :     const ::rtl::OUString sCell;
     115                 :            : 
     116                 :            :     void setBlockMode();
     117                 :            : private:
     118                 :            :     void DeleteTableLines();
     119                 :            : protected:
     120                 :            : 
     121                 :            :     virtual XMLTextParagraphExport* CreateTextParagraphExport();
     122                 :            :     virtual SvXMLAutoStylePoolP* CreateAutoStylePool();
     123                 :            :     virtual XMLPageExport* CreatePageExport();
     124                 :            :     virtual XMLShapeExport* CreateShapeExport();
     125                 :            :     virtual XMLFontAutoStylePool* CreateFontAutoStylePool();
     126                 :            : 
     127                 :            : public:
     128                 :            :     SwXMLExport(
     129                 :            :         const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
     130                 :            :         sal_uInt16 nExportFlags = EXPORT_ALL);
     131                 :            : 
     132                 :            :     virtual ~SwXMLExport();
     133                 :            : 
     134                 :            :     virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass = ::xmloff::token::XML_TOKEN_INVALID );
     135                 :            : 
     136                 :            :     inline const SvXMLUnitConverter& GetTwipUnitConverter() const;
     137                 :            : 
     138                 :            :     void ExportTableAutoStyles( const SwTableNode& rTblNd );
     139                 :            :     void ExportTable( const SwTableNode& rTblNd );
     140                 :            : 
     141                 :          0 :     SvXMLExportItemMapper& GetTableItemMapper() { return *pTableItemMapper; }
     142                 :            :     const UniReference < XMLPropertySetMapper >& GetParaPropMapper()
     143                 :            :     {
     144                 :            :         return xParaPropMapper;
     145                 :            :     }
     146                 :            : 
     147                 :         40 :     sal_Bool IsShowProgress() const { return bShowProgress; }
     148                 :          0 :     void SetShowProgress( sal_Bool b ) { bShowProgress = b; }
     149                 :         19 :     sal_Bool IsBlockMode() const { return bBlock; }
     150                 :            : 
     151                 :            :     // XUnoTunnel
     152                 :            :     static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
     153                 :            :     virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
     154                 :            : 
     155                 :            :     // XServiceInfo (override parent method)
     156                 :            :     ::rtl::OUString SAL_CALL getImplementationName()
     157                 :            :         throw( ::com::sun::star::uno::RuntimeException );
     158                 :            : };
     159                 :            : 
     160                 :          0 : inline const SvXMLUnitConverter& SwXMLExport::GetTwipUnitConverter() const
     161                 :            : {
     162                 :          0 :     return *pTwipUnitConv;
     163                 :            : }
     164                 :            : 
     165                 :            : 
     166                 :            : #endif  //  _XMLEXP_HXX
     167                 :            : 
     168                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10