[Libreoffice-commits] core.git: include/svl svl/source
Laurent Balland-Poirier
laurent.balland-poirier at laposte.net
Mon Aug 15 11:57:57 UTC 2016
include/svl/zformat.hxx | 4 ----
svl/source/numbers/zformat.cxx | 12 ++++++------
2 files changed, 6 insertions(+), 10 deletions(-)
New commits:
commit ab98c81e1c4913aac3ce6453aa95c581dd582058
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date: Fri Aug 12 17:20:08 2016 +0200
tdf#79398 Export to XL DBNum codes
Change-Id: Ibe24b68b89909eecdf73fe4f7db19de26396194d
Update: only if corresponding code exists
Reviewed-on: https://gerrit.libreoffice.org/28090
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index f26eb82..ea98b08 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -73,17 +73,13 @@ class SvNumberNatNum
public:
static sal_uInt8 MapDBNumToNatNum( sal_uInt8 nDBNum, LanguageType eLang, bool bDate );
-#ifdef THE_FUTURE
static sal_uInt8 MapNatNumToDBNum( sal_uInt8 nNatNum, LanguageType eLang, bool bDate );
-#endif
SvNumberNatNum() : eLang( LANGUAGE_DONTKNOW ), nNum(0),
bDBNum(false), bDate(false), bSet(false) {}
bool IsComplete() const { return bSet && eLang != LANGUAGE_DONTKNOW; }
sal_uInt8 GetNatNum() const { return bDBNum ? MapDBNumToNatNum( nNum, eLang, bDate ) : nNum; }
-#ifdef THE_FUTURE
sal_uInt8 GetDBNum() const { return bDBNum ? nNum : MapNatNumToDBNum( nNum, eLang, bDate ); }
-#endif
LanguageType GetLang() const { return eLang; }
void SetLang( LanguageType e ) { eLang = e; }
void SetNum( sal_uInt8 nNumber, bool bDBNumber )
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index d38b3f4..2fc1912 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -217,11 +217,6 @@ sal_uInt8 SvNumberNatNum::MapDBNumToNatNum( sal_uInt8 nDBNum, LanguageType eLang
return nNatNum;
}
-#ifdef THE_FUTURE
-/* XXX NOTE: even though the MapNatNumToDBNum method is currently unused please
- * don't remove it in case we'd have to use it for some obscure exports to
- * Excel. */
-
// static
sal_uInt8 SvNumberNatNum::MapNatNumToDBNum( sal_uInt8 nNatNum, LanguageType eLang, bool bDate )
{
@@ -326,7 +321,6 @@ sal_uInt8 SvNumberNatNum::MapNatNumToDBNum( sal_uInt8 nNatNum, LanguageType eLan
}
return nDBNum;
}
-#endif
/**
* SvNumFor
@@ -4724,6 +4718,12 @@ OUString SvNumberformat::GetMappedFormatstring( const NfKeywordTable& rKeywords,
}
const SvNumberNatNum& rNum = NumFor[n].GetNatNum();
+ if ( rNum.IsSet() && rNum.GetDBNum() > 0 )
+ {
+ aPrefix += "[DBNum";
+ aPrefix += OUString::number( rNum.GetDBNum() );
+ aPrefix += "]";
+ }
sal_uInt16 nAnz = NumFor[n].GetCount();
if ( nSem && (nAnz || !aPrefix.isEmpty()) )
More information about the Libreoffice-commits
mailing list