summaryrefslogtreecommitdiff
path: root/chart2/source/controller/inc
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/inc')
-rw-r--r--chart2/source/controller/inc/AccessibleBase.hxx47
-rw-r--r--chart2/source/controller/inc/AccessibleChartView.hxx24
-rw-r--r--chart2/source/controller/inc/AccessibleTextHelper.hxx34
-rw-r--r--chart2/source/controller/inc/AxisItemConverter.hxx18
-rw-r--r--chart2/source/controller/inc/CharacterPropertyItemConverter.hxx4
-rw-r--r--chart2/source/controller/inc/ChartController.hxx95
-rw-r--r--chart2/source/controller/inc/ChartDocumentWrapper.hxx14
-rw-r--r--chart2/source/controller/inc/ChartToolbarController.hxx10
-rw-r--r--chart2/source/controller/inc/ChartWindow.hxx11
-rw-r--r--chart2/source/controller/inc/CommandDispatchContainer.hxx8
-rw-r--r--chart2/source/controller/inc/ConfigurationAccess.hxx38
-rw-r--r--chart2/source/controller/inc/DataPointItemConverter.hxx18
-rw-r--r--chart2/source/controller/inc/DataTableItemConverter.hxx56
-rw-r--r--chart2/source/controller/inc/DrawViewWrapper.hxx2
-rw-r--r--chart2/source/controller/inc/ErrorBarItemConverter.hxx4
-rw-r--r--chart2/source/controller/inc/GraphicPropertyItemConverter.hxx4
-rw-r--r--chart2/source/controller/inc/ItemConverter.hxx2
-rw-r--r--chart2/source/controller/inc/LegendItemConverter.hxx8
-rw-r--r--chart2/source/controller/inc/MultipleChartConverters.hxx28
-rw-r--r--chart2/source/controller/inc/ObjectHierarchy.hxx51
-rw-r--r--chart2/source/controller/inc/ObjectNameProvider.hxx25
-rw-r--r--chart2/source/controller/inc/PositionAndSizeHelper.hxx4
-rw-r--r--chart2/source/controller/inc/RangeSelectionHelper.hxx8
-rw-r--r--chart2/source/controller/inc/RangeSelectionListener.hxx10
-rw-r--r--chart2/source/controller/inc/RegressionCurveItemConverter.hxx9
-rw-r--r--chart2/source/controller/inc/RegressionEquationItemConverter.hxx8
-rw-r--r--chart2/source/controller/inc/SelectionHelper.hxx9
-rw-r--r--chart2/source/controller/inc/SeriesOptionsItemConverter.hxx16
-rw-r--r--chart2/source/controller/inc/ShapeController.h38
-rw-r--r--chart2/source/controller/inc/StatisticsItemConverter.hxx8
-rw-r--r--chart2/source/controller/inc/TabPageNotifiable.hxx4
-rw-r--r--chart2/source/controller/inc/TextDirectionListBox.hxx2
-rw-r--r--chart2/source/controller/inc/TextLabelItemConverter.hxx17
-rw-r--r--chart2/source/controller/inc/TimerTriggeredControllerLock.hxx8
-rw-r--r--chart2/source/controller/inc/TitleDialogData.hxx13
-rw-r--r--chart2/source/controller/inc/TitleItemConverter.hxx7
-rw-r--r--chart2/source/controller/inc/dlg_ChartType.hxx10
-rw-r--r--chart2/source/controller/inc/dlg_ChartType_UNO.hxx6
-rw-r--r--chart2/source/controller/inc/dlg_CreationWizard.hxx14
-rw-r--r--chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx10
-rw-r--r--chart2/source/controller/inc/dlg_DataEditor.hxx11
-rw-r--r--chart2/source/controller/inc/dlg_DataSource.hxx13
-rw-r--r--chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx3
-rw-r--r--chart2/source/controller/inc/dlg_InsertDataLabel.hxx2
-rw-r--r--chart2/source/controller/inc/dlg_InsertDataTable.hxx52
-rw-r--r--chart2/source/controller/inc/dlg_InsertErrorBars.hxx14
-rw-r--r--chart2/source/controller/inc/dlg_InsertLegend.hxx8
-rw-r--r--chart2/source/controller/inc/dlg_InsertTitle.hxx2
-rw-r--r--chart2/source/controller/inc/dlg_ObjectProperties.hxx18
-rw-r--r--chart2/source/controller/inc/dlg_ShapeFont.hxx4
-rw-r--r--chart2/source/controller/inc/dlg_ShapeParagraph.hxx4
-rw-r--r--chart2/source/controller/inc/dlg_View3D.hxx6
-rw-r--r--chart2/source/controller/inc/helpids.h10
-rw-r--r--chart2/source/controller/inc/res_DataTableProperties.hxx48
-rw-r--r--chart2/source/controller/inc/res_ErrorBar.hxx7
-rw-r--r--chart2/source/controller/inc/res_LegendPosition.hxx11
-rw-r--r--chart2/source/controller/inc/uiobject.hxx8
57 files changed, 515 insertions, 408 deletions
diff --git a/chart2/source/controller/inc/AccessibleBase.hxx b/chart2/source/controller/inc/AccessibleBase.hxx
index 88f4ef79ffb2..b7ccbac900da 100644
--- a/chart2/source/controller/inc/AccessibleBase.hxx
+++ b/chart2/source/controller/inc/AccessibleBase.hxx
@@ -27,20 +27,18 @@
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
#include <comphelper/accessibleeventnotifier.hxx>
+#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
-#include <rtl/ref.hxx>
#include <tools/color.hxx>
+#include <unotools/weakref.hxx>
#include <map>
#include <vector>
#include <memory>
-#include <MutexContainer.hxx>
-
namespace com::sun::star::awt { class XWindow; }
namespace com::sun::star::chart2 { class XChartDocument; }
namespace com::sun::star::view { class XSelectionSupplier; }
-namespace utl { class AccessibleStateSetHelper; }
class SdrView;
@@ -54,7 +52,9 @@ namespace chart
{
class AccessibleBase;
+class ChartView;
class ObjectHierarchy;
+class ChartController;
typedef ObjectIdentifier AccessibleUniqueId;
@@ -62,9 +62,9 @@ struct AccessibleElementInfo
{
AccessibleUniqueId m_aOID;
- css::uno::WeakReference< css::chart2::XChartDocument > m_xChartDocument;
- css::uno::WeakReference< css::view::XSelectionSupplier > m_xSelectionSupplier;
- css::uno::WeakReference< css::uno::XInterface > m_xView;
+ unotools::WeakReference< ::chart::ChartModel > m_xChartDocument;
+ unotools::WeakReference< ::chart::ChartController > m_xChartController;
+ unotools::WeakReference< ::chart::ChartView > m_xView;
css::uno::WeakReference< css::awt::XWindow > m_xWindow;
std::shared_ptr< ObjectHierarchy > m_spObjectHierarchy;
@@ -89,7 +89,7 @@ typedef ::cppu::WeakComponentImplHelper<
/** Base class for all Chart Accessibility objects
*/
class AccessibleBase :
- public MutexContainer,
+ public cppu::BaseMutex,
public impl::AccessibleBase_Base
{
public:
@@ -99,7 +99,7 @@ public:
LOST_SELECTION
};
- AccessibleBase( const AccessibleElementInfo & rAccInfo,
+ AccessibleBase( AccessibleElementInfo aAccInfo,
bool bMayHaveChildren,
bool bAlwaysTransparent );
virtual ~AccessibleBase() override;
@@ -135,14 +135,14 @@ protected:
@throws css::uno::RuntimeException
*/
- void AddState( sal_Int16 aState );
+ void AddState( sal_Int64 aState );
/** Removes a state from the set if the set contains the state, otherwise
nothing is done.
@throws css::uno::RuntimeException
*/
- void RemoveState( sal_Int16 aState );
+ void RemoveState( sal_Int64 aState );
/** has to be overridden by derived classes that support child elements.
With this method a rescan is initiated that should result in a correct
@@ -185,14 +185,10 @@ protected:
/** This method creates an AccessibleEventObject and sends it to all
listeners that are currently listening to this object
-
- If bSendGlobally is true, the event is also broadcast via
- vcl::unohelper::NotifyAccessibleStateEventGlobally()
*/
void BroadcastAccEvent( sal_Int16 nId,
const css::uno::Any & rNew,
- const css::uno::Any & rOld,
- bool bSendGlobally = false ) const;
+ const css::uno::Any & rOld ) const;
/** Removes all children from the internal lists and broadcasts child remove
events.
@@ -209,14 +205,14 @@ protected:
@throws css::uno::RuntimeException
*/
virtual css::uno::Reference< css::accessibility::XAccessible >
- ImplGetAccessibleChildById( sal_Int32 i ) const;
+ ImplGetAccessibleChildById( sal_Int64 i ) const;
/** Is called from getAccessibleChildCount(). Before this method is called,
an update of children is done if necessary.
@throws css::uno::RuntimeException
*/
- virtual sal_Int32 ImplGetAccessibleChildCount() const;
+ virtual sal_Int64 ImplGetAccessibleChildCount() const;
const AccessibleElementInfo& GetInfo() const { return m_aAccInfo;}
void SetInfo( const AccessibleElementInfo & rNewInfo );
@@ -229,12 +225,12 @@ protected:
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override;
// ________ XAccessibleContext ________
- virtual sal_Int32 SAL_CALL getAccessibleChildCount() override;
+ virtual sal_Int64 SAL_CALL getAccessibleChildCount() override;
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
- getAccessibleChild( sal_Int32 i ) override;
+ getAccessibleChild( sal_Int64 i ) override;
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
getAccessibleParent() override;
- virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() override;
+ virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override;
/// @return AccessibleRole.SHAPE
virtual sal_Int16 SAL_CALL getAccessibleRole() override;
// has to be implemented by derived classes
@@ -242,8 +238,7 @@ protected:
// throw (css::uno::RuntimeException);
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL
getAccessibleRelationSet() override;
- virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL
- getAccessibleStateSet() override;
+ virtual sal_Int64 SAL_CALL getAccessibleStateSet() override;
virtual css::lang::Locale SAL_CALL getLocale() override;
// has to be implemented by derived classes
// virtual OUString SAL_CALL getAccessibleDescription()
@@ -305,11 +300,9 @@ private:
::comphelper::AccessibleEventNotifier::TClientId m_nEventNotifierId;
- /** Implementation helper for getAccessibleStateSet()
-
- Note: This member must come before m_aStateSet!
+ /** for getAccessibleStateSet()
*/
- rtl::Reference<::utl::AccessibleStateSetHelper> m_xStateSetHelper;
+ sal_Int64 m_nStateSet;
AccessibleElementInfo m_aAccInfo;
const bool m_bAlwaysTransparent;
diff --git a/chart2/source/controller/inc/AccessibleChartView.hxx b/chart2/source/controller/inc/AccessibleChartView.hxx
index 814666e34016..793cdd69ab77 100644
--- a/chart2/source/controller/inc/AccessibleChartView.hxx
+++ b/chart2/source/controller/inc/AccessibleChartView.hxx
@@ -38,21 +38,21 @@ class IAccessibleViewForwarder;
namespace chart
{
+class ChartView;
namespace impl
{
typedef ::cppu::ImplInheritanceHelper<
::chart::AccessibleBase,
- css::lang::XInitialization,
css::view::XSelectionChangeListener >
AccessibleChartView_Base;
}
-class AccessibleChartView :
+class AccessibleChartView final :
public impl::AccessibleChartView_Base
{
public:
- AccessibleChartView(SdrView* pView );
+ AccessibleChartView( SdrView* pView );
virtual ~AccessibleChartView() override;
AccessibleChartView() = delete;
@@ -60,15 +60,19 @@ public:
// ____ WeakComponentHelper (called from XComponent::dispose()) ____
using AccessibleBase::disposing;
- // ____ lang::XInitialization ____
// 0: view::XSelectionSupplier offers notifications for selection changes and access to the selection itself
// 1: frame::XModel representing the chart model - offers access to object data
// 2: lang::XInterface representing the normal chart view - offers access to some extra object data
// 3: accessibility::XAccessible representing the parent accessible
// 4: awt::XWindow representing the view's window (is a vcl Window)
// all arguments are only valid until next initialization - don't keep them longer
- virtual void SAL_CALL initialize(
- const css::uno::Sequence< css::uno::Any >& aArguments ) override;
+ void initialize( ChartController& rChartController,
+ const rtl::Reference<::chart::ChartModel>& xChartModel,
+ const rtl::Reference<::chart::ChartView>& xChartView,
+ const css::uno::Reference< css::accessibility::XAccessible >& xParent,
+ const css::uno::Reference<css::awt::XWindow>& xViewWindow );
+ // used to disconnect from view
+ void initialize();
// ____ view::XSelectionChangeListener ____
virtual void SAL_CALL selectionChanged( const css::lang::EventObject& aEvent ) override;
@@ -79,7 +83,7 @@ public:
// ________ XAccessibleContext ________
virtual OUString SAL_CALL getAccessibleDescription() override;
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override;
- virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() override;
+ virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override;
virtual OUString SAL_CALL getAccessibleName() override;
virtual sal_Int16 SAL_CALL getAccessibleRole() override;
@@ -101,9 +105,9 @@ private: // methods
css::awt::Rectangle GetWindowPosSize() const;
private: // members
- css::uno::WeakReference< css::view::XSelectionSupplier > m_xSelectionSupplier;
- css::uno::WeakReference< css::frame::XModel > m_xChartModel;
- css::uno::WeakReference< css::uno::XInterface > m_xChartView;
+ unotools::WeakReference< ::chart::ChartController > m_xChartController;
+ unotools::WeakReference< ::chart::ChartModel > m_xChartModel;
+ unotools::WeakReference< ChartView > m_xChartView;
css::uno::WeakReference< css::awt::XWindow > m_xWindow;
css::uno::WeakReference< css::accessibility::XAccessible > m_xParent;
diff --git a/chart2/source/controller/inc/AccessibleTextHelper.hxx b/chart2/source/controller/inc/AccessibleTextHelper.hxx
index 0a174caaf70d..85fcb83dc3e4 100644
--- a/chart2/source/controller/inc/AccessibleTextHelper.hxx
+++ b/chart2/source/controller/inc/AccessibleTextHelper.hxx
@@ -18,17 +18,11 @@
*/
#pragma once
-#include <memory>
-#include <MutexContainer.hxx>
-#include <cppuhelper/compbase.hxx>
-#include <com/sun/star/lang/XInitialization.hpp>
+#include <comphelper/compbase.hxx>
+#include <svx/AccessibleTextHelper.hxx>
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
-// forward declaration of helper class from svx
-namespace accessibility
-{
-class AccessibleTextHelper;
-}
namespace chart
{
@@ -37,21 +31,18 @@ class DrawViewWrapper;
namespace impl
{
-typedef ::cppu::WeakComponentImplHelper<
- css::lang::XInitialization,
+typedef comphelper::WeakComponentImplHelper<
css::accessibility::XAccessibleContext >
AccessibleTextHelper_Base;
}
-class AccessibleTextHelper :
- public MutexContainer,
+class AccessibleTextHelper final :
public impl::AccessibleTextHelper_Base
{
public:
explicit AccessibleTextHelper( DrawViewWrapper * pDrawViewWrapper );
virtual ~AccessibleTextHelper() override;
- // ____ XInitialization ____
/** Must be called at least once for this helper class to work.
mandatory parameter 0: type string. This is the CID that is used to find
@@ -64,24 +55,25 @@ public:
mandatory parameter 2: type awt::XWindow. The Window that shows the
text currently.
*/
- virtual void SAL_CALL initialize(
- const css::uno::Sequence< css::uno::Any >& aArguments ) override;
+ void initialize(const OUString& aCID,
+ const css::uno::Reference< css::accessibility::XAccessible >& xEventSource,
+ const css::uno::Reference< css::awt::XWindow >& xWindow );
// ____ XAccessibleContext ____
- virtual ::sal_Int32 SAL_CALL getAccessibleChildCount() override;
+ virtual sal_Int64 SAL_CALL getAccessibleChildCount() override;
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(
- ::sal_Int32 i ) override;
+ sal_Int64 i ) override;
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override;
- virtual ::sal_Int32 SAL_CALL getAccessibleIndexInParent() override;
+ virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override;
virtual ::sal_Int16 SAL_CALL getAccessibleRole() override;
virtual OUString SAL_CALL getAccessibleDescription() override;
virtual OUString SAL_CALL getAccessibleName() override;
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override;
- virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() override;
+ virtual sal_Int64 SAL_CALL getAccessibleStateSet() override;
virtual css::lang::Locale SAL_CALL getLocale() override;
private:
- std::unique_ptr<::accessibility::AccessibleTextHelper> m_pTextHelper;
+ std::optional<::accessibility::AccessibleTextHelper> m_oTextHelper;
DrawViewWrapper * m_pDrawViewWrapper;
};
diff --git a/chart2/source/controller/inc/AxisItemConverter.hxx b/chart2/source/controller/inc/AxisItemConverter.hxx
index 76c047105d3c..c14ef82bd595 100644
--- a/chart2/source/controller/inc/AxisItemConverter.hxx
+++ b/chart2/source/controller/inc/AxisItemConverter.hxx
@@ -19,30 +19,34 @@
#pragma once
#include "ItemConverter.hxx"
+#include <com/sun/star/awt/Size.hpp>
+#include <rtl/ref.hxx>
+#include <optional>
#include <vector>
-namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::beans { class XPropertySet; }
namespace com::sun::star::chart2 { class XAxis; }
namespace com::sun::star::chart2 { class XChartDocument; }
+namespace chart { class Axis; }
namespace chart { struct ExplicitIncrementData; }
namespace chart { struct ExplicitScaleData; }
+namespace chart { class ChartModel; }
class SdrModel;
namespace chart::wrapper {
-class AxisItemConverter : public ItemConverter
+class AxisItemConverter final : public ItemConverter
{
public:
AxisItemConverter(
const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
SfxItemPool& rItemPool, SdrModel& rDrawModel,
- const css::uno::Reference<css::chart2::XChartDocument> & xChartDoc,
+ const rtl::Reference<::chart::ChartModel> & xChartDoc,
ExplicitScaleData const * pScale,
ExplicitIncrementData const * pIncrement,
- const css::awt::Size* pRefSize );
+ const std::optional<css::awt::Size>& pRefSize );
virtual ~AxisItemConverter() override;
@@ -58,11 +62,9 @@ protected:
private:
std::vector< std::unique_ptr<ItemConverter> > m_aConverters;
- css::uno::Reference<
- css::chart2::XAxis > m_xAxis;
+ rtl::Reference<::chart::Axis> m_xAxis;
- css::uno::Reference<
- css::chart2::XChartDocument > m_xChartDoc;
+ rtl::Reference<::chart::ChartModel>m_xChartDoc;
std::unique_ptr<ExplicitScaleData> m_pExplicitScale;
std::unique_ptr<ExplicitIncrementData> m_pExplicitIncrement;
diff --git a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
index 96138e237230..65ff58ea45ab 100644
--- a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
+++ b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
@@ -35,8 +35,8 @@ public:
CharacterPropertyItemConverter(
const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
SfxItemPool& rItemPool,
- const css::awt::Size* pRefSize,
- const OUString & rRefSizePropertyName,
+ const std::optional<css::awt::Size>& pRefSize,
+ OUString aRefSizePropertyName,
const css::uno::Reference<css::beans::XPropertySet>& rRefSizePropSet = css::uno::Reference<css::beans::XPropertySet>() );
virtual ~CharacterPropertyItemConverter() override;
diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx
index 09fda2b6fb00..737d0cf3768f 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -19,6 +19,7 @@
#pragma once
#include <LifeTime.hxx>
+#include <ReferenceSizeProvider.hxx>
#include "CommandDispatchContainer.hxx"
#include "SelectionHelper.hxx"
@@ -34,10 +35,9 @@
#include <com/sun/star/util/XModeChangeListener.hpp>
#include <com/sun/star/util/XCloseListener.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
-#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/frame/XController2.hpp>
#include <com/sun/star/frame/XLayoutManagerListener.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <memory>
#include <string_view>
@@ -61,7 +61,6 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace com::sun::star::util { class XCloseable; }
namespace com::sun::star::view { class XSelectionSupplier; }
-
class SdrModel;
namespace svt
@@ -83,25 +82,27 @@ namespace chart
{
class UndoGuard;
+class ChartView;
class ChartWindow;
class DrawModelWrapper;
class DrawViewWrapper;
-class ReferenceSizeProvider;
class ViewElementListProvider;
+class ViewElementListProvider;
+class Diagram;
+class AccessibleChartView;
+class AccessibleTextHelper;
enum ChartDrawMode { CHARTDRAW_INSERT, CHARTDRAW_SELECT };
-class ChartController : public ::cppu::WeakImplHelper <
- css::frame::XController //comprehends XComponent (required interface)
+class ChartController final : public ::cppu::WeakImplHelper <
+ css::frame::XController2 //comprehends XComponent (css::frame::XController is required interface)
,css::frame::XDispatchProvider //(required interface)
,css::view::XSelectionSupplier //(optional interface)
,css::ui::XContextMenuInterception //(optional interface)
,css::util::XCloseListener //(needed for communication with XModel)
- ,css::lang::XServiceInfo
,css::frame::XDispatch
,css::awt::XWindow //this is the Window Controller part of this Controller, that will be given to a Frame via setComponent
- ,css::lang::XMultiServiceFactory
,css::util::XModifyListener
,css::util::XModeChangeListener
,css::frame::XLayoutManagerListener
@@ -109,16 +110,11 @@ class ChartController : public ::cppu::WeakImplHelper <
{
public:
ChartController() = delete;
- explicit ChartController(css::uno::Reference< css::uno::XComponentContext > const & xContext);
+ explicit ChartController(css::uno::Reference< css::uno::XComponentContext > xContext);
virtual ~ChartController() override;
OUString GetContextName();
- // css::lang::XServiceInfo
- virtual OUString SAL_CALL getImplementationName() override;
- virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
- virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
-
// css::frame::XController (required interface)
virtual void SAL_CALL
attachFrame( const css::uno::Reference< css::frame::XFrame > & xFrame ) override;
@@ -141,6 +137,12 @@ public:
virtual sal_Bool SAL_CALL
suspend( sal_Bool bSuspend ) override;
+ // css::frame::XController2
+ virtual css::uno::Reference<css::awt::XWindow> SAL_CALL getComponentWindow() override;
+ virtual OUString SAL_CALL getViewControllerName() override;
+ virtual css::uno::Sequence<css::beans::PropertyValue> SAL_CALL getCreationArguments() override;
+ virtual css::uno::Reference<css::ui::XSidebarProvider> SAL_CALL getSidebar() override;
+
// css::lang::XComponent (base of XController)
virtual void SAL_CALL
dispose() override;
@@ -261,16 +263,6 @@ public:
virtual void SAL_CALL
removePaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override;
- // css::lang XMultiServiceFactory
- virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
- createInstance( const OUString& aServiceSpecifier ) override;
- virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
- createInstanceWithArguments( const OUString& ServiceSpecifier,
- const css::uno::Sequence<
- css::uno::Any >& Arguments ) override;
- virtual css::uno::Sequence< OUString > SAL_CALL
- getAvailableServiceNames() override;
-
// css::util::XModifyListener
virtual void SAL_CALL modified(
const css::lang::EventObject& aEvent ) override;
@@ -317,11 +309,21 @@ public:
css::uno::Reference< css::accessibility::XAccessible > CreateAccessible();
+ /** Creates a helper accessibility class that must be initialized via initialize(). For
+ parameters see
+
+ The returned object should not be used directly. Instead a proxy object
+ should use this helper to retrieve its children and add them to its own
+ children.
+ */
+ rtl::Reference< ::chart::AccessibleTextHelper > createAccessibleTextContext();
+
static bool isObjectDeleteable( const css::uno::Any& rSelection );
void setDrawMode( ChartDrawMode eMode ) { m_eDrawMode = eMode; }
bool isShapeContext() const;
+ bool IsTextEdit() const;
ViewElementListProvider getViewElementListProvider();
DrawModelWrapper* GetDrawModelWrapper();
@@ -334,26 +336,27 @@ public:
void NotifyUndoActionHdl( std::unique_ptr<SdrUndoAction> );
- css::uno::Reference<css::uno::XInterface> const & getChartView() const;
+ rtl::Reference<::chart::ChartView> const & getChartView() const { return m_xChartView; }
+
+ rtl::Reference<::chart::ChartModel> getChartModel();
+ rtl::Reference<::chart::Diagram> getFirstDiagram();
private:
class TheModel : public salhelper::SimpleReferenceObject
{
public:
- explicit TheModel( const css::uno::Reference<
- css::frame::XModel > & xModel );
+ explicit TheModel( rtl::Reference<::chart::ChartModel> xModel );
virtual ~TheModel() override;
void addListener( ChartController* pController );
void removeListener( ChartController* pController );
void tryTermination();
- const css::uno::Reference< css::frame::XModel >&
+ const rtl::Reference<::chart::ChartModel>&
getModel() const { return m_xModel;}
private:
- css::uno::Reference< css::frame::XModel > m_xModel;
- css::uno::Reference< css::util::XCloseable > m_xCloseable;
+ rtl::Reference<::chart::ChartModel> m_xModel;
//the ownership between model and controller is not clear at first
//each controller might consider himself as owner of the model first
@@ -387,7 +390,7 @@ private:
//view
css::uno::Reference<css::awt::XWindow> m_xViewWindow;
- css::uno::Reference<css::uno::XInterface> m_xChartView;
+ rtl::Reference<::chart::ChartView> m_xChartView;
std::shared_ptr< DrawModelWrapper > m_pDrawModelWrapper;
std::unique_ptr<DrawViewWrapper> m_pDrawViewWrapper;
@@ -418,7 +421,7 @@ private:
rtl::Reference<svx::sidebar::SelectionChangeHandler> mpSelectionChangeHandler;
bool impl_isDisposedOrSuspended() const;
- std::unique_ptr<ReferenceSizeProvider> impl_createReferenceSizeProvider();
+ ReferenceSizeProvider impl_createReferenceSizeProvider();
void impl_adaptDataSeriesAutoResize();
void impl_createDrawViewController();
@@ -428,7 +431,7 @@ private:
void executeDispatch_ObjectProperties();
void executeDispatch_FormatObject( std::u16string_view rDispatchCommand );
void executeDlg_ObjectProperties( const OUString& rObjectCID );
- bool executeDlg_ObjectProperties_withoutUndoGuard( const OUString& rObjectCID, bool bSuccessOnUnchanged );
+ void executeDlg_ObjectProperties_withUndoGuard( std::shared_ptr<UndoGuard> aUndoGuard, const OUString& rObjectCID, bool bSuccessOnUnchanged );
void executeDispatch_ChartType();
@@ -439,6 +442,10 @@ private:
void executeDispatch_InsertAxes();
void executeDispatch_InsertGrid();
+ void executeDispatch_InsertDataTable();
+ void executeDispatch_DeleteDataTable();
+ void executeDispatch_OpenInsertDataTableDialog();
+
void executeDispatch_InsertMenu_DataLabels();
void executeDispatch_InsertMenu_Trendlines();
void executeDispatch_InsertMenu_MeanValues();
@@ -478,6 +485,8 @@ private:
void executeDispatch_MoveSeries( bool bForward );
bool EndTextEdit();
+ css::uno::Sequence< css::uno::Reference<css::chart2::XFormattedString >> GetFormattedTitle(
+ const EditTextObject& aEdit, const css::uno::Reference< css::drawing::XShape >& xShape );
void executeDispatch_View3D();
void executeDispatch_PositionAndSize( const ::css::uno::Sequence< ::css::beans::PropertyValue >* pArgs = nullptr );
@@ -498,17 +507,17 @@ private:
void executeDispatch_LOKSetTextSelection(int nType, int nX, int nY);
void executeDispatch_LOKPieSegmentDragging(int nOffset);
void executeDispatch_FillColor(sal_uInt32 nColor);
- void executeDispatch_FillGradient(OUString sJSONGradient);
+ void executeDispatch_FillGradient(std::u16string_view sJSONGradient);
void executeDispatch_LineColor(sal_uInt32 nColor);
void executeDispatch_LineWidth(sal_uInt32 nWidth);
- void sendPopupRequest(OUString const & rCID, tools::Rectangle aRectangle);
+ void sendPopupRequest(std::u16string_view rCID, tools::Rectangle aRectangle);
void impl_ShapeControllerDispatch( const css::util::URL& rURL,
const css::uno::Sequence< css::beans::PropertyValue >& rArgs );
DECL_LINK( DoubleClickWaitingHdl, Timer*, void );
- void execute_DoubleClick( const Point* pMousePixel );
+ void execute_DoubleClick( const Point* pMousePixel, bool &bEditText );
void startDoubleClickWaiting();
void stopDoubleClickWaiting();
@@ -516,7 +525,7 @@ private:
void impl_notifySelectionChangeListeners();
void impl_invalidateAccessible();
void impl_initializeAccessible();
- void impl_initializeAccessible( const css::uno::Reference< css::lang::XInitialization >& xInit );
+ void impl_initializeAccessible( AccessibleChartView& xInit );
//sets the model member to null if it equals the parameter
//returns true if successful
@@ -530,20 +539,10 @@ private:
/// @return </sal_True>, if resize/move was successful
bool impl_moveOrResizeObject(
const OUString & rCID, eMoveOrResizeType eType, double fAmountLogicX, double fAmountLogicY );
- bool impl_DragDataPoint( const OUString & rCID, double fOffset );
+ bool impl_DragDataPoint( std::u16string_view rCID, double fOffset );
static const o3tl::sorted_vector< OUString >& impl_getAvailableCommands();
- /** Creates a helper accessibility class that must be initialized via XInitialization. For
- parameters see
-
- The returned object should not be used directly. Instead a proxy object
- should use this helper to retrieve its children and add them to its own
- children.
- */
- css::uno::Reference< css::accessibility::XAccessibleContext >
- impl_createAccessibleTextContext();
-
void impl_PasteGraphic( css::uno::Reference< css::graphic::XGraphic > const & xGraphic,
const ::Point & aPosition );
void impl_PasteShapes( SdrModel* pModel );
diff --git a/chart2/source/controller/inc/ChartDocumentWrapper.hxx b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
index 7eeb4646bfc7..a5bded3c8fb7 100644
--- a/chart2/source/controller/inc/ChartDocumentWrapper.hxx
+++ b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
@@ -26,11 +26,13 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase.hxx>
#include <unotools/eventlisteneradapter.hxx>
-
+#include <rtl/ref.hxx>
+#include <svx/unopage.hxx>
#include <memory>
namespace com::sun::star::uno { class XComponentContext; }
namespace com::sun::star::util { class XRefreshable; }
+namespace chart { class ChartView; }
namespace chart::wrapper
{
@@ -48,7 +50,7 @@ class ChartDocumentWrapper_Base : public ::cppu::ImplInheritanceHelper
{
};
-class ChartDocumentWrapper : public ChartDocumentWrapper_Base
+class ChartDocumentWrapper final : public ChartDocumentWrapper_Base
, public ::utl::OEventListenerAdapter
{
public:
@@ -72,7 +74,7 @@ public:
css::uno::Reference< css::drawing::XShapes > getAdditionalShapes() const;
/// @throws css::uno::RuntimeException
- css::uno::Reference< css::drawing::XDrawPage > impl_getDrawPage() const;
+ rtl::Reference<SvxDrawPage> impl_getDrawPage() const;
protected:
@@ -137,6 +139,10 @@ protected:
virtual std::vector< std::unique_ptr<WrappedProperty> > createWrappedProperties() override;
virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet() override;
+ // ____ XPropertySet ____
+ virtual void SAL_CALL setPropertyValue(const OUString& rPropertyName,
+ const css::uno::Any& rValue) override;
+
private: //methods
void impl_resetAddIn();
@@ -156,7 +162,7 @@ private: //member
OUString m_aBaseDiagram;
bool m_bUpdateAddIn;
- css::uno::Reference< css::uno::XInterface > m_xChartView;
+ rtl::Reference< ChartView > m_xChartView;
css::uno::Reference< css::lang::XMultiServiceFactory>
m_xShapeFactory;
diff --git a/chart2/source/controller/inc/ChartToolbarController.hxx b/chart2/source/controller/inc/ChartToolbarController.hxx
index 647cd59a6685..ce493bba674b 100644
--- a/chart2/source/controller/inc/ChartToolbarController.hxx
+++ b/chart2/source/controller/inc/ChartToolbarController.hxx
@@ -9,8 +9,7 @@
#pragma once
-#include <cppuhelper/compbase.hxx>
-#include <cppuhelper/basemutex.hxx>
+#include <comphelper/compbase.hxx>
#include <com/sun/star/frame/XToolbarController.hpp>
#include <com/sun/star/frame/XStatusListener.hpp>
@@ -23,13 +22,12 @@ namespace com::sun::star::frame { class XFramesSupplier; }
namespace chart {
-typedef cppu::WeakComponentImplHelper<
+typedef comphelper::WeakComponentImplHelper<
css::frame::XToolbarController, css::frame::XStatusListener,
css::util::XUpdatable, css::lang::XInitialization,
css::lang::XServiceInfo> ChartToolbarControllerBase;
-class ChartToolbarController : private cppu::BaseMutex,
- public ChartToolbarControllerBase
+class ChartToolbarController final : public ChartToolbarControllerBase
{
public:
ChartToolbarController(const css::uno::Sequence<css::uno::Any>& rProperties);
@@ -69,7 +67,7 @@ public:
// XUpdatable
virtual void SAL_CALL update() override;
- using cppu::WeakComponentImplHelperBase::disposing;
+ using comphelper::WeakComponentImplHelperBase::disposing;
private:
diff --git a/chart2/source/controller/inc/ChartWindow.hxx b/chart2/source/controller/inc/ChartWindow.hxx
index e7aa36d91cc8..918805cb3a8a 100644
--- a/chart2/source/controller/inc/ChartWindow.hxx
+++ b/chart2/source/controller/inc/ChartWindow.hxx
@@ -29,7 +29,7 @@ class ChartController;
thus the controller can perform appropriate actions
*/
-class ChartWindow : public vcl::Window
+class ChartWindow final : public vcl::Window
{
public:
ChartWindow( ChartController* pController, vcl::Window* pParent, WinBits nStyle );
@@ -53,15 +53,8 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
virtual void RequestHelp( const HelpEvent& rHEvt ) override;
- /// For LibreOfficeKit, we need to route these to the mouse events.
- virtual void LogicMouseButtonDown(const MouseEvent&) override;
- virtual void LogicMouseButtonUp(const MouseEvent&) override;
- virtual void LogicMouseMove(const MouseEvent&) override;
-
void ForceInvalidate();
- virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE ) override;
- virtual void Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE ) override;
- virtual void Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags = InvalidateFlags::NONE ) override;
+ virtual void ImplInvalidate( const vcl::Region* rRegion, InvalidateFlags nFlags ) override;
/// Notify the LOK client about an invalidated area.
virtual void LogicInvalidate( const tools::Rectangle* pRectangle ) override;
diff --git a/chart2/source/controller/inc/CommandDispatchContainer.hxx b/chart2/source/controller/inc/CommandDispatchContainer.hxx
index 1ed026597d73..ae95313c0f20 100644
--- a/chart2/source/controller/inc/CommandDispatchContainer.hxx
+++ b/chart2/source/controller/inc/CommandDispatchContainer.hxx
@@ -18,7 +18,7 @@
*/
#pragma once
-#include <cppuhelper/weakref.hxx>
+#include <unotools/weakref.hxx>
#include <o3tl/sorted_vector.hxx>
#include <map>
@@ -33,7 +33,7 @@ namespace com::sun::star::util { struct URL; }
namespace chart
{
-
+class ChartModel;
class DrawCommandDispatch;
class ShapeController;
@@ -73,7 +73,7 @@ public:
const css::uno::Reference< css::uno::XComponentContext > & xContext );
void setModel(
- const css::uno::Reference< css::frame::XModel > & xModel );
+ const rtl::Reference<::chart::ChartModel> & xModel );
/** Set a chart dispatcher that is used for all commands contained in
rChartCommands
@@ -122,7 +122,7 @@ private:
mutable tDisposeVector m_aToBeDisposedDispatches;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
- css::uno::WeakReference< css::frame::XModel > m_xModel;
+ unotools::WeakReference< ::chart::ChartModel > m_xModel;
css::uno::Reference< css::frame::XDispatch > m_xChartDispatcher;
o3tl::sorted_vector< OUString > m_aChartCommands;
diff --git a/chart2/source/controller/inc/ConfigurationAccess.hxx b/chart2/source/controller/inc/ConfigurationAccess.hxx
deleted file mode 100644
index 2fb4636d2217..000000000000
--- a/chart2/source/controller/inc/ConfigurationAccess.hxx
+++ /dev/null
@@ -1,38 +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 .
- */
-
-#pragma once
-
-#include <tools/fldunit.hxx>
-
-namespace chart::ConfigurationAccess
-{
-/** @descr Retrieve the FieldUnit to be used for the UI. This unit is retrieved
- from the registry settings of the Calc application.
-
- If this setting can not be found there is a fallback to cm which is the most
- common setting worldwide (or not?)
-
- @return the FieldUnit enum. See <vcl/fldunit.hxx> for definition
- */
-FieldUnit getFieldUnit();
-
-} //namespace chart
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/DataPointItemConverter.hxx b/chart2/source/controller/inc/DataPointItemConverter.hxx
index 0c4fcb3f7038..720cc0fef2e7 100644
--- a/chart2/source/controller/inc/DataPointItemConverter.hxx
+++ b/chart2/source/controller/inc/DataPointItemConverter.hxx
@@ -20,34 +20,36 @@
#include "ItemConverter.hxx"
#include "GraphicPropertyItemConverter.hxx"
+#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/uno/Sequence.h>
#include <tools/color.hxx>
-
+#include <rtl/ref.hxx>
+#include <optional>
#include <vector>
-namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::chart2 { class XDataSeries; }
namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::uno { class XComponentContext; }
-
+namespace chart { class ChartModel; }
+namespace chart { class DataSeries; }
class SdrModel;
namespace chart::wrapper {
-class DataPointItemConverter : public ItemConverter
+class DataPointItemConverter final : public ItemConverter
{
public:
DataPointItemConverter(
- const css::uno::Reference<css::frame::XModel>& xChartModel,
+ const rtl::Reference<::chart::ChartModel>& xChartModel,
const css::uno::Reference<css::uno::XComponentContext>& xContext,
const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
- const css::uno::Reference<css::chart2::XDataSeries>& xSeries,
+ const rtl::Reference<::chart::DataSeries>& xSeries,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
GraphicObjectType eMapTo,
- const css::awt::Size* pRefSize = nullptr,
+ const std::optional<css::awt::Size>& pRefSize = std::nullopt,
bool bDataSeries = false,
bool bUseSpecialFillColor = false,
sal_Int32 nSpecialFillColor = 0,
@@ -80,7 +82,7 @@ private:
bool m_bForbidPercentValue;
bool m_bHideLegendEntry;
sal_Int32 m_nPointIndex;
- css::uno::Reference<css::chart2::XDataSeries> m_xSeries;
+ rtl::Reference<::chart::DataSeries> m_xSeries;
};
}
diff --git a/chart2/source/controller/inc/DataTableItemConverter.hxx b/chart2/source/controller/inc/DataTableItemConverter.hxx
new file mode 100644
index 000000000000..f3809632f8a5
--- /dev/null
+++ b/chart2/source/controller/inc/DataTableItemConverter.hxx
@@ -0,0 +1,56 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include "ItemConverter.hxx"
+#include <rtl/ref.hxx>
+#include <vector>
+
+namespace com::sun::star::awt
+{
+struct Size;
+}
+namespace com::sun::star::beans
+{
+class XPropertySet;
+}
+namespace chart
+{
+class ChartModel;
+}
+
+class SdrModel;
+
+namespace chart::wrapper
+{
+/** Convert data table properties to and from ItemSet and UNO PropertySet */
+class DataTableItemConverter final : public ItemConverter
+{
+public:
+ DataTableItemConverter(const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
+ SfxItemPool& rItemPool, SdrModel& rDrawModel,
+ const rtl::Reference<::chart::ChartModel>& xChartDoc);
+
+ virtual ~DataTableItemConverter() override;
+
+ virtual void FillItemSet(SfxItemSet& rOutItemSet) const override;
+ virtual bool ApplyItemSet(const SfxItemSet& rItemSet) override;
+
+protected:
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
+ virtual bool GetItemProperty(tWhichIdType nWhichId,
+ tPropertyNameWithMemberId& rOutProperty) const override;
+
+private:
+ std::vector<std::unique_ptr<ItemConverter>> m_aConverters;
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/DrawViewWrapper.hxx b/chart2/source/controller/inc/DrawViewWrapper.hxx
index 70a1baf40da6..28c2a927ec19 100644
--- a/chart2/source/controller/inc/DrawViewWrapper.hxx
+++ b/chart2/source/controller/inc/DrawViewWrapper.hxx
@@ -43,7 +43,7 @@ protected:
~MarkHandleProvider() {}
};
-class DrawViewWrapper : public E3dView
+class DrawViewWrapper final : public E3dView
{
public:
DrawViewWrapper(
diff --git a/chart2/source/controller/inc/ErrorBarItemConverter.hxx b/chart2/source/controller/inc/ErrorBarItemConverter.hxx
index 788206e15b93..a53fbe18ef60 100644
--- a/chart2/source/controller/inc/ErrorBarItemConverter.hxx
+++ b/chart2/source/controller/inc/ErrorBarItemConverter.hxx
@@ -29,11 +29,11 @@ class SdrModel;
namespace chart::wrapper
{
-class ErrorBarItemConverter : public ItemConverter
+class ErrorBarItemConverter final : public ItemConverter
{
public:
ErrorBarItemConverter(
- const css::uno::Reference< css::frame::XModel > & xChartModel,
+ css::uno::Reference< css::frame::XModel > xChartModel,
const css::uno::Reference< css::beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
diff --git a/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
index 6b0376033d7a..9d119d53ca3a 100644
--- a/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
+++ b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
@@ -35,14 +35,14 @@ enum class GraphicObjectType
LineAndFillProperties
};
-class GraphicPropertyItemConverter : public ItemConverter
+class GraphicPropertyItemConverter final : public ItemConverter
{
public:
GraphicPropertyItemConverter(
const css::uno::Reference< css::beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
- const css::uno::Reference< css::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
+ css::uno::Reference< css::lang::XMultiServiceFactory > xNamedPropertyContainerFactory,
GraphicObjectType eObjectType );
virtual ~GraphicPropertyItemConverter() override;
diff --git a/chart2/source/controller/inc/ItemConverter.hxx b/chart2/source/controller/inc/ItemConverter.hxx
index 865268a3abf9..031a633c22d8 100644
--- a/chart2/source/controller/inc/ItemConverter.hxx
+++ b/chart2/source/controller/inc/ItemConverter.hxx
@@ -73,7 +73,7 @@ public:
reading/writing converted items
*/
ItemConverter(
- const css::uno::Reference< css::beans::XPropertySet > & rPropertySet ,
+ css::uno::Reference< css::beans::XPropertySet > xPropertySet ,
SfxItemPool& rItemPool );
virtual ~ItemConverter() override;
diff --git a/chart2/source/controller/inc/LegendItemConverter.hxx b/chart2/source/controller/inc/LegendItemConverter.hxx
index c3872e2d7f66..cbb657edf0d3 100644
--- a/chart2/source/controller/inc/LegendItemConverter.hxx
+++ b/chart2/source/controller/inc/LegendItemConverter.hxx
@@ -19,10 +19,10 @@
#pragma once
#include "ItemConverter.hxx"
-
+#include <com/sun/star/awt/Size.hpp>
+#include <optional>
#include <vector>
-namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
class SdrModel;
@@ -30,7 +30,7 @@ class SdrModel;
namespace chart::wrapper
{
-class LegendItemConverter : public ItemConverter
+class LegendItemConverter final : public ItemConverter
{
public:
LegendItemConverter(
@@ -38,7 +38,7 @@ public:
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
- const css::awt::Size* pRefSize );
+ const std::optional<css::awt::Size>& pRefSize );
virtual ~LegendItemConverter() override;
diff --git a/chart2/source/controller/inc/MultipleChartConverters.hxx b/chart2/source/controller/inc/MultipleChartConverters.hxx
index f4d61154b04e..8fc9f33b4367 100644
--- a/chart2/source/controller/inc/MultipleChartConverters.hxx
+++ b/chart2/source/controller/inc/MultipleChartConverters.hxx
@@ -19,23 +19,25 @@
#pragma once
#include "MultipleItemConverter.hxx"
+#include <com/sun/star/awt/Size.hpp>
+#include <rtl/ref.hxx>
+#include <optional>
-namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
-
+namespace chart { class ChartModel; }
class SdrModel;
namespace chart::wrapper {
-class AllAxisItemConverter : public MultipleItemConverter
+class AllAxisItemConverter final : public MultipleItemConverter
{
public:
AllAxisItemConverter(
- const css::uno::Reference<css::frame::XModel> & xChartModel,
+ const rtl::Reference<::chart::ChartModel> & xChartModel,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
- const css::awt::Size* pRefSize );
+ const std::optional<css::awt::Size>& pRefSize );
virtual ~AllAxisItemConverter() override;
@@ -43,11 +45,11 @@ protected:
virtual const WhichRangesContainer& GetWhichPairs() const override;
};
-class AllGridItemConverter : public MultipleItemConverter
+class AllGridItemConverter final : public MultipleItemConverter
{
public:
AllGridItemConverter(
- const css::uno::Reference<css::frame::XModel>& xChartModel,
+ const rtl::Reference<::chart::ChartModel>& xChartModel,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const css::uno::Reference<css::lang::XMultiServiceFactory> & xNamedPropertyContainerFactory );
@@ -57,11 +59,11 @@ protected:
virtual const WhichRangesContainer& GetWhichPairs() const override;
};
-class AllDataLabelItemConverter : public MultipleItemConverter
+class AllDataLabelItemConverter final : public MultipleItemConverter
{
public:
AllDataLabelItemConverter(
- const css::uno::Reference<css::frame::XModel>& xChartModel,
+ const rtl::Reference<::chart::ChartModel>& xChartModel,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory );
@@ -72,11 +74,11 @@ protected:
virtual const WhichRangesContainer& GetWhichPairs() const override;
};
-class AllTitleItemConverter : public MultipleItemConverter
+class AllTitleItemConverter final : public MultipleItemConverter
{
public:
AllTitleItemConverter(
- const css::uno::Reference<css::frame::XModel>& xChartModel,
+ const rtl::Reference<::chart::ChartModel>& xChartModel,
SfxItemPool& rItemPool, SdrModel& rDrawModel,
const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory );
@@ -86,11 +88,11 @@ protected:
virtual const WhichRangesContainer& GetWhichPairs() const override;
};
-class AllSeriesStatisticsConverter : public MultipleItemConverter
+class AllSeriesStatisticsConverter final : public MultipleItemConverter
{
public:
AllSeriesStatisticsConverter(
- const css::uno::Reference<css::frame::XModel>& xChartModel, SfxItemPool& rItemPool );
+ const rtl::Reference<::chart::ChartModel>& xChartModel, SfxItemPool& rItemPool );
virtual ~AllSeriesStatisticsConverter() override;
protected:
diff --git a/chart2/source/controller/inc/ObjectHierarchy.hxx b/chart2/source/controller/inc/ObjectHierarchy.hxx
index bac8deec2204..1531866aaf2b 100644
--- a/chart2/source/controller/inc/ObjectHierarchy.hxx
+++ b/chart2/source/controller/inc/ObjectHierarchy.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <ChartModel.hxx>
#include <ObjectIdentifier.hxx>
#include <map>
#include <vector>
@@ -41,7 +42,7 @@ public:
used for keyboard navigation).
*/
explicit ObjectHierarchy(
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDocument,
+ const rtl::Reference<::chart::ChartModel> & xChartDocument,
ExplicitValueProvider * pExplicitValueProvider,
bool bFlattenDiagram = false,
bool bOrderingForElementSelector = false );
@@ -51,11 +52,10 @@ public:
static bool isRootNode( const ObjectIdentifier& rOID );
/// equal to getChildren( getRootNodeOID())
- const tChildContainer & getTopLevelChildren() const;
- bool hasChildren( const ObjectIdentifier& rParent ) const;
- const tChildContainer & getChildren( const ObjectIdentifier& rParent ) const;
-
- const tChildContainer & getSiblings( const ObjectIdentifier& rNode ) const;
+ const tChildContainer& getTopLevelChildren() const;
+ bool hasChildren(const ObjectIdentifier& rParent) const;
+ const tChildContainer& getChildren(const ObjectIdentifier& rParent) const;
+ const tChildContainer& getSiblings(const ObjectIdentifier& rNode) const;
/// The result is empty, if the node cannot be found in the tree
ObjectIdentifier getParent( const ObjectIdentifier& rNode ) const;
@@ -63,32 +63,31 @@ public:
sal_Int32 getIndexInParent( const ObjectIdentifier& rNode ) const;
private:
- void createTree( const css::uno::Reference< css::chart2::XChartDocument > & xChartDocument );
+ void createTree( const rtl::Reference<::chart::ChartModel> & xChartDocument );
void createAxesTree(
- ObjectHierarchy::tChildContainer & rContainer,
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc,
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ tChildContainer & rContainer,
+ const rtl::Reference<::chart::ChartModel> & xChartDoc,
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
void createDiagramTree(
- ObjectHierarchy::tChildContainer& rContainer,
- const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc,
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ tChildContainer& rContainer,
+ const rtl::Reference<::chart::ChartModel>& xChartDoc,
+ const rtl::Reference< ::chart::Diagram >& xDiagram );
void createDataSeriesTree(
- ObjectHierarchy::tChildContainer & rOutDiagramSubContainer,
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ tChildContainer & rOutDiagramSubContainer,
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
static void createWallAndFloor(
- ObjectHierarchy::tChildContainer & rContainer,
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ tChildContainer & rContainer,
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
void createLegendTree(
- ObjectHierarchy::tChildContainer & rContainer,
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc,
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
- void createAdditionalShapesTree( ObjectHierarchy::tChildContainer& rContainer );
+ tChildContainer & rContainer,
+ const rtl::Reference<::chart::ChartModel> & xChartDoc,
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
+ void createAdditionalShapesTree(tChildContainer& rContainer);
ObjectIdentifier getParentImpl(
const ObjectIdentifier& rParentOID,
const ObjectIdentifier& rOID ) const;
- typedef std::map< ObjectIdentifier, ObjectHierarchy::tChildContainer >
- tChildMap;
+ typedef std::map<ObjectIdentifier, tChildContainer> tChildMap;
tChildMap m_aChildMap;
ExplicitValueProvider* m_pExplicitValueProvider;
bool m_bFlattenDiagram;
@@ -98,8 +97,8 @@ private:
class ObjectKeyNavigation
{
public:
- explicit ObjectKeyNavigation( const ObjectIdentifier & rCurrentOID,
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDocument,
+ explicit ObjectKeyNavigation( ObjectIdentifier aCurrentOID,
+ rtl::Reference<::chart::ChartModel> xChartDocument,
ExplicitValueProvider * pExplicitValueProvider );
bool handleKeyEvent( const css::awt::KeyEvent & rEvent );
@@ -117,7 +116,7 @@ private:
bool veryLast();
ObjectIdentifier m_aCurrentOID;
- css::uno::Reference< css::chart2::XChartDocument > m_xChartDocument;
+ rtl::Reference<::chart::ChartModel> m_xChartDocument;
ExplicitValueProvider * m_pExplicitValueProvider;
};
diff --git a/chart2/source/controller/inc/ObjectNameProvider.hxx b/chart2/source/controller/inc/ObjectNameProvider.hxx
index 07551aefa1d7..c613dd5ce855 100644
--- a/chart2/source/controller/inc/ObjectNameProvider.hxx
+++ b/chart2/source/controller/inc/ObjectNameProvider.hxx
@@ -35,34 +35,33 @@ class ObjectNameProvider
{
public:
static OUString getName( ObjectType eObjectType, bool bPlural=false );
- static OUString getAxisName( const OUString& rObjectCID
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
- static OUString getGridName( const OUString& rObjectCID
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
- static OUString getTitleName( const OUString& rObjectCID
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
+ static OUString getAxisName( std::u16string_view rObjectCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
+ static OUString getGridName( std::u16string_view rObjectCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
+ static OUString getTitleName( std::u16string_view rObjectCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
static OUString getTitleNameByType( TitleHelper::eTitleType eType );
static OUString getNameForCID(
- const OUString& rObjectCID,
- const css::uno::Reference< css::chart2::XChartDocument >& xChartDocument );
+ std::u16string_view rObjectCID,
+ const rtl::Reference<::chart::ChartModel>& xChartDocument );
static OUString getName_ObjectForSeries(
ObjectType eObjectType,
- const OUString& rSeriesCID,
- const css::uno::Reference< css::chart2::XChartDocument >& xChartDocument );
+ std::u16string_view rSeriesCID,
+ const rtl::Reference<::chart::ChartModel>& xChartDocument );
static OUString getName_ObjectForAllSeries( ObjectType eObjectType );
/** Provides help texts for the various chart elements.
The parameter rObjectCID has to be a ClassifiedIdentifier - see class ObjectIdentifier.
*/
- static OUString getHelpText( const OUString& rObjectCID, const css::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel, bool bVerbose=false );
- static OUString getHelpText( const OUString& rObjectCID, const css::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDocument );
+ static OUString getHelpText( std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartModel, bool bVerbose=false );
/** This is used for showing the currently selected object in the status bar
(command "Context")
*/
- static OUString getSelectedObjectText( const OUString & rObjectCID, const css::uno::Reference< css::chart2::XChartDocument >& xChartDocument );
+ static OUString getSelectedObjectText( std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartDocument );
};
} //namespace chart
diff --git a/chart2/source/controller/inc/PositionAndSizeHelper.hxx b/chart2/source/controller/inc/PositionAndSizeHelper.hxx
index d1c72c20bd1f..0f79373d52f9 100644
--- a/chart2/source/controller/inc/PositionAndSizeHelper.hxx
+++ b/chart2/source/controller/inc/PositionAndSizeHelper.hxx
@@ -36,8 +36,8 @@ public:
, const css::awt::Rectangle& rOldPositionAndSize
, const css::awt::Rectangle& rPageRectangle );
- static bool moveObject( const OUString& rObjectCID
- , const css::uno::Reference< css::frame::XModel >& xChartModel
+ static bool moveObject( std::u16string_view rObjectCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel
, const css::awt::Rectangle& rNewPositionAndSize
, const css::awt::Rectangle& rOldPositionAndSize
, const css::awt::Rectangle& rPageRectangle );
diff --git a/chart2/source/controller/inc/RangeSelectionHelper.hxx b/chart2/source/controller/inc/RangeSelectionHelper.hxx
index f04d763e1636..36fe0db99cce 100644
--- a/chart2/source/controller/inc/RangeSelectionHelper.hxx
+++ b/chart2/source/controller/inc/RangeSelectionHelper.hxx
@@ -21,6 +21,7 @@
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Sequence.h>
#include <rtl/ustring.hxx>
+#include <rtl/ref.hxx>
namespace com::sun::star::beans { struct PropertyValue; }
namespace com::sun::star::chart2 { class XChartDocument; }
@@ -34,14 +35,14 @@ namespace com::sun::star {
namespace chart
{
-
+class ChartModel;
class RangeSelectionListenerParent;
class RangeSelectionHelper
{
public:
explicit RangeSelectionHelper(
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDocument );
+ rtl::Reference<::chart::ChartModel> xChartDocument );
~RangeSelectionHelper();
bool hasRangeSelection();
@@ -59,8 +60,7 @@ private:
css::uno::Reference< css::sheet::XRangeSelection >
m_xRangeSelection;
- css::uno::Reference< css::chart2::XChartDocument >
- m_xChartDocument;
+ rtl::Reference<::chart::ChartModel> m_xChartDocument;
css::uno::Reference< css::sheet::XRangeSelectionListener >
m_xRangeSelectionListener;
diff --git a/chart2/source/controller/inc/RangeSelectionListener.hxx b/chart2/source/controller/inc/RangeSelectionListener.hxx
index f060a2aa95d3..9117b4d9b2fc 100644
--- a/chart2/source/controller/inc/RangeSelectionListener.hxx
+++ b/chart2/source/controller/inc/RangeSelectionListener.hxx
@@ -21,6 +21,7 @@
#include <ControllerLockGuard.hxx>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/sheet/XRangeSelectionListener.hpp>
+#include <rtl/ref.hxx>
namespace com::sun::star::frame
{
@@ -29,6 +30,8 @@ class XModel;
namespace chart
{
+class ChartModel;
+
class RangeSelectionListenerParent
{
public:
@@ -39,12 +42,13 @@ protected:
~RangeSelectionListenerParent() {}
};
-class RangeSelectionListener : public ::cppu::WeakImplHelper<css::sheet::XRangeSelectionListener>
+class RangeSelectionListener final
+ : public ::cppu::WeakImplHelper<css::sheet::XRangeSelectionListener>
{
public:
explicit RangeSelectionListener(
- RangeSelectionListenerParent& rParent, const OUString& rInitialRange,
- const css::uno::Reference<css::frame::XModel>& xModelToLockController);
+ RangeSelectionListenerParent& rParent, OUString aInitialRange,
+ const rtl::Reference<::chart::ChartModel>& xModelToLockController);
virtual ~RangeSelectionListener() override;
protected:
diff --git a/chart2/source/controller/inc/RegressionCurveItemConverter.hxx b/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
index a374796f846c..8c4262b55ec5 100644
--- a/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
+++ b/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
@@ -19,21 +19,22 @@
#pragma once
#include "ItemConverter.hxx"
+#include <rtl/ref.hxx>
namespace com::sun::star::chart2 { class XRegressionCurveContainer; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
-
+namespace chart { class DataSeries; }
class SdrModel;
namespace chart::wrapper
{
-class RegressionCurveItemConverter : public ItemConverter
+class RegressionCurveItemConverter final : public ItemConverter
{
public:
RegressionCurveItemConverter(
const css::uno::Reference< css::beans::XPropertySet > & rPropertySet,
- const css::uno::Reference< css::chart2::XRegressionCurveContainer > & xRegCurveCnt,
+ rtl::Reference< ::chart::DataSeries > xRegCurveCnt,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory );
@@ -51,7 +52,7 @@ protected:
private:
std::shared_ptr< ItemConverter > m_spGraphicConverter;
- css::uno::Reference< css::chart2::XRegressionCurveContainer > m_xCurveContainer;
+ rtl::Reference< ::chart::DataSeries > m_xCurveContainer;
};
} // namespace chart::wrapper
diff --git a/chart2/source/controller/inc/RegressionEquationItemConverter.hxx b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
index 0ab13a086a96..83394b1ea45d 100644
--- a/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
+++ b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
@@ -19,10 +19,10 @@
#pragma once
#include "ItemConverter.hxx"
-
+#include <com/sun/star/awt/Size.hpp>
+#include <optional>
#include <vector>
-namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::beans { class XPropertySet; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
@@ -30,7 +30,7 @@ class SdrModel;
namespace chart::wrapper {
-class RegressionEquationItemConverter : public ItemConverter
+class RegressionEquationItemConverter final : public ItemConverter
{
public:
RegressionEquationItemConverter(
@@ -38,7 +38,7 @@ public:
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
- const css::awt::Size* pRefSize );
+ const std::optional<css::awt::Size>& pRefSize );
virtual ~RegressionEquationItemConverter() override;
diff --git a/chart2/source/controller/inc/SelectionHelper.hxx b/chart2/source/controller/inc/SelectionHelper.hxx
index c5c2ed551510..119640bd4300 100644
--- a/chart2/source/controller/inc/SelectionHelper.hxx
+++ b/chart2/source/controller/inc/SelectionHelper.hxx
@@ -38,7 +38,8 @@ public: //methods
const ObjectIdentifier& getSelectedOID() const { return m_aSelectedOID;}
bool isResizeableObjectSelected() const;
- bool isRotateableObjectSelected( const css::uno::Reference< css::frame::XModel >& xChartModel ) const;
+ bool isRotateableObjectSelected( const rtl::Reference<::chart::ChartModel>& xChartModel ) const;
+ bool isTitleObjectSelected() const;
bool isDragableObjectSelected() const;
bool isAdditionalShapeSelected() const;
@@ -72,7 +73,7 @@ private: //member
ObjectIdentifier m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing;
};
-class SelectionHelper : public MarkHandleProvider
+class SelectionHelper final : public MarkHandleProvider
{
public:
static bool findNamedParent( SdrObject*& pInOutObject
@@ -92,8 +93,8 @@ public:
DrawViewWrapper const & rDrawViewWrapper,
bool bGetDiagramInsteadOf_Wall=false );
- static bool isRotateableObject( const OUString& rCID
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
+ static bool isRotateableObject( std::u16string_view rCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
explicit SelectionHelper( SdrObject* pSelectedObj );
virtual ~SelectionHelper();
diff --git a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
index bb5b2c441a7d..b55457ac5b30 100644
--- a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
+++ b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
@@ -20,21 +20,25 @@
#include "ItemConverter.hxx"
#include <com/sun/star/uno/Sequence.h>
+#include <rtl/ref.hxx>
namespace com::sun::star::chart2 { class XCoordinateSystem; }
namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::uno { class XComponentContext; }
+namespace chart { class ChartModel; }
+namespace chart { class BaseCoordinateSystem; }
+namespace chart { class DataSeries; }
namespace chart::wrapper
{
-class SeriesOptionsItemConverter : public ItemConverter
+class SeriesOptionsItemConverter final : public ItemConverter
{
public:
SeriesOptionsItemConverter(
- const css::uno::Reference< css::frame::XModel > & xChartModel,
- const css::uno::Reference< css::uno::XComponentContext > & xContext,
- const css::uno::Reference< css::beans::XPropertySet > & rPropertySet,
+ const rtl::Reference<::chart::ChartModel> & xChartModel,
+ css::uno::Reference< css::uno::XComponentContext > xContext,
+ const rtl::Reference<::chart::DataSeries> & rPropertySet,
SfxItemPool& rItemPool );
virtual ~SeriesOptionsItemConverter() override;
@@ -46,7 +50,7 @@ protected:
virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & rItemSet ) override;
private:
- css::uno::Reference< css::frame::XModel > m_xChartModel;
+ rtl::Reference<::chart::ChartModel> m_xChartModel;
css::uno::Reference< css::uno::XComponentContext> m_xCC;
bool m_bAttachToMainAxis;
@@ -64,7 +68,7 @@ private:
sal_Int32 m_nStartingAngle;
bool m_bClockwise;
- css::uno::Reference< css::chart2::XCoordinateSystem > m_xCooSys;
+ rtl::Reference< ::chart::BaseCoordinateSystem > m_xCooSys;
css::uno::Sequence< sal_Int32 > m_aSupportedMissingValueTreatments;
sal_Int32 m_nMissingValueTreatment;
diff --git a/chart2/source/controller/inc/ShapeController.h b/chart2/source/controller/inc/ShapeController.h
deleted file mode 100644
index 392c28d2fe4c..000000000000
--- a/chart2/source/controller/inc/ShapeController.h
+++ /dev/null
@@ -1,38 +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 CHART_SHAPECONTROLLER_H
-#define CHART_SHAPECONTROLLER_H
-
-//Command Ids:
-#define COMMAND_ID_FORMAT_LINE 1
-#define COMMAND_ID_FORMAT_AREA 2
-#define COMMAND_ID_TEXT_ATTRIBUTES 3
-#define COMMAND_ID_TRANSFORM_DIALOG 4
-#define COMMAND_ID_OBJECT_TITLE_DESCRIPTION 5
-#define COMMAND_ID_RENAME_OBJECT 6
-#define COMMAND_ID_BRING_TO_FRONT 8
-#define COMMAND_ID_FORWARD 9
-#define COMMAND_ID_BACKWARD 10
-#define COMMAND_ID_SEND_TO_BACK 11
-#define COMMAND_ID_FONT_DIALOG 15
-#define COMMAND_ID_PARAGRAPH_DIALOG 16
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/StatisticsItemConverter.hxx b/chart2/source/controller/inc/StatisticsItemConverter.hxx
index d94759c30ecd..a6c56a2691e7 100644
--- a/chart2/source/controller/inc/StatisticsItemConverter.hxx
+++ b/chart2/source/controller/inc/StatisticsItemConverter.hxx
@@ -19,17 +19,19 @@
#pragma once
#include "ItemConverter.hxx"
+#include <rtl/ref.hxx>
namespace com::sun::star::frame { class XModel; }
+namespace chart { class ChartModel; }
namespace chart::wrapper
{
-class StatisticsItemConverter : public ItemConverter
+class StatisticsItemConverter final : public ItemConverter
{
public:
StatisticsItemConverter(
- const css::uno::Reference< css::frame::XModel > & xChartModel,
+ rtl::Reference<::chart::ChartModel> xChartModel,
const css::uno::Reference< css::beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool );
virtual ~StatisticsItemConverter() override;
@@ -42,7 +44,7 @@ protected:
virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & rItemSet ) override;
private:
- css::uno::Reference< css::frame::XModel > m_xModel;
+ rtl::Reference<::chart::ChartModel> m_xModel;
};
} // namespace chart::wrapper
diff --git a/chart2/source/controller/inc/TabPageNotifiable.hxx b/chart2/source/controller/inc/TabPageNotifiable.hxx
index 440cda2de9aa..c0b53972e546 100644
--- a/chart2/source/controller/inc/TabPageNotifiable.hxx
+++ b/chart2/source/controller/inc/TabPageNotifiable.hxx
@@ -18,6 +18,8 @@
*/
#pragma once
+#include <sal/types.h>
+
// color to use as foreground for an invalid range
#define RANGE_SELECTION_INVALID_RANGE_FOREGROUND_COLOR COL_WHITE
// color to use as background for an invalid range
@@ -27,7 +29,7 @@ class BuilderPage;
namespace chart
{
-class TabPageNotifiable
+class SAL_LOPLUGIN_ANNOTATE("crosscast") TabPageNotifiable
{
public:
virtual void setInvalidPage(BuilderPage* pTabPage) = 0;
diff --git a/chart2/source/controller/inc/TextDirectionListBox.hxx b/chart2/source/controller/inc/TextDirectionListBox.hxx
index 208e0df6cf02..d346a23cb45d 100644
--- a/chart2/source/controller/inc/TextDirectionListBox.hxx
+++ b/chart2/source/controller/inc/TextDirectionListBox.hxx
@@ -23,7 +23,7 @@
namespace chart
{
-class TextDirectionListBox : public svx::FrameDirectionListBox
+class TextDirectionListBox final : public svx::FrameDirectionListBox
{
public:
explicit TextDirectionListBox(std::unique_ptr<weld::ComboBox> pControl);
diff --git a/chart2/source/controller/inc/TextLabelItemConverter.hxx b/chart2/source/controller/inc/TextLabelItemConverter.hxx
index 3d06e9d9b63f..cb5406cf6a01 100644
--- a/chart2/source/controller/inc/TextLabelItemConverter.hxx
+++ b/chart2/source/controller/inc/TextLabelItemConverter.hxx
@@ -20,25 +20,28 @@
#include "ItemConverter.hxx"
+#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/uno/Sequence.h>
-
+#include <rtl/ref.hxx>
+#include <optional>
#include <vector>
-namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::chart2 { class XDataSeries; }
namespace com::sun::star::frame { class XModel; }
+namespace chart { class ChartModel; }
+namespace chart { class DataSeries; }
namespace chart::wrapper {
-class TextLabelItemConverter : public ItemConverter
+class TextLabelItemConverter final : public ItemConverter
{
public:
TextLabelItemConverter(
- const css::uno::Reference<css::frame::XModel>& xChartModel,
+ const rtl::Reference<::chart::ChartModel>& xChartModel,
const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
- const css::uno::Reference<css::chart2::XDataSeries>& xSeries,
+ const rtl::Reference<::chart::DataSeries>& xSeries,
SfxItemPool& rItemPool,
- const css::awt::Size* pRefSize,
+ const std::optional<css::awt::Size>& pRefSize,
bool bDataSeries,
sal_Int32 nNumberFormat,
sal_Int32 nPercentNumberFormat );
@@ -64,7 +67,7 @@ private:
bool mbDataSeries:1;
bool mbForbidPercentValue:1;
- css::uno::Reference<css::chart2::XDataSeries> m_xSeries;
+ rtl::Reference<::chart::DataSeries> m_xSeries;
};
}
diff --git a/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx b/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
index f8e899df1d19..49541b1552d4 100644
--- a/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
+++ b/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
@@ -19,8 +19,8 @@
#pragma once
-#include <com/sun/star/uno/Reference.h>
#include <vcl/timer.hxx>
+#include <rtl/ref.hxx>
#include <memory>
@@ -35,16 +35,18 @@ class ControllerLockGuardUNO;
namespace chart
{
+class ChartModel;
+
class TimerTriggeredControllerLock final
{
public:
- TimerTriggeredControllerLock(const css::uno::Reference<css::frame::XModel>& xModel);
+ TimerTriggeredControllerLock(rtl::Reference<::chart::ChartModel> xModel);
~TimerTriggeredControllerLock();
void startTimer();
private:
- css::uno::Reference<css::frame::XModel> m_xModel;
+ rtl::Reference<::chart::ChartModel> m_xModel;
std::unique_ptr<ControllerLockGuardUNO> m_apControllerLockGuard;
AutoTimer m_aTimer;
diff --git a/chart2/source/controller/inc/TitleDialogData.hxx b/chart2/source/controller/inc/TitleDialogData.hxx
index c69205169699..123ae9d6d65f 100644
--- a/chart2/source/controller/inc/TitleDialogData.hxx
+++ b/chart2/source/controller/inc/TitleDialogData.hxx
@@ -19,31 +19,32 @@
#pragma once
#include <ReferenceSizeProvider.hxx>
-#include <memory>
#include <com/sun/star/uno/Sequence.hxx>
+#include <rtl/ref.hxx>
namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{
+class ChartModel;
struct TitleDialogData
{
css::uno::Sequence< sal_Bool > aPossibilityList;
css::uno::Sequence< sal_Bool > aExistenceList;
css::uno::Sequence< OUString > aTextList;
- std::unique_ptr< ReferenceSizeProvider > apReferenceSizeProvider;
+ std::optional< ReferenceSizeProvider > apReferenceSizeProvider;
- TitleDialogData(std::unique_ptr<ReferenceSizeProvider> pReferenzeSizeProvider = nullptr);
+ TitleDialogData(std::optional<ReferenceSizeProvider> pReferenzeSizeProvider = std::nullopt);
- void readFromModel( const css::uno::Reference< css::frame::XModel >& xChartModel );
+ void readFromModel( const rtl::Reference<::chart::ChartModel>& xChartModel );
/* return true if anything has changed;
when pOldState is NULL then all data are written to the model
*/
- bool writeDifferenceToModel( const css::uno::Reference< css::frame::XModel >& xChartModel
+ bool writeDifferenceToModel( const rtl::Reference<::chart::ChartModel>& xChartModel
, const css::uno::Reference< css::uno::XComponentContext >& xContext
- , TitleDialogData* pOldState=nullptr );
+ , const TitleDialogData* pOldState=nullptr );
};
} //namespace chart
diff --git a/chart2/source/controller/inc/TitleItemConverter.hxx b/chart2/source/controller/inc/TitleItemConverter.hxx
index e9335d3a3d19..4a306b690363 100644
--- a/chart2/source/controller/inc/TitleItemConverter.hxx
+++ b/chart2/source/controller/inc/TitleItemConverter.hxx
@@ -20,23 +20,24 @@
#include "ItemConverter.hxx"
+#include <com/sun/star/awt/Size.hpp>
+#include <optional>
#include <vector>
-namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
class SdrModel;
namespace chart::wrapper {
-class TitleItemConverter : public ItemConverter
+class TitleItemConverter final : public ItemConverter
{
public:
TitleItemConverter(
const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
SfxItemPool& rItemPool, SdrModel& rDrawModel,
const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
- const css::awt::Size* pRefSize );
+ const std::optional<css::awt::Size>& pRefSize );
virtual ~TitleItemConverter() override;
diff --git a/chart2/source/controller/inc/dlg_ChartType.hxx b/chart2/source/controller/inc/dlg_ChartType.hxx
index d2864f3fd577..02e6ac998bbc 100644
--- a/chart2/source/controller/inc/dlg_ChartType.hxx
+++ b/chart2/source/controller/inc/dlg_ChartType.hxx
@@ -19,6 +19,7 @@
#pragma once
#include <vcl/weld.hxx>
+#include <rtl/ref.hxx>
namespace com::sun::star::frame
{
@@ -27,16 +28,17 @@ class XModel;
namespace chart
{
+class ChartModel;
class ChartTypeTabPage;
-class ChartTypeDialog : public weld::GenericDialogController
+
+class ChartTypeDialog final : public weld::GenericDialogController
{
public:
- ChartTypeDialog(weld::Window* pWindow,
- const css::uno::Reference<css::frame::XModel>& xChartModel);
+ ChartTypeDialog(weld::Window* pWindow, rtl::Reference<::chart::ChartModel> xChartModel);
virtual ~ChartTypeDialog() override;
private:
- css::uno::Reference<css::frame::XModel> m_xChartModel;
+ rtl::Reference<::chart::ChartModel> m_xChartModel;
std::unique_ptr<weld::Container> m_xContentArea;
std::unique_ptr<ChartTypeTabPage> m_xChartTypeTabPage;
};
diff --git a/chart2/source/controller/inc/dlg_ChartType_UNO.hxx b/chart2/source/controller/inc/dlg_ChartType_UNO.hxx
index c3aaa4222a6a..4566ec75142d 100644
--- a/chart2/source/controller/inc/dlg_ChartType_UNO.hxx
+++ b/chart2/source/controller/inc/dlg_ChartType_UNO.hxx
@@ -27,8 +27,10 @@ namespace com::sun::star::beans { class XPropertySetInfo; }
namespace chart
{
+class ChartModel;
+
typedef ::svt::OGenericUnoDialog ChartTypeUnoDlg_BASE;
-class ChartTypeUnoDlg : public ChartTypeUnoDlg_BASE
+class ChartTypeUnoDlg final : public ChartTypeUnoDlg_BASE
,public ::comphelper::OPropertyArrayUsageHelper< ChartTypeUnoDlg >
{
public:
@@ -57,7 +59,7 @@ private:
ChartTypeUnoDlg(const ChartTypeUnoDlg&) = delete;
void operator =(const ChartTypeUnoDlg&) = delete;
- css::uno::Reference< css::frame::XModel > m_xChartModel;
+ rtl::Reference<::chart::ChartModel> m_xChartModel;
};
} //namespace chart
diff --git a/chart2/source/controller/inc/dlg_CreationWizard.hxx b/chart2/source/controller/inc/dlg_CreationWizard.hxx
index a8edc627e860..1b782632f4d3 100644
--- a/chart2/source/controller/inc/dlg_CreationWizard.hxx
+++ b/chart2/source/controller/inc/dlg_CreationWizard.hxx
@@ -22,6 +22,7 @@
#include "TimerTriggeredControllerLock.hxx"
#include "TabPageNotifiable.hxx"
+#include <rtl/ref.hxx>
#include <vcl/roadmapwizard.hxx>
#include <memory>
@@ -36,19 +37,18 @@ class XComponentContext;
}
using vcl::WizardTypes::WizardState;
-using vcl::WizardTypes::CommitPageReason;
namespace chart
{
-class DialogModel;
+class ChartModel;
class ChartTypeTemplateProvider;
+class DialogModel;
-class CreationWizard : public vcl::RoadmapWizardMachine, public TabPageNotifiable
+class CreationWizard final : public vcl::RoadmapWizardMachine, public TabPageNotifiable
{
public:
- CreationWizard(weld::Window* pParent,
- const css::uno::Reference<css::frame::XModel>& xChartModel,
- const css::uno::Reference<css::uno::XComponentContext>& xContext);
+ CreationWizard(weld::Window* pParent, const rtl::Reference<::chart::ChartModel>& xChartModel,
+ css::uno::Reference<css::uno::XComponentContext> xContext);
CreationWizard() = delete;
virtual ~CreationWizard() override;
@@ -67,7 +67,7 @@ protected:
private:
virtual std::unique_ptr<BuilderPage> createPage(WizardState nState) override;
- css::uno::Reference<css::chart2::XChartDocument> m_xChartModel;
+ rtl::Reference<::chart::ChartModel> m_xChartModel;
css::uno::Reference<css::uno::XComponentContext> m_xComponentContext;
ChartTypeTemplateProvider* m_pTemplateProvider;
std::unique_ptr<DialogModel> m_pDialogModel;
diff --git a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
index b58b918c249d..89b8cb5a08f2 100644
--- a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
+++ b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
@@ -19,7 +19,7 @@
#pragma once
-#include <MutexContainer.hxx>
+#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/component.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XTerminateListener.hpp>
@@ -27,6 +27,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp>
+#include <rtl/ref.hxx>
#include "dlg_CreationWizard.hxx"
#include <tools/link.hxx>
@@ -39,8 +40,9 @@ class VclWindowEvent;
namespace chart
{
+class ChartModel;
-class CreationWizardUnoDlg : public MutexContainer
+class CreationWizardUnoDlg final : public cppu::BaseMutex
, public ::cppu::OComponentHelper
, public css::ui::dialogs::XAsynchronousExecutableDialog
, public css::lang::XServiceInfo
@@ -51,7 +53,7 @@ class CreationWizardUnoDlg : public MutexContainer
public:
CreationWizardUnoDlg() = delete;
- CreationWizardUnoDlg( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ CreationWizardUnoDlg( css::uno::Reference< css::uno::XComponentContext > xContext );
virtual ~CreationWizardUnoDlg() override;
// XInterface
@@ -101,7 +103,7 @@ private:
DECL_STATIC_LINK(CreationWizardUnoDlg, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*);
private:
- css::uno::Reference< css::frame::XModel > m_xChartModel;
+ rtl::Reference< ::chart::ChartModel > m_xChartModel;
css::uno::Reference< css::uno::XComponentContext> m_xCC;
css::uno::Reference< css::awt::XWindow > m_xParentWindow;
diff --git a/chart2/source/controller/inc/dlg_DataEditor.hxx b/chart2/source/controller/inc/dlg_DataEditor.hxx
index 7f0c8141c15a..205e822a12a5 100644
--- a/chart2/source/controller/inc/dlg_DataEditor.hxx
+++ b/chart2/source/controller/inc/dlg_DataEditor.hxx
@@ -20,6 +20,7 @@
#pragma once
#include <vcl/weld.hxx>
+#include <rtl/ref.hxx>
namespace com::sun::star::uno { class XComponentContext; }
namespace comphelper { template <class Tp, class Arg> class mem_fun1_t; }
@@ -32,14 +33,14 @@ namespace com::sun::star {
namespace chart
{
-
+class ChartModel;
class DataBrowser;
-class DataEditor : public weld::GenericDialogController
+class DataEditor final : public weld::GenericDialogController
{
public:
DataEditor(weld::Window* pParent,
- const css::uno::Reference<css::chart2::XChartDocument> & xChartDoc,
+ rtl::Reference<::chart::ChartModel> xChartDoc,
const css::uno::Reference<css::uno::XComponentContext> & xContext);
virtual ~DataEditor() override;
@@ -50,7 +51,7 @@ public:
private:
bool m_bReadOnly;
- css::uno::Reference<css::chart2::XChartDocument> m_xChartDoc;
+ rtl::Reference<::chart::ChartModel> m_xChartDoc;
css::uno::Reference<css::uno::XComponentContext> m_xContext;
std::unique_ptr<weld::Toolbar> m_xTbxData;
@@ -62,7 +63,7 @@ private:
VclPtr<DataBrowser> m_xBrwData;
/// handles actions of the toolbox
- DECL_LINK( ToolboxHdl, const OString&, void );
+ DECL_LINK( ToolboxHdl, const OUString&, void );
/// is called, if the cursor of the table has moved
DECL_LINK( BrowserCursorMovedHdl, DataBrowser*, void);
};
diff --git a/chart2/source/controller/inc/dlg_DataSource.hxx b/chart2/source/controller/inc/dlg_DataSource.hxx
index b1607bc0ccd6..166131e30ec9 100644
--- a/chart2/source/controller/inc/dlg_DataSource.hxx
+++ b/chart2/source/controller/inc/dlg_DataSource.hxx
@@ -28,11 +28,11 @@ class BuilderPage;
namespace chart
{
-
-class RangeChooserTabPage;
-class DataSourceTabPage;
+class ChartModel;
class ChartTypeTemplateProvider;
+class DataSourceTabPage;
class DialogModel;
+class RangeChooserTabPage;
class DataSourceDialog final :
public weld::GenericDialogController,
@@ -41,8 +41,7 @@ class DataSourceDialog final :
public:
explicit DataSourceDialog(
weld::Window * pParent,
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDocument,
- const css::uno::Reference< css::uno::XComponentContext > & xContext );
+ const rtl::Reference<::chart::ChartModel> & xChartDocument );
virtual ~DataSourceDialog() override;
// from GenericDialogController base
@@ -53,8 +52,8 @@ public:
virtual void setValidPage( BuilderPage * pTabPage ) override;
private:
- DECL_LINK(ActivatePageHdl, const OString&, void);
- DECL_LINK(DeactivatePageHdl, const OString&, bool);
+ DECL_LINK(ActivatePageHdl, const OUString&, void);
+ DECL_LINK(DeactivatePageHdl, const OUString&, bool);
std::unique_ptr< ChartTypeTemplateProvider > m_apDocTemplateProvider;
std::unique_ptr< DialogModel > m_apDialogModel;
diff --git a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
index d799f1765078..2b265c7d6541 100644
--- a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
+++ b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
@@ -38,7 +38,6 @@ struct InsertAxisOrGridDialogData
\************************************************************************/
class SchAxisDlg : public weld::GenericDialogController
{
-protected:
std::unique_ptr<weld::CheckButton> m_xCbPrimaryX;
std::unique_ptr<weld::CheckButton> m_xCbPrimaryY;
std::unique_ptr<weld::CheckButton> m_xCbPrimaryZ;
@@ -57,7 +56,7 @@ public:
|* Grid dialog
|*
\************************************************************************/
-class SchGridDlg : public SchAxisDlg
+class SchGridDlg final : public SchAxisDlg
{
public:
SchGridDlg(weld::Window* pParent, const InsertAxisOrGridDialogData& rInput);
diff --git a/chart2/source/controller/inc/dlg_InsertDataLabel.hxx b/chart2/source/controller/inc/dlg_InsertDataLabel.hxx
index 54c280ade2fc..7777db3c9696 100644
--- a/chart2/source/controller/inc/dlg_InsertDataLabel.hxx
+++ b/chart2/source/controller/inc/dlg_InsertDataLabel.hxx
@@ -28,7 +28,7 @@ namespace chart
{
class DataLabelResources;
-class DataLabelsDialog : public weld::GenericDialogController
+class DataLabelsDialog final : public weld::GenericDialogController
{
private:
std::unique_ptr<DataLabelResources> m_apDataLabelResources;
diff --git a/chart2/source/controller/inc/dlg_InsertDataTable.hxx b/chart2/source/controller/inc/dlg_InsertDataTable.hxx
new file mode 100644
index 000000000000..cd77099864c4
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_InsertDataTable.hxx
@@ -0,0 +1,52 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include <vcl/weld.hxx>
+#include "res_DataTableProperties.hxx"
+
+namespace chart
+{
+/** The data table properties (data) used by the dialog */
+struct DataTableDialogData
+{
+ bool mbShow = true;
+ bool mbHorizontalBorders = false;
+ bool mbVerticalBorders = false;
+ bool mbOutline = false;
+ bool mbKeys = false;
+};
+
+/** The dialog to change the data table specific properties */
+class InsertDataTableDialog final : public weld::GenericDialogController
+{
+private:
+ DataTablePropertiesResources m_aDataTablePropertiesResources;
+ std::unique_ptr<weld::CheckButton> m_xCbShowDataTable;
+
+ DataTableDialogData m_aData;
+
+ DECL_LINK(ShowDataTableToggle, weld::Toggleable&, void);
+
+ void changeEnabled();
+
+public:
+ InsertDataTableDialog(weld::Window* pParent);
+
+ /** Set the initial state of the data table properties */
+ void init(DataTableDialogData const& rData);
+
+ /** Get the state of the data table properties from the dialog */
+ DataTableDialogData& getDataTableDialogData();
+};
+
+} //namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_InsertErrorBars.hxx b/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
index d4ef7ec80ef2..4f8e8d094a34 100644
--- a/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
+++ b/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
@@ -31,19 +31,21 @@ class XModel;
namespace chart
{
-class InsertErrorBarsDialog : public weld::GenericDialogController
+class ChartView;
+
+class InsertErrorBarsDialog final : public weld::GenericDialogController
{
public:
InsertErrorBarsDialog(weld::Window* pParent, const SfxItemSet& rMyAttrs,
- const css::uno::Reference<css::chart2::XChartDocument>& xChartDocument,
+ const rtl::Reference<::chart::ChartModel>& xChartDocument,
ErrorBarResources::tErrorBarType eType);
void SetAxisMinorStepWidthForErrorBarDecimals(double fMinorStepWidth);
- static double getAxisMinorStepWidthForErrorBarDecimals(
- const css::uno::Reference<css::frame::XModel>& xChartModel,
- const css::uno::Reference<css::uno::XInterface>& xChartView,
- const OUString& rSelectedObjectCID);
+ static double
+ getAxisMinorStepWidthForErrorBarDecimals(const rtl::Reference<::chart::ChartModel>& xChartModel,
+ const rtl::Reference<::chart::ChartView>& xChartView,
+ std::u16string_view rSelectedObjectCID);
void FillItemSet(SfxItemSet& rOutAttrs);
diff --git a/chart2/source/controller/inc/dlg_InsertLegend.hxx b/chart2/source/controller/inc/dlg_InsertLegend.hxx
index de073bb0f0bb..0e2cccc3809a 100644
--- a/chart2/source/controller/inc/dlg_InsertLegend.hxx
+++ b/chart2/source/controller/inc/dlg_InsertLegend.hxx
@@ -19,6 +19,7 @@
#pragma once
#include <vcl/weld.hxx>
+#include <rtl/ref.hxx>
#include <memory>
@@ -29,8 +30,9 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{
+class ChartModel;
-class SchLegendDlg : public weld::GenericDialogController
+class SchLegendDlg final : public weld::GenericDialogController
{
private:
std::unique_ptr<LegendPositionResources> m_xLegendPositionResources;
@@ -38,8 +40,8 @@ private:
public:
SchLegendDlg(weld::Window* pParent, const css::uno::Reference< css::uno::XComponentContext>& xCC);
- void init( const css::uno::Reference< css::frame::XModel >& xChartModel );
- void writeToModel( const css::uno::Reference< css::frame::XModel >& xChartModel ) const;
+ void init( const rtl::Reference<::chart::ChartModel>& xChartModel );
+ void writeToModel( const rtl::Reference<::chart::ChartModel>& xChartModel ) const;
};
} //namespace chart
diff --git a/chart2/source/controller/inc/dlg_InsertTitle.hxx b/chart2/source/controller/inc/dlg_InsertTitle.hxx
index 77c3926b3134..096628529e9f 100644
--- a/chart2/source/controller/inc/dlg_InsertTitle.hxx
+++ b/chart2/source/controller/inc/dlg_InsertTitle.hxx
@@ -24,7 +24,7 @@
namespace chart
{
-class SchTitleDlg : public weld::GenericDialogController
+class SchTitleDlg final : public weld::GenericDialogController
{
private:
std::unique_ptr<TitleResources> m_xTitleResources;
diff --git a/chart2/source/controller/inc/dlg_ObjectProperties.hxx b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
index deb096dcdc95..621f096753e4 100644
--- a/chart2/source/controller/inc/dlg_ObjectProperties.hxx
+++ b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
@@ -20,9 +20,9 @@
#include <ObjectIdentifier.hxx>
#include <sfx2/tabdlg.hxx>
+#include <vcl/graph.hxx>
namespace com::sun::star::util { class XNumberFormatsSupplier; }
-class Graphic;
namespace chart
{
@@ -30,10 +30,10 @@ namespace chart
class ObjectPropertiesDialogParameter final
{
public:
- ObjectPropertiesDialogParameter( const OUString& rObjectCID );
+ ObjectPropertiesDialogParameter( OUString aObjectCID );
~ObjectPropertiesDialogParameter();
- void init( const css::uno::Reference< css::frame::XModel >& xModel );
+ void init( const rtl::Reference<::chart::ChartModel>& xModel );
ObjectType getObjectType() const { return m_eObjectType;}
const OUString& getLocalizedName() const { return m_aLocalizedName;}
@@ -57,7 +57,7 @@ public:
bool IsSupportingCategoryPositioning() const { return m_bSupportingCategoryPositioning;}
const css::uno::Sequence< OUString >& GetCategories() const { return m_aCategories;}
- const css::uno::Reference< css::chart2::XChartDocument >&
+ const rtl::Reference<::chart::ChartModel>&
getDocument() const { return m_xChartDocument;}
bool IsComplexCategoriesAxis() const { return m_bComplexCategoriesAxis;}
@@ -92,7 +92,7 @@ private:
bool m_bSupportingCategoryPositioning;
css::uno::Sequence< OUString > m_aCategories;
- css::uno::Reference< css::chart2::XChartDocument > m_xChartDocument;
+ rtl::Reference<::chart::ChartModel> m_xChartDocument;
bool m_bComplexCategoriesAxis;
@@ -107,7 +107,7 @@ private:
class ViewElementListProvider;
-class SchAttribTabDlg : public SfxTabDialogController
+class SchAttribTabDlg final : public SfxTabDialogController
{
private:
const ObjectPropertiesDialogParameter * const m_pParameter;
@@ -115,14 +115,14 @@ private:
SvNumberFormatter* m_pNumberFormatter;
std::optional<SfxItemSet> m_oSymbolShapeProperties;
- std::unique_ptr<Graphic> m_pAutoSymbolGraphic;
+ std::optional<Graphic> m_oAutoSymbolGraphic;
double m_fAxisMinorStepWidthForErrorBarDecimals;
bool m_bOKPressed;
DECL_LINK(OKPressed, weld::Button&, void);
- virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage& rPage) override;
public:
SchAttribTabDlg(weld::Window* pParent, const SfxItemSet* pAttr,
@@ -133,7 +133,7 @@ public:
//pSymbolShapeProperties: Properties to be set on the symbollist shapes
//pAutoSymbolGraphic: Graphic to be shown if AutoSymbol gets selected
- void setSymbolInformation( SfxItemSet&& rSymbolShapeProperties, std::unique_ptr<Graphic> pAutoSymbolGraphic );
+ void setSymbolInformation( SfxItemSet&& rSymbolShapeProperties, std::optional<Graphic> oAutoSymbolGraphic );
void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
diff --git a/chart2/source/controller/inc/dlg_ShapeFont.hxx b/chart2/source/controller/inc/dlg_ShapeFont.hxx
index 372ce9a15b2a..cfeb002fb92d 100644
--- a/chart2/source/controller/inc/dlg_ShapeFont.hxx
+++ b/chart2/source/controller/inc/dlg_ShapeFont.hxx
@@ -26,14 +26,14 @@ class ViewElementListProvider;
/** dialog for font properties of shapes
*/
-class ShapeFontDialog : public SfxTabDialogController
+class ShapeFontDialog final : public SfxTabDialogController
{
public:
ShapeFontDialog(weld::Window* pParent, const SfxItemSet* pAttr,
const ViewElementListProvider* pViewElementListProvider);
private:
- virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage& rPage) override;
const ViewElementListProvider* m_pViewElementListProvider;
};
diff --git a/chart2/source/controller/inc/dlg_ShapeParagraph.hxx b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
index 28d04a33eff4..15d0c014d848 100644
--- a/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
+++ b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
@@ -24,13 +24,13 @@ namespace chart
{
/** dialog for paragraph properties of shapes
*/
-class ShapeParagraphDialog : public SfxTabDialogController
+class ShapeParagraphDialog final : public SfxTabDialogController
{
public:
ShapeParagraphDialog(weld::Window* pParent, const SfxItemSet* pAttr);
private:
- virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage& rPage) override;
};
} // namespace chart
diff --git a/chart2/source/controller/inc/dlg_View3D.hxx b/chart2/source/controller/inc/dlg_View3D.hxx
index e31668e01f38..66c4a8eaf41a 100644
--- a/chart2/source/controller/inc/dlg_View3D.hxx
+++ b/chart2/source/controller/inc/dlg_View3D.hxx
@@ -32,16 +32,16 @@ class ThreeD_SceneGeometry_TabPage;
class ThreeD_SceneAppearance_TabPage;
class ThreeD_SceneIllumination_TabPage;
-class View3DDialog : public weld::GenericDialogController
+class View3DDialog final : public weld::GenericDialogController
{
public:
- View3DDialog(weld::Window* pWindow, const css::uno::Reference<css::frame::XModel>& xChartModel);
+ View3DDialog(weld::Window* pWindow, const rtl::Reference<::chart::ChartModel>& xChartModel);
virtual ~View3DDialog() override;
virtual short run() override;
private:
- DECL_LINK(ActivatePageHdl, const OString&, void);
+ DECL_LINK(ActivatePageHdl, const OUString&, void);
ControllerLockHelper m_aControllerLocker;
diff --git a/chart2/source/controller/inc/helpids.h b/chart2/source/controller/inc/helpids.h
index fe502262339a..775ec1489b42 100644
--- a/chart2/source/controller/inc/helpids.h
+++ b/chart2/source/controller/inc/helpids.h
@@ -19,12 +19,14 @@
#pragma once
-inline constexpr OStringLiteral HID_SCH_WIN_DOCUMENT = "CHART2_HID_SCH_WIN_DOCUMENT";
-inline constexpr OStringLiteral HID_SCH_ERROR_BARS_FROM_DATA = "CHART2_SCH_ERROR_BARS_FROM_DATA";
+#include <rtl/ustring.hxx>
+inline constexpr OUString HID_SCH_WIN_DOCUMENT = u"CHART2_HID_SCH_WIN_DOCUMENT"_ustr;
+inline constexpr OUString HID_SCH_ERROR_BARS_FROM_DATA = u"CHART2_SCH_ERROR_BARS_FROM_DATA"_ustr;
-inline constexpr OStringLiteral HID_SCH_WIZARD_ROADMAP = "CHART2_HID_SCH_WIZARD_ROADMAP";
-inline constexpr OStringLiteral HID_SCH_DATA_SERIES_LABEL = "CHART2_HID_SCH_DATA_SERIES_LABEL";
+
+inline constexpr OUString HID_SCH_WIZARD_ROADMAP = u"CHART2_HID_SCH_WIZARD_ROADMAP"_ustr;
+inline constexpr OUString HID_SCH_DATA_SERIES_LABEL = u"CHART2_HID_SCH_DATA_SERIES_LABEL"_ustr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/res_DataTableProperties.hxx b/chart2/source/controller/inc/res_DataTableProperties.hxx
new file mode 100644
index 000000000000..4b2aaa4f2ef7
--- /dev/null
+++ b/chart2/source/controller/inc/res_DataTableProperties.hxx
@@ -0,0 +1,48 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include <svl/itemset.hxx>
+#include <vcl/weld.hxx>
+
+namespace chart
+{
+/** The shared UI elements for the data table properties */
+class DataTablePropertiesResources final
+{
+private:
+ std::unique_ptr<weld::CheckButton> m_xCbHorizontalBorder;
+ std::unique_ptr<weld::CheckButton> m_xCbVerticalBorder;
+ std::unique_ptr<weld::CheckButton> m_xCbOutilne;
+ std::unique_ptr<weld::CheckButton> m_xCbKeys;
+
+public:
+ DataTablePropertiesResources(weld::Builder& rBuilder);
+
+ void initFromItemSet(SfxItemSet const& rInAttrs);
+ bool writeToItemSet(SfxItemSet& rOutAttrs) const;
+ void setChecksSensitive(bool bSensitive);
+
+ bool getHorizontalBorder() { return m_xCbHorizontalBorder->get_active(); }
+ void setHorizontalBorder(bool bActive) { m_xCbHorizontalBorder->set_active(bActive); }
+
+ bool getVerticalBorder() { return m_xCbVerticalBorder->get_active(); }
+ void setVerticalBorder(bool bActive) { m_xCbVerticalBorder->set_active(bActive); }
+
+ bool getOutline() { return m_xCbOutilne->get_active(); }
+ void setOutline(bool bActive) { m_xCbOutilne->set_active(bActive); }
+
+ bool getKeys() { return m_xCbKeys->get_active(); }
+ void setKeys(bool bActive) { m_xCbKeys->set_active(bActive); }
+};
+
+} //namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx
index 09380c921d3c..c3521d5ba087 100644
--- a/chart2/source/controller/inc/res_ErrorBar.hxx
+++ b/chart2/source/controller/inc/res_ErrorBar.hxx
@@ -23,6 +23,7 @@
#include <svl/itemset.hxx>
#include <svx/chrtitem.hxx>
#include "RangeSelectionListener.hxx"
+#include <rtl/ref.hxx>
namespace com::sun::star::chart2 { class XChartDocument; }
namespace weld { class Builder; }
@@ -41,10 +42,10 @@ namespace weld { class Widget; }
namespace chart
{
-
+class ChartModel;
class RangeSelectionHelper;
-class ErrorBarResources : public RangeSelectionListenerParent
+class ErrorBarResources final : public RangeSelectionListenerParent
{
public:
enum tErrorBarType
@@ -60,7 +61,7 @@ public:
void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
void SetErrorBarType( tErrorBarType eNewType );
void SetChartDocumentForRangeChoosing(
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDocument );
+ const rtl::Reference<::chart::ChartModel> & xChartDocument );
void Reset(const SfxItemSet& rInAttrs);
void FillItemSet(SfxItemSet& rOutAttrs) const;
diff --git a/chart2/source/controller/inc/res_LegendPosition.hxx b/chart2/source/controller/inc/res_LegendPosition.hxx
index 87b96ab558fc..80ccaa85da6e 100644
--- a/chart2/source/controller/inc/res_LegendPosition.hxx
+++ b/chart2/source/controller/inc/res_LegendPosition.hxx
@@ -20,6 +20,7 @@
#include <svl/itemset.hxx>
#include <tools/link.hxx>
+#include <rtl/ref.hxx>
namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::uno { class XComponentContext; }
@@ -30,6 +31,7 @@ namespace weld { class Toggleable; }
namespace chart
{
+class ChartModel;
class LegendPositionResources final
{
@@ -38,12 +40,12 @@ public:
//constructor without Display checkbox
LegendPositionResources(weld::Builder& rBuilder);
//constructor inclusive Display checkbox
- LegendPositionResources(weld::Builder& rBuilder, const css::uno::Reference<
- css::uno::XComponentContext>& xCC );
+ LegendPositionResources(weld::Builder& rBuilder, css::uno::Reference<
+ css::uno::XComponentContext> xCC );
~LegendPositionResources();
- void writeToResources( const css::uno::Reference< css::frame::XModel >& xChartModel );
- void writeToModel( const css::uno::Reference< css::frame::XModel >& xChartModel ) const;
+ void writeToResources( const rtl::Reference<::chart::ChartModel>& xChartModel );
+ void writeToModel( const rtl::Reference<::chart::ChartModel>& xChartModel ) const;
void initFromItemSet( const SfxItemSet& rInAttrs );
void writeToItemSet( SfxItemSet& rOutAttrs ) const;
@@ -55,6 +57,7 @@ public:
private:
void impl_setRadioButtonToggleHdl();
+ void PositionEnable();
private:
css::uno::Reference< css::uno::XComponentContext> m_xCC;
diff --git a/chart2/source/controller/inc/uiobject.hxx b/chart2/source/controller/inc/uiobject.hxx
index 01dc8b500043..6de63f5d3fdf 100644
--- a/chart2/source/controller/inc/uiobject.hxx
+++ b/chart2/source/controller/inc/uiobject.hxx
@@ -14,12 +14,12 @@
#include "ChartWindow.hxx"
-class ChartUIObject : public UIObject
+class ChartUIObject final : public UIObject
{
public:
ChartUIObject(const VclPtr<chart::ChartWindow>& xChartWindow,
- const OUString& rCID);
+ OUString aCID);
StringMap get_state() override;
@@ -32,6 +32,8 @@ public:
virtual OUString get_type() const override;
+ virtual bool equals(const UIObject& rOther) const override;
+
private:
OUString maCID;
@@ -41,7 +43,7 @@ private:
DECL_LINK(PostCommand, void*, void);
};
-class ChartWindowUIObject : public WindowUIObject
+class ChartWindowUIObject final : public WindowUIObject
{
VclPtr<chart::ChartWindow> mxChartWindow;