Hi Everybody,
My first mail on this liste :-)
I was grepping for some dead code using 'grep "#if 0"' and I have found a
bunch of unused method in xmloff package.
I have attached 2 patches for review.
Regards,
Joachim.
From a545c47c769e1b380d8670093bfdc6bc19243d1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joachim=20Tr=C3=A9mouroux?= <joachim.tremouroux@gmail.com>
Date: Fri, 19 Nov 2010 19:11:14 +0100
Subject: [PATCH] removed unused SvXMLNumFmtDefaults methods
---
.../bf_xmloff/source/style/xmloff_xmlnumfi.cxx | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/binfilter/bf_xmloff/source/style/xmloff_xmlnumfi.cxx
b/binfilter/bf_xmloff/source/style/xmloff_xmlnumfi.cxx
index aa92804..1aa873a 100644
--- a/binfilter/bf_xmloff/source/style/xmloff_xmlnumfi.cxx
+++ b/binfilter/bf_xmloff/source/style/xmloff_xmlnumfi.cxx
@@ -1100,11 +1100,6 @@ void SvXMLNumFmtElementContext::EndElement()
break;
case XML_TOK_STYLE_ERA:
rParent.UpdateCalendar( sCalendar );
-#if 0
-//! I18N doesn't provide SYSTEM or extended date information yet
- if ( rParent.IsFromSystem() )
- bEffLong = SvXMLNumFmtDefaults::IsSystemLongEra( rParent.GetInternational(), bLong
);
-#endif
rParent.AddNfKeyword( bEffLong ? NF_KEY_GGG : NF_KEY_G );
// HasEra flag is set
break;
--
1.7.1
From 1387cc4ef6e2ee3ebb5f74c0a68141d1b75b1923 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joachim=20Tr=C3=A9mouroux?= <joachim.tremouroux@gmail.com>
Date: Fri, 19 Nov 2010 19:11:14 +0100
Subject: [PATCH] removed unused SvXMLNumFmtDefaults methods
---
xmloff/inc/xmloff/xmlnumfi.hxx | 7 ----
xmloff/source/style/xmlnumfi.cxx | 68 --------------------------------------
2 files changed, 0 insertions(+), 75 deletions(-)
diff --git a/xmloff/inc/xmloff/xmlnumfi.hxx b/xmloff/inc/xmloff/xmlnumfi.hxx
index fc8a663..eae060a 100644
--- a/xmloff/inc/xmloff/xmlnumfi.hxx
+++ b/xmloff/inc/xmloff/xmlnumfi.hxx
@@ -115,13 +115,6 @@ public:
class SvXMLNumFmtDefaults
{
public:
- static sal_Bool IsSystemLongDay( const SvtSysLocale& rSysLoc, BOOL bLong );
- static sal_Bool IsSystemLongMonth( const SvtSysLocale& rSysLoc, BOOL bLong );
- static sal_Bool IsSystemTextualMonth( const SvtSysLocale& rSysLoc, BOOL bLong );
- static sal_Bool IsSystemLongYear( const SvtSysLocale& rSysLoc, BOOL bLong );
- static sal_Bool IsSystemLongEra( const SvtSysLocale& rSysLoc, BOOL bLong );
- static sal_Bool IsSystemLongDayOfWeek( const SvtSysLocale& rSysLoc, BOOL bLong );
-
// return value is NfIndexTableOffset
static sal_uInt16 GetDefaultDateFormat( SvXMLDateElementAttributes eDOW,
SvXMLDateElementAttributes eDay, SvXMLDateElementAttributes eMonth,
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 7f38b03..527769d 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -1246,74 +1246,6 @@ void SvXMLNumFmtElementContext::EndElement()
//-------------------------------------------------------------------------
-sal_Bool SvXMLNumFmtDefaults::IsSystemLongDay( const SvtSysLocale&, BOOL bLong )
-{
- // TODO: merge system information and defaults into i18n locale data
-#if 0
- return bLong ? rIntn.IsLongDateDayLeadingZero() : rIntn.IsDateDayLeadingZero();
-#else
- return !bLong;
-#endif
-}
-
-sal_Bool SvXMLNumFmtDefaults::IsSystemLongMonth( const SvtSysLocale&, BOOL bLong )
-{
- // TODO: merge system information and defaults into i18n locale data
-#if 0
- if (bLong)
- {
- MonthFormat eMonth = rIntn.GetLongDateMonthFormat();
- return ( eMonth == MONTH_ZERO || eMonth == MONTH_LONG );
- }
- else
- return rIntn.IsDateMonthLeadingZero();
-#else
- return !bLong;
-#endif
-}
-
-sal_Bool SvXMLNumFmtDefaults::IsSystemTextualMonth( const SvtSysLocale&, BOOL bLong )
-{
- // TODO: merge system information and defaults into i18n locale data
-#if 0
- if (bLong)
- {
- MonthFormat eMonth = rIntn.GetLongDateMonthFormat();
- return ( eMonth == MONTH_SHORT || eMonth == MONTH_LONG );
- }
- else
- return sal_False;
-#else
- return bLong;
-#endif
-}
-
-sal_Bool SvXMLNumFmtDefaults::IsSystemLongYear( const SvtSysLocale&, BOOL bLong )
-{
- // TODO: merge system information and defaults into i18n locale data
-#if 0
- return bLong ? rIntn.IsLongDateCentury() : rIntn.IsDateCentury();
-#else
- return bLong;
-#endif
-}
-
-sal_Bool SvXMLNumFmtDefaults::IsSystemLongEra( const SvtSysLocale& rSysLoc, BOOL bLong )
-{
- // TODO: merge system information and defaults into i18n locale data
- return IsSystemLongYear( rSysLoc, bLong ); // no separate setting
-}
-
-sal_Bool SvXMLNumFmtDefaults::IsSystemLongDayOfWeek( const SvtSysLocale&, BOOL bLong )
-{
- // TODO: merge system information and defaults into i18n locale data
-#if 0
- return ( bLong && rIntn.GetLongDateDayOfWeekFormat() == DAYOFWEEK_LONG );
-#else
- return bLong && true;
-#endif
-}
-
sal_uInt16 SvXMLNumFmtDefaults::GetDefaultDateFormat( SvXMLDateElementAttributes eDOW,
SvXMLDateElementAttributes eDay, SvXMLDateElementAttributes eMonth,
SvXMLDateElementAttributes eYear, SvXMLDateElementAttributes eHours,
--
1.7.1
Context
- [Libreoffice] [PATCH] remove unused SvXMLNumFmtDefaults methods · Joachim Trémouroux
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.