LibreOffice Module lotuswordpro (master) 1
xfdocfield.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*************************************************************************
3 *
4 * The Contents of this file are made available subject to the terms of
5 * either of the following licenses
6 *
7 * - GNU Lesser General Public License Version 2.1
8 * - Sun Industry Standards Source License Version 1.1
9 *
10 * Sun Microsystems Inc., October, 2000
11 *
12 * GNU Lesser General Public License Version 2.1
13 * =============================================
14 * Copyright 2000 by Sun Microsystems, Inc.
15 * 901 San Antonio Road, Palo Alto, CA 94303, USA
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License version 2.1, as published by the Free Software Foundation.
20 *
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
25 *
26 * You should have received a copy of the GNU Lesser General Public
27 * License along with this library; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
29 * MA 02111-1307 USA
30 *
31 *
32 * Sun Industry Standards Source License Version 1.1
33 * =================================================
34 * The contents of this file are subject to the Sun Industry Standards
35 * Source License Version 1.1 (the "License"); You may not use this file
36 * except in compliance with the License. You may obtain a copy of the
37 * License at http://www.openoffice.org/license.html.
38 *
39 * Software provided under this License is provided on an "AS IS" basis,
40 * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
41 * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
42 * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
43 * See the License for the specific provisions governing your rights and
44 * obligations concerning the Software.
45 *
46 * The Initial Developer of the Original Code is: IBM Corporation
47 *
48 * Copyright: 2008 by IBM Corporation
49 *
50 * All Rights Reserved.
51 *
52 * Contributor(s): _______________________________________
53 *
54 *
55 ************************************************************************/
56/*************************************************************************
57 * @file
58 * doc field.
59 ************************************************************************/
61#include <xfilter/ixfstream.hxx>
63
64void XFFileName::SetType(const OUString& sType)
65{
67}
68
70{
71 IXFAttrList *pAttrList = pStrm->GetAttrList();
72 pAttrList->Clear();
73 if (m_strType == "FileName")
74 pAttrList->AddAttribute( "text:display", "name-and-extension" );
75 else if (m_strType == "Path")
76 pAttrList->AddAttribute( "text:display", "path" );
77 pStrm->StartElement( "text:file-name" );
78 pStrm->EndElement( "text:file-name" );
79}
80
82{
83 IXFAttrList *pAttrList = pStrm->GetAttrList();
84 pAttrList->Clear();
85 pStrm->StartElement( "text:word-count" );
86 pStrm->EndElement( "text:word-count" );
87}
88
90{
91 IXFAttrList *pAttrList = pStrm->GetAttrList();
92 pAttrList->Clear();
93 pStrm->StartElement( "text:character-count" );
94 pStrm->EndElement( "text:character-count" );
95}
96
98{
99 IXFAttrList *pAttrList = pStrm->GetAttrList();
100 pAttrList->Clear();
101 pStrm->StartElement( "text:description" );
102 pStrm->EndElement( "text:description" );
103}
104
106{
107 IXFAttrList *pAttrList = pStrm->GetAttrList();
108 pAttrList->Clear();
109 pStrm->StartElement( "text:page-count" );
110}
112{
113 pStrm->EndElement( "text:page-count" );
114}
115
117{
118 IXFAttrList *pAttrList = pStrm->GetAttrList();
119 pAttrList->Clear();
120 pStrm->StartElement( "text:word-count" );
121}
122
124{
125 IXFAttrList *pAttrList = pStrm->GetAttrList();
126 pAttrList->Clear();
127 pStrm->StartElement( "text:character-count" );
128}
129
131{
132 IXFAttrList *pAttrList = pStrm->GetAttrList();
133 pAttrList->Clear();
134 pStrm->StartElement( "text:description" );
135}
136
138{
139 pStrm->EndElement( "text:word-count" );
140}
141
143{
144 pStrm->EndElement( "text:character-count" );
145}
146
148{
149 pStrm->EndElement( "text:description" );
150}
151
153{
154 IXFAttrList *pAttrList = pStrm->GetAttrList();
155 pAttrList->Clear();
156 pStrm->StartElement( "text:keywords" );
157 pStrm->EndElement( "text:keywords" );
158}
159
161{
162 IXFAttrList *pAttrList = pStrm->GetAttrList();
163 pAttrList->Clear();
164 if (!m_strStyleName.isEmpty())
165 pAttrList->AddAttribute( "style:data-style-name", m_strStyleName );
166 pStrm->StartElement( "text:editing-duration" );
167 pStrm->EndElement( "text:editing-duration" );
168}
170{
171 IXFAttrList *pAttrList = pStrm->GetAttrList();
172 pAttrList->Clear();
173 if (!m_strStyleName.isEmpty())
174 pAttrList->AddAttribute( "style:data-style-name", m_strStyleName );
175 pStrm->StartElement( "text:editing-duration" );
176}
178{
179 pStrm->EndElement( "text:editing-duration" );
180}
182{
183 IXFAttrList *pAttrList = pStrm->GetAttrList();
184 pAttrList->Clear();
185 if (!m_strStyleName.isEmpty())
186 pAttrList->AddAttribute( "style:data-style-name", m_strStyleName );
187 pStrm->StartElement( "text:creation-time" );
188 pStrm->EndElement( "text:creation-time" );
189}
191{
192 IXFAttrList *pAttrList = pStrm->GetAttrList();
193 pAttrList->Clear();
194 if (!m_strStyleName.isEmpty())
195 pAttrList->AddAttribute( "style:data-style-name", m_strStyleName );
196 pStrm->StartElement( "text:modification-time" );
197 pStrm->EndElement( "text:modification-time" );
198}
199
201{
202 IXFAttrList *pAttrList = pStrm->GetAttrList();
203 pAttrList->Clear();
204 if (!m_strStyleName.isEmpty())
205 pAttrList->AddAttribute( "style:data-style-name", m_strStyleName );
206 pStrm->StartElement( "text:creation-time" );
207}
208
210{
211 IXFAttrList *pAttrList = pStrm->GetAttrList();
212 pAttrList->Clear();
213 if (!m_strStyleName.isEmpty())
214 pAttrList->AddAttribute( "style:data-style-name", m_strStyleName );
215 pStrm->StartElement( "text:modification-time" );
216}
218{
219 pStrm->EndElement( "text:creation-time" );
220}
221
223{
224 pStrm->EndElement( "text:modification-time" );
225}
226
228{
229 IXFAttrList *pAttrList = pStrm->GetAttrList();
230 pAttrList->Clear();
231 pStrm->StartElement( "text:initial-creator" );
232 pStrm->EndElement( "text:initial-creator" );
233}
234/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OptionalString sType
Attribute list interface for sax writer.
Definition: ixfattrlist.hxx:72
virtual void Clear()=0
@descr: Clear all the attributes in the attribute list.
virtual void AddAttribute(const OUString &name, const OUString &value)=0
@descr: Add an attribute to the attribute list.
Stream wrapper for sax writer.
Definition: ixfstream.hxx:72
virtual IXFAttrList * GetAttrList()=0
@descr return the Attribute list interface.
virtual void StartElement(const OUString &oustr)=0
@descr Wrap XDocumentHandler::startElement()
virtual void EndElement(const OUString &oustr)=0
@descr Wrap XDocumentHandler::endElement()
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:142
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:123
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:89
OUString m_strStyleName
Definition: xfcontent.hxx:116
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:217
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:200
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:181
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:147
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:130
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:97
OUString m_strType
Definition: xfdocfield.hxx:71
void SetType(const OUString &sType)
Definition: xfdocfield.cxx:64
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:69
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:227
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:152
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:222
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:209
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:190
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:111
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:105
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:177
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:169
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:160
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:137
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:116
virtual void ToXml(IXFStream *pStrm) override
Definition: xfdocfield.cxx:81