10841af79SAndrew Rist /************************************************************** 2*09e0ec10Smseidel * 30841af79SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 40841af79SAndrew Rist * or more contributor license agreements. See the NOTICE file 50841af79SAndrew Rist * distributed with this work for additional information 60841af79SAndrew Rist * regarding copyright ownership. The ASF licenses this file 70841af79SAndrew Rist * to you under the Apache License, Version 2.0 (the 80841af79SAndrew Rist * "License"); you may not use this file except in compliance 90841af79SAndrew Rist * with the License. You may obtain a copy of the License at 10*09e0ec10Smseidel * 110841af79SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*09e0ec10Smseidel * 130841af79SAndrew Rist * Unless required by applicable law or agreed to in writing, 140841af79SAndrew Rist * software distributed under the License is distributed on an 150841af79SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 160841af79SAndrew Rist * KIND, either express or implied. See the License for the 170841af79SAndrew Rist * specific language governing permissions and limitations 180841af79SAndrew Rist * under the License. 19*09e0ec10Smseidel * 200841af79SAndrew Rist *************************************************************/ 210841af79SAndrew Rist 220841af79SAndrew Rist 23*09e0ec10Smseidel 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_accessibility.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <floatingwindowaccessible.hxx> 28cdf0e10cSrcweir 29cdf0e10cSrcweir 30cdf0e10cSrcweir #include <com/sun/star/accessibility/AccessibleRelationType.hpp> 31cdf0e10cSrcweir #include <unotools/accessiblerelationsethelper.hxx> 32cdf0e10cSrcweir #include <vcl/window.hxx> 33cdf0e10cSrcweir 34cdf0e10cSrcweir namespace uno = ::com::sun::star::uno; 35cdf0e10cSrcweir 36cdf0e10cSrcweir using ::com::sun::star::accessibility::AccessibleRelation; 37cdf0e10cSrcweir namespace AccessibleRelationType = ::com::sun::star::accessibility::AccessibleRelationType; 38cdf0e10cSrcweir 39cdf0e10cSrcweir //------------------------------------------------------------------- 40cdf0e10cSrcweir FloatingWindowAccessible(VCLXWindow * pWindow)41cdf0e10cSrcweirFloatingWindowAccessible::FloatingWindowAccessible(VCLXWindow* pWindow) : 42*09e0ec10Smseidel VCLXAccessibleComponent(pWindow) 43cdf0e10cSrcweir { 44cdf0e10cSrcweir } 45cdf0e10cSrcweir 46cdf0e10cSrcweir //------------------------------------------------------------------- 47cdf0e10cSrcweir ~FloatingWindowAccessible()48cdf0e10cSrcweirFloatingWindowAccessible::~FloatingWindowAccessible() 49cdf0e10cSrcweir { 50cdf0e10cSrcweir } 51cdf0e10cSrcweir 52cdf0e10cSrcweir //------------------------------------------------------------------- 53cdf0e10cSrcweir FillAccessibleRelationSet(utl::AccessibleRelationSetHelper & rRelationSet)54cdf0e10cSrcweirvoid FloatingWindowAccessible::FillAccessibleRelationSet(utl::AccessibleRelationSetHelper& rRelationSet) 55cdf0e10cSrcweir { 56*09e0ec10Smseidel Window* pWindow = GetWindow(); 57*09e0ec10Smseidel if ( pWindow ) 58*09e0ec10Smseidel { 59*09e0ec10Smseidel Window* pParentWindow = pWindow->GetParent(); 60*09e0ec10Smseidel if( pParentWindow ) 61*09e0ec10Smseidel { 62*09e0ec10Smseidel uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); 63*09e0ec10Smseidel aSequence[0] = pParentWindow->GetAccessible(); 64*09e0ec10Smseidel rRelationSet.AddRelation( AccessibleRelation( AccessibleRelationType::SUB_WINDOW_OF, aSequence ) ); 65*09e0ec10Smseidel } 66*09e0ec10Smseidel } 67cdf0e10cSrcweir } 68