vclxaccessibletextcomponent.cxx (0841af79) | vclxaccessibletextcomponent.cxx (21075d77) |
---|---|
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 --- 175 unchanged lines hidden (view full) --- 184 Sequence< PropertyValue > aValues; 185 ::rtl::OUString sText( implGetText() ); 186 187 if ( !implIsValidIndex( nIndex, sText.getLength() ) ) 188 throw IndexOutOfBoundsException(); 189 190 if ( GetWindow() ) 191 { | 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 --- 175 unchanged lines hidden (view full) --- 184 Sequence< PropertyValue > aValues; 185 ::rtl::OUString sText( implGetText() ); 186 187 if ( !implIsValidIndex( nIndex, sText.getLength() ) ) 188 throw IndexOutOfBoundsException(); 189 190 if ( GetWindow() ) 191 { |
192 Font aFont = GetWindow()->GetControlFont(); 193 sal_Int32 nBackColor = GetWindow()->GetControlBackground().GetColor(); 194 sal_Int32 nColor = GetWindow()->GetControlForeground().GetColor(); 195 ::std::auto_ptr< CharacterAttributesHelper > pHelper( new CharacterAttributesHelper( aFont, nBackColor, nColor ) ); | 192 Font aFont = GetWindow()->GetControlFont(); 193 194 sal_Int32 nBackColor = GetWindow()->GetControlBackground().GetColor(); 195 sal_Int32 nColor = GetWindow()->GetControlForeground().GetColor(); 196 197 // MT: Code with default font was introduced with the IA2 CWS, but I am not convinced that this is the correct font... 198 // Decide what to do when we have a concrete issue. 199 /* 200 Font aDefaultVCLFont; 201 OutputDevice* pDev = Application::GetDefaultDevice(); 202 if ( pDev ) 203 { 204 aDefaultVCLFont = pDev->GetSettings().GetStyleSettings().GetAppFont(); 205 if ( !aFont.GetName().Len() ) 206 { 207 String aDefaultName = aDefaultVCLFont.GetName(); 208 aFont.SetName( aDefaultName ); 209 } 210 if ( !aFont.GetHeight() ) 211 { 212 aFont.SetHeight( aDefaultVCLFont.GetHeight() ); 213 } 214 if ( aFont.GetWeight() == WEIGHT_DONTKNOW ) 215 { 216 aFont.SetWeight( aDefaultVCLFont.GetWeight() ); 217 } 218 219 //if nColor is -1, it may indicate that the default color black is using. 220 if ( nColor == -1) 221 { 222 nColor = aDefaultVCLFont.GetColor().GetColor(); 223 } 224 } 225 */ 226 227 // MT: Adjustment stuff was introduced with the IA2 CWS, but adjustment is not a character attribute... 228 // In case we reintroduce it, use adjustment as extra parameter for the CharacterAttributesHelper... 229 /* 230 WinBits aBits = GetWindow()->GetStyle(); 231 sal_Int16 nAdjust = -1; 232 if ( aBits & WB_LEFT ) 233 { 234 nAdjust = style::ParagraphAdjust_LEFT; 235 } 236 else if ( aBits & WB_RIGHT ) 237 { 238 nAdjust = style::ParagraphAdjust_RIGHT; 239 } 240 else if ( aBits & WB_CENTER ) 241 { 242 nAdjust = style::ParagraphAdjust_CENTER; 243 } 244 */ 245 246 ::std::auto_ptr< CharacterAttributesHelper > pHelper( new CharacterAttributesHelper( aFont, nBackColor, nColor ) ); 247 |
196 aValues = pHelper->GetCharacterAttributes( aRequestedAttributes ); 197 } 198 199 return aValues; 200} 201 202// ----------------------------------------------------------------------------- 203 --- 155 unchanged lines hidden --- | 248 aValues = pHelper->GetCharacterAttributes( aRequestedAttributes ); 249 } 250 251 return aValues; 252} 253 254// ----------------------------------------------------------------------------- 255 --- 155 unchanged lines hidden --- |