include/svl/nfversi.hxx | 57 -------------- include/svl/zforlist.hxx | 6 - include/svl/zformat.hxx | 19 +--- svl/source/numbers/zforlist.cxx | 156 +++++++++++++++------------------------- svl/source/numbers/zformat.cxx | 6 - svx/source/items/numfmtsh.cxx | 4 - 6 files changed, 71 insertions(+), 177 deletions(-)
New commits: commit 6c0e970eae2bd1c06d52616fd7f9db85369e2338 Author: Eike Rathke <[email protected]> Date: Thu Nov 6 21:26:58 2014 +0100 remove now superfluous SetUsed() calls Change-Id: Iaaabed4d0b507dafb7873da42869a856fc6ba573 diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index c7a2709..5363d6a 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -2212,10 +2212,8 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_CURRENCY_1000DEC2_CCC ); bDefault = aFormatSeq[nIdx].Default; aFormatSeq[nIdx].Default = false; - pNewFormat = ImpInsertFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_CURRENCY_1000DEC2_CCC, ZF_STANDARD_CURRENCY+4 )); - if ( pNewFormat ) - pNewFormat->SetUsed(true); // must be saved for older versions + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_CURRENCY_1000DEC2_CCC, ZF_STANDARD_CURRENCY+4 )); aFormatSeq[nIdx].Default = bDefault; // #.##0,-- @@ -2264,12 +2262,9 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio // DD.MM.YYYY was DD.MM.[YY]YY nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYS_DDMMYYYY ); - pNewFormat = ImpInsertFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_DATE_SYS_DDMMYYYY, ZF_STANDARD_DATE+6 )); - if ( pNewFormat ) - { - pNewFormat->SetUsed(true); // must be saved for older versions - } + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_DATE_SYS_DDMMYYYY, ZF_STANDARD_DATE+6 )); + // DD.MM.YY def/System nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYS_DDMMYY ); ImpInsertFormat( aFormatSeq[nIdx], commit 237e744fe505ff83f1bde383f33f4da1e79d2fc1 Author: Eike Rathke <[email protected]> Date: Thu Nov 6 21:24:33 2014 +0100 remove now meaningless "since number formatter version ..." comments Change-Id: I1b7aeb3d055baacbf67065f67991894a420897b7 diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index f84fb16..c7a2709 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -2145,7 +2145,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio ImpInsertFormat( aFormatSeq[nIdx], CLOffset + SetIndexTable( NF_NUMBER_1000DEC2, ZF_STANDARD+4 )); - // #.##0,00 System country/language dependent since number formatter version 6 + // #.##0,00 System country/language dependent nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_NUMBER_SYSTEM ); ImpInsertFormat( aFormatSeq[nIdx], CLOffset + SetIndexTable( NF_NUMBER_SYSTEM, ZF_STANDARD+5 )); @@ -2208,7 +2208,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio CLOffset + SetIndexTable( NF_CURRENCY_1000DEC2_RED, ZF_STANDARD_CURRENCY+3 )); aFormatSeq[nIdx].Default = bDefault; - // #,##0.00 USD since number formatter version 3 + // #,##0.00 USD nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_CURRENCY_1000DEC2_CCC ); bDefault = aFormatSeq[nIdx].Default; aFormatSeq[nIdx].Default = false; @@ -2218,7 +2218,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio pNewFormat->SetUsed(true); // must be saved for older versions aFormatSeq[nIdx].Default = bDefault; - // #.##0,-- since number formatter version 6 + // #.##0,-- nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_CURRENCY_1000DEC2_DASHED ); bDefault = aFormatSeq[nIdx].Default; aFormatSeq[nIdx].Default = false; @@ -2262,7 +2262,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio ImpInsertFormat( aFormatSeq[nIdx], CLOffset + SetIndexTable( NF_DATE_QQJJ, ZF_STANDARD_DATE+5 )); - // DD.MM.YYYY since number formatter version 2, was DD.MM.[YY]YY + // DD.MM.YYYY was DD.MM.[YY]YY nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYS_DDMMYYYY ); pNewFormat = ImpInsertFormat( aFormatSeq[nIdx], CLOffset + SetIndexTable( NF_DATE_SYS_DDMMYYYY, ZF_STANDARD_DATE+6 )); @@ -2270,7 +2270,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio { pNewFormat->SetUsed(true); // must be saved for older versions } - // DD.MM.YY def/System, since number formatter version 6 + // DD.MM.YY def/System nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYS_DDMMYY ); ImpInsertFormat( aFormatSeq[nIdx], CLOffset + SetIndexTable( NF_DATE_SYS_DDMMYY, ZF_STANDARD_DATE+7 )); @@ -2282,7 +2282,6 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio CLOffset + SetIndexTable( NF_DATE_SYSTEM_LONG, ZF_STANDARD_DATE+8 )); // Hard coded but system (regional settings) delimiters dependent long date formats - // since numberformatter version 6 // D. MMM YY def/System nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYS_DMMMYY ); commit cf21cca5046564c5a427d8a0dd16917168ad9196 Author: Eike Rathke <[email protected]> Date: Thu Nov 6 21:21:12 2014 +0100 assert( nNewExtended <= ZF_STANDARD_NEWEXTENDEDMAX ) Change-Id: I51ceee96f246006802879d94964ca161b63139fc diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 8729f2e..f84fb16 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -2459,6 +2459,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio } SAL_WARN_IF( nNewExtended > ZF_STANDARD_NEWEXTENDEDMAX, "svl.numbers", "ImpGenerateFormats: overflow of nNewExtended standard formats" ); + assert( nNewExtended <= ZF_STANDARD_NEWEXTENDEDMAX ); // Now all additional format codes provided by I18N, but only if not // changing SystemCL, then they are appended last after user defined. commit 303c2b91774a28933151ee15a83ef5f73ed78d69 Author: Eike Rathke <[email protected]> Date: Thu Nov 6 21:09:30 2014 +0100 remove include/svl/nfversi.hxx Change-Id: I8d10c0d2b24ec20795a504b4538b196cf1ce499a diff --git a/include/svl/nfversi.hxx b/include/svl/nfversi.hxx deleted file mode 100644 index ceb2dd8..0000000 --- a/include/svl/nfversi.hxx +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SVL_NFVERSI_HXX -#define INCLUDED_SVL_NFVERSI_HXX - -// file IDs - -#define SV_NUMBERFORMATTER_VERSION 0x000f - -// 1 to 1996-01-18 -// 2 1996-01-19 added TT.MM.JJJJ -// 3 1996-02-13 (not emergency) added #.##0,00 CCC -// 4 1997-07-30 364i store what SYSTEM actually was (using existing -// Dummy field, no change of file format) -// 5 1997-08-07 non-German is not always English -// convert older non-German user defined formats on load -// 6 1997-10-17 new keyword NNN for long weekday without separator -// not evaluated in older versions! -// New standard date formats, DIN, EN etc. -// 7 1998-05-25 Standard format [HH]:MM:SS,00 (NF_TIME_HH_MMSS00) for -// automatic input recognition of 100th seconds with hours -// 8 1998-06-10 Standard format WW (NF_DATE_WW) for calendar week -// 9 1998-12-17 new currency formats [$DM-xxx] -// A 1999-01-25 store/load Year2000 -// B 1999-02-12 Year2000 is general TwoDigitYearStart -// C ????-??-?? date/time format of system variables -// D 2000-11-23 new calendar -// E 2001-01-19 additional formats provided by i18n -// F 2012-04-27 fixed fraction formats ?/4 and ??/100, actually added -// already 2010/2011 but without versioning - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx index aa5e8a5..b488647 100644 --- a/include/svl/zformat.hxx +++ b/include/svl/zformat.hxx @@ -22,7 +22,6 @@ #include <svl/svldllapi.h> #include <i18nlangtag/mslangid.hxx> #include <svl/zforlist.hxx> -#include <svl/nfversi.hxx> #include <svl/nfkeytab.hxx> namespace utl { commit 14174aabaa959988fe65c41109c6eafc37f5b2c3 Author: Eike Rathke <[email protected]> Date: Thu Nov 6 21:05:30 2014 +0100 change nNewStandardDefined to bAdditionalBuiltin and remove SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS Change-Id: I63f341e74a1eb7172dbb024a5cef66435a46e1df diff --git a/include/svl/nfversi.hxx b/include/svl/nfversi.hxx index 900444e..ceb2dd8 100644 --- a/include/svl/nfversi.hxx +++ b/include/svl/nfversi.hxx @@ -21,7 +21,6 @@ #define INCLUDED_SVL_NFVERSI_HXX // file IDs -#define SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS 0x000e #define SV_NUMBERFORMATTER_VERSION 0x000f diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx index c2a353c..aa5e8a5 100644 --- a/include/svl/zformat.hxx +++ b/include/svl/zformat.hxx @@ -184,23 +184,16 @@ public: ~SvNumberformat(); /// Get type of format, may include NUMBERFORMAT_DEFINED bit - short GetType() const - { return (nNewStandardDefined && - (nNewStandardDefined <= SV_NUMBERFORMATTER_VERSION)) ? - (eType & ~NUMBERFORMAT_DEFINED) : eType; } + short GetType() const { return eType; } void SetType(const short eSetType) { eType = eSetType; } // Standard means the I18N defined standard format of this type void SetStandard() { bStandard = true; } bool IsStandard() const { return bStandard; } - // For versions before version nVer it is UserDefined, for newer versions - // it is builtin. nVer of SV_NUMBERFORMATTER_VERSION_... - void SetNewStandardDefined( sal_uInt16 nVer ) - { nNewStandardDefined = nVer; eType |= NUMBERFORMAT_DEFINED; } - - bool IsAdditionalStandardDefined() const - { return nNewStandardDefined == SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS; } + // If this format is an additional built-in format defined by i18n. + void SetAdditionalBuiltin() { bAdditionalBuiltin = true; } + bool IsAdditionalBuiltin() const { return bAdditionalBuiltin; } LanguageType GetLanguage() const { return maLocale.meLanguage;} @@ -467,8 +460,8 @@ private: LocaleType maLocale; // Language/country of the format, numeral shape and calendar type from Excel. SvNumberformatLimitOps eOp1; // Operator for first condition SvNumberformatLimitOps eOp2; // Operator for second condition - sal_uInt16 nNewStandardDefined; // new builtin formats as of version 6 short eType; // Type of format + bool bAdditionalBuiltin; // If this is an additional built-in format defined by i18n bool bStarFlag; // Take *n format as ESC n bool bStandard; // If this is a default standard format bool bIsUsed; // Flag as used for storing diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 3a92ce9..8729f2e 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -2515,7 +2515,7 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset, if ( SvNumberformat* pNewFormat = ImpInsertFormat( pFormatArr[j], nPos+1, bAfterChangingSystemCL, nOrgIndex ) ) { - pNewFormat->SetNewStandardDefined( SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS ); + pNewFormat->SetAdditionalBuiltin(); nPos++; } pFormatArr[j].Index = nOrgIndex; @@ -2546,7 +2546,7 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset, if ( SvNumberformat* pNewFormat = ImpInsertFormat( pFormatArr[j], nPos+1, bAfterChangingSystemCL ) ) { - pNewFormat->SetNewStandardDefined( SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS ); + pNewFormat->SetAdditionalBuiltin(); nPos++; } } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index c6aaa10..8d4e08a 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -473,8 +473,8 @@ SvNumberformat::SvNumberformat( ImpSvNumberformatScan& rSc, LanguageType eLge ) , rScan(rSc) , eOp1(NUMBERFORMAT_OP_NO) , eOp2(NUMBERFORMAT_OP_NO) - , nNewStandardDefined(0) , eType(0) + , bAdditionalBuiltin( false ) , bStarFlag( false ) , bStandard( false ) , bIsUsed( false ) @@ -494,7 +494,7 @@ void SvNumberformat::ImpCopyNumberformat( const SvNumberformat& rFormat ) bStandard = rFormat.bStandard; bIsUsed = rFormat.bIsUsed; sComment = rFormat.sComment; - nNewStandardDefined = rFormat.nNewStandardDefined; + bAdditionalBuiltin = rFormat.bAdditionalBuiltin; // #121103# when copying between documents, get color pointers from own scanner ImpSvNumberformatScan* pColorSc = ( &rScan != &rFormat.rScan ) ? &rScan : NULL; @@ -610,7 +610,7 @@ SvNumberformat::SvNumberformat(OUString& rString, LanguageType& eLan, bool bStan) : rScan(*pSc) - , nNewStandardDefined(0) + , bAdditionalBuiltin( false ) , bStarFlag( false ) { OUStringBuffer sBuff(rString); diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx index e8718fe..4634fac 100644 --- a/svx/source/items/numfmtsh.cxx +++ b/svx/source/items/numfmtsh.cxx @@ -920,7 +920,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<OUString>& r if ( !IsRemoved_Impl( nKey ) ) { if( pNumEntry->GetType() & NUMBERFORMAT_DEFINED || - pNumEntry->IsAdditionalStandardDefined() ) + pNumEntry->IsAdditionalBuiltin() ) { nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED; aStrComment = pNumEntry->GetComment(); @@ -1073,7 +1073,7 @@ short SvxNumberFormatShell::FillEListWithUsD_Impl( std::vector<OUString>& rList, if ( !IsRemoved_Impl( nKey ) ) { if( (pNumEntry->GetType() & NUMBERFORMAT_DEFINED) || - (bAdditional && pNumEntry->IsAdditionalStandardDefined()) ) + (bAdditional && pNumEntry->IsAdditionalBuiltin()) ) { nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED; aStrComment=pNumEntry->GetComment(); commit b448ee4a3a5a121f3b08a8e946a934d3414a5251 Author: Eike Rathke <[email protected]> Date: Thu Nov 6 20:25:40 2014 +0100 eliminate ImpInsertNewStandardFormat() Change-Id: I66fd200f1a504af22430e0471e1c98927101a9de diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx index dc7c7da..bd3c0de 100644 --- a/include/svl/zforlist.hxx +++ b/include/svl/zforlist.hxx @@ -826,12 +826,6 @@ private: sal_uInt32 nPos, bool bAfterChangingSystemCL = false, sal_Int16 nOrgIndex = 0 ); - // ImpInsertNewStandardFormat for new (since version ...) builtin formats - SVL_DLLPRIVATE SvNumberformat* ImpInsertNewStandardFormat( const ::com::sun::star::i18n::NumberFormatCode& rCode, - sal_uInt32 nPos, - sal_uInt16 nVersion, - bool bAfterChangingSystemCL = false, - sal_Int16 nOrgIndex = 0 ); // Return CLOffset or (MaxCLOffset + SV_COUNTRY_LANGUAGE_OFFSET) if new language/country SVL_DLLPRIVATE sal_uInt32 ImpGetCLOffset(LanguageType eLnge) const; diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 6282ca3..3a92ce9 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1751,19 +1751,6 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( const ::com::sun::star::i18n return pFormat; } -SvNumberformat* SvNumberFormatter::ImpInsertNewStandardFormat( - const ::com::sun::star::i18n::NumberFormatCode& rCode, - sal_uInt32 nPos, sal_uInt16 nVersion, bool bAfterChangingSystemCL, - sal_Int16 nOrgIndex ) -{ - SvNumberformat* pNewFormat = ImpInsertFormat( rCode, nPos, - bAfterChangingSystemCL, nOrgIndex ); - if (pNewFormat) - pNewFormat->SetNewStandardDefined( nVersion ); - // so that it gets saved, displayed properly, and converted by old versions - return pNewFormat; -} - void SvNumberFormatter::GetFormatSpecialInfo(sal_uInt32 nFormat, bool& bThousand, bool& IsRed, @@ -2525,10 +2512,12 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset, //! no default on currency bool bDefault = aFormatSeq[j].Default; aFormatSeq[j].Default = false; - if ( ImpInsertNewStandardFormat( pFormatArr[j], nPos+1, - SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS, - bAfterChangingSystemCL, nOrgIndex ) ) + if ( SvNumberformat* pNewFormat = ImpInsertFormat( pFormatArr[j], nPos+1, + bAfterChangingSystemCL, nOrgIndex ) ) + { + pNewFormat->SetNewStandardDefined( SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS ); nPos++; + } pFormatArr[j].Index = nOrgIndex; aFormatSeq[j].Default = bDefault; } @@ -2554,10 +2543,12 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset, } if ( pFormatArr[j].Index >= NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS ) { - if ( ImpInsertNewStandardFormat( pFormatArr[j], nPos+1, - SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS, - bAfterChangingSystemCL ) ) + if ( SvNumberformat* pNewFormat = ImpInsertFormat( pFormatArr[j], nPos+1, + bAfterChangingSystemCL ) ) + { + pNewFormat->SetNewStandardDefined( SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS ); nPos++; + } } } } commit 11eba2ea906636b7bb801ed42bcd3b7ad3ce5496 Author: Eike Rathke <[email protected]> Date: Thu Nov 6 20:17:58 2014 +0100 remove unnecessary SV_NUMBERFORMATTER_VERSION_NEWSTANDARD Change-Id: I63e8925e54c48cc35e09d9cd993520d6c85622eb diff --git a/include/svl/nfversi.hxx b/include/svl/nfversi.hxx index 3daf4e2..900444e 100644 --- a/include/svl/nfversi.hxx +++ b/include/svl/nfversi.hxx @@ -21,7 +21,6 @@ #define INCLUDED_SVL_NFVERSI_HXX // file IDs -#define SV_NUMBERFORMATTER_VERSION_NEWSTANDARD 0x0006 #define SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS 0x000e #define SV_NUMBERFORMATTER_VERSION 0x000f diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 0642886..6282ca3 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -2160,9 +2160,8 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio // #.##0,00 System country/language dependent since number formatter version 6 nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_NUMBER_SYSTEM ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_NUMBER_SYSTEM, ZF_STANDARD+5 ), - SV_NUMBERFORMATTER_VERSION_NEWSTANDARD ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_NUMBER_SYSTEM, ZF_STANDARD+5 )); // Percent number @@ -2236,9 +2235,8 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_CURRENCY_1000DEC2_DASHED ); bDefault = aFormatSeq[nIdx].Default; aFormatSeq[nIdx].Default = false; - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_CURRENCY_1000DEC2_DASHED, ZF_STANDARD_CURRENCY+5 ), - SV_NUMBERFORMATTER_VERSION_NEWSTANDARD ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_CURRENCY_1000DEC2_DASHED, ZF_STANDARD_CURRENCY+5 )); aFormatSeq[nIdx].Default = bDefault; @@ -2287,25 +2285,22 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio } // DD.MM.YY def/System, since number formatter version 6 nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYS_DDMMYY ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_DATE_SYS_DDMMYY, ZF_STANDARD_DATE+7 ), - SV_NUMBERFORMATTER_VERSION_NEWSTANDARD ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_DATE_SYS_DDMMYY, ZF_STANDARD_DATE+7 )); // NNN, D. MMMM YYYY System // Long day of week: "NNNN" instead of "NNN," because of compatibility nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYSTEM_LONG ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_DATE_SYSTEM_LONG, ZF_STANDARD_DATE+8 ), - SV_NUMBERFORMATTER_VERSION_NEWSTANDARD ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_DATE_SYSTEM_LONG, ZF_STANDARD_DATE+8 )); // Hard coded but system (regional settings) delimiters dependent long date formats // since numberformatter version 6 // D. MMM YY def/System nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYS_DMMMYY ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_DATE_SYS_DMMMYY, ZF_STANDARD_DATE+9 ), - SV_NUMBERFORMATTER_VERSION_NEWSTANDARD ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_DATE_SYS_DMMMYY, ZF_STANDARD_DATE+9 )); //! Unfortunately TLOT intended only 10 builtin formats per category, more //! would overwrite the next category (ZF_STANDARD_TIME) :-(( @@ -2313,65 +2308,55 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio // D. MMM YYYY def/System nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYS_DMMMYYYY ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_DATE_SYS_DMMMYYYY, nNewExtended++ ), - SV_NUMBERFORMATTER_VERSION_NEWSTANDARD ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_DATE_SYS_DMMMYYYY, nNewExtended++ )); // D. MMMM YYYY def/System nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYS_DMMMMYYYY ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_DATE_SYS_DMMMMYYYY, nNewExtended++ ), - SV_NUMBERFORMATTER_VERSION_NEWSTANDARD ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_DATE_SYS_DMMMMYYYY, nNewExtended++ )); // NN, D. MMM YY def/System nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYS_NNDMMMYY ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_DATE_SYS_NNDMMMYY, nNewExtended++ ), - SV_NUMBERFORMATTER_VERSION_NEWSTANDARD ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_DATE_SYS_NNDMMMYY, nNewExtended++ )); // NN, D. MMMM YYYY def/System nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYS_NNDMMMMYYYY ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_DATE_SYS_NNDMMMMYYYY, nNewExtended++ ), - SV_NUMBERFORMATTER_VERSION_NEWSTANDARD ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_DATE_SYS_NNDMMMMYYYY, nNewExtended++ )); // NNN, D. MMMM YYYY def/System nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYS_NNNNDMMMMYYYY ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_DATE_SYS_NNNNDMMMMYYYY, nNewExtended++ ), - SV_NUMBERFORMATTER_VERSION_NEWSTANDARD ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_DATE_SYS_NNNNDMMMMYYYY, nNewExtended++ )); // Hard coded DIN (Deutsche Industrie Norm) and EN (European Norm) date formats // D. MMM. YYYY DIN/EN nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_DIN_DMMMYYYY ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_DATE_DIN_DMMMYYYY, nNewExtended++ ), - SV_NUMBERFORMATTER_VERSION_NEWSTANDARD ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_DATE_DIN_DMMMYYYY, nNewExtended++ )); // D. MMMM YYYY DIN/EN nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_DIN_DMMMMYYYY ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_DATE_DIN_DMMMMYYYY, nNewExtended++ ), - SV_NUMBERFORMATTER_VERSION_NEWSTANDARD ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_DATE_DIN_DMMMMYYYY, nNewExtended++ )); // MM-DD DIN/EN nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_DIN_MMDD ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_DATE_DIN_MMDD, nNewExtended++ ), - SV_NUMBERFORMATTER_VERSION_NEWSTANDARD ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_DATE_DIN_MMDD, nNewExtended++ )); // YY-MM-DD DIN/EN nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_DIN_YYMMDD ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_DATE_DIN_YYMMDD, nNewExtended++ ), - SV_NUMBERFORMATTER_VERSION_NEWSTANDARD ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_DATE_DIN_YYMMDD, nNewExtended++ )); // YYYY-MM-DD DIN/EN nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_DIN_YYYYMMDD ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_DATE_DIN_YYYYMMDD, nNewExtended++ ), - SV_NUMBERFORMATTER_VERSION_NEWSTANDARD ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_DATE_DIN_YYYYMMDD, nNewExtended++ )); commit d80ac9e703603088834a016d0d3cd22188da56e3 Author: Eike Rathke <[email protected]> Date: Thu Nov 6 20:12:05 2014 +0100 remove unnecessary SV_NUMBERFORMATTER_VERSION_NF_TIME_HH_MMSS00 Change-Id: Ia6e9594654f89cadaedc19e7c3bddc1083cf9347 diff --git a/include/svl/nfversi.hxx b/include/svl/nfversi.hxx index 8a708c4..3daf4e2 100644 --- a/include/svl/nfversi.hxx +++ b/include/svl/nfversi.hxx @@ -22,7 +22,6 @@ // file IDs #define SV_NUMBERFORMATTER_VERSION_NEWSTANDARD 0x0006 -#define SV_NUMBERFORMATTER_VERSION_NF_TIME_HH_MMSS00 0x0007 #define SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS 0x000e #define SV_NUMBERFORMATTER_VERSION 0x000f diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 85a4abe..0642886 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -2411,9 +2411,8 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio // [HH]:MM:SS,00 nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_TIME_HH_MMSS00 ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_TIME_HH_MMSS00, ZF_STANDARD_TIME+6 ), - SV_NUMBERFORMATTER_VERSION_NF_TIME_HH_MMSS00 ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_TIME_HH_MMSS00, ZF_STANDARD_TIME+6 )); commit ba70da3cded40ccafdde74e061af1d9f3519a84c Author: Eike Rathke <[email protected]> Date: Thu Nov 6 20:10:35 2014 +0100 remove unnecessary SV_NUMBERFORMATTER_VERSION_NF_DATE_WW Change-Id: Ia0bee4a370e130a7e6fddd7cc984c31aa9a39a5d diff --git a/include/svl/nfversi.hxx b/include/svl/nfversi.hxx index 4d36a95..8a708c4 100644 --- a/include/svl/nfversi.hxx +++ b/include/svl/nfversi.hxx @@ -23,7 +23,6 @@ // file IDs #define SV_NUMBERFORMATTER_VERSION_NEWSTANDARD 0x0006 #define SV_NUMBERFORMATTER_VERSION_NF_TIME_HH_MMSS00 0x0007 -#define SV_NUMBERFORMATTER_VERSION_NF_DATE_WW 0x0008 #define SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS 0x000e #define SV_NUMBERFORMATTER_VERSION 0x000f diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 6b645f3..85a4abe 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -2479,9 +2479,8 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio // Week of year must be appended here because of nNewExtended const NfKeywordTable & rKeyword = pFormatScanner->GetKeywords(); aSingleFormatCode.Code = rKeyword[NF_KEY_WW]; - ImpInsertNewStandardFormat( aSingleFormatCode, - CLOffset + SetIndexTable( NF_DATE_WW, nNewExtended++ ), - SV_NUMBERFORMATTER_VERSION_NF_DATE_WW ); + ImpInsertFormat( aSingleFormatCode, + CLOffset + SetIndexTable( NF_DATE_WW, nNewExtended++ )); { osl::MutexGuard aGuard(&theIndexTable.maMtx); commit d8ffda17de60d16db2c24baf4bc3e0fcc210c4a2 Author: Eike Rathke <[email protected]> Date: Thu Nov 6 19:54:16 2014 +0100 remove unnecessary SV_NUMBERFORMATTER_VERSION_NF_DATETIME_SYS_DDMMYYYY_HHMMSS Change-Id: I97c0f9154828c1d3ce801482242d951de8eab7e7 diff --git a/include/svl/nfversi.hxx b/include/svl/nfversi.hxx index a67ad31..4d36a95 100644 --- a/include/svl/nfversi.hxx +++ b/include/svl/nfversi.hxx @@ -24,7 +24,6 @@ #define SV_NUMBERFORMATTER_VERSION_NEWSTANDARD 0x0006 #define SV_NUMBERFORMATTER_VERSION_NF_TIME_HH_MMSS00 0x0007 #define SV_NUMBERFORMATTER_VERSION_NF_DATE_WW 0x0008 -#define SV_NUMBERFORMATTER_VERSION_NF_DATETIME_SYS_DDMMYYYY_HHMMSS 0x000c #define SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS 0x000e #define SV_NUMBERFORMATTER_VERSION 0x000f diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index c5e5e4f2..6b645f3 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -2428,9 +2428,8 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio // DD.MM.YYYY HH:MM:SS System nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATETIME_SYS_DDMMYYYY_HHMMSS ); - ImpInsertNewStandardFormat( aFormatSeq[nIdx], - CLOffset + SetIndexTable( NF_DATETIME_SYS_DDMMYYYY_HHMMSS, ZF_STANDARD_DATETIME+1 ), - SV_NUMBERFORMATTER_VERSION_NF_DATETIME_SYS_DDMMYYYY_HHMMSS ); + ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_DATETIME_SYS_DDMMYYYY_HHMMSS, ZF_STANDARD_DATETIME+1 )); commit 872aac32e3ed0bc881b756f37f7bc8d4bbdbd4d8 Author: Eike Rathke <[email protected]> Date: Thu Nov 6 19:51:01 2014 +0100 remove unnecessary SV_NUMBERFORMATTER_VERSION_FIXED_FRACTION Change-Id: Ia4779dba9b8068d172d47ce2aff32219634a9616 diff --git a/include/svl/nfversi.hxx b/include/svl/nfversi.hxx index 3145bfd..a67ad31 100644 --- a/include/svl/nfversi.hxx +++ b/include/svl/nfversi.hxx @@ -26,7 +26,6 @@ #define SV_NUMBERFORMATTER_VERSION_NF_DATE_WW 0x0008 #define SV_NUMBERFORMATTER_VERSION_NF_DATETIME_SYS_DDMMYYYY_HHMMSS 0x000c #define SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS 0x000e -#define SV_NUMBERFORMATTER_VERSION_FIXED_FRACTION 0x000f #define SV_NUMBERFORMATTER_VERSION 0x000f diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index db638ab..c5e5e4f2 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -2467,15 +2467,13 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio // # ?/4 aSingleFormatCode.Code = "# ?/4"; - ImpInsertNewStandardFormat( aSingleFormatCode, - CLOffset + SetIndexTable( NF_FRACTION_3, ZF_STANDARD_FRACTION+2 ), - SV_NUMBERFORMATTER_VERSION_FIXED_FRACTION ); + ImpInsertFormat( aSingleFormatCode, + CLOffset + SetIndexTable( NF_FRACTION_3, ZF_STANDARD_FRACTION+2 )); // # ??/100 aSingleFormatCode.Code = "# ?\?/100"; - ImpInsertNewStandardFormat( aSingleFormatCode, - CLOffset + SetIndexTable( NF_FRACTION_4, ZF_STANDARD_FRACTION+3 ), - SV_NUMBERFORMATTER_VERSION_FIXED_FRACTION ); + ImpInsertFormat( aSingleFormatCode, + CLOffset + SetIndexTable( NF_FRACTION_4, ZF_STANDARD_FRACTION+3 )); commit 3fe53eee62b676eeb444332aed1019a8c866690b Author: Eike Rathke <[email protected]> Date: Thu Nov 6 19:12:17 2014 +0100 remove obsolete GetNewStandardDefined() Change-Id: I7b68754b1ac2fd3bd1ca8944deeded646a2e74d6 diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx index 2d5b110..c2a353c 100644 --- a/include/svl/zformat.hxx +++ b/include/svl/zformat.hxx @@ -199,7 +199,6 @@ public: void SetNewStandardDefined( sal_uInt16 nVer ) { nNewStandardDefined = nVer; eType |= NUMBERFORMAT_DEFINED; } - sal_uInt16 GetNewStandardDefined() const { return nNewStandardDefined; } bool IsAdditionalStandardDefined() const { return nNewStandardDefined == SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS; } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
