summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-05-21 13:43:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-24 10:19:49 +0200
commit552b1fc70fc2fca2ba3d33929f20c3172e9e8bb4 (patch)
treee43efc255428dd52d1f174d1b4c9bd0e1d17de38 /sw/source
parent9a453051639be4bee9339bface0bb4678eb58bf4 (diff)
inline some use-once typedefs
Change-Id: Idddba2f3fd05265b08dbc88edb6152d34a166052 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/crsr/findattr.cxx4
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx3
-rw-r--r--sw/source/core/doc/acmplwrd.cxx8
-rw-r--r--sw/source/core/doc/docsort.cxx7
-rw-r--r--sw/source/core/doc/list.cxx3
-rw-r--r--sw/source/filter/inc/msfilter.hxx3
-rw-r--r--sw/source/filter/ww8/ww8par.hxx3
-rw-r--r--sw/source/uibase/inc/redlndlg.hxx5
8 files changed, 12 insertions, 24 deletions
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index fc0a7abb5dfa..b9f92982129a 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -49,8 +49,6 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
-typedef o3tl::sorted_vector<SwFormat*> SwpFormats;
-
// Special case for SvxFontItem: only compare the name
static bool CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 )
{
@@ -1049,7 +1047,7 @@ static bool FindAttrsImpl(SwPaM & rSearchPam,
bool bFirst = true;
const bool bSrchForward = &fnMove == &fnMoveForward;
SwContentNode * pNode;
- SwpFormats aFormatArr;
+ o3tl::sorted_vector<SwFormat*> aFormatArr;
// check which text/char attributes are searched
SwAttrCheckArr aCmpArr( rSet, bSrchForward, bNoColls );
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 6e907d7495c7..a174dccbbee1 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -238,8 +238,7 @@ namespace sw
const SwPosition &rStt = *rPam.Start(), &rEnd = *rPam.End();
SwPosition const*const pCpyStt = &rCpyPam;
- typedef std::vector< const ::sw::mark::IMark* > mark_vector_t;
- mark_vector_t vMarksToCopy;
+ std::vector< const ::sw::mark::IMark* > vMarksToCopy;
for ( IDocumentMarkAccess::const_iterator_t ppMark = pSrcMarkAccess->getAllMarksBegin();
ppMark != pSrcMarkAccess->getAllMarksEnd();
++ppMark )
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index 619faef05aa4..b256c50658a1 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -58,11 +58,10 @@ protected:
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override;
};
-typedef std::vector<SwAutoCompleteClient> SwAutoCompleteClientVector;
-
class SwAutoCompleteWord_Impl
{
- SwAutoCompleteClientVector m_aClientVector;
+ std::vector<SwAutoCompleteClient>
+ m_aClientVector;
SwAutoCompleteWord& m_rAutoCompleteWord;
public:
explicit SwAutoCompleteWord_Impl(SwAutoCompleteWord& rParent) :
@@ -71,14 +70,13 @@ public:
void RemoveDocument(const SwDoc& rDoc);
};
-typedef std::vector<const SwDoc*> SwDocPtrVector;
class SwAutoCompleteString
: public editeng::IAutoCompleteString
{
#if OSL_DEBUG_LEVEL > 0
static sal_uLong s_nSwAutoCompleteStringCount;
#endif
- SwDocPtrVector m_aSourceDocs;
+ std::vector<const SwDoc*> m_aSourceDocs;
public:
SwAutoCompleteString(const OUString& rStr, sal_Int32 nLen);
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 72ac17572ab4..21ff81b7b1d6 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -61,9 +61,6 @@ LocaleDataWrapper* SwSortElement::pLclData = nullptr;
// List of all sorted elements
-typedef std::multiset<SwSortTextElement> SwSortTextElements;
-typedef std::multiset<SwSortBoxElement> SwSortBoxElements;
-
/// Construct a SortElement for the Sort
void SwSortElement::Init( SwDoc* pD, const SwSortOptions& rOpt,
FlatFndBox const * pFltBx )
@@ -372,7 +369,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
SwNodeIndex aStart(pStart->nNode);
SwSortElement::Init( this, rOpt );
- SwSortTextElements aSortSet;
+ std::multiset<SwSortTextElement> aSortSet;
while( aStart <= pEnd->nNode )
{
// Iterate over a selected range
@@ -551,7 +548,7 @@ bool SwDoc::SortTable(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
// Sort SortList by Key
SwSortElement::Init( this, rOpt, &aFlatBox );
- SwSortBoxElements aSortList;
+ std::multiset<SwSortBoxElement> aSortList;
// When sorting, do not include the first row if the HeaderLine is repeated
for( sal_uInt16 i = static_cast<sal_uInt16>(nStart); i < nCount; ++i)
diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx
index c81eef636ff1..a87570131e27 100644
--- a/sw/source/core/doc/list.cxx
+++ b/sw/source/core/doc/list.cxx
@@ -75,8 +75,7 @@ class SwListImpl
tListTreeForRange(std::unique_ptr<SwNodeNum> p1, std::unique_ptr<SwNodeNum> p2, std::unique_ptr<SwPaM> p3)
: pRoot(std::move(p1)), pRootRLHidden(std::move(p2)), pSection(std::move(p3)) {}
};
- typedef std::vector<tListTreeForRange> tListTrees;
- tListTrees maListTrees;
+ std::vector<tListTreeForRange> maListTrees;
int mnMarkedListLevel;
diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx
index 87168a5e1dc0..78948385c684 100644
--- a/sw/source/filter/inc/msfilter.hxx
+++ b/sw/source/filter/inc/msfilter.hxx
@@ -279,13 +279,12 @@ namespace sw
class InsertedTablesManager
{
public:
- typedef std::map<std::unique_ptr<InsertedTableListener>, SwNodeIndex*> TableMap;
void DelAndMakeTableFrames();
void InsertTable(SwTableNode &rTableNode, SwPaM &rPaM);
explicit InsertedTablesManager(const SwDoc &rDoc);
private:
bool mbHasRoot;
- TableMap maTables;
+ std::map<std::unique_ptr<InsertedTableListener>, SwNodeIndex*> maTables;
};
class RedlineStack
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 1acde61e4c54..ce2b8803f12f 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1067,7 +1067,6 @@ private:
// Storage-Reader
typedef std::set<WW8_CP> cp_set;
-typedef std::vector<WW8_CP> cp_vector;
class SwWW8ImplReader
{
@@ -1376,7 +1375,7 @@ private:
bool m_bCareLastParaEndInToc;
cp_set m_aTOXEndCps;
- cp_vector m_aEndParaPos;
+ std::vector<WW8_CP> m_aEndParaPos;
WW8_CP m_aCurrAttrCP;
bool m_bOnLoadingMain:1;
bool m_bNotifyMacroEventRead:1;
diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx
index 750678477456..910f23ce2d3d 100644
--- a/sw/source/uibase/inc/redlndlg.hxx
+++ b/sw/source/uibase/inc/redlndlg.hxx
@@ -52,13 +52,12 @@ struct SwRedlineDataParent
class SwRedlineDataParentSortArr : public o3tl::sorted_vector<SwRedlineDataParent*, o3tl::less_ptr_to<SwRedlineDataParent> > {};
-typedef std::vector<std::unique_ptr<SwRedlineDataChild>> SwRedlineDataChildArr;
-
class SW_DLLPUBLIC SwRedlineAcceptDlg final
{
std::shared_ptr<weld::Window> m_xParentDlg;
std::vector<std::unique_ptr<SwRedlineDataParent>> m_RedlineParents;
- SwRedlineDataChildArr m_RedlineChildren;
+ std::vector<std::unique_ptr<SwRedlineDataChild>>
+ m_RedlineChildren;
SwRedlineDataParentSortArr m_aUsedSeqNo;
Timer m_aSelectTimer;
OUString m_sInserted;