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
790b0c4d
Kaydet (Commit)
790b0c4d
authored
Şub 01, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46808, convert i18n::OrdinalSuffix to new-style
Change-Id: I62d0d3455d81bf9a2ea485b74faa5f1ecd417d87
üst
e2ab5539
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
31 deletions
+8
-31
svxacorr.cxx
editeng/source/misc/svxacorr.cxx
+3
-9
UnoApi_offapi.mk
offapi/UnoApi_offapi.mk
+1
-1
globalx.cxx
sc/source/core/data/globalx.cxx
+4
-21
No files found.
editeng/source/misc/svxacorr.cxx
Dosyayı görüntüle @
790b0c4d
...
...
@@ -31,7 +31,7 @@
#include <unotools/collatorwrapper.hxx>
#include <com/sun/star/i18n/CollatorOptions.hpp>
#include <com/sun/star/i18n/UnicodeScript.hpp>
#include <com/sun/star/i18n/
X
OrdinalSuffix.hpp>
#include <com/sun/star/i18n/OrdinalSuffix.hpp>
#include <unotools/localedatawrapper.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
...
...
@@ -442,13 +442,9 @@ sal_Bool SvxAutoCorrect::FnChgOrdinalNumber(
sal_Int32
nNum
=
rTxt
.
Copy
(
nSttPos
,
nNumEnd
-
nSttPos
+
1
).
ToInt32
(
);
// Check if the characters after that number correspond to the ordinal suffix
rtl
::
OUString
sServiceName
(
"com.sun.star.i18n.OrdinalSuffix"
);
uno
::
Reference
<
i18n
::
XOrdinalSuffix
>
xOrdSuffix
(
comphelper
::
getProcessServiceFactory
()
->
createInstance
(
sServiceName
),
uno
::
UNO_QUERY
);
uno
::
Reference
<
i18n
::
XOrdinalSuffix
>
xOrdSuffix
=
i18n
::
OrdinalSuffix
::
create
(
comphelper
::
getProcessComponentContext
()
);
if
(
xOrdSuffix
.
is
(
)
)
{
uno
::
Sequence
<
rtl
::
OUString
>
aSuffixes
=
xOrdSuffix
->
getOrdinalSuffix
(
nNum
,
rCC
.
getLanguageTag
().
getLocale
(
)
);
for
(
sal_Int32
nSuff
=
0
;
nSuff
<
aSuffixes
.
getLength
();
nSuff
++
)
{
...
...
@@ -470,8 +466,6 @@ sal_Bool SvxAutoCorrect::FnChgOrdinalNumber(
}
}
}
}
return
bChg
;
}
...
...
offapi/UnoApi_offapi.mk
Dosyayı görüntüle @
790b0c4d
...
...
@@ -175,6 +175,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/i18n,\
LocaleData \
NativeNumberSupplier \
NumberFormatMapper \
OrdinalSuffix \
TextConversion \
Transliteration \
))
...
...
@@ -894,7 +895,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/graphic
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/i18n,\
ChapterCollator \
IndexEntrySupplier \
OrdinalSuffix \
))
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/image,\
ImageMap \
...
...
sc/source/core/data/globalx.cxx
Dosyayı görüntüle @
790b0c4d
...
...
@@ -30,7 +30,7 @@
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/ucb/XContentAccess.hpp>
#include <com/sun/star/i18n/
X
OrdinalSuffix.hpp>
#include <com/sun/star/i18n/OrdinalSuffix.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
...
...
@@ -121,28 +121,12 @@ void ScGlobal::InitAddIns()
String
ScGlobal
::
GetOrdinalSuffix
(
sal_Int32
nNumber
)
{
if
(
!
xOrdinalSuffix
.
is
())
{
try
{
Reference
<
lang
::
XMultiServiceFactory
>
xServiceManager
=
::
comphelper
::
getProcessServiceFactory
();
Reference
<
XInterface
>
xInterface
=
xServiceManager
->
createInstance
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.i18n.OrdinalSuffix"
)));
if
(
xInterface
.
is
())
xOrdinalSuffix
=
Reference
<
i18n
::
XOrdinalSuffix
>
(
xInterface
,
UNO_QUERY
);
}
catch
(
Exception
&
)
if
(
!
xOrdinalSuffix
.
is
())
{
OSL_FAIL
(
"GetOrdinalSuffix: exception caught during init"
);
xOrdinalSuffix
=
i18n
::
OrdinalSuffix
::
create
(
::
comphelper
::
getProcessComponentContext
()
);
}
}
OSL_ENSURE
(
xOrdinalSuffix
.
is
(),
"GetOrdinalSuffix: createInstance failed"
);
if
(
xOrdinalSuffix
.
is
())
{
try
{
uno
::
Sequence
<
rtl
::
OUString
>
aSuffixes
=
xOrdinalSuffix
->
getOrdinalSuffix
(
nNumber
,
ScGlobal
::
pLocaleData
->
getLanguageTag
().
getLocale
());
if
(
aSuffixes
.
getLength
()
>
0
)
...
...
@@ -152,8 +136,7 @@ String ScGlobal::GetOrdinalSuffix( sal_Int32 nNumber)
}
catch
(
Exception
&
)
{
OSL_FAIL
(
"GetOrdinalSuffix: exception caught during getOrdinalSuffix"
);
}
OSL_FAIL
(
"GetOrdinalSuffix: exception caught during init"
);
}
return
String
();
}
...
...
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