summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorApachev Ivan <myromeu@ya.ru>2016-03-08 19:56:37 +0300
committerEike Rathke <erack@redhat.com>2016-03-29 13:33:24 +0000
commit9b69e258b82e6dad94b2784f250b6a105108ee0f (patch)
treea18b8861199b42353f9383d347da2f22dc56a3a3
parenteae2331f83bd58bacccd898d60f6c5f54856c036 (diff)
tdf#96099 fixes trivial typedefs, ::std::vector<OUString>
Change-Id: If01819b43c6cf4665e0aca90f9fb2b4363feae69 Reviewed-on: https://gerrit.libreoffice.org/23060 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/source/filter/inc/autofilterbuffer.hxx3
-rw-r--r--sc/source/filter/inc/commentsbuffer.hxx3
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx8
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.hxx7
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx14
-rw-r--r--sc/source/ui/dbgui/csvtablebox.cxx2
-rw-r--r--sc/source/ui/inc/csvcontrol.hxx4
-rw-r--r--sc/source/ui/inc/csvgrid.hxx6
-rw-r--r--sc/source/ui/view/scextopt.cxx4
9 files changed, 21 insertions, 30 deletions
diff --git a/sc/source/filter/inc/autofilterbuffer.hxx b/sc/source/filter/inc/autofilterbuffer.hxx
index 639960e625a1..3227c1115ca0 100644
--- a/sc/source/filter/inc/autofilterbuffer.hxx
+++ b/sc/source/filter/inc/autofilterbuffer.hxx
@@ -82,9 +82,8 @@ public:
virtual ApiFilterSettings finalizeImport( sal_Int32 nMaxCount ) override;
private:
- typedef ::std::vector< OUString > FilterValueVector;
- FilterValueVector maValues;
+ std::vector< OUString > maValues;
sal_Int32 mnCalendarType;
bool mbShowBlank;
};
diff --git a/sc/source/filter/inc/commentsbuffer.hxx b/sc/source/filter/inc/commentsbuffer.hxx
index b5c8f3ae0386..2dc570ecbbdf 100644
--- a/sc/source/filter/inc/commentsbuffer.hxx
+++ b/sc/source/filter/inc/commentsbuffer.hxx
@@ -84,10 +84,9 @@ public:
void finalizeImport();
private:
- typedef ::std::vector< OUString > OUStringVector;
typedef RefVector< Comment > CommentVector;
- OUStringVector maAuthors;
+ std::vector< OUString > maAuthors;
CommentVector maComments;
};
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 2bc0389c9e02..06dd75fd522c 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -704,8 +704,8 @@ ScFormatRangeStyles::ScFormatRangeStyles()
ScFormatRangeStyles::~ScFormatRangeStyles()
{
- ScMyOUStringVec::iterator i(aStyleNames.begin());
- ScMyOUStringVec::iterator endi(aStyleNames.end());
+ auto i(aStyleNames.begin());
+ auto endi(aStyleNames.end());
while (i != endi)
{
delete *i;
@@ -983,8 +983,8 @@ ScColumnRowStylesBase::ScColumnRowStylesBase()
ScColumnRowStylesBase::~ScColumnRowStylesBase()
{
- ScMyOUStringVec::iterator i(aStyleNames.begin());
- ScMyOUStringVec::iterator endi(aStyleNames.end());
+ auto i(aStyleNames.begin());
+ auto endi(aStyleNames.end());
while (i != endi)
{
delete *i;
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.hxx b/sc/source/filter/xml/XMLStylesExportHelper.hxx
index ec31256bd0c4..0e233ce7be20 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.hxx
@@ -158,7 +158,6 @@ public:
void Sort();
};
-typedef std::vector<OUString*> ScMyOUStringVec;
struct ScMyFormatRange
{
@@ -178,8 +177,8 @@ class ScFormatRangeStyles
typedef std::vector<ScMyFormatRangeAddresses*> ScMyFormatRangeListVec;
ScMyFormatRangeListVec aTables;
- ScMyOUStringVec aStyleNames;
- ScMyOUStringVec aAutoStyleNames;
+ std::vector<OUString*> aStyleNames;
+ std::vector<OUString*> aAutoStyleNames;
const ScMyDefaultStyleList* pColDefaults;
public:
@@ -206,7 +205,7 @@ public:
class ScColumnRowStylesBase
{
- ScMyOUStringVec aStyleNames;
+ std::vector<OUString*> aStyleNames;
public:
ScColumnRowStylesBase();
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index ab07f6fb1ba1..514cd469245f 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -490,7 +490,7 @@ void ScCsvGrid::SetSelColumnType( sal_Int32 nType )
}
}
-void ScCsvGrid::SetTypeNames( const StringVec& rTypeNames )
+void ScCsvGrid::SetTypeNames( const std::vector<OUString>& rTypeNames )
{
OSL_ENSURE( !rTypeNames.empty(), "ScCsvGrid::SetTypeNames - vector is empty" );
maTypeNames = rTypeNames;
@@ -727,8 +727,8 @@ void ScCsvGrid::ImplSetTextLineSep(
sal_uInt32 nLineIx = nLine - GetFirstVisLine();
while( maTexts.size() <= nLineIx )
- maTexts.push_back( StringVec() );
- StringVec& rStrVec = maTexts[ nLineIx ];
+ maTexts.push_back( std::vector<OUString>() );
+ std::vector<OUString>& rStrVec = maTexts[ nLineIx ];
rStrVec.clear();
// scan for separators
@@ -790,9 +790,9 @@ void ScCsvGrid::ImplSetTextLineFix( sal_Int32 nLine, const OUString& rTextLine )
sal_uInt32 nLineIx = nLine - GetFirstVisLine();
while( maTexts.size() <= nLineIx )
- maTexts.push_back( StringVec() );
+ maTexts.push_back( std::vector<OUString>() );
- StringVec& rStrVec = maTexts[ nLineIx ];
+ std::vector<OUString>& rStrVec = maTexts[ nLineIx ];
rStrVec.clear();
sal_uInt32 nColCount = GetColumnCount();
sal_Int32 nStrLen = rTextLine.getLength();
@@ -814,7 +814,7 @@ const OUString& ScCsvGrid::GetCellText( sal_uInt32 nColIndex, sal_Int32 nLine )
sal_uInt32 nLineIx = nLine - GetFirstVisLine();
if( nLineIx >= maTexts.size() ) return EMPTY_OUSTRING;
- const StringVec& rStrVec = maTexts[ nLineIx ];
+ const std::vector<OUString>& rStrVec = maTexts[ nLineIx ];
if( nColIndex >= rStrVec.size() ) return EMPTY_OUSTRING;
return rStrVec[ nColIndex ];
@@ -1158,7 +1158,7 @@ void ScCsvGrid::ImplDrawColumnBackgr( sal_uInt32 nColIndex )
sal_Int32 nStrX = GetX( nFirstVisPos );
for( size_t nLine = 0; nLine < nLineCount; ++nLine )
{
- StringVec& rStrVec = maTexts[ nLine ];
+ std::vector<OUString>& rStrVec = maTexts[ nLine ];
if( (nColIndex < rStrVec.size()) && (rStrVec[ nColIndex ].getLength() > nStrPos) )
{
const OUString& rStr = rStrVec[ nColIndex ];
diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx
index b9a69c64a733..89336fd92f46 100644
--- a/sc/source/ui/dbgui/csvtablebox.cxx
+++ b/sc/source/ui/dbgui/csvtablebox.cxx
@@ -222,7 +222,7 @@ void ScCsvTableBox::SetUniStrings(
void ScCsvTableBox::InitTypes( const ListBox& rListBox )
{
const sal_Int32 nTypeCount = rListBox.GetEntryCount();
- StringVec aTypeNames( nTypeCount );
+ std::vector<OUString> aTypeNames( nTypeCount );
for( sal_Int32 nIndex = 0; nIndex < nTypeCount; ++nIndex )
aTypeNames[ nIndex ] = rListBox.GetEntry( nIndex );
maGrid->SetTypeNames( aTypeNames );
diff --git a/sc/source/ui/inc/csvcontrol.hxx b/sc/source/ui/inc/csvcontrol.hxx
index f645a6148553..115f6fecc58f 100644
--- a/sc/source/ui/inc/csvcontrol.hxx
+++ b/sc/source/ui/inc/csvcontrol.hxx
@@ -221,10 +221,6 @@ inline void ScCsvCmd::Set( ScCsvCmdType eType, sal_Int32 nParam1, sal_Int32 nPar
/** Base class for the CSV ruler and the data grid control. Implements command handling. */
class SC_DLLPUBLIC ScCsvControl : public Control
{
-protected:
- typedef ::std::vector< OUString > StringVec;
- typedef ::std::vector< StringVec > StringVecVec;
-
private:
Link<ScCsvControl&,void> maCmdHdl; /// External command handler.
ScCsvCmd maCmd; /// Data of last command.
diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx
index f6503fb70ec0..772ef361d9ba 100644
--- a/sc/source/ui/inc/csvgrid.hxx
+++ b/sc/source/ui/inc/csvgrid.hxx
@@ -83,8 +83,8 @@ private:
ScCsvSplits maSplits; /// Vector with split positions.
ScCsvColStateVec maColStates; /// State of each column.
- StringVec maTypeNames; /// UI names of data types.
- StringVecVec maTexts; /// 2D-vector for cell texts.
+ std::vector<OUString> maTypeNames; /// UI names of data types.
+ std::vector< std::vector<OUString> > maTexts; /// 2D-vector for cell texts.
sal_Int32 mnFirstImpLine; /// First imported line (0-based).
sal_uInt32 mnRecentSelCol; /// Index of most recently selected column.
@@ -177,7 +177,7 @@ public:
/** Changes the data type of all selected columns. */
void SetSelColumnType( sal_Int32 nType );
/** Sets new UI data type names. */
- void SetTypeNames( const StringVec& rTypeNames );
+ void SetTypeNames( const std::vector<OUString>& rTypeNames );
/** Returns the UI type name of the specified column. */
const OUString& GetColumnTypeName( sal_uInt32 nColIndex ) const;
diff --git a/sc/source/ui/view/scextopt.cxx b/sc/source/ui/view/scextopt.cxx
index 97475e8ee6fd..ff3f28f9b043 100644
--- a/sc/source/ui/view/scextopt.cxx
+++ b/sc/source/ui/view/scextopt.cxx
@@ -120,11 +120,9 @@ void ScExtTabSettingsCont::CopyFromMap( const ScExtTabSettingsMap& rMap )
/** Implementation struct for ScExtDocOptions containing all members. */
struct ScExtDocOptionsImpl
{
- typedef ::std::vector< OUString > StringVec;
-
ScExtDocSettings maDocSett; /// Global document settings.
ScExtTabSettingsCont maTabSett; /// Settings for all sheets.
- StringVec maCodeNames; /// Codenames for all sheets (VBA module names).
+ std::vector< OUString > maCodeNames; /// Codenames for all sheets (VBA module names).
bool mbChanged; /// Use only if something has been changed.
explicit ScExtDocOptionsImpl();