diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-04-26 20:41:07 +0300 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2013-04-27 09:28:37 +0000 |
commit | ec8617568ff091026b2f17cce3b547b1633fa6c4 (patch) | |
tree | 70a54e6853121e2ff178ead66843a2deaa888fa4 /svl | |
parent | 4667a55fd47db456d36ad151656b4041a6ded034 (diff) |
Bin ugly (ab)use of preprocessor in headers
The time when it made sense to use "clever" #ifdefs to, for performance or
compiler reasons, conditionally bypass private parts of a class declaration
passed a decade or longer ago.
Still more of this in sw and sc. People working on those modules might want to
do it too, or not.
Change-Id: I1053139ca5e5e2631f7b22d99d3bada54fc337be
Reviewed-on: https://gerrit.libreoffice.org/3627
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zforfind.cxx | 3 | ||||
-rw-r--r-- | svl/source/numbers/zforfind.hxx | 5 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 2 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 21 | ||||
-rw-r--r-- | svl/source/numbers/zforscan.cxx | 3 | ||||
-rw-r--r-- | svl/source/numbers/zforscan.hxx | 5 |
6 files changed, 21 insertions, 18 deletions
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index f80d7291e9eb..bd68ab4d3f3f 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -37,10 +37,7 @@ #include "zforscan.hxx" #include <svl/zformat.hxx> -#define _ZFORFIND_CXX #include "zforfind.hxx" -#undef _ZFORFIND_CXX - #ifndef DBG_UTIL #define NF_TEST_CALENDAR 0 diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx index dadde5cc1a46..de864122a8a7 100644 --- a/svl/source/numbers/zforfind.hxx +++ b/svl/source/numbers/zforfind.hxx @@ -183,7 +183,6 @@ private: */ sal_uInt16 nDatePatternNumbers; -#ifdef _ZFORFIND_CXX // methods private to implementation void Reset(); // Reset all variables before start of analysis void InitText(); // Init of months and days of week @@ -414,12 +413,8 @@ private: @see nMayBeMonthDate */ bool MayBeMonthDate(); - -#endif // _ZFORFIND_CXX }; - - #endif // _ZFORFIND_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 6b42aaa64561..ae0a1635f5a5 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -30,10 +30,8 @@ #include <unotools/misccfg.hxx> -#define _ZFORLIST_CXX #include <osl/mutex.hxx> #include <svl/zforlist.hxx> -#undef _ZFORLIST_CXX #include "zforscan.hxx" #include "zforfind.hxx" diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 8bc6dc24ff89..fc9254be53ea 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -36,7 +36,6 @@ #include <com/sun/star/i18n/CalendarDisplayCode.hpp> #include <com/sun/star/i18n/AmPmValue.hpp> -#define _ZFORMAT_CXX #include <svl/zformat.hxx> #include <zforscan.hxx> @@ -5479,4 +5478,24 @@ sal_uInt16 SvNumberformat::ImpGetNumForStringElementCount( sal_uInt16 nNumFor ) return nCnt; } +const CharClass& SvNumberformat::rChrCls() const +{ + return rScan.GetChrCls(); +} + +const LocaleDataWrapper& SvNumberformat::rLoc() const +{ + return rScan.GetLoc(); +} + +CalendarWrapper& SvNumberformat::GetCal() const +{ + return rScan.GetCal(); +} + +const SvNumberFormatter& SvNumberformat::GetFormatter() const +{ + return *rScan.GetNumberformatter(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index a0d44dbb6472..43a354f7a13c 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -31,9 +31,8 @@ #include <svl/zformat.hxx> #include <unotools/digitgroupingiterator.hxx> -#define _ZFORSCAN_CXX #include "zforscan.hxx" -#undef _ZFORSCAN_CXX + #include <svl/nfsymbol.hxx> using namespace svt; diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx index a93ef9660e28..7872b07e9dfa 100644 --- a/svl/source/numbers/zforscan.hxx +++ b/svl/source/numbers/zforscan.hxx @@ -218,7 +218,6 @@ private: // ---- privater Teil void InitSpecialKeyword( NfKeywordIndex eIdx ) const; void InitCompatCur() const; -#ifdef _ZFORSCAN_CXX // ----- private Methoden ----- void SetDependentKeywords(); // Setzt die Sprachabh. Keyw. void SkipStrings(sal_uInt16& i, sal_Int32& nPos);// Ueberspringt StringSymbole @@ -270,12 +269,8 @@ private: // ---- privater Teil // remove "..." and \... quotes from rStr, return how many chars removed static sal_Int32 RemoveQuotes( OUString& rStr ); - -#endif //_ZFORSCAN_CXX }; - - #endif // _ZFORSCAN_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |