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
4767bbb0
Kaydet (Commit)
4767bbb0
authored
Kas 16, 2012
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use LanguageTag
Change-Id: I740e221ad16974c88b98c114850e663f25723b76
üst
378e437f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
32 deletions
+31
-32
convdicxml.cxx
linguistic/source/convdicxml.cxx
+3
-3
dicimp.cxx
linguistic/source/dicimp.cxx
+4
-4
gciterator.cxx
linguistic/source/gciterator.cxx
+3
-3
lngsvcmgr.cxx
linguistic/source/lngsvcmgr.cxx
+17
-17
misc.cxx
linguistic/source/misc.cxx
+4
-5
No files found.
linguistic/source/convdicxml.cxx
Dosyayı görüntüle @
4767bbb0
...
...
@@ -20,7 +20,7 @@
#include <tools/debug.hxx>
#include <tools/fsys.hxx>
#include <tools/string.hxx>
#include <i18npool/
mslangid
.hxx>
#include <i18npool/
languagetag
.hxx>
#include <tools/stream.hxx>
#include <osl/mutex.hxx>
#include <ucbhelper/content.hxx>
...
...
@@ -225,7 +225,7 @@ void ConvDicXMLDictionaryContext_Impl::StartElement(
OUString
aValue
=
rxAttrList
->
getValueByIndex
(
i
);
if
(
nPrefix
==
XML_NAMESPACE_TCD
&&
aLocalName
==
"lang"
)
nLanguage
=
MsLangId
::
convertIsoStringToLanguage
(
aValue
);
nLanguage
=
LanguageTag
(
aValue
).
getLanguageType
(
);
else
if
(
nPrefix
==
XML_NAMESPACE_TCD
&&
aLocalName
==
"conversion-type"
)
nConversionType
=
GetConversionTypeFromText
(
aValue
);
}
...
...
@@ -327,7 +327,7 @@ sal_uInt32 ConvDicXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum /*eCl
_GetNamespaceMap
().
GetNameByKey
(
XML_NAMESPACE_TCD
)
);
AddAttributeASCII
(
XML_NAMESPACE_TCD
,
"package"
,
"org.openoffice.Office"
);
OUString
aIsoLang
(
MsLangId
::
convertLanguageToIsoString
(
rDic
.
nLanguage
)
);
OUString
aIsoLang
(
LanguageTag
(
rDic
.
nLanguage
).
getBcp47
(
)
);
AddAttribute
(
XML_NAMESPACE_TCD
,
"lang"
,
aIsoLang
);
OUString
aConvType
(
ConversionTypeToText
(
rDic
.
nConversionType
)
);
AddAttribute
(
XML_NAMESPACE_TCD
,
"conversion-type"
,
aConvType
);
...
...
linguistic/source/dicimp.cxx
Dosyayı görüntüle @
4767bbb0
...
...
@@ -22,7 +22,7 @@
#include <dicimp.hxx>
#include <hyphdsp.hxx>
#include <i18npool/lang.h>
#include <i18npool/
mslangid
.hxx>
#include <i18npool/
languagetag
.hxx>
#include <osl/mutex.hxx>
#include <tools/debug.hxx>
#include <tools/fsys.hxx>
...
...
@@ -123,8 +123,8 @@ sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, sal_Bool &bNe
if
(
aTagValue
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"<none>"
)))
nLng
=
LANGUAGE_NONE
;
else
nLng
=
MsLangId
::
convertIsoStringToLanguage
(
rtl
::
OStringToOUString
(
aTagValue
,
RTL_TEXTENCODING_ASCII_US
));
nLng
=
LanguageTag
(
rtl
::
OStringToOUString
(
aTagValue
,
RTL_TEXTENCODING_ASCII_US
))
.
getLanguageType
()
;
}
// type: negative / positive
...
...
@@ -424,7 +424,7 @@ sal_uLong DictionaryNeo::saveEntries(const OUString &rURL)
else
{
rtl
::
OStringBuffer
aLine
(
RTL_CONSTASCII_STRINGPARAM
(
"lang: "
));
aLine
.
append
(
rtl
::
OUStringToOString
(
MsLangId
::
convertLanguageToIsoString
(
nLanguage
),
eEnc
));
aLine
.
append
(
rtl
::
OUStringToOString
(
LanguageTag
(
nLanguage
).
getBcp47
(
),
eEnc
));
pStream
->
WriteLine
(
aLine
.
makeStringAndClear
());
}
if
(
0
!=
(
nErr
=
pStream
->
GetError
()))
...
...
linguistic/source/gciterator.cxx
Dosyayı görüntüle @
4767bbb0
...
...
@@ -52,7 +52,7 @@
#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <cppuhelper/factory.hxx>
#include <i18npool/
mslangid
.hxx>
#include <i18npool/
languagetag
.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/extract.hxx>
...
...
@@ -446,7 +446,7 @@ uno::Reference< linguistic2::XProofreader > GrammarCheckingIterator::GetGrammarC
m_bGCServicesChecked
=
sal_True
;
}
const
LanguageType
nLang
=
MsLangId
::
convertLocaleToLanguage
(
rLocale
);
const
LanguageType
nLang
=
LanguageTag
(
rLocale
).
getLanguageType
(
false
);
GCImplNames_t
::
const_iterator
aLangIt
(
m_aGCImplNamesByLang
.
find
(
nLang
)
);
if
(
aLangIt
!=
m_aGCImplNamesByLang
.
end
())
// matching configured language found?
{
...
...
@@ -1015,7 +1015,7 @@ void GrammarCheckingIterator::GetConfiguredGCSvcs_Impl()
{
// only the first entry is used, there should be only one grammar checker per language
const
OUString
aImplName
(
aImplNames
[
0
]
);
const
LanguageType
nLang
=
MsLangId
::
convertIsoStringToLanguage
(
pElementNames
[
i
]
);
const
LanguageType
nLang
=
LanguageTag
(
pElementNames
[
i
]
).
getLanguageType
(
);
aTmpGCImplNamesByLang
[
nLang
]
=
aImplName
;
}
}
...
...
linguistic/source/lngsvcmgr.cxx
Dosyayı görüntüle @
4767bbb0
...
...
@@ -31,7 +31,7 @@
#include <unotools/lingucfg.hxx>
#include <comphelper/processfactory.hxx>
#include <i18npool/lang.h>
#include <i18npool/
mslangid
.hxx>
#include <i18npool/
languagetag
.hxx>
#include <cppuhelper/factory.hxx>
#include <comphelper/extract.hxx>
#include <rtl/logfile.hxx>
...
...
@@ -611,8 +611,8 @@ namespace
{
Sequence
<
OUString
>
aRes
;
OUString
aCfgLocaleStr
(
MsLangId
::
convertLanguageToIsoStrin
g
(
LocaleToLanguage
(
rAvailLocale
)
)
);
OUString
aCfgLocaleStr
(
LanguageTa
g
(
LocaleToLanguage
(
rAvailLocale
)
)
.
getBcp47
()
);
Sequence
<
OUString
>
aNodeNames
(
rCfg
.
GetNodeNames
(
rLastFoundList
)
);
sal_Bool
bFound
=
lcl_FindEntry
(
aCfgLocaleStr
,
aNodeNames
);
...
...
@@ -745,7 +745,7 @@ void LngSvcMgr::UpdateAll()
const
OUString
*
pNodeName
=
aNodeNames
.
getConstArray
();
for
(
i
=
0
;
i
<
nNodeNames
;
++
i
)
{
Locale
aLocale
(
CreateLocale
(
MsLangId
::
convertIsoStringToLanguage
(
pNodeName
[
i
]
)
)
);
Locale
aLocale
(
CreateLocale
(
LanguageTag
(
pNodeName
[
i
]).
getLanguageType
(
)
)
);
Sequence
<
OUString
>
aCfgSvcs
(
getConfiguredServices
(
aService
,
aLocale
));
Sequence
<
OUString
>
aAvailSvcs
(
getAvailableServices
(
aService
,
aLocale
));
...
...
@@ -764,8 +764,8 @@ void LngSvcMgr::UpdateAll()
const
Locale
*
pAvailLocale
=
aAvailLocales
.
getConstArray
();
for
(
i
=
0
;
i
<
nAvailLocales
;
++
i
)
{
OUString
aCfgLocaleStr
(
MsLangId
::
convertLanguageToIsoStrin
g
(
LocaleToLanguage
(
pAvailLocale
[
i
]
)
)
);
OUString
aCfgLocaleStr
(
LanguageTa
g
(
LocaleToLanguage
(
pAvailLocale
[
i
]
)
)
.
getBcp47
()
);
Sequence
<
OUString
>
aAvailSvcs
(
getAvailableServices
(
aService
,
pAvailLocale
[
i
]
));
...
...
@@ -881,7 +881,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
LanguageType
nLang
=
LANGUAGE_NONE
;
if
(
!
aKeyText
.
isEmpty
())
nLang
=
MsLangId
::
convertIsoStringToLanguage
(
aKeyText
);
nLang
=
LanguageTag
(
aKeyText
).
getLanguageType
(
);
GetSpellCheckerDsp_Impl
(
sal_False
);
// don't set service list, it will be done below
pSpellDsp
->
SetServiceList
(
CreateLocale
(
nLang
),
aSvcImplNames
);
...
...
@@ -906,7 +906,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
LanguageType
nLang
=
LANGUAGE_NONE
;
if
(
!
aKeyText
.
isEmpty
())
nLang
=
MsLangId
::
convertIsoStringToLanguage
(
aKeyText
);
nLang
=
LanguageTag
(
aKeyText
).
getLanguageType
(
);
if
(
SvtLinguConfig
().
HasGrammarChecker
())
{
...
...
@@ -934,7 +934,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
LanguageType
nLang
=
LANGUAGE_NONE
;
if
(
!
aKeyText
.
isEmpty
())
nLang
=
MsLangId
::
convertIsoStringToLanguage
(
aKeyText
);
nLang
=
LanguageTag
(
aKeyText
).
getLanguageType
(
);
GetHyphenatorDsp_Impl
(
sal_False
);
// don't set service list, it will be done below
pHyphDsp
->
SetServiceList
(
CreateLocale
(
nLang
),
aSvcImplNames
);
...
...
@@ -959,7 +959,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
LanguageType
nLang
=
LANGUAGE_NONE
;
if
(
!
aKeyText
.
isEmpty
())
nLang
=
MsLangId
::
convertIsoStringToLanguage
(
aKeyText
);
nLang
=
LanguageTag
(
aKeyText
).
getLanguageType
(
);
GetThesaurusDsp_Impl
(
sal_False
);
// don't set service list, it will be done below
pThesDsp
->
SetServiceList
(
CreateLocale
(
nLang
),
aSvcImplNames
);
...
...
@@ -1338,7 +1338,7 @@ void LngSvcMgr::SetCfgServiceLists( SpellCheckerDispatcher &rSpellDsp )
String
aLocaleStr
(
pNames
[
i
]
);
xub_StrLen
nSeperatorPos
=
aLocaleStr
.
SearchBackward
(
sal_Unicode
(
'/'
)
);
aLocaleStr
=
aLocaleStr
.
Copy
(
nSeperatorPos
+
1
);
lang
::
Locale
aLocale
(
CreateLocale
(
MsLangId
::
convertIsoStringToLanguage
(
aLocaleStr
)
)
);
lang
::
Locale
aLocale
(
CreateLocale
(
LanguageTag
(
aLocaleStr
).
getLanguageType
(
)
)
);
rSpellDsp
.
SetServiceList
(
aLocale
,
aSvcImplNames
);
}
}
...
...
@@ -1381,7 +1381,7 @@ void LngSvcMgr::SetCfgServiceLists( GrammarCheckingIterator &rGrammarDsp )
String
aLocaleStr
(
pNames
[
i
]
);
xub_StrLen
nSeperatorPos
=
aLocaleStr
.
SearchBackward
(
sal_Unicode
(
'/'
)
);
aLocaleStr
=
aLocaleStr
.
Copy
(
nSeperatorPos
+
1
);
lang
::
Locale
aLocale
(
CreateLocale
(
MsLangId
::
convertIsoStringToLanguage
(
aLocaleStr
)
)
);
lang
::
Locale
aLocale
(
CreateLocale
(
LanguageTag
(
aLocaleStr
).
getLanguageType
(
)
)
);
rGrammarDsp
.
SetServiceList
(
aLocale
,
aSvcImplNames
);
}
}
...
...
@@ -1424,7 +1424,7 @@ void LngSvcMgr::SetCfgServiceLists( HyphenatorDispatcher &rHyphDsp )
String
aLocaleStr
(
pNames
[
i
]
);
xub_StrLen
nSeperatorPos
=
aLocaleStr
.
SearchBackward
(
sal_Unicode
(
'/'
)
);
aLocaleStr
=
aLocaleStr
.
Copy
(
nSeperatorPos
+
1
);
lang
::
Locale
aLocale
(
CreateLocale
(
MsLangId
::
convertIsoStringToLanguage
(
aLocaleStr
)
)
);
lang
::
Locale
aLocale
(
CreateLocale
(
LanguageTag
(
aLocaleStr
).
getLanguageType
(
)
)
);
rHyphDsp
.
SetServiceList
(
aLocale
,
aSvcImplNames
);
}
}
...
...
@@ -1463,7 +1463,7 @@ void LngSvcMgr::SetCfgServiceLists( ThesaurusDispatcher &rThesDsp )
String
aLocaleStr
(
pNames
[
i
]
);
xub_StrLen
nSeperatorPos
=
aLocaleStr
.
SearchBackward
(
sal_Unicode
(
'/'
)
);
aLocaleStr
=
aLocaleStr
.
Copy
(
nSeperatorPos
+
1
);
lang
::
Locale
aLocale
(
CreateLocale
(
MsLangId
::
convertIsoStringToLanguage
(
aLocaleStr
)
)
);
lang
::
Locale
aLocale
(
CreateLocale
(
LanguageTag
(
aLocaleStr
).
getLanguageType
(
)
)
);
rThesDsp
.
SetServiceList
(
aLocale
,
aSvcImplNames
);
}
}
...
...
@@ -1846,8 +1846,8 @@ sal_Bool LngSvcMgr::SaveCfgSvcs( const String &rServiceName )
aCfgAny
<<=
aSvcImplNames
;
DBG_ASSERT
(
aCfgAny
.
hasValue
(),
"missing value for 'Any' type"
);
OUString
aCfgLocaleStr
(
MsLangId
::
convertLanguageToIsoStrin
g
(
LocaleToLanguage
(
pLocale
[
i
]
)
)
);
OUString
aCfgLocaleStr
(
LanguageTa
g
(
LocaleToLanguage
(
pLocale
[
i
]
)
)
.
getBcp47
()
);
pValue
->
Value
=
aCfgAny
;
pValue
->
Name
=
aNodeName
;
pValue
->
Name
+=
OUString
::
valueOf
(
(
sal_Unicode
)
'/'
);
...
...
@@ -1936,7 +1936,7 @@ uno::Sequence< OUString > SAL_CALL
uno
::
Sequence
<
OUString
>
aSvcImplNames
;
LanguageType
nLanguage
=
LocaleToLanguage
(
rLocale
);
OUString
aCfgLocale
(
MsLangId
::
convertLanguageToIsoString
(
nLanguage
)
);
OUString
aCfgLocale
(
LanguageTag
(
nLanguage
).
getBcp47
(
)
);
uno
::
Sequence
<
uno
::
Any
>
aValues
;
uno
::
Sequence
<
OUString
>
aNames
(
1
);
...
...
linguistic/source/misc.cxx
Dosyayı görüntüle @
4767bbb0
...
...
@@ -24,7 +24,7 @@
#include <unotools/pathoptions.hxx>
#include <svl/lngmisc.hxx>
#include <ucbhelper/content.hxx>
#include <i18npool/
mslangid
.hxx>
#include <i18npool/
languagetag
.hxx>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
...
...
@@ -48,7 +48,6 @@
#include "defs.hxx"
#include "linguistic/lngprops.hxx"
#include "linguistic/hyphdta.hxx"
#include <i18npool/mslangid.hxx>
using
namespace
osl
;
using
namespace
com
::
sun
::
star
;
...
...
@@ -374,14 +373,14 @@ LanguageType LocaleToLanguage( const Locale& rLocale )
if
(
rLocale
.
Language
.
isEmpty
()
)
return
LANGUAGE_NONE
;
return
MsLangId
::
convertLocaleToLanguage
(
rLocale
);
return
LanguageTag
(
rLocale
).
getLanguageType
(
);
}
Locale
&
LanguageToLocale
(
Locale
&
rLocale
,
LanguageType
eLang
)
{
if
(
eLang
!=
LANGUAGE_NONE
/* && eLang != LANGUAGE_SYSTEM */
)
MsLangId
::
convertLanguageToLocale
(
eLang
,
rLocale
);
rLocale
=
LanguageTag
(
eLang
).
getLocale
(
);
return
rLocale
;
}
...
...
@@ -390,7 +389,7 @@ Locale CreateLocale( LanguageType eLang )
{
Locale
aLocale
;
if
(
eLang
!=
LANGUAGE_NONE
/* && eLang != LANGUAGE_SYSTEM */
)
return
MsLangId
::
convertLanguageToLocale
(
eLang
);
return
LanguageTag
(
eLang
).
getLocale
(
);
return
aLocale
;
}
...
...
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