1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #include "oox/core/contexthandler.hxx" 29 30 #include "oox/core/fragmenthandler.hxx" 31 32 namespace oox { 33 namespace core { 34 35 // ============================================================================ 36 37 using namespace ::com::sun::star::uno; 38 using namespace ::com::sun::star::xml::sax; 39 40 using ::rtl::OUString; 41 42 // ============================================================================ 43 44 ContextHandler::ContextHandler( ContextHandler& rParent ) : 45 ContextHandler_BASE(), 46 mxBaseData( rParent.mxBaseData ) 47 { 48 } 49 50 ContextHandler::ContextHandler( const FragmentBaseDataRef& rxBaseData ) : 51 mxBaseData( rxBaseData ) 52 { 53 } 54 55 ContextHandler::~ContextHandler() 56 { 57 } 58 59 XmlFilterBase& ContextHandler::getFilter() const 60 { 61 return mxBaseData->mrFilter; 62 } 63 64 const Relations& ContextHandler::getRelations() const 65 { 66 return *mxBaseData->mxRelations; 67 } 68 69 const OUString& ContextHandler::getFragmentPath() const 70 { 71 return mxBaseData->maFragmentPath; 72 } 73 74 OUString ContextHandler::getFragmentPathFromRelation( const Relation& rRelation ) const 75 { 76 return mxBaseData->mxRelations->getFragmentPathFromRelation( rRelation ); 77 } 78 79 OUString ContextHandler::getFragmentPathFromRelId( const OUString& rRelId ) const 80 { 81 return mxBaseData->mxRelations->getFragmentPathFromRelId( rRelId ); 82 } 83 84 OUString ContextHandler::getFragmentPathFromFirstType( const OUString& rType ) const 85 { 86 return mxBaseData->mxRelations->getFragmentPathFromFirstType( rType ); 87 } 88 89 void ContextHandler::implSetLocator( const Reference< XLocator >& rxLocator ) 90 { 91 mxBaseData->mxLocator = rxLocator; 92 } 93 94 // com.sun.star.xml.sax.XFastContextHandler interface ------------------------- 95 96 void ContextHandler::startFastElement( sal_Int32, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException ) 97 { 98 } 99 100 void ContextHandler::startUnknownElement( const OUString&, const OUString&, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException ) 101 { 102 } 103 104 void ContextHandler::endFastElement( sal_Int32 ) throw( SAXException, RuntimeException ) 105 { 106 } 107 108 void ContextHandler::endUnknownElement( const OUString&, const OUString& ) throw( SAXException, RuntimeException ) 109 { 110 } 111 112 Reference< XFastContextHandler > ContextHandler::createFastChildContext( sal_Int32, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException ) 113 { 114 return 0; 115 } 116 117 Reference< XFastContextHandler > ContextHandler::createUnknownChildContext( const OUString&, const OUString&, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException ) 118 { 119 return 0; 120 } 121 122 void ContextHandler::characters( const OUString& ) throw( SAXException, RuntimeException ) 123 { 124 } 125 126 void ContextHandler::ignorableWhitespace( const OUString& ) throw( SAXException, RuntimeException ) 127 { 128 } 129 130 void ContextHandler::processingInstruction( const OUString&, const OUString& ) throw( SAXException, RuntimeException ) 131 { 132 } 133 134 // record context interface --------------------------------------------------- 135 136 ContextHandlerRef ContextHandler::createRecordContext( sal_Int32, SequenceInputStream& ) 137 { 138 return 0; 139 } 140 141 void ContextHandler::startRecord( sal_Int32, SequenceInputStream& ) 142 { 143 } 144 145 void ContextHandler::endRecord( sal_Int32 ) 146 { 147 } 148 149 // ============================================================================ 150 151 } // namespace core 152 } // namespace oox 153