1*4c5491eaSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*4c5491eaSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*4c5491eaSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*4c5491eaSAndrew Rist * distributed with this work for additional information 6*4c5491eaSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*4c5491eaSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*4c5491eaSAndrew Rist * "License"); you may not use this file except in compliance 9*4c5491eaSAndrew Rist * with the License. You may obtain a copy of the License at 10*4c5491eaSAndrew Rist * 11*4c5491eaSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*4c5491eaSAndrew Rist * 13*4c5491eaSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*4c5491eaSAndrew Rist * software distributed under the License is distributed on an 15*4c5491eaSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*4c5491eaSAndrew Rist * KIND, either express or implied. See the License for the 17*4c5491eaSAndrew Rist * specific language governing permissions and limitations 18*4c5491eaSAndrew Rist * under the License. 19*4c5491eaSAndrew Rist * 20*4c5491eaSAndrew Rist *************************************************************/ 21*4c5491eaSAndrew Rist 22*4c5491eaSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _SVX_UNOPRACC_HXX 25cdf0e10cSrcweir #define _SVX_UNOPRACC_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <editeng/unotext.hxx> 28cdf0e10cSrcweir 29cdf0e10cSrcweir 30cdf0e10cSrcweir class SvxEditSource; 31cdf0e10cSrcweir 32cdf0e10cSrcweir /** Wraps SvxUnoTextRangeBase and provides us with the text properties 33cdf0e10cSrcweir 34cdf0e10cSrcweir Inherits from SvxUnoTextRangeBase and provides XPropertySet and 35cdf0e10cSrcweir XMultiPropertySet interfaces. Just set the selection to the 36cdf0e10cSrcweir required text range and return a reference to a XPropertySet. 37cdf0e10cSrcweir */ 38cdf0e10cSrcweir class SvxAccessibleTextPropertySet : public SvxUnoTextRangeBase, 39cdf0e10cSrcweir public ::com::sun::star::lang::XTypeProvider, 40cdf0e10cSrcweir public ::cppu::OWeakObject 41cdf0e10cSrcweir { 42cdf0e10cSrcweir public: 43cdf0e10cSrcweir SvxAccessibleTextPropertySet( const SvxEditSource*, const SvxItemPropertySet* ); 44cdf0e10cSrcweir virtual ~SvxAccessibleTextPropertySet() throw(); 45cdf0e10cSrcweir 46cdf0e10cSrcweir // XTextRange 47cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException); 48cdf0e10cSrcweir 49cdf0e10cSrcweir // uno::XInterface 50cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); 51cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); 52cdf0e10cSrcweir virtual void SAL_CALL acquire() throw(); 53cdf0e10cSrcweir virtual void SAL_CALL release() throw(); 54cdf0e10cSrcweir 55cdf0e10cSrcweir // lang::XServiceInfo 56cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); 57cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ) throw (::com::sun::star::uno::RuntimeException); 58cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException); 59cdf0e10cSrcweir 60cdf0e10cSrcweir // lang::XTypeProvider 61cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); 62cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); 63cdf0e10cSrcweir 64cdf0e10cSrcweir // XServiceName 65cdf0e10cSrcweir ::rtl::OUString SAL_CALL getServiceName() throw (::com::sun::star::uno::RuntimeException); 66cdf0e10cSrcweir }; 67cdf0e10cSrcweir 68cdf0e10cSrcweir #endif 69cdf0e10cSrcweir 70