[Libreoffice-commits] core.git: sw/inc sw/source writerfilter/inc writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Fri May 26 07:07:51 UTC 2017


 sw/inc/textboxhelper.hxx                             |    4 ++--
 sw/source/filter/ww8/rtfexport.hxx                   |    2 +-
 sw/source/filter/ww8/rtfstringbuffer.hxx             |    2 +-
 writerfilter/inc/dmapper/GraphicZOrderHelper.hxx     |    2 +-
 writerfilter/inc/rtftok/RTFDocument.hxx              |    2 +-
 writerfilter/source/dmapper/TablePositionHandler.hxx |    2 +-
 writerfilter/source/rtftok/rtfcharsets.hxx           |    4 ++--
 writerfilter/source/rtftok/rtfdocumentimpl.hxx       |    7 +++----
 writerfilter/source/rtftok/rtfreferencetable.hxx     |    4 ++--
 writerfilter/source/rtftok/rtfsprm.hxx               |   10 +++++-----
 writerfilter/source/rtftok/rtfvalue.hxx              |    2 +-
 11 files changed, 20 insertions(+), 21 deletions(-)

New commits:
commit e1b247625419515a8aeaf9e1f232f16cb4f59f73
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu May 25 21:28:48 2017 +0200

    RTF filter: use 'using' instead of 'typedef'
    
    Change-Id: Ie7182fa30155a8090421cf9a669525be99f0e0a7
    Reviewed-on: https://gerrit.libreoffice.org/38042
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx
index c2756af9a8d2..db49d276740e 100644
--- a/sw/inc/textboxhelper.hxx
+++ b/sw/inc/textboxhelper.hxx
@@ -45,9 +45,9 @@ class SW_DLLPUBLIC SwTextBoxHelper
 {
 public:
     /// Maps a draw format to a fly format.
-    typedef std::map<const SwFrameFormat*, const SwFrameFormat*> SavedLink;
+    using SavedLink = std::map<const SwFrameFormat*, const SwFrameFormat*>;
     /// Maps a draw format to content.
-    typedef std::map<const SwFrameFormat*, SwFormatContent> SavedContent;
+    using SavedContent = std::map<const SwFrameFormat*, SwFormatContent>;
     /// Create a TextBox for a shape.
     static void create(SwFrameFormat* pShape);
     /// Destroy a TextBox for a shape.
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index 72a0a5bc45f4..106d615d3ae2 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -26,7 +26,7 @@
 class RtfAttributeOutput;
 class RtfExportFilter;
 class RtfSdrExport;
-typedef std::map<sal_uInt16,Color> RtfColorTable;
+using RtfColorTable = std::map<sal_uInt16, Color>;
 class SwNode;
 class SwTextNode;
 class SwGrfNode;
diff --git a/sw/source/filter/ww8/rtfstringbuffer.hxx b/sw/source/filter/ww8/rtfstringbuffer.hxx
index dd9300657f5f..c1d90041e33b 100644
--- a/sw/source/filter/ww8/rtfstringbuffer.hxx
+++ b/sw/source/filter/ww8/rtfstringbuffer.hxx
@@ -56,7 +56,7 @@ public:
     /// Append all contained buffers and clear the argument.
     void appendAndClear(RtfStringBuffer& rBuf);
 private:
-    typedef std::vector<RtfStringBufferValue> Values_t;
+    using Values_t = std::vector<RtfStringBufferValue>;
     Values_t m_aValues;
 };
 
diff --git a/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx b/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx
index 60c6b493fe85..d73f7cc532b1 100644
--- a/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx
+++ b/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx
@@ -22,7 +22,7 @@ public:
     void addItem(css::uno::Reference<css::beans::XPropertySet> const& props, sal_Int32 relativeHeight);
     sal_Int32 findZOrder(sal_Int32 relativeHeight, bool bOldStyle = false);
 private:
-    typedef std::map< sal_Int32, css::uno::Reference<css::beans::XPropertySet> > Items;
+    using Items = std::map< sal_Int32, css::uno::Reference<css::beans::XPropertySet> >;
     Items items;
 };
 
diff --git a/writerfilter/inc/rtftok/RTFDocument.hxx b/writerfilter/inc/rtftok/RTFDocument.hxx
index c3f65b7d5be4..086b39a8ce5a 100644
--- a/writerfilter/inc/rtftok/RTFDocument.hxx
+++ b/writerfilter/inc/rtftok/RTFDocument.hxx
@@ -27,7 +27,7 @@ class RTFDocument
 {
 public:
     /// Pointer to this stream.
-    typedef std::shared_ptr<RTFDocument> Pointer_t;
+    using Pointer_t = std::shared_ptr<RTFDocument>;
 
     virtual ~RTFDocument() { }
 
diff --git a/writerfilter/source/dmapper/TablePositionHandler.hxx b/writerfilter/source/dmapper/TablePositionHandler.hxx
index 1e0d096f02c6..3e95ce2e72d7 100644
--- a/writerfilter/source/dmapper/TablePositionHandler.hxx
+++ b/writerfilter/source/dmapper/TablePositionHandler.hxx
@@ -94,7 +94,7 @@ public:
     bool operator== (const TablePositionHandler& rHandler) const;
 };
 
-typedef std::shared_ptr<TablePositionHandler> TablePositionHandlerPtr;
+using TablePositionHandlerPtr = std::shared_ptr<TablePositionHandler>;
 } // namespace dmapper
 } // namespace writerfilter
 
