update dev300-m58
[ooovba.git] / writerfilter / source / ooxml / OOXMLDocumentImpl.hxx
blobca2c91994f587d590bddfab76e1ae66c0c53ee9a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: OOXMLDocumentImpl.hxx,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef INCLUDED_OOXML_DOCUMENT_IMPL_HXX
31 #define INCLUDED_OOXML_DOCUMENT_IMPL_HXX
33 #include <ooxml/OOXMLDocument.hxx>
35 #ifndef _COM_SUN_STAR_XML_SAX_XFAST_TOKEN_HANDLER_HPP_
36 #include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
37 #endif
39 #include "OOXMLPropertySet.hxx"
41 namespace writerfilter {
42 namespace ooxml
45 using namespace ::com::sun::star;
47 class OOXMLDocumentImpl : public OOXMLDocument
49 OOXMLStream::Pointer_t mpStream;
50 rtl::OUString msXNoteId;
51 Id mXNoteType;
53 uno::Reference<frame::XModel> mxModel;
54 uno::Reference<drawing::XDrawPage> mxDrawPage;
56 protected:
57 virtual void resolveFastSubStream(Stream & rStream,
58 OOXMLStream::StreamType_t nType);
60 virtual void resolveFastSubStreamWithId(Stream & rStream,
61 writerfilter::Reference<Stream>::Pointer_t pStream,
62 sal_uInt32 nId);
64 writerfilter::Reference<Stream>::Pointer_t
65 getSubStream(const rtl::OUString & rId);
67 writerfilter::Reference<Stream>::Pointer_t
68 getXNoteStream(OOXMLStream::StreamType_t nType,
69 const Id & rType,
70 const rtl::OUString & rNoteId);
72 public:
73 OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream);
74 virtual ~OOXMLDocumentImpl();
76 virtual void resolve(Stream & rStream);
78 virtual string getType() const;
80 virtual void resolveFootnote(Stream & rStream,
81 const Id & rType,
82 const rtl::OUString & rNoteId);
83 virtual void resolveEndnote(Stream & rStream,
84 const Id & rType,
85 const rtl::OUString & rNoteId);
86 virtual void resolveHeader(Stream & rStream,
87 const sal_Int32 type,
88 const rtl::OUString & rId);
89 virtual void resolveFooter(Stream & rStream,
90 const sal_Int32 type,
91 const rtl::OUString & rId);
93 virtual void resolveComment(Stream & rStream, const rtl::OUString & rId);
95 virtual OOXMLPropertySet * getPicturePropSet
96 (const ::rtl::OUString & rId);
97 virtual void resolvePicture(Stream & rStream, const rtl::OUString & rId);
99 virtual ::rtl::OUString getTargetForId(const ::rtl::OUString & rId);
101 virtual void setModel(uno::Reference<frame::XModel> xModel);
102 virtual uno::Reference<frame::XModel> getModel();
103 virtual void setDrawPage(uno::Reference<drawing::XDrawPage> xDrawPage);
104 virtual uno::Reference<drawing::XDrawPage> getDrawPage();
105 virtual uno::Reference<io::XInputStream> getInputStream();
106 virtual uno::Reference<io::XInputStream> getStorageStream();
107 virtual uno::Reference<io::XInputStream> getInputStreamForId(const rtl::OUString & rId);
108 virtual void setXNoteId(const rtl::OUString & rId);
109 virtual const ::rtl::OUString & getXNoteId() const;
110 virtual void setXNoteType(const Id & rId);
111 virtual const Id & getXNoteType() const;
112 virtual const ::rtl::OUString & getTarget() const;
115 #endif // OOXML_DOCUMENT_IMPL_HXX