summaryrefslogtreecommitdiff
path: root/sw/source/ui/shells/langhelper.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-07-25 09:57:31 +0000
committerOliver Bolte <obo@openoffice.org>2008-07-25 09:57:31 +0000
commitc3cae150561f1d62d696a995c774ea5503d82d49 (patch)
tree809f72707510b055cb01d1c79405a862839bfc01 /sw/source/ui/shells/langhelper.cxx
parent6496de72096be1effe2050591dc80bc851e1b5bf (diff)
INTEGRATION: CWS late30bf02 (1.3.48); FILE MERGED
2008/07/21 11:50:26 tl 1.3.48.1: #i91912# crash fixed; typo wrong array used...
Diffstat (limited to 'sw/source/ui/shells/langhelper.cxx')
-rwxr-xr-xsw/source/ui/shells/langhelper.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx
index 548500483728..e5e4dbe81b29 100755
--- a/sw/source/ui/shells/langhelper.cxx
+++ b/sw/source/ui/shells/langhelper.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: langhelper.cxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
@@ -310,14 +310,16 @@ namespace SwLangHelper
void SetLanguage_None(SwWrtShell &rWrtSh, EditEngine* pEditEngine,ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet )
{
- const USHORT aLangWhichId[3] =
+ // EditEngine IDs
+ const USHORT aLangWhichId_EE[3] =
{
EE_CHAR_LANGUAGE,
EE_CHAR_LANGUAGE_CJK,
EE_CHAR_LANGUAGE_CTL
};
- const USHORT aLangWhichId_res[3] =
+ // Writewr IDs
+ const USHORT aLangWhichId_Writer[3] =
{
RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_LANGUAGE,
@@ -330,14 +332,14 @@ namespace SwLangHelper
if (pEditEngine)
{
for (sal_uInt16 i = 0; i < 3; ++i)
- rCoreSet.Put( SvxLanguageItem( LANGUAGE_NONE, aLangWhichId[i] ));
+ rCoreSet.Put( SvxLanguageItem( LANGUAGE_NONE, aLangWhichId_EE[i] ));
pEditEngine->QuickSetAttribs( rCoreSet, aSelection);
}
else
{
rWrtSh.GetCurAttr( rCoreSet );
for (sal_uInt16 i = 0; i < 3; ++i)
- rCoreSet.Put( SvxLanguageItem( LANGUAGE_NONE, aLangWhichId[i] ));
+ rCoreSet.Put( SvxLanguageItem( LANGUAGE_NONE, aLangWhichId_Writer[i] ));
rWrtSh.SetAttr( rCoreSet );
}
}
@@ -346,8 +348,8 @@ namespace SwLangHelper
SvUShortsSort aAttribs;
for (sal_uInt16 i = 0; i < 3; ++i)
{
- rWrtSh.SetDefault( SvxLanguageItem( LANGUAGE_NONE, aLangWhichId_res[i] ) );
- aAttribs.Insert( aLangWhichId_res[i] );
+ rWrtSh.SetDefault( SvxLanguageItem( LANGUAGE_NONE, aLangWhichId_Writer[i] ) );
+ aAttribs.Insert( aLangWhichId_Writer[i] );
}
// set all language attributes to default