[Libreoffice-commits] core.git: compilerplugins/clang include/vcl vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Dec 21 06:27:22 UTC 2018
compilerplugins/clang/unnecessaryvirtual.results | 8 ++++----
include/vcl/combobox.hxx | 4 ++--
vcl/source/control/combobox.cxx | 4 +++-
3 files changed, 9 insertions(+), 7 deletions(-)
New commits:
commit 526387b96e9bc2c04b0dc26744bf6b88ea7c0521
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Dec 20 14:33:02 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Dec 21 07:26:51 2018 +0100
loplugin:unnecessaryvirtual
Change-Id: I4ca101ba838afecbbc8e841a6a9fa6c9c0460f14
Reviewed-on: https://gerrit.libreoffice.org/65497
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/unnecessaryvirtual.results b/compilerplugins/clang/unnecessaryvirtual.results
index 107bd14a2105..6851f491c4bb 100644
--- a/compilerplugins/clang/unnecessaryvirtual.results
+++ b/compilerplugins/clang/unnecessaryvirtual.results
@@ -20,8 +20,6 @@ basic/source/comp/codegen.cxx:524
_Bool BufferTransformer::processParams()
chart2/source/inc/WeakListenerAdapter.hxx:57
void chart::WeakListenerAdapter::disposing(const struct com::sun::star::lang::EventObject &,)
-cppcanvas/source/inc/implrenderer.hxx:69
- void cppcanvas::internal::EMFPObject::~EMFPObject()
extensions/source/dbpilots/unoautopilot.hxx:99
class cppu::IPropertyArrayHelper * dbp::OUnoAutoPilot::createArrayHelper()const
extensions/source/propctrlr/commoncontrol.hxx:127
@@ -112,8 +110,10 @@ include/vbahelper/vbareturntypes.hxx:40
void ooo::vba::DefaultReturnHelper::setValue(type-parameter-0-0,)
include/vbahelper/vbareturntypes.hxx:41
type-parameter-0-0 ooo::vba::DefaultReturnHelper::getValue()
-include/vcl/tabctrl.hxx:113
- _Bool TabControl::DeactivatePage()
+include/vcl/combobox.hxx:86
+ int ComboBox::InsertEntry(const class rtl::OUString &,int,)
+include/vcl/combobox.hxx:90
+ void ComboBox::RemoveEntryAt(int,)
sc/source/core/opencl/formulagroupcl.cxx:1051
_Bool sc::opencl::DynamicKernelSlidingArgument::NeedParallelReduction()const
sc/source/core/opencl/formulagroupcl.cxx:1059
diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx
index 9dc14739f4e1..1571cca6961e 100644
--- a/include/vcl/combobox.hxx
+++ b/include/vcl/combobox.hxx
@@ -83,11 +83,11 @@ public:
virtual void SetText( const OUString& rStr ) override;
virtual void SetText( const OUString& rStr, const Selection& rNewSelection ) override;
- virtual sal_Int32 InsertEntry(const OUString& rStr, sal_Int32 nPos = COMBOBOX_APPEND);
+ sal_Int32 InsertEntry(const OUString& rStr, sal_Int32 nPos = COMBOBOX_APPEND);
sal_Int32 InsertEntryWithImage( const OUString& rStr, const Image& rImage, sal_Int32 nPos = COMBOBOX_APPEND );
void RemoveEntry( const OUString& rStr );
- virtual void RemoveEntryAt(sal_Int32 nPos);
+ void RemoveEntryAt(sal_Int32 nPos);
void Clear();
void EnableSelectAll();
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 3eca5c6f0598..a13ee2e4b2b7 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -921,8 +921,10 @@ void ComboBox::RemoveEntryAt(sal_Int32 const nPos)
{
const sal_Int32 nMRUCount = m_pImpl->m_pImplLB->GetEntryList()->GetMRUCount();
if (nPos < 0 || nPos > COMBOBOX_MAX_ENTRIES - nMRUCount)
+ {
+ assert("bad position");
return;
-
+ }
m_pImpl->m_pImplLB->RemoveEntry( nPos + nMRUCount );
CallEventListeners( VclEventId::ComboboxItemRemoved, reinterpret_cast<void*>(nPos) );
}
More information about the Libreoffice-commits
mailing list