[Libreoffice-commits] .: Branch 'libreoffice-3-4' - svl/inc svl/source
Thorsten Behrens
thorsten at kemper.freedesktop.org
Wed May 11 02:41:39 PDT 2011
svl/inc/svl/zforlist.hxx | 4 +---
svl/source/numbers/zforlist.cxx | 21 ++++++++++++---------
2 files changed, 13 insertions(+), 12 deletions(-)
New commits:
commit 8d08e19822871afc0f4c82b13ea3111b5f62f553
Author: Katarina Machalkova <kmachalkova at suse.cz>
Date: Wed May 11 11:42:32 2011 +0200
Fix for fdo#36673: corrupt date formats of cells
Signed-off-by: Thorsten Behrens <tbehrens at novell.com>
diff --git a/svl/inc/svl/zforlist.hxx b/svl/inc/svl/zforlist.hxx
index fe5a966..eef1904 100644
--- a/svl/inc/svl/zforlist.hxx
+++ b/svl/inc/svl/zforlist.hxx
@@ -129,9 +129,7 @@ enum NfIndexTableOffset
NF_FRACTION_START,
NF_FRACTION_1 = NF_FRACTION_START, // # ?/?
NF_FRACTION_2, // # ??/??
- NF_FRACTION_3, // # ?/4
- NF_FRACTION_4, // # ??/100
- NF_FRACTION_END = NF_FRACTION_4,
+ NF_FRACTION_END = NF_FRACTION_2,
NF_NUMERIC_END = NF_FRACTION_END,
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index dac2139..ae7cfae 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -2594,7 +2594,6 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, sal_Bool bLoadi
// # ?/?
aSingleFormatCode.Code = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "# ?/?" ) );
- String s25( RTL_CONSTASCII_USTRINGPARAM( "# ?/?" ) ); // # ?/?
ImpInsertFormat( aSingleFormatCode,
CLOffset + SetIndexTable( NF_FRACTION_1, ZF_STANDARD_FRACTION ));
@@ -2604,14 +2603,6 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, sal_Bool bLoadi
ImpInsertFormat( aSingleFormatCode,
CLOffset + SetIndexTable( NF_FRACTION_2, ZF_STANDARD_FRACTION+1 ));
- aSingleFormatCode.Code = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "# ?/4" ) );
- ImpInsertFormat( aSingleFormatCode,
- CLOffset + SetIndexTable( NF_FRACTION_3, ZF_STANDARD_FRACTION+2 ));
-
- aSingleFormatCode.Code = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "# ?\?/100" ) );
- ImpInsertFormat( aSingleFormatCode,
- CLOffset + SetIndexTable( NF_FRACTION_4, ZF_STANDARD_FRACTION+3 ));
-
// Week of year must be appended here because of nNewExtended
const String* pKeyword = pFormatScanner->GetKeywords();
aSingleFormatCode.Code = pKeyword[NF_KEY_WW];
@@ -2630,6 +2621,18 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, sal_Bool bLoadi
if ( !bLoadingSO5 )
ImpGenerateAdditionalFormats( CLOffset, aNumberFormatCode, sal_False );
+ sal_uInt32 nPos = CLOffset + pStdFormat->GetLastInsertKey();
+
+ aSingleFormatCode.Code = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "# ?/4" ) );
+ ImpInsertNewStandardFormat( aSingleFormatCode, nPos+1, SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS );
+ nPos++;
+
+ aSingleFormatCode.Code = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "# ?\?/100" ) );
+ ImpInsertNewStandardFormat( aSingleFormatCode, nPos+1, SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS );
+ nPos++;
+
+ pStdFormat->SetLastInsertKey( (sal_uInt16)(nPos - CLOffset) );
+
if (bOldConvertMode)
pFormatScanner->SetConvertMode(sal_True);
}
More information about the Libreoffice-commits
mailing list