merge the formfield patch from ooo-build
[ooovba.git] / writerfilter / source / ooxml / OOXMLParserState.hxx
blob886f69b7b05c9b764737cf9c23700d9cca3fd460
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: OOXMLParserState.hxx,v $
10 * $Revision: 1.6 $
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 INCLUDE_OOXML_PARSER_STATE_HXX
31 #define INCLUDE_OOXML_PARSER_STATE_HXX
33 #include <ooxml/OOXMLDocument.hxx>
34 #include <resourcemodel/TagLogger.hxx>
35 #include "OOXMLPropertySetImpl.hxx"
37 namespace writerfilter {
38 namespace ooxml
41 class OOXMLParserState
43 bool mbInSectionGroup;
44 bool mbInParagraphGroup;
45 bool mbInCharacterGroup;
46 bool mbLastParagraphInSection;
47 bool mbForwardEvents;
48 unsigned int mnContexts;
49 unsigned int mnHandle;
50 OOXMLDocument * mpDocument;
51 rtl::OUString msXNoteId;
52 rtl::OUString msTarget;
53 OOXMLPropertySet::Pointer_t mpCharacterProps;
54 OOXMLPropertySet::Pointer_t mpTableProps;
56 public:
57 typedef boost::shared_ptr<OOXMLParserState> Pointer_t;
59 OOXMLParserState();
60 virtual ~OOXMLParserState();
62 bool isInSectionGroup() const;
63 void setInSectionGroup(bool bInSectionGroup);
65 void setLastParagraphInSection(bool bLastParagraphInSection);
66 bool isLastParagraphInSection() const;
68 bool isInParagraphGroup() const;
69 void setInParagraphGroup(bool bInParagraphGroup);
71 bool isInCharacterGroup() const;
72 void setInCharacterGroup(bool bInCharacterGroup);
74 void setForwardEvents(bool bForwardEvents);
75 bool isForwardEvents() const;
77 void incContextCount();
78 const string getHandle() const;
79 void setHandle();
80 unsigned int getContextCount() const;
82 void setDocument(OOXMLDocument * pDocument);
83 OOXMLDocument * getDocument() const;
85 void setXNoteId(const rtl::OUString & rId);
86 const rtl::OUString & getXNoteId() const;
87 void setXNoteType(const Id & rId);
88 const Id & getXNoteType() const;
90 const rtl::OUString & getTarget() const;
92 void newCharacterProperty(const Id & rId, OOXMLValue::Pointer_t pVal);
93 void resolveCharacterProperties(Stream & rStream);
94 OOXMLPropertySet::Pointer_t getCharacterProperties() const;
95 void setCharacterProperties(OOXMLPropertySet::Pointer_t pProps);
96 void resolveTableProperties(Stream & rStream);
97 void setTableProperties(OOXMLPropertySet::Pointer_t pProps);
99 string toString() const;
100 XMLTag::Pointer_t toTag() const;
105 #endif // INCLUDE_OOXML_PARSER_STATE_HXX