Update ooo320-m1
[ooovba.git] / sc / source / filter / xml / XMLTextPContext.hxx
blob154547b9554caf8b7b5123fe42f9b82076d79565
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XMLTextPContext.hxx,v $
10 * $Revision: 1.12 $
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 #ifndef SC_XMLTEXTPCONTEXT_HXX
32 #define SC_XMLTEXTPCONTEXT_HXX
34 #include <xmloff/xmlictxt.hxx>
35 #include <rtl/ustrbuf.hxx>
37 class ScXMLImport;
38 class ScXMLTableRowCellContext;
40 class ScXMLTextPContext : public SvXMLImportContext
42 ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList> xAttrList;
43 SvXMLImportContext* pTextPContext;
44 ScXMLTableRowCellContext* pCellContext;
45 rtl::OUString sLName;
46 rtl::OUString sSimpleContent; // copy of the first Character call's argument
47 rtl::OUStringBuffer* pContentBuffer; // used if there's more than one string
48 USHORT nPrefix;
49 sal_Bool bIsOwn;
51 const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
52 ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
54 public:
55 ScXMLTextPContext( ScXMLImport& rImport, USHORT nPrfx,
56 const ::rtl::OUString& rLName,
57 const ::com::sun::star::uno::Reference<
58 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
59 ScXMLTableRowCellContext* pCellContext);
61 virtual ~ScXMLTextPContext();
63 virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
64 const ::rtl::OUString& rLocalName,
65 const ::com::sun::star::uno::Reference<
66 ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
68 virtual void Characters( const ::rtl::OUString& rChars );
70 virtual void EndElement();
72 void AddSpaces(sal_Int32 nSpaceCount);
75 #endif