[Libreoffice-commits] core.git: 2 commits - canvas/source compilerplugins/clang cui/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Nov 24 06:06:31 UTC 2018


 canvas/source/cairo/cairo_canvashelper.hxx                  |    5 ---
 compilerplugins/clang/unusedenumconstants.untouched.results |   16 ------------
 cui/source/dialogs/hldoctp.cxx                              |    8 +++---
 cui/source/inc/hldoctp.hxx                                  |    4 ---
 4 files changed, 5 insertions(+), 28 deletions(-)

New commits:
commit c756f32851e8a0b7eb9c0fee9991f154c758a95c
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Nov 22 11:15:04 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Nov 24 07:06:20 2018 +0100

    drop unused ColorType in canvas
    
    Change-Id: I319cc18db1b068bdfe1e7a9b6fbabb74ab7be04b
    Reviewed-on: https://gerrit.libreoffice.org/63908
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/canvas/source/cairo/cairo_canvashelper.hxx b/canvas/source/cairo/cairo_canvashelper.hxx
index 3e14b672df40..0ee7b1011552 100644
--- a/canvas/source/cairo/cairo_canvashelper.hxx
+++ b/canvas/source/cairo/cairo_canvashelper.hxx
@@ -211,11 +211,6 @@ namespace cairocanvas
 
         css::rendering::IntegerBitmapLayout getMemoryLayout();
 
-        enum ColorType
-        {
-            LINE_COLOR, FILL_COLOR, TEXT_COLOR, IGNORE_COLOR
-        };
-
         void doPolyPolygonPath( const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
                                 Operation aOperation,
                                 bool bNoLineJoin = false,
diff --git a/compilerplugins/clang/unusedenumconstants.untouched.results b/compilerplugins/clang/unusedenumconstants.untouched.results
index cfec89df35b9..2910a535304b 100644
--- a/compilerplugins/clang/unusedenumconstants.untouched.results
+++ b/compilerplugins/clang/unusedenumconstants.untouched.results
@@ -1,11 +1,3 @@
-canvas/source/cairo/cairo_canvashelper.hxx:216
-    enum cairocanvas::CanvasHelper::ColorType IGNORE_COLOR
-canvas/source/cairo/cairo_canvashelper.hxx:216
-    enum cairocanvas::CanvasHelper::ColorType TEXT_COLOR
-canvas/source/cairo/cairo_canvashelper.hxx:216
-    enum cairocanvas::CanvasHelper::ColorType LINE_COLOR
-canvas/source/cairo/cairo_canvashelper.hxx:216
-    enum cairocanvas::CanvasHelper::ColorType FILL_COLOR
 drawinglayer/source/tools/emfpbrush.hxx:32
     enum emfplushelper::EmfPlusHatchStyle HatchStyleVertical
 drawinglayer/source/tools/emfpbrush.hxx:33
commit 0e585562d7ae706c52c6d872690904012e79b3b6
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Nov 22 11:14:16 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Nov 24 07:06:11 2018 +0100

    convert EPathType to scoped enum
    
    and drop unused values
    
    Change-Id: I0ba498d66702fb4bb4ff23fb4c42783fc1c83f75
    Reviewed-on: https://gerrit.libreoffice.org/63907
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/unusedenumconstants.untouched.results b/compilerplugins/clang/unusedenumconstants.untouched.results
index 2639cbe180bb..cfec89df35b9 100644
--- a/compilerplugins/clang/unusedenumconstants.untouched.results
+++ b/compilerplugins/clang/unusedenumconstants.untouched.results
@@ -6,14 +6,6 @@ canvas/source/cairo/cairo_canvashelper.hxx:216
     enum cairocanvas::CanvasHelper::ColorType LINE_COLOR
 canvas/source/cairo/cairo_canvashelper.hxx:216
     enum cairocanvas::CanvasHelper::ColorType FILL_COLOR
-cui/source/inc/hldoctp.hxx:54
-    enum SvxHyperlinkDocTp::EPathType Type_Unknown
-cui/source/inc/hldoctp.hxx:55
-    enum SvxHyperlinkDocTp::EPathType Type_File
-cui/source/inc/hldoctp.hxx:56
-    enum SvxHyperlinkDocTp::EPathType Type_ExistsDir
-cui/source/inc/hldoctp.hxx:56
-    enum SvxHyperlinkDocTp::EPathType Type_Dir
 drawinglayer/source/tools/emfpbrush.hxx:32
     enum emfplushelper::EmfPlusHatchStyle HatchStyleVertical
 drawinglayer/source/tools/emfpbrush.hxx:33
diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx
index e0dc67de6695..9c3033b693c7 100644
--- a/cui/source/dialogs/hldoctp.cxx
+++ b/cui/source/dialogs/hldoctp.cxx
@@ -233,7 +233,7 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, ClickFileopenHdl_Impl, Button*, void)
 
 IMPL_LINK_NOARG(SvxHyperlinkDocTp, ClickTargetHdl_Impl, Button*, void)
 {
-    if ( GetPathType ( maStrURL ) == Type_ExistsFile  ||
+    if ( GetPathType ( maStrURL ) == EPathType::ExistsFile  ||
          maStrURL.isEmpty() ||
          maStrURL.equalsIgnoreAsciiCase( sFileScheme ) ||
          maStrURL.startsWith( sHash ) )
@@ -279,7 +279,7 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, ModifiedPathHdl_Impl, Edit&, void)
 
 IMPL_LINK_NOARG(SvxHyperlinkDocTp, TimeoutHdl_Impl, Timer *, void)
 {
-    if ( IsMarkWndVisible() && ( GetPathType( maStrURL )==Type_ExistsFile ||
+    if ( IsMarkWndVisible() && ( GetPathType( maStrURL )== EPathType::ExistsFile ||
                                   maStrURL.isEmpty() ||
                                   maStrURL.equalsIgnoreAsciiCase( sFileScheme ) ) )
     {
@@ -347,9 +347,9 @@ SvxHyperlinkDocTp::EPathType SvxHyperlinkDocTp::GetPathType ( const OUString& rS
     INetURLObject aURL( rStrPath, INetProtocol::File );
 
     if( aURL.HasError() )
-        return Type_Invalid;
+        return EPathType::Invalid;
     else
-        return Type_ExistsFile;
+        return EPathType::ExistsFile;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/hldoctp.hxx b/cui/source/inc/hldoctp.hxx
index b8a8b8dfb30d..4bda2b78a5ad 100644
--- a/cui/source/inc/hldoctp.hxx
+++ b/cui/source/inc/hldoctp.hxx
@@ -51,9 +51,7 @@ private:
 
     DECL_LINK( TimeoutHdl_Impl, Timer *, void ); ///< Handler for timer -timeout
 
-    enum EPathType { Type_Unknown, Type_Invalid,
-                     Type_ExistsFile, Type_File,
-                     Type_ExistsDir, Type_Dir };
+    enum class EPathType { Invalid, ExistsFile };
     static EPathType GetPathType ( const OUString& rStrPath );
 
     void FillDlgFields(const OUString& rStrURL) override;


More information about the Libreoffice-commits mailing list