[Libreoffice-commits] core.git: sc/source
Apachev Ivan
myromeu at ya.ru
Tue Mar 29 13:33:57 UTC 2016
sc/source/filter/inc/autofilterbuffer.hxx | 3 +--
sc/source/filter/inc/commentsbuffer.hxx | 3 +--
sc/source/filter/xml/XMLStylesExportHelper.cxx | 8 ++++----
sc/source/filter/xml/XMLStylesExportHelper.hxx | 7 +++----
sc/source/ui/dbgui/csvgrid.cxx | 14 +++++++-------
sc/source/ui/dbgui/csvtablebox.cxx | 2 +-
sc/source/ui/inc/csvcontrol.hxx | 4 ----
sc/source/ui/inc/csvgrid.hxx | 6 +++---
sc/source/ui/view/scextopt.cxx | 4 +---
9 files changed, 21 insertions(+), 30 deletions(-)
New commits:
commit 9b69e258b82e6dad94b2784f250b6a105108ee0f
Author: Apachev Ivan <myromeu at ya.ru>
Date: Tue Mar 8 19:56:37 2016 +0300
tdf#96099 fixes trivial typedefs, ::std::vector<OUString>
Change-Id: If01819b43c6cf4665e0aca90f9fb2b4363feae69
Reviewed-on: https://gerrit.libreoffice.org/23060
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/source/filter/inc/autofilterbuffer.hxx b/sc/source/filter/inc/autofilterbuffer.hxx
index 639960e..3227c111 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 b5c8f3a..2dc570e 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 2bc0389..06dd75f 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 ec31256..0e233ce 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 ab07f6f..514cd46 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 b9a69c6..89336fd 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 f645a61..115f6fe 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 f6503fb..772ef36 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 97475e8..ff3f28f 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();
More information about the Libreoffice-commits
mailing list