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.hxx132
-rw-r--r--chart2/source/controller/inc/AccessibleChartView.hxx54
-rw-r--r--chart2/source/controller/inc/AccessibleTextHelper.hxx44
-rw-r--r--chart2/source/controller/inc/AxisItemConverter.hxx25
-rw-r--r--chart2/source/controller/inc/CharacterPropertyItemConverter.hxx11
-rw-r--r--chart2/source/controller/inc/ChartController.hxx160
-rw-r--r--chart2/source/controller/inc/ChartDocumentWrapper.hxx40
-rw-r--r--chart2/source/controller/inc/ChartToolbarController.hxx15
-rw-r--r--chart2/source/controller/inc/ChartWindow.hxx16
-rw-r--r--chart2/source/controller/inc/CommandDispatchContainer.hxx21
-rw-r--r--chart2/source/controller/inc/ConfigurationAccess.hxx44
-rw-r--r--chart2/source/controller/inc/DataPointItemConverter.hxx26
-rw-r--r--chart2/source/controller/inc/DataTableItemConverter.hxx56
-rw-r--r--chart2/source/controller/inc/DrawViewWrapper.hxx6
-rw-r--r--chart2/source/controller/inc/ErrorBarItemConverter.hxx23
-rw-r--r--chart2/source/controller/inc/GraphicPropertyItemConverter.hxx25
-rw-r--r--chart2/source/controller/inc/ItemConverter.hxx21
-rw-r--r--chart2/source/controller/inc/ItemPropertyMap.hxx13
-rw-r--r--chart2/source/controller/inc/LegendItemConverter.hxx27
-rw-r--r--chart2/source/controller/inc/MultipleChartConverters.hxx54
-rw-r--r--chart2/source/controller/inc/ObjectHierarchy.hxx74
-rw-r--r--chart2/source/controller/inc/ObjectNameProvider.hxx32
-rw-r--r--chart2/source/controller/inc/PositionAndSizeHelper.hxx9
-rw-r--r--chart2/source/controller/inc/RangeSelectionHelper.hxx75
-rw-r--r--chart2/source/controller/inc/RangeSelectionListener.hxx71
-rw-r--r--chart2/source/controller/inc/RegressionCurveItemConverter.hxx27
-rw-r--r--chart2/source/controller/inc/RegressionEquationItemConverter.hxx19
-rw-r--r--chart2/source/controller/inc/SelectionHelper.hxx15
-rw-r--r--chart2/source/controller/inc/SeriesOptionsItemConverter.hxx33
-rw-r--r--chart2/source/controller/inc/ShapeController.h38
-rw-r--r--chart2/source/controller/inc/StatisticsItemConverter.hxx24
-rw-r--r--chart2/source/controller/inc/TabPageNotifiable.hxx18
-rw-r--r--chart2/source/controller/inc/TextDirectionListBox.hxx9
-rw-r--r--chart2/source/controller/inc/TextLabelItemConverter.hxx24
-rw-r--r--chart2/source/controller/inc/TimerTriggeredControllerLock.hxx51
-rw-r--r--chart2/source/controller/inc/TitleDialogData.hxx18
-rw-r--r--chart2/source/controller/inc/TitleItemConverter.hxx18
-rw-r--r--chart2/source/controller/inc/dlg_ChartType.hxx18
-rw-r--r--chart2/source/controller/inc/dlg_ChartType_UNO.hxx11
-rw-r--r--chart2/source/controller/inc/dlg_CreationWizard.hxx36
-rw-r--r--chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx23
-rw-r--r--chart2/source/controller/inc/dlg_DataEditor.hxx23
-rw-r--r--chart2/source/controller/inc/dlg_DataSource.hxx31
-rw-r--r--chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx18
-rw-r--r--chart2/source/controller/inc/dlg_InsertDataLabel.hxx7
-rw-r--r--chart2/source/controller/inc/dlg_InsertDataTable.hxx52
-rw-r--r--chart2/source/controller/inc/dlg_InsertErrorBars.hxx26
-rw-r--r--chart2/source/controller/inc/dlg_InsertLegend.hxx14
-rw-r--r--chart2/source/controller/inc/dlg_InsertTitle.hxx7
-rw-r--r--chart2/source/controller/inc/dlg_ObjectProperties.hxx27
-rw-r--r--chart2/source/controller/inc/dlg_ShapeFont.hxx10
-rw-r--r--chart2/source/controller/inc/dlg_ShapeParagraph.hxx10
-rw-r--r--chart2/source/controller/inc/dlg_View3D.hxx15
-rw-r--r--chart2/source/controller/inc/helpids.h14
-rw-r--r--chart2/source/controller/inc/res_DataTableProperties.hxx48
-rw-r--r--chart2/source/controller/inc/res_ErrorBar.hxx25
-rw-r--r--chart2/source/controller/inc/res_LegendPosition.hxx23
-rw-r--r--chart2/source/controller/inc/res_Titles.hxx27
-rw-r--r--chart2/source/controller/inc/uiobject.hxx8
59 files changed, 753 insertions, 1088 deletions
diff --git a/chart2/source/controller/inc/AccessibleBase.hxx b/chart2/source/controller/inc/AccessibleBase.hxx
index ef1eab3296fb..011bdfa48b88 100644
--- a/chart2/source/controller/inc/AccessibleBase.hxx
+++ b/chart2/source/controller/inc/AccessibleBase.hxx
@@ -16,32 +16,25 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ACCESSIBLEBASE_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ACCESSIBLEBASE_HXX
+#pragma once
#include <ObjectIdentifier.hxx>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XEventListener.hpp>
-#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
-#include <comphelper/accessibleeventnotifier.hxx>
+#include <comphelper/OAccessible.hxx>
+#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
-#include <rtl/ref.hxx>
#include <tools/color.hxx>
+#include <unotools/weakref.hxx>
+#include <vcl/window.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;
@@ -55,7 +48,9 @@ namespace chart
{
class AccessibleBase;
+class ChartView;
class ObjectHierarchy;
+class ChartController;
typedef ObjectIdentifier AccessibleUniqueId;
@@ -63,10 +58,10 @@ 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;
- css::uno::WeakReference< css::awt::XWindow > m_xWindow;
+ unotools::WeakReference< ::chart::ChartModel > m_xChartDocument;
+ unotools::WeakReference< ::chart::ChartController > m_xChartController;
+ unotools::WeakReference< ::chart::ChartView > m_xView;
+ VclPtr<vcl::Window> m_pWindow;
std::shared_ptr< ObjectHierarchy > m_spObjectHierarchy;
@@ -75,23 +70,9 @@ struct AccessibleElementInfo
::accessibility::IAccessibleViewForwarder* m_pViewForwarder;
};
-namespace impl
-{
-typedef ::cppu::WeakComponentImplHelper<
- css::accessibility::XAccessible,
- css::accessibility::XAccessibleContext,
- css::accessibility::XAccessibleComponent,
- css::accessibility::XAccessibleEventBroadcaster,
- css::lang::XServiceInfo,
- css::lang::XEventListener
- > AccessibleBase_Base;
-}
-
/** Base class for all Chart Accessibility objects
*/
-class AccessibleBase :
- public MutexContainer,
- public impl::AccessibleBase_Base
+class AccessibleBase : public comphelper::OAccessible
{
public:
enum class EventType
@@ -100,7 +81,7 @@ public:
LOST_SELECTION
};
- AccessibleBase( const AccessibleElementInfo & rAccInfo,
+ AccessibleBase( AccessibleElementInfo aAccInfo,
bool bMayHaveChildren,
bool bAlwaysTransparent );
virtual ~AccessibleBase() override;
@@ -109,14 +90,6 @@ protected:
// for all calls to protected methods it is assumed that the mutex is locked
// unless calls outside via UNO, e.g. event notification, are done
- /** @param bThrowException if true, a DisposedException is thrown if the
- object is already disposed
- @return true, if the component is already disposed and bThrowException is false,
- false otherwise
- @throws css::lang::DisposedException
- */
- bool CheckDisposeState( bool bThrowException = true ) const;
-
/** Events coming from the core have to be processed in this methods. The
default implementation returns false, which indicates that the object is
not interested in the event. To react on events you have to implement
@@ -136,14 +109,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
@@ -184,17 +157,6 @@ protected:
*/
virtual css::awt::Point GetUpperLeftOnScreen() const;
- /** 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;
-
/** Removes all children from the internal lists and broadcasts child remove
events.
@@ -210,14 +172,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 );
@@ -226,16 +188,13 @@ protected:
// ________ WeakComponentImplHelper (XComponent::dispose) ________
virtual void SAL_CALL disposing() override;
- // ________ XAccessible ________
- 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
@@ -243,43 +202,22 @@ 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()
// throw (css::uno::RuntimeException);
+ // OAccessible
+ virtual css::awt::Rectangle implGetBounds() override;
+
// ________ XAccessibleComponent ________
- virtual sal_Bool SAL_CALL containsPoint(
- const css::awt::Point& aPoint ) override;
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
getAccessibleAtPoint( const css::awt::Point& aPoint ) override;
- // has to be defined in derived classes
- virtual css::awt::Rectangle SAL_CALL getBounds() override;
- virtual css::awt::Point SAL_CALL getLocation() override;
- virtual css::awt::Point SAL_CALL getLocationOnScreen() override;
- virtual css::awt::Size SAL_CALL getSize() override;
virtual void SAL_CALL grabFocus() override;
virtual sal_Int32 SAL_CALL getForeground() override;
virtual sal_Int32 SAL_CALL getBackground() override;
- // ________ 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;
-
- // ________ XEventListener ________
- virtual void SAL_CALL disposing(
- const css::lang::EventObject& Source ) override;
-
- // ________ XAccessibleEventBroadcaster ________
- virtual void SAL_CALL addAccessibleEventListener(
- const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener ) override;
- virtual void SAL_CALL removeAccessibleEventListener(
- const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener ) override;
-
private:
enum eColorType
{
@@ -289,28 +227,20 @@ private:
Color getColor( eColorType eColType );
private:
- /** type of the vector containing the accessible children
- */
- typedef std::vector< css::uno::Reference< css::accessibility::XAccessible > > ChildListVectorType;
/** type of the hash containing a vector index for every AccessibleUniqueId
of the object in the child list
*/
- typedef std::map< ObjectIdentifier, css::uno::Reference< css::accessibility::XAccessible > > ChildOIDMap;
+ typedef std::map<ObjectIdentifier, rtl::Reference<AccessibleBase>> ChildOIDMap;
- bool m_bIsDisposed;
const bool m_bMayHaveChildren;
bool m_bChildrenInitialized;
- ChildListVectorType m_aChildList;
+ std::vector<rtl::Reference<AccessibleBase>> m_aChildList;
ChildOIDMap m_aChildOIDMap;
- ::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;
@@ -318,14 +248,10 @@ private:
state is checked.
This variable is monitored by the solar mutex!
-
- Note: declared volatile to enable double-check-locking
*/
- volatile bool m_bStateSetInitialized;
+ bool m_bStateSetInitialized;
};
} // namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/AccessibleChartView.hxx b/chart2/source/controller/inc/AccessibleChartView.hxx
index f6e174b53b14..9a973f80843a 100644
--- a/chart2/source/controller/inc/AccessibleChartView.hxx
+++ b/chart2/source/controller/inc/AccessibleChartView.hxx
@@ -16,10 +16,10 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ACCESSIBLECHARTVIEW_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ACCESSIBLECHARTVIEW_HXX
+#pragma once
#include "AccessibleBase.hxx"
+#include "ChartWindow.hxx"
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/weakref.hxx>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -28,9 +28,6 @@
#include <memory>
namespace com::sun::star::accessibility { class XAccessible; }
-namespace com::sun::star::awt { class XWindow; }
-namespace com::sun::star::frame { class XModel; }
-namespace com::sun::star::view { class XSelectionSupplier; }
namespace accessibility
{
@@ -39,37 +36,32 @@ class IAccessibleViewForwarder;
namespace chart
{
+class ChartView;
-namespace impl
-{
-typedef ::cppu::ImplInheritanceHelper<
- ::chart::AccessibleBase,
- css::lang::XInitialization,
- css::view::XSelectionChangeListener >
- AccessibleChartView_Base;
-}
-
-class AccessibleChartView :
- public impl::AccessibleChartView_Base
+class AccessibleChartView final
+ : public cppu::ImplInheritanceHelper<chart::AccessibleBase, css::view::XSelectionChangeListener>
{
public:
- AccessibleChartView(SdrView* pView );
+ AccessibleChartView( SdrView* pView );
virtual ~AccessibleChartView() override;
AccessibleChartView() = delete;
- // ____ WeakComponentHelper (called from XComponent::dispose()) ____
- using AccessibleBase::disposing;
+ virtual void SAL_CALL disposing() override;
- // ____ 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)
+ // 4: ChartWindow representing the view's 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,
+ ChartWindow* pNewChartWindow);
+ // used to disconnect from view
+ void initialize();
// ____ view::XSelectionChangeListener ____
virtual void SAL_CALL selectionChanged( const css::lang::EventObject& aEvent ) override;
@@ -80,13 +72,12 @@ 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;
- // ________ XAccessibleComponent ________
- virtual css::awt::Rectangle SAL_CALL getBounds() override;
- virtual css::awt::Point SAL_CALL getLocationOnScreen() override;
+ // OAccessible
+ virtual css::awt::Rectangle implGetBounds() override;
protected:
// ________ AccessibleChartElement ________
@@ -102,10 +93,10 @@ 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;
- css::uno::WeakReference< css::awt::XWindow > m_xWindow;
+ unotools::WeakReference< ::chart::ChartController > m_xChartController;
+ unotools::WeakReference< ::chart::ChartModel > m_xChartModel;
+ unotools::WeakReference< ChartView > m_xChartView;
+ VclPtr<ChartWindow> m_pChartWindow;
css::uno::WeakReference< css::accessibility::XAccessible > m_xParent;
std::shared_ptr< ObjectHierarchy > m_spObjectHierarchy;
@@ -115,6 +106,5 @@ private: // members
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/AccessibleTextHelper.hxx b/chart2/source/controller/inc/AccessibleTextHelper.hxx
index 30b4123b9aac..ccdf1ed6bd61 100644
--- a/chart2/source/controller/inc/AccessibleTextHelper.hxx
+++ b/chart2/source/controller/inc/AccessibleTextHelper.hxx
@@ -16,20 +16,15 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ACCESSIBLETEXTHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ACCESSIBLETEXTHELPER_HXX
+#pragma once
-#include <memory>
-#include <MutexContainer.hxx>
-#include <cppuhelper/compbase.hxx>
-#include <com/sun/star/lang/XInitialization.hpp>
+#include <comphelper/OAccessible.hxx>
+#include <comphelper/compbase.hxx>
+#include <svx/AccessibleTextHelper.hxx>
+#include <vcl/window.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
{
@@ -38,21 +33,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
@@ -62,33 +54,31 @@ public:
mandatory parameter 1: type XAccessible. Is used as EventSource for the
::accessibility::AccessibleTextHelper (svx)
- mandatory parameter 2: type awt::XWindow. The Window that shows the
+ mandatory parameter 2: type vcl::Window. 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 rtl::Reference<comphelper::OAccessible>& rEventSource,
+ vcl::Window* pWindow);
// ____ 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;
};
} // namespace chart
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ACCESSIBLETEXTHELPER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/AxisItemConverter.hxx b/chart2/source/controller/inc/AxisItemConverter.hxx
index 5bd230bd67d7..c14ef82bd595 100644
--- a/chart2/source/controller/inc/AxisItemConverter.hxx
+++ b/chart2/source/controller/inc/AxisItemConverter.hxx
@@ -16,34 +16,37 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_AXISITEMCONVERTER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_AXISITEMCONVERTER_HXX
+#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;
@@ -51,7 +54,7 @@ public:
virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
protected:
- virtual const sal_uInt16 * GetWhichPairs() const override;
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const override;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const override;
@@ -59,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;
@@ -71,6 +72,4 @@ private:
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
index 0cf947d0e953..65ff58ea45ab 100644
--- a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
+++ b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_CHARACTERPROPERTYITEMCONVERTER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_CHARACTERPROPERTYITEMCONVERTER_HXX
+#pragma once
#include "ItemConverter.hxx"
#include <com/sun/star/awt/Size.hpp>
@@ -36,14 +35,14 @@ 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;
private:
- virtual const sal_uInt16* GetWhichPairs() const override;
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const override;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const override;
virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & rItemSet ) override;
@@ -57,6 +56,4 @@ private:
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx
index 1977e8e169fa..e86438675e8e 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -16,10 +16,11 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_CHARTCONTROLLER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_CHARTCONTROLLER_HXX
+#pragma once
#include <LifeTime.hxx>
+#include <ReferenceSizeProvider.hxx>
+#include "AccessibleChartView.hxx"
#include "CommandDispatchContainer.hxx"
#include "SelectionHelper.hxx"
@@ -35,15 +36,14 @@
#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>
namespace com::sun::star::accessibility { class XAccessible; }
-namespace com::sun::star::accessibility { class XAccessibleContext; }
namespace com::sun::star::awt { class XFocusListener; }
namespace com::sun::star::awt { class XKeyListener; }
namespace com::sun::star::awt { class XMouseListener; }
@@ -55,12 +55,10 @@ namespace com::sun::star::awt { struct Point; }
namespace com::sun::star::document { class XUndoManager; }
namespace com::sun::star::frame { class XDispatch; }
namespace com::sun::star::frame { class XLayoutManagerEventBroadcaster; }
-namespace com::sun::star::lang { class XInitialization; }
+namespace com::sun::star::graphic { class XGraphic; }
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
@@ -72,37 +70,35 @@ namespace svx::sidebar {
class SelectionChangeHandler;
}
-class DropTargetHelper;
-
-namespace com::sun::star {
- namespace graphic {
- class XGraphic;
- }
+namespace weld {
+ class Window;
}
+class DropTargetHelper;
+
namespace chart
{
class UndoGuard;
+class ChartView;
class ChartWindow;
class DrawModelWrapper;
class DrawViewWrapper;
-class ReferenceSizeProvider;
class ViewElementListProvider;
+class Diagram;
+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
@@ -110,16 +106,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;
@@ -142,6 +133,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;
@@ -262,16 +259,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;
@@ -316,18 +303,28 @@ public:
::Point aAtLogicPosition, bool bIsBalloonHelp,
OUString & rOutQuickHelpText, css::awt::Rectangle & rOutEqualRect );
- css::uno::Reference< css::accessibility::XAccessible > CreateAccessible();
+ rtl::Reference<AccessibleChartView> 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();
DrawViewWrapper* GetDrawViewWrapper();
- VclPtr<ChartWindow> GetChartWindow() const;
+ ChartWindow* GetChartWindow() const;
weld::Window* GetChartFrame();
bool isAdditionalShapeSelected() const;
void SetAndApplySelection(const css::uno::Reference<css::drawing::XShape>& rxShape);
@@ -335,26 +332,29 @@ 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();
+
+ Selection getSelectionMember() { return m_aSelection; }
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
@@ -388,7 +388,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;
@@ -419,7 +419,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();
@@ -427,9 +427,9 @@ private:
//executeDispatch methods
void executeDispatch_ObjectProperties();
- void executeDispatch_FormatObject( const OUString& rDispatchCommand );
+ 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();
@@ -440,6 +440,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();
@@ -479,6 +483,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 );
@@ -488,6 +494,40 @@ private:
void executeDispatch_NewArrangement();
void executeDispatch_ScaleText();
+ static void executeDispatch_FontBold(
+ const std::vector<css::uno::Reference<css::beans::XPropertySet>>& xProperties);
+ static void executeDispatch_FontName(
+ const std::vector<css::uno::Reference<css::beans::XPropertySet>>& xProperties,
+ const css::uno::Sequence<css::beans::PropertyValue>& rArgs);
+ static void executeDispatch_FontHeight(
+ const std::vector<css::uno::Reference<css::beans::XPropertySet>>& xProperties,
+ const css::uno::Sequence<css::beans::PropertyValue>& rArgs);
+ static void executeDispatch_FontItalic(
+ const std::vector<css::uno::Reference<css::beans::XPropertySet>>& xProperties);
+ static void executeDispatch_FontUnderline(
+ const std::vector<css::uno::Reference<css::beans::XPropertySet>>& xProperties,
+ const css::uno::Sequence<css::beans::PropertyValue>& rArgs);
+ static void executeDispatch_FontStrikeout(
+ const std::vector<css::uno::Reference<css::beans::XPropertySet>>& xProperties);
+ static void executeDispatch_FontShadowed(
+ const std::vector<css::uno::Reference<css::beans::XPropertySet>>& xProperties);
+ static void executeDispatch_FontColor(
+ const std::vector<css::uno::Reference<css::beans::XPropertySet>>& xProperties,
+ const css::uno::Sequence<css::beans::PropertyValue>& rArgs);
+ static void executeDispatch_FontGrow(
+ const std::vector<css::uno::Reference<css::beans::XPropertySet>>& xProperties);
+ static void executeDispatch_FontShrink(
+ const std::vector<css::uno::Reference<css::beans::XPropertySet>>& xProperties);
+ static void executeDispatch_FontReset(
+ const std::vector<css::uno::Reference<css::beans::XPropertySet>>& xProperties);
+ static void executeDispatch_FontSpacing(
+ const std::vector<css::uno::Reference<css::beans::XPropertySet>>& xProperties,
+ const css::uno::Sequence<css::beans::PropertyValue>& rArgs);
+ static void executeDispatch_FontSuperScript(
+ const std::vector<css::uno::Reference<css::beans::XPropertySet>>& xProperties);
+ static void executeDispatch_FontSubScript(
+ const std::vector<css::uno::Reference<css::beans::XPropertySet>>& xProperties);
+
void executeDispatch_Paste();
void executeDispatch_Copy();
void executeDispatch_Cut();
@@ -498,14 +538,18 @@ private:
void executeDispatch_LOKSetTextSelection(int nType, int nX, int nY);
void executeDispatch_LOKPieSegmentDragging(int nOffset);
+ void executeDispatch_FillColor(sal_uInt32 nColor);
+ 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();
@@ -513,7 +557,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
@@ -527,19 +571,9 @@ 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 );
-
- static const o3tl::sorted_vector< OUString >& impl_getAvailableCommands();
+ bool impl_DragDataPoint( std::u16string_view rCID, double fOffset );
- /** 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();
+ static const o3tl::sorted_vector< std::u16string_view >& impl_getAvailableCommands();
void impl_PasteGraphic( css::uno::Reference< css::graphic::XGraphic > const & xGraphic,
const ::Point & aPosition );
@@ -554,6 +588,4 @@ private:
} // namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ChartDocumentWrapper.hxx b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
index 9f36c42b3a2f..5957a7e2942f 100644
--- a/chart2/source/controller/inc/ChartDocumentWrapper.hxx
+++ b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_CHARTDOCUMENTWRAPPER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_CHARTDOCUMENTWRAPPER_HXX
+#pragma once
#include <WrappedPropertySet.hxx>
#include <com/sun/star/chart/XChartDocument.hpp>
@@ -27,18 +26,19 @@
#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
-{
-
-namespace wrapper
+namespace chart::wrapper
{
-
+class DiagramWrapper;
+class LegendWrapper;
+class TitleWrapper;
class Chart2ModelContact;
class ChartDocumentWrapper_Base : public ::cppu::ImplInheritanceHelper
@@ -52,7 +52,7 @@ class ChartDocumentWrapper_Base : public ::cppu::ImplInheritanceHelper
{
};
-class ChartDocumentWrapper : public ChartDocumentWrapper_Base
+class ChartDocumentWrapper final : public ChartDocumentWrapper_Base
, public ::utl::OEventListenerAdapter
{
public:
@@ -76,9 +76,7 @@ public:
css::uno::Reference< css::drawing::XShapes > getAdditionalShapes() const;
/// @throws css::uno::RuntimeException
- css::uno::Reference< css::drawing::XDrawPage > impl_getDrawPage() const;
-
-protected:
+ rtl::Reference<SvxDrawPage> impl_getDrawPage() const;
// ____ chart::XChartDocument ____
virtual css::uno::Reference< css::drawing::XShape > SAL_CALL getTitle() override;
@@ -141,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();
@@ -149,28 +151,26 @@ private: //member
css::uno::Reference< css::uno::XInterface > m_xDelegator;
- css::uno::Reference< css::drawing::XShape > m_xTitle;
- css::uno::Reference< css::drawing::XShape > m_xSubTitle;
- css::uno::Reference< css::drawing::XShape > m_xLegend;
+ rtl::Reference< TitleWrapper > m_xTitle;
+ rtl::Reference< TitleWrapper > m_xSubTitle;
+ rtl::Reference< LegendWrapper > m_xLegend;
css::uno::Reference< css::chart::XChartData > m_xChartData;
- css::uno::Reference< css::chart::XDiagram > m_xDiagram;
+ rtl::Reference< DiagramWrapper > m_xDiagram;
css::uno::Reference< css::beans::XPropertySet > m_xArea;
css::uno::Reference< css::util::XRefreshable > m_xAddIn;
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;
bool m_bIsDisposed;
};
-} // namespace wrapper
-} // namespace chart
+} // namespace chart::wrapper
// CHART_CHARTDOCUMENT_HXX
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ChartToolbarController.hxx b/chart2/source/controller/inc/ChartToolbarController.hxx
index 140a62b60a5c..ce493bba674b 100644
--- a/chart2/source/controller/inc/ChartToolbarController.hxx
+++ b/chart2/source/controller/inc/ChartToolbarController.hxx
@@ -7,11 +7,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_CHARTTOOLBARCONTROLLER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_CHARTTOOLBARCONTROLLER_HXX
+#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>
@@ -24,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);
@@ -70,7 +67,7 @@ public:
// XUpdatable
virtual void SAL_CALL update() override;
- using cppu::WeakComponentImplHelperBase::disposing;
+ using comphelper::WeakComponentImplHelperBase::disposing;
private:
@@ -79,6 +76,4 @@ private:
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ChartWindow.hxx b/chart2/source/controller/inc/ChartWindow.hxx
index a05db545bfd2..918805cb3a8a 100644
--- a/chart2/source/controller/inc/ChartWindow.hxx
+++ b/chart2/source/controller/inc/ChartWindow.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_CHARTWINDOW_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_CHARTWINDOW_HXX
+#pragma once
#include <vcl/window.hxx>
@@ -30,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 );
@@ -54,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;
@@ -89,6 +81,4 @@ private:
} //namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/CommandDispatchContainer.hxx b/chart2/source/controller/inc/CommandDispatchContainer.hxx
index 8e6aa4c49c49..a7c6111a3f4c 100644
--- a/chart2/source/controller/inc/CommandDispatchContainer.hxx
+++ b/chart2/source/controller/inc/CommandDispatchContainer.hxx
@@ -16,10 +16,9 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_COMMANDDISPATCHCONTAINER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_COMMANDDISPATCHCONTAINER_HXX
+#pragma once
-#include <cppuhelper/weakref.hxx>
+#include <unotools/weakref.hxx>
#include <o3tl/sorted_vector.hxx>
#include <map>
@@ -27,14 +26,13 @@
namespace com::sun::star::frame { class XController; }
namespace com::sun::star::frame { class XDispatch; }
-namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::frame { struct DispatchDescriptor; }
namespace com::sun::star::uno { class XComponentContext; }
namespace com::sun::star::util { struct URL; }
namespace chart
{
-
+class ChartModel;
class DrawCommandDispatch;
class ShapeController;
@@ -74,14 +72,14 @@ 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
*/
void setChartDispatch(
const css::uno::Reference< css::frame::XDispatch >& rChartDispatch,
- const o3tl::sorted_vector< OUString > & rChartCommands );
+ const o3tl::sorted_vector< std::u16string_view > & rChartCommands );
/** Returns the dispatch that is able to do the command given in rURL, if
implemented here. If the URL is not implemented here, it should be
@@ -103,7 +101,7 @@ public:
const css::uno::Reference< css::frame::XController > & xChartController,
const css::util::URL & rURL );
- css::uno::Reference< css::frame::XDispatch > getChartDispatcher() { return m_xChartDispatcher; }
+ const css::uno::Reference< css::frame::XDispatch > & getChartDispatcher() const { return m_xChartDispatcher; }
void setDrawCommandDispatch( DrawCommandDispatch* pDispatch );
DrawCommandDispatch* getDrawCommandDispatch() { return m_pDrawCommandDispatch; }
@@ -123,10 +121,10 @@ 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;
+ o3tl::sorted_vector< std::u16string_view > m_aChartCommands;
DrawCommandDispatch* m_pDrawCommandDispatch;
ShapeController* m_pShapeController;
@@ -134,7 +132,4 @@ private:
} // namespace chart
-// INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_COMMANDDISPATCHCONTAINER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ConfigurationAccess.hxx b/chart2/source/controller/inc/ConfigurationAccess.hxx
deleted file mode 100644
index 416ae72fe832..000000000000
--- a/chart2/source/controller/inc/ConfigurationAccess.hxx
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_CONFIGURATIONACCESS_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_CONFIGURATIONACCESS_HXX
-
-#include <tools/fldunit.hxx>
-
-namespace chart
-{
-
-namespace 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
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/DataPointItemConverter.hxx b/chart2/source/controller/inc/DataPointItemConverter.hxx
index 88c2b3a274e2..5d75b3057cfd 100644
--- a/chart2/source/controller/inc/DataPointItemConverter.hxx
+++ b/chart2/source/controller/inc/DataPointItemConverter.hxx
@@ -16,39 +16,39 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DATAPOINTITEMCONVERTER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DATAPOINTITEMCONVERTER_HXX
+#pragma once
#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,
@@ -63,7 +63,7 @@ public:
virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
protected:
- virtual const sal_uInt16 * GetWhichPairs() const override;
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const override;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const override;
@@ -81,11 +81,9 @@ 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;
};
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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 8bad644101cb..28c2a927ec19 100644
--- a/chart2/source/controller/inc/DrawViewWrapper.hxx
+++ b/chart2/source/controller/inc/DrawViewWrapper.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DRAWVIEWWRAPPER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DRAWVIEWWRAPPER_HXX
+#pragma once
#include <memory>
#include <svx/view3d.hxx>
@@ -44,7 +43,7 @@ protected:
~MarkHandleProvider() {}
};
-class DrawViewWrapper : public E3dView
+class DrawViewWrapper final : public E3dView
{
public:
DrawViewWrapper(
@@ -97,6 +96,5 @@ private:
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ErrorBarItemConverter.hxx b/chart2/source/controller/inc/ErrorBarItemConverter.hxx
index 691ca508a172..50b2fbe3f73b 100644
--- a/chart2/source/controller/inc/ErrorBarItemConverter.hxx
+++ b/chart2/source/controller/inc/ErrorBarItemConverter.hxx
@@ -17,37 +17,35 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ERRORBARITEMCONVERTER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ERRORBARITEMCONVERTER_HXX
+#pragma once
#include "ItemConverter.hxx"
+#include <rtl/ref.hxx>
namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
class SdrModel;
+namespace chart { class ChartModel; }
-namespace chart
-{
-namespace wrapper
+namespace chart::wrapper
{
-class ErrorBarItemConverter : public ItemConverter
+class ErrorBarItemConverter final : public ItemConverter
{
public:
ErrorBarItemConverter(
- const css::uno::Reference< css::frame::XModel > & xChartModel,
+ const rtl::Reference< ChartModel > & xChartModel,
const css::uno::Reference< css::beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool,
- SdrModel& rDrawModel,
- const css::uno::Reference< css::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory );
+ SdrModel& rDrawModel );
virtual ~ErrorBarItemConverter() override;
virtual void FillItemSet( SfxItemSet & rOutItemSet ) const override;
virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
protected:
- virtual const sal_uInt16 * GetWhichPairs() const override;
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const override;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const override;
@@ -58,9 +56,6 @@ private:
css::uno::Reference< css::frame::XModel > m_xModel;
};
-} // namespace wrapper
-} // namespace chart
-
-#endif // INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ERRORBARITEMCONVERTER_HXX
+} // namespace chart::wrapper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
index 1fcc4f2244ce..afb9dd0a0c40 100644
--- a/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
+++ b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
@@ -16,18 +16,19 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_GRAPHICPROPERTYITEMCONVERTER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_GRAPHICPROPERTYITEMCONVERTER_HXX
+#pragma once
#include "ItemConverter.hxx"
+#include <rtl/ref.hxx>
+
namespace com::sun::star::lang { class XMultiServiceFactory; }
class SdrModel;
-namespace chart
-{
-namespace wrapper
+namespace chart { class ChartModel; }
+
+namespace chart::wrapper
{
enum class GraphicObjectType
@@ -38,19 +39,19 @@ 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,
+ rtl::Reference< ChartModel > xChartModel,
GraphicObjectType eObjectType );
virtual ~GraphicPropertyItemConverter() override;
protected:
- virtual const sal_uInt16 * GetWhichPairs() const override;
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const override;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const override;
@@ -59,13 +60,9 @@ protected:
private:
GraphicObjectType m_GraphicObjectType;
SdrModel & m_rDrawModel;
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xNamedPropertyTableFactory;
+ rtl::Reference<ChartModel> m_xChartModel;
};
-} // namespace wrapper
-} // namespace chart
-
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_GRAPHICPROPERTYITEMCONVERTER_HXX
-#endif
+} // namespace chart::wrapper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ItemConverter.hxx b/chart2/source/controller/inc/ItemConverter.hxx
index 8d00d90426f4..031a633c22d8 100644
--- a/chart2/source/controller/inc/ItemConverter.hxx
+++ b/chart2/source/controller/inc/ItemConverter.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ITEMCONVERTER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ITEMCONVERTER_HXX
+#pragma once
#include <unotools/eventlisteneradapter.hxx>
#include <svl/itemset.hxx>
@@ -74,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;
@@ -117,18 +116,9 @@ public:
protected:
- /** implement this method to provide an array of which-ranges of the form:
-
- const sal_uInt16 aMyPairs[] =
- {
- from_1, to_1,
- from_2, to_2,
- ...
- from_n, to_n,
- 0
- };
+ /** implement this method to provide an array of which-ranges
*/
- virtual const sal_uInt16 * GetWhichPairs() const = 0;
+ virtual const WhichRangesContainer& GetWhichPairs() const = 0;
/** implement this method to return a Property object for a given which id.
@@ -192,7 +182,4 @@ private:
}
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ITEMCONVERTER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ItemPropertyMap.hxx b/chart2/source/controller/inc/ItemPropertyMap.hxx
index 26cd4e88c5a2..7bee6ae814b5 100644
--- a/chart2/source/controller/inc/ItemPropertyMap.hxx
+++ b/chart2/source/controller/inc/ItemPropertyMap.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ITEMPROPERTYMAP_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ITEMPROPERTYMAP_HXX
+#pragma once
#include <sal/config.h>
@@ -25,13 +24,11 @@
#include <map>
-namespace chart::wrapper {
-
-typedef std::map< ItemConverter::tWhichIdType, std::pair< ItemConverter::tPropertyNameType, ItemConverter::tMemberIdType > >
+namespace chart::wrapper
+{
+typedef std::map<ItemConverter::tWhichIdType,
+ std::pair<ItemConverter::tPropertyNameType, ItemConverter::tMemberIdType>>
ItemPropertyMapType;
-
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/LegendItemConverter.hxx b/chart2/source/controller/inc/LegendItemConverter.hxx
index 74de6cd62cc5..4d3d8fd87e59 100644
--- a/chart2/source/controller/inc/LegendItemConverter.hxx
+++ b/chart2/source/controller/inc/LegendItemConverter.hxx
@@ -16,32 +16,31 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_LEGENDITEMCONVERTER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_LEGENDITEMCONVERTER_HXX
+#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::lang { class XMultiServiceFactory; }
class SdrModel;
+namespace chart { class ChartModel; }
-namespace chart
-{
-namespace wrapper
+namespace chart::wrapper
{
-class LegendItemConverter : public ItemConverter
+class LegendItemConverter final : public ItemConverter
{
public:
LegendItemConverter(
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 rtl::Reference< ChartModel > & xChartModel,
+ const std::optional<css::awt::Size>& pRefSize );
virtual ~LegendItemConverter() override;
@@ -49,7 +48,7 @@ public:
virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
protected:
- virtual const sal_uInt16 * GetWhichPairs() const override;
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const override;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const override;
@@ -59,10 +58,6 @@ private:
std::vector< std::unique_ptr<ItemConverter> > m_aConverters;
};
-} // namespace wrapper
-} // namespace chart
-
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_LEGENDITEMCONVERTER_HXX
-#endif
+} // namespace chart::wrapper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/MultipleChartConverters.hxx b/chart2/source/controller/inc/MultipleChartConverters.hxx
index 9f5fd399d196..ce24aba49309 100644
--- a/chart2/source/controller/inc/MultipleChartConverters.hxx
+++ b/chart2/source/controller/inc/MultipleChartConverters.hxx
@@ -16,91 +16,85 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_MULTIPLECHARTCONVERTERS_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_MULTIPLECHARTCONVERTERS_HXX
+#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;
protected:
- virtual const sal_uInt16 * GetWhichPairs() const override;
+ 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 );
+ SdrModel& rDrawModel );
virtual ~AllGridItemConverter() override;
protected:
- virtual const sal_uInt16 * GetWhichPairs() const override;
+ 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 );
+ SdrModel& rDrawModel );
virtual ~AllDataLabelItemConverter() override;
protected:
- virtual const sal_uInt16 * GetWhichPairs() const override;
+ 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,
- SfxItemPool& rItemPool, SdrModel& rDrawModel,
- const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory );
+ const rtl::Reference<::chart::ChartModel>& xChartModel,
+ SfxItemPool& rItemPool, SdrModel& rDrawModel );
virtual ~AllTitleItemConverter() override;
protected:
- virtual const sal_uInt16 * GetWhichPairs() const override;
+ 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:
- virtual const sal_uInt16 * GetWhichPairs() const override;
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
};
} // namespace chart::wrapper
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_MULTIPLECHARTCONVERTERS_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ObjectHierarchy.hxx b/chart2/source/controller/inc/ObjectHierarchy.hxx
index a765275c4ef5..e034d218fb27 100644
--- a/chart2/source/controller/inc/ObjectHierarchy.hxx
+++ b/chart2/source/controller/inc/ObjectHierarchy.hxx
@@ -16,26 +16,19 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_OBJECTHIERARCHY_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_OBJECTHIERARCHY_HXX
+#pragma once
+#include <ChartModel.hxx>
#include <ObjectIdentifier.hxx>
+#include <map>
+#include <vector>
namespace com::sun::star::awt { struct KeyEvent; }
-namespace com::sun::star::chart2 { class XChartDocument; }
-
-#include <memory>
-#include <vector>
namespace chart
{
-class ExplicitValueProvider;
-
-namespace impl
-{
-class ImplObjectHierarchy;
-}
+class ChartView;
class ObjectHierarchy
{
@@ -48,8 +41,8 @@ public:
used for keyboard navigation).
*/
explicit ObjectHierarchy(
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDocument,
- ExplicitValueProvider * pExplicitValueProvider,
+ const rtl::Reference<::chart::ChartModel> & xChartDocument,
+ ChartView * pExplicitValueProvider,
bool bFlattenDiagram = false,
bool bOrderingForElementSelector = false );
~ObjectHierarchy();
@@ -58,11 +51,10 @@ public:
static bool isRootNode( const ObjectIdentifier& rOID );
/// equal to getChildren( getRootNodeOID())
- tChildContainer getTopLevelChildren() const;
- bool hasChildren( const ObjectIdentifier& rParent ) const;
- tChildContainer getChildren( const ObjectIdentifier& rParent ) 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;
@@ -70,16 +62,43 @@ public:
sal_Int32 getIndexInParent( const ObjectIdentifier& rNode ) const;
private:
-
- std::unique_ptr< impl::ImplObjectHierarchy > m_apImpl;
+ void createTree( const rtl::Reference<::chart::ChartModel> & xChartDocument );
+ void createAxesTree(
+ tChildContainer & rContainer,
+ const rtl::Reference<::chart::ChartModel> & xChartDoc,
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
+ void createDiagramTree(
+ tChildContainer& rContainer,
+ const rtl::Reference<::chart::ChartModel>& xChartDoc,
+ const rtl::Reference< ::chart::Diagram >& xDiagram );
+ void createDataSeriesTree(
+ tChildContainer & rOutDiagramSubContainer,
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
+ static void createWallAndFloor(
+ tChildContainer & rContainer,
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
+ void createLegendTree(
+ 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, tChildContainer> tChildMap;
+ tChildMap m_aChildMap;
+ ChartView* m_pExplicitValueProvider;
+ bool m_bFlattenDiagram;
+ bool m_bOrderingForElementSelector;
};
class ObjectKeyNavigation
{
public:
- explicit ObjectKeyNavigation( const ObjectIdentifier & rCurrentOID,
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDocument,
- ExplicitValueProvider * pExplicitValueProvider );
+ explicit ObjectKeyNavigation( ObjectIdentifier aCurrentOID,
+ rtl::Reference<::chart::ChartModel> xChartDocument,
+ ChartView * pExplicitValueProvider );
bool handleKeyEvent( const css::awt::KeyEvent & rEvent );
const ObjectIdentifier& getCurrentSelection() const { return m_aCurrentOID;}
@@ -96,13 +115,10 @@ private:
bool veryLast();
ObjectIdentifier m_aCurrentOID;
- css::uno::Reference< css::chart2::XChartDocument > m_xChartDocument;
- ExplicitValueProvider * m_pExplicitValueProvider;
+ rtl::Reference<::chart::ChartModel> m_xChartDocument;
+ ChartView * m_pExplicitValueProvider;
};
} // namespace chart
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_OBJECTHIERARCHY_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ObjectNameProvider.hxx b/chart2/source/controller/inc/ObjectNameProvider.hxx
index ea0f7c4a7349..7035ba916081 100644
--- a/chart2/source/controller/inc/ObjectNameProvider.hxx
+++ b/chart2/source/controller/inc/ObjectNameProvider.hxx
@@ -17,15 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_OBJECTNAMEPROVIDER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_OBJECTNAMEPROVIDER_HXX
+#pragma once
#include <ObjectIdentifier.hxx>
#include <TitleHelper.hxx>
-namespace com::sun::star::chart2 { class XChartDocument; }
-namespace com::sun::star::frame { class XModel; }
-
namespace chart
{
@@ -36,37 +32,35 @@ 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
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/PositionAndSizeHelper.hxx b/chart2/source/controller/inc/PositionAndSizeHelper.hxx
index efe94648a1c9..a8e25e33963e 100644
--- a/chart2/source/controller/inc/PositionAndSizeHelper.hxx
+++ b/chart2/source/controller/inc/PositionAndSizeHelper.hxx
@@ -17,12 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_POSITIONANDSIZEHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_POSITIONANDSIZEHELPER_HXX
+#pragma once
#include <ObjectIdentifier.hxx>
-namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::awt { struct Rectangle; }
namespace chart
@@ -37,14 +35,13 @@ 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 );
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/RangeSelectionHelper.hxx b/chart2/source/controller/inc/RangeSelectionHelper.hxx
deleted file mode 100644
index e4669a044858..000000000000
--- a/chart2/source/controller/inc/RangeSelectionHelper.hxx
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RANGESELECTIONHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RANGESELECTIONHELPER_HXX
-
-#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/uno/Sequence.h>
-#include <rtl/ustring.hxx>
-
-namespace com::sun::star::beans { struct PropertyValue; }
-namespace com::sun::star::chart2 { class XChartDocument; }
-
-namespace com::sun::star {
- namespace sheet{
- class XRangeSelection;
- class XRangeSelectionListener;
- }
-}
-
-namespace chart
-{
-
-class RangeSelectionListenerParent;
-
-class RangeSelectionHelper
-{
-public:
- explicit RangeSelectionHelper(
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDocument );
- ~RangeSelectionHelper();
-
- bool hasRangeSelection();
- css::uno::Reference< css::sheet::XRangeSelection > const & getRangeSelection();
- void raiseRangeSelectionDocument();
- bool chooseRange(
- const OUString & aCurrentRange,
- const OUString & aUIString,
- RangeSelectionListenerParent & rListenerParent );
- void stopRangeListening( bool bRemoveListener = true );
- bool verifyCellRange( const OUString & rRangeStr );
- bool verifyArguments( const css::uno::Sequence< css::beans::PropertyValue >& rArguments );
-
-private:
- css::uno::Reference< css::sheet::XRangeSelection >
- m_xRangeSelection;
-
- css::uno::Reference< css::chart2::XChartDocument >
- m_xChartDocument;
-
- css::uno::Reference< css::sheet::XRangeSelectionListener >
- m_xRangeSelectionListener;
-};
-
-} // namespace chart
-
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RANGESELECTIONHELPER_HXX
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/RangeSelectionListener.hxx b/chart2/source/controller/inc/RangeSelectionListener.hxx
deleted file mode 100644
index 6f6239a0e95d..000000000000
--- a/chart2/source/controller/inc/RangeSelectionListener.hxx
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RANGESELECTIONLISTENER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RANGESELECTIONLISTENER_HXX
-
-#include <ControllerLockGuard.hxx>
-#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/sheet/XRangeSelectionListener.hpp>
-
-namespace com::sun::star::frame { class XModel; }
-
-namespace chart
-{
-
-class RangeSelectionListenerParent
-{
-public:
- virtual void listeningFinished( const OUString & rNewRange ) = 0;
- virtual void disposingRangeSelection() = 0;
-
-protected:
- ~RangeSelectionListenerParent() {}
-};
-
-class RangeSelectionListener : public
- ::cppu::WeakImplHelper<
- css::sheet::XRangeSelectionListener >
-{
-public:
- explicit RangeSelectionListener(
- RangeSelectionListenerParent & rParent,
- const OUString & rInitialRange,
- const css::uno::Reference< css::frame::XModel >& xModelToLockController );
- virtual ~RangeSelectionListener() override;
-
-protected:
- // ____ XRangeSelectionListener ____
- virtual void SAL_CALL done( const css::sheet::RangeSelectionEvent& aEvent ) override;
- virtual void SAL_CALL aborted( const css::sheet::RangeSelectionEvent& aEvent ) override;
-
- // ____ XEventListener ____
- virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
-
-private:
- RangeSelectionListenerParent & m_rParent;
- OUString m_aRange;
- ControllerLockGuardUNO m_aControllerLockGuard;
-};
-
-} // namespace chart
-
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RANGESELECTIONLISTENER_HXX
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/RegressionCurveItemConverter.hxx b/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
index 73e67900ec8d..3849a2179387 100644
--- a/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
+++ b/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
@@ -16,37 +16,34 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_REGRESSIONCURVEITEMCONVERTER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_REGRESSIONCURVEITEMCONVERTER_HXX
+#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
-{
-namespace wrapper
+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 );
+ const rtl::Reference< ChartModel > & xChartModel );
virtual ~RegressionCurveItemConverter() override;
virtual void FillItemSet( SfxItemSet & rOutItemSet ) const override;
virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
protected:
- virtual const sal_uInt16 * GetWhichPairs() const override;
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const override;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const override;
@@ -54,13 +51,9 @@ protected:
private:
std::shared_ptr< ItemConverter > m_spGraphicConverter;
- css::uno::Reference< css::chart2::XRegressionCurveContainer > m_xCurveContainer;
+ rtl::Reference< ::chart::DataSeries > m_xCurveContainer;
};
-} // namespace wrapper
-} // namespace chart
-
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_REGRESSIONCURVEITEMCONVERTER_HXX
-#endif
+} // namespace chart::wrapper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/RegressionEquationItemConverter.hxx b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
index 237452f6f898..e0b0bac2bae9 100644
--- a/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
+++ b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
@@ -16,30 +16,31 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_REGRESSIONEQUATIONITEMCONVERTER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_REGRESSIONEQUATIONITEMCONVERTER_HXX
+#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::lang { class XMultiServiceFactory; }
class SdrModel;
+namespace chart { class ChartModel; }
namespace chart::wrapper {
-class RegressionEquationItemConverter : public ItemConverter
+class RegressionEquationItemConverter final : public ItemConverter
{
public:
RegressionEquationItemConverter(
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 rtl::Reference< ChartModel > & xChartModel,
+ const std::optional<css::awt::Size>& pRefSize );
virtual ~RegressionEquationItemConverter() override;
@@ -47,7 +48,7 @@ public:
virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
protected:
- virtual const sal_uInt16 * GetWhichPairs() const override;
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const override;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const override;
@@ -59,6 +60,4 @@ private:
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/SelectionHelper.hxx b/chart2/source/controller/inc/SelectionHelper.hxx
index 570fc60a58be..f468f974d6db 100644
--- a/chart2/source/controller/inc/SelectionHelper.hxx
+++ b/chart2/source/controller/inc/SelectionHelper.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_SELECTIONHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_SELECTIONHELPER_HXX
+#pragma once
#include "DrawViewWrapper.hxx"
#include <ObjectIdentifier.hxx>
@@ -39,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;
@@ -73,7 +73,7 @@ private: //member
ObjectIdentifier m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing;
};
-class SelectionHelper : public MarkHandleProvider
+class SelectionHelper final : public MarkHandleProvider
{
public:
static bool findNamedParent( SdrObject*& pInOutObject
@@ -93,11 +93,11 @@ 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();
+ ~SelectionHelper();
//MarkHandleProvider:
virtual bool getMarkHandles( SdrHdlList& rHdlList ) override;
@@ -112,6 +112,5 @@ private:
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
index 2be1490ee997..febccf806ccb 100644
--- a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
+++ b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
@@ -16,40 +16,39 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_SERIESOPTIONSITEMCONVERTER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_SERIESOPTIONSITEMCONVERTER_HXX
+#pragma once
#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
-{
-namespace wrapper
+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;
protected:
- virtual const sal_uInt16 * GetWhichPairs() const override;
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const override;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const override;
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;
@@ -67,7 +66,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;
@@ -78,10 +77,6 @@ private:
bool m_bHideLegendEntry;
};
-} // namespace wrapper
-} // namespace chart
-
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_SERIESOPTIONSITEMCONVERTER_HXX
-#endif
+} // namespace chart::wrapper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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 00760488fa25..7868a9014f7c 100644
--- a/chart2/source/controller/inc/StatisticsItemConverter.hxx
+++ b/chart2/source/controller/inc/StatisticsItemConverter.hxx
@@ -16,42 +16,36 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_STATISTICSITEMCONVERTER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_STATISTICSITEMCONVERTER_HXX
+#pragma once
#include "ItemConverter.hxx"
+#include <rtl/ref.hxx>
-namespace com::sun::star::frame { class XModel; }
+namespace chart { class ChartModel; }
-namespace chart
-{
-namespace wrapper
+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;
protected:
- virtual const sal_uInt16 * GetWhichPairs() const override;
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const override;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const override;
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 wrapper
-} // namespace chart
-
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_STATISTICSITEMCONVERTER_HXX
-#endif
+} // namespace chart::wrapper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/TabPageNotifiable.hxx b/chart2/source/controller/inc/TabPageNotifiable.hxx
index d9ba555887fd..16450f28f781 100644
--- a/chart2/source/controller/inc/TabPageNotifiable.hxx
+++ b/chart2/source/controller/inc/TabPageNotifiable.hxx
@@ -16,24 +16,19 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_TABPAGENOTIFIABLE_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_TABPAGENOTIFIABLE_HXX
+#pragma once
-// 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
-#define RANGE_SELECTION_INVALID_RANGE_BACKGROUND_COLOR Color(0xff6563)
+#include <sal/types.h>
class BuilderPage;
namespace chart
{
-
-class TabPageNotifiable
+class SAL_LOPLUGIN_ANNOTATE("crosscast") TabPageNotifiable
{
public:
- virtual void setInvalidPage( BuilderPage * pTabPage ) = 0;
- virtual void setValidPage( BuilderPage * pTabPage ) = 0;
+ virtual void setInvalidPage(BuilderPage* pTabPage) = 0;
+ virtual void setValidPage(BuilderPage* pTabPage) = 0;
protected:
~TabPageNotifiable() {}
@@ -41,7 +36,4 @@ protected:
} // namespace chart
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_TABPAGENOTIFIABLE_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/TextDirectionListBox.hxx b/chart2/source/controller/inc/TextDirectionListBox.hxx
index 7db7d674e0bb..d346a23cb45d 100644
--- a/chart2/source/controller/inc/TextDirectionListBox.hxx
+++ b/chart2/source/controller/inc/TextDirectionListBox.hxx
@@ -17,23 +17,18 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_TEXTDIRECTIONLISTBOX_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_TEXTDIRECTIONLISTBOX_HXX
+#pragma once
#include <svx/frmdirlbox.hxx>
namespace chart
{
-
-class TextDirectionListBox : public svx::FrameDirectionListBox
+class TextDirectionListBox final : public svx::FrameDirectionListBox
{
public:
explicit TextDirectionListBox(std::unique_ptr<weld::ComboBox> pControl);
};
-
} //namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/TextLabelItemConverter.hxx b/chart2/source/controller/inc/TextLabelItemConverter.hxx
index 9647793a8df1..cb5406cf6a01 100644
--- a/chart2/source/controller/inc/TextLabelItemConverter.hxx
+++ b/chart2/source/controller/inc/TextLabelItemConverter.hxx
@@ -16,30 +16,32 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_TEXTLABELITEMCONVERTER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_TEXTLABELITEMCONVERTER_HXX
+#pragma once
#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 );
@@ -50,7 +52,7 @@ public:
virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
protected:
- virtual const sal_uInt16* GetWhichPairs() const override;
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const override;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const override;
@@ -64,10 +66,10 @@ private:
bool mbDataSeries:1;
bool mbForbidPercentValue:1;
+
+ rtl::Reference<::chart::DataSeries> m_xSeries;
};
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx b/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
deleted file mode 100644
index e8018ae4370a..000000000000
--- a/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
+++ /dev/null
@@ -1,51 +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 <com/sun/star/uno/Reference.h>
-#include <vcl/timer.hxx>
-
-#include <memory>
-
-namespace com::sun::star::frame { class XModel; }
-namespace chart { class ControllerLockGuardUNO; }
-
-namespace chart
-{
-
-class TimerTriggeredControllerLock final
-{
-public:
- TimerTriggeredControllerLock( const css::uno::Reference< css::frame::XModel >& xModel );
- ~TimerTriggeredControllerLock();
-
- void startTimer();
-
-private:
- css::uno::Reference< css::frame::XModel > m_xModel;
- std::unique_ptr< ControllerLockGuardUNO > m_apControllerLockGuard;
- AutoTimer m_aTimer;
-
- DECL_LINK( TimerTimeout, Timer*, void );
-};
-
-} //namespace chart
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/TitleDialogData.hxx b/chart2/source/controller/inc/TitleDialogData.hxx
index d589dc65df03..862eb8ad6193 100644
--- a/chart2/source/controller/inc/TitleDialogData.hxx
+++ b/chart2/source/controller/inc/TitleDialogData.hxx
@@ -16,38 +16,36 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_TITLEDIALOGDATA_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_TITLEDIALOGDATA_HXX
+#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
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/TitleItemConverter.hxx b/chart2/source/controller/inc/TitleItemConverter.hxx
index 59078b5e949e..917db7ef9cb6 100644
--- a/chart2/source/controller/inc/TitleItemConverter.hxx
+++ b/chart2/source/controller/inc/TitleItemConverter.hxx
@@ -16,28 +16,30 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_TITLEITEMCONVERTER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_TITLEITEMCONVERTER_HXX
+#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::lang { class XMultiServiceFactory; }
class SdrModel;
+namespace chart { class ChartModel; }
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 rtl::Reference<ChartModel>& xChartModel,
+ const std::optional<css::awt::Size>& pRefSize );
virtual ~TitleItemConverter() override;
@@ -45,7 +47,7 @@ public:
virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
protected:
- virtual const sal_uInt16 * GetWhichPairs() const override;
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const override;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const override;
@@ -57,6 +59,4 @@ private:
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_ChartType.hxx b/chart2/source/controller/inc/dlg_ChartType.hxx
index 64cab54b8ced..427369e9a88e 100644
--- a/chart2/source/controller/inc/dlg_ChartType.hxx
+++ b/chart2/source/controller/inc/dlg_ChartType.hxx
@@ -16,32 +16,28 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_CHARTTYPE_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_CHARTTYPE_HXX
+#pragma once
#include <vcl/weld.hxx>
-
-namespace com::sun::star::frame { class XModel; }
+#include <rtl/ref.hxx>
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;
};
} //namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_ChartType_UNO.hxx b/chart2/source/controller/inc/dlg_ChartType_UNO.hxx
index bfa1ce433a42..ca79b25367de 100644
--- a/chart2/source/controller/inc/dlg_ChartType_UNO.hxx
+++ b/chart2/source/controller/inc/dlg_ChartType_UNO.hxx
@@ -17,19 +17,19 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_CHARTTYPE_UNO_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_CHARTTYPE_UNO_HXX
+#pragma once
#include <comphelper/proparrhlp.hxx>
#include <svtools/genericunodialog.hxx>
-namespace com::sun::star::frame { class XModel; }
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:
@@ -58,10 +58,9 @@ 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
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_CreationWizard.hxx b/chart2/source/controller/inc/dlg_CreationWizard.hxx
index b44050eefd01..152545d0bfce 100644
--- a/chart2/source/controller/inc/dlg_CreationWizard.hxx
+++ b/chart2/source/controller/inc/dlg_CreationWizard.hxx
@@ -17,44 +17,44 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_CREATIONWIZARD_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_CREATIONWIZARD_HXX
+#pragma once
-#include "TimerTriggeredControllerLock.hxx"
+#include <TimerTriggeredControllerLock.hxx>
#include "TabPageNotifiable.hxx"
-#include <vcl/roadmapwizard.hxx>
+#include <rtl/ref.hxx>
+#include <vcl/roadmapwizardmachine.hxx>
#include <memory>
-namespace com::sun::star::chart2 { class XChartDocument; }
-namespace com::sun::star::uno { class XComponentContext; }
+namespace com::sun::star::uno
+{
+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;
// TabPageNotifiable
- virtual void setInvalidPage(BuilderPage * pTabPage) override;
- virtual void setValidPage(BuilderPage * pTabPage) override;
+ virtual void setInvalidPage(BuilderPage* pTabPage) override;
+ virtual void setValidPage(BuilderPage* pTabPage) override;
protected:
- virtual bool leaveState( WizardState _nState ) override;
+ virtual bool leaveState(WizardState _nState) override;
virtual WizardState determineNextState(WizardState nCurrentState) const override;
virtual void enterState(WizardState nState) override;
@@ -63,7 +63,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;
@@ -75,6 +75,4 @@ private:
} //namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
index 2e27418de27d..68dbe78432da 100644
--- a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
+++ b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
@@ -17,10 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_CREATIONWIZARD_UNO_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_CREATIONWIZARD_UNO_HXX
+#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>
@@ -28,22 +27,19 @@
#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>
-#include <vcl/vclptr.hxx>
-#include <vcl/vclevent.hxx>
namespace com::sun::star::awt { class XWindow; }
-namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::uno { class XComponentContext; }
-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
@@ -54,14 +50,14 @@ 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
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
virtual css::uno::Any SAL_CALL queryAggregation( css::uno::Type const & rType ) override;
- virtual void SAL_CALL acquire() throw () override;
- virtual void SAL_CALL release() throw () override;
+ virtual void SAL_CALL acquire() noexcept override;
+ virtual void SAL_CALL release() noexcept override;
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
@@ -104,7 +100,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;
@@ -113,6 +109,5 @@ private:
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_DataEditor.hxx b/chart2/source/controller/inc/dlg_DataEditor.hxx
index 878dc9d9cd69..f7e335ac36fa 100644
--- a/chart2/source/controller/inc/dlg_DataEditor.hxx
+++ b/chart2/source/controller/inc/dlg_DataEditor.hxx
@@ -17,30 +17,23 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_DATAEDITOR_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_DATAEDITOR_HXX
+#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; }
-
-namespace com::sun::star {
- namespace chart2 {
- class XChartDocument;
- }
-}
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;
@@ -51,7 +44,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;
@@ -63,13 +56,11 @@ 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);
};
} // namespace chart
-#endif // INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_DATAEDITOR_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_DataSource.hxx b/chart2/source/controller/inc/dlg_DataSource.hxx
index 272fe1a81813..9da88e8de0ba 100644
--- a/chart2/source/controller/inc/dlg_DataSource.hxx
+++ b/chart2/source/controller/inc/dlg_DataSource.hxx
@@ -16,27 +16,21 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_DATASOURCE_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_DATASOURCE_HXX
-
-#include <vcl/weld.hxx>
+#pragma once
#include "TabPageNotifiable.hxx"
-
-namespace com::sun::star::chart2 { class XChartDocument; }
-namespace com::sun::star::uno { class XComponentContext; }
-
+#include <vcl/weld.hxx>
#include <memory>
class BuilderPage;
namespace chart
{
-
-class RangeChooserTabPage;
-class DataSourceTabPage;
+class ChartModel;
class ChartTypeTemplateProvider;
+class DataSourceTabPage;
class DialogModel;
+class RangeChooserTabPage;
class DataSourceDialog final :
public weld::GenericDialogController,
@@ -45,20 +39,18 @@ 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
- virtual short run() override;
-
// TabPageNotifiable
virtual void setInvalidPage( BuilderPage * pTabPage ) override;
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);
+ DECL_LINK(OkHdl, weld::Button&, void);
+ void commitPages();
std::unique_ptr< ChartTypeTemplateProvider > m_apDocTemplateProvider;
std::unique_ptr< DialogModel > m_apDialogModel;
@@ -77,7 +69,4 @@ private:
} // namespace chart
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_DATASOURCE_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
index 14e3c6669d51..2b265c7d6541 100644
--- a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
+++ b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
@@ -16,19 +16,17 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_INSERTAXIS_GRID_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_INSERTAXIS_GRID_HXX
+#pragma once
#include <vcl/weld.hxx>
#include <com/sun/star/uno/Sequence.hxx>
namespace chart
{
-
struct InsertAxisOrGridDialogData
{
- css::uno::Sequence< sal_Bool > aPossibilityList;
- css::uno::Sequence< sal_Bool > aExistenceList;
+ css::uno::Sequence<sal_Bool> aPossibilityList;
+ css::uno::Sequence<sal_Bool> aExistenceList;
InsertAxisOrGridDialogData();
};
@@ -40,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;
@@ -49,8 +46,9 @@ protected:
std::unique_ptr<weld::CheckButton> m_xCbSecondaryZ;
public:
- SchAxisDlg(weld::Window* pParent, const InsertAxisOrGridDialogData& rInput, bool bAxisDlg = true);
- void getResult( InsertAxisOrGridDialogData& rOutput );
+ SchAxisDlg(weld::Window* pParent, const InsertAxisOrGridDialogData& rInput,
+ bool bAxisDlg = true);
+ void getResult(InsertAxisOrGridDialogData& rOutput);
};
/*************************************************************************
@@ -58,7 +56,7 @@ public:
|* Grid dialog
|*
\************************************************************************/
-class SchGridDlg : public SchAxisDlg
+class SchGridDlg final : public SchAxisDlg
{
public:
SchGridDlg(weld::Window* pParent, const InsertAxisOrGridDialogData& rInput);
@@ -66,6 +64,4 @@ public:
} //namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_InsertDataLabel.hxx b/chart2/source/controller/inc/dlg_InsertDataLabel.hxx
index c39d608d1e8a..7777db3c9696 100644
--- a/chart2/source/controller/inc/dlg_InsertDataLabel.hxx
+++ b/chart2/source/controller/inc/dlg_InsertDataLabel.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_INSERTDATALABEL_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_INSERTDATALABEL_HXX
+#pragma once
#include <vcl/weld.hxx>
#include <svl/itemset.hxx>
@@ -29,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;
@@ -44,6 +43,4 @@ public:
} //namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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 60cbaac65856..cdadc18c3f09 100644
--- a/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
+++ b/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_INSERTERRORBARS_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_INSERTERRORBARS_HXX
+#pragma once
#include <memory>
#include <vcl/weld.hxx>
@@ -25,33 +24,30 @@
#include "res_ErrorBar.hxx"
-namespace com::sun::star::frame { class XModel; }
-
namespace chart
{
+class ChartView;
-class InsertErrorBarsDialog : public weld::GenericDialogController
+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 );
+ 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 );
+ void FillItemSet(SfxItemSet& rOutAttrs);
private:
- std::unique_ptr< ErrorBarResources > m_apErrorBarResources;
+ std::unique_ptr<ErrorBarResources> m_apErrorBarResources;
};
} //namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_InsertLegend.hxx b/chart2/source/controller/inc/dlg_InsertLegend.hxx
index 41605db736f7..265f486f4a80 100644
--- a/chart2/source/controller/inc/dlg_InsertLegend.hxx
+++ b/chart2/source/controller/inc/dlg_InsertLegend.hxx
@@ -16,22 +16,22 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_INSERTLEGEND_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_INSERTLEGEND_HXX
+#pragma once
#include <vcl/weld.hxx>
+#include <rtl/ref.hxx>
#include <memory>
#include "res_LegendPosition.hxx"
-namespace com::sun::star::frame { class XModel; }
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;
@@ -39,12 +39,10 @@ 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
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_InsertTitle.hxx b/chart2/source/controller/inc/dlg_InsertTitle.hxx
index 7eea6f2bbc86..096628529e9f 100644
--- a/chart2/source/controller/inc/dlg_InsertTitle.hxx
+++ b/chart2/source/controller/inc/dlg_InsertTitle.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_INSERTTITLE_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_INSERTTITLE_HXX
+#pragma once
#include "res_Titles.hxx"
#include <vcl/weld.hxx>
@@ -25,7 +24,7 @@
namespace chart
{
-class SchTitleDlg : public weld::GenericDialogController
+class SchTitleDlg final : public weld::GenericDialogController
{
private:
std::unique_ptr<TitleResources> m_xTitleResources;
@@ -38,6 +37,4 @@ public:
} //namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_ObjectProperties.hxx b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
index 78a13838b9c6..f16aee1e611b 100644
--- a/chart2/source/controller/inc/dlg_ObjectProperties.hxx
+++ b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
@@ -16,14 +16,15 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_OBJECTPROPERTIES_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_OBJECTPROPERTIES_HXX
+#pragma once
#include <ObjectIdentifier.hxx>
#include <sfx2/tabdlg.hxx>
+#include <vcl/graph.hxx>
+
+class SvNumberFormatter;
namespace com::sun::star::util { class XNumberFormatsSupplier; }
-class Graphic;
namespace chart
{
@@ -31,10 +32,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;}
@@ -58,7 +59,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;}
@@ -93,7 +94,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;
@@ -108,22 +109,22 @@ private:
class ViewElementListProvider;
-class SchAttribTabDlg : public SfxTabDialogController
+class SchAttribTabDlg final : public SfxTabDialogController
{
private:
const ObjectPropertiesDialogParameter * const m_pParameter;
const ViewElementListProvider* const m_pViewElementListProvider;
SvNumberFormatter* m_pNumberFormatter;
- std::unique_ptr<SfxItemSet> m_pSymbolShapeProperties;
- std::unique_ptr<Graphic> m_pAutoSymbolGraphic;
+ std::optional<SfxItemSet> m_oSymbolShapeProperties;
+ 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,
@@ -134,7 +135,7 @@ public:
//pSymbolShapeProperties: Properties to be set on the symbollist shapes
//pAutoSymbolGraphic: Graphic to be shown if AutoSymbol gets selected
- void setSymbolInformation( std::unique_ptr<SfxItemSet> pSymbolShapeProperties, std::unique_ptr<Graphic> pAutoSymbolGraphic );
+ void setSymbolInformation( SfxItemSet&& rSymbolShapeProperties, std::optional<Graphic> oAutoSymbolGraphic );
void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
@@ -143,6 +144,4 @@ public:
} //namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_ShapeFont.hxx b/chart2/source/controller/inc/dlg_ShapeFont.hxx
index 5429b8449dd7..cfeb002fb92d 100644
--- a/chart2/source/controller/inc/dlg_ShapeFont.hxx
+++ b/chart2/source/controller/inc/dlg_ShapeFont.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_SHAPEFONT_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_SHAPEFONT_HXX
+#pragma once
#include <sfx2/tabdlg.hxx>
@@ -27,21 +26,18 @@ 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;
};
} // namespace chart
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_SHAPEFONT_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_ShapeParagraph.hxx b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
index 6e214dfbc91a..15d0c014d848 100644
--- a/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
+++ b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_SHAPEPARAGRAPH_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_SHAPEPARAGRAPH_HXX
+#pragma once
#include <sfx2/tabdlg.hxx>
@@ -25,18 +24,15 @@ 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
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_SHAPEPARAGRAPH_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_View3D.hxx b/chart2/source/controller/inc/dlg_View3D.hxx
index ad5466e49a37..1fda6745fbe1 100644
--- a/chart2/source/controller/inc/dlg_View3D.hxx
+++ b/chart2/source/controller/inc/dlg_View3D.hxx
@@ -16,32 +16,29 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_VIEW3D_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_VIEW3D_HXX
+#pragma once
#include <vcl/weld.hxx>
#include <ControllerLockGuard.hxx>
-namespace com::sun::star::frame { class XModel; }
-
namespace chart
{
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;
+ ControllerLockHelper m_aControllerLocker;
static sal_uInt16 m_nLastPageId;
@@ -53,6 +50,4 @@ private:
} //namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/helpids.h b/chart2/source/controller/inc/helpids.h
index 2867867d6323..775ec1489b42 100644
--- a/chart2/source/controller/inc/helpids.h
+++ b/chart2/source/controller/inc/helpids.h
@@ -17,18 +17,16 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef CHART_HELPIDS_H
-#define CHART_HELPIDS_H
+#pragma once
-#define HID_SCH_WIN_DOCUMENT "CHART2_HID_SCH_WIN_DOCUMENT"
-#define 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;
-#define HID_SCH_WIZARD_ROADMAP "CHART2_HID_SCH_WIZARD_ROADMAP"
-#define HID_SCH_DATA_SERIES_LABEL "CHART2_HID_SCH_DATA_SERIES_LABEL"
-
-#endif
+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 0514855a2d60..4fcd21226261 100644
--- a/chart2/source/controller/inc/res_ErrorBar.hxx
+++ b/chart2/source/controller/inc/res_ErrorBar.hxx
@@ -16,16 +16,15 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RES_ERRORBAR_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RES_ERRORBAR_HXX
+#pragma once
#include <memory>
#include <tools/link.hxx>
#include <svl/itemset.hxx>
#include <svx/chrtitem.hxx>
-#include "RangeSelectionListener.hxx"
+#include <RangeSelectionListener.hxx>
+#include <rtl/ref.hxx>
-namespace com::sun::star::chart2 { class XChartDocument; }
namespace weld { class Builder; }
namespace weld { class Button; }
namespace weld { class CheckButton; }
@@ -37,15 +36,15 @@ namespace weld { class Image; }
namespace weld { class Label; }
namespace weld { class MetricSpinButton; }
namespace weld { class RadioButton; }
-namespace weld { class ToggleButton; }
+namespace weld { class Toggleable; }
namespace weld { class Widget; }
namespace chart
{
-
+class ChartModel;
class RangeSelectionHelper;
-class ErrorBarResources : public RangeSelectionListenerParent
+class ErrorBarResources final : public RangeSelectionListenerParent
{
public:
enum tErrorBarType
@@ -56,12 +55,12 @@ public:
ErrorBarResources(
weld::Builder* pParent, weld::DialogController* pControllerDialog, const SfxItemSet& rInAttrs, bool bNoneAvailable, chart::ErrorBarResources::tErrorBarType eType = ERROR_BAR_Y);
- virtual ~ErrorBarResources();
+ ~ErrorBarResources();
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;
@@ -125,11 +124,11 @@ private:
std::unique_ptr<weld::Label> m_xUIStringNeg;
std::unique_ptr<weld::Label> m_xUIStringRbRange;
- DECL_LINK( CategoryChosen, weld::ToggleButton&, void );
+ DECL_LINK( CategoryChosen, weld::Toggleable&, void );
DECL_LINK( CategoryChosen2, weld::ComboBox&, void );
- DECL_LINK( SynchronizePosAndNeg, weld::ToggleButton&, void );
+ DECL_LINK( SynchronizePosAndNeg, weld::Toggleable&, void );
DECL_LINK( PosValueChanged, weld::MetricSpinButton&, void );
- DECL_LINK( IndicatorChanged, weld::ToggleButton&, void );
+ DECL_LINK( IndicatorChanged, weld::Toggleable&, void );
DECL_LINK( ChooseRange, weld::Button&, void );
DECL_LINK( RangeChanged, weld::Entry&, void );
@@ -139,6 +138,4 @@ private:
} //namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/res_LegendPosition.hxx b/chart2/source/controller/inc/res_LegendPosition.hxx
index 3701225b66d3..32f065642051 100644
--- a/chart2/source/controller/inc/res_LegendPosition.hxx
+++ b/chart2/source/controller/inc/res_LegendPosition.hxx
@@ -16,21 +16,21 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RES_LEGENDPOSITION_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RES_LEGENDPOSITION_HXX
+#pragma once
#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; }
namespace weld { class Builder; }
namespace weld { class CheckButton; }
namespace weld { class RadioButton; }
-namespace weld { class ToggleButton; }
+namespace weld { class Toggleable; }
namespace chart
{
+class ChartModel;
class LegendPositionResources final
{
@@ -39,23 +39,24 @@ 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;
void SetChangeHdl( const Link<LinkParamNone*,void>& rLink );
- DECL_LINK( PositionEnableHdl, weld::ToggleButton&, void );
- DECL_LINK( PositionChangeHdl, weld::ToggleButton&, void );
+ DECL_LINK( PositionEnableHdl, weld::Toggleable&, void );
+ DECL_LINK( PositionChangeHdl, weld::Toggleable&, void );
private:
void impl_setRadioButtonToggleHdl();
+ void PositionEnable();
private:
css::uno::Reference< css::uno::XComponentContext> m_xCC;
@@ -70,6 +71,4 @@ private:
} //namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/res_Titles.hxx b/chart2/source/controller/inc/res_Titles.hxx
index f18c99b5b460..a7a2eba57277 100644
--- a/chart2/source/controller/inc/res_Titles.hxx
+++ b/chart2/source/controller/inc/res_Titles.hxx
@@ -16,29 +16,36 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RES_TITLES_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RES_TITLES_HXX
+#pragma once
#include "TitleDialogData.hxx"
template <typename Arg, typename Ret> class Link;
-namespace weld { class Builder; }
-namespace weld { class Entry; }
-namespace weld { class Label; }
+namespace weld
+{
+class Builder;
+}
+namespace weld
+{
+class Entry;
+}
+namespace weld
+{
+class Label;
+}
namespace chart
{
-
class TitleResources final
{
public:
TitleResources(weld::Builder& rParent, bool bShowSecondaryAxesTitle);
~TitleResources();
- void writeToResources( const TitleDialogData& rInput );
- void readFromResources( TitleDialogData& rOutput );
+ void writeToResources(const TitleDialogData& rInput);
+ void readFromResources(TitleDialogData& rOutput);
- void connect_changed( const Link<weld::Entry&,void>& rLink );
+ void connect_changed(const Link<weld::Entry&, void>& rLink);
bool get_value_changed_from_saved() const;
void save_value();
@@ -63,6 +70,4 @@ private:
} //namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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;