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
c2bbc979
Kaydet (Commit)
c2bbc979
authored
Kas 05, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Stephan Bergmann
Kas 27, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46808, use service constructor for i18n::NativeNumberSupplier
Change-Id: I092ca8f912e26f0743909920c6e740d648b8677e
üst
60fa5057
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
37 deletions
+16
-37
cclass_unicode_parser.cxx
.../source/characterclassification/cclass_unicode_parser.cxx
+2
-17
UnoApi_offapi.mk
offapi/UnoApi_offapi.mk
+1
-1
ondemand.hxx
svl/inc/svl/ondemand.hxx
+6
-6
zforlist.cxx
svl/source/numbers/zforlist.cxx
+1
-1
nativenumberwrapper.hxx
unotools/inc/unotools/nativenumberwrapper.hxx
+3
-4
nativenumberwrapper.cxx
unotools/source/i18n/nativenumberwrapper.cxx
+3
-8
No files found.
i18npool/source/characterclassification/cclass_unicode_parser.cxx
Dosyayı görüntüle @
c2bbc979
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include <com/sun/star/i18n/UnicodeType.hpp>
#include <com/sun/star/i18n/UnicodeType.hpp>
#include <com/sun/star/i18n/LocaleData.hpp>
#include <com/sun/star/i18n/LocaleData.hpp>
#include <com/sun/star/i18n/NativeNumberMode.hpp>
#include <com/sun/star/i18n/NativeNumberMode.hpp>
#include <com/sun/star/i18n/NativeNumberSupplier.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/processfactory.hxx>
#include <string.h> // memcpy()
#include <string.h> // memcpy()
...
@@ -1006,26 +1007,10 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32
...
@@ -1006,26 +1007,10 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32
{
{
if
(
!
xNatNumSup
.
is
()
)
if
(
!
xNatNumSup
.
is
()
)
{
{
#define NATIVENUMBERSUPPLIER_SERVICENAME "com.sun.star.i18n.NativeNumberSupplier"
if
(
xMSF
.
is
()
)
if
(
xMSF
.
is
()
)
{
{
xNatNumSup
=
Reference
<
XNativeNumberSupplier
>
(
xNatNumSup
=
NativeNumberSupplier
::
create
(
comphelper
::
getComponentContext
(
xMSF
)
);
xMSF
->
createInstance
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
NATIVENUMBERSUPPLIER_SERVICENAME
)
)
),
UNO_QUERY
);
}
}
if
(
!
xNatNumSup
.
is
()
)
{
throw
RuntimeException
(
OUString
(
#ifdef DBG_UTIL
RTL_CONSTASCII_USTRINGPARAM
(
"cclass_Unicode::parseText: can't instanciate "
NATIVENUMBERSUPPLIER_SERVICENAME
)
#endif
),
*
this
);
}
#undef NATIVENUMBERSUPPLIER_SERVICENAME
}
}
OUString
aTmp
(
pTextStart
+
r
.
LeadingWhiteSpace
,
r
.
EndPos
-
nPos
+
OUString
aTmp
(
pTextStart
+
r
.
LeadingWhiteSpace
,
r
.
EndPos
-
nPos
+
r
.
LeadingWhiteSpace
);
r
.
LeadingWhiteSpace
);
...
...
offapi/UnoApi_offapi.mk
Dosyayı görüntüle @
c2bbc979
...
@@ -147,6 +147,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/i18n,\
...
@@ -147,6 +147,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/i18n,\
CharacterClassification \
CharacterClassification \
LocaleCalendar \
LocaleCalendar \
LocaleData \
LocaleData \
NativeNumberSupplier \
NumberFormatMapper \
NumberFormatMapper \
TextConversion \
TextConversion \
Transliteration \
Transliteration \
...
@@ -860,7 +861,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/i18n,\
...
@@ -860,7 +861,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/i18n,\
Collator \
Collator \
IndexEntrySupplier \
IndexEntrySupplier \
InputSequenceChecker \
InputSequenceChecker \
NativeNumberSupplier \
OrdinalSuffix \
OrdinalSuffix \
))
))
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/image,\
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/image,\
...
...
svl/inc/svl/ondemand.hxx
Dosyayı görüntüle @
c2bbc979
...
@@ -329,7 +329,7 @@ public:
...
@@ -329,7 +329,7 @@ public:
*/
*/
class
OnDemandNativeNumberWrapper
class
OnDemandNativeNumberWrapper
{
{
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
xSMgr
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
m_xContext
;
mutable
NativeNumberWrapper
*
pPtr
;
mutable
NativeNumberWrapper
*
pPtr
;
bool
bInitialized
;
bool
bInitialized
;
...
@@ -339,12 +339,12 @@ public:
...
@@ -339,12 +339,12 @@ public:
,
bInitialized
(
false
)
,
bInitialized
(
false
)
{}
{}
OnDemandNativeNumberWrapper
(
OnDemandNativeNumberWrapper
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
rxSMgr
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>&
rxContext
)
)
:
pPtr
(
0
)
:
pPtr
(
0
)
,
bInitialized
(
false
)
,
bInitialized
(
false
)
{
{
init
(
rx
SMgr
);
init
(
rx
Context
);
}
}
~
OnDemandNativeNumberWrapper
()
~
OnDemandNativeNumberWrapper
()
{
{
...
@@ -354,10 +354,10 @@ public:
...
@@ -354,10 +354,10 @@ public:
bool
isInitialized
()
const
{
return
bInitialized
;
}
bool
isInitialized
()
const
{
return
bInitialized
;
}
void
init
(
void
init
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
rxSMgr
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>&
rxContext
)
)
{
{
xSMgr
=
rxSMgr
;
m_xContext
=
rxContext
;
if
(
pPtr
)
if
(
pPtr
)
{
{
delete
pPtr
;
delete
pPtr
;
...
@@ -371,7 +371,7 @@ public:
...
@@ -371,7 +371,7 @@ public:
NativeNumberWrapper
*
get
()
const
NativeNumberWrapper
*
get
()
const
{
{
if
(
!
pPtr
)
if
(
!
pPtr
)
pPtr
=
new
NativeNumberWrapper
(
xSMgr
);
pPtr
=
new
NativeNumberWrapper
(
m_xContext
);
return
pPtr
;
return
pPtr
;
}
}
...
...
svl/source/numbers/zforlist.cxx
Dosyayı görüntüle @
c2bbc979
...
@@ -240,7 +240,7 @@ void SvNumberFormatter::ImpConstruct( LanguageType eLang )
...
@@ -240,7 +240,7 @@ void SvNumberFormatter::ImpConstruct( LanguageType eLang )
xCalendar
.
init
(
comphelper
::
getComponentContext
(
xServiceManager
),
maLanguageTag
.
getLocale
()
);
xCalendar
.
init
(
comphelper
::
getComponentContext
(
xServiceManager
),
maLanguageTag
.
getLocale
()
);
xTransliteration
.
init
(
comphelper
::
getComponentContext
(
xServiceManager
),
eLang
,
xTransliteration
.
init
(
comphelper
::
getComponentContext
(
xServiceManager
),
eLang
,
::
com
::
sun
::
star
::
i18n
::
TransliterationModules_IGNORE_CASE
);
::
com
::
sun
::
star
::
i18n
::
TransliterationModules_IGNORE_CASE
);
xNatNum
.
init
(
xServiceManager
);
xNatNum
.
init
(
comphelper
::
getComponentContext
(
xServiceManager
)
);
// cached locale data items
// cached locale data items
const
LocaleDataWrapper
*
pLoc
=
GetLocaleData
();
const
LocaleDataWrapper
*
pLoc
=
GetLocaleData
();
...
...
unotools/inc/unotools/nativenumberwrapper.hxx
Dosyayı görüntüle @
c2bbc979
...
@@ -23,15 +23,14 @@
...
@@ -23,15 +23,14 @@
#include <com/sun/star/i18n/XNativeNumberSupplier.hpp>
#include <com/sun/star/i18n/XNativeNumberSupplier.hpp>
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
lang
{
namespace
uno
{
class
X
MultiServiceFactory
;
class
X
ComponentContext
;
}
}
}}}
}}}
class
UNOTOOLS_DLLPUBLIC
NativeNumberWrapper
class
UNOTOOLS_DLLPUBLIC
NativeNumberWrapper
{
{
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
xSMgr
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
i18n
::
XNativeNumberSupplier
>
xNNS
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
i18n
::
XNativeNumberSupplier
>
xNNS
;
// not implemented, prevent usage
// not implemented, prevent usage
NativeNumberWrapper
(
const
NativeNumberWrapper
&
);
NativeNumberWrapper
(
const
NativeNumberWrapper
&
);
...
@@ -39,7 +38,7 @@ class UNOTOOLS_DLLPUBLIC NativeNumberWrapper
...
@@ -39,7 +38,7 @@ class UNOTOOLS_DLLPUBLIC NativeNumberWrapper
public
:
public
:
NativeNumberWrapper
(
NativeNumberWrapper
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
&
xSF
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
&
rxContext
);
);
~
NativeNumberWrapper
();
~
NativeNumberWrapper
();
...
...
unotools/source/i18n/nativenumberwrapper.cxx
Dosyayı görüntüle @
c2bbc979
...
@@ -20,20 +20,15 @@
...
@@ -20,20 +20,15 @@
#include <unotools/nativenumberwrapper.hxx>
#include <unotools/nativenumberwrapper.hxx>
#include <tools/debug.hxx>
#include <tools/debug.hxx>
#include
"instance.hxx"
#include
<com/sun/star/i18n/NativeNumberSupplier.hpp>
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
NativeNumberWrapper
::
NativeNumberWrapper
(
NativeNumberWrapper
::
NativeNumberWrapper
(
const
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
&
xSF
const
uno
::
Reference
<
uno
::
XComponentContext
>
&
rxContext
)
)
:
xSMgr
(
xSF
)
{
{
xNNS
=
uno
::
Reference
<
i18n
::
XNativeNumberSupplier
>
(
xNNS
=
i18n
::
NativeNumberSupplier
::
create
(
rxContext
);
intl_createInstance
(
xSMgr
,
"com.sun.star.i18n.NativeNumberSupplier"
,
"NativeNumberWrapper"
),
uno
::
UNO_QUERY
);
DBG_ASSERT
(
xNNS
.
is
(),
"NativeNumberWrapper: no NativeNumberSupplier"
);
}
}
...
...
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