merge the formfield patch from ooo-build
[ooovba.git] / writerfilter / source / ooxml / OOXMLDocumentImpl.hxx
blob9649376d622363747abd7f1461d62bdf83edaee7
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 bool mbIsSubstream;
58 protected:
59 virtual void resolveFastSubStream(Stream & rStream,
60 OOXMLStream::StreamType_t nType);
62 virtual void resolveFastSubStreamWithId(Stream & rStream,
63 writerfilter::Reference<Stream>::Pointer_t pStream,
64 sal_uInt32 nId);
66 writerfilter::Reference<Stream>::Pointer_t
67 getSubStream(const rtl::OUString & rId);
69 writerfilter::Reference<Stream>::Pointer_t
70 getXNoteStream(OOXMLStream::StreamType_t nType,
71 const Id & rType,
72 const rtl::OUString & rNoteId);
74 void setIsSubstream( bool bSubstream ) { mbIsSubstream = bSubstream; };
76 public:
77 OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream);
78 virtual ~OOXMLDocumentImpl();
80 virtual void resolve(Stream & rStream);
82 virtual string getType() const;
84 virtual void resolveFootnote(Stream & rStream,
85 const Id & rType,
86 const rtl::OUString & rNoteId);
87 virtual void resolveEndnote(Stream & rStream,
88 const Id & rType,
89 const rtl::OUString & rNoteId);
90 virtual void resolveHeader(Stream & rStream,
91 const sal_Int32 type,
92 const rtl::OUString & rId);
93 virtual void resolveFooter(Stream & rStream,
94 const sal_Int32 type,
95 const rtl::OUString & rId);
97 virtual void resolveComment(Stream & rStream, const rtl::OUString & rId);
99 virtual OOXMLPropertySet * getPicturePropSet
100 (const ::rtl::OUString & rId);
101 virtual void resolvePicture(Stream & rStream, const rtl::OUString & rId);
103 virtual ::rtl::OUString getTargetForId(const ::rtl::OUString & rId);
105 virtual void setModel(uno::Reference<frame::XModel> xModel);
106 virtual uno::Reference<frame::XModel> getModel();
107 virtual void setDrawPage(uno::Reference<drawing::XDrawPage> xDrawPage);
108 virtual uno::Reference<drawing::XDrawPage> getDrawPage();
109 virtual uno::Reference<io::XInputStream> getInputStream();
110 virtual uno::Reference<io::XInputStream> getStorageStream();
111 virtual uno::Reference<io::XInputStream> getInputStreamForId(const rtl::OUString & rId);
112 virtual void setXNoteId(const rtl::OUString & rId);
113 virtual const ::rtl::OUString & getXNoteId() const;
114 virtual void setXNoteType(const Id & rId);
115 virtual const Id & getXNoteType() const;
116 virtual const ::rtl::OUString & getTarget() const;
119 #endif // OOXML_DOCUMENT_IMPL_HXX