summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorJeremy Brown <jeremy.r.brown@gmail.com>2012-11-11 08:06:46 +0100
committerTor Lillqvist <tml@iki.fi>2012-11-12 10:23:58 +0000
commitb4d1aaa074e2be9fd778134c40f99d2ab8a01e93 (patch)
treee98461df70117ee86bea8103722d9d97d85dbbf0 /cui
parentfa637c4dff0a59922a726ff42fdf1f5f0354d2d6 (diff)
fdo#36324 fdo#42929 - option to ingore system input language changes
Created a new checkbox on the Langauges options page: [] Ignore system input language This is unchecked by default so that the current behavior remains the default, i.e. newly entered text will be flagged as whatever the current system input language is. When checked however, this instructs LibreOffice to ignore the system language (on Windows for example, the language from the Language Bar) when determining the language for newly entered text. This is handled in the lcl_isNonDefaultLanguage method of sw/source/ui/docvw/edtwin.cxx. The option is also saved in registrymodifications.xcu There are two main use cases: 1. This allows someone to use a single "international" keyboard on Windows to type in multiple languages, (e.g. English, French, Spanish) without changing the system keyboard. The person is then responsible for setting the language for each word or run of text themselves in LibreOffice. This seems to be the preferred workflow for some translators and some educators developing language materials. 2. This allows someone writing in a minority language that is not represented in one of Windows' locale options to still be able to type in LibreOffice in their language using a keyboard tagged for another language. Once they set the language in LibreOffice (e.g. to Teke-Eboo [ebo_CG]), they can type with a keyboard as being for "Swahili" but still succeed in entering new text in their language. This allows spell-checking to work properly without them having to select each new word they enter and reset the language of that word to Teke-Eboo (as is currently the case). Change-Id: I86248f5865b69048eb1f3e427a8c03b093138796 Reviewed-on: https://gerrit.libreoffice.org/1029 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optgdlg.cxx10
-rw-r--r--cui/source/options/optgdlg.hrc1
-rw-r--r--cui/source/options/optgdlg.hxx1
-rw-r--r--cui/source/options/optgdlg.src69
4 files changed, 50 insertions, 31 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 6567e7bbffc5..84a8d3e51f9a 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1222,6 +1222,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe
aAsianSupportCB(this, CUI_RES(CB_ASIANSUPPORT )),
aCTLSupportFI(this, CUI_RES(FI_CTLSUPPORT )),
aCTLSupportCB(this, CUI_RES(CB_CTLSUPPORT )),
+ aIgnoreLanguageChangeCB(this, CUI_RES(CB_IGNORE_LANG_CHANGE )),
sDecimalSeparatorLabel(aDecimalSeparatorCB.GetText()),
pLangConfig(new LanguageConfig_Impl)
{
@@ -1347,6 +1348,8 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe
aCTLSupportCB.Enable(!bReadonly);
aCTLSupportFI.Show(bReadonly);
SupportHdl( &aCTLSupportCB );
+
+ aIgnoreLanguageChangeCB.Check( pLangConfig->aSysLocaleOptions.IsIgnoreLanguageChange() );
}
OfaLanguagesTabPage::~OfaLanguagesTabPage()
@@ -1514,6 +1517,9 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
if(aDecimalSeparatorCB.GetSavedValue() != aDecimalSeparatorCB.IsChecked())
pLangConfig->aSysLocaleOptions.SetDecimalSeparatorAsLocale(aDecimalSeparatorCB.IsChecked());
+ if(aIgnoreLanguageChangeCB.GetSavedValue() != aIgnoreLanguageChangeCB.IsChecked())
+ pLangConfig->aSysLocaleOptions.SetIgnoreLanguageChange(aIgnoreLanguageChangeCB.IsChecked());
+
// Configured currency, for example, USD-en-US or EUR-de-DE, or empty for locale default.
OUString sOldCurr = pLangConfig->aSysLocaleOptions.GetCurrencyConfigString();
sal_uInt16 nCurrPos = aCurrencyLB.GetSelectEntryPos();
@@ -1659,6 +1665,9 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet )
aDecimalSeparatorCB.Check( pLangConfig->aSysLocaleOptions.IsDecimalSeparatorAsLocale());
aDecimalSeparatorCB.SaveValue();
+ aIgnoreLanguageChangeCB.Check( pLangConfig->aSysLocaleOptions.IsIgnoreLanguageChange());
+ aIgnoreLanguageChangeCB.SaveValue();
+
// let LocaleSettingHdl enable/disable checkboxes for CJK/CTL support
// #i15812# must be done *before* the configured currency is set
// and update the decimal separator used for the given locale
@@ -1775,6 +1784,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet )
aWesternLanguageLB.SaveValue();
aAsianLanguageLB.SaveValue();
aComplexLanguageLB.SaveValue();
+ aIgnoreLanguageChangeCB.SaveValue();
aCurrentDocCB.SaveValue();
sal_Bool bEnable = !pLangConfig->aLinguConfig.IsReadOnly( "DefaultLocale" );
diff --git a/cui/source/options/optgdlg.hrc b/cui/source/options/optgdlg.hrc
index f966338d95b9..47b244602f97 100644
--- a/cui/source/options/optgdlg.hrc
+++ b/cui/source/options/optgdlg.hrc
@@ -176,6 +176,7 @@
#define FI_DATEPATTERNS 32
#define FT_DATEPATTERNS 33
#define ED_DATEPATTERNS 34
+#define CB_IGNORE_LANG_CHANGE 35
#define FL_FILEDLG 53
#define FI_FILEDLG_RO 54
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index d8fc1ab922bb..a9074eefeae8 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -185,6 +185,7 @@ class OfaLanguagesTabPage : public SfxTabPage
CheckBox aAsianSupportCB;
ReadOnlyImage aCTLSupportFI;
CheckBox aCTLSupportCB;
+ CheckBox aIgnoreLanguageChangeCB;
const String sDecimalSeparatorLabel;
diff --git a/cui/source/options/optgdlg.src b/cui/source/options/optgdlg.src
index ab6b34122de4..41ce88c6c9ca 100644
--- a/cui/source/options/optgdlg.src
+++ b/cui/source/options/optgdlg.src
@@ -455,20 +455,20 @@ TabPage OFA_TP_LANGUAGES
};
FixedImage FI_USERINTERFACE
{
- Pos = MAP_APPFONT ( 5 , 17 ) ;
+ Pos = MAP_APPFONT ( 5 , 17-1 ) ;
Size = MAP_APPFONT ( 6 , 6 ) ;
Hide = TRUE;
};
FixedText FT_USERINTERFACE
{
- Pos = MAP_APPFONT ( 12 , 16 ) ;
+ Pos = MAP_APPFONT ( 12 , 16-1 ) ;
Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "~User interface";
};
ListBox LB_USERINTERFACE
{
HelpID = "cui:ListBox:OFA_TP_LANGUAGES:LB_USERINTERFACE";
- Pos = MAP_APPFONT ( 123 , 14 ) ;
+ Pos = MAP_APPFONT ( 123 , 14-1 ) ;
Size = MAP_APPFONT ( 125 , 60 ) ;
DropDown = TRUE ;
Border = TRUE ;
@@ -477,20 +477,20 @@ TabPage OFA_TP_LANGUAGES
};
FixedImage FI_LOCALESETTING
{
- Pos = MAP_APPFONT ( 5 , 32 ) ;
+ Pos = MAP_APPFONT ( 5 , 32-2 ) ;
Size = MAP_APPFONT ( 6 , 6 ) ;
Hide = TRUE;
};
FixedText FT_LOCALESETTING
{
- Pos = MAP_APPFONT ( 12 , 31 ) ;
+ Pos = MAP_APPFONT ( 12 , 31-2 ) ;
Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "Locale setting";
};
ListBox LB_LOCALESETTING
{
HelpID = "cui:ListBox:OFA_TP_LANGUAGES:LB_LOCALESETTING";
- Pos = MAP_APPFONT ( 123 , 30 ) ;
+ Pos = MAP_APPFONT ( 123 , 30-2 ) ;
Size = MAP_APPFONT ( 125 , 60 ) ;
DropDown = TRUE ;
Border = TRUE ;
@@ -499,33 +499,33 @@ TabPage OFA_TP_LANGUAGES
};
FixedText FT_DECIMALSEPARATOR
{
- Pos = MAP_APPFONT ( 12 , 46 ) ;
+ Pos = MAP_APPFONT ( 12 , 46-3 ) ;
Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "Decimal separator key";
};
CheckBox CB_DECIMALSEPARATOR
{
HelpID = "cui:CheckBox:OFA_TP_LANGUAGES:CB_DECIMALSEPARATOR";
- Pos = MAP_APPFONT ( 123 , 46) ;
+ Pos = MAP_APPFONT ( 123 , 46-3) ;
Size = MAP_APPFONT ( 125 , RSC_CD_CHECKBOX_HEIGHT ) ;
Text [ en-US ] = "~Same as locale setting ( %1 )";
};
FixedImage FI_CURRENCY
{
- Pos = MAP_APPFONT ( 5 , 63 ) ;
+ Pos = MAP_APPFONT ( 5 , 63-4 ) ;
Size = MAP_APPFONT ( 6 , 6 ) ;
Hide = TRUE;
};
FixedText FT_CURRENCY
{
- Pos = MAP_APPFONT ( 12 , 61 ) ;
+ Pos = MAP_APPFONT ( 12 , 61-4 ) ;
Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "~Default currency";
};
ListBox LB_CURRENCY
{
HelpID = "cui:ListBox:OFA_TP_LANGUAGES:LB_CURRENCY";
- Pos = MAP_APPFONT ( 123 , 59 ) ;
+ Pos = MAP_APPFONT ( 123 , 59-4 ) ;
Size = MAP_APPFONT ( 125 , 60 ) ;
DropDown = TRUE ;
Border = TRUE ;
@@ -534,39 +534,39 @@ TabPage OFA_TP_LANGUAGES
};
FixedImage FI_DATEPATTERNS
{
- Pos = MAP_APPFONT ( 5 , 78 ) ;
+ Pos = MAP_APPFONT ( 5 , 78-5 ) ;
Size = MAP_APPFONT ( 6 , 6 ) ;
Hide = TRUE;
};
FixedText FT_DATEPATTERNS
{
- Pos = MAP_APPFONT ( 12 , 76 ) ;
+ Pos = MAP_APPFONT ( 12 , 76-5 ) ;
Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "Date acceptance ~patterns";
};
Edit ED_DATEPATTERNS
{
HelpID = "cui:Edit:OFA_TP_LANGUAGES:ED_DATEPATTERNS";
- Pos = MAP_APPFONT ( 123 , 74 ) ;
+ Pos = MAP_APPFONT ( 123 , 74-5 ) ;
Size = MAP_APPFONT ( 125 , 12 ) ;
Border = TRUE ;
TabStop = TRUE ;
};
FixedLine FL_LINGU_LANG
{
- Pos = MAP_APPFONT ( 6 , 92 ) ;
+ Pos = MAP_APPFONT ( 6 , 92-5 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Default languages for documents";
};
FixedImage FI_WEST_LANG
{
- Pos = MAP_APPFONT ( 5 , 107 ) ;
+ Pos = MAP_APPFONT ( 5 , 107-6 ) ;
Size = MAP_APPFONT ( 6 , 6 ) ;
Hide = TRUE;
};
FixedText FT_WEST_LANG
{
- Pos = MAP_APPFONT ( 12 , 105 ) ;
+ Pos = MAP_APPFONT ( 12 , 105-6 ) ;
Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "Western";
};
@@ -574,7 +574,7 @@ TabPage OFA_TP_LANGUAGES
ListBox LB_WEST_LANG
{
HelpID = "cui:ListBox:OFA_TP_LANGUAGES:LB_WEST_LANG";
- Pos = MAP_APPFONT ( 123 , 103 ) ;
+ Pos = MAP_APPFONT ( 123 , 103-6 ) ;
Size = MAP_APPFONT ( 125 , 60 ) ;
DropDown = TRUE ;
Border = TRUE ;
@@ -583,20 +583,20 @@ TabPage OFA_TP_LANGUAGES
};
FixedImage FI_ASIAN_LANG
{
- Pos = MAP_APPFONT ( 5 , 123 ) ;
+ Pos = MAP_APPFONT ( 5 , 123-7 ) ;
Size = MAP_APPFONT ( 6 , 6 ) ;
Hide = TRUE;
};
FixedText FT_ASIAN_LANG
{
- Pos = MAP_APPFONT ( 12 , 121 ) ;
+ Pos = MAP_APPFONT ( 12 , 121-7 ) ;
Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "Asian";
};
ListBox LB_ASIAN_LANG
{
HelpID = "cui:ListBox:OFA_TP_LANGUAGES:LB_ASIAN_LANG";
- Pos = MAP_APPFONT ( 123 , 119 ) ;
+ Pos = MAP_APPFONT ( 123 , 119-7 ) ;
Size = MAP_APPFONT ( 125 , 60 ) ;
DropDown = TRUE ;
Border = TRUE ;
@@ -605,20 +605,20 @@ TabPage OFA_TP_LANGUAGES
};
FixedImage FI_COMPLEX_LANG
{
- Pos = MAP_APPFONT ( 5 , 139 ) ;
+ Pos = MAP_APPFONT ( 5 , 139-8 ) ;
Size = MAP_APPFONT ( 6 , 6 ) ;
Hide = TRUE;
};
FixedText FT_COMPLEX_LANG
{
- Pos = MAP_APPFONT ( 12 , 137 ) ;
+ Pos = MAP_APPFONT ( 12 , 137-8 ) ;
Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "C~TL";
};
ListBox LB_COMPLEX_LANG
{
HelpID = "cui:ListBox:OFA_TP_LANGUAGES:LB_COMPLEX_LANG";
- Pos = MAP_APPFONT ( 123 , 135 ) ;
+ Pos = MAP_APPFONT ( 123 , 135-8 ) ;
Size = MAP_APPFONT ( 125 , 60 ) ;
DropDown = TRUE ;
Border = TRUE ;
@@ -628,42 +628,49 @@ TabPage OFA_TP_LANGUAGES
CheckBox CB_CURRENT_DOC
{
HelpID = "cui:CheckBox:OFA_TP_LANGUAGES:CB_CURRENT_DOC";
- Pos = MAP_APPFONT ( 123 , 150 ) ;
+ Pos = MAP_APPFONT ( 123 , 150-8 ) ;
Size = MAP_APPFONT ( 125 , RSC_CD_CHECKBOX_HEIGHT ) ;
Text [ en-US ] = "For the current document only";
};
FixedLine FL_ENHANCED
{
- Pos = MAP_APPFONT ( 6 , 160 ) ;
+ Pos = MAP_APPFONT ( 6 , 160-8 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Enhanced language support";
};
FixedImage FI_ASIANSUPPORT
{
- Pos = MAP_APPFONT ( 5 , 175 ) ;
+ Pos = MAP_APPFONT ( 5 , 175-9 ) ;
Size = MAP_APPFONT ( 6 , 6 ) ;
Hide = TRUE;
};
CheckBox CB_ASIANSUPPORT
{
HelpID = "cui:CheckBox:OFA_TP_LANGUAGES:CB_ASIANSUPPORT";
- Pos = MAP_APPFONT ( 12 , 173 ) ;
+ Pos = MAP_APPFONT ( 12 , 173-9 ) ;
Size = MAP_APPFONT ( 236 ,RSC_CD_CHECKBOX_HEIGHT ) ;
- Text [ en-US ] = "Show UI elements for East Asia~n writings";
+ Text [ en-US ] = "Show UI elements for East Asia~n writings";
};
FixedImage FI_CTLSUPPORT
{
- Pos = MAP_APPFONT ( 5 , 190 ) ;
+ Pos = MAP_APPFONT ( 5 , 190-10 ) ;
Size = MAP_APPFONT ( 6 , 6 ) ;
Hide = TRUE;
};
CheckBox CB_CTLSUPPORT
{
HelpID = "cui:CheckBox:OFA_TP_LANGUAGES:CB_CTLSUPPORT";
- Pos = MAP_APPFONT ( 12 , 188 ) ;
+ Pos = MAP_APPFONT ( 12 , 188-10 ) ;
Size = MAP_APPFONT ( 236 , RSC_CD_CHECKBOX_HEIGHT ) ;
Text [ en-US ] = "Show UI elements for B~i-Directional writing";
};
+ CheckBox CB_IGNORE_LANG_CHANGE
+ {
+ HelpID = "cui:CheckBox:OFA_TP_LANGUAGES:CB_IGNORE_LANG_CHANGE";
+ Pos = MAP_APPFONT ( 12 , 188-11+15 ) ;
+ Size = MAP_APPFONT ( 125 , RSC_CD_CHECKBOX_HEIGHT ) ;
+ Text [ en-US ] = "Ignore s~ystem input language";
+ };
};
InfoBox RID_SVX_MSGBOX_LANGUAGE_RESTART