summaryrefslogtreecommitdiff
path: root/basctl/source/basicide
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2007-01-02 14:49:14 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2007-01-02 14:49:14 +0000
commit57286cdeb47c14bc0ca69a859c4c28a392bbc513 (patch)
treed24b7d5a75939068fc046bd3ef2153a241eef2db /basctl/source/basicide
parent20a10279ac5caacf019e135c23b2cfc54dc3f172 (diff)
INTEGRATION: CWS ab31 (1.47.32); FILE MERGED
2006/12/15 10:21:24 ab 1.47.32.5: #i72282# GetState(): Fill current lang slot with string representing all locales to force update 2006/12/14 12:57:20 pb 1.47.32.4: fix: #i72282# invalidate _CURRENT_LANG 2006/12/14 11:19:44 ab 1.47.32.3: #i72282# Update slots 2006/12/13 20:14:13 pb 1.47.32.2: fix: #i72282# new interface used 2006/12/06 15:28:26 pb 1.47.32.1: fix: #i72282# execute SID_BASICIDE_MANAGE_LANG
Diffstat (limited to 'basctl/source/basicide')
-rw-r--r--basctl/source/basicide/basides1.cxx56
1 files changed, 54 insertions, 2 deletions
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 971716275273..7ae542bb268e 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: basides1.cxx,v $
*
- * $Revision: 1.47 $
+ * $Revision: 1.48 $
*
- * last change: $Author: obo $ $Date: 2006-09-17 00:25:42 $
+ * last change: $Author: hr $ $Date: 2007-01-02 15:49:14 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -66,6 +66,8 @@
#include <iderdll.hxx>
#include <iderdll2.hxx>
#include <sbxitem.hxx>
+#include <managelang.hxx>
+#include <localizationmgr.hxx>
#include <helpid.hrc>
#include <svtools/texteng.hxx>
@@ -825,6 +827,14 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
rReq.Done();
}
break;
+
+ case SID_BASICIDE_MANAGE_LANG:
+ {
+ ManageLanguageDialog aDlg( GetCurWindow(), GetCurLocalizationMgr() );
+ aDlg.Execute();
+ rReq.Done();
+ }
+ break;
}
}
@@ -1055,6 +1065,48 @@ void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet)
rSet.DisableItem( nWh );
}
break;
+
+ case SID_BASICIDE_CURRENT_LANG:
+ {
+ if( (pCurWin && pCurWin->IsReadOnly()) || GetCurLibName().Len() == 0 )
+ rSet.DisableItem( nWh );
+ else
+ {
+ String aItemStr;
+ LocalizationMgr* pCurMgr = GetCurLocalizationMgr();
+ if ( pCurMgr->isLibraryLocalized() )
+ {
+ Sequence< lang::Locale > aLocaleSeq = pCurMgr->getStringResourceManager()->getLocales();
+ const lang::Locale* pLocale = aLocaleSeq.getConstArray();
+ INT32 i, nCount = aLocaleSeq.getLength();
+
+ // Force different results for any combination of locales and default locale
+ ::rtl::OUString aLangStr;
+ for ( i = 0; i <= nCount; ++i )
+ {
+ lang::Locale aLocale;
+ if( i < nCount )
+ aLocale = pLocale[i];
+ else
+ aLocale = pCurMgr->getStringResourceManager()->getDefaultLocale();
+
+ aLangStr += aLocale.Language;
+ aLangStr += aLocale.Country;
+ aLangStr += aLocale.Variant;
+ }
+ aItemStr = aLangStr;
+ }
+ rSet.Put( SfxStringItem( nWh, aItemStr ) );
+ }
+ }
+ break;
+
+ case SID_BASICIDE_MANAGE_LANG:
+ {
+ if( (pCurWin && pCurWin->IsReadOnly()) || GetCurLibName().Len() == 0 )
+ rSet.DisableItem( nWh );
+ }
+ break;
}
}
if ( pCurWin )