1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #include "oox/core/contexthandler.hxx" 25 26 #include "oox/core/fragmenthandler.hxx" 27 28 namespace oox { 29 namespace core { 30 31 // ============================================================================ 32 33 using namespace ::com::sun::star::uno; 34 using namespace ::com::sun::star::xml::sax; 35 36 using ::rtl::OUString; 37 38 // ============================================================================ 39 40 ContextHandler::ContextHandler( ContextHandler& rParent ) : 41 ContextHandler_BASE(), 42 mxBaseData( rParent.mxBaseData ) 43 { 44 } 45 46 ContextHandler::ContextHandler( const FragmentBaseDataRef& rxBaseData ) : 47 mxBaseData( rxBaseData ) 48 { 49 } 50 51 ContextHandler::~ContextHandler() 52 { 53 } 54 55 XmlFilterBase& ContextHandler::getFilter() const 56 { 57 return mxBaseData->mrFilter; 58 } 59 60 const Relations& ContextHandler::getRelations() const 61 { 62 return *mxBaseData->mxRelations; 63 } 64 65 const OUString& ContextHandler::getFragmentPath() const 66 { 67 return mxBaseData->maFragmentPath; 68 } 69 70 OUString ContextHandler::getFragmentPathFromRelation( const Relation& rRelation ) const 71 { 72 return mxBaseData->mxRelations->getFragmentPathFromRelation( rRelation ); 73 } 74 75 OUString ContextHandler::getFragmentPathFromRelId( const OUString& rRelId ) const 76 { 77 return mxBaseData->mxRelations->getFragmentPathFromRelId( rRelId ); 78 } 79 80 OUString ContextHandler::getFragmentPathFromFirstType( const OUString& rType ) const 81 { 82 return mxBaseData->mxRelations->getFragmentPathFromFirstType( rType ); 83 } 84 85 void ContextHandler::implSetLocator( const Reference< XLocator >& rxLocator ) 86 { 87 mxBaseData->mxLocator = rxLocator; 88 } 89 90 // com.sun.star.xml.sax.XFastContextHandler interface ------------------------- 91 92 void ContextHandler::startFastElement( sal_Int32, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException ) 93 { 94 } 95 96 void ContextHandler::startUnknownElement( const OUString&, const OUString&, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException ) 97 { 98 } 99 100 void ContextHandler::endFastElement( sal_Int32 ) throw( SAXException, RuntimeException ) 101 { 102 } 103 104 void ContextHandler::endUnknownElement( const OUString&, const OUString& ) throw( SAXException, RuntimeException ) 105 { 106 } 107 108 Reference< XFastContextHandler > ContextHandler::createFastChildContext( sal_Int32, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException ) 109 { 110 return 0; 111 } 112 113 Reference< XFastContextHandler > ContextHandler::createUnknownChildContext( const OUString&, const OUString&, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException ) 114 { 115 return 0; 116 } 117 118 void ContextHandler::characters( const OUString& ) throw( SAXException, RuntimeException ) 119 { 120 } 121 122 void ContextHandler::ignorableWhitespace( const OUString& ) throw( SAXException, RuntimeException ) 123 { 124 } 125 126 void ContextHandler::processingInstruction( const OUString&, const OUString& ) throw( SAXException, RuntimeException ) 127 { 128 } 129 130 // record context interface --------------------------------------------------- 131 132 ContextHandlerRef ContextHandler::createRecordContext( sal_Int32, SequenceInputStream& ) 133 { 134 return 0; 135 } 136 137 void ContextHandler::startRecord( sal_Int32, SequenceInputStream& ) 138 { 139 } 140 141 void ContextHandler::endRecord( sal_Int32 ) 142 { 143 } 144 145 // ============================================================================ 146 147 } // namespace core 148 } // namespace oox 149