LCOV - code coverage report
Current view: top level - libreoffice/xmlscript/source/xmlmod_imexp - imp_share.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 2 0.0 %
Date: 2012-12-27 Functions: 0 1 0.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             : #include <xmlscript/xmlmod_imexp.hxx>
      21             : 
      22             : #include <cppuhelper/implbase1.hxx>
      23             : #include <rtl/ustrbuf.hxx>
      24             : 
      25             : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
      26             : #include <com/sun/star/container/XNameContainer.hpp>
      27             : #include <com/sun/star/beans/XPropertySet.hpp>
      28             : 
      29             : #include <com/sun/star/awt/XControlModel.hpp>
      30             : #include <com/sun/star/awt/FontDescriptor.hpp>
      31             : 
      32             : #include <com/sun/star/xml/input/XRoot.hpp>
      33             : 
      34             : #include <vector>
      35             : 
      36             : using namespace ::rtl;
      37             : using namespace ::std;
      38             : using namespace ::com::sun::star;
      39             : using namespace ::com::sun::star::uno;
      40             : 
      41             : namespace xmlscript
      42             : {
      43             : 
      44             : //==================================================================================================
      45             : // Script module import
      46             : 
      47             : //==================================================================================================
      48             : struct ModuleImport
      49             :     : public ::cppu::WeakImplHelper1< xml::input::XRoot >
      50             : {
      51             :     friend class ModuleElement;
      52             : 
      53             :     ModuleDescriptor& mrModuleDesc;
      54             : 
      55             :     sal_Int32 XMLNS_SCRIPT_UID;
      56             :     sal_Int32 XMLNS_LIBRARY_UID;
      57             :     sal_Int32 XMLNS_XLINK_UID;
      58             : 
      59             : public:
      60           0 :     inline ModuleImport( ModuleDescriptor& rModuleDesc )
      61             :         SAL_THROW(())
      62           0 :         : mrModuleDesc( rModuleDesc ) {}
      63             :     virtual ~ModuleImport()
      64             :         SAL_THROW(());
      65             : 
      66             :     // XRoot
      67             :     virtual void SAL_CALL startDocument(
      68             :         Reference< xml::input::XNamespaceMapping > const & xNamespaceMapping )
      69             :         throw (xml::sax::SAXException, RuntimeException);
      70             :     virtual void SAL_CALL endDocument()
      71             :         throw (xml::sax::SAXException, RuntimeException);
      72             :     virtual void SAL_CALL processingInstruction(
      73             :         OUString const & rTarget, OUString const & rData )
      74             :         throw (xml::sax::SAXException, RuntimeException);
      75             :     virtual void SAL_CALL setDocumentLocator(
      76             :         Reference< xml::sax::XLocator > const & xLocator )
      77             :         throw (xml::sax::SAXException, RuntimeException);
      78             :     virtual Reference< xml::input::XElement > SAL_CALL startRootElement(
      79             :         sal_Int32 nUid, OUString const & rLocalName,
      80             :         Reference< xml::input::XAttributes > const & xAttributes )
      81             :         throw (xml::sax::SAXException, RuntimeException);
      82             : };
      83             : 
      84             : //==================================================================================================
      85             : class ModuleElement
      86             :     : public ::cppu::WeakImplHelper1< xml::input::XElement >
      87             : {
      88             : protected:
      89             :     ModuleImport * _pImport;
      90             :     ModuleElement * _pParent;
      91             : 
      92             :     OUString _aLocalName;
      93             :     Reference< xml::input::XAttributes > _xAttributes;
      94             :     ::rtl::OUStringBuffer _StrBuffer;
      95             : 
      96             : public:
      97             :     ModuleElement(
      98             :         OUString const & rLocalName,
      99             :         Reference< xml::input::XAttributes > const & xAttributes,
     100             :         ModuleElement * pParent, ModuleImport * pImport )
     101             :         SAL_THROW(());
     102             :     virtual ~ModuleElement()
     103             :         SAL_THROW(());
     104             : 
     105             :     // XElement
     106             :     virtual Reference< xml::input::XElement > SAL_CALL getParent()
     107             :         throw (RuntimeException);
     108             :     virtual OUString SAL_CALL getLocalName()
     109             :         throw (RuntimeException);
     110             :     virtual sal_Int32 SAL_CALL getUid()
     111             :         throw (RuntimeException);
     112             :     virtual Reference< xml::input::XAttributes > SAL_CALL getAttributes()
     113             :         throw (RuntimeException);
     114             :     virtual void SAL_CALL ignorableWhitespace(
     115             :         OUString const & rWhitespaces )
     116             :         throw (xml::sax::SAXException, RuntimeException);
     117             :     virtual void SAL_CALL characters( OUString const & rChars )
     118             :         throw (xml::sax::SAXException, RuntimeException);
     119             :     virtual void SAL_CALL processingInstruction(
     120             :         OUString const & rTarget, OUString const & rData )
     121             :         throw (xml::sax::SAXException, RuntimeException);
     122             :     virtual void SAL_CALL endElement()
     123             :         throw (xml::sax::SAXException, RuntimeException);
     124             :     virtual Reference< xml::input::XElement > SAL_CALL startChildElement(
     125             :         sal_Int32 nUid, OUString const & rLocalName,
     126             :         Reference< xml::input::XAttributes > const & xAttributes )
     127             :         throw (xml::sax::SAXException, RuntimeException);
     128             : };
     129             : 
     130             : //==================================================================================================
     131             : 
     132             : }
     133             : 
     134             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10