Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / svx / source / accessibility / AccessibleShapeTreeInfo.cxx
blob70fd6e44d820f138a639b78e1cdafe99e2e13812
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 <svx/AccessibleShapeTreeInfo.hxx>
22 #include <vcl/svapp.hxx>
23 #include <vcl/window.hxx>
25 using namespace ::com::sun::star;
26 using namespace ::com::sun::star::accessibility;
27 using ::com::sun::star::uno::Reference;
29 namespace accessibility {
31 AccessibleShapeTreeInfo::AccessibleShapeTreeInfo()
32 : mpView (nullptr),
33 mpWindow (nullptr),
34 mpViewForwarder (nullptr)
36 // Empty.
40 AccessibleShapeTreeInfo::AccessibleShapeTreeInfo (const AccessibleShapeTreeInfo& rInfo)
41 : mxDocumentWindow (rInfo.mxDocumentWindow),
42 mxModelBroadcaster (rInfo.mxModelBroadcaster),
43 mpView (rInfo.mpView),
44 mxController (rInfo.mxController),
45 mpWindow (rInfo.mpWindow),
46 mpViewForwarder (rInfo.mpViewForwarder)
48 // Empty.
51 void AccessibleShapeTreeInfo::dispose()
53 mxDocumentWindow.clear();
54 mxModelBroadcaster.clear();
55 mpView = nullptr;
56 mxController.clear();
57 mpWindow.reset();
58 mpViewForwarder = nullptr;
61 AccessibleShapeTreeInfo& AccessibleShapeTreeInfo::operator= (const AccessibleShapeTreeInfo& rInfo)
63 if ( this != &rInfo )
65 mxDocumentWindow = rInfo.mxDocumentWindow;
66 mxModelBroadcaster = rInfo.mxModelBroadcaster;
67 mpView = rInfo.mpView;
68 mxController = rInfo.mxController;
69 mpWindow = rInfo.mpWindow;
70 mpViewForwarder = rInfo.mpViewForwarder;
72 return *this;
75 AccessibleShapeTreeInfo::~AccessibleShapeTreeInfo()
77 if (mpWindow)
79 SolarMutexGuard g;
80 mpWindow.reset();
84 void AccessibleShapeTreeInfo::SetDocumentWindow (
85 const Reference<XAccessibleComponent>& rxDocumentWindow)
87 if (mxDocumentWindow != rxDocumentWindow)
88 mxDocumentWindow = rxDocumentWindow;
91 void AccessibleShapeTreeInfo::SetModelBroadcaster (
92 const Reference<document::XShapeEventBroadcaster>& rxModelBroadcaster)
94 mxModelBroadcaster = rxModelBroadcaster;
97 void AccessibleShapeTreeInfo::SetSdrView (SdrView* pView)
99 mpView = pView;
102 void AccessibleShapeTreeInfo::SetController (
103 const Reference<frame::XController>& rxController)
105 mxController = rxController;
108 void AccessibleShapeTreeInfo::SetWindow(vcl::Window* pDevice)
110 mpWindow = pDevice;
113 void AccessibleShapeTreeInfo::SetViewForwarder (const IAccessibleViewForwarder* pViewForwarder)
115 mpViewForwarder = pViewForwarder;
118 } // end of namespace accessibility
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */