LCOV - code coverage report
Current view: top level - xmloff/inc - RDFaImportHelper.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 1 1 100.0 %
Date: 2014-04-11 Functions: 1 1 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_INC_RDFAIMPORTHELPER_HXX
      21             : #define INCLUDED_XMLOFF_INC_RDFAIMPORTHELPER_HXX
      22             : 
      23             : #include <vector>
      24             : 
      25             : #include <boost/shared_ptr.hpp>
      26             : 
      27             : #include <com/sun/star/uno/Reference.h>
      28             : #include <rtl/ustring.hxx>
      29             : 
      30             : namespace com { namespace sun { namespace star {
      31             :     namespace uno { class XComponentContext; }
      32             :     namespace rdf { class XMetadatable; }
      33             :     namespace rdf { class XRepositorySupplier; }
      34             : } } }
      35             : 
      36             : class SvXMLImport;
      37             : 
      38             : namespace xmloff {
      39             : 
      40             : struct RDFaEntry;
      41             : struct ParsedRDFaAttributes;
      42             : 
      43             : class RDFaImportHelper
      44             : {
      45             : 
      46             : private:
      47             :     const SvXMLImport & m_rImport;
      48             : 
      49             :     typedef ::std::vector< RDFaEntry > RDFaEntries_t;
      50             : 
      51             :     RDFaEntries_t m_RDFaEntries;
      52             : 
      53          44 :     const SvXMLImport & GetImport() const { return m_rImport; }
      54             : 
      55             : 
      56             : public:
      57             :     RDFaImportHelper(const SvXMLImport & i_rImport);
      58             : 
      59             :     ~RDFaImportHelper();
      60             : 
      61             :     /** Parse RDFa attributes */
      62             :     ::boost::shared_ptr<ParsedRDFaAttributes> ParseRDFa(
      63             :         OUString const & i_rAbout,
      64             :         OUString const & i_rProperty,
      65             :         OUString const & i_rContent,
      66             :         OUString const & i_rDatatype);
      67             : 
      68             :     /** Add a RDFa statement; must have been parsed with ParseRDFa */
      69             :     void AddRDFa(
      70             :         ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XMetadatable>
      71             :             const & i_xObject,
      72             :         ::boost::shared_ptr<ParsedRDFaAttributes> & i_pRDFaAttributes);
      73             : 
      74             :     /** Parse and add a RDFa statement; parameters are XML attribute values */
      75             :     void ParseAndAddRDFa(
      76             :         ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XMetadatable>
      77             :             const & i_xObject,
      78             :         OUString const & i_rAbout,
      79             :         OUString const & i_rProperty,
      80             :         OUString const & i_rContent,
      81             :         OUString const & i_rDatatype);
      82             : 
      83             :     /** Insert all added statements into the RDF repository.
      84             :         <p> This is done <em>after</em> the input file has been read,
      85             :         to prevent collision between generated ids and ids in the file.</p>
      86             :      */
      87             :     void InsertRDFa( ::com::sun::star::uno::Reference<
      88             :         ::com::sun::star::rdf::XRepositorySupplier > const & i_xModel);
      89             : };
      90             : 
      91             : } // namespace xmloff
      92             : 
      93             : #endif // INCLUDED_XMLOFF_INC_RDFAIMPORTHELPER_HXX
      94             : 
      95             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10