Kaydet (Commit) 6ce77cac authored tarafından Noel Grandin's avatar Noel Grandin

move stuff in i18npool/i18nutil in own namespace

instead of trying to share the css::i18n namespace, which is just very
confusing and should be left to actual UNO artifacts

Change-Id: I2f5c36bf1af9a2a98c4f997dd450d015e75ed3f6
Reviewed-on: https://gerrit.libreoffice.org/43079Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst f2db08b2
......@@ -119,6 +119,9 @@ bool FpComparison::ignore(FunctionDecl* function)
|| (dc.Function("lcl_getNANInsteadDBL_MIN").AnonymousNamespace()
.GlobalNamespace())
// chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
|| dc.Function("compareSubstring").Class("ChapterCollator").Namespace("i18npool").GlobalNamespace()
|| dc.Function("setDateTime").Class("Calendar_gregorian").Namespace("i18npool").GlobalNamespace()
|| dc.Function("setLocalDateTime").Class("Calendar_gregorian").Namespace("i18npool").GlobalNamespace()
//TODO:
|| dc.Function("ImpCheckCondition").Class("SvNumberformat").GlobalNamespace()
|| dc.Function("GetTimeFormat").Class("SvNumberFormatter").GlobalNamespace()
......
......@@ -34,14 +34,14 @@
#include <vector>
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
// class BreakIterator
class BreakIteratorImpl : public cppu::WeakImplHelper
<
XBreakIterator,
css::i18n::XBreakIterator,
css::lang::XServiceInfo
>
{
......@@ -57,11 +57,11 @@ public:
const css::lang::Locale& nLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 nCount,
sal_Int32& nDone ) override;
virtual Boundary SAL_CALL previousWord( const OUString& Text, sal_Int32 nStartPos,
virtual css::i18n::Boundary SAL_CALL previousWord( const OUString& Text, sal_Int32 nStartPos,
const css::lang::Locale& nLocale, sal_Int16 WordType) override;
virtual Boundary SAL_CALL nextWord( const OUString& Text, sal_Int32 nStartPos,
virtual css::i18n::Boundary SAL_CALL nextWord( const OUString& Text, sal_Int32 nStartPos,
const css::lang::Locale& nLocale, sal_Int16 WordType) override;
virtual Boundary SAL_CALL getWordBoundary( const OUString& Text, sal_Int32 nPos,
virtual css::i18n::Boundary SAL_CALL getWordBoundary( const OUString& Text, sal_Int32 nPos,
const css::lang::Locale& nLocale, sal_Int16 WordType, sal_Bool bDirection ) override;
virtual sal_Bool SAL_CALL isBeginWord( const OUString& Text, sal_Int32 nPos,
......@@ -76,9 +76,10 @@ public:
virtual sal_Int32 SAL_CALL endOfSentence( const OUString& Text, sal_Int32 nStartPos,
const css::lang::Locale& nLocale ) override;
virtual LineBreakResults SAL_CALL getLineBreak( const OUString& Text, sal_Int32 nStartPos,
virtual css::i18n::LineBreakResults SAL_CALL getLineBreak( const OUString& Text, sal_Int32 nStartPos,
const css::lang::Locale& nLocale, sal_Int32 nMinBreakPos,
const LineBreakHyphenationOptions& hOptions, const LineBreakUserOptions& bOptions ) override;
const css::i18n::LineBreakHyphenationOptions& hOptions,
const css::i18n::LineBreakUserOptions& bOptions ) override;
virtual sal_Int16 SAL_CALL getScriptType( const OUString& Text, sal_Int32 nPos ) override;
virtual sal_Int32 SAL_CALL beginOfScript( const OUString& Text, sal_Int32 nStartPos,
......@@ -106,7 +107,7 @@ public:
static sal_Int16 SAL_CALL getScriptClass(sal_uInt32 currentChar);
protected:
Boundary result; // for word break iterator
css::i18n::Boundary result; // for word break iterator
private:
......@@ -127,10 +128,7 @@ private:
};
} // i18n
} // star
} // sun
} // com
} // i18npool
#endif // INCLUDED_I18NPOOL_INC_BREAKITERATORIMPL_HXX
......
......@@ -24,7 +24,7 @@
#include <memory>
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
// class BreakIterator_CJK
......@@ -33,15 +33,16 @@ class BreakIterator_CJK : public BreakIterator_Unicode
public:
BreakIterator_CJK();
Boundary SAL_CALL nextWord( const OUString& Text, sal_Int32 nStartPos,
css::i18n::Boundary SAL_CALL nextWord( const OUString& Text, sal_Int32 nStartPos,
const css::lang::Locale& nLocale, sal_Int16 WordType) override;
Boundary SAL_CALL previousWord( const OUString& Text, sal_Int32 nStartPos,
css::i18n::Boundary SAL_CALL previousWord( const OUString& Text, sal_Int32 nStartPos,
const css::lang::Locale& nLocale, sal_Int16 WordType) override;
Boundary SAL_CALL getWordBoundary( const OUString& Text, sal_Int32 nPos,
css::i18n::Boundary SAL_CALL getWordBoundary( const OUString& Text, sal_Int32 nPos,
const css::lang::Locale& nLocale, sal_Int16 WordType, sal_Bool bDirection ) override;
LineBreakResults SAL_CALL getLineBreak( const OUString& Text, sal_Int32 nStartPos,
css::i18n::LineBreakResults SAL_CALL getLineBreak( const OUString& Text, sal_Int32 nStartPos,
const css::lang::Locale& nLocale, sal_Int32 nMinBreakPos,
const LineBreakHyphenationOptions& hOptions, const LineBreakUserOptions& bOptions ) override;
const css::i18n::LineBreakHyphenationOptions& hOptions,
const css::i18n::LineBreakUserOptions& bOptions ) override;
protected:
std::unique_ptr<xdictionary> m_xDict;
......@@ -61,7 +62,7 @@ BREAKITERATOR_CJK( ko )
#undef BREAKITERATOR__CJK
} } } }
}
#endif // INCLUDED_I18NPOOL_INC_BREAKITERATOR_CJK_HXX
......
......@@ -22,7 +22,7 @@
#include <breakiterator_unicode.hxx>
#include <xdictionary.hxx>
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
// class BreakIterator_CTL
......@@ -33,14 +33,15 @@ public:
BreakIterator_CTL();
virtual ~BreakIterator_CTL() override;
virtual sal_Int32 SAL_CALL previousCharacters(const OUString& text, sal_Int32 start,
const lang::Locale& nLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 count,
const css::lang::Locale& nLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 count,
sal_Int32& nDone) override;
virtual sal_Int32 SAL_CALL nextCharacters(const OUString& text, sal_Int32 start,
const lang::Locale& rLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 count,
const css::lang::Locale& rLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 count,
sal_Int32& nDone) override;
virtual LineBreakResults SAL_CALL getLineBreak( const OUString& Text, sal_Int32 nStartPos,
virtual css::i18n::LineBreakResults SAL_CALL getLineBreak( const OUString& Text, sal_Int32 nStartPos,
const css::lang::Locale& nLocale, sal_Int32 nMinBreakPos,
const LineBreakHyphenationOptions& hOptions, const LineBreakUserOptions& bOptions ) override;
const css::i18n::LineBreakHyphenationOptions& hOptions,
const css::i18n::LineBreakUserOptions& bOptions ) override;
protected:
OUString cachedText; // for cell index
sal_Int32* nextCellIndex;
......@@ -51,7 +52,7 @@ protected:
virtual void SAL_CALL makeIndex(const OUString& text, sal_Int32 pos);
};
} } } }
}
#endif
......
......@@ -20,7 +20,7 @@
#define INCLUDED_I18NPOOL_INC_BREAKITERATOR_TH_HXX
#include <breakiterator_ctl.hxx>
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
// class BreakIterator_th
......@@ -35,7 +35,7 @@ protected:
void SAL_CALL makeIndex(const OUString& text, sal_Int32 pos) override;
};
} } } }
}
#endif // INCLUDED_I18NPOOL_INC_BREAKITERATOR_TH_HXX
......
......@@ -25,7 +25,7 @@
#include <memory>
#include <unordered_map>
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
#define LOAD_CHARACTER_BREAKITERATOR 0
#define LOAD_WORD_BREAKITERATOR 1
......@@ -48,11 +48,11 @@ public:
const css::lang::Locale& rLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 nCount,
sal_Int32& nDone ) override;
virtual Boundary SAL_CALL previousWord( const OUString& Text, sal_Int32 nStartPos,
virtual css::i18n::Boundary SAL_CALL previousWord( const OUString& Text, sal_Int32 nStartPos,
const css::lang::Locale& nLocale, sal_Int16 WordType) override;
virtual Boundary SAL_CALL nextWord( const OUString& Text, sal_Int32 nStartPos,
virtual css::i18n::Boundary SAL_CALL nextWord( const OUString& Text, sal_Int32 nStartPos,
const css::lang::Locale& nLocale, sal_Int16 WordType) override;
virtual Boundary SAL_CALL getWordBoundary( const OUString& Text, sal_Int32 nPos,
virtual css::i18n::Boundary SAL_CALL getWordBoundary( const OUString& Text, sal_Int32 nPos,
const css::lang::Locale& nLocale, sal_Int16 WordType, sal_Bool bDirection ) override;
virtual sal_Int32 SAL_CALL beginOfSentence( const OUString& Text, sal_Int32 nStartPos,
......@@ -60,9 +60,10 @@ public:
virtual sal_Int32 SAL_CALL endOfSentence( const OUString& Text, sal_Int32 nStartPos,
const css::lang::Locale& nLocale ) override;
virtual LineBreakResults SAL_CALL getLineBreak( const OUString& Text, sal_Int32 nStartPos,
virtual css::i18n::LineBreakResults SAL_CALL getLineBreak( const OUString& Text, sal_Int32 nStartPos,
const css::lang::Locale& nLocale, sal_Int32 nMinBreakPos,
const LineBreakHyphenationOptions& hOptions, const LineBreakUserOptions& bOptions ) override;
const css::i18n::LineBreakHyphenationOptions& hOptions,
const css::i18n::LineBreakUserOptions& bOptions ) override;
//XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
......@@ -103,7 +104,7 @@ public:
typedef std::unordered_map< OString, std::shared_ptr< BI_ValueData >, OStringHash > BIMap;
};
} } } }
}
#endif
......
......@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
static const sal_Unicode table_AIUFullWidth_ja_JP[] = {
0x30A2, // KATAKANA LETTER A
......@@ -320,6 +320,6 @@ static const sal_Unicode table_DiZi_zh[] = {
0x5b50,0x4e11,0x5bc5,0x536f,0x8fb0,0x5df3,0x5348,0x672a,0x7533,0x9149,0x620c,0x4ea5
};
} } } }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -32,7 +32,7 @@
// class CalendarImpl
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
class CalendarImpl : public cppu::WeakImplHelper
<
......@@ -55,7 +55,7 @@ public:
// Methods
virtual void SAL_CALL loadDefaultCalendar(const css::lang::Locale& rLocale) override;
virtual void SAL_CALL loadCalendar(const OUString& uniqueID, const css::lang::Locale& rLocale) override;
virtual Calendar SAL_CALL getLoadedCalendar() override;
virtual css::i18n::Calendar SAL_CALL getLoadedCalendar() override;
virtual css::uno::Sequence < OUString > SAL_CALL getAllCalendars(const css::lang::Locale& rLocale) override;
virtual OUString SAL_CALL getUniqueID() override;
virtual void SAL_CALL setDateTime(double fTimeInDays) override;
......@@ -70,19 +70,19 @@ public:
virtual sal_Int16 SAL_CALL getMinimumNumberOfDaysForFirstWeek() override;
virtual sal_Int16 SAL_CALL getNumberOfMonthsInYear() override;
virtual sal_Int16 SAL_CALL getNumberOfDaysInWeek() override;
virtual css::uno::Sequence < CalendarItem > SAL_CALL getMonths() override;
virtual css::uno::Sequence < CalendarItem > SAL_CALL getDays() override;
virtual css::uno::Sequence < css::i18n::CalendarItem > SAL_CALL getMonths() override;
virtual css::uno::Sequence < css::i18n::CalendarItem > SAL_CALL getDays() override;
virtual OUString SAL_CALL getDisplayName(sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType) override;
// Methods in XExtendedCalendar
virtual OUString SAL_CALL getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) override;
// XCalendar3
virtual Calendar2 SAL_CALL getLoadedCalendar2() override;
virtual css::uno::Sequence < CalendarItem2 > SAL_CALL getDays2() override;
virtual css::uno::Sequence < CalendarItem2 > SAL_CALL getMonths2() override;
virtual css::uno::Sequence < CalendarItem2 > SAL_CALL getGenitiveMonths2() override;
virtual css::uno::Sequence < CalendarItem2 > SAL_CALL getPartitiveMonths2() override;
virtual css::i18n::Calendar2 SAL_CALL getLoadedCalendar2() override;
virtual css::uno::Sequence < css::i18n::CalendarItem2 > SAL_CALL getDays2() override;
virtual css::uno::Sequence < css::i18n::CalendarItem2 > SAL_CALL getMonths2() override;
virtual css::uno::Sequence < css::i18n::CalendarItem2 > SAL_CALL getGenitiveMonths2() override;
virtual css::uno::Sequence < css::i18n::CalendarItem2 > SAL_CALL getPartitiveMonths2() override;
// XCalendar4
virtual void SAL_CALL setLocalDateTime(double TimeInDays) override;
......@@ -105,7 +105,7 @@ private:
css::uno::Reference < css::i18n::XCalendar4 > xCalendar;
};
} } } }
}
#endif
......
......@@ -31,7 +31,7 @@
// class Calendar_gregorian
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
const sal_uInt8 kDisplayEraForcedLongYear = 0x01;
......@@ -42,7 +42,7 @@ struct Era {
sal_uInt8 flags;
};
const sal_Int16 FIELD_INDEX_COUNT = CalendarFieldIndex::FIELD_COUNT2;
const sal_Int16 FIELD_INDEX_COUNT = css::i18n::CalendarFieldIndex::FIELD_COUNT2;
class Calendar_gregorian : public CalendarImpl
{
......@@ -66,7 +66,7 @@ public:
virtual sal_Int16 SAL_CALL getValue(sal_Int16 nFieldIndex) override;
virtual void SAL_CALL addValue(sal_Int16 nFieldIndex, sal_Int32 nAmount) override;
virtual sal_Bool SAL_CALL isValid() override;
virtual Calendar SAL_CALL getLoadedCalendar() override;
virtual css::i18n:: Calendar SAL_CALL getLoadedCalendar() override;
virtual OUString SAL_CALL getUniqueID() override;
virtual sal_Int16 SAL_CALL getFirstDayOfWeek() override;
virtual void SAL_CALL setFirstDayOfWeek(sal_Int16 nDay) override;
......@@ -74,19 +74,19 @@ public:
virtual sal_Int16 SAL_CALL getMinimumNumberOfDaysForFirstWeek() override;
virtual sal_Int16 SAL_CALL getNumberOfMonthsInYear() override;
virtual sal_Int16 SAL_CALL getNumberOfDaysInWeek() override;
virtual css::uno::Sequence < CalendarItem > SAL_CALL getMonths() override;
virtual css::uno::Sequence < CalendarItem > SAL_CALL getDays() override;
virtual css::uno::Sequence < css::i18n::CalendarItem > SAL_CALL getMonths() override;
virtual css::uno::Sequence < css::i18n::CalendarItem > SAL_CALL getDays() override;
virtual OUString SAL_CALL getDisplayName(sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType) override;
// Methods in XExtendedCalendar
virtual OUString SAL_CALL getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) override;
// XCalendar3
virtual Calendar2 SAL_CALL getLoadedCalendar2() override;
virtual css::uno::Sequence < CalendarItem2 > SAL_CALL getDays2() override;
virtual css::uno::Sequence < CalendarItem2 > SAL_CALL getMonths2() override;
virtual css::uno::Sequence < CalendarItem2 > SAL_CALL getGenitiveMonths2() override;
virtual css::uno::Sequence < CalendarItem2 > SAL_CALL getPartitiveMonths2() override;
virtual css::i18n::Calendar2 SAL_CALL getLoadedCalendar2() override;
virtual css::uno::Sequence < css::i18n::CalendarItem2 > SAL_CALL getDays2() override;
virtual css::uno::Sequence < css::i18n::CalendarItem2 > SAL_CALL getMonths2() override;
virtual css::uno::Sequence < css::i18n::CalendarItem2 > SAL_CALL getGenitiveMonths2() override;
virtual css::uno::Sequence < css::i18n::CalendarItem2 > SAL_CALL getPartitiveMonths2() override;
// XCalendar4
virtual void SAL_CALL setLocalDateTime(double TimeInDays) override;
......@@ -118,7 +118,7 @@ protected:
OUString getDisplayStringImpl( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode, bool bEraMode );
private:
Calendar2 aCalendar;
css::i18n::Calendar2 aCalendar;
/** Submit fieldSetValue array according to fieldSet.
......@@ -187,7 +187,7 @@ public:
virtual OUString SAL_CALL getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) override;
};
} } } }
}
#endif
......
......@@ -25,7 +25,7 @@
// class Calendar_hijri
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
class Calendar_hijri : public Calendar_gregorian
{
......@@ -70,7 +70,7 @@ private:
static double getJulianDay(sal_Int32 day, sal_Int32 month, sal_Int32 year);
};
} } } }
}
#endif
......
......@@ -25,7 +25,7 @@
// class Calendar_jewish
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
class Calendar_jewish : public Calendar_gregorian
{
......@@ -41,7 +41,7 @@ protected:
void mapFromGregorian() override;
};
} } } }
}
#endif
......
......@@ -60,9 +60,9 @@ namespace o3tl {
}
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
class cclass_Unicode : public cppu::WeakImplHelper < XCharacterClassification, css::lang::XServiceInfo >
class cclass_Unicode : public cppu::WeakImplHelper < css::i18n::XCharacterClassification, css::lang::XServiceInfo >
{
public:
cclass_Unicode(const css::uno::Reference < css::uno::XComponentContext >& rxContext );
......@@ -81,10 +81,10 @@ public:
const css::lang::Locale& rLocale ) override;
virtual sal_Int32 SAL_CALL getStringType( const OUString& text, sal_Int32 nPos, sal_Int32 nCount,
const css::lang::Locale& rLocale ) override;
virtual ParseResult SAL_CALL parseAnyToken( const OUString& Text, sal_Int32 nPos,
virtual css::i18n::ParseResult SAL_CALL parseAnyToken( const OUString& Text, sal_Int32 nPos,
const css::lang::Locale& rLocale, sal_Int32 nStartCharFlags, const OUString& userDefinedCharactersStart,
sal_Int32 nContCharFlags, const OUString& userDefinedCharactersCont ) override;
virtual ParseResult SAL_CALL parsePredefinedToken( sal_Int32 nTokenType, const OUString& Text,
virtual css::i18n::ParseResult SAL_CALL parsePredefinedToken( sal_Int32 nTokenType, const OUString& Text,
sal_Int32 nPos, const css::lang::Locale& rLocale, sal_Int32 nStartCharFlags,
const OUString& userDefinedCharactersStart, sal_Int32 nContCharFlags,
const OUString& userDefinedCharactersCont ) override;
......@@ -126,7 +126,7 @@ private:
/// used for parser only
css::lang::Locale aParserLocale;
css::uno::Reference < XLocaleData4 > mxLocaleData;
css::uno::Reference < css::i18n::XLocaleData4 > mxLocaleData;
css::uno::Reference < css::i18n::XNativeNumberSupplier > xNatNumSup;
OUString aStartChars;
OUString aContChars;
......@@ -168,7 +168,7 @@ private:
void destroyParserTable();
/// Parse a text.
void parseText( ParseResult& r, const OUString& rText, sal_Int32 nPos,
void parseText( css::i18n::ParseResult& r, const OUString& rText, sal_Int32 nPos,
sal_Int32 nTokenType = 0xffffffff );
/// Setup International class, new'ed only if different from existing.
......@@ -179,7 +179,7 @@ private:
};
} } } }
}
#endif
......
......@@ -22,7 +22,7 @@
#include <collatorImpl.hxx>
#include <com/sun/star/i18n/XCharacterClassification.hpp>
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
// ----------------------------------------------------
// class ChapterCollator
......@@ -46,10 +46,10 @@ public:
private:
// CharacterClassification Implementation
css::uno::Reference< XCharacterClassification > cclass;
css::uno::Reference< css::i18n::XCharacterClassification > cclass;
};
} } } }
}
#endif
......
......@@ -26,11 +26,11 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
class CharacterClassificationImpl : public cppu::WeakImplHelper
<
XCharacterClassification,
css::i18n::XCharacterClassification,
css::lang::XServiceInfo
>
{
......@@ -52,11 +52,11 @@ public:
const css::lang::Locale& rLocale ) override;
virtual sal_Int32 SAL_CALL getStringType( const OUString& text, sal_Int32 nPos,
sal_Int32 nCount, const css::lang::Locale& rLocale ) override;
virtual ParseResult SAL_CALL parseAnyToken( const OUString& Text, sal_Int32 nPos,
virtual css::i18n::ParseResult SAL_CALL parseAnyToken( const OUString& Text, sal_Int32 nPos,
const css::lang::Locale& rLocale, sal_Int32 nStartCharFlags,
const OUString& userDefinedCharactersStart, sal_Int32 nContCharFlags,
const OUString& userDefinedCharactersCont ) override;
virtual ParseResult SAL_CALL parsePredefinedToken( sal_Int32 nTokenType,
virtual css::i18n::ParseResult SAL_CALL parsePredefinedToken( sal_Int32 nTokenType,
const OUString& Text, sal_Int32 nPos, const css::lang::Locale& rLocale,
sal_Int32 nStartCharFlags, const OUString& userDefinedCharactersStart,
sal_Int32 nContCharFlags, const OUString& userDefinedCharactersCont ) override;
......@@ -92,7 +92,7 @@ private:
};
} } } }
}
#endif
......
......@@ -22,7 +22,7 @@
#include <transliteration_Numeric.hxx>
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
#define TRANSLITERATION_CHARTONUM( name ) \
class CharToNum##name : public transliteration_Numeric \
......@@ -48,7 +48,7 @@ TRANSLITERATION_CHARTONUM(_th)
#undef TRANSLITERATION_CHARTONUM
} } } }
}
#endif // INCLUDED_I18NPOOL_INC_CHARTONUM_HXX
......
......@@ -30,13 +30,14 @@
#include <vector>
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
// ----------------------------------------------------
// class CollatorImpl
// ----------------------------------------------------
class CollatorImpl : public cppu::WeakImplHelper
<
XCollator,
css::i18n::XCollator,
css::lang::XServiceInfo
>
{
......@@ -53,15 +54,15 @@ public:
virtual sal_Int32 SAL_CALL compareString( const OUString& s1,
const OUString& s2) override;
virtual sal_Int32 SAL_CALL loadDefaultCollator( const lang::Locale& rLocale, sal_Int32 collatorOptions) override;
virtual sal_Int32 SAL_CALL loadDefaultCollator( const css::lang::Locale& rLocale, sal_Int32 collatorOptions) override;
virtual sal_Int32 SAL_CALL loadCollatorAlgorithm( const OUString& impl, const lang::Locale& rLocale,
virtual sal_Int32 SAL_CALL loadCollatorAlgorithm( const OUString& impl, const css::lang::Locale& rLocale,
sal_Int32 collatorOptions) override;
virtual void SAL_CALL loadCollatorAlgorithmWithEndUserOption( const OUString& impl, const lang::Locale& rLocale,
virtual void SAL_CALL loadCollatorAlgorithmWithEndUserOption( const OUString& impl, const css::lang::Locale& rLocale,
const css::uno::Sequence< sal_Int32 >& collatorOptions) override;
virtual css::uno::Sequence< OUString > SAL_CALL listCollatorAlgorithms( const lang::Locale& rLocale ) override;
virtual css::uno::Sequence< OUString > SAL_CALL listCollatorAlgorithms( const css::lang::Locale& rLocale ) override;
virtual css::uno::Sequence< sal_Int32 > SAL_CALL listCollatorOptions( const OUString& collatorAlgorithmName ) override;
......@@ -71,16 +72,16 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
protected:
lang::Locale nLocale;
css::lang::Locale nLocale;
private:
struct lookupTableItem {
lang::Locale aLocale;
css::lang::Locale aLocale;
OUString algorithm;
OUString service;
css::uno::Reference < XCollator > xC;
lookupTableItem(const lang::Locale& rLocale, const OUString& _algorithm, const OUString& _service,
lookupTableItem(const css::lang::Locale& rLocale, const OUString& _algorithm, const OUString& _service,
css::uno::Reference < XCollator > const & _xC) : aLocale(rLocale), algorithm(_algorithm), service(_service), xC(_xC) {}
bool SAL_CALL equals(const lang::Locale& rLocale, const OUString& _algorithm) {
bool SAL_CALL equals(const css::lang::Locale& rLocale, const OUString& _algorithm) {
return aLocale.Language == rLocale.Language &&
aLocale.Country == rLocale.Country &&
aLocale.Variant == rLocale.Variant &&
......@@ -93,16 +94,16 @@ private:
// Service Factory
css::uno::Reference < css::uno::XComponentContext > m_xContext;
// lang::Locale Data
css::uno::Reference < XLocaleData4 > mxLocaleData;
css::uno::Reference < css::i18n::XLocaleData4 > mxLocaleData;
/// @throws css::uno::RuntimeException
bool SAL_CALL createCollator(const lang::Locale& rLocale, const OUString& serviceName,
bool SAL_CALL createCollator(const css::lang::Locale& rLocale, const OUString& serviceName,
const OUString& rSortAlgorithm);
/// @throws css::uno::RuntimeException
void SAL_CALL loadCachedCollator(const lang::Locale& rLocale, const OUString& rSortAlgorithm);
void SAL_CALL loadCachedCollator(const css::lang::Locale& rLocale, const OUString& rSortAlgorithm);
};
} } } }
}
#endif
......
......@@ -30,9 +30,9 @@
// class Collator_Unicode
// ----------------------------------------------------
namespace com { namespace sun { namespace star { namespace i18n {
namespace i18npool {
class Collator_Unicode : public cppu::WeakImplHelper < XCollator, css::lang::XServiceInfo >
class Collator_Unicode : public cppu::WeakImplHelper < css::i18n::XCollator, css::lang::XServiceInfo >
{
public:
// Constructors
......@@ -45,15 +45,15 @@ public:
sal_Int32 SAL_CALL compareString( const OUString& s1, const OUString& s2) override;
sal_Int32 SAL_CALL loadCollatorAlgorithm( const OUString& impl, const lang::Locale& rLocale,
sal_Int32 SAL_CALL loadCollatorAlgorithm( const OUString& impl, const css::lang::Locale& rLocale,
sal_Int32 collatorOptions) override;
// following 4 methods are implemented in collatorImpl.
sal_Int32 SAL_CALL loadDefaultCollator( const lang::Locale&, sal_Int32) override {throw css::uno::RuntimeException();}
void SAL_CALL loadCollatorAlgorithmWithEndUserOption( const OUString&, const lang::Locale&,
sal_Int32 SAL_CALL loadDefaultCollator( const css::lang::Locale&, sal_Int32) override {throw css::uno::RuntimeException();}
void SAL_CALL loadCollatorAlgorithmWithEndUserOption( const OUString&, const css::lang::Locale&,
const css::uno::Sequence< sal_Int32 >&) override {throw css::uno::RuntimeException();}
css::uno::Sequence< OUString > SAL_CALL listCollatorAlgorithms( const lang::Locale&) override {throw css::uno::RuntimeException();}
css::uno::Sequence< OUString > SAL_CALL listCollatorAlgorithms( const css::lang::Locale&) override {throw css::uno::RuntimeException();}
css::uno::Sequence< sal_Int32 > SAL_CALL listCollatorOptions( const OUString& ) override {throw css::uno::RuntimeException();}
//XServiceInfo
......@@ -70,7 +70,7 @@ private:
#endif
};
} } } }
}
#endif