From 1c3de19e9892deabd7ed2f47afbdf86f292eff8f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 16 Feb 2017 10:55:46 +0200 Subject: [PATCH] remove unused NONE from ScrollRangeCheck enum Change-Id: I9d83cc38a9fa477a61ec7e2ec3d9786318187085 --- compilerplugins/clang/unusedenumconstants.py | 7 +++++++ editeng/source/editeng/impedit.cxx | 4 ++-- include/editeng/editview.hxx | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py index 291f3500e561..f04d056df11d 100755 --- a/compilerplugins/clang/unusedenumconstants.py +++ b/compilerplugins/clang/unusedenumconstants.py @@ -133,6 +133,10 @@ for d in definitionSet: "sc/source/ui/docshell/impex.cxx", # SylkVersion "include/rsc/rsc-vcl-shared-types.hxx", # KeyFuncType "include/i18nutil/paper.hxx", # Paper + "cppcanvas/source/mtfrenderer/emfplus.cxx", # EmfPlusCombineMode + "cppcanvas/source/mtfrenderer/emfpbrush.hxx", # EmfPlusHatchStyle + "include/filter/msfilter/svdfppt.hxx", # PptPlaceholder, PptSlideLayout + "include/filter/msfilter/escherex.hxx", # various # Windows or OSX only "include/canvas/rendering/icolorbuffer.hxx", "include/vcl/commandevent.hxx", @@ -162,6 +166,9 @@ for d in definitionSet: "sc/source/ui/inc/scuitphfedit.hxx", # ScHFEntryId (from UI) "include/i18nlangtag/languagetag.hxx", # LanguageTag::ScriptType "extensions/source/scanner/grid.hxx", # ResetType (from UI) + "dbaccess/source/inc/dsntypes.hxx", # dbaccess::DATASOURCE_TYPE (from UI) + "cui/source/tabpages/tparea.cxx", # FillType (from UI) + "include/editeng/svxenum.hxx", # css::style::NumberingType # represents constants from an external API "opencl/inc/opencl_device_selection.h", "vcl/inc/sft.hxx", diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 8df3d066966b..a91649cc9d99 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1096,7 +1096,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck ) long nDiff = pEditEngine->pImpEditEngine->GetTextHeight() - aNewVisArea.Bottom(); // negative aNewVisArea.Move( 0, nDiff ); // could end up in the negative area... } - if ( ( aNewVisArea.Top() < 0 ) && ( nRangeCheck != ScrollRangeCheck::NONE ) ) + if ( aNewVisArea.Top() < 0 ) aNewVisArea.Move( 0, -aNewVisArea.Top() ); // Horizontal: @@ -1115,7 +1115,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck ) long nDiff = pEditEngine->pImpEditEngine->CalcTextWidth( false ) - aNewVisArea.Right(); // negative aNewVisArea.Move( nDiff, 0 ); // could end up in the negative area... } - if ( ( aNewVisArea.Left() < 0 ) && ( nRangeCheck != ScrollRangeCheck::NONE ) ) + if ( aNewVisArea.Left() < 0 ) aNewVisArea.Move( -aNewVisArea.Left(), 0 ); // The difference must be alignt on pixel (due to scroll!) diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index 95b322877ea0..adabc65dbf1b 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -73,7 +73,6 @@ namespace linguistic2 { enum class ScrollRangeCheck { - NONE = 0, // No correction of VisArea when scrolling NoNegative = 1, // No negative VisArea when scrolling PaperWidthTextSize = 2, // VisArea must be within paper width, Text Size };