1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_accessibility.hxx"
26 
27 // includes --------------------------------------------------------------
28 #include <accessibility/standard/vclxaccessiblefixedtext.hxx>
29 
30 #include <unotools/accessiblestatesethelper.hxx>
31 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
32 #include <vcl/fixed.hxx>
33 
34 using namespace ::com::sun::star;
35 using namespace ::com::sun::star::uno;
36 using namespace ::com::sun::star::lang;
37 using namespace ::com::sun::star::beans;
38 using namespace ::com::sun::star::accessibility;
39 
40 
41 // -----------------------------------------------------------------------------
42 // VCLXAccessibleFixedText
43 // -----------------------------------------------------------------------------
44 
45 VCLXAccessibleFixedText::VCLXAccessibleFixedText( VCLXWindow* pVCLWindow )
46 	:VCLXAccessibleTextComponent( pVCLWindow )
47 {
48 }
49 
50 // -----------------------------------------------------------------------------
51 
52 VCLXAccessibleFixedText::~VCLXAccessibleFixedText()
53 {
54 }
55 
56 // -----------------------------------------------------------------------------
57 
58 void VCLXAccessibleFixedText::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet )
59 {
60 	VCLXAccessibleTextComponent::FillAccessibleStateSet( rStateSet );
61 
62 	if ( GetWindow() && GetWindow()->GetStyle() & WB_WORDBREAK )
63         rStateSet.AddState( AccessibleStateType::MULTI_LINE );
64 }
65 
66 // -----------------------------------------------------------------------------
67 
68 void VCLXAccessibleFixedText::implGetLineBoundary( i18n::Boundary& rBoundary, sal_Int32 nIndex )
69 {
70 	// TODO
71 	OCommonAccessibleText::implGetLineBoundary( rBoundary, nIndex );
72 }
73 
74 // -----------------------------------------------------------------------------
75 // XServiceInfo
76 // -----------------------------------------------------------------------------
77 
78 ::rtl::OUString VCLXAccessibleFixedText::getImplementationName() throw (RuntimeException)
79 {
80 	return ::rtl::OUString::createFromAscii( "com.sun.star.comp.toolkit.AccessibleFixedText" );
81 }
82 
83 // -----------------------------------------------------------------------------
84 
85 Sequence< ::rtl::OUString > VCLXAccessibleFixedText::getSupportedServiceNames() throw (RuntimeException)
86 {
87 	Sequence< ::rtl::OUString > aNames(1);
88 	aNames[0] = ::rtl::OUString::createFromAscii( "com.sun.star.awt.AccessibleFixedText" );
89 	return aNames;
90 }
91 
92 // -----------------------------------------------------------------------------
93