1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #ifndef SW_UNOSECTION_HXX 29*cdf0e10cSrcweir #define SW_UNOSECTION_HXX 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include <com/sun/star/lang/XUnoTunnel.hpp> 32*cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 33*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 34*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertyState.hpp> 35*cdf0e10cSrcweir #include <com/sun/star/beans/XMultiPropertySet.hpp> 36*cdf0e10cSrcweir #include <com/sun/star/container/XNamed.hpp> 37*cdf0e10cSrcweir #include <com/sun/star/text/XTextContent.hpp> 38*cdf0e10cSrcweir #include <com/sun/star/text/XTextSection.hpp> 39*cdf0e10cSrcweir 40*cdf0e10cSrcweir #include <cppuhelper/implbase7.hxx> 41*cdf0e10cSrcweir 42*cdf0e10cSrcweir #include <sfx2/Metadatable.hxx> 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir #include <unobaseclass.hxx> 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir class SwSectionFmt; 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir /*-----------------09.03.98 13:57------------------- 51*cdf0e10cSrcweir 52*cdf0e10cSrcweir --------------------------------------------------*/ 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir struct SwTextSectionProperties_Impl; 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir typedef ::cppu::ImplInheritanceHelper7 58*cdf0e10cSrcweir < ::sfx2::MetadatableMixin 59*cdf0e10cSrcweir , ::com::sun::star::lang::XUnoTunnel 60*cdf0e10cSrcweir , ::com::sun::star::lang::XServiceInfo 61*cdf0e10cSrcweir , ::com::sun::star::beans::XPropertySet 62*cdf0e10cSrcweir , ::com::sun::star::beans::XPropertyState 63*cdf0e10cSrcweir , ::com::sun::star::beans::XMultiPropertySet 64*cdf0e10cSrcweir , ::com::sun::star::container::XNamed 65*cdf0e10cSrcweir , ::com::sun::star::text::XTextSection 66*cdf0e10cSrcweir > SwXTextSection_Base; 67*cdf0e10cSrcweir 68*cdf0e10cSrcweir class SwXTextSection 69*cdf0e10cSrcweir : public SwXTextSection_Base 70*cdf0e10cSrcweir { 71*cdf0e10cSrcweir 72*cdf0e10cSrcweir private: 73*cdf0e10cSrcweir 74*cdf0e10cSrcweir class Impl; 75*cdf0e10cSrcweir ::sw::UnoImplPtr<Impl> m_pImpl; 76*cdf0e10cSrcweir 77*cdf0e10cSrcweir SwXTextSection(SwSectionFmt *const pFmt, const bool bIndexHeader = false); 78*cdf0e10cSrcweir 79*cdf0e10cSrcweir virtual ~SwXTextSection(); 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir public: 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir SwSectionFmt* GetFmt() const; 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir static ::com::sun::star::uno::Reference< 86*cdf0e10cSrcweir ::com::sun::star::text::XTextSection > 87*cdf0e10cSrcweir CreateXTextSection(SwSectionFmt *const pFmt = 0, 88*cdf0e10cSrcweir const bool bIndexHeader = false); 89*cdf0e10cSrcweir 90*cdf0e10cSrcweir // MetadatableMixin 91*cdf0e10cSrcweir virtual ::sfx2::Metadatable* GetCoreObject(); 92*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > 93*cdf0e10cSrcweir GetModel(); 94*cdf0e10cSrcweir 95*cdf0e10cSrcweir static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir // XUnoTunnel 98*cdf0e10cSrcweir virtual sal_Int64 SAL_CALL getSomething( 99*cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier) 100*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 101*cdf0e10cSrcweir 102*cdf0e10cSrcweir // XServiceInfo 103*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 104*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 105*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( 106*cdf0e10cSrcweir const ::rtl::OUString& rServiceName) 107*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 108*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL 109*cdf0e10cSrcweir getSupportedServiceNames() 110*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 111*cdf0e10cSrcweir 112*cdf0e10cSrcweir // XComponent 113*cdf0e10cSrcweir virtual void SAL_CALL dispose() 114*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 115*cdf0e10cSrcweir virtual void SAL_CALL addEventListener( 116*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 117*cdf0e10cSrcweir ::com::sun::star::lang::XEventListener > & xListener) 118*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 119*cdf0e10cSrcweir virtual void SAL_CALL removeEventListener( 120*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 121*cdf0e10cSrcweir ::com::sun::star::lang::XEventListener > & xListener) 122*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 123*cdf0e10cSrcweir 124*cdf0e10cSrcweir // XPropertySet 125*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< 126*cdf0e10cSrcweir ::com::sun::star::beans::XPropertySetInfo > SAL_CALL 127*cdf0e10cSrcweir getPropertySetInfo() 128*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 129*cdf0e10cSrcweir virtual void SAL_CALL setPropertyValue( 130*cdf0e10cSrcweir const ::rtl::OUString& rPropertyName, 131*cdf0e10cSrcweir const ::com::sun::star::uno::Any& rValue) 132*cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 133*cdf0e10cSrcweir ::com::sun::star::beans::PropertyVetoException, 134*cdf0e10cSrcweir ::com::sun::star::lang::IllegalArgumentException, 135*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 136*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 137*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( 138*cdf0e10cSrcweir const ::rtl::OUString& rPropertyName) 139*cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 140*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 141*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 142*cdf0e10cSrcweir virtual void SAL_CALL addPropertyChangeListener( 143*cdf0e10cSrcweir const ::rtl::OUString& rPropertyName, 144*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 145*cdf0e10cSrcweir ::com::sun::star::beans::XPropertyChangeListener >& xListener) 146*cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 147*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 148*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 149*cdf0e10cSrcweir virtual void SAL_CALL removePropertyChangeListener( 150*cdf0e10cSrcweir const ::rtl::OUString& rPropertyName, 151*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 152*cdf0e10cSrcweir ::com::sun::star::beans::XPropertyChangeListener >& xListener) 153*cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 154*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 155*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 156*cdf0e10cSrcweir virtual void SAL_CALL addVetoableChangeListener( 157*cdf0e10cSrcweir const ::rtl::OUString& rPropertyName, 158*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 159*cdf0e10cSrcweir ::com::sun::star::beans::XVetoableChangeListener >& xListener) 160*cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 161*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 162*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 163*cdf0e10cSrcweir virtual void SAL_CALL removeVetoableChangeListener( 164*cdf0e10cSrcweir const ::rtl::OUString& rPropertyName, 165*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 166*cdf0e10cSrcweir ::com::sun::star::beans::XVetoableChangeListener >& xListener) 167*cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 168*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 169*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 170*cdf0e10cSrcweir 171*cdf0e10cSrcweir // XPropertyState 172*cdf0e10cSrcweir virtual ::com::sun::star::beans::PropertyState SAL_CALL 173*cdf0e10cSrcweir getPropertyState(const ::rtl::OUString& rPropertyName) 174*cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 175*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 176*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< 177*cdf0e10cSrcweir ::com::sun::star::beans::PropertyState > SAL_CALL 178*cdf0e10cSrcweir getPropertyStates( 179*cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< 180*cdf0e10cSrcweir ::rtl::OUString >& rPropertyNames) 181*cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 182*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 183*cdf0e10cSrcweir virtual void SAL_CALL setPropertyToDefault( 184*cdf0e10cSrcweir const ::rtl::OUString& rPropertyName) 185*cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 186*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 187*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( 188*cdf0e10cSrcweir const ::rtl::OUString& rPropertyName) 189*cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 190*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 191*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 192*cdf0e10cSrcweir 193*cdf0e10cSrcweir // XMultiPropertySet 194*cdf0e10cSrcweir virtual void SAL_CALL setPropertyValues( 195*cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< ::rtl::OUString >& 196*cdf0e10cSrcweir rPropertyNames, 197*cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< 198*cdf0e10cSrcweir ::com::sun::star::uno::Any >& rValues) 199*cdf0e10cSrcweir throw (::com::sun::star::beans::PropertyVetoException, 200*cdf0e10cSrcweir ::com::sun::star::lang::IllegalArgumentException, 201*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 202*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 203*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > 204*cdf0e10cSrcweir SAL_CALL getPropertyValues( 205*cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< ::rtl::OUString >& 206*cdf0e10cSrcweir rPropertyNames) 207*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 208*cdf0e10cSrcweir virtual void SAL_CALL addPropertiesChangeListener( 209*cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< ::rtl::OUString >& 210*cdf0e10cSrcweir rPropertyNames, 211*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 212*cdf0e10cSrcweir ::com::sun::star::beans::XPropertiesChangeListener >& xListener) 213*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 214*cdf0e10cSrcweir virtual void SAL_CALL removePropertiesChangeListener( 215*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 216*cdf0e10cSrcweir ::com::sun::star::beans::XPropertiesChangeListener >& xListener) 217*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 218*cdf0e10cSrcweir virtual void SAL_CALL firePropertiesChangeEvent( 219*cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< ::rtl::OUString >& 220*cdf0e10cSrcweir rPropertyNames, 221*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 222*cdf0e10cSrcweir ::com::sun::star::beans::XPropertiesChangeListener >& xListener) 223*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 224*cdf0e10cSrcweir 225*cdf0e10cSrcweir // XNamed 226*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getName() 227*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 228*cdf0e10cSrcweir virtual void SAL_CALL setName(const ::rtl::OUString& rName) 229*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 230*cdf0e10cSrcweir 231*cdf0e10cSrcweir // XTextContent 232*cdf0e10cSrcweir virtual void SAL_CALL attach( 233*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 234*cdf0e10cSrcweir ::com::sun::star::text::XTextRange > & xTextRange) 235*cdf0e10cSrcweir throw (::com::sun::star::lang::IllegalArgumentException, 236*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 237*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< 238*cdf0e10cSrcweir ::com::sun::star::text::XTextRange > SAL_CALL getAnchor() 239*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 240*cdf0e10cSrcweir 241*cdf0e10cSrcweir // XTextSection 242*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< 243*cdf0e10cSrcweir ::com::sun::star::text::XTextSection > SAL_CALL 244*cdf0e10cSrcweir getParentSection() 245*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 246*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< 247*cdf0e10cSrcweir ::com::sun::star::uno::Reference< 248*cdf0e10cSrcweir ::com::sun::star::text::XTextSection > > SAL_CALL 249*cdf0e10cSrcweir getChildSections() 250*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 251*cdf0e10cSrcweir 252*cdf0e10cSrcweir }; 253*cdf0e10cSrcweir 254*cdf0e10cSrcweir #endif // SW_UNOSECTION_HXX 255*cdf0e10cSrcweir 256