24#include <com/sun/star/xml/sax/Parser.hpp>
25#include <com/sun/star/xml/sax/Writer.hpp>
26#include <com/sun/star/xml/sax/SAXException.hpp>
27#include <com/sun/star/io/IOException.hpp>
28#include <com/sun/star/io/XInputStream.hpp>
39 const css::uno::Reference<css::uno::XComponentContext>& rxContext,
40 const css::uno::Reference<css::io::XInputStream>& rInputStream,
41 const css::uno::Reference<css::container::XIndexContainer>& rToolbarConfiguration)
43 Reference<XParser> xParser = Parser::create(rxContext);
46 InputSource aInputSource;
55 xParser->setDocumentHandler(xFilter);
59 xParser->parseStream(aInputSource);
66 catch (
const SAXException&)
70 catch (
const css::io::IOException&)
77 const css::uno::Reference<css::uno::XComponentContext>& rxContext,
78 const css::uno::Reference<css::io::XOutputStream>& rOutputStream,
79 const css::uno::Reference<css::container::XIndexAccess>& rToolbarConfiguration)
81 Reference<XWriter> xWriter = Writer::create(rxContext);
82 xWriter->setOutputStream(rOutputStream);
86 Reference<XDocumentHandler> xHandler(xWriter, UNO_QUERY_THROW);
95 catch (
const SAXException&)
99 catch (
const css::io::IOException&)
Reference< XInputStream > rInputStream