xref: /aoo41x/main/sfx2/source/sidebar/Accessible.hxx (revision ceb8636e)
13e0f1122SAndre Fischer /**************************************************************
23e0f1122SAndre Fischer  *
33e0f1122SAndre Fischer  * Licensed to the Apache Software Foundation (ASF) under one
43e0f1122SAndre Fischer  * or more contributor license agreements.  See the NOTICE file
53e0f1122SAndre Fischer  * distributed with this work for additional information
63e0f1122SAndre Fischer  * regarding copyright ownership.  The ASF licenses this file
73e0f1122SAndre Fischer  * to you under the Apache License, Version 2.0 (the
83e0f1122SAndre Fischer  * "License"); you may not use this file except in compliance
93e0f1122SAndre Fischer  * with the License.  You may obtain a copy of the License at
103e0f1122SAndre Fischer  *
113e0f1122SAndre Fischer  *   http://www.apache.org/licenses/LICENSE-2.0
123e0f1122SAndre Fischer  *
133e0f1122SAndre Fischer  * Unless required by applicable law or agreed to in writing,
143e0f1122SAndre Fischer  * software distributed under the License is distributed on an
153e0f1122SAndre Fischer  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
163e0f1122SAndre Fischer  * KIND, either express or implied.  See the License for the
173e0f1122SAndre Fischer  * specific language governing permissions and limitations
183e0f1122SAndre Fischer  * under the License.
193e0f1122SAndre Fischer  *
203e0f1122SAndre Fischer  *************************************************************/
213e0f1122SAndre Fischer 
223e0f1122SAndre Fischer #ifndef SFX_SIDEBAR_ACCESSIBLE_HXX
233e0f1122SAndre Fischer #define SFX_SIDEBAR_ACCESSIBLE_HXX
243e0f1122SAndre Fischer 
253e0f1122SAndre Fischer #include <com/sun/star/accessibility/XAccessible.hpp>
263e0f1122SAndre Fischer #include <com/sun/star/accessibility/XAccessibleContext.hpp>
273e0f1122SAndre Fischer 
283e0f1122SAndre Fischer #include <cppuhelper/compbase1.hxx>
293e0f1122SAndre Fischer #include <cppuhelper/basemutex.hxx>
30*ceb8636eSAndre Fischer #include <boost/noncopyable.hpp>
313e0f1122SAndre Fischer 
323e0f1122SAndre Fischer namespace css = ::com::sun::star;
333e0f1122SAndre Fischer namespace cssu = ::com::sun::star::uno;
343e0f1122SAndre Fischer 
353e0f1122SAndre Fischer namespace
363e0f1122SAndre Fischer {
373e0f1122SAndre Fischer     typedef ::cppu::WeakComponentImplHelper1 <
383e0f1122SAndre Fischer         css::accessibility::XAccessible
393e0f1122SAndre Fischer         > AccessibleInterfaceBase;
403e0f1122SAndre Fischer }
413e0f1122SAndre Fischer 
423e0f1122SAndre Fischer namespace sfx2 { namespace sidebar {
433e0f1122SAndre Fischer 
443e0f1122SAndre Fischer 
453e0f1122SAndre Fischer /** Simple implementation of the XAccessible interface.
463e0f1122SAndre Fischer     Its getAccessibleContext() method returns a context object given
473e0f1122SAndre Fischer     to its constructor.
483e0f1122SAndre Fischer */
493e0f1122SAndre Fischer class Accessible
503e0f1122SAndre Fischer     : private ::boost::noncopyable,
513e0f1122SAndre Fischer       private ::cppu::BaseMutex,
523e0f1122SAndre Fischer       public AccessibleInterfaceBase
533e0f1122SAndre Fischer {
543e0f1122SAndre Fischer public:
553e0f1122SAndre Fischer     Accessible (
563e0f1122SAndre Fischer         const cssu::Reference<css::accessibility::XAccessibleContext>& rxContext);
573e0f1122SAndre Fischer     virtual ~Accessible (void);
583e0f1122SAndre Fischer 
593e0f1122SAndre Fischer     virtual void SAL_CALL disposing (void);
603e0f1122SAndre Fischer 
613e0f1122SAndre Fischer 
623e0f1122SAndre Fischer     // XAccessible
633e0f1122SAndre Fischer     virtual cssu::Reference<css::accessibility::XAccessibleContext> SAL_CALL getAccessibleContext (void)
643e0f1122SAndre Fischer         throw (cssu::RuntimeException);
653e0f1122SAndre Fischer 
663e0f1122SAndre Fischer private:
673e0f1122SAndre Fischer     cssu::Reference<css::accessibility::XAccessibleContext> mxContext;
683e0f1122SAndre Fischer };
693e0f1122SAndre Fischer 
703e0f1122SAndre Fischer 
713e0f1122SAndre Fischer } } // end of namespace sfx2::sidebar
723e0f1122SAndre Fischer 
733e0f1122SAndre Fischer #endif
74