Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
7ac4c9dc
Kaydet (Commit)
7ac4c9dc
authored
May 18, 2013
tarafından
Lionel Elie Mamane
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
DB wizards (java): use system locale, not UI language, for parsing matters
Change-Id: Ieb00ef3b16cd6213c11298040b789444b3ee3a31
üst
cd2f2e77
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
23 deletions
+33
-23
Configuration.java
wizards/com/sun/star/wizards/common/Configuration.java
+26
-16
DBMetaData.java
wizards/com/sun/star/wizards/db/DBMetaData.java
+2
-2
CGTable.java
wizards/com/sun/star/wizards/table/CGTable.java
+1
-1
ScenarioSelector.java
wizards/com/sun/star/wizards/table/ScenarioSelector.java
+1
-1
TableWizard.java
wizards/com/sun/star/wizards/table/TableWizard.java
+2
-2
CommandFieldSelection.java
wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
+1
-1
No files found.
wizards/com/sun/star/wizards/common/Configuration.java
Dosyayı görüntüle @
7ac4c9dc
...
...
@@ -200,26 +200,30 @@ public abstract class Configuration
}
}
public
static
String
get
OfficeLocaleString
(
XMultiServiceFactory
xMSF
)
public
static
String
get
LocaleString
(
XMultiServiceFactory
xMSF
,
String
root
,
String
key
)
{
String
sLocale
=
PropertyNames
.
EMPTY_STRING
;
try
{
Locale
aLocLocale
=
new
Locale
();
Object
oMasterKey
=
getConfigurationRoot
(
xMSF
,
"org.openoffice.Setup/L10N/"
,
false
);
sLocale
=
(
String
)
Helper
.
getUnoObjectbyName
(
oMasterKey
,
"ooLocale"
);
Object
oMasterKey
=
getConfigurationRoot
(
xMSF
,
root
,
false
);
sLocale
=
(
String
)
Helper
.
getUnoObjectbyName
(
oMasterKey
,
key
);
}
catch
(
Exception
exception
)
{
exception
.
printStackTrace
(
System
.
err
);
}
if
(
sLocale
.
length
()
==
0
&&
(!
key
.
equals
(
"Locale"
)
||
!
root
.
equals
(
"org.openoffice.System/L10N/"
)))
{
return
getLocaleString
(
xMSF
,
"org.openoffice.System/L10N/"
,
"Locale"
);
}
return
sLocale
;
}
public
static
Locale
get
OfficeLocale
(
XMultiServiceFactory
xMSF
)
public
static
Locale
get
Locale
(
XMultiServiceFactory
xMSF
,
String
root
,
String
key
)
{
Locale
aLocLocale
=
new
Locale
();
String
sLocale
=
get
OfficeLocaleString
(
xMSF
);
String
sLocale
=
get
LocaleString
(
xMSF
,
root
,
key
);
String
[]
sLocaleList
=
JavaTools
.
ArrayoutofString
(
sLocale
,
"-"
);
aLocLocale
.
Language
=
sLocaleList
[
0
];
if
(
sLocaleList
.
length
>
1
)
...
...
@@ -229,18 +233,24 @@ public abstract class Configuration
return
aLocLocale
;
}
public
static
String
getOfficeLinguistic
(
XMultiServiceFactory
xMSF
)
public
static
Locale
getLocale
(
XMultiServiceFactory
xMSF
)
{
try
{
Object
oMasterKey
=
getConfigurationRoot
(
xMSF
,
"org.openoffice.Setup/L10N/"
,
false
);
return
(
String
)
Helper
.
getUnoObjectbyName
(
oMasterKey
,
"ooLocale"
);
}
catch
(
Exception
exception
)
{
exception
.
printStackTrace
();
return
null
;
}
return
getLocale
(
xMSF
,
"org.openoffice.Setup/L10N/"
,
"ooSetupSystemLocale"
);
}
public
static
Locale
getUILocale
(
XMultiServiceFactory
xMSF
)
{
return
getLocale
(
xMSF
,
"org.openoffice.Setup/L10N/"
,
"ooLocale"
);
}
public
static
String
getLocaleString
(
XMultiServiceFactory
xMSF
)
{
return
getLocaleString
(
xMSF
,
"org.openoffice.Setup/L10N/"
,
"ooSetupSystemLocale"
);
}
public
static
String
getUILocaleString
(
XMultiServiceFactory
xMSF
)
{
return
getLocaleString
(
xMSF
,
"org.openoffice.Setup/L10N/"
,
"ooLocale"
);
}
/**
...
...
wizards/com/sun/star/wizards/db/DBMetaData.java
Dosyayı görüntüle @
7ac4c9dc
...
...
@@ -169,7 +169,7 @@ public class DBMetaData
{
XNumberFormatsSupplier
xNumberFormatsSupplier
=
(
XNumberFormatsSupplier
)
AnyConverter
.
toObject
(
XNumberFormatsSupplier
.
class
,
xDataSourcePropertySet
.
getPropertyValue
(
"NumberFormatsSupplier"
));
//TODO get the locale from the datasource
aLocale
=
Configuration
.
get
Office
Locale
(
xMSF
);
aLocale
=
Configuration
.
getLocale
(
xMSF
);
oNumberFormatter
=
new
NumberFormatter
(
xMSF
,
xNumberFormatsSupplier
,
aLocale
);
lDateCorrection
=
oNumberFormatter
.
getNullDateCorrection
();
}
...
...
@@ -529,7 +529,7 @@ public class DBMetaData
}
if
(
this
.
isSQL92CheckEnabled
())
{
return
Desktop
.
removeSpecialCharacters
(
xMSF
,
Configuration
.
get
Office
Locale
(
xMSF
),
_sname
);
return
Desktop
.
removeSpecialCharacters
(
xMSF
,
Configuration
.
getLocale
(
xMSF
),
_sname
);
}
return
_sname
;
}
...
...
wizards/com/sun/star/wizards/table/CGTable.java
Dosyayı görüntüle @
7ac4c9dc
...
...
@@ -74,7 +74,7 @@ public class CGTable
}
for
(
int
i
=
0
;
i
<
fieldnames
.
length
;
i
++)
{
fieldnames
[
i
]
=
Desktop
.
removeSpecialCharacters
(
xMSF
,
Configuration
.
get
Office
Locale
(
xMSF
),
fieldnames
[
i
]);
fieldnames
[
i
]
=
Desktop
.
removeSpecialCharacters
(
xMSF
,
Configuration
.
getLocale
(
xMSF
),
fieldnames
[
i
]);
}
return
fieldnames
;
}
...
...
wizards/com/sun/star/wizards/table/ScenarioSelector.java
Dosyayı görüntüle @
7ac4c9dc
...
...
@@ -70,7 +70,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
super
(
_CurUnoDialog
,
TableWizard
.
SOMAINPAGE
,
91
,
108
,
230
,
80
,
_reslblFields
,
_reslblSelFields
,
41209
,
true
);
CurTableWizardUnoDialog
=
_CurUnoDialog
;
xMSF
=
CurUnoDialog
.
xMSF
;
aLocale
=
Configuration
.
get
Office
Locale
(
xMSF
);
aLocale
=
Configuration
.
getLocale
(
xMSF
);
curtabledescriptor
=
_curtabledescriptor
;
imaxcolumnchars
=
this
.
curtabledescriptor
.
getMaxColumnNameLength
();
bcolumnnameislimited
=
(
imaxcolumnchars
>
0
)
&&
(
imaxcolumnchars
<
16
);
...
...
wizards/com/sun/star/wizards/table/TableWizard.java
Dosyayı görüntüle @
7ac4c9dc
...
...
@@ -283,7 +283,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener
scomposedtablename
=
curFinalizer
.
getComposedTableName
(
tablename
);
if
(
this
.
curTableDescriptor
.
isSQL92CheckEnabled
())
{
Desktop
.
removeSpecialCharacters
(
curTableDescriptor
.
xMSF
,
Configuration
.
get
Office
Locale
(
this
.
curTableDescriptor
.
xMSF
),
tablename
);
Desktop
.
removeSpecialCharacters
(
curTableDescriptor
.
xMSF
,
Configuration
.
getLocale
(
this
.
curTableDescriptor
.
xMSF
),
tablename
);
}
if
(
tablename
.
length
()
>
0
)
{
...
...
@@ -422,7 +422,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener
{
Object
otextcomponent
=
UnoDialog
.
getModel
(
aTextEvent
.
Source
);
String
sName
=
(
String
)
Helper
.
getUnoPropertyValue
(
otextcomponent
,
"Text"
);
sName
=
Desktop
.
removeSpecialCharacters
(
curTableDescriptor
.
xMSF
,
Configuration
.
get
Office
Locale
(
curTableDescriptor
.
xMSF
),
sName
);
sName
=
Desktop
.
removeSpecialCharacters
(
curTableDescriptor
.
xMSF
,
Configuration
.
getLocale
(
curTableDescriptor
.
xMSF
),
sName
);
Helper
.
setUnoPropertyValue
(
otextcomponent
,
"Text"
,
sName
);
}
}
...
...
wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
Dosyayı görüntüle @
7ac4c9dc
...
...
@@ -326,7 +326,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator<
{
if
(
this
.
aCollator
==
null
)
{
com
.
sun
.
star
.
lang
.
Locale
aOfficeLocale
=
Configuration
.
get
Office
Locale
(
this
.
CurDBMetaData
.
xMSF
);
com
.
sun
.
star
.
lang
.
Locale
aOfficeLocale
=
Configuration
.
getLocale
(
this
.
CurDBMetaData
.
xMSF
);
java
.
util
.
Locale
aJavaLocale
=
new
java
.
util
.
Locale
(
aOfficeLocale
.
Language
,
aOfficeLocale
.
Country
,
aOfficeLocale
.
Variant
);
//Get the Collator for US English and set its strength to PRIMARY
this
.
aCollator
=
Collator
.
getInstance
(
aJavaLocale
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment