fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / svtools / source / toolpanel / toolpaneldeckpeer.cxx
blobf5a18d039272fc63279bbfc225f9e5204e95c14e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include "toolpaneldeckpeer.hxx"
22 #include "svtools/toolpanel/toolpaneldeck.hxx"
24 #include <com/sun/star/lang/DisposedException.hpp>
26 #include <tools/diagnose_ex.h>
27 #include <vcl/svapp.hxx>
29 //......................................................................................................................
30 namespace svt
32 //......................................................................................................................
34 using ::com::sun::star::uno::Reference;
35 using ::com::sun::star::uno::XInterface;
36 using ::com::sun::star::uno::UNO_QUERY;
37 using ::com::sun::star::uno::UNO_QUERY_THROW;
38 using ::com::sun::star::uno::UNO_SET_THROW;
39 using ::com::sun::star::uno::Exception;
40 using ::com::sun::star::uno::RuntimeException;
41 using ::com::sun::star::uno::Any;
42 using ::com::sun::star::uno::makeAny;
43 using ::com::sun::star::uno::Sequence;
44 using ::com::sun::star::uno::Type;
45 using ::com::sun::star::accessibility::XAccessibleContext;
46 using ::com::sun::star::lang::DisposedException;
48 //==================================================================================================================
49 //= ToolPanelDeckPeer
50 //==================================================================================================================
51 //------------------------------------------------------------------------------------------------------------------
52 ToolPanelDeckPeer::ToolPanelDeckPeer( ToolPanelDeck& i_rDeck )
53 :VCLXWindow()
54 ,m_pDeck( &i_rDeck )
58 //------------------------------------------------------------------------------------------------------------------
59 ToolPanelDeckPeer::~ToolPanelDeckPeer()
63 //------------------------------------------------------------------------------------------------------------------
64 Reference< XAccessibleContext > ToolPanelDeckPeer::CreateAccessibleContext()
66 SolarMutexGuard aSolarGuard;
67 if ( m_pDeck == NULL )
68 throw DisposedException( OUString(), *this );
70 Window* pAccessibleParent( m_pDeck->GetAccessibleParentWindow() );
71 ENSURE_OR_RETURN( pAccessibleParent != NULL, "no accessible parent => no accessible context", NULL );
72 Reference< XAccessible > xAccessibleParent( pAccessibleParent->GetAccessible(), UNO_SET_THROW );
73 return m_aAccessibleFactory.getFactory().createAccessibleToolPanelDeck( xAccessibleParent, *m_pDeck );
76 //------------------------------------------------------------------------------------------------------------------
77 void SAL_CALL ToolPanelDeckPeer::dispose() throw(RuntimeException)
80 SolarMutexGuard aSolarGuard;
81 m_pDeck = NULL;
83 VCLXWindow::dispose();
86 //......................................................................................................................
87 } // namespace svt
88 //......................................................................................................................
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */