forms/source/component/clickableimage.hxx    |    5 +----
 sc/inc/chart2uno.hxx                         |    4 ++--
 sc/source/filter/inc/externallinkbuffer.hxx  |    4 +---
 sc/source/filter/oox/condformatbuffer.cxx    |    3 +--
 svx/source/inc/formcontroller.hxx            |    4 ++--
 sw/source/core/txtnode/modeltoviewhelper.cxx |    4 +---
 sw/source/filter/html/htmltab.cxx            |   13 ++++---------
 vcl/inc/impfontcache.hxx                     |    2 --
 vcl/source/font/fontcache.cxx                |    4 ++--
 9 files changed, 14 insertions(+), 29 deletions(-)

New commits:
commit 9a2c347e76c330b45504c8219510c9ef86503b86
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Aug 14 12:05:31 2020 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Aug 14 15:30:14 2020 +0200

    inline some use-once typedefs
    
    Change-Id: Ifefdb1ad20d09e257064171e458b2eb33065f5de
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100733
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/forms/source/component/clickableimage.hxx 
b/forms/source/component/clickableimage.hxx
index ad823c4209ac..329f2d5ab430 100644
--- a/forms/source/component/clickableimage.hxx
+++ b/forms/source/component/clickableimage.hxx
@@ -154,12 +154,9 @@ namespace frm
 
     class ImageModelMethodGuard : public ::osl::MutexGuard
     {
-    private:
-        typedef ::osl::MutexGuard   GuardBase;
-
     public:
         explicit ImageModelMethodGuard( OClickableImageBaseModel& _rModel )
-            :GuardBase( _rModel.getMutex( 
OClickableImageBaseModel::GuardAccess() ) )
+            : ::osl::MutexGuard( _rModel.getMutex( 
OClickableImageBaseModel::GuardAccess() ) )
         {
             if ( nullptr == _rModel.getImageProducer( 
OClickableImageBaseModel::GuardAccess() ) )
                 throw css::lang::DisposedException(
diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx
index fee5e2b211ce..5f63433feef3 100644
--- a/sc/inc/chart2uno.hxx
+++ b/sc/inc/chart2uno.hxx
@@ -367,13 +367,13 @@ private:
 
     // internals
     typedef std::unique_ptr<std::vector<sal_uInt32> >  RangeIndexMapPtr;
-    typedef std::unique_ptr<ExternalRefListener>       ExtRefListenerPtr;
 
     sal_Int64                   m_nObjectId;
     ScDocument*                 m_pDocument;
     std::vector<ScTokenRef>     m_aTokens;
     RangeIndexMapPtr            m_pRangeIndices;
-    ExtRefListenerPtr           m_pExtRefListener;
+    std::unique_ptr<ExternalRefListener>
+                                m_pExtRefListener;
     SfxItemPropertySet          m_aPropSet;
 
     std::unique_ptr<HiddenRangeListener> m_pHiddenListener;
diff --git a/sc/source/filter/inc/externallinkbuffer.hxx 
b/sc/source/filter/inc/externallinkbuffer.hxx
index 6e2a528698dc..ce036b04b49b 100644
--- a/sc/source/filter/inc/externallinkbuffer.hxx
+++ b/sc/source/filter/inc/externallinkbuffer.hxx
@@ -268,8 +268,6 @@ private:
     ExternalNameRef     createExternalName();
 
 private:
-    typedef RefVector< ExternalName >   ExternalNameVector;
-
     ExternalLinkType    meLinkType;         /// Type of this link object.
     FunctionLibraryType meFuncLibType;      /// Type of the function library, 
if link type is ExternalLinkType::Library.
     OUString            maRelId;            /// Relation identifier for the 
external link fragment.
@@ -278,7 +276,7 @@ private:
     css::uno::Reference< css::sheet::XExternalDocLink >
                         mxDocLink;          /// Interface for an external 
document.
     std::vector< sal_Int32 > maSheetCaches; /// External sheet cache indexes.
-    ExternalNameVector  maExtNames;         /// Defined names in external 
document.
+    RefVector< ExternalName >  maExtNames;         /// Defined names in 
external document.
 };
 
 typedef std::shared_ptr< ExternalLink > ExternalLinkRef;
diff --git a/sc/source/filter/oox/condformatbuffer.cxx 
b/sc/source/filter/oox/condformatbuffer.cxx
index 76369bccbeb0..cca1064223d6 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -1123,7 +1123,6 @@ void CondFormatBuffer::finalizeImport()
 {
     std::unordered_set<size_t> aDoneExtCFs;
     typedef std::unordered_map<ScRangeList, CondFormat*, ScRangeListHasher> 
RangeMap;
-    typedef std::vector<std::unique_ptr<ScFormatEntry>> FormatEntries;
     RangeMap aRangeMap;
     for (auto& rxCondFormat : maCondFormats)
     {
@@ -1141,7 +1140,7 @@ void CondFormatBuffer::finalizeImport()
         if (it != aRangeMap.end())
         {
             CondFormat& rCondFormat = *it->second;
-            const FormatEntries& rEntries = rxExtCondFormat->getEntries();
+            const std::vector<std::unique_ptr<ScFormatEntry>>& rEntries = 
rxExtCondFormat->getEntries();
             const std::vector<sal_Int32>& rPriorities = 
rxExtCondFormat->getPriorities();
             size_t nEntryIdx = 0;
             for (const auto& rxEntry : rEntries)
diff --git a/svx/source/inc/formcontroller.hxx 
b/svx/source/inc/formcontroller.hxx
index 80538a8393d5..065852fe9c3a 100644
--- a/svx/source/inc/formcontroller.hxx
+++ b/svx/source/inc/formcontroller.hxx
@@ -79,7 +79,6 @@ struct FmXTextComponentLess
 
 typedef ::std::map< css::uno::Reference< css::awt::XTextComponent >, OUString, 
FmXTextComponentLess> FmFilterRow;
 typedef ::std::vector< FmFilterRow > FmFilterRows;
-typedef ::std::vector< css::uno::Reference< 
css::form::runtime::XFormController > > FmFormControllers;
 
 namespace vcl { class Window; }
 
@@ -147,7 +146,8 @@ namespace svxform
                                     m_aParameterListeners,
                                     m_aFilterListeners;
 
-        FmFormControllers           m_aChildren;
+        std::vector< css::uno::Reference< css::form::runtime::XFormController 
> >
+                                    m_aChildren;
         FilterComponents            m_aFilterComponents;
         FmFilterRows                m_aFilterRows;
 
diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx 
b/sw/source/core/txtnode/modeltoviewhelper.cxx
index 4675a632a065..b0ba367faa25 100644
--- a/sw/source/core/txtnode/modeltoviewhelper.cxx
+++ b/sw/source/core/txtnode/modeltoviewhelper.cxx
@@ -57,8 +57,6 @@ public:
 
 }
 
-typedef std::set<FieldResult, sortfieldresults> FieldResultSet;
-
 namespace {
 
 struct block
@@ -66,7 +64,7 @@ struct block
     sal_Int32 m_nStart;
     sal_Int32 m_nLen;
     bool m_bVisible;
-    FieldResultSet m_aAttrs;
+    std::set<FieldResult, sortfieldresults> m_aAttrs;
     block(sal_Int32 nStart, sal_Int32 nLen, bool bVisible)
         : m_nStart(nStart), m_nLen(nLen), m_bVisible(bVisible)
     {
diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index 20113a949d18..65cdc272d118 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -279,14 +279,13 @@ public:
 
 }
 
-// Row of a HTML table
-typedef std::vector<HTMLTableCell> HTMLTableCells;
 
 namespace {
 
+// Row of a HTML table
 class HTMLTableRow
 {
-    HTMLTableCells m_aCells;                ///< cells of the row
+    std::vector<HTMLTableCell> m_aCells;                ///< cells of the row
     std::unique_ptr<SvxBrushItem> xBGBrush; // background of cell from STYLE
 
     SvxAdjust eAdjust;
@@ -378,10 +377,6 @@ public:
 }
 
 // HTML table
-typedef std::vector<HTMLTableRow> HTMLTableRows;
-
-typedef std::vector<HTMLTableColumn> HTMLTableColumns;
-
 typedef std::vector<SdrObject *> SdrObjects;
 
 class HTMLTable
@@ -394,8 +389,8 @@ class HTMLTable
     std::unique_ptr<SdrObjects> m_pResizeDrawObjects;// SDR objects
     std::unique_ptr<std::vector<sal_uInt16>> m_pDrawObjectPercentWidths;   // 
column of draw object and its rel. width
 
-    HTMLTableRows m_aRows;         ///< table rows
-    HTMLTableColumns m_aColumns;   ///< table columns
+    std::vector<HTMLTableRow> m_aRows;         ///< table rows
+    std::vector<HTMLTableColumn> m_aColumns;   ///< table columns
 
     sal_uInt16 m_nRows;                   // number of rows
     sal_uInt16 m_nCols;                   // number of columns
diff --git a/vcl/inc/impfontcache.hxx b/vcl/inc/impfontcache.hxx
index 78dfb4a71ad9..07e04a0cc848 100644
--- a/vcl/inc/impfontcache.hxx
+++ b/vcl/inc/impfontcache.hxx
@@ -61,7 +61,6 @@ struct GlyphBoundRectCacheHash
 
 typedef o3tl::lru_map<GlyphBoundRectCacheKey, tools::Rectangle,
                       GlyphBoundRectCacheHash> GlyphBoundRectCache;
-typedef GlyphBoundRectCache::key_value_pair_t GlyphBoundRectCachePair;
 
 class ImplFontCache
 {
@@ -70,7 +69,6 @@ private:
     struct IFSD_Equal { bool operator()( const FontSelectPattern&, const 
FontSelectPattern& ) const; };
     struct IFSD_Hash { size_t operator()( const FontSelectPattern& ) const; };
     typedef o3tl::lru_map<FontSelectPattern, 
rtl::Reference<LogicalFontInstance>, IFSD_Hash, IFSD_Equal> FontInstanceList;
-    typedef FontInstanceList::key_value_pair_t FontInstanceListPair;
 
     LogicalFontInstance* mpLastHitCacheEntry; ///< keeps the last hit cache 
entry
     FontInstanceList maFontInstanceList;
diff --git a/vcl/source/font/fontcache.cxx b/vcl/source/font/fontcache.cxx
index a37154d27328..4ed38bc70153 100644
--- a/vcl/source/font/fontcache.cxx
+++ b/vcl/source/font/fontcache.cxx
@@ -176,14 +176,14 @@ rtl::Reference<LogicalFontInstance> 
ImplFontCache::GetFontInstance( PhysicalFont
             struct limit_exception : public std::exception {};
             try
             {
-                maFontInstanceList.remove_if([this] (FontInstanceListPair 
const& rFontPair)
+                maFontInstanceList.remove_if([this] 
(FontInstanceList::key_value_pair_t const& rFontPair)
                     {
                         if (maFontInstanceList.size() < FONTCACHE_MAX)
                             throw limit_exception();
                         LogicalFontInstance* pFontEntry = 
rFontPair.second.get();
                         if (pFontEntry->m_nCount > 1)
                             return false;
-                        m_aBoundRectCache.remove_if([&pFontEntry] 
(GlyphBoundRectCachePair const& rGlyphPair)
+                        m_aBoundRectCache.remove_if([&pFontEntry] 
(GlyphBoundRectCache::key_value_pair_t const& rGlyphPair)
                             { return rGlyphPair.first.m_pFont == pFontEntry; 
});
                         if (mpLastHitCacheEntry == pFontEntry)
                             mpLastHitCacheEntry = nullptr;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to