[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Nov 22 06:35:30 UTC 2018
compilerplugins/clang/unusedenumconstants.untouched.results | 2 --
vcl/inc/regband.hxx | 2 +-
vcl/source/gdi/region.cxx | 2 +-
vcl/source/gdi/regionband.cxx | 2 +-
4 files changed, 3 insertions(+), 5 deletions(-)
New commits:
commit 58bc1cba20c48f518eded86f10a73ebf42ce8bd4
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Nov 21 13:51:32 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Nov 22 07:34:59 2018 +0100
convert LineType to scoped enum
and remove unused LINE_HORIZONTAL
Change-Id: I39ee05b444b4da46758ff30176e041a02bee54e8
Reviewed-on: https://gerrit.libreoffice.org/63740
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 df0a83601656..1c4ba9a3aa9e 100644
--- a/compilerplugins/clang/unusedenumconstants.untouched.results
+++ b/compilerplugins/clang/unusedenumconstants.untouched.results
@@ -538,8 +538,6 @@ ucb/source/ucp/webdav-neon/DAVTypes.hxx:195
enum webdav_ucp::Depth DAVINFINITY
ucbhelper/source/client/proxydecider.cxx:119
enum ucbhelper::proxydecider_impl::InternetProxyDecider_Impl::ProxyType Manual
-vcl/inc/regband.hxx:45
- enum LineType LINE_HORIZONTAL
vcl/inc/salptype.hxx:44
enum SalPrinterError General
vcl/inc/unx/saldisp.hxx:65
diff --git a/vcl/inc/regband.hxx b/vcl/inc/regband.hxx
index e81b1e127fc9..c7b9e611947b 100644
--- a/vcl/inc/regband.hxx
+++ b/vcl/inc/regband.hxx
@@ -42,7 +42,7 @@ struct ImplRegionBandSep
bool mbRemoved;
};
-enum LineType { LINE_ASCENDING, LINE_DESCENDING, LINE_HORIZONTAL };
+enum class LineType { Ascending, Descending };
// element for the list with x-separations
struct ImplRegionBandPoint
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index ce2d60ba7d66..b363cd019b40 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -128,7 +128,7 @@ namespace
// in other places (but seems to be the wrong way.)
const long nTop (::std::min(aStart.Y(), aEnd.Y()));
const long nBottom (::std::max(aStart.Y(), aEnd.Y()));
- const LineType eLineType (aStart.Y() > aEnd.Y() ? LINE_DESCENDING : LINE_ASCENDING);
+ const LineType eLineType (aStart.Y() > aEnd.Y() ? LineType::Descending : LineType::Ascending);
// Make sure that the current line is covered by bands.
pRegionBand->ImplAddMissingBands(nTop,nBottom);
diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx
index 549979862e01..0b7f13b4323c 100644
--- a/vcl/source/gdi/regionband.cxx
+++ b/vcl/source/gdi/regionband.cxx
@@ -445,7 +445,7 @@ void RegionBand::InsertLine(const Point& rStartPt, const Point& rEndPt, long nLi
return;
}
- LineType eLineType = (rStartPt.Y() > rEndPt.Y()) ? LINE_DESCENDING : LINE_ASCENDING;
+ LineType eLineType = (rStartPt.Y() > rEndPt.Y()) ? LineType::Descending : LineType::Ascending;
if ( rStartPt.X() == rEndPt.X() )
{
// vertical line
More information about the Libreoffice-commits
mailing list