1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _XMLTEXTFRAMECONTEXT_HXX 29 #define _XMLTEXTFRAMECONTEXT_HXX 30 31 #ifndef _COM_SUN_STAR_TEXT_TEXTCONTENTANCHORTYPE_HPP 32 #include <com/sun/star/text/TextContentAnchorType.hpp> 33 #endif 34 #include <xmloff/xmlictxt.hxx> 35 36 namespace com { namespace sun { namespace star { 37 namespace text { class XTextCursor; class XTextContent; } 38 } } } 39 40 class SvXMLAttributeList; 41 class XMLTextFrameContextHyperlink_Impl; 42 43 class XMLTextFrameContext : public SvXMLImportContext 44 { 45 ::com::sun::star::uno::Reference< 46 ::com::sun::star::xml::sax::XAttributeList > m_xAttrList; 47 48 SvXMLImportContextRef m_xImplContext; 49 SvXMLImportContextRef m_xReplImplContext; 50 SvXMLAttributeList *m_pAttrList; 51 52 XMLTextFrameContextHyperlink_Impl *m_pHyperlink; 53 // --> OD 2009-07-22 #i73249# 54 ::rtl::OUString m_sTitle; 55 // <-- 56 ::rtl::OUString m_sDesc; 57 58 ::com::sun::star::text::TextContentAnchorType m_eDefaultAnchorType; 59 60 // --> OD 2006-03-10 #i51726# 61 // The <draw:name> can longer be used to distinguish Writer graphic/text box 62 // objects and Draw graphic/text box objects. 63 // The new distinguish attribute is the parent style of the automatic style 64 // of the object. All Draw objects have an automatic style without a parent style. 65 sal_Bool m_HasAutomaticStyleWithoutParentStyle; 66 // <-- 67 sal_Bool m_bSupportsReplacement; 68 69 sal_Bool CreateIfNotThere(); 70 sal_Bool CreateIfNotThere( ::com::sun::star::uno::Reference < 71 ::com::sun::star::beans::XPropertySet >& rPropSet ); 72 73 public: 74 75 TYPEINFO(); 76 77 XMLTextFrameContext( SvXMLImport& rImport, 78 sal_uInt16 nPrfx, 79 const ::rtl::OUString& rLName, 80 const ::com::sun::star::uno::Reference< 81 ::com::sun::star::xml::sax::XAttributeList > & xAttrList, 82 ::com::sun::star::text::TextContentAnchorType eDfltAnchorType ); 83 virtual ~XMLTextFrameContext(); 84 85 virtual void EndElement(); 86 87 SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, 88 const ::rtl::OUString& rLocalName, 89 const ::com::sun::star::uno::Reference< 90 ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); 91 92 void SetHyperlink( const ::rtl::OUString& rHRef, 93 const ::rtl::OUString& rName, 94 const ::rtl::OUString& rTargetFrameName, 95 sal_Bool bMap ); 96 97 ::com::sun::star::text::TextContentAnchorType GetAnchorType() const; 98 99 ::com::sun::star::uno::Reference < 100 ::com::sun::star::text::XTextContent > GetTextContent() const; 101 // --> OD 2004-08-24 #i33242# 102 ::com::sun::star::uno::Reference < 103 ::com::sun::star::drawing::XShape > GetShape() const; 104 // <-- 105 }; 106 107 108 #endif 109