LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/xmloff/inc - xmlversion.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 6 16.7 %
Date: 2013-07-09 Functions: 3 9 33.3 %
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             : #ifndef _XMLOFF_XMLVERSION_HXX
      20             : #define _XMLOFF_XMLVERSION_HXX
      21             : 
      22             : #include <com/sun/star/uno/Sequence.hxx>
      23             : #include <com/sun/star/document/XDocumentRevisionListPersistence.hpp>
      24             : #include <com/sun/star/util/RevisionTag.hpp>
      25             : #include <com/sun/star/embed/XStorage.hpp>
      26             : 
      27             : #include <cppuhelper/implbase1.hxx>
      28             : #include <xmloff/xmlictxt.hxx>
      29             : #include <xmloff/xmlexp.hxx>
      30             : #include <xmloff/xmlimp.hxx>
      31             : #include <xmloff/nmspmap.hxx>
      32             : #include <xmloff/xmlnmspe.hxx>
      33             : #include <xmloff/xmltoken.hxx>
      34             : 
      35             : // ------------------------------------------------------------------------
      36             : class XMLVersionListExport : public SvXMLExport
      37             : {
      38             : private:
      39             :     const com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& maVersions;
      40             : public:
      41             :     XMLVersionListExport(
      42             :         const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
      43             :         const com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& rVersions,
      44             :         const OUString &rFileName,
      45             :         com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler > &rHandler );
      46           0 :     virtual     ~XMLVersionListExport() {}
      47             : 
      48             :     sal_uInt32  exportDoc( enum ::xmloff::token::XMLTokenEnum eClass );
      49           0 :     void        _ExportAutoStyles() {}
      50           0 :     void        _ExportMasterStyles () {}
      51           0 :     void        _ExportContent() {}
      52             : };
      53             : 
      54             : // ------------------------------------------------------------------------
      55             : class XMLVersionListImport : public SvXMLImport
      56             : {
      57             : private:
      58             :     com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& maVersions;
      59             : 
      60             : protected:
      61             : 
      62             :     // This method is called after the namespace map has been updated, but
      63             :     // before a context for the current element has been pushed.
      64             :     virtual SvXMLImportContext *CreateContext( sal_uInt16 nPrefix,
      65             :                     const OUString& rLocalName,
      66             :                     const ::com::sun::star::uno::Reference<
      67             :                     ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
      68             : 
      69             : public:
      70             : 
      71             :     XMLVersionListImport(
      72             :         const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
      73             :         com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& rVersions );
      74             :     ~XMLVersionListImport() throw();
      75             : 
      76             :     com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >&
      77           0 :         GetList() { return maVersions; }
      78             : };
      79             : 
      80             : // ------------------------------------------------------------------------
      81             : class XMLVersionListContext : public SvXMLImportContext
      82             : {
      83             : private:
      84             :     XMLVersionListImport & rLocalRef;
      85             : 
      86             : public:
      87             : 
      88             :     XMLVersionListContext( XMLVersionListImport& rImport,
      89             :                            sal_uInt16 nPrefix,
      90             :                            const OUString& rLocalName,
      91             :                            const ::com::sun::star::uno::Reference<
      92             :                            ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
      93             : 
      94             :     ~XMLVersionListContext();
      95             : 
      96             :     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
      97             :                            const OUString& rLocalName,
      98             :                            const ::com::sun::star::uno::Reference<
      99             :                            ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
     100             : 
     101             : };
     102             : 
     103             : // ------------------------------------------------------------------------
     104             : class XMLVersionContext: public SvXMLImportContext
     105             : {
     106             : private:
     107             :     XMLVersionListImport&  rLocalRef;
     108             : 
     109             :     static sal_Bool         ParseISODateTimeString(
     110             :                                 const OUString& rString,
     111             :                                 com::sun::star::util::DateTime& rDateTime );
     112             : 
     113             : public:
     114             : 
     115             :     XMLVersionContext( XMLVersionListImport& rImport,
     116             :                           sal_uInt16 nPrefix,
     117             :                           const OUString& rLocalName,
     118             :                           const ::com::sun::star::uno::Reference<
     119             :                           ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
     120             : 
     121             :     ~XMLVersionContext();
     122             : };
     123             : 
     124             : 
     125             : // ------------------------------------------------------------------------
     126        1458 : class XMLVersionListPersistence : public ::cppu::WeakImplHelper1< ::com::sun::star::document::XDocumentRevisionListPersistence >
     127             : {
     128             : public:
     129             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::util::RevisionTag > SAL_CALL load( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& Storage ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::io::IOException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
     130             :     virtual void SAL_CALL store( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& Storage, const ::com::sun::star::uno::Sequence< ::com::sun::star::util::RevisionTag >& List ) throw (::com::sun::star::io::IOException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
     131             : };
     132             : 
     133             : ::com::sun::star::uno::Sequence< OUString > SAL_CALL
     134             :     XMLVersionListPersistence_getSupportedServiceNames()
     135             :     throw();
     136             : 
     137             : OUString SAL_CALL XMLVersionPersistence_getImplementationName()
     138             :     throw();
     139             : 
     140             : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
     141             :     XMLVersionListPersistence_createInstance(
     142             :         const ::com::sun::star::uno::Reference<
     143             :             ::com::sun::star::lang::XMultiServiceFactory > & )
     144             :     throw( ::com::sun::star::uno::Exception );
     145             : 
     146             : #endif
     147             : 
     148             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10