summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-09-17 11:26:03 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-09-17 11:26:03 +0000
commit17373655669c9bedd560962d5d8e84aea1760441 (patch)
treefbc7b4753661de393b62fd268c4749e103ec0152 /sd
parent1027ca0dfc9fa7f37c7d29f1b281606ba2fac76f (diff)
CWS-TOOLING: integrate CWS defaultdoclang
2009-08-21 14:44:21 +0200 cmc r275260 : CWS-TOOLING: rebase CWS defaultdoclang to trunk@275001 (milestone: DEV300:m55) 2009-08-10 17:43:32 +0200 cmc r274833 : CWS-TOOLING: rebase CWS defaultdoclang to trunk@274622 (milestone: DEV300:m54) 2009-07-24 11:46:58 +0200 cmc r274297 : CWS-TOOLING: rebase CWS defaultdoclang to trunk@274203 (milestone: DEV300:m53) 2009-07-10 12:22:16 +0200 cmc r273884 : #i99577# tweak the widths a bit 2009-07-08 15:17:58 +0200 cmc r273834 : #i99577 tidy up indentation 2009-07-04 16:09:18 +0200 cmc r273721 : #i99577# a "default" document language that reflects what the locale language is
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/drawdoc.cxx10
-rwxr-xr-xsd/source/ui/notes/EditWindow.cxx8
-rw-r--r--sd/source/ui/presenter/PresenterTextView.cxx9
3 files changed, 18 insertions, 9 deletions
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 8d9f46a6c4f7..d5cd14a80b65 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -34,6 +34,7 @@
#include "PageListWatcher.hxx"
#include <com/sun/star/text/WritingMode.hpp>
#include <com/sun/star/document/PrinterIndependentLayout.hpp>
+#include <com/sun/star/i18n/ScriptType.hpp>
#include <svx/forbiddencharacterstable.hxx>
#include <svx/svxids.hrc>
@@ -232,9 +233,12 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
SvtLinguOptions aOptions;
aLinguConfig.GetOptions( aOptions );
- SetLanguage( aOptions.nDefaultLanguage, EE_CHAR_LANGUAGE );
- SetLanguage( aOptions.nDefaultLanguage_CJK, EE_CHAR_LANGUAGE_CJK );
- SetLanguage( aOptions.nDefaultLanguage_CTL, EE_CHAR_LANGUAGE_CTL );
+ SetLanguage( MsLangId::resolveSystemLanguageByScriptType(aOptions.nDefaultLanguage,
+ ::com::sun::star::i18n::ScriptType::LATIN), EE_CHAR_LANGUAGE );
+ SetLanguage( MsLangId::resolveSystemLanguageByScriptType(aOptions.nDefaultLanguage_CJK,
+ ::com::sun::star::i18n::ScriptType::ASIAN), EE_CHAR_LANGUAGE_CJK );
+ SetLanguage( MsLangId::resolveSystemLanguageByScriptType(aOptions.nDefaultLanguage_CTL,
+ ::com::sun::star::i18n::ScriptType::COMPLEX), EE_CHAR_LANGUAGE_CTL );
mbOnlineSpell = aOptions.bIsSpellAuto;
}
diff --git a/sd/source/ui/notes/EditWindow.cxx b/sd/source/ui/notes/EditWindow.cxx
index 020eada42533..f86e9a358cbc 100755
--- a/sd/source/ui/notes/EditWindow.cxx
+++ b/sd/source/ui/notes/EditWindow.cxx
@@ -34,6 +34,8 @@
#include "EditWindow.hxx"
#include "sdmod.hxx"
+#include <i18npool/mslangid.hxx>
+#include <com/sun/star/i18n/ScriptType.hpp>
#include <svx/editeng.hxx>
#include <svx/editview.hxx>
#include <vcl/scrbar.hxx>
@@ -174,9 +176,9 @@ EditEngine* EditWindow::CreateEditEngine (void)
{ LANGUAGE_ARABIC_SAUDI_ARABIA, LANGUAGE_NONE,
DEFAULTFONT_CTL_TEXT, EE_CHAR_FONTINFO_CTL }
};
- aTable[0].nLang = aOpt.nDefaultLanguage;
- aTable[1].nLang = aOpt.nDefaultLanguage_CJK;
- aTable[2].nLang = aOpt.nDefaultLanguage_CTL;
+ aTable[0].nLang = MsLangId::resolveSystemLanguageByScriptType(aOpt.nDefaultLanguage, ::com::sun::star::i18n::ScriptType::LATIN);
+ aTable[1].nLang = MsLangId::resolveSystemLanguageByScriptType(aOpt.nDefaultLanguage_CJK, ::com::sun::star::i18n::ScriptType::ASIAN);
+ aTable[2].nLang = MsLangId::resolveSystemLanguageByScriptType(aOpt.nDefaultLanguage_CTL, ::com::sun::star::i18n::ScriptType::COMPLEX);
//
for (int i = 0; i < 3; ++i)
{
diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx
index 86864169a607..0317b7530e5c 100644
--- a/sd/source/ui/presenter/PresenterTextView.cxx
+++ b/sd/source/ui/presenter/PresenterTextView.cxx
@@ -33,6 +33,7 @@
#include "PresenterTextView.hxx"
+#include <i18npool/mslangid.hxx>
#include <cppcanvas/vclfactory.hxx>
#include <svtools/itempool.hxx>
#include <svtools/itemset.hxx>
@@ -52,6 +53,8 @@
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/rendering/XSpriteCanvas.hpp>
#include <com/sun/star/util/Color.hpp>
+#include <com/sun/star/i18n/ScriptType.hpp>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -381,9 +384,9 @@ EditEngine* PresenterTextView::Implementation::CreateEditEngine (void)
{ LANGUAGE_ARABIC_SAUDI_ARABIA, LANGUAGE_NONE,
DEFAULTFONT_CTL_TEXT, EE_CHAR_FONTINFO_CTL }
};
- aTable[0].nLang = aOpt.nDefaultLanguage;
- aTable[1].nLang = aOpt.nDefaultLanguage_CJK;
- aTable[2].nLang = aOpt.nDefaultLanguage_CTL;
+ aTable[0].nLang = MsLangId::resolveSystemLanguageByScriptType(aOpt.nDefaultLanguage, ::com::sun::star::i18n::ScriptType::LATIN);
+ aTable[1].nLang = MsLangId::resolveSystemLanguageByScriptType(aOpt.nDefaultLanguage_CJK, ::com::sun::star::i18n::ScriptType::ASIAN);
+ aTable[2].nLang = MsLangId::resolveSystemLanguageByScriptType(aOpt.nDefaultLanguage_CTL, ::com::sun::star::i18n::ScriptType::COMPLEX);
//
for (int i = 0; i < 3; ++i)
{