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 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_comphelper.hxx"
30 
31 #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
32 #include <com/sun/star/beans/StringPair.hpp>
33 #endif
34 #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP
35 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
36 #endif
37 #ifndef _COM_SUN_STAR_IO_XACTIVEDATASOURCE_HPP
38 #include <com/sun/star/io/XActiveDataSource.hpp>
39 #endif
40 #ifndef _COM_SUN_STAR_XML_SAX_XPARSER_HPP
41 #include <com/sun/star/xml/sax/XParser.hpp>
42 #endif
43 #ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP
44 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
45 #endif
46 #ifndef _COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HPP
47 #include <com/sun/star/lang/IllegalArgumentException.hpp>
48 #endif
49 
50 #include <comphelper/ofopxmlhelper.hxx>
51 #include <comphelper/attributelist.hxx>
52 
53 #define RELATIONINFO_FORMAT	0
54 #define CONTENTTYPE_FORMAT	1
55 #define FORMAT_MAX_ID CONTENTTYPE_FORMAT
56 
57 using namespace ::com::sun::star;
58 
59 namespace comphelper {
60 
61 // -----------------------------------
62 uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadRelationsInfoSequence( const uno::Reference< io::XInputStream >& xInStream, const ::rtl::OUString aStreamName, const uno::Reference< lang::XMultiServiceFactory > xFactory )
63 	throw( uno::Exception )
64 {
65 	::rtl::OUString aStringID = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels/" ) );
66 	aStringID += aStreamName;
67 	return ReadSequence_Impl( xInStream, aStringID, RELATIONINFO_FORMAT, xFactory );
68 }
69 
70 // -----------------------------------
71 uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadContentTypeSequence( const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< lang::XMultiServiceFactory > xFactory )
72 	throw( uno::Exception )
73 {
74 	::rtl::OUString aStringID = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "[Content_Types].xml" ) );
75 	return ReadSequence_Impl( xInStream, aStringID, CONTENTTYPE_FORMAT, xFactory );
76 }
77 
78 // -----------------------------------
79 void SAL_CALL OFOPXMLHelper::WriteRelationsInfoSequence( const uno::Reference< io::XOutputStream >& xOutStream, const uno::Sequence< uno::Sequence< beans::StringPair > >& aSequence, const uno::Reference< lang::XMultiServiceFactory > xFactory )
80 	throw( uno::Exception )
81 {
82 	if ( !xOutStream.is() )
83 		throw uno::RuntimeException();
84 
85 	uno::Reference< io::XActiveDataSource > xWriterSource(
86 		xFactory->createInstance(
87 			::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" ) ) ),
88 		uno::UNO_QUERY_THROW );
89 	uno::Reference< xml::sax::XDocumentHandler > xWriterHandler( xWriterSource, uno::UNO_QUERY_THROW );
90 
91 	xWriterSource->setOutputStream( xOutStream );
92 
93 	::rtl::OUString aRelListElement( RTL_CONSTASCII_USTRINGPARAM( "Relationships" ) );
94 	::rtl::OUString aRelElement( RTL_CONSTASCII_USTRINGPARAM( "Relationship" ) );
95 	::rtl::OUString aIDAttr( RTL_CONSTASCII_USTRINGPARAM( "Id" ) );
96 	::rtl::OUString aTypeAttr( RTL_CONSTASCII_USTRINGPARAM( "Type" ) );
97 	::rtl::OUString aTargetModeAttr( RTL_CONSTASCII_USTRINGPARAM( "TargetMode" ) );
98 	::rtl::OUString aTargetAttr( RTL_CONSTASCII_USTRINGPARAM( "Target" ) );
99 	::rtl::OUString aCDATAString( RTL_CONSTASCII_USTRINGPARAM ( "CDATA" ) );
100 	::rtl::OUString aWhiteSpace( RTL_CONSTASCII_USTRINGPARAM ( " " ) );
101 
102 	// write the namespace
103 	AttributeList* pRootAttrList = new AttributeList;
104 	uno::Reference< xml::sax::XAttributeList > xRootAttrList( pRootAttrList );
105 	pRootAttrList->AddAttribute(
106 		::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "xmlns" ) ),
107 		aCDATAString,
108 		::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "http://schemas.openxmlformats.org/package/2006/relationships" ) ) );
109 
110 	xWriterHandler->startDocument();
111 	xWriterHandler->startElement( aRelListElement, xRootAttrList );
112 
113 	for ( sal_Int32 nInd = 0; nInd < aSequence.getLength(); nInd++ )
114 	{
115 		AttributeList *pAttrList = new AttributeList;
116 		uno::Reference< xml::sax::XAttributeList > xAttrList( pAttrList );
117 		for( sal_Int32 nSecInd = 0; nSecInd < aSequence[nInd].getLength(); nSecInd++ )
118 		{
119 			if ( aSequence[nInd][nSecInd].First.equals( aIDAttr )
120 			  || aSequence[nInd][nSecInd].First.equals( aTypeAttr )
121 			  || aSequence[nInd][nSecInd].First.equals( aTargetModeAttr )
122 			  || aSequence[nInd][nSecInd].First.equals( aTargetAttr ) )
123 			{
124 				pAttrList->AddAttribute( aSequence[nInd][nSecInd].First, aCDATAString, aSequence[nInd][nSecInd].Second );
125 			}
126 			else
127 			{
128 				// TODO/LATER: should the extensions be allowed?
129 				throw lang::IllegalArgumentException();
130 			}
131 		}
132 
133 		xWriterHandler->startElement( aRelElement, xAttrList );
134 		xWriterHandler->ignorableWhitespace( aWhiteSpace );
135 		xWriterHandler->endElement( aRelElement );
136 	}
137 
138 	xWriterHandler->ignorableWhitespace( aWhiteSpace );
139 	xWriterHandler->endElement( aRelListElement );
140 	xWriterHandler->endDocument();
141 }
142 
143 // -----------------------------------
144 void SAL_CALL OFOPXMLHelper::WriteContentSequence( const uno::Reference< io::XOutputStream >& xOutStream, const uno::Sequence< beans::StringPair >& aDefaultsSequence, const uno::Sequence< beans::StringPair >& aOverridesSequence, const uno::Reference< lang::XMultiServiceFactory > xFactory )
145 	throw( uno::Exception )
146 {
147 	if ( !xOutStream.is() )
148 		throw uno::RuntimeException();
149 
150 	uno::Reference< io::XActiveDataSource > xWriterSource(
151 		xFactory->createInstance(
152 			::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" ) ) ),
153 		uno::UNO_QUERY_THROW );
154 	uno::Reference< xml::sax::XDocumentHandler > xWriterHandler( xWriterSource, uno::UNO_QUERY_THROW );
155 
156 	xWriterSource->setOutputStream( xOutStream );
157 
158 	::rtl::OUString aTypesElement( RTL_CONSTASCII_USTRINGPARAM( "Types" ) );
159 	::rtl::OUString aDefaultElement( RTL_CONSTASCII_USTRINGPARAM( "Default" ) );
160 	::rtl::OUString aOverrideElement( RTL_CONSTASCII_USTRINGPARAM( "Override" ) );
161 	::rtl::OUString aExtensionAttr( RTL_CONSTASCII_USTRINGPARAM( "Extension" ) );
162 	::rtl::OUString aPartNameAttr( RTL_CONSTASCII_USTRINGPARAM( "PartName" ) );
163 	::rtl::OUString aContentTypeAttr( RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) );
164 	::rtl::OUString aCDATAString( RTL_CONSTASCII_USTRINGPARAM ( "CDATA" ) );
165 	::rtl::OUString aWhiteSpace( RTL_CONSTASCII_USTRINGPARAM ( " " ) );
166 
167 	// write the namespace
168 	AttributeList* pRootAttrList = new AttributeList;
169 	uno::Reference< xml::sax::XAttributeList > xRootAttrList( pRootAttrList );
170 	pRootAttrList->AddAttribute(
171 		::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "xmlns" ) ),
172 		aCDATAString,
173 		::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "http://schemas.openxmlformats.org/package/2006/content-types" ) ) );
174 
175 	xWriterHandler->startDocument();
176 	xWriterHandler->startElement( aTypesElement, xRootAttrList );
177 
178 	for ( sal_Int32 nInd = 0; nInd < aDefaultsSequence.getLength(); nInd++ )
179 	{
180 		AttributeList *pAttrList = new AttributeList;
181 		uno::Reference< xml::sax::XAttributeList > xAttrList( pAttrList );
182 		pAttrList->AddAttribute( aExtensionAttr, aCDATAString, aDefaultsSequence[nInd].First );
183 		pAttrList->AddAttribute( aContentTypeAttr, aCDATAString, aDefaultsSequence[nInd].Second );
184 
185 		xWriterHandler->startElement( aDefaultElement, xAttrList );
186 		xWriterHandler->ignorableWhitespace( aWhiteSpace );
187 		xWriterHandler->endElement( aDefaultElement );
188 	}
189 
190 	for ( sal_Int32 nInd = 0; nInd < aOverridesSequence.getLength(); nInd++ )
191 	{
192 		AttributeList *pAttrList = new AttributeList;
193 		uno::Reference< xml::sax::XAttributeList > xAttrList( pAttrList );
194 		pAttrList->AddAttribute( aPartNameAttr, aCDATAString, aOverridesSequence[nInd].First );
195 		pAttrList->AddAttribute( aContentTypeAttr, aCDATAString, aOverridesSequence[nInd].Second );
196 
197 		xWriterHandler->startElement( aOverrideElement, xAttrList );
198 		xWriterHandler->ignorableWhitespace( aWhiteSpace );
199 		xWriterHandler->endElement( aOverrideElement );
200 	}
201 
202 	xWriterHandler->ignorableWhitespace( aWhiteSpace );
203 	xWriterHandler->endElement( aTypesElement );
204 	xWriterHandler->endDocument();
205 
206 }
207 
208 // ==================================================================================
209 
210 // -----------------------------------
211 uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadSequence_Impl( const uno::Reference< io::XInputStream >& xInStream, const ::rtl::OUString& aStringID, sal_uInt16 nFormat, const uno::Reference< lang::XMultiServiceFactory > xFactory )
212 	throw( uno::Exception )
213 {
214 	if ( !xFactory.is() || !xInStream.is() || nFormat > FORMAT_MAX_ID )
215 		throw uno::RuntimeException();
216 
217 	uno::Sequence< uno::Sequence< beans::StringPair > > aResult;
218 
219 	uno::Reference< xml::sax::XParser > xParser( xFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Parser" ) ) ), uno::UNO_QUERY_THROW );
220 
221 	OFOPXMLHelper* pHelper = new OFOPXMLHelper( nFormat );
222 	uno::Reference< xml::sax::XDocumentHandler > xHelper( static_cast< xml::sax::XDocumentHandler* >( pHelper ) );
223 	xml::sax::InputSource aParserInput;
224 	aParserInput.aInputStream = xInStream;
225 	aParserInput.sSystemId = aStringID;
226 	xParser->setDocumentHandler( xHelper );
227 	xParser->parseStream( aParserInput );
228 	xParser->setDocumentHandler( uno::Reference < xml::sax::XDocumentHandler > () );
229 
230 	return pHelper->GetParsingResult();
231 }
232 
233 // -----------------------------------
234 OFOPXMLHelper::OFOPXMLHelper( sal_uInt16 nFormat )
235 : m_nFormat( nFormat )
236 , m_aRelListElement( RTL_CONSTASCII_USTRINGPARAM( "Relationships" ) )
237 , m_aRelElement( RTL_CONSTASCII_USTRINGPARAM( "Relationship" ) )
238 , m_aIDAttr( RTL_CONSTASCII_USTRINGPARAM( "Id" ) )
239 , m_aTypeAttr( RTL_CONSTASCII_USTRINGPARAM( "Type" ) )
240 , m_aTargetModeAttr( RTL_CONSTASCII_USTRINGPARAM( "TargetMode" ) )
241 , m_aTargetAttr( RTL_CONSTASCII_USTRINGPARAM( "Target" ) )
242 , m_aTypesElement( RTL_CONSTASCII_USTRINGPARAM( "Types" ) )
243 , m_aDefaultElement( RTL_CONSTASCII_USTRINGPARAM( "Default" ) )
244 , m_aOverrideElement( RTL_CONSTASCII_USTRINGPARAM( "Override" ) )
245 , m_aExtensionAttr( RTL_CONSTASCII_USTRINGPARAM( "Extension" ) )
246 , m_aPartNameAttr( RTL_CONSTASCII_USTRINGPARAM( "PartName" ) )
247 , m_aContentTypeAttr( RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) )
248 {
249 }
250 
251 // -----------------------------------
252 OFOPXMLHelper::~OFOPXMLHelper()
253 {
254 }
255 
256 // -----------------------------------
257 uno::Sequence< uno::Sequence< beans::StringPair > > OFOPXMLHelper::GetParsingResult()
258 {
259 	if ( m_aElementsSeq.getLength() )
260 		throw uno::RuntimeException(); // the parsing has still not finished!
261 
262 	return m_aResultSeq;
263 }
264 
265 // -----------------------------------
266 void SAL_CALL OFOPXMLHelper::startDocument()
267 		throw(xml::sax::SAXException, uno::RuntimeException)
268 {
269 }
270 
271 // -----------------------------------
272 void SAL_CALL OFOPXMLHelper::endDocument()
273 		throw(xml::sax::SAXException, uno::RuntimeException)
274 {
275 }
276 
277 // -----------------------------------
278 void SAL_CALL OFOPXMLHelper::startElement( const ::rtl::OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs )
279 		throw( xml::sax::SAXException, uno::RuntimeException )
280 {
281 	if ( m_nFormat == RELATIONINFO_FORMAT )
282 	{
283 		if ( aName == m_aRelListElement )
284 		{
285 			sal_Int32 nNewLength = m_aElementsSeq.getLength() + 1;
286 
287 			if ( nNewLength != 1 )
288 				throw xml::sax::SAXException(); // TODO: this element must be the first level element
289 
290 			m_aElementsSeq.realloc( nNewLength );
291 			m_aElementsSeq[nNewLength-1] = aName;
292 
293 			return; // nothing to do
294 		}
295 		else if ( aName == m_aRelElement )
296 		{
297 			sal_Int32 nNewLength = m_aElementsSeq.getLength() + 1;
298 			if ( nNewLength != 2 )
299 				throw xml::sax::SAXException(); // TODO: this element must be the second level element
300 
301 			m_aElementsSeq.realloc( nNewLength );
302 			m_aElementsSeq[nNewLength-1] = aName;
303 
304 			sal_Int32 nNewEntryNum = m_aResultSeq.getLength() + 1;
305 			m_aResultSeq.realloc( nNewEntryNum );
306 			sal_Int32 nAttrNum = 0;
307 			m_aResultSeq[nNewEntryNum-1].realloc( 4 ); // the maximal expected number of arguments is 4
308 
309 			::rtl::OUString aIDValue = xAttribs->getValueByName( m_aIDAttr );
310 			if ( !aIDValue.getLength() )
311 				throw xml::sax::SAXException(); // TODO: the ID value must present
312 
313 			::rtl::OUString aTypeValue = xAttribs->getValueByName( m_aTypeAttr );
314 			::rtl::OUString aTargetValue = xAttribs->getValueByName( m_aTargetAttr );
315 			::rtl::OUString aTargetModeValue = xAttribs->getValueByName( m_aTargetModeAttr );
316 
317 			m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = m_aIDAttr;
318 			m_aResultSeq[nNewEntryNum-1][nAttrNum - 1].Second = aIDValue;
319 
320 			if ( aTypeValue.getLength() )
321 			{
322 				m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = m_aTypeAttr;
323 				m_aResultSeq[nNewEntryNum-1][nAttrNum - 1].Second = aTypeValue;
324 			}
325 
326 			if ( aTargetValue.getLength() )
327 			{
328 				m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = m_aTargetAttr;
329 				m_aResultSeq[nNewEntryNum-1][nAttrNum - 1].Second = aTargetValue;
330 			}
331 
332 			if ( aTargetModeValue.getLength() )
333 			{
334 				m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = m_aTargetModeAttr;
335 				m_aResultSeq[nNewEntryNum-1][nAttrNum - 1].Second = aTargetModeValue;
336 			}
337 
338 			m_aResultSeq[nNewEntryNum-1].realloc( nAttrNum );
339 		}
340 		else
341 			throw xml::sax::SAXException(); // TODO: no other elements expected!
342 	}
343 	else if ( m_nFormat == CONTENTTYPE_FORMAT )
344 	{
345 		if ( aName == m_aTypesElement )
346 		{
347 			sal_Int32 nNewLength = m_aElementsSeq.getLength() + 1;
348 
349 			if ( nNewLength != 1 )
350 				throw xml::sax::SAXException(); // TODO: this element must be the first level element
351 
352 			m_aElementsSeq.realloc( nNewLength );
353 			m_aElementsSeq[nNewLength-1] = aName;
354 
355 			if ( !m_aResultSeq.getLength() )
356 				m_aResultSeq.realloc( 2 );
357 
358 			return; // nothing to do
359 		}
360 		else if ( aName == m_aDefaultElement )
361 		{
362 			sal_Int32 nNewLength = m_aElementsSeq.getLength() + 1;
363 			if ( nNewLength != 2 )
364 				throw xml::sax::SAXException(); // TODO: this element must be the second level element
365 
366 			m_aElementsSeq.realloc( nNewLength );
367 			m_aElementsSeq[nNewLength-1] = aName;
368 
369 			if ( !m_aResultSeq.getLength() )
370 				m_aResultSeq.realloc( 2 );
371 
372 			if ( m_aResultSeq.getLength() != 2 )
373 				throw uno::RuntimeException();
374 
375 			::rtl::OUString aExtensionValue = xAttribs->getValueByName( m_aExtensionAttr );
376 			if ( !aExtensionValue.getLength() )
377 				throw xml::sax::SAXException(); // TODO: the Extension value must present
378 
379 			::rtl::OUString aContentTypeValue = xAttribs->getValueByName( m_aContentTypeAttr );
380 			if ( !aContentTypeValue.getLength() )
381 				throw xml::sax::SAXException(); // TODO: the ContentType value must present
382 
383 			sal_Int32 nNewResultLen = m_aResultSeq[0].getLength() + 1;
384 			m_aResultSeq[0].realloc( nNewResultLen );
385 
386 			m_aResultSeq[0][nNewResultLen-1].First = aExtensionValue;
387 			m_aResultSeq[0][nNewResultLen-1].Second = aContentTypeValue;
388 		}
389 		else if ( aName == m_aOverrideElement )
390 		{
391 			sal_Int32 nNewLength = m_aElementsSeq.getLength() + 1;
392 			if ( nNewLength != 2 )
393 				throw xml::sax::SAXException(); // TODO: this element must be the second level element
394 
395 			m_aElementsSeq.realloc( nNewLength );
396 			m_aElementsSeq[nNewLength-1] = aName;
397 
398 			if ( !m_aResultSeq.getLength() )
399 				m_aResultSeq.realloc( 2 );
400 
401 			if ( m_aResultSeq.getLength() != 2 )
402 				throw uno::RuntimeException();
403 
404 			::rtl::OUString aPartNameValue = xAttribs->getValueByName( m_aPartNameAttr );
405 			if ( !aPartNameValue.getLength() )
406 				throw xml::sax::SAXException(); // TODO: the PartName value must present
407 
408 			::rtl::OUString aContentTypeValue = xAttribs->getValueByName( m_aContentTypeAttr );
409 			if ( !aContentTypeValue.getLength() )
410 				throw xml::sax::SAXException(); // TODO: the ContentType value must present
411 
412 			sal_Int32 nNewResultLen = m_aResultSeq[1].getLength() + 1;
413 			m_aResultSeq[1].realloc( nNewResultLen );
414 
415 			m_aResultSeq[1][nNewResultLen-1].First = aPartNameValue;
416 			m_aResultSeq[1][nNewResultLen-1].Second = aContentTypeValue;
417 		}
418 		else
419 			throw xml::sax::SAXException(); // TODO: no other elements expected!
420 	}
421 	else
422 		throw xml::sax::SAXException(); // TODO: no other elements expected!
423 }
424 
425 // -----------------------------------
426 void SAL_CALL OFOPXMLHelper::endElement( const ::rtl::OUString& aName )
427 	throw( xml::sax::SAXException, uno::RuntimeException )
428 {
429 	if ( m_nFormat == RELATIONINFO_FORMAT || m_nFormat == CONTENTTYPE_FORMAT )
430 	{
431 		sal_Int32 nLength = m_aElementsSeq.getLength();
432 		if ( nLength <= 0 )
433 			throw xml::sax::SAXException(); // TODO: no other end elements expected!
434 
435 		if ( !m_aElementsSeq[nLength-1].equals( aName ) )
436 			throw xml::sax::SAXException(); // TODO: unexpected element ended
437 
438 		m_aElementsSeq.realloc( nLength - 1 );
439 	}
440 }
441 
442 // -----------------------------------
443 void SAL_CALL OFOPXMLHelper::characters( const ::rtl::OUString& /*aChars*/ )
444 		throw(xml::sax::SAXException, uno::RuntimeException)
445 {
446 }
447 
448 // -----------------------------------
449 void SAL_CALL OFOPXMLHelper::ignorableWhitespace( const ::rtl::OUString& /*aWhitespaces*/ )
450 		throw(xml::sax::SAXException, uno::RuntimeException)
451 {
452 }
453 
454 // -----------------------------------
455 void SAL_CALL OFOPXMLHelper::processingInstruction( const ::rtl::OUString& /*aTarget*/, const ::rtl::OUString& /*aData*/ )
456 		throw(xml::sax::SAXException, uno::RuntimeException)
457 {
458 }
459 
460 // -----------------------------------
461 void SAL_CALL OFOPXMLHelper::setDocumentLocator( const uno::Reference< xml::sax::XLocator >& /*xLocator*/ )
462 		throw(xml::sax::SAXException, uno::RuntimeException)
463 {
464 }
465 
466 } // namespace comphelper
467 
468