Bump version to 4.1-6
[LibreOffice.git] / writerfilter / source / ooxml / OOXMLDocumentImpl.hxx
blobf23725d643996662fbaf78d61e32c033e1024d59
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_OOXML_DOCUMENT_IMPL_HXX
20 #define INCLUDED_OOXML_DOCUMENT_IMPL_HXX
22 #include <ooxml/OOXMLDocument.hxx>
24 #include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
26 #include "OOXMLPropertySet.hxx"
28 namespace writerfilter {
29 namespace ooxml
32 using namespace ::com::sun::star;
34 class OOXMLDocumentImpl : public OOXMLDocument
36 OOXMLStream::Pointer_t mpStream;
37 sal_Int32 mnXNoteId;
38 Id mXNoteType;
40 uno::Reference<frame::XModel> mxModel;
41 uno::Reference<drawing::XDrawPage> mxDrawPage;
42 uno::Reference<xml::sax::XFastShapeContextHandler> mxShapeContext;
44 bool mbIsSubstream;
46 protected:
47 virtual void resolveFastSubStream(Stream & rStream,
48 OOXMLStream::StreamType_t nType);
50 virtual void resolveFastSubStreamWithId(Stream & rStream,
51 writerfilter::Reference<Stream>::Pointer_t pStream,
52 sal_uInt32 nId);
54 writerfilter::Reference<Stream>::Pointer_t
55 getSubStream(const OUString & rId);
57 writerfilter::Reference<Stream>::Pointer_t
58 getXNoteStream(OOXMLStream::StreamType_t nType,
59 const Id & rType,
60 const sal_Int32 nNoteId);
62 void setIsSubstream( bool bSubstream ) { mbIsSubstream = bSubstream; };
64 public:
65 OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream);
66 virtual ~OOXMLDocumentImpl();
68 virtual void resolve(Stream & rStream);
70 virtual string getType() const;
72 virtual void resolveFootnote(Stream & rStream,
73 const Id & rType,
74 const sal_Int32 nNoteId);
75 virtual void resolveEndnote(Stream & rStream,
76 const Id & rType,
77 const sal_Int32 nNoteId);
78 virtual void resolveHeader(Stream & rStream,
79 const sal_Int32 type,
80 const OUString & rId);
81 virtual void resolveFooter(Stream & rStream,
82 const sal_Int32 type,
83 const OUString & rId);
85 virtual void resolveComment(Stream & rStream, const sal_Int32 nId);
87 virtual OOXMLPropertySet * getPicturePropSet
88 (const OUString & rId);
89 virtual void resolvePicture(Stream & rStream, const OUString & rId);
91 virtual OUString getTargetForId(const OUString & rId);
93 virtual void setModel(uno::Reference<frame::XModel> xModel);
94 virtual uno::Reference<frame::XModel> getModel();
95 virtual void setDrawPage(uno::Reference<drawing::XDrawPage> xDrawPage);
96 virtual uno::Reference<drawing::XDrawPage> getDrawPage();
97 virtual uno::Reference<io::XInputStream> getInputStream();
98 virtual uno::Reference<io::XInputStream> getStorageStream();
99 virtual uno::Reference<io::XInputStream> getInputStreamForId(const OUString & rId);
100 virtual void setXNoteId(const sal_Int32 nId);
101 virtual sal_Int32 getXNoteId() const;
102 virtual void setXNoteType(const Id & rId);
103 virtual const Id & getXNoteType() const;
104 virtual const OUString & getTarget() const;
105 virtual uno::Reference<xml::sax::XFastShapeContextHandler> getShapeContext( );
106 virtual void setShapeContext( uno::Reference<xml::sax::XFastShapeContextHandler> xContext );
109 #endif // OOXML_DOCUMENT_IMPL_HXX
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */