summaryrefslogtreecommitdiff
path: root/svx/inc
diff options
context:
space:
mode:
authorBrad Sowden <code@sowden.org>2011-12-29 22:29:34 +1300
committerLuboš Luňák <l.lunak@suse.cz>2012-01-04 13:49:10 +0100
commit4998b04122f98ce689ce8af7f3b32fe03f9b771a (patch)
tree67c0a725d1f12dec357b9aa029632af34914bc08 /svx/inc
parent9ff11d8b1db565e5bb82d85b130c434f01fb06ad (diff)
Easyhack fdo#38831 remove SvStrings
------ With the for loop below Insert(x,nPos) was previously applied but nPos is initialised to the end of vector and is always incremented in every loop iteration i.e. Insert(x,nPos) is effectively a push_back(x). Agree? In "short SvxNumberFormatShell::FillEListWithUserCurrencys(....)" Also get rid of SvxDelStrgs (variant of SvStrings)
Diffstat (limited to 'svx/inc')
-rw-r--r--svx/inc/svx/numfmtsh.hxx80
1 files changed, 34 insertions, 46 deletions
diff --git a/svx/inc/svx/numfmtsh.hxx b/svx/inc/svx/numfmtsh.hxx
index 89e9686bb042..5c7ce26c8f9a 100644
--- a/svx/inc/svx/numfmtsh.hxx
+++ b/svx/inc/svx/numfmtsh.hxx
@@ -47,7 +47,6 @@
class Color;
class SvNumberFormatter;
class SvNumberFormatTable;
-class SvStrings;
class SvStringsDtor;
class NfCurrencyEntry;
// enum ------------------------------------------------------------------
@@ -78,15 +77,6 @@ enum SvxNumberValueType
#define NUMBERFORMAT_ENTRY_NEW_CURRENCY NUMBERFORMAT_ENTRY_NOT_FOUND-1
-class SvxDelStrgs: public SvStrings
-{
-
-public:
- ~SvxDelStrgs() { DeleteAndDestroy(0,Count());}
-
-};
-
-// class SvxNumberFormatShell --------------------------------------------
class SVX_DLLPUBLIC SvxNumberFormatShell
{
@@ -117,35 +107,35 @@ public:
const String* pNumStr = NULL );
- void GetInitSettings( sal_uInt16& nCatLbPos,
- LanguageType& rLangType,
- sal_uInt16& nFmtLbSelPos,
- SvStrings& rFmtEntries,
- String& rPrevString,
- Color*& rpPrevColor );
+ void GetInitSettings( sal_uInt16& nCatLbPos,
+ LanguageType& rLangType,
+ sal_uInt16& nFmtLbSelPos,
+ std::vector<String*>& rFmtEntries,
+ String& rPrevString,
+ Color*& rpPrevColor );
- void CategoryChanged( sal_uInt16 nCatLbPos,
- short& rFmtSelPos,
- SvStrings& rFmtEntries );
+ void CategoryChanged( sal_uInt16 nCatLbPos,
+ short& rFmtSelPos,
+ std::vector<String*>& rFmtEntries );
- void LanguageChanged( LanguageType eLangType,
- short& rFmtSelPos,
- SvStrings& rFmtEntries );
+ void LanguageChanged( LanguageType eLangType,
+ short& rFmtSelPos,
+ std::vector<String*>& rFmtEntries );
void FormatChanged( sal_uInt16 nFmtLbPos,
String& rPreviewStr,
Color*& rpFontColor );
- bool AddFormat( String& rFormat,
- xub_StrLen& rErrPos,
- sal_uInt16& rCatLbSelPos,
- short& rFmtSelPos,
- SvStrings& rFmtEntries );
+ bool AddFormat( String& rFormat,
+ xub_StrLen& rErrPos,
+ sal_uInt16& rCatLbSelPos,
+ short& rFmtSelPos,
+ std::vector<String*>& rFmtEntries );
- bool RemoveFormat( const String& rFormat,
- sal_uInt16& rCatLbSelPos,
- short& rFmtSelPos,
- SvStrings& rFmtEntries );
+ bool RemoveFormat( const String& rFormat,
+ sal_uInt16& rCatLbSelPos,
+ short& rFmtSelPos,
+ std::vector<String*>& rFmtEntries );
void MakeFormat( String& rFormat,
bool bThousand,
@@ -229,31 +219,29 @@ private:
NfCurrencyEntry* pCurCurrencyEntry;
bool bBankingSymbol;
sal_uInt16 nCurCurrencyEntryPos;
- SvStrings aCurrencyFormatList;
+ std::vector<String*> aCurrencyFormatList;
#ifdef _SVX_NUMFMTSH_CXX
- SVX_DLLPRIVATE short FillEntryList_Impl( SvStrings& rList );
- SVX_DLLPRIVATE void FillEListWithStd_Impl( SvStrings& rList,sal_uInt16 aPrivCat, short &Pos);
- SVX_DLLPRIVATE short FillEListWithFormats_Impl( SvStrings& rList,short nSelPos,
+ SVX_DLLPRIVATE short FillEntryList_Impl( std::vector<String*>& rList );
+ SVX_DLLPRIVATE void FillEListWithStd_Impl( std::vector<String*>& rList,sal_uInt16 aPrivCat, short &Pos);
+ SVX_DLLPRIVATE short FillEListWithFormats_Impl( std::vector<String*>& rList,short nSelPos,
NfIndexTableOffset eOffsetStart,
NfIndexTableOffset eOffsetEnd);
+ SVX_DLLPRIVATE short FillEListWithDateTime_Impl( std::vector<String*>& rList,short nSelPos);
+ SVX_DLLPRIVATE short FillEListWithCurrency_Impl( std::vector<String*>& rList,short nSelPos);
+ SVX_DLLPRIVATE short FillEListWithSysCurrencys( std::vector<String*>& rList,short nSelPos);
+ SVX_DLLPRIVATE short FillEListWithUserCurrencys( std::vector<String*>& rList,short nSelPos);
+ SVX_DLLPRIVATE short FillEListWithUsD_Impl( std::vector<String*>& rList, sal_uInt16 nPrivCat, short Pos );
- SVX_DLLPRIVATE short FillEListWithDateTime_Impl( SvStrings& rList,short nSelPos);
-
- SVX_DLLPRIVATE short FillEListWithCurrency_Impl( SvStrings& rList,short nSelPos);
- SVX_DLLPRIVATE short FillEListWithSysCurrencys( SvStrings& rList,short nSelPos);
- SVX_DLLPRIVATE short FillEListWithUserCurrencys( SvStrings& rList,short nSelPos);
-
- SVX_DLLPRIVATE short FillEListWithUsD_Impl( SvStrings& rList, sal_uInt16 nPrivCat, short Pos );
SVX_DLLPRIVATE ::std::vector<sal_uInt32>::iterator GetRemoved_Impl( size_t nKey );
SVX_DLLPRIVATE bool IsRemoved_Impl( size_t nKey );
SVX_DLLPRIVATE ::std::vector<sal_uInt32>::iterator GetAdded_Impl( size_t nKey );
SVX_DLLPRIVATE bool IsAdded_Impl( size_t nKey );
- SVX_DLLPRIVATE void GetPreviewString_Impl( String& rString,
- Color*& rpColor );
- SVX_DLLPRIVATE void PosToCategory_Impl( sal_uInt16 nPos, short& rCategory );
- SVX_DLLPRIVATE void CategoryToPos_Impl( short nCategory, sal_uInt16& rPos );
+ SVX_DLLPRIVATE void GetPreviewString_Impl( String& rString,
+ Color*& rpColor );
+ SVX_DLLPRIVATE void PosToCategory_Impl( sal_uInt16 nPos, short& rCategory );
+ SVX_DLLPRIVATE void CategoryToPos_Impl( short nCategory, sal_uInt16& rPos );
#endif
};