diff --git a/writerfilter/source/rtftok/rtfcharsets.hxx b/writerfilter/source/rtftok/rtfcharsets.hxx
index 99e9d86e685c..bf993f4e204c 100644
--- a/writerfilter/source/rtftok/rtfcharsets.hxx
+++ b/writerfilter/source/rtftok/rtfcharsets.hxx
@@ -15,11 +15,11 @@ namespace writerfilter
 namespace rtftok
 {
 /// RTF legacy charsets
-typedef struct
+struct RTFEncoding
 {
     int charset;
     int codepage;
-} RTFEncoding;
+};
 extern RTFEncoding aRTFEncodings[];
 extern int nRTFEncodings;
 } // namespace rtftok
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 34ba2750a685..a35ea5850f10 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -96,9 +96,8 @@ enum class RTFFieldStatus
 };
 
 /// A buffer storing dmapper calls.
-typedef std::tuple<RTFBufferTypes, RTFValue::Pointer_t,
-        std::shared_ptr<TableRowBuffer> > Buf_t;
-typedef std::deque< Buf_t > RTFBuffer_t;
+using Buf_t = std::tuple< RTFBufferTypes, RTFValue::Pointer_t, std::shared_ptr<TableRowBuffer> >;
+using RTFBuffer_t = std::deque<Buf_t>;
 
 /// holds one nested table row
 struct TableRowBuffer
@@ -377,7 +376,7 @@ class RTFDocumentImpl
     : public RTFDocument, public RTFListener
 {
 public:
-    typedef ::std::shared_ptr<RTFDocumentImpl> Pointer_t;
+    using Pointer_t = std::shared_ptr<RTFDocumentImpl>;
     RTFDocumentImpl(css::uno::Reference<css::uno::XComponentContext> const& xContext,
                     css::uno::Reference<css::io::XInputStream> const& xInputStream,
                     css::uno::Reference<css::lang::XComponent> const& xDstDoc,
diff --git a/writerfilter/source/rtftok/rtfreferencetable.hxx b/writerfilter/source/rtftok/rtfreferencetable.hxx
index 64706e25b20d..5c2788e3231b 100644
--- a/writerfilter/source/rtftok/rtfreferencetable.hxx
+++ b/writerfilter/source/rtftok/rtfreferencetable.hxx
@@ -22,8 +22,8 @@ class RTFReferenceTable
     : public writerfilter::Reference<Table>
 {
 public:
-    typedef std::map<int, writerfilter::Reference<Properties>::Pointer_t> Entries_t;
-    typedef std::pair<int, writerfilter::Reference<Properties>::Pointer_t> Entry_t;
+    using Entries_t = std::map<int, writerfilter::Reference<Properties>::Pointer_t>;
+    using Entry_t = std::pair<int, writerfilter::Reference<Properties>::Pointer_t>;
     explicit RTFReferenceTable(Entries_t aEntries);
     virtual ~RTFReferenceTable();
     virtual void resolve(Table& rHandler) override;
diff --git a/writerfilter/source/rtftok/rtfsprm.hxx b/writerfilter/source/rtftok/rtfsprm.hxx
index 9a2a52e3319d..5e4f4bd07b62 100644
--- a/writerfilter/source/rtftok/rtfsprm.hxx
+++ b/writerfilter/source/rtftok/rtfsprm.hxx
@@ -22,7 +22,7 @@ namespace writerfilter
 namespace rtftok
 {
 
-typedef std::vector< std::pair<Id, RTFValue::Pointer_t> > RTFSprmsImplBase;
+using RTFSprmsImplBase = std::vector< std::pair<Id, RTFValue::Pointer_t> >;
 
 /// The payload of RTFSprms which is only copied on write.
 class RTFSprmsImpl : public RTFSprmsImplBase
@@ -53,10 +53,10 @@ enum class RTFOverwrite
 class RTFSprms
 {
 public:
-    typedef ::std::shared_ptr<RTFSprms> Pointer_t;
-    typedef std::pair<Id, RTFValue::Pointer_t> Entry_t;
-    typedef std::vector<Entry_t>::iterator Iterator_t;
-    typedef std::vector<Entry_t>::reverse_iterator ReverseIterator_t;
+    using Pointer_t = std::shared_ptr<RTFSprms>;
+    using Entry_t = std::pair<Id, RTFValue::Pointer_t>;
+    using Iterator_t = std::vector<Entry_t>::iterator;
+    using ReverseIterator_t = std::vector<Entry_t>::reverse_iterator;
     RTFSprms();
     RTFSprms(const RTFSprms& rSprms);
     ~RTFSprms();
diff --git a/writerfilter/source/rtftok/rtfvalue.hxx b/writerfilter/source/rtftok/rtfvalue.hxx
index 202c30a30e7e..48273b8514c5 100644
--- a/writerfilter/source/rtftok/rtfvalue.hxx
+++ b/writerfilter/source/rtftok/rtfvalue.hxx
@@ -26,7 +26,7 @@ class RTFValue
     : public Value
 {
 public:
-    typedef std::shared_ptr<RTFValue> Pointer_t;
+    using Pointer_t = std::shared_ptr<RTFValue>;
     RTFValue(int nValue, OUString sValue, RTFSprms rAttributes, RTFSprms rSprms,
              css::uno::Reference<css::drawing::XShape> xShape,
              css::uno::Reference<css::io::XInputStream> xStream,


More information about the Libreoffice-commits mailing list