merge the formfield patch from ooo-build
[ooovba.git] / xmloff / source / text / XMLIndexSpanEntryContext.cxx
blobda778b4ee6285e46a5cb542471d78a0faac9fce8
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: XMLIndexSpanEntryContext.cxx,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 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_xmloff.hxx"
33 #include "XMLIndexSpanEntryContext.hxx"
34 #include <rtl/ustring.hxx>
35 #include "XMLIndexTemplateContext.hxx"
36 #include <xmloff/xmlictxt.hxx>
39 using ::rtl::OUString;
40 using ::com::sun::star::uno::Sequence;
41 using ::com::sun::star::uno::Any;
42 using ::com::sun::star::beans::PropertyValue;
45 TYPEINIT1( XMLIndexSpanEntryContext, XMLIndexSimpleEntryContext);
47 XMLIndexSpanEntryContext::XMLIndexSpanEntryContext(
48 SvXMLImport& rImport,
49 XMLIndexTemplateContext& rTemplate,
50 sal_uInt16 nPrfx,
51 const OUString& rLocalName ) :
52 XMLIndexSimpleEntryContext(rImport, rTemplate.sTokenText,
53 rTemplate, nPrfx, rLocalName)
55 nValues++; // one more for the text string
58 XMLIndexSpanEntryContext::~XMLIndexSpanEntryContext()
62 void XMLIndexSpanEntryContext::Characters(const OUString& sString)
64 sContent.append(sString);
67 void XMLIndexSpanEntryContext::FillPropertyValues(
68 Sequence<PropertyValue> & rValues)
70 // call superclass for token type, stylename,
71 XMLIndexSimpleEntryContext::FillPropertyValues(rValues);
73 // content
74 Any aAny;
75 aAny <<= sContent.makeStringAndClear();
76 rValues[nValues-1].Name = rTemplateContext.sText;
77 rValues[nValues-1].Value = aAny;