[Libreoffice-commits] core.git: chart2/source include/vcl sc/source sfx2/source writerfilter/source xmloff/source

Noel Grandin noel at peralex.com
Mon Mar 14 11:06:57 UTC 2016


 chart2/source/model/main/Axis.cxx               |    3 +--
 include/vcl/devicecoordinate.hxx                |    2 --
 include/vcl/metric.hxx                          |    3 +--
 sc/source/ui/vba/vbaformatconditions.cxx        |    4 +---
 sfx2/source/control/shell.cxx                   |   10 ++++------
 writerfilter/source/dmapper/GraphicHelpers.hxx  |    1 -
 writerfilter/source/dmapper/OLEHandler.cxx      |    2 +-
 writerfilter/source/dmapper/StyleSheetTable.hxx |    2 --
 xmloff/source/style/prstylei.cxx                |    4 +---
 9 files changed, 9 insertions(+), 22 deletions(-)

New commits:
commit f7965b0bcd559451c471a26bf5fd6f542887d95e
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Mar 14 08:41:57 2016 +0200

    remove some unused typedefs, and inline some use-once
    
    Change-Id: I5ada1cff98c0a3e065d126444f8052f444323743
    Reviewed-on: https://gerrit.libreoffice.org/23234
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index 10334a6..7fb1ce3 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -309,10 +309,9 @@ struct StaticAxisInfo : public rtl::StaticAggregate< uno::Reference< beans::XPro
 };
 
 typedef uno::Reference< beans::XPropertySet > lcl_tSubGridType;
-typedef uno::Sequence< lcl_tSubGridType >     lcl_tSubGridSeq;
 
 void lcl_CloneSubGrids(
-    const lcl_tSubGridSeq & rSource, lcl_tSubGridSeq & rDestination )
+    const uno::Sequence< lcl_tSubGridType > & rSource, uno::Sequence< lcl_tSubGridType > & rDestination )
 {
     const lcl_tSubGridType * pBegin = rSource.getConstArray();
     const lcl_tSubGridType * pEnd = pBegin + rSource.getLength();
diff --git a/include/vcl/devicecoordinate.hxx b/include/vcl/devicecoordinate.hxx
index b098abb..14e43b2 100644
--- a/include/vcl/devicecoordinate.hxx
+++ b/include/vcl/devicecoordinate.hxx
@@ -15,13 +15,11 @@
 #if VCL_FLOAT_DEVICE_PIXEL
 #include <basegfx/point/b2dpoint.hxx>
 typedef double DeviceCoordinate;
-typedef basegfx::B2DPoint DevicePoint;
 
 #else /* !VCL_FLOAT_DEVICE_PIXEL */
 
 #include <basegfx/point/b2ipoint.hxx>
 typedef long DeviceCoordinate;
-typedef basegfx::B2IPoint DevicePoint;
 
 #endif /* ! Carpet Cushion */
 
diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx
index 3d96775..5e079d1 100644
--- a/include/vcl/metric.hxx
+++ b/include/vcl/metric.hxx
@@ -33,7 +33,6 @@ class CmapResult;
 typedef sal_uInt32 sal_UCS4;
 typedef boost::intrusive_ptr< ImplFontCharMap > ImplFontCharMapPtr;
 typedef boost::intrusive_ptr< FontCharMap > FontCharMapPtr;
-typedef boost::intrusive_ptr< ImplFontMetric > ImplFontMetricPtr;
 
 class VCL_DLLPUBLIC FontMetric : public vcl::Font
 {
@@ -73,7 +72,7 @@ public:
     bool                operator!=( const FontMetric& rMetric ) const
                             { return !operator==( rMetric ); }
 protected:
-    ImplFontMetricPtr   mpImplMetric;    // Implementation
+    boost::intrusive_ptr<ImplFontMetric> mpImplMetric;    // Implementation
 };
 
 template< typename charT, typename traits >
diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx
index 2f6506d..9b0a6d7 100644
--- a/sc/source/ui/vba/vbaformatconditions.cxx
+++ b/sc/source/ui/vba/vbaformatconditions.cxx
@@ -33,8 +33,6 @@
 using namespace ::ooo::vba;
 using namespace ::com::sun::star;
 
-typedef std::vector< beans::PropertyValue > VecPropValues;
-
 static const char OPERATOR[] = "Operator";
 static const char FORMULA1[] = "Formula1";
 static const char FORMULA2[] = "Formula2";
@@ -168,7 +166,7 @@ ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, cons
             sStyleName = xStyle->getName();
         }
 
