summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drtxtob1.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-11-16 08:21:31 +0000
committerOliver Bolte <obo@openoffice.org>2005-11-16 08:21:31 +0000
commitb989af0ef3add4d4b066b16d4c31286f7fca3cfb (patch)
tree3c315e42232dd2238dc4345d187cd4ecd6afdb54 /sd/source/ui/view/drtxtob1.cxx
parent28431bdfa996a424a70e84266aab6761a93d81ee (diff)
INTEGRATION: CWS thaiissues (1.21.10); FILE MERGED
2005/10/26 11:05:11 cl 1.21.10.1: #i42732# use script type from input language for font and font height when no text selected
Diffstat (limited to 'sd/source/ui/view/drtxtob1.cxx')
-rw-r--r--sd/source/ui/view/drtxtob1.cxx28
1 files changed, 26 insertions, 2 deletions
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 34801deba418..98e6a39b704f 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: drtxtob1.cxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: rt $ $Date: 2005-09-09 07:07:15 $
+ * last change: $Author: obo $ $Date: 2005-11-16 09:21:31 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -584,6 +584,30 @@ void TextObjectBar::Execute( SfxRequest &rReq )
nSlot == SID_ATTR_CHAR_WEIGHT )
{
USHORT nScriptType = pView->GetScriptType();
+
+ if( (nSlot == SID_ATTR_CHAR_FONT) || (nSlot == 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 );
+ }
+ }
+ }
+
SfxItemPool& rPool = pView->GetDoc()->GetPool();
SvxScriptSetItem aSvxScriptSetItem( nSlot, rPool );
aSvxScriptSetItem.PutItemForScriptType( nScriptType, pArgs->Get( rPool.GetWhich( nSlot ) ) );