summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2012-08-01 18:34:24 +0200
committerThomas Arnhold <thomas@arnhold.org>2012-08-01 18:34:46 +0200
commit791071825969a40a454ed2b9806ec8b5c3b08fe9 (patch)
tree9fee331088d043e2995f0c5b5e7f1c69701dce49 /svl
parent23e5bb66436991d809d8d807f27d25f922fb062f (diff)
Remove unused code: those classes are unused
Change-Id: Ibf41655d40c9534629bbb0dd5ae600791b42922d
Diffstat (limited to 'svl')
-rw-r--r--svl/inc/svl/ondemand.hxx74
1 files changed, 0 insertions, 74 deletions
diff --git a/svl/inc/svl/ondemand.hxx b/svl/inc/svl/ondemand.hxx
index b3ce4988c825..d90314db286f 100644
--- a/svl/inc/svl/ondemand.hxx
+++ b/svl/inc/svl/ondemand.hxx
@@ -232,80 +232,6 @@ public:
CalendarWrapper& operator*() { return *get(); }
};
-/** Load a collator only if it's needed.
- SvNumberformatter uses it upon switching locales.
- @ATTENTION If the default ctor is used the init() method MUST be called
- before accessing the collator.
- */
-class OnDemandCollatorWrapper
-{
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr;
- ::com::sun::star::lang::Locale aLocale;
- mutable CollatorWrapper* pPtr;
- mutable bool bValid;
- bool bInitialized;
-
-public:
- OnDemandCollatorWrapper()
- : pPtr(0)
- , bValid(false)
- , bInitialized(false)
- {}
- OnDemandCollatorWrapper(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
- ::com::sun::star::lang::Locale& rLocale
- )
- : bValid(false)
- , bInitialized(false)
- {
- init( rxSMgr, rLocale );
- }
- ~OnDemandCollatorWrapper()
- {
- delete pPtr;
- }
-
- bool isInitialized() const { return bInitialized; }
-
- bool is() const { return pPtr != NULL; }
-
- void init(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
- ::com::sun::star::lang::Locale& rLocale
- )
- {
- xSMgr = rxSMgr;
- changeLocale( rLocale );
- if ( pPtr )
- {
- delete pPtr;
- pPtr = NULL;
- }
- bInitialized = true;
- }
-
- void changeLocale( ::com::sun::star::lang::Locale& rLocale )
- {
- bValid = false;
- aLocale = rLocale;
- }
-
- const CollatorWrapper* get() const
- {
- if ( !bValid )
- {
- if ( !pPtr )
- pPtr = new CollatorWrapper( xSMgr );
- pPtr->loadDefaultCollator( aLocale, ::com::sun::star::i18n::CollatorOptions::CollatorOptions_IGNORE_CASE );
- bValid = true;
- }
- return pPtr;
- }
-
- const CollatorWrapper* operator->() const { return get(); }
- const CollatorWrapper& operator*() const { return *get(); }
-};
-
/** Load a transliteration only if it's needed.
SvNumberformatter uses it upon switching locales.
@ATTENTION If the default ctor is used the init() method MUST be called