summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-16 10:11:04 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-18 10:03:44 +0000
commit2c8fe2e737b84ecd3dbac36a4fe6bd061bbd3bae (patch)
tree66ba7ff0b95cf5ceeda5e53294a71c6786460eb3 /chart2
parent4e59eecc077d27dd9762e7c890b2aaf92a212959 (diff)
update unusedmethods plugin to deal with constructors
and fix the operator< implementations in some of the other plugins too. Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035 Reviewed-on: https://gerrit.libreoffice.org/25057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/Library_chartcore.mk1
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx1
-rw-r--r--chart2/source/inc/LifeTime.hxx5
-rw-r--r--chart2/source/inc/ModifyListenerCallBack.hxx57
-rw-r--r--chart2/source/tools/ModifyListenerCallBack.cxx105
-rw-r--r--chart2/source/view/axes/VAxisProperties.hxx2
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx8
-rw-r--r--chart2/source/view/inc/VSeriesPlotter.hxx2
8 files changed, 2 insertions, 179 deletions
diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk
index 99d3c3328776..7040ade3298b 100644
--- a/chart2/Library_chartcore.mk
+++ b/chart2/Library_chartcore.mk
@@ -215,7 +215,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
chart2/source/tools/LogarithmicRegressionCurveCalculator \
chart2/source/tools/MeanValueRegressionCurveCalculator \
chart2/source/tools/MediaDescriptorHelper \
- chart2/source/tools/ModifyListenerCallBack \
chart2/source/tools/ModifyListenerHelper \
chart2/source/tools/MovingAverageRegressionCurveCalculator \
chart2/source/tools/MutexContainer \
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
index 900a1f6306d6..7d8834aac1df 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
@@ -19,7 +19,6 @@
#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_3D_SCENEILLUMINATION_HXX
#define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_3D_SCENEILLUMINATION_HXX
-#include "ModifyListenerCallBack.hxx"
#include "TimerTriggeredControllerLock.hxx"
#include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx
index 6552d2abbc86..e1e3ac6cdfdc 100644
--- a/chart2/source/inc/LifeTime.hxx
+++ b/chart2/source/inc/LifeTime.hxx
@@ -211,11 +211,6 @@ protected:
T * m_pT;
public:
- NegativeGuard(T * pT) : m_pT(pT)
- {
- m_pT->release();
- }
-
NegativeGuard(T & t) : m_pT(&t)
{
m_pT->release();
diff --git a/chart2/source/inc/ModifyListenerCallBack.hxx b/chart2/source/inc/ModifyListenerCallBack.hxx
deleted file mode 100644
index 99c075a68289..000000000000
--- a/chart2/source/inc/ModifyListenerCallBack.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_CHART2_SOURCE_INC_MODIFYLISTENERCALLBACK_HXX
-#define INCLUDED_CHART2_SOURCE_INC_MODIFYLISTENERCALLBACK_HXX
-
-#include <tools/link.hxx>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
-#include <com/sun/star/util/XModifyListener.hpp>
-#include "charttoolsdllapi.hxx"
-
-namespace chart {
-
-/** Use this class as a member if you want to listen on a XModifyBroadcaster
-without becoming a XModifyListener yourself
- */
-
-class ModifyListenerCallBack_impl;
-
-class OOO_DLLPUBLIC_CHARTTOOLS ModifyListenerCallBack
-{
-public:
- explicit ModifyListenerCallBack( const Link<void*,void>& rCallBack );
-
- virtual ~ModifyListenerCallBack();
-
- SAL_DLLPRIVATE void stopListening();
-
-private: //methods
- ModifyListenerCallBack( const ModifyListenerCallBack& ) = delete;
-
-private: //member
- ModifyListenerCallBack_impl* pModifyListener_impl;
- css::uno::Reference< css::util::XModifyListener > m_xModifyListener;
-};
-
-} // namespace chart
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/tools/ModifyListenerCallBack.cxx b/chart2/source/tools/ModifyListenerCallBack.cxx
deleted file mode 100644
index 0ac16b840aca..000000000000
--- a/chart2/source/tools/ModifyListenerCallBack.cxx
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "ModifyListenerCallBack.hxx"
-#include "MutexContainer.hxx"
-#include <cppuhelper/compbase.hxx>
-
-using namespace ::com::sun::star;
-using ::com::sun::star::uno::Reference;
-
-namespace chart {
-
-typedef ::cppu::WeakComponentImplHelper< css::util::XModifyListener >
- ModifyListenerCallBack_Base;
-
-class ModifyListenerCallBack_impl
- : public ::chart::MutexContainer
- , public ModifyListenerCallBack_Base
-{
-public:
- explicit ModifyListenerCallBack_impl( const Link<void*,void>& rCallBack );
- virtual ~ModifyListenerCallBack_impl();
-
- void stopListening();
-
- //XModifyListener
- virtual void SAL_CALL modified( const lang::EventObject& aEvent ) throw (uno::RuntimeException, std::exception) override;
-
- //XEventListener
- virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw (uno::RuntimeException, std::exception) override;
-
- using ::cppu::WeakComponentImplHelperBase::disposing;
-
-private:
- Link<void*,void> m_aLink;//will be called on modify
- Reference< util::XModifyBroadcaster > m_xBroadcaster;//broadcaster to listen at
-};
-
-ModifyListenerCallBack_impl::ModifyListenerCallBack_impl( const Link<void*,void>& rCallBack )
- : ModifyListenerCallBack_Base( m_aMutex )
- , m_aLink( rCallBack )
- , m_xBroadcaster(nullptr)
-{
-}
-
-ModifyListenerCallBack_impl::~ModifyListenerCallBack_impl()
-{
-}
-
-//XModifyListener
-void SAL_CALL ModifyListenerCallBack_impl::modified( const lang::EventObject& /*aEvent*/ ) throw (uno::RuntimeException, std::exception)
-{
- m_aLink.Call(nullptr);
-}
-
-//XEventListener
-void SAL_CALL ModifyListenerCallBack_impl::disposing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException, std::exception)
-{
- m_xBroadcaster.clear();
-}
-
-void ModifyListenerCallBack_impl::stopListening()
-{
- if( m_xBroadcaster.is() )
- {
- m_xBroadcaster->removeModifyListener( this );
- m_xBroadcaster.clear();
- }
-}
-
-ModifyListenerCallBack::ModifyListenerCallBack( const Link<void*,void>& rCallBack )
- : pModifyListener_impl( new ModifyListenerCallBack_impl(rCallBack) )
- , m_xModifyListener( pModifyListener_impl )
-{
-}
-
-ModifyListenerCallBack::~ModifyListenerCallBack()
-{
- stopListening();
-}
-
-void ModifyListenerCallBack::stopListening()
-{
- pModifyListener_impl->stopListening();
-}
-
-} // namespace chart
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/axes/VAxisProperties.hxx b/chart2/source/view/axes/VAxisProperties.hxx
index 53d78c4c6a60..e6ecc72061a9 100644
--- a/chart2/source/view/axes/VAxisProperties.hxx
+++ b/chart2/source/view/axes/VAxisProperties.hxx
@@ -155,7 +155,7 @@ struct AxisProperties final
TickmarkProperties makeTickmarkPropertiesForComplexCategories( sal_Int32 nTickLength, sal_Int32 nTickStartDistanceToAxis, sal_Int32 nTextLevel ) const;
private:
- AxisProperties();
+ AxisProperties() = delete;
TickmarkProperties makeTickmarkProperties( sal_Int32 nDepth ) const;
//@todo get this from somewhere; maybe for each subincrement
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 8af02b0c1762..62966d3e790f 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -102,14 +102,6 @@ VDataSeriesGroup::CachedYValues::CachedYValues()
{
}
-VDataSeriesGroup::VDataSeriesGroup()
- : m_aSeriesVector()
- , m_bMaxPointCountDirty(true)
- , m_nMaxPointCount(0)
- , m_aListOfCachedYValues()
-{
-}
-
VDataSeriesGroup::VDataSeriesGroup( VDataSeries* pSeries )
: m_aSeriesVector(1,pSeries)
, m_bMaxPointCountDirty(true)
diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx
index 2eeeb1af14ae..fb4ffbb8c6af 100644
--- a/chart2/source/view/inc/VSeriesPlotter.hxx
+++ b/chart2/source/view/inc/VSeriesPlotter.hxx
@@ -76,7 +76,7 @@ private:
class VDataSeriesGroup final
{
public:
- VDataSeriesGroup();
+ VDataSeriesGroup() = delete;
VDataSeriesGroup( VDataSeries* pSeries );
~VDataSeriesGroup();