diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-29 15:04:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-06-02 08:39:44 +0200 |
commit | 468e8d53fbb07dce271a1f7fabf5711993e01eb7 (patch) | |
tree | 60a0474d2789904e17ff22623f01175c11836647 /sc | |
parent | e9dbdc9fc6ff943650e6e18986ed1cce913971ef (diff) |
inline some use-once typedefs
Change-Id: I335e0c5cf7944efa487e4535a9e6a5baab2f36dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95140
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/dpgroup.hxx | 11 | ||||
-rw-r--r-- | sc/inc/orcusxml.hxx | 9 | ||||
-rw-r--r-- | sc/inc/recursionhelper.hxx | 3 | ||||
-rw-r--r-- | sc/source/filter/inc/formulabuffer.hxx | 19 | ||||
-rw-r--r-- | sc/source/filter/inc/htmlpars.hxx | 3 | ||||
-rw-r--r-- | sc/source/filter/inc/pivotcachebuffer.hxx | 10 | ||||
-rw-r--r-- | sc/source/filter/inc/scenariobuffer.hxx | 4 | ||||
-rw-r--r-- | sc/source/filter/inc/viewsettings.hxx | 6 | ||||
-rw-r--r-- | sc/source/filter/inc/worksheetbuffer.hxx | 7 | ||||
-rw-r--r-- | sc/source/filter/oox/numberformatsbuffer.cxx | 3 | ||||
-rw-r--r-- | sc/source/filter/oox/revisionfragment.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLExportDatabaseRanges.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLStylesExportHelper.hxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/pivotsource.hxx | 15 | ||||
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 22 | ||||
-rw-r--r-- | sc/source/ui/inc/AccessibleCsvControl.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/navipi.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/vba/vbainterior.cxx | 4 |
19 files changed, 47 insertions, 92 deletions
diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx index 4616cde16938..7d6ecf035c53 100644 --- a/sc/inc/dpgroup.hxx +++ b/sc/inc/dpgroup.hxx @@ -50,14 +50,12 @@ public: void FillGroupFilter( ScDPFilteredCache::GroupFilter& rFilter ) const; }; -typedef ::std::vector<ScDPGroupItem> ScDPGroupItemVec; - class ScDPGroupDimension { long nSourceDim; long nGroupDim; - OUString aGroupName; - ScDPGroupItemVec aItems; + OUString aGroupName; + std::vector<ScDPGroupItem> aItems; mutable std::vector<SCROW> maMemberEntries; bool mbDateDimension; public: @@ -87,8 +85,6 @@ public: bool IsDateDimension() const { return mbDateDimension;} }; -typedef ::std::vector<ScDPGroupDimension> ScDPGroupDimensionVec; - class SC_DLLPUBLIC ScDPNumGroupDimension { mutable ScDPNumGroupInfo aGroupInfo; // settings @@ -120,7 +116,8 @@ class ScDPGroupTableData final : public ScDPTableData { std::shared_ptr<ScDPTableData> pSourceData; long nSourceCount; - ScDPGroupDimensionVec aGroups; + std::vector<ScDPGroupDimension> + aGroups; std::unique_ptr<ScDPNumGroupDimension[]> pNumGroups; // array[nSourceCount] ScDocument* pDoc; diff --git a/sc/inc/orcusxml.hxx b/sc/inc/orcusxml.hxx index b18c437f0f51..2f49f8249ef2 100644 --- a/sc/inc/orcusxml.hxx +++ b/sc/inc/orcusxml.hxx @@ -72,12 +72,9 @@ struct ScOrcusImportXMLParam std::vector<OString> maRowGroups; }; - typedef std::vector<CellLink> CellLinksType; - typedef std::vector<RangeLink> RangeLinksType; - - std::vector<size_t> maNamespaces; - CellLinksType maCellLinks; - RangeLinksType maRangeLinks; + std::vector<size_t> maNamespaces; + std::vector<CellLink> maCellLinks; + std::vector<RangeLink> maRangeLinks; }; #endif diff --git a/sc/inc/recursionhelper.hxx b/sc/inc/recursionhelper.hxx index 2c7a6605042e..10c4ddc6f02e 100644 --- a/sc/inc/recursionhelper.hxx +++ b/sc/inc/recursionhelper.hxx @@ -46,12 +46,11 @@ typedef ::std::list< ScFormulaRecursionEntry > ScFormulaRecursionList; class ScRecursionHelper { typedef ::std::stack< ScFormulaCell* > ScRecursionInIterationStack; - typedef ::std::vector< ScFormulaCell* > ScFGList; ScFormulaRecursionList aRecursionFormulas; ScFormulaRecursionList::iterator aInsertPos; ScFormulaRecursionList::iterator aLastIterationStart; ScRecursionInIterationStack aRecursionInIterationStack; - ScFGList aFGList; + std::vector< ScFormulaCell* > aFGList; // Flag list corresponding to aFGList to indicate whether each formula-group // is in a dependency evaluation mode or not. std::vector< bool > aInDependencyEvalMode; diff --git a/sc/source/filter/inc/formulabuffer.hxx b/sc/source/filter/inc/formulabuffer.hxx index 0cffd9390132..deefba97deea 100644 --- a/sc/source/filter/inc/formulabuffer.hxx +++ b/sc/source/filter/inc/formulabuffer.hxx @@ -81,21 +81,14 @@ public: }; private: - // Vectors indexed by SCTAB - cf. SetSheetCount - typedef ::std::vector< std::vector<TokenAddressItem> > FormulaDataArray; - typedef ::std::vector< std::vector<TokenRangeAddressItem> > ArrayFormulaDataArray; - // sheet -> list of shared formula descriptions - typedef ::std::vector< std::vector<SharedFormulaDesc> > SheetToSharedFormulaid; - // sheet -> stuff needed to create shared formulae - typedef ::std::vector< std::vector<SharedFormulaEntry> > SheetToFormulaEntryArray; - typedef ::std::vector< std::vector<FormulaValue> > FormulaValueArray; osl::Mutex maMtxData; - FormulaDataArray maCellFormulas; - ArrayFormulaDataArray maCellArrayFormulas; - SheetToFormulaEntryArray maSharedFormulas; - SheetToSharedFormulaid maSharedFormulaIds; - FormulaValueArray maCellFormulaValues; + // Vectors indexed by SCTAB - cf. SetSheetCount + std::vector< std::vector<TokenAddressItem> > maCellFormulas; + std::vector< std::vector<TokenRangeAddressItem> > maCellArrayFormulas; + std::vector< std::vector<SharedFormulaEntry> > maSharedFormulas; // sheet -> stuff needed to create shared formulae + std::vector< std::vector<SharedFormulaDesc> > maSharedFormulaIds; // sheet -> list of shared formula descriptions + std::vector< std::vector<FormulaValue> > maCellFormulaValues; // sheet -> stuff needed to create shared formulae SheetItem getSheetItem( SCTAB nTab ); diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx index e0d44c0c004c..95243021d6d4 100644 --- a/sc/source/filter/inc/htmlpars.hxx +++ b/sc/source/filter/inc/htmlpars.hxx @@ -443,7 +443,6 @@ private: typedef ::std::unique_ptr< SfxItemSet > SfxItemSetPtr; typedef ::std::vector< SCCOLROW > ScSizeVec; typedef ::std::vector< ScHTMLEntry* > ScHTMLEntryVector; - typedef ::std::map< ScHTMLPos, ScHTMLEntryVector > ScHTMLEntryMap; typedef ::std::unique_ptr< ScHTMLEntry > ScHTMLEntryPtr; /** Returns true, if the current cell does not contain an entry yet. */ @@ -527,7 +526,7 @@ private: ScRangeList maUsedCells; /// List of all used cells. EditEngine& mrEditEngine; /// Edit engine (from ScEEParser). std::vector<std::shared_ptr<ScEEParseEntry>>& mrEEParseList; /// List that owns the parse entries (from ScEEParser). - ScHTMLEntryMap maEntryMap; /// List of entries for each cell. + std::map< ScHTMLPos, ScHTMLEntryVector > maEntryMap; /// List of entries for each cell. ScHTMLEntryVector* mpCurrEntryVector; /// Current entry vector from map for faster access. ScHTMLEntryPtr mxCurrEntry; /// Working entry, not yet inserted in a list. ScSizeVec maCumSizes[ 2 ]; /// Cumulated cell counts for each HTML table column/row. diff --git a/sc/source/filter/inc/pivotcachebuffer.hxx b/sc/source/filter/inc/pivotcachebuffer.hxx index f9b39b57e7e8..cd20ab9c1033 100644 --- a/sc/source/filter/inc/pivotcachebuffer.hxx +++ b/sc/source/filter/inc/pivotcachebuffer.hxx @@ -126,8 +126,7 @@ private: void importArray( SequenceInputStream& rStrm ); private: - typedef ::std::vector< PivotCacheItem > CacheItemVector; - CacheItemVector maItems; /// All items of this list. + std::vector< PivotCacheItem > maItems; /// All items of this list. }; struct PCFieldModel @@ -450,11 +449,10 @@ private: private: typedef ::std::map< sal_Int32, OUString > FragmentPathMap; typedef RefMap< sal_Int32, PivotCache > PivotCacheMap; - typedef ::std::vector< sal_Int32 > PivotCacheIdVector; - FragmentPathMap maFragmentPaths; - PivotCacheMap maCaches; - PivotCacheIdVector maCacheIds; + FragmentPathMap maFragmentPaths; + PivotCacheMap maCaches; + std::vector< sal_Int32 > maCacheIds; }; } // namespace xls diff --git a/sc/source/filter/inc/scenariobuffer.hxx b/sc/source/filter/inc/scenariobuffer.hxx index 0829c3cc4459..66b93848d482 100644 --- a/sc/source/filter/inc/scenariobuffer.hxx +++ b/sc/source/filter/inc/scenariobuffer.hxx @@ -71,9 +71,7 @@ public: void finalizeImport(); private: - typedef ::std::vector< ScenarioCellModel > ScenarioCellVector; - - ScenarioCellVector maCells; /// Scenario cells. + std::vector< ScenarioCellModel > maCells; /// Scenario cells. ScenarioModel maModel; /// Scenario model data. sal_Int16 mnSheet; /// Index of the sheet this scenario is based on. }; diff --git a/sc/source/filter/inc/viewsettings.hxx b/sc/source/filter/inc/viewsettings.hxx index 3fdbf663ad49..af21342b9fdb 100644 --- a/sc/source/filter/inc/viewsettings.hxx +++ b/sc/source/filter/inc/viewsettings.hxx @@ -177,13 +177,11 @@ private: private: typedef RefVector< WorkbookViewModel > WorkbookViewModelVec; typedef RefMap< sal_Int16, SheetViewModel > SheetViewModelMap; - typedef ::std::map< sal_Int16, css::uno::Any > SheetPropertiesMap; - typedef ::std::map< sal_Int16, ScRange > SheetUsedAreaMap; WorkbookViewModelVec maBookViews; /// Workbook view models. SheetViewModelMap maSheetViews; /// Active view model for each sheet. - SheetPropertiesMap maSheetProps; /// Converted property sequences for each sheet. - SheetUsedAreaMap maSheetUsedAreas; /// Used area (cell range) of every sheet. + std::map< sal_Int16, css::uno::Any > maSheetProps; /// Converted property sequences for each sheet. + std::map< sal_Int16, ScRange > maSheetUsedAreas; /// Used area (cell range) of every sheet. ScRange maOleSize; /// Visible area if this is an embedded OLE object. bool mbValidOleSize; /// True = imported OLE size is a valid cell range. }; diff --git a/sc/source/filter/inc/worksheetbuffer.hxx b/sc/source/filter/inc/worksheetbuffer.hxx index 7c3b246243ce..d77e05ac83f4 100644 --- a/sc/source/filter/inc/worksheetbuffer.hxx +++ b/sc/source/filter/inc/worksheetbuffer.hxx @@ -101,11 +101,8 @@ private: void insertSheet( const SheetInfoModel& rModel ); private: - typedef RefVector< SheetInfo > SheetInfoVector; - SheetInfoVector maSheetInfos; - - typedef RefMap< OUString, SheetInfo, IgnoreCaseCompare > SheetInfoMap; - SheetInfoMap maSheetInfosByName; + RefVector< SheetInfo > maSheetInfos; + RefMap< OUString, SheetInfo, IgnoreCaseCompare > maSheetInfosByName; }; } // namespace xls diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx b/sc/source/filter/oox/numberformatsbuffer.cxx index 85e84a659494..c83469de858a 100644 --- a/sc/source/filter/oox/numberformatsbuffer.cxx +++ b/sc/source/filter/oox/numberformatsbuffer.cxx @@ -2048,8 +2048,7 @@ void NumberFormatsBuffer::insertBuiltinFormats() aBuiltinVec.push_back( aMIt->second ); // insert the default formats in the format map (in reverse order from default table to system locale) - typedef ::std::map< sal_uInt32, sal_uInt32 > ReuseMap; - ReuseMap aReuseMap; + std::map< sal_uInt32, sal_uInt32 > aReuseMap; for( BuiltinVec::reverse_iterator aVIt = aBuiltinVec.rbegin(), aVEnd = aBuiltinVec.rend(); aVIt != aVEnd; ++aVIt ) { // do not put the current system locale for default table diff --git a/sc/source/filter/oox/revisionfragment.cxx b/sc/source/filter/oox/revisionfragment.cxx index ffab0955b203..bb3f686e0ef8 100644 --- a/sc/source/filter/oox/revisionfragment.cxx +++ b/sc/source/filter/oox/revisionfragment.cxx @@ -183,11 +183,9 @@ struct RevisionMetadata } -typedef std::map<OUString, RevisionMetadata> RevDataType; - struct RevisionHeadersFragment::Impl { - RevDataType maRevData; + std::map<OUString, RevisionMetadata> maRevData; Impl() {} }; diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx index ba0fcc71de5a..8f5861c0e52f 100644 --- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx +++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx @@ -673,15 +673,13 @@ private: void ScXMLExportDatabaseRanges::WriteDatabaseRanges() { - typedef ::std::map<SCTAB, const ScDBData*> SheetLocalDBs; - pDoc = rExport.GetDocument(); if (!pDoc) return; // Get sheet-local anonymous ranges. SCTAB nTabCount = pDoc->GetTableCount(); - SheetLocalDBs aSheetDBs; + std::map<SCTAB, const ScDBData*> aSheetDBs; for (SCTAB i = 0; i < nTabCount; ++i) { const ScDBData* p = pDoc->GetAnonymousDBData(i); diff --git a/sc/source/filter/xml/XMLStylesExportHelper.hxx b/sc/source/filter/xml/XMLStylesExportHelper.hxx index 6a8dd5462ffe..40cca729b4f5 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.hxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.hxx @@ -58,12 +58,10 @@ struct ScMyValidation bool IsEqual(const ScMyValidation& aVal) const; }; -typedef std::vector<ScMyValidation> ScMyValidationVec; - class ScMyValidationsContainer { private: - ScMyValidationVec aValidationVec; + std::vector<ScMyValidation> aValidationVec; public: ScMyValidationsContainer(); ~ScMyValidationsContainer(); diff --git a/sc/source/filter/xml/pivotsource.hxx b/sc/source/filter/xml/pivotsource.hxx index e729ef44de2d..5dab5c2b4d12 100644 --- a/sc/source/filter/xml/pivotsource.hxx +++ b/sc/source/filter/xml/pivotsource.hxx @@ -59,17 +59,10 @@ struct PivotTableSources ServiceSource( ScDPObject* pObj, const ScDPServiceDesc& rDesc ); }; - typedef std::vector<SelectedPages> SelectedPagesListType; - - typedef std::vector<SheetSource> SheetSourcesType; - typedef std::vector<DBSource> DBSourcesType; - typedef std::vector<ServiceSource> ServiceSourcesType; - - SelectedPagesListType maSelectedPagesList; - - SheetSourcesType maSheetSources; - DBSourcesType maDBSources; - ServiceSourcesType maServiceSources; + std::vector<SelectedPages> maSelectedPagesList; + std::vector<SheetSource> maSheetSources; + std::vector<DBSource> maDBSources; + std::vector<ServiceSource> maServiceSources; PivotTableSources(); diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index f3a1f3d795ee..764c07b2f369 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -1099,20 +1099,18 @@ void ScDocFunc::NotifyInputHandler( const ScAddress& rPos ) } } - namespace { - - struct ScMyRememberItem - { - sal_Int32 nIndex; - SfxItemSet aItemSet; +namespace { - ScMyRememberItem(const SfxItemSet& rItemSet, sal_Int32 nTempIndex) : - nIndex(nTempIndex), aItemSet(rItemSet) {} - }; + struct ScMyRememberItem + { + sal_Int32 nIndex; + SfxItemSet aItemSet; - } + ScMyRememberItem(const SfxItemSet& rItemSet, sal_Int32 nTempIndex) : + nIndex(nTempIndex), aItemSet(rItemSet) {} + }; - typedef ::std::vector<std::unique_ptr<ScMyRememberItem>> ScMyRememberItemVector; +} void ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, bool bApi ) { @@ -1133,7 +1131,7 @@ void ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, if (bUpdateMode) rEngine.SetUpdateMode(false); - ScMyRememberItemVector aRememberItems; + std::vector<std::unique_ptr<ScMyRememberItem>> aRememberItems; // All paragraph attributes must be removed before calling CreateTextObject, // not only alignment, so the object doesn't contain the cell attributes as diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx index 575b855b7fd6..808368cd3c42 100644 --- a/sc/source/ui/inc/AccessibleCsvControl.hxx +++ b/sc/source/ui/inc/AccessibleCsvControl.hxx @@ -429,11 +429,9 @@ private: css::uno::Reference<css::accessibility::XAccessible> getAccessibleCell(sal_Int32 nRow, sal_Int32 nColumn); }; -typedef ::cppu::ImplHelper1<css::accessibility::XAccessible> ScAccessibleCsvCellImpl; - /** Accessible class representing a cell of the CSV grid control. */ class ScAccessibleCsvCell : public ScAccessibleCsvControl - , public ScAccessibleCsvCellImpl + , public cppu::ImplHelper1<css::accessibility::XAccessible> , public ::accessibility::AccessibleStaticTextBase { protected: diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx index d93642cfcacf..903b8a7f483e 100644 --- a/sc/source/ui/inc/navipi.hxx +++ b/sc/source/ui/inc/navipi.hxx @@ -67,9 +67,8 @@ private: explicit ScenarioEntry() : mbProtected( false ) {} }; - typedef ::std::vector< ScenarioEntry > ScenarioList; - ScenarioList m_aEntries; + std::vector< ScenarioEntry > m_aEntries; void UpdateEntries(const std::vector<OUString> &rNewEntryList); void SelectScenario(); diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index e173c2550910..efc5386c8160 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -9101,8 +9101,6 @@ struct ScPatternHashCode // Hash map to find a range by its start row typedef std::unordered_map< SCROW, ScRange > ScRowRangeHashMap; -typedef std::vector<ScRange> ScRangeVector; - namespace { // Hash map entry. @@ -9114,7 +9112,7 @@ class ScUniqueFormatsEntry EntryState eState; ScRange aSingleRange; ScRowRangeHashMap aJoinedRanges; // "active" ranges to be merged - ScRangeVector aCompletedRanges; // ranges that will no longer be touched + std::vector<ScRange> aCompletedRanges; // ranges that will no longer be touched ScRangeListRef aReturnRanges; // result as ScRangeList for further use public: diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx index e603a689c661..0fe22e786e0e 100644 --- a/sc/source/ui/vba/vbainterior.cxx +++ b/sc/source/ui/vba/vbainterior.cxx @@ -30,15 +30,15 @@ #include "vbapalette.hxx" #include <document.hxx> -typedef std::map< sal_Int32, sal_Int32 > PatternMap; using namespace ::com::sun::star; using namespace ::ooo::vba; using namespace ::ooo::vba::excel::XlPattern; + static const char BACKCOLOR[] = "CellBackColor"; static const char PATTERN[] = "Pattern"; static const char PATTERNCOLOR[] = "PatternColor"; -static PatternMap aPatternMap { +static std::map< sal_Int32, sal_Int32 > aPatternMap { { xlPatternAutomatic, 0 }, { xlPatternChecker, 9 }, { xlPatternCrissCross, 16 }, |