Kaydet (Commit) 91ba527a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Avoid name clash with generated C++ class corresponding to UNOIDL service

Change-Id: I96582bf05787a30479d324ff8deb7cea758bb2c2
üst ab819ab4
...@@ -93,7 +93,7 @@ public: ...@@ -93,7 +93,7 @@ public:
protected: protected:
const Era *eraArray; const Era *eraArray;
icu::Calendar *body; icu::Calendar *body;
NativeNumberSupplier aNatNum; NativeNumberSupplierService aNatNum;
const sal_Char* cCalendar; const sal_Char* cCalendar;
com::sun::star::lang::Locale aLocale; com::sun::star::lang::Locale aLocale;
sal_uInt32 fieldSet; sal_uInt32 fieldSet;
......
...@@ -28,16 +28,16 @@ ...@@ -28,16 +28,16 @@
namespace com { namespace sun { namespace star { namespace i18n { namespace com { namespace sun { namespace star { namespace i18n {
// ---------------------------------------------------- // ----------------------------------------------------
// class NativeNumberSupplier // class NativeNumberSupplierService
// ---------------------------------------------------- // ----------------------------------------------------
class NativeNumberSupplier : public cppu::WeakImplHelper2 class NativeNumberSupplierService : public cppu::WeakImplHelper2
< <
com::sun::star::i18n::XNativeNumberSupplier, com::sun::star::i18n::XNativeNumberSupplier,
com::sun::star::lang::XServiceInfo com::sun::star::lang::XServiceInfo
> >
{ {
public: public:
NativeNumberSupplier(bool _useOffset = false) : useOffset(_useOffset) {} NativeNumberSupplierService(bool _useOffset = false) : useOffset(_useOffset) {}
// Methods // Methods
virtual OUString SAL_CALL getNativeNumberString( const OUString& aNumberString, virtual OUString SAL_CALL getNativeNumberString( const OUString& aNumberString,
......
...@@ -857,7 +857,7 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal ...@@ -857,7 +857,7 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal
} }
if (natNum) { if (natNum) {
NativeNumberSupplier sNatNum; NativeNumberSupplierService sNatNum;
result += sNatNum.getNativeNumberString(OUString::number( number ), locale, natNum); result += sNatNum.getNativeNumberString(OUString::number( number ), locale, natNum);
} else if (tableSize) { } else if (tableSize) {
if ( number > tableSize && !recycleSymbol) if ( number > tableSize && !recycleSymbol)
......
...@@ -517,7 +517,7 @@ static sal_Int16 SAL_CALL getLanguageNumber( const Locale& rLocale) ...@@ -517,7 +517,7 @@ static sal_Int16 SAL_CALL getLanguageNumber( const Locale& rLocale)
return -1; return -1;
} }
OUString SAL_CALL NativeNumberSupplier::getNativeNumberString(const OUString& aNumberString, const Locale& rLocale, OUString SAL_CALL NativeNumberSupplierService::getNativeNumberString(const OUString& aNumberString, const Locale& rLocale,
sal_Int16 nNativeNumberMode, Sequence< sal_Int32 >& offset) throw (RuntimeException) sal_Int16 nNativeNumberMode, Sequence< sal_Int32 >& offset) throw (RuntimeException)
{ {
const Number *number = 0; const Number *number = 0;
...@@ -595,14 +595,14 @@ OUString SAL_CALL NativeNumberSupplier::getNativeNumberString(const OUString& aN ...@@ -595,14 +595,14 @@ OUString SAL_CALL NativeNumberSupplier::getNativeNumberString(const OUString& aN
return aNumberString; return aNumberString;
} }
OUString SAL_CALL NativeNumberSupplier::getNativeNumberString(const OUString& aNumberString, const Locale& rLocale, OUString SAL_CALL NativeNumberSupplierService::getNativeNumberString(const OUString& aNumberString, const Locale& rLocale,
sal_Int16 nNativeNumberMode) throw (RuntimeException, std::exception) sal_Int16 nNativeNumberMode) throw (RuntimeException, std::exception)
{ {
Sequence< sal_Int32 > offset; Sequence< sal_Int32 > offset;
return getNativeNumberString(aNumberString, rLocale, nNativeNumberMode, offset); return getNativeNumberString(aNumberString, rLocale, nNativeNumberMode, offset);
} }
sal_Unicode SAL_CALL NativeNumberSupplier::getNativeNumberChar( const sal_Unicode inChar, const Locale& rLocale, sal_Int16 nNativeNumberMode ) throw(com::sun::star::uno::RuntimeException) sal_Unicode SAL_CALL NativeNumberSupplierService::getNativeNumberChar( const sal_Unicode inChar, const Locale& rLocale, sal_Int16 nNativeNumberMode ) throw(com::sun::star::uno::RuntimeException)
{ {
if (nNativeNumberMode == NativeNumberMode::NATNUM0) { // Ascii if (nNativeNumberMode == NativeNumberMode::NATNUM0) { // Ascii
for (sal_Int16 i = 0; i < NumberChar_Count; i++) for (sal_Int16 i = 0; i < NumberChar_Count; i++)
...@@ -636,7 +636,7 @@ sal_Unicode SAL_CALL NativeNumberSupplier::getNativeNumberChar( const sal_Unicod ...@@ -636,7 +636,7 @@ sal_Unicode SAL_CALL NativeNumberSupplier::getNativeNumberChar( const sal_Unicod
return inChar; return inChar;
} }
sal_Bool SAL_CALL NativeNumberSupplier::isValidNatNum( const Locale& rLocale, sal_Int16 nNativeNumberMode ) throw (RuntimeException, std::exception) sal_Bool SAL_CALL NativeNumberSupplierService::isValidNatNum( const Locale& rLocale, sal_Int16 nNativeNumberMode ) throw (RuntimeException, std::exception)
{ {
sal_Int16 langnum = getLanguageNumber(rLocale); sal_Int16 langnum = getLanguageNumber(rLocale);
...@@ -663,7 +663,7 @@ sal_Bool SAL_CALL NativeNumberSupplier::isValidNatNum( const Locale& rLocale, sa ...@@ -663,7 +663,7 @@ sal_Bool SAL_CALL NativeNumberSupplier::isValidNatNum( const Locale& rLocale, sa
return sal_False; return sal_False;
} }
NativeNumberXmlAttributes SAL_CALL NativeNumberSupplier::convertToXmlAttributes( const Locale& rLocale, sal_Int16 nNativeNumberMode ) throw (RuntimeException, std::exception) NativeNumberXmlAttributes SAL_CALL NativeNumberSupplierService::convertToXmlAttributes( const Locale& rLocale, sal_Int16 nNativeNumberMode ) throw (RuntimeException, std::exception)
{ {
static const sal_Int16 attShort = 0; static const sal_Int16 attShort = 0;
static const sal_Int16 attMedium = 1; static const sal_Int16 attMedium = 1;
...@@ -739,7 +739,7 @@ static bool natNumIn(sal_Int16 num, const sal_Int16 natnum[], sal_Int16 len) ...@@ -739,7 +739,7 @@ static bool natNumIn(sal_Int16 num, const sal_Int16 natnum[], sal_Int16 len)
return false; return false;
} }
sal_Int16 SAL_CALL NativeNumberSupplier::convertFromXmlAttributes( const NativeNumberXmlAttributes& aAttr ) throw (RuntimeException, std::exception) sal_Int16 SAL_CALL NativeNumberSupplierService::convertFromXmlAttributes( const NativeNumberXmlAttributes& aAttr ) throw (RuntimeException, std::exception)
{ {
sal_Unicode numberChar[NumberChar_Count]; sal_Unicode numberChar[NumberChar_Count];
for (sal_Int16 i = 0; i < NumberChar_Count; i++) for (sal_Int16 i = 0; i < NumberChar_Count; i++)
...@@ -887,19 +887,19 @@ OUString SAL_CALL getHebrewNativeNumberString(const OUString& aNumberString, boo ...@@ -887,19 +887,19 @@ OUString SAL_CALL getHebrewNativeNumberString(const OUString& aNumberString, boo
static const sal_Char* implementationName = "com.sun.star.i18n.NativeNumberSupplier"; static const sal_Char* implementationName = "com.sun.star.i18n.NativeNumberSupplier";
OUString SAL_CALL NativeNumberSupplier::getImplementationName() throw( RuntimeException, std::exception ) OUString SAL_CALL NativeNumberSupplierService::getImplementationName() throw( RuntimeException, std::exception )
{ {
return OUString::createFromAscii( implementationName ); return OUString::createFromAscii( implementationName );
} }
sal_Bool SAL_CALL sal_Bool SAL_CALL
NativeNumberSupplier::supportsService(const OUString& rServiceName) throw( RuntimeException, std::exception ) NativeNumberSupplierService::supportsService(const OUString& rServiceName) throw( RuntimeException, std::exception )
{ {
return cppu::supportsService(this, rServiceName); return cppu::supportsService(this, rServiceName);
} }
Sequence< OUString > SAL_CALL Sequence< OUString > SAL_CALL
NativeNumberSupplier::getSupportedServiceNames() throw( RuntimeException, std::exception ) NativeNumberSupplierService::getSupportedServiceNames() throw( RuntimeException, std::exception )
{ {
Sequence< OUString > aRet(1); Sequence< OUString > aRet(1);
aRet[0] = OUString::createFromAscii( implementationName ); aRet[0] = OUString::createFromAscii( implementationName );
...@@ -913,7 +913,7 @@ com_sun_star_i18n_NativeNumberSupplier_get_implementation( ...@@ -913,7 +913,7 @@ com_sun_star_i18n_NativeNumberSupplier_get_implementation(
css::uno::XComponentContext *, css::uno::XComponentContext *,
css::uno::Sequence<css::uno::Any> const &) css::uno::Sequence<css::uno::Any> const &)
{ {
return cppu::acquire(new css::i18n::NativeNumberSupplier()); return cppu::acquire(new css::i18n::NativeNumberSupplierService());
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -119,7 +119,7 @@ transliteration_Numeric::transliterate( const OUString& inStr, sal_Int32 startPo ...@@ -119,7 +119,7 @@ transliteration_Numeric::transliterate( const OUString& inStr, sal_Int32 startPo
if (tableSize) if (tableSize)
return transliterateBullet( inStr, startPos, nCount, offset); return transliterateBullet( inStr, startPos, nCount, offset);
else else
return NativeNumberSupplier(useOffset).getNativeNumberString( inStr.copy(startPos, nCount), aLocale, nNativeNumberMode, offset ); return NativeNumberSupplierService(useOffset).getNativeNumberString( inStr.copy(startPos, nCount), aLocale, nNativeNumberMode, offset );
} }
sal_Unicode SAL_CALL sal_Unicode SAL_CALL
...@@ -134,7 +134,7 @@ transliteration_Numeric::transliterateChar2Char( sal_Unicode inChar ) throw(Runt ...@@ -134,7 +134,7 @@ transliteration_Numeric::transliterateChar2Char( sal_Unicode inChar ) throw(Runt
return inChar; return inChar;
} }
else else
return NativeNumberSupplier().getNativeNumberChar( inChar, aLocale, nNativeNumberMode ); return NativeNumberSupplierService().getNativeNumberChar( inChar, aLocale, nNativeNumberMode );
} }
} } } } } } } }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment