1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _XMLTEXTFRAMEHYPERLINKCONTEXT_HXX
25 #define _XMLTEXTFRAMEHYPERLINKCONTEXT_HXX
26 
27 #ifndef _COM_SUN_STAR_TEXT_TEXTCONTENTANCHORTYPE_HPP
28 #include <com/sun/star/text/TextContentAnchorType.hpp>
29 #endif
30 #ifndef _COM_SUN_STAR_TEXT_XTEXTFRAME_HPP
31 #include <com/sun/star/text/XTextFrame.hpp>
32 #endif
33 #include <xmloff/xmlictxt.hxx>
34 
35 namespace com { namespace sun { namespace star {
36 	namespace text { class XTextCursor; class XTextFrame; }
37 	namespace beans { class XPropertySet; }
38 } } }
39 
40 // OD 2004-04-21 #i26791#
41 class XMLTextFrameHint_Impl;
42 
43 class XMLTextFrameHyperlinkContext : public SvXMLImportContext
44 {
45 	::rtl::OUString				 sHRef;
46 	::rtl::OUString				 sName;
47 	::rtl::OUString				 sTargetFrameName;
48 	::com::sun::star::text::TextContentAnchorType eDefaultAnchorType;
49 	SvXMLImportContextRef		xFrameContext;
50 	sal_Bool					bMap;
51 
52 public:
53 
54 	TYPEINFO();
55 
56 	XMLTextFrameHyperlinkContext( SvXMLImport& rImport,
57 			sal_uInt16 nPrfx,
58 			const ::rtl::OUString& rLName,
59 			const ::com::sun::star::uno::Reference<
60 				::com::sun::star::xml::sax::XAttributeList > & xAttrList,
61 			::com::sun::star::text::TextContentAnchorType eDefaultAnchorType );
62 	virtual ~XMLTextFrameHyperlinkContext();
63 
64 	virtual void EndElement();
65 
66 	SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
67 				const ::rtl::OUString& rLocalName,
68 			 	const ::com::sun::star::uno::Reference<
69 					::com::sun::star::xml::sax::XAttributeList > & xAttrList );
70 
71 	::com::sun::star::text::TextContentAnchorType GetAnchorType() const;
72 	::com::sun::star::uno::Reference <
73 		::com::sun::star::text::XTextContent > GetTextContent() const;
74     // --> OD 2004-08-24 #i33242#
75     ::com::sun::star::uno::Reference <
76         ::com::sun::star::drawing::XShape > GetShape() const;
77     // <--
78 };
79 
80 
81 #endif
82