Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef INCLUDED_OOXML_DOCUMENT_IMPL_HXX
20 : #define INCLUDED_OOXML_DOCUMENT_IMPL_HXX
21 :
22 : #include <ooxml/OOXMLDocument.hxx>
23 :
24 : #include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
25 :
26 : #include "OOXMLPropertySet.hxx"
27 :
28 : namespace writerfilter {
29 : namespace ooxml
30 : {
31 :
32 : using namespace ::com::sun::star;
33 :
34 : class OOXMLDocumentImpl : public OOXMLDocument
35 : {
36 : OOXMLStream::Pointer_t mpStream;
37 : sal_Int32 mnXNoteId;
38 : Id mXNoteType;
39 :
40 : uno::Reference<frame::XModel> mxModel;
41 : uno::Reference<drawing::XDrawPage> mxDrawPage;
42 : uno::Reference<xml::sax::XFastShapeContextHandler> mxShapeContext;
43 :
44 : bool mbIsSubstream;
45 :
46 : protected:
47 : virtual void resolveFastSubStream(Stream & rStream,
48 : OOXMLStream::StreamType_t nType);
49 :
50 : virtual void resolveFastSubStreamWithId(Stream & rStream,
51 : writerfilter::Reference<Stream>::Pointer_t pStream,
52 : sal_uInt32 nId);
53 :
54 : writerfilter::Reference<Stream>::Pointer_t
55 : getSubStream(const OUString & rId);
56 :
57 : writerfilter::Reference<Stream>::Pointer_t
58 : getXNoteStream(OOXMLStream::StreamType_t nType,
59 : const Id & rType,
60 : const sal_Int32 nNoteId);
61 :
62 25 : void setIsSubstream( bool bSubstream ) { mbIsSubstream = bSubstream; };
63 :
64 : public:
65 : OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream);
66 : virtual ~OOXMLDocumentImpl();
67 :
68 : virtual void resolve(Stream & rStream);
69 :
70 : virtual string getType() const;
71 :
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);
84 :
85 : virtual void resolveComment(Stream & rStream, const sal_Int32 nId);
86 :
87 : virtual OOXMLPropertySet * getPicturePropSet
88 : (const OUString & rId);
89 : virtual void resolvePicture(Stream & rStream, const OUString & rId);
90 :
91 : virtual OUString getTargetForId(const OUString & rId);
92 :
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 );
107 : };
108 : }}
109 : #endif // OOXML_DOCUMENT_IMPL_HXX
110 :
111 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|