Kaydet (Commit) 25934dec authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) David Tardon

tdf#94306 replace boost::noncopyable in chart2

Replace with C++11 delete copy-constructur
and copy-assignment.
Delete default-constructors when comments suggested it.

Change-Id: Ieeaf6ca998a4165d6eacf5e900c6a09aafdcfbe6
Reviewed-on: https://gerrit.libreoffice.org/23903Reviewed-by: 's avatarJochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst fd61dee6
......@@ -213,7 +213,7 @@ private:
void insertDefaultChart();
public:
//no default constructor
ChartModel() = delete;
ChartModel(css::uno::Reference< css::uno::XComponentContext > const & xContext);
explicit ChartModel( const ChartModel & rOther );
virtual ~ChartModel();
......
......@@ -60,6 +60,8 @@ public:
AccessibleChartView(SdrView* pView );
virtual ~AccessibleChartView();
AccessibleChartView() = delete;
// ____ WeakComponentHelper (called from XComponent::dispose()) ____
virtual void SAL_CALL disposing() override;
......@@ -123,9 +125,6 @@ private: // members
AccessibleUniqueId m_aCurrentSelectionOID;
SdrView* m_pSdrView;
::accessibility::IAccessibleViewForwarder* m_pViewForwarder;
//no default constructor
AccessibleChartView();
};
} //namespace chart
......
......@@ -105,7 +105,7 @@ class ChartController : public ::cppu::WeakImplHelper <
friend class ShapeController;
public:
//no default constructor
ChartController() = delete;
explicit ChartController(css::uno::Reference< css::uno::XComponentContext > const & xContext);
virtual ~ChartController();
......@@ -378,9 +378,6 @@ public:
DECL_LINK_TYPED( NotifyUndoActionHdl, SdrUndoAction*, void );
public:
//private
private:
DrawViewWrapper* GetDrawViewWrapper();
......
......@@ -21,8 +21,6 @@
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/frame/XFramesSupplier.hpp>
#include <boost/noncopyable.hpp>
namespace chart {
namespace {
......@@ -34,14 +32,16 @@ typedef cppu::WeakComponentImplHelper<
}
class ChartToolbarController : private boost::noncopyable,
private cppu::BaseMutex,
class ChartToolbarController : private cppu::BaseMutex,
public ChartToolbarControllerBase
{
public:
ChartToolbarController(const css::uno::Sequence<css::uno::Any>& rProperties);
virtual ~ChartToolbarController();
ChartToolbarController(const ChartToolbarController&) = delete;
const ChartToolbarController& operator=(const ChartToolbarController&) = delete;
// XToolbarContoller
virtual void SAL_CALL execute(sal_Int16 nKeyModifier)
throw (css::uno::RuntimeException, std::exception) override;
......
......@@ -28,7 +28,6 @@
#include <svtools/roadmapwizard.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <boost/noncopyable.hpp>
#include <memory>
namespace chart
......@@ -44,7 +43,11 @@ public:
CreationWizard( vcl::Window* pParent,
const css::uno::Reference< css::frame::XModel >& xChartModel
, const css::uno::Reference< css::uno::XComponentContext >& xContext
, sal_Int32 nOnePageOnlyIndex=-1 );//if nOnePageOnlyIndex is an index of an exsisting page starting with 0, then only this page is displayed without next/previous and roadmap
// if nOnePageOnlyIndex is an index of an exsisting page starting with 0
// then only this page is displayed without next/previous and roadmap
, sal_Int32 nOnePageOnlyIndex=-1 );
CreationWizard() = delete;
bool isClosable() { /*@todo*/ return m_bIsClosable;}
......@@ -60,9 +63,6 @@ protected:
virtual OUString getStateDisplayName( WizardState nState ) const override;
private:
//no default constructor
CreationWizard();
virtual VclPtr<TabPage> createPage(WizardState nState) override;
css::uno::Reference< css::chart2::XChartDocument > m_xChartModel;
......
......@@ -47,6 +47,8 @@ class CreationWizardUnoDlg : public MutexContainer
, public css::beans::XPropertySet
{
public:
CreationWizardUnoDlg() = delete;
CreationWizardUnoDlg( const css::uno::Reference< css::uno::XComponentContext >& xContext );
virtual ~CreationWizardUnoDlg();
......@@ -101,8 +103,6 @@ protected:
virtual void SAL_CALL disposing() override;
private:
//no default constructor
CreationWizardUnoDlg();
void createDialogOnDemand();
private:
......
......@@ -39,10 +39,11 @@ private:
::osl::Condition m_oCancelFinished;
private:
bool impl_checkCancel();
//no default constructor
ChartFrameLoader(){}
bool impl_checkCancel();
public:
ChartFrameLoader() = delete;
explicit ChartFrameLoader(css::uno::Reference< css::uno::XComponentContext > const & xContext);
virtual ~ChartFrameLoader();
......
......@@ -23,8 +23,6 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/chart2/XInternalDataProvider.hpp>
#include <boost/noncopyable.hpp>
namespace chart
{
......@@ -35,7 +33,7 @@ namespace chart
E_MODEL_WITH_SELECTION
};
class ChartModelClone : public ::boost::noncopyable
class ChartModelClone
{
public:
ChartModelClone(
......@@ -45,6 +43,9 @@ namespace chart
~ChartModelClone();
ChartModelClone(const ChartModelClone&) = delete;
const ChartModelClone& operator=(const ChartModelClone&) = delete;
ModelFacet getFacet() const;
void applyToModel( const css::uno::Reference< css::frame::XModel >& i_model ) const;
......
......@@ -32,8 +32,6 @@
#include <deque>
#include <utility>
#include <boost/noncopyable.hpp>
class SdrUndoAction;
namespace chart
......@@ -48,7 +46,6 @@ typedef ::cppu::WeakComponentImplHelper< css::document::XUndoAction > UndoElemen
class UndoElement :public UndoElement_MBase
,public UndoElement_TBase
,public ::boost::noncopyable
{
public:
/** creates a new undo action
......@@ -66,6 +63,9 @@ public:
const std::shared_ptr< ChartModelClone >& i_modelClone
);
UndoElement(const UndoElement&) = delete;
const UndoElement& operator=(const UndoElement&) = delete;
// XUndoAction
virtual OUString SAL_CALL getTitle() throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL undo( ) throw (css::document::UndoFailedException, css::uno::RuntimeException, std::exception) override;
......
......@@ -24,7 +24,6 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/ui/XUIElementFactory.hpp>
#include <boost/noncopyable.hpp>
namespace chart { namespace sidebar {
......@@ -37,14 +36,16 @@ namespace
}
class ChartPanelFactory
: private ::boost::noncopyable,
private ::cppu::BaseMutex,
: private ::cppu::BaseMutex,
public PanelFactoryInterfaceBase
{
public:
ChartPanelFactory();
virtual ~ChartPanelFactory();
ChartPanelFactory(const ChartPanelFactory&) = delete;
const ChartPanelFactory& operator=(const ChartPanelFactory&) = delete;
// XUIElementFactory
virtual css::uno::Reference<css::ui::XUIElement> SAL_CALL createUIElement(
const ::rtl::OUString& rsResourceURL,
......
......@@ -47,6 +47,7 @@ typedef ::cppu::WeakImplHelper<
class NameContainer : public impl::NameContainer_Base
{
public:
NameContainer() = delete;
NameContainer( const css::uno::Type& rType, const OUString& rServicename, const OUString& rImplementationName );
explicit NameContainer( const NameContainer & rOther );
virtual ~NameContainer();
......@@ -75,9 +76,6 @@ public:
// XCloneable
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() throw (css::uno::RuntimeException, std::exception) override;
private: //methods
NameContainer();//no default constructor
private: //member
const css::uno::Type m_aType;
const OUString m_aServicename;
......
......@@ -41,10 +41,9 @@ private:
VclPtr<OutputDevice> m_pRefDevice;
//no default constructor
DrawModelWrapper();
public:
DrawModelWrapper() = delete;
SAL_DLLPRIVATE DrawModelWrapper(
const css::uno::Reference<css::uno::XComponentContext>& xContext );
SAL_DLLPRIVATE virtual ~DrawModelWrapper();
......
......@@ -30,6 +30,8 @@ class AreaChart : public VSeriesPlotter
{
// public methods
public:
AreaChart() = delete;
AreaChart( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
, sal_Int32 nDimensionCount
, bool bCategoryXAxis, bool bNoArea=false
......@@ -50,9 +52,6 @@ public:
virtual css::uno::Any getExplicitSymbol( const VDataSeries& rSeries, sal_Int32 nPointIndex=-1/*-1 for series symbol*/ ) override;
private: //methods
//no default constructor
AreaChart();
void impl_createSeriesShapes();
bool impl_createArea( VDataSeries* pSeries
, css::drawing::PolyPolygonShape3D* pSeriesPoly
......
......@@ -30,6 +30,8 @@ class BarChart : public VSeriesPlotter
{
// public methods
public:
BarChart() = delete;
BarChart( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
, sal_Int32 nDimensionCount );
virtual ~BarChart();
......@@ -40,9 +42,6 @@ public:
virtual css::drawing::Direction3D getPreferredDiagramAspectRatio() const override;
private: //methods
//no default constructor
BarChart();
css::uno::Reference< css::drawing::XShape >
createDataPoint3D_Bar(
const css::uno::Reference< css::drawing::XShapes >& xTarget
......
......@@ -29,6 +29,8 @@ class BubbleChart : public VSeriesPlotter
{
// public methods
public:
BubbleChart() = delete;
BubbleChart( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
, sal_Int32 nDimensionCount );
virtual ~BubbleChart();
......@@ -46,9 +48,6 @@ public:
virtual LegendSymbolStyle getLegendSymbolStyle() override;
private: //methods
//no default constructor
BubbleChart();
void calculateMaximumLogicBubbleSize();
void calculateBubbleSizeScalingFactor();
......
......@@ -30,6 +30,8 @@ class CandleStickChart : public VSeriesPlotter
{
// public methods
public:
CandleStickChart() = delete;
CandleStickChart( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
, sal_Int32 nDimensionCount );
virtual ~CandleStickChart();
......@@ -44,10 +46,6 @@ public:
virtual LegendSymbolStyle getLegendSymbolStyle() override;
private: //methods
//no default constructor
CandleStickChart();
private: //member
BarPositionHelper* m_pMainPosHelper;
};
......
......@@ -29,6 +29,8 @@ class NetChart : public VSeriesPlotter
{
// public methods
public:
NetChart() = delete;
NetChart( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
, sal_Int32 nDimensionCount
, bool bNoArea
......@@ -50,9 +52,6 @@ public:
virtual css::uno::Any getExplicitSymbol( const VDataSeries& rSeries, sal_Int32 nPointIndex=-1/*-1 for series symbol*/ ) override;
private: //methods
//no default constructor
NetChart();
void impl_createSeriesShapes();
bool impl_createArea( VDataSeries* pSeries
, css::drawing::PolyPolygonShape3D* pSeriesPoly
......
......@@ -33,6 +33,8 @@ class PieChart : public VSeriesPlotter
struct ShapeParam;
public:
PieChart() = delete;
PieChart( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
, sal_Int32 nDimensionCount, bool bExcludingPositioning );
virtual ~PieChart();
......@@ -61,9 +63,6 @@ public:
virtual bool isSeparateStackingForDifferentSigns( sal_Int32 nDimensionIndex ) override;
private: //methods
//no default constructor
PieChart();
css::uno::Reference<css::drawing::XShape>
createDataPoint(
const css::uno::Reference<css::drawing::XShapes>& xTarget,
......
......@@ -36,7 +36,6 @@
#include <memory>
#include <vector>
#include <map>
#include <boost/noncopyable.hpp>
namespace chart
{
......@@ -56,13 +55,16 @@ public:
mutable css::uno::Sequence<double> Doubles;
};
class VDataSeries final : private boost::noncopyable
class VDataSeries final
{
public:
VDataSeries( const css::uno::Reference<css::chart2::XDataSeries>& xDataSeries );
~VDataSeries();
VDataSeries(const VDataSeries&) = delete;
const VDataSeries& operator=(const VDataSeries&) = delete;
css::uno::Reference<css::chart2::XDataSeries> getModel() const;
void setCategoryXAxis();
......
......@@ -119,6 +119,8 @@ private:
class VSeriesPlotter : public PlotterBase, public MinimumAndMaximumSupplier, public LegendEntryProvider
{
public:
VSeriesPlotter() = delete;
virtual ~VSeriesPlotter();
/*
......@@ -253,10 +255,6 @@ public:
bool WantToPlotInFrontOfAxisLine();
virtual bool shouldSnapRectToUsedArea();
private:
//no default constructor
VSeriesPlotter();
protected:
VSeriesPlotter( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment