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

Generated by: LCOV version 1.10