INTEGRATION: CWS thaiissues (1.20.12); FILE MERGED

2005/10/26 11:05:11 cl 1.20.12.2: #i42732# use script type from input language for font and font height when no text selected
2005/10/14 17:24:48 cl 1.20.12.1: #i55928# prefer input language for font listbox when no text selected
This commit is contained in:
Oliver Bolte 2005-11-16 08:21:17 +00:00
parent 34712035bc
commit 28431bdfa9

View file

@ -4,9 +4,9 @@
*
* $RCSfile: drtxtob.cxx,v $
*
* $Revision: 1.20 $
* $Revision: 1.21 $
*
* last change: $Author: rt $ $Date: 2005-09-09 07:07:01 $
* last change: $Author: obo $ $Date: 2005-11-16 09:21:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -236,6 +236,30 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
aSetItem.GetItemSet().Put( aAttrSet, FALSE );
USHORT nScriptType = pView->GetScriptType();
if( (nSlotId == SID_ATTR_CHAR_FONT) || (nSlotId == SID_ATTR_CHAR_FONTHEIGHT) )
{
// #42732# input language should be preferred over
// current cursor position to detect script type
OutlinerView* pOLV = pView->GetTextEditOutlinerView();
if (pView->ISA(OutlineView))
{
pOLV = static_cast<OutlineView*>(pView)->GetViewByWindow(
pViewShell->GetActiveWindow());
}
if(pOLV && !pOLV->GetSelection().HasRange())
{
if( pViewShell && pViewShell->GetViewShell() && pViewShell->GetViewShell()->GetWindow() )
{
LanguageType nInputLang = pViewShell->GetViewShell()->GetWindow()->GetInputLanguage();
if(nInputLang != LANGUAGE_DONTKNOW && nInputLang != LANGUAGE_SYSTEM)
nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nInputLang );
}
}
}
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
if( pI )
aAttrSet.Put( *pI, nWhich );