-        VecPropValues aPropertyValueVector;
+        std::vector< beans::PropertyValue > aPropertyValueVector;
         sheet::ConditionOperator aType = ScVbaFormatCondition::retrieveAPIType(_nType, uno::Reference< sheet::XSheetCondition >() );
         uno::Any aValue;
 
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 5e80b28..007a8bf 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -48,18 +48,16 @@
 #include <vector>
 #include <map>
 
-// Maps the Which() field to a pointer to a SfxPoolItem
-typedef std::map<sal_uInt16, std::unique_ptr<SfxPoolItem>> SfxItemPtrMap;
-
-
 using namespace com::sun::star;
 
 struct SfxShell_Impl: public SfxBroadcaster
 {
     OUString                    aObjectName;   // Name of Sbx-Objects
-    SfxItemPtrMap               m_Items;       // Data exchange on Item level
+    // Maps the Which() field to a pointer to a SfxPoolItem
+    std::map<sal_uInt16, std::unique_ptr<SfxPoolItem>>
+                                m_Items;       // Data exchange on Item level
     SfxViewShell*               pViewSh;       // SfxViewShell if Shell is
-                                            // ViewFrame/ViewShell/SubShell list
+                                               // ViewFrame/ViewShell/SubShell list
     SfxViewFrame*               pFrame;        // Frame, if  <UI-active>
     SfxRepeatTarget*            pRepeatTarget; // SbxObjectRef xParent;
     bool                        bActive;
diff --git a/writerfilter/source/dmapper/GraphicHelpers.hxx b/writerfilter/source/dmapper/GraphicHelpers.hxx
index 95c33b4..cd1778d 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.hxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.hxx
@@ -64,7 +64,6 @@ public:
     virtual void lcl_attribute( Id aName, Value& rVal ) override;
     virtual void lcl_sprm( Sprm& rSprm ) override;
 };
-typedef std::shared_ptr<WrapHandler> WrapHandlerPtr;
 
 } }
 
diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx
index 0fe0955..f7d55c6 100644
--- a/writerfilter/source/dmapper/OLEHandler.cxx
+++ b/writerfilter/source/dmapper/OLEHandler.cxx
@@ -153,7 +153,7 @@ void OLEHandler::lcl_sprm(Sprm & rSprm)
             writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
             if ( pProperties.get( ) )
             {
-                WrapHandlerPtr pHandler( new WrapHandler );
+                std::shared_ptr<WrapHandler> pHandler( new WrapHandler );
                 pProperties->resolve( *pHandler );
 
                 m_nWrapMode = pHandler->getWrapMode( );
diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx
index e26e158..89bb128 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.hxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.hxx
@@ -78,8 +78,6 @@ public:
 };
 
 typedef std::shared_ptr<StyleSheetEntry> StyleSheetEntryPtr;
-typedef std::deque<StyleSheetEntryPtr> StyleSheetEntryDeque;
-typedef std::shared_ptr<StyleSheetEntryDeque> StyleSheetEntryDequePtr;
 
 class DomainMapper;
 class StyleSheetTable :
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index f80f4e0..c5275cb 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -248,8 +248,6 @@ Reference < XStyle > XMLPropStyleContext::Create()
     return xNewStyle;
 }
 
-typedef ::std::set < OUString > PropertyNameSet;
-
 void XMLPropStyleContext::CreateAndInsert( bool bOverwrite )
 {
     SvXMLStylesContext* pSvXMLStylesContext = static_cast< SvXMLStylesContext* >(&mxStyles);
@@ -391,7 +389,7 @@ void XMLPropStyleContext::CreateAndInsert( bool bOverwrite )
                 }
                 else
                 {
-                    PropertyNameSet aNameSet;
+                    std::set < OUString > aNameSet;
                     sal_Int32 nCount = xPrMap->GetEntryCount();
                     sal_Int32 i;
                     for( i = 0; i < nCount; i++ )


More information about the Libreoffice-commits mailing list