Update ooo320-m1
[ooovba.git] / xmloff / source / text / XMLTextFrameContext.hxx
blob4b3eece040119f6c856e113918d71497e637d3d4
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: XMLTextFrameContext.hxx,v $
10 * $Revision: 1.25 $
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 _XMLTEXTFRAMECONTEXT_HXX
32 #define _XMLTEXTFRAMECONTEXT_HXX
34 #ifndef _COM_SUN_STAR_TEXT_TEXTCONTENTANCHORTYPE_HPP
35 #include <com/sun/star/text/TextContentAnchorType.hpp>
36 #endif
37 #include <xmloff/xmlictxt.hxx>
39 namespace com { namespace sun { namespace star {
40 namespace text { class XTextCursor; class XTextContent; }
41 } } }
43 class SvXMLAttributeList;
44 class XMLTextFrameContextHyperlink_Impl;
46 class XMLTextFrameContext : public SvXMLImportContext
48 ::com::sun::star::uno::Reference<
49 ::com::sun::star::xml::sax::XAttributeList > m_xAttrList;
51 SvXMLImportContextRef m_xImplContext;
52 SvXMLImportContextRef m_xReplImplContext;
53 SvXMLAttributeList *m_pAttrList;
55 XMLTextFrameContextHyperlink_Impl *m_pHyperlink;
56 // --> OD 2009-07-22 #i73249#
57 ::rtl::OUString m_sTitle;
58 // <--
59 ::rtl::OUString m_sDesc;
61 ::com::sun::star::text::TextContentAnchorType m_eDefaultAnchorType;
63 // --> OD 2006-03-10 #i51726#
64 // The <draw:name> can longer be used to distinguish Writer graphic/text box
65 // objects and Draw graphic/text box objects.
66 // The new distinguish attribute is the parent style of the automatic style
67 // of the object. All Draw objects have an automatic style without a parent style.
68 sal_Bool m_HasAutomaticStyleWithoutParentStyle;
69 // <--
70 sal_Bool m_bSupportsReplacement;
72 sal_Bool CreateIfNotThere();
73 sal_Bool CreateIfNotThere( ::com::sun::star::uno::Reference <
74 ::com::sun::star::beans::XPropertySet >& rPropSet );
76 public:
78 TYPEINFO();
80 XMLTextFrameContext( SvXMLImport& rImport,
81 sal_uInt16 nPrfx,
82 const ::rtl::OUString& rLName,
83 const ::com::sun::star::uno::Reference<
84 ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
85 ::com::sun::star::text::TextContentAnchorType eDfltAnchorType );
86 virtual ~XMLTextFrameContext();
88 virtual void EndElement();
90 SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
91 const ::rtl::OUString& rLocalName,
92 const ::com::sun::star::uno::Reference<
93 ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
95 void SetHyperlink( const ::rtl::OUString& rHRef,
96 const ::rtl::OUString& rName,
97 const ::rtl::OUString& rTargetFrameName,
98 sal_Bool bMap );
100 ::com::sun::star::text::TextContentAnchorType GetAnchorType() const;
102 ::com::sun::star::uno::Reference <
103 ::com::sun::star::text::XTextContent > GetTextContent() const;
104 // --> OD 2004-08-24 #i33242#
105 ::com::sun::star::uno::Reference <
106 ::com::sun::star::drawing::XShape > GetShape() const;
107 // <--
111 #endif