summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--officecfg/registry/schema/org/openoffice/Setup.xcs8
-rw-r--r--sw/source/ui/docvw/edtwin.cxx12
-rw-r--r--unotools/inc/unotools/syslocaleoptions.hxx6
-rw-r--r--unotools/source/config/syslocaleoptions.cxx62
8 files changed, 135 insertions, 34 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
diff --git a/officecfg/registry/schema/org/openoffice/Setup.xcs b/officecfg/registry/schema/org/openoffice/Setup.xcs
index c818cd3cef5d..a542308770a5 100644
--- a/officecfg/registry/schema/org/openoffice/Setup.xcs
+++ b/officecfg/registry/schema/org/openoffice/Setup.xcs
@@ -457,6 +457,14 @@
</info>
<value>true</value>
</prop>
+ <prop oor:name="IgnoreLanguageChange" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <author>OS</author>
+ <desc>Indicates whether changes to the system input language/keyboard will be ignored. If ignored, when new text is typed that text will follow the language of the document or current paragraph, not the current system language.</desc>
+ <label>Ignore system input language.</label>
+ </info>
+ <value>false</value>
+ </prop>
<prop oor:name="DateAcceptancePatterns" oor:type="xs:string" oor:nillable="true">
<!-- UIHints: Tools - Options - Language Settings - Languages - Language of - Date acceptance patterns -->
<info>
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 99f315aa88f6..6a6d7443f1e2 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -149,6 +149,8 @@
#include "../../core/inc/rootfrm.hxx"
+#include <unotools/syslocaleoptions.hxx>
+
using namespace sw::mark;
using namespace ::com::sun::star;
@@ -773,6 +775,16 @@ static sal_uInt16 lcl_isNonDefaultLanguage(LanguageType eBufferLanguage, SwView&
const String &rInBuffer)
{
sal_uInt16 nWhich = INVALID_HINT;
+
+ //If the option to IgnoreLanguageChange is set, short-circuit this method
+ //which results in the document/paragraph language remaining the same
+ //despite a change to the keyboard/input language
+ SvtSysLocaleOptions aSysLocaleOptions;
+ if(aSysLocaleOptions.IsIgnoreLanguageChange())
+ {
+ return INVALID_HINT;
+ }
+
bool bLang = true;
if(eBufferLanguage != LANGUAGE_DONTKNOW)
{
diff --git a/unotools/inc/unotools/syslocaleoptions.hxx b/unotools/inc/unotools/syslocaleoptions.hxx
index 1c62ad809492..a7d1f84bbe9a 100644
--- a/unotools/inc/unotools/syslocaleoptions.hxx
+++ b/unotools/inc/unotools/syslocaleoptions.hxx
@@ -36,6 +36,7 @@ const sal_uLong SYSLOCALEOPTIONS_HINT_CURRENCY = 0x00000002;
const sal_uLong SYSLOCALEOPTIONS_HINT_UILOCALE = 0x00000004;
const sal_uLong SYSLOCALEOPTIONS_HINT_DECSEP = 0x00000008;
const sal_uLong SYSLOCALEOPTIONS_HINT_DATEPATTERNS = 0x00000010;
+const sal_uLong SYSLOCALEOPTIONS_HINT_IGNORELANG = 0x00000020;
class SvtSysLocaleOptions_Impl;
class SvtListener;
@@ -121,6 +122,11 @@ public:
sal_Bool IsDecimalSeparatorAsLocale() const;
void SetDecimalSeparatorAsLocale( sal_Bool bSet);
+ // determine whether to ignore changes to the system keyboard/locale/language when
+ // determining the language for newly entered text
+ sal_Bool IsIgnoreLanguageChange() const;
+ void SetIgnoreLanguageChange( sal_Bool bSet);
+
// convenience methods
/// Get currency abbreviation and locale from an USD-en-US or EUR-de-DE string
diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx
index 961ac7544c17..4f0f964034cb 100644
--- a/unotools/source/config/syslocaleoptions.cxx
+++ b/unotools/source/config/syslocaleoptions.cxx
@@ -79,12 +79,14 @@ class SvtSysLocaleOptions_Impl : public utl::ConfigItem
OUString m_aCurrencyString; // USD-en-US or EUR-de-DE
OUString m_aDatePatternsString; // "Y-M-D;M-D"
sal_Bool m_bDecimalSeparator; //use decimal separator same as locale
+ sal_Bool m_bIgnoreLanguageChange; //OS language change doesn't affect LO document language
sal_Bool m_bROLocale;
sal_Bool m_bROUILocale;
sal_Bool m_bROCurrency;
sal_Bool m_bRODatePatterns;
sal_Bool m_bRODecimalSeparator;
+ sal_Bool m_bROIgnoreLanguageChange;
static const Sequence< /* const */ OUString > GetPropertyNames();
void MakeRealLocale();
@@ -115,6 +117,9 @@ public:
sal_Bool IsDecimalSeparatorAsLocale() const { return m_bDecimalSeparator;}
void SetDecimalSeparatorAsLocale( sal_Bool bSet);
+
+ sal_Bool IsIgnoreLanguageChange() const { return m_bIgnoreLanguageChange;}
+ void SetIgnoreLanguageChange( sal_Bool bSet);
sal_Bool IsReadOnly( SvtSysLocaleOptions::EOption eOption ) const;
const Locale& GetRealLocale() { return m_aRealLocale; }
@@ -131,14 +136,17 @@ public:
#define PROPERTYNAME_CURRENCY OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupCurrency"))
#define PROPERTYNAME_DECIMALSEPARATOR OUString(RTL_CONSTASCII_USTRINGPARAM("DecimalSeparatorAsLocale"))
#define PROPERTYNAME_DATEPATTERNS OUString(RTL_CONSTASCII_USTRINGPARAM("DateAcceptancePatterns"))
+#define PROPERTYNAME_IGNORELANGCHANGE OUString(RTL_CONSTASCII_USTRINGPARAM("IgnoreLanguageChange"))
#define PROPERTYHANDLE_LOCALE 0
#define PROPERTYHANDLE_UILOCALE 1
#define PROPERTYHANDLE_CURRENCY 2
#define PROPERTYHANDLE_DECIMALSEPARATOR 3
#define PROPERTYHANDLE_DATEPATTERNS 4
+#define PROPERTYHANDLE_IGNORELANGCHANGE 5
-#define PROPERTYCOUNT 5
+//#define PROPERTYCOUNT 5
+#define PROPERTYCOUNT 6
const Sequence< OUString > SvtSysLocaleOptions_Impl::GetPropertyNames()
{
@@ -148,7 +156,8 @@ const Sequence< OUString > SvtSysLocaleOptions_Impl::GetPropertyNames()
PROPERTYNAME_UILOCALE,
PROPERTYNAME_CURRENCY,
PROPERTYNAME_DECIMALSEPARATOR,
- PROPERTYNAME_DATEPATTERNS
+ PROPERTYNAME_DATEPATTERNS,
+ PROPERTYNAME_IGNORELANGCHANGE
};
const Sequence< OUString > seqPropertyNames( pProperties, PROPERTYCOUNT );
return seqPropertyNames;
@@ -164,6 +173,7 @@ SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl()
, m_bROCurrency(CFG_READONLY_DEFAULT)
, m_bRODatePatterns(CFG_READONLY_DEFAULT)
, m_bRODecimalSeparator(sal_False)
+ , m_bROIgnoreLanguageChange(sal_False)
{
if ( IsValidConfigMgr() )
@@ -243,6 +253,18 @@ SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl()
m_bRODatePatterns = pROStates[nProp];
}
break;
+ case PROPERTYHANDLE_IGNORELANGCHANGE :
+ {
+ sal_Bool bValue = sal_Bool();
+ if ( pValues[nProp] >>= bValue )
+ m_bIgnoreLanguageChange = bValue;
+ else
+ {
+ SAL_WARN( "unotools.config", "Wrong property type!" );
+ }
+ m_bROIgnoreLanguageChange = pROStates[nProp];
+ }
+ break;
default:
SAL_WARN( "unotools.config", "Wrong property type!" );
}
@@ -368,7 +390,7 @@ void SvtSysLocaleOptions_Impl::Commit()
}
}
break;
- case PROPERTYHANDLE_DECIMALSEPARATOR:
+ case PROPERTYHANDLE_DECIMALSEPARATOR:
if( !m_bRODecimalSeparator )
{
pNames[nRealCount] = aOrgNames[nProp];
@@ -384,6 +406,14 @@ void SvtSysLocaleOptions_Impl::Commit()
++nRealCount;
}
break;
+ case PROPERTYHANDLE_IGNORELANGCHANGE :
+ if (!m_bROIgnoreLanguageChange)
+ {
+ pNames[nRealCount] = aOrgNames[nProp];
+ pValues[nRealCount] <<= m_bIgnoreLanguageChange;
+ ++nRealCount;
+ }
+ break;
default:
SAL_WARN( "unotools.config", "invalid index to save a path" );
}
@@ -454,6 +484,16 @@ void SvtSysLocaleOptions_Impl::SetDecimalSeparatorAsLocale( sal_Bool bSet)
}
}
+void SvtSysLocaleOptions_Impl::SetIgnoreLanguageChange( sal_Bool bSet)
+{
+ if(bSet != m_bIgnoreLanguageChange)
+ {
+ m_bIgnoreLanguageChange = bSet;
+ SetModified();
+ NotifyListeners( SYSLOCALEOPTIONS_HINT_IGNORELANG );
+ }
+}
+
void SvtSysLocaleOptions_Impl::Notify( const Sequence< rtl::OUString >& seqPropertyNames )
{
sal_uLong nHint = 0;
@@ -492,6 +532,11 @@ void SvtSysLocaleOptions_Impl::Notify( const Sequence< rtl::OUString >& seqPrope
seqValues[nProp] >>= m_bDecimalSeparator;
m_bRODecimalSeparator = seqROStates[nProp];
}
+ else if( seqPropertyNames[nProp] == PROPERTYNAME_IGNORELANGCHANGE )
+ {
+ seqValues[nProp] >>= m_bIgnoreLanguageChange;
+ m_bROIgnoreLanguageChange = seqROStates[nProp];
+ }
else if( seqPropertyNames[nProp] == PROPERTYNAME_DATEPATTERNS )
{
DBG_ASSERT( seqValues[nProp].getValueTypeClass() == TypeClass_STRING, "DatePatterns property type" );
@@ -628,6 +673,17 @@ void SvtSysLocaleOptions::SetDecimalSeparatorAsLocale( sal_Bool bSet)
pOptions->SetDecimalSeparatorAsLocale(bSet);
}
+sal_Bool SvtSysLocaleOptions::IsIgnoreLanguageChange() const
+{
+ MutexGuard aGuard( GetMutex() );
+ return pOptions->IsIgnoreLanguageChange();
+}
+
+void SvtSysLocaleOptions::SetIgnoreLanguageChange( sal_Bool bSet)
+{
+ MutexGuard aGuard( GetMutex() );
+ pOptions->SetIgnoreLanguageChange(bSet);
+}
sal_Bool SvtSysLocaleOptions::IsReadOnly( EOption eOption ) const
{