[Libreoffice-commits] core.git: chart2/source

2023-11-21 Thread offtkp (via logerrit)
 chart2/source/model/main/PageBackground.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit b5a35f09b3c3ccac26b403e881c799e0d09bf42a
Author: offtkp 
AuthorDate: Mon Nov 20 22:58:20 2023 +0200
Commit: Paris Oplopoios 
CommitDate: Tue Nov 21 14:24:42 2023 +0100

chart2: Match chart background color with DOCCOLOR in Calc

Chart background color would be hardcoded to white which meant newly 
inserted charts would have a different background color in Calc (in other 
components, the background color is later set to transparent)

Change-Id: I6ea55389f195155a96c4c8dcc94a902b2a862178
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159751
Tested-by: Jenkins
Reviewed-by: Paris Oplopoios 

diff --git a/chart2/source/model/main/PageBackground.cxx 
b/chart2/source/model/main/PageBackground.cxx
index 592c24d3e6a2..c866bdbb3f4a 100644
--- a/chart2/source/model/main/PageBackground.cxx
+++ b/chart2/source/model/main/PageBackground.cxx
@@ -23,6 +23,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -48,7 +50,13 @@ const ::chart::tPropertyValueMap& 
StaticPageBackgroundDefaults()
 ::chart::FillProperties::AddDefaultsToMap( aTmp );
 
 // override other defaults
-::chart::PropertyHelper::setPropertyValue< sal_Int32 >( aTmp, 
::chart::FillProperties::PROP_FILL_COLOR, 0xff );
+Color aDocColor = COL_WHITE;
+if (SfxViewShell::Current()) {
+aDocColor = 
SfxViewShell::Current()->GetColorConfigColor(svtools::DOCCOLOR);
+} else {
+SAL_WARN("chart2", "SfxViewShell::Current() returned nullptr");
+}
+::chart::PropertyHelper::setPropertyValue( aTmp, 
::chart::FillProperties::PROP_FILL_COLOR, aDocColor );
 ::chart::PropertyHelper::setPropertyValue( aTmp, 
::chart::LinePropertiesHelper::PROP_LINE_STYLE, drawing::LineStyle_NONE );
 return aTmp;
 }();


[Libreoffice-commits] core.git: chart2/source

2023-11-13 Thread Julien Nabet (via logerrit)
 chart2/source/controller/main/ChartController.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 288001be6802cc41c445067a2d690371606202c3
Author: Julien Nabet 
AuthorDate: Mon Nov 13 13:33:00 2023 +0100
Commit: Julien Nabet 
CommitDate: Mon Nov 13 14:39:38 2023 +0100

Fix warning for emscripten build

TB lo_daily_tb_linux_wasm shows:

/home/tdf/jenkins/workspace/lo_gerrit/tb/src_wasm/chart2/source/controller/main/ChartController.cxx:1557:71:
 warning: unused parameter 'rAccChartView' [-Wunused-parameter]
void ChartController::impl_initializeAccessible( AccessibleChartView& 
rAccChartView )
  ^
1 warning generated.

Change-Id: If584e6944c1d9105a7a8b7170dc1022911b57bf9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159373
Reviewed-by: Julien Nabet 
Tested-by: Jenkins

diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index b4be568b5133..666d6b636740 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1554,9 +1554,9 @@ void ChartController::impl_initializeAccessible()
 impl_initializeAccessible( dynamic_cast(*xInit) 
);
 #endif
 }
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
 void ChartController::impl_initializeAccessible( AccessibleChartView& 
rAccChartView )
 {
-#if !ENABLE_WASM_STRIP_ACCESSIBILITY
 uno::Reference< XAccessible > xParent;
 {
 SolarMutexGuard aGuard;
@@ -1570,8 +1570,10 @@ void ChartController::impl_initializeAccessible( 
AccessibleChartView& rAccChartV
 }
 
 rAccChartView.initialize(*this, getChartModel(), m_xChartView, xParent, 
m_xViewWindow);
-#endif
 }
+#else
+void ChartController::impl_initializeAccessible( AccessibleChartView& /* 
rAccChartView */) {}
+#endif
 
 const o3tl::sorted_vector< OUString >& 
ChartController::impl_getAvailableCommands()
 {


[Libreoffice-commits] core.git: chart2/source cui/source dbaccess/source editeng/source extensions/source include/editeng include/sal include/svl include/svx reportdesign/source sc/inc sc/qa sc/source

2023-11-07 Thread Armin Le Grand (allotropia) (via logerrit)
 chart2/source/view/main/ChartItemPool.cxx  |4 
 cui/source/tabpages/tabarea.cxx|   20 
 dbaccess/source/ui/dlg/dbadmin.cxx |  123 +--
 dbaccess/source/ui/misc/UITools.cxx|   11 
 editeng/source/editeng/editdoc.cxx |  136 +--
 editeng/source/editeng/editobj.cxx |8 
 editeng/source/editeng/editobj2.hxx|4 
 editeng/source/editeng/fieldupdater.cxx|2 
 editeng/source/items/textitem.cxx  |   48 -
 extensions/source/propctrlr/fontdialog.cxx |   41 -
 include/editeng/fontitem.hxx   |1 
 include/editeng/wghtitem.hxx   |8 
 include/sal/log-areas.dox  |1 
 include/svl/custritm.hxx   |2 
 include/svl/itempool.hxx   |   88 +-
 include/svl/itemset.hxx|   21 
 include/svl/poolitem.hxx   |   81 +-
 include/svx/pageitem.hxx   |2 
 include/svx/sdasitm.hxx|2 
 include/svx/xbtmpit.hxx|2 
 reportdesign/source/ui/misc/UITools.cxx|  117 +-
 reportdesign/source/ui/report/ReportController.cxx |   62 -
 sc/inc/attarray.hxx|2 
 sc/inc/attrib.hxx  |2 
 sc/inc/docpool.hxx |3 
 sc/inc/patattr.hxx |9 
 sc/qa/unit/ucalc.cxx   |4 
 sc/source/core/data/attarray.cxx   |   86 +-
 sc/source/core/data/attrib.cxx |   15 
 sc/source/core/data/column.cxx |8 
 sc/source/core/data/column2.cxx|8 
 sc/source/core/data/column4.cxx|4 
 sc/source/core/data/dociter.cxx|2 
 sc/source/core/data/docpool.cxx|  207 ++---
 sc/source/core/data/document.cxx   |2 
 sc/source/core/data/fillinfo.cxx   |   12 
 sc/source/core/data/global.cxx |2 
 sc/source/core/data/patattr.cxx|   45 -
 sc/source/core/data/table2.cxx |2 
 sc/source/core/data/table3.cxx |8 
 sc/source/core/data/table4.cxx |4 
 sc/source/filter/excel/xestyle.cxx |2 
 sc/source/filter/excel/xistyle.cxx |2 
 sc/source/filter/lotus/lotattr.cxx |2 
 sc/source/filter/oox/sheetdatabuffer.cxx   |2 
 sc/source/filter/oox/stylesbuffer.cxx  |4 
 sc/source/ui/app/inputhdl.cxx  |2 
 sc/source/ui/app/msgpool.cxx   |   21 
 sc/source/ui/condformat/condformatdlg.cxx  |4 
 sc/source/ui/inc/editsh.hxx|   12 
 sc/source/ui/undo/undoblk3.cxx |   12 
 sc/source/ui/undo/undocell.cxx |   12 
 sc/source/ui/unoobj/cellsuno.cxx   |2 
 sc/source/ui/view/cellsh1.cxx  |8 
 sc/source/ui/view/editsh.cxx   |   27 
 sc/source/ui/view/output.cxx   |6 
 sc/source/ui/view/output2.cxx  |   70 -
 sc/source/ui/view/spelleng.cxx |2 
 sc/source/ui/view/tabvwshc.cxx |2 
 sc/source/ui/view/viewfunc.cxx |   10 
 sd/source/ui/func/fupage.cxx   |2 
 sd/source/ui/unoidl/unomodel.cxx   |5 
 sfx2/source/control/shell.cxx  |2 
 sfx2/source/control/statcach.cxx   |9 
 sfx2/source/dialog/dinfdlg.cxx |3 
 sfx2/source/explorer/nochaos.cxx   |2 
 svl/qa/unit/items/stylepool.cxx|4 
 svl/qa/unit/items/test_itempool.cxx|   70 -
 svl/source/inc/poolio.hxx  |  142 ---
 svl/source/items/custritm.cxx  |8 
 svl/source/items/itempool.cxx  |  823 +
 svl/source/items/itemset.cxx   |  334 ++--
 svl/source/items/poolcach.cxx  |   27 
 svl/source/items/poolitem.cxx  |   88 ++
 svl/source/items/sitem.cxx |3 
 svl/source/items/stylepool.cxx |   14 
 svl/source/items/voiditem.cxx  |6 
 svx/qa/unit/customshapes.cxx   |4 
 svx/source/dialog/framelinkarray.cxx   |   16 
 svx/source/items/customshapeitem.cxx   |   17 
 svx/source/items/pageitem.cxx  |8 
 svx/source/sidebar/nbdtmg.cxx  |2 
 svx/source/svdraw/s

[Libreoffice-commits] core.git: chart2/source include/comphelper sw/source writerfilter/CppunitTest_writerfilter_dmapper.mk writerfilter/qa writerfilter/source

2023-10-24 Thread Miklos Vajna (via logerrit)
 chart2/source/model/main/ChartModel.cxx
|4 
 chart2/source/view/main/ChartView.cxx  
|4 
 include/comphelper/dumpxmltostring.hxx 
|2 
 sw/source/uibase/inc/unotxvw.hxx   
|7 +
 sw/source/uibase/uno/unotxvw.cxx   
|   13 +++
 writerfilter/CppunitTest_writerfilter_dmapper.mk   
|1 
 writerfilter/qa/cppunittests/dmapper/SettingsTable.cxx 
|   32 ++-
 writerfilter/qa/cppunittests/dmapper/data/floattable-vertical-frame-offset.rtf 
|   43 ++
 writerfilter/source/dmapper/SettingsTable.cxx  
|2 
 writerfilter/source/filter/WriterFilter.cxx
|1 
 10 files changed, 99 insertions(+), 10 deletions(-)

New commits:
commit 612629f4a81acd7b851b7eccc97aba9a5915d13c
Author: Miklos Vajna 
AuthorDate: Tue Oct 24 09:06:54 2023 +0200
Commit: Miklos Vajna 
CommitDate: Tue Oct 24 10:43:42 2023 +0200

tdf#155040 sw floattable, RTF: fix table is overlapped by subsequent inline 
one

The document had overlapping text on load since commit
05425f73bfa41d3f7591461e2ad0beb4fafc39b4 (sw floatable: teach the RTF
import about SwFormatFlySplit, 2023-04-21).

Interestingly the DOCX equivalent was fine, there the inline table is
shifted down, below the floating table, so the overlap doesn't happen.

Fix the problem by moving the AddVerticalFrameOffsets=true code from the
DOCX filter to the shared dmapper, because RTF needs the same.

See commit 50223ea6e212b60b7d33839c2753c5601fb50f95 (tdf#98987 sw: add
AddVerticalFrameOffsets compat mode, 2016-03-31) for more details about
this compat flag. It was already enabled for DOC, too.

Change-Id: I948b179c9ec5fa24377014b0e86826568c417b6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158372
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/chart2/source/model/main/ChartModel.cxx 
b/chart2/source/model/main/ChartModel.cxx
index 5634f358cce1..19fccff373e9 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -37,7 +37,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 #include 
@@ -1287,7 +1287,7 @@ uno::Sequence< Reference< 
chart2::data::XLabeledDataSequence > > SAL_CALL ChartM
 OUString SAL_CALL ChartModel::dump(OUString const & kind)
 {
 if (kind.isEmpty()) {
-return dumpXmlToString([this](auto writer) { return dumpAsXml(writer); 
});
+return comphelper::dumpXmlToString([this](auto writer) { return 
dumpAsXml(writer); });
 }
 
 // kind == "shapes":
diff --git a/chart2/source/view/main/ChartView.cxx 
b/chart2/source/view/main/ChartView.cxx
index 51132d5a9679..bed80f49b326 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -56,7 +56,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -1819,7 +1819,7 @@ uno::Sequence< OUString > 
ChartView::getAvailableServiceNames()
 OUString ChartView::dump(OUString const & kind)
 {
 if (kind.isEmpty()) {
-return dumpXmlToString([this](auto writer) { return dumpAsXml(writer); 
});
+return comphelper::dumpXmlToString([this](auto writer) { return 
dumpAsXml(writer); });
 }
 
 // kind == "shapes":
diff --git a/chart2/source/inc/dumpxmltostring.hxx 
b/include/comphelper/dumpxmltostring.hxx
similarity index 98%
rename from chart2/source/inc/dumpxmltostring.hxx
rename to include/comphelper/dumpxmltostring.hxx
index b5cfe5a1fab8..72cdafee35fe 100644
--- a/chart2/source/inc/dumpxmltostring.hxx
+++ b/include/comphelper/dumpxmltostring.hxx
@@ -16,7 +16,7 @@
 
 #include 
 
-namespace chart
+namespace comphelper
 {
 template  OUString dumpXmlToString(F f)
 {
diff --git a/sw/source/uibase/inc/unotxvw.hxx b/sw/source/uibase/inc/unotxvw.hxx
index 2ceb49215704..d55c02f78d57 100644
--- a/sw/source/uibase/inc/unotxvw.hxx
+++ b/sw/source/uibase/inc/unotxvw.hxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -59,7 +60,8 @@ typedef cppu::ImplInheritanceHelper<
 css::view::XViewSettingsSupplier,
 css::beans::XPropertySet,
 css::datatransfer::XTransferableSupplier,
-css::datatransfer::XTransferableTextSupplier> SwXTextView_Base;
+css::datatransfer::XTransferableTextSupplier,
+css::qa::XDumper> SwXTextView_Base;
 class SwXTextView final : public SwXTextView_Base
 {
 
::comphelper::OInterfaceContainerHelper3 
m_SelChangedListeners;
@@ -132,6 +134,9 @@ public:
 // XTransferableTextSupplier
 virtual css::uno::Reference SAL_CALL 
getTransferableForTextRange(css::uno::Reference const&

[Libreoffice-commits] core.git: chart2/source xmloff/source

2023-10-16 Thread Mike Kaganski (via logerrit)
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx |   15 ++
 chart2/source/controller/inc/ChartDocumentWrapper.hxx |4 +
 chart2/source/inc/ChartViewHelper.hxx |   14 +-
 chart2/source/tools/ChartViewHelper.cxx   |   10 +++-
 xmloff/source/chart/SchXMLImport.cxx  |   22 
+-
 5 files changed, 58 insertions(+), 7 deletions(-)

New commits:
commit f26bf09a0e93449ea85269a09a8a073a20903349
Author: Mike Kaganski 
AuthorDate: Mon Oct 16 15:22:17 2023 +0300
Commit: Mike Kaganski 
CommitDate: Mon Oct 16 18:27:49 2023 +0200

tdf#141892: Set chart view to dirty state after loading

Previously, ChartViewHelper::setViewToDirtyState was only called in
ChartModel::impl_notifyModifiedListeners during the load process of
inline charts; after commit 574eec9036c5f185b3572ba1e0ca9d111eb361dc,
the chart doesn't set its modified state when loading, and thus the
view did not get notified about the necessary updates.

This change introduces a hidden property in ChartDocumentWrapper,
named 'ODFImport_UpdateView', which is set in SchXMLImport dtor
to force the notification after the loading.

Change-Id: Id9d82f16d233d2172cd6808a8498822e13b21b21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158051
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 70c9ace455b9..ea01ae000b65 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1366,6 +1367,20 @@ void ChartDocumentWrapper::_disposing( const 
lang::EventObject& rSource )
 m_xChartView.clear();
 }
 
+//  XPropertySet 
+void SAL_CALL ChartDocumentWrapper::setPropertyValue(const OUString& 
rPropertyName, const css::uno::Any& rValue)
+{
+if (rPropertyName == u"ODFImport_UpdateView")
+{
+// A hack used at load time to notify the view that it needs an update
+// See SchXMLImport::~SchXMLImport
+if (auto xChartModel = rValue.query())
+ChartViewHelper::setViewToDirtyState_UNO(xChartModel);
+return;
+}
+ChartDocumentWrapper_Base::setPropertyValue(rPropertyName, rValue);
+}
+
 // WrappedPropertySet
 Reference< beans::XPropertySet > ChartDocumentWrapper::getInnerPropertySet()
 {
diff --git a/chart2/source/controller/inc/ChartDocumentWrapper.hxx 
b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
index 04f76d705b6b..a5bded3c8fb7 100644
--- a/chart2/source/controller/inc/ChartDocumentWrapper.hxx
+++ b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
@@ -139,6 +139,10 @@ protected:
 virtual std::vector< std::unique_ptr > 
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();
 
diff --git a/chart2/source/inc/ChartViewHelper.hxx 
b/chart2/source/inc/ChartViewHelper.hxx
index 06fef6a1ff9b..be70dd9fecb4 100644
--- a/chart2/source/inc/ChartViewHelper.hxx
+++ b/chart2/source/inc/ChartViewHelper.hxx
@@ -21,14 +21,22 @@
 #include "charttoolsdllapi.hxx"
 #include 
 
+#include 
+
+namespace com::sun::star::chart2
+{
+class XChartDocument;
+}
+
 namespace chart
 {
 class ChartModel;
 
-class OOO_DLLPUBLIC_CHARTTOOLS ChartViewHelper
+namespace ChartViewHelper
 {
-public:
-static void setViewToDirtyState(const rtl::Reference<::chart::ChartModel>& 
xChartModel);
+OOO_DLLPUBLIC_CHARTTOOLS void setViewToDirtyState(const 
rtl::Reference& xChartModel);
+OOO_DLLPUBLIC_CHARTTOOLS void
+setViewToDirtyState_UNO(const 
css::uno::Reference& xChartModel);
 };
 
 } //namespace chart
diff --git a/chart2/source/tools/ChartViewHelper.cxx 
b/chart2/source/tools/ChartViewHelper.cxx
index 183d28189531..8011da3c171c 100644
--- a/chart2/source/tools/ChartViewHelper.cxx
+++ b/chart2/source/tools/ChartViewHelper.cxx
@@ -21,8 +21,7 @@
 #include 
 #include 
 
-#include 
-#include 
+#include 
 #include 
 #include 
 
@@ -51,6 +50,13 @@ void ChartViewHelper::setViewToDirtyState(const 
rtl::Reference<::chart::ChartMod
 DBG_UNHANDLED_EXCEPTION("chart2");
 }
 }
+
+void ChartViewHelper::setViewToDirtyState_UNO(
+const css::uno::Reference& xChartModel)
+{
+if (auto pChartModel = dynamic_cast(xChartModel.get()))
+setViewToDirtyState(rtl::Reference(pChartModel));
+}
 } //namespace chart
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/chart/SchXM

[Libreoffice-commits] core.git: chart2/source

2023-10-16 Thread Mike Kaganski (via logerrit)
 chart2/source/model/main/ChartModel_Persistence.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7215ac4ded82da0c0efc6a5d9465f632e8e8a4b6
Author: Mike Kaganski 
AuthorDate: Mon Oct 16 10:11:26 2023 +0300
Commit: Mike Kaganski 
CommitDate: Mon Oct 16 11:12:52 2023 +0200

tdf#157776: Do not send delayed update notifications for setModified(false)

Change-Id: I4948cc217079d2ed535b95e3892e619736237cc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158014
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx 
b/chart2/source/model/main/ChartModel_Persistence.cxx
index 74ae45dff8c2..03824aab5ca5 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -671,7 +671,8 @@ void SAL_CALL ChartModel::setModified( sal_Bool bModified )
 
 if( m_nControllerLockCount > 0 )
 {
-m_bUpdateNotificationsPending = true;
+if (bModified)
+m_bUpdateNotificationsPending = true; // Maybe !bModified should 
reset it?
 return;//don't call listeners if controllers are locked
 }
 aGuard.clear();


[Libreoffice-commits] core.git: chart2/source include/svx reportdesign/inc reportdesign/source sc/inc sc/source sd/inc sd/source svx/source sw/inc sw/source

2023-10-06 Thread Noel Grandin (via logerrit)
 chart2/source/inc/chartview/DrawModelWrapper.hxx |2 +-
 chart2/source/view/main/DrawModelWrapper.cxx |8 +++-
 include/svx/svdmodel.hxx |9 +
 reportdesign/inc/RptModel.hxx|2 +-
 reportdesign/source/core/sdr/RptModel.cxx|4 ++--
 sc/inc/drwlayer.hxx  |2 +-
 sc/source/core/data/drwlayer.cxx |6 +++---
 sd/inc/drawdoc.hxx   |2 +-
 sd/source/core/drawdoc.cxx   |4 ++--
 sd/source/ui/animations/SlideTransitionPane.cxx  |2 +-
 sd/source/ui/app/sdxfer.cxx  |4 ++--
 sd/source/ui/slideshow/slideshowimpl.cxx |2 +-
 svx/source/svdraw/svdmodel.cxx   |9 -
 svx/source/svdraw/svdoole2.cxx   |3 +--
 svx/source/unogallery/unogalitem.cxx |6 +++---
 svx/source/unogallery/unogaltheme.cxx|4 ++--
 svx/source/xml/xmlexport.cxx |   10 ++
 sw/inc/drawdoc.hxx   |2 +-
 sw/source/core/draw/drawdoc.cxx  |4 ++--
 19 files changed, 42 insertions(+), 43 deletions(-)

New commits:
commit 516f7dafd009988f3fc58041bc265b836f4b7322
Author: Noel Grandin 
AuthorDate: Fri Oct 6 09:58:45 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 6 14:13:28 2023 +0200

SdrModel::getUnoModel can use XModel instead of XInterface

Change-Id: Ica10c62066881ba86099d2057ff6fe20e0084a85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157632
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx 
b/chart2/source/inc/chartview/DrawModelWrapper.hxx
index fb977528e8f1..080587e7ecfe 100644
--- a/chart2/source/inc/chartview/DrawModelWrapper.hxx
+++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx
@@ -66,7 +66,7 @@ public:
 
 SfxItemPool&GetItemPool();
 
-SAL_DLLPRIVATE virtual css::uno::Reference< css::uno::XInterface >
+SAL_DLLPRIVATE virtual css::uno::Reference< css::frame::XModel >
 createUnoModel() override;
 SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel >
 getUnoModel();
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx 
b/chart2/source/view/main/DrawModelWrapper.cxx
index d5aff15c6660..9b4a8b28a1ef 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -123,16 +123,14 @@ DrawModelWrapper::~DrawModelWrapper()
 m_pRefDevice.disposeAndClear();
 }
 
-uno::Reference< uno::XInterface > DrawModelWrapper::createUnoModel()
+uno::Reference< frame::XModel > DrawModelWrapper::createUnoModel()
 {
-uno::Reference< lang::XComponent > xComponent = new SvxUnoDrawingModel( 
this ); //tell Andreas Schluens if SvxUnoDrawingModel is not needed anymore -> 
remove export from svx to avoid link problems in writer
-return uno::Reference< uno::XInterface >::query( xComponent );
+return new SvxUnoDrawingModel( this ); //tell Andreas Schluens if 
SvxUnoDrawingModel is not needed anymore -> remove export from svx to avoid 
link problems in writer
 }
 
 uno::Reference< frame::XModel > DrawModelWrapper::getUnoModel()
 {
-uno::Reference< uno::XInterface > xI = SdrModel::getUnoModel();
-return uno::Reference::query( xI );
+return SdrModel::getUnoModel();
 }
 
 SdrModel& DrawModelWrapper::getSdrModel()
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 9016c9a03fe0..81ec0927db4c 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -253,7 +254,7 @@ public:
 
 protected:
 void implDtorClearModel();
-virtual css::uno::Reference< css::uno::XInterface > createUnoModel();
+virtual css::uno::Reference< css::frame::XModel > createUnoModel();
 
 private:
 SdrModel(const SdrModel& rSrcModel) = delete;
@@ -267,7 +268,7 @@ private:
 SVX_DLLPRIVATE void ImpCreateTables(bool bDisablePropertyFiles);
 
 // this is a weak reference to a possible living api wrapper for this model
-css::uno::Reference< css::uno::XInterface > mxUnoModel;
+css::uno::Reference< css::frame::XModel > mxUnoModel;
 
 // used to disable unique name checking during page move
 bool mbMakePageObjectsNamesUnique = true;
@@ -553,8 +554,8 @@ public:
 bool GetDisableTextEditUsesCommonUndoManager() const { return 
mbDisableTextEditUsesCommonUndoManager; }
 void SetDisableTextEditUsesCommonUndoManager(bool bNew) { 
mbDisableTextEditUsesCommonUndoManager = bNew; }
 
-css::uno::Reference< css::uno::XInterface > const & getUnoModel();
-void setUnoModel( const css::uno::Reference< css::uno::XInterface >& 
xModel );
+css::uno::Reference< css::frame::XModel > const & getUnoModel();
+void setUnoModel( const css::uno::Reference< css::frame

[Libreoffice-commits] core.git: chart2/source include/svx svx/source

2023-10-05 Thread Caolán McNamara (via logerrit)
 chart2/source/view/main/DrawModelWrapper.cxx |5 -
 include/svx/svdmodel.hxx |1 +
 svx/source/svdraw/svdmodel.cxx   |7 ++-
 3 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 5c52884611a0e8586ecfa8ccaf24c9e22ad5a872
Author: Caolán McNamara 
AuthorDate: Wed Oct 4 20:32:17 2023 +0100
Commit: Caolán McNamara 
CommitDate: Thu Oct 5 12:11:38 2023 +0200

crashtesting: crash seen on exit of chart

with soffice --headless --convert-to ods forum-mso-en4-569016.xlsx

and other similar

Change-Id: I908fa834c1072a9854055cad1ee6261800d76aea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157573
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/chart2/source/view/main/DrawModelWrapper.cxx 
b/chart2/source/view/main/DrawModelWrapper.cxx
index 1767d2ccdb6b..d5aff15c6660 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -101,8 +101,11 @@ DrawModelWrapper::DrawModelWrapper()
 
 DrawModelWrapper::~DrawModelWrapper()
 {
+// normally call from ~SdrModel, but do it here explicitly before we clear 
m_xChartItemPool
+implDtorClearModel();
+
 //remove m_pChartItemPool from pool chain
-if(m_xChartItemPool)
+if (m_xChartItemPool)
 {
 SfxItemPool* pPool = &GetItemPool();
 for (;;)
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index a5a3a10a2763..9016c9a03fe0 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -252,6 +252,7 @@ public:
 tools::Long nLower = 0);
 
 protected:
+void implDtorClearModel();
 virtual css::uno::Reference< css::uno::XInterface > createUnoModel();
 
 private:
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index a368af5a1a5e..ef4ffdfb9c29 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -200,7 +200,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, 
comphelper::IEmbeddedHelper* pEmbeddedHel
 mpImpl->initTheme();
 }
 
-SdrModel::~SdrModel()
+void SdrModel::implDtorClearModel()
 {
 mbInDestruction = true;
 
@@ -216,6 +216,11 @@ SdrModel::~SdrModel()
 m_pCurrentUndoGroup.reset();
 
 ClearModel(true);
+}
+
+SdrModel::~SdrModel()
+{
+implDtorClearModel();
 
 #ifdef DBG_UTIL
 // SdrObjectLifetimeWatchDog:


[Libreoffice-commits] core.git: chart2/source include/cppcanvas o3tl/qa sal/qa svx/source sw/inc sw/source vcl/source vcl/unx

2023-09-24 Thread Stephan Bergmann (via logerrit)
 chart2/source/inc/DataSeries.hxx  |2 -
 chart2/source/inc/Diagram.hxx |2 -
 include/cppcanvas/canvas.hxx  |2 -
 o3tl/qa/test-string_view.cxx  |4 --
 sal/qa/rtl/strings/test_ostring_concat.cxx|   14 --
 sal/qa/rtl/strings/test_oustring_concat.cxx   |7 -
 svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx |2 -
 sw/inc/calbck.hxx |4 +-
 sw/source/core/txtnode/modeltoviewhelper.cxx  |4 +-
 vcl/source/filter/png/PngImageReader.cxx  |7 -
 vcl/unx/generic/fontmanager/fontconfig.cxx|7 -
 11 files changed, 5 insertions(+), 50 deletions(-)

New commits:
commit 72da78be20ebe1cd62ba7a5ac6e29b9d40f00f15
Author: Stephan Bergmann 
AuthorDate: Sun Sep 24 11:57:35 2023 +0300
Commit: Stephan Bergmann 
CommitDate: Sun Sep 24 17:31:16 2023 +0200

Drop some newly obsolete __GNUC__ version checks

...after 6ef2d358ac053ce0f6de9cf0f8f25e8bae66d441 "Adapt Clang and GCC 
minimum
version checks"

Change-Id: I5f3bcda2ce8e0e093af3bdd9d2cca741a5b95306
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157202
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/chart2/source/inc/DataSeries.hxx b/chart2/source/inc/DataSeries.hxx
index 932fcd836b9a..e643486d5992 100644
--- a/chart2/source/inc/DataSeries.hxx
+++ b/chart2/source/inc/DataSeries.hxx
@@ -61,9 +61,7 @@ typedef ::cppu::WeakImplHelper<
 }
 
 class OOO_DLLPUBLIC_CHARTTOOLS DataSeries
-#if !defined __GNUC__ || __GNUC__ >= 12 || defined __clang__
 final
-#endif
 : public impl::DataSeries_Base
 , public ::property::OPropertySet
 {
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 65532a9a512d..1d3e8bd78901 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -73,9 +73,7 @@ typedef ::cppu::WeakImplHelper<
 }
 
 class OOO_DLLPUBLIC_CHARTTOOLS Diagram
-#if !defined __GNUC__ || __GNUC__ >= 12 || defined __clang__
 final
-#endif
 : public impl::Diagram_Base
 , public ::property::OPropertySet
 {
diff --git a/include/cppcanvas/canvas.hxx b/include/cppcanvas/canvas.hxx
index 97562ede24fb..2fce102824dd 100644
--- a/include/cppcanvas/canvas.hxx
+++ b/include/cppcanvas/canvas.hxx
@@ -68,9 +68,7 @@ namespace cppcanvas
 Canvas(Canvas const &) = default;
 Canvas(Canvas &&) = default;
 Canvas & operator =(Canvas const &) = default;
-#if !(defined __GNUC__ && !defined __clang__ && __GNUC__ == 8) // bogus 
-Werror=virtual-move-assign
 Canvas & operator =(Canvas &&) = default;
-#endif
 
 virtual ~Canvas() {}
 
diff --git a/o3tl/qa/test-string_view.cxx b/o3tl/qa/test-string_view.cxx
index bbe5cbf0eddc..c534adbd945f 100644
--- a/o3tl/qa/test-string_view.cxx
+++ b/o3tl/qa/test-string_view.cxx
@@ -20,9 +20,6 @@
 #include 
 #include 
 
-// gcc 11.2.0 triggers a spurious -Werror=stringop-overread
-#if !(defined __GNUC__ && __GNUC__ == 11 && __GNUC_MINOR__ == 2)
-
 template <>
 inline std::string
 CppUnit::assertion_traits::toString(std::u16string_view 
const& x)
@@ -752,6 +749,5 @@ private:
 
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 }
-#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/sal/qa/rtl/strings/test_ostring_concat.cxx 
b/sal/qa/rtl/strings/test_ostring_concat.cxx
index 11bf8ebf80af..f7bc41e3cf95 100644
--- a/sal/qa/rtl/strings/test_ostring_concat.cxx
+++ b/sal/qa/rtl/strings/test_ostring_concat.cxx
@@ -64,23 +64,9 @@ void test::ostring::StringConcat::checkConcat()
 CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringBuffer( "foo" ) 
+ "bar" ));
 CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringBuffer, const char[ 4 
] > )), typeid( OStringBuffer( "foo" ) + "bar" ));
 CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringLiteral( "foo" 
) + "bar" ));
-#if defined __GNUC__ && __GNUC__ <= 11 && !defined __clang__
-CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral<4>, const 
char[ 4 ] > )), typeid( OStringLiteral<4>( "foo" ) + "bar" ));
-// the explicit OStringLiteral<4> template argument in the unevaluated 
typeid context
-// is needed by some GCC versions, see 

-// "Failed class template argument deduction in unevaluated, 
parenthesized context"
-#else
 CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral<4>, const 
char[ 4 ] > )), typeid( OStringLiteral( "foo" ) + "bar" ));
-#endif
 CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringLiteral( "foo" 
) + static_cast("bar") ));
-#if defined __GNUC__ && __GNUC__ <= 11 && !defined __clang__
-CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStri

[Libreoffice-commits] core.git: chart2/source configure.ac sfx2/source

2023-09-18 Thread Sarper Akdemir (via logerrit)
 chart2/source/controller/main/ChartController.cxx |6 ++
 configure.ac  |2 +-
 sfx2/source/control/thumbnailview.cxx |6 ++
 3 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 971425f9b7613183a565e9b4ec5792b3f67bb133
Author: Sarper Akdemir 
AuthorDate: Fri Sep 15 23:30:42 2023 +0300
Commit: Sarper Akdemir 
CommitDate: Mon Sep 18 19:56:50 2023 +0200

fix emscripten build

Change-Id: I15df992e410f741a22d1f140b85e57a97195a5f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157020
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir 

diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index 7e33f4b0ccef..b4be568b5133 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1528,6 +1528,7 @@ uno::Reference< XAccessible > 
ChartController::CreateAccessible()
 
 void ChartController::impl_invalidateAccessible()
 {
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
 SolarMutexGuard aGuard;
 auto pChartWindow(GetChartWindow());
 if( pChartWindow )
@@ -1539,9 +1540,11 @@ void ChartController::impl_invalidateAccessible()
 dynamic_cast(*xInit).initialize();
 }
 }
+#endif
 }
 void ChartController::impl_initializeAccessible()
 {
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
 SolarMutexGuard aGuard;
 auto pChartWindow(GetChartWindow());
 if( !pChartWindow )
@@ -1549,9 +1552,11 @@ void ChartController::impl_initializeAccessible()
 Reference< XInterface > xInit( pChartWindow->GetAccessible(false) );
 if(xInit.is())
 impl_initializeAccessible( dynamic_cast(*xInit) 
);
+#endif
 }
 void ChartController::impl_initializeAccessible( AccessibleChartView& 
rAccChartView )
 {
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
 uno::Reference< XAccessible > xParent;
 {
 SolarMutexGuard aGuard;
@@ -1565,6 +1570,7 @@ void ChartController::impl_initializeAccessible( 
AccessibleChartView& rAccChartV
 }
 
 rAccChartView.initialize(*this, getChartModel(), m_xChartView, xParent, 
m_xViewWindow);
+#endif
 }
 
 const o3tl::sorted_vector< OUString >& 
ChartController::impl_getAvailableCommands()
diff --git a/configure.ac b/configure.ac
index 899724df2547..0cebc8b88925 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3048,7 +3048,7 @@ fi
 # also work with the default gtk3 plugin.
 if test "$enable_wasm_strip" = "yes"; then
 enable_avmedia=no
-enable_cmis=no
+enable_libcmis=no
 enable_coinmp=no
 enable_cups=no
 test "$_os" = Emscripten && enable_curl=no
diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index 65bc3d878df0..2d4e8bb57611 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
 #include 
 #include 
 
@@ -40,7 +42,9 @@
 #include 
 
 #include 
+#if !ENABLE_WASM_STRIP_RECENT
 #include "recentdocsviewitem.hxx"
+#endif
 
 using namespace basegfx;
 using namespace basegfx::utils;
@@ -416,6 +420,7 @@ void ThumbnailView::CalculateItemPositions(bool 
bScrollBarUsed)
 {
 ThumbnailViewItem *const pItem = mFilteredItemList[i];
 
+#if !ENABLE_WASM_STRIP_RECENT
 // tdf#38742 - show pinned items in a separate line
 if (auto const pRecentDocsItem = 
dynamic_cast(pItem))
 {
@@ -431,6 +436,7 @@ void ThumbnailView::CalculateItemPositions(bool 
bScrollBarUsed)
 nCurCount = 0;
 }
 }
+#endif
 
 if ((nCurCount >= nFirstItem) && (nCurCount < nLastItem))
 {


[Libreoffice-commits] core.git: chart2/source

2023-09-11 Thread Noel Grandin (via logerrit)
 chart2/source/model/filter/XMLFilter.cxx |   14 +-
 chart2/source/model/inc/XMLFilter.hxx|2 --
 2 files changed, 1 insertion(+), 15 deletions(-)

New commits:
commit d30f9c74201880b62c51dc8c456a59a89b70d7da
Author: Noel Grandin 
AuthorDate: Mon Sep 11 14:25:18 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Sep 11 19:21:10 2023 +0200

remove dead m_bCancelOperation flag from XMLFilter

has always been ignored

Change-Id: I272ca7026ddf25fbc679e7933ea23986466ad70b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156822
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/model/filter/XMLFilter.cxx 
b/chart2/source/model/filter/XMLFilter.cxx
index 6eccb22be375..f430e3e48851 100644
--- a/chart2/source/model/filter/XMLFilter.cxx
+++ b/chart2/source/model/filter/XMLFilter.cxx
@@ -186,8 +186,7 @@ namespace chart
 {
 
 XMLFilter::XMLFilter( Reference< uno::XComponentContext > const & xContext ) :
-m_xContext( xContext ),
-m_bCancelOperation( false )
+m_xContext( xContext )
 {}
 
 XMLFilter::~XMLFilter()
@@ -201,11 +200,6 @@ sal_Bool SAL_CALL XMLFilter::filter(
 
 MutexGuard aGuard( m_aMutex );
 
-// ignore cancel flag at start of function
-// note: is currently ignored during import/export
-if( m_bCancelOperation )
-m_bCancelOperation = false;
-
 if( m_xSourceDoc.is())
 {
 OSL_ENSURE( ! m_xTargetDoc.is(), "source doc is set -> target document 
should not be set" );
@@ -235,12 +229,6 @@ sal_Bool SAL_CALL XMLFilter::filter(
 
 void SAL_CALL XMLFilter::cancel()
 {
-// if mutex is locked set "cancel state"
-// note: is currently ignored in filter-method
-if( ! m_aMutex.tryToAcquire())
-{
-m_bCancelOperation = true;
-}
 }
 
 //  XImporter 
diff --git a/chart2/source/model/inc/XMLFilter.hxx 
b/chart2/source/model/inc/XMLFilter.hxx
index c26587c3ebad..12c28ad40e79 100644
--- a/chart2/source/model/inc/XMLFilter.hxx
+++ b/chart2/source/model/inc/XMLFilter.hxx
@@ -123,8 +123,6 @@ private:
 css::uno::Sequence m_aMediaDescriptor;
 
 OUStringm_sDocumentHandler; // when set it 
will be set as doc handler
-
-volatile bool  m_bCancelOperation;
 ::osl::Mutex   m_aMutex;
 };
 


[Libreoffice-commits] core.git: chart2/source

2023-09-08 Thread Noel Grandin (via logerrit)
 chart2/source/view/main/PropertyMapper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9e24e0160b3cb0d2bbd5ffe584d98a126783d279
Author: Noel Grandin 
AuthorDate: Fri Sep 8 13:47:38 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 8 18:39:37 2023 +0200

improve log message

Change-Id: Ifb793b9f1d1476617239b826705f8838bdc66303
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156714
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/view/main/PropertyMapper.cxx 
b/chart2/source/view/main/PropertyMapper.cxx
index 2700769f595c..c3241049057a 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -119,7 +119,7 @@ void PropertyMapper::setMappedProperties(
 }
 catch( const uno::Exception& )
 {
-TOOLS_WARN_EXCEPTION("chart2", "" );
+TOOLS_WARN_EXCEPTION("chart2", "exception mapping property from " 
<< rSource << " to " << rTarget);
 }
 }
 if (nN == 0)


[Libreoffice-commits] core.git: chart2/source

2023-09-06 Thread Noel Grandin (via logerrit)
 chart2/source/controller/accessibility/AccessibleChartView.cxx |   22 
+++---
 1 file changed, 8 insertions(+), 14 deletions(-)

New commits:
commit 3ce2232c05f13a5b1303156d2b0321009b017620
Author: Noel Grandin 
AuthorDate: Wed Sep 6 12:34:02 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 6 13:20:09 2023 +0200

tdf#157115 crash on inserting chart (gtk3)

regression from
commit bdf2d664784b3ebe3e7078b9ec82a02d09d9ded8
Author: Noel Grandin 
Date:   Sat Sep 2 10:44:51 2023 +0200
use more concrete type in AccessibleChartView

Change-Id: I5f76f10404d6a202b1653f5e7cabc665b5962557
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156615
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx 
b/chart2/source/controller/accessibility/AccessibleChartView.cxx
index 8f4103ee6060..acedf732cc87 100644
--- a/chart2/source/controller/accessibility/AccessibleChartView.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx
@@ -213,32 +213,26 @@ void AccessibleChartView::initialize( ChartController& 
rNewChartController,
 
 if( xNewWindow != xWindow )
 {
-xWindow.set( xNewWindow );
+xWindow = xNewWindow;
 bChanged = true;
 }
 
-if( xChartModel.is() && xChartView.is() )
+if(xChartController != &rNewChartController)
 {
-if(xChartController != &rNewChartController)
-{
-bChanged = true;
+if (xChartController)
 xChartController->removeSelectionChangeListener(this);
-rNewChartController.addSelectionChangeListener(this);
-xChartController = &rNewChartController;
-}
-}
-else if( xChartController.is() )
-{
+rNewChartController.addSelectionChangeListener(this);
+xChartController = &rNewChartController;
 bChanged = true;
-xChartController->removeSelectionChangeListener(this);
-xChartController = nullptr;
 }
 
 if( !xChartController.is() || !xChartModel.is() || !xChartView.is() )
 {
 if(xChartController.is())
+{
 xChartController->removeSelectionChangeListener(this);
-xChartController = nullptr;
+xChartController.clear();
+}
 xChartModel.clear();
 xChartView.clear();
 xParent.clear();


[Libreoffice-commits] core.git: chart2/source

2023-09-02 Thread Noel Grandin (via logerrit)
 chart2/source/controller/accessibility/AccessibleChartElement.cxx |   23 
+--
 chart2/source/controller/accessibility/AccessibleChartElement.hxx |3 
 chart2/source/controller/accessibility/AccessibleTextHelper.cxx   |   15 
 chart2/source/controller/inc/AccessibleTextHelper.hxx |9 +-
 chart2/source/controller/inc/ChartController.hxx  |   32 
+++---
 chart2/source/controller/main/ChartController.cxx |   32 
--
 chart2/source/controller/main/ChartController_TextEdit.cxx|   11 +--
 chart2/source/inc/servicenames.hxx|4 -
 8 files changed, 28 insertions(+), 101 deletions(-)

New commits:
commit 21af3e5b5df02747691f08c453407d0abfc91242
Author: Noel Grandin 
AuthorDate: Sat Sep 2 14:19:55 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Sep 2 21:14:18 2023 +0200

use more concrete type in chart::AccessibleTextHelper

Change-Id: I3ad20c37bb2009964cf20a1ee184b2674de82817
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156470
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/accessibility/AccessibleChartElement.cxx 
b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
index cca038b5be94..209d282c2c77 100644
--- a/chart2/source/controller/accessibility/AccessibleChartElement.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
@@ -18,6 +18,7 @@
  */
 
 #include "AccessibleChartElement.hxx"
+#include 
 #include 
 #include 
 #include 
@@ -86,29 +87,15 @@ void AccessibleChartElement::InitTextEdit()
 if( ! m_xTextHelper.is())
 {
 // get hard reference
-rtl::Reference< ::chart::ChartController > xSelSupp( 
GetInfo().m_xChartController );
-if( xSelSupp.is())
-{
-m_xTextHelper.set(
-xSelSupp->createInstance( CHART_ACCESSIBLE_TEXT_SERVICE_NAME 
), uno::UNO_QUERY );
-}
+rtl::Reference< ::chart::ChartController > xChartController( 
GetInfo().m_xChartController );
+if( xChartController.is())
+m_xTextHelper = xChartController->createAccessibleTextContext();
 }
 
 if( !m_xTextHelper.is())
 return;
 
-try
-{
-Reference< lang::XInitialization > xInit( m_xTextHelper, 
uno::UNO_QUERY_THROW );
-Sequence< uno::Any > aArgs{ uno::Any(GetInfo().m_aOID.getObjectCID()),
-uno::Any(Reference< XAccessible >( this )),
-uno::Any(Reference< awt::XWindow >( 
GetInfo().m_xWindow )) };
-xInit->initialize( aArgs );
-}
-catch( const uno::Exception & )
-{
-DBG_UNHANDLED_EXCEPTION("chart2");
-}
+m_xTextHelper->initialize( GetInfo().m_aOID.getObjectCID(), this, 
GetInfo().m_xWindow );
 }
 
 // Interfaces
diff --git a/chart2/source/controller/accessibility/AccessibleChartElement.hxx 
b/chart2/source/controller/accessibility/AccessibleChartElement.hxx
index 944aa5fa822a..283efed69d80 100644
--- a/chart2/source/controller/accessibility/AccessibleChartElement.hxx
+++ b/chart2/source/controller/accessibility/AccessibleChartElement.hxx
@@ -27,6 +27,7 @@ namespace com::sun::star::awt { class XFont; }
 
 namespace chart
 {
+class AccessibleTextHelper;
 
 /** Base class for all Chart Accessibility objects except the root node (see 
AccessibleChartView)
 
@@ -93,7 +94,7 @@ public:
 
 private:
 boolm_bHasText;
-css::uno::Reference< css::accessibility::XAccessibleContext >
+rtl::Reference< ::chart::AccessibleTextHelper >
 m_xTextHelper;
 
 void InitTextEdit();
diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx 
b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
index 42cddcd36832..ed98cd296706 100644
--- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
+++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
@@ -53,19 +53,10 @@ AccessibleTextHelper::~AccessibleTextHelper()
 {
 }
 
-//  XInitialization 
-void SAL_CALL AccessibleTextHelper::initialize( const Sequence< uno::Any >& 
aArguments )
+void AccessibleTextHelper::initialize( const OUString& aCID,
+const Reference< XAccessible >& xEventSource,
+const Reference< awt::XWindow >& xWindow )
 {
-OUString aCID;
-Reference< XAccessible > xEventSource;
-Reference< awt::XWindow > xWindow;
-
-if( aArguments.getLength() >= 3 )
-{
-aArguments[0] >>= aCID;
-aArguments[1] >>= xEventSource;
-aArguments[2] >>= xWindow;
-}
 OSL_ENSURE( !aCID.isEmpty(), "Empty CID" );
 OSL_ENSURE( xEventSource.is(), "Empty Event Source" );
 OSL_ENSURE( xWindow.is(), "Empty Window" );
diff --git a/chart2/source/controller/inc/AccessibleTextHelper.hxx 
b/chart2/source/controller/inc/AccessibleTextHelper.hxx
inde

[Libreoffice-commits] core.git: chart2/source solenv/bin

2023-09-02 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartcontroller.component |5 ---
 chart2/source/controller/inc/ChartController.hxx   |6 
 chart2/source/controller/main/ChartController.cxx  |   28 -
 chart2/source/inc/servicenames.hxx |6 
 solenv/bin/native-code.py  |1 
 5 files changed, 46 deletions(-)

New commits:
commit 2b1d21d5cd79da6990412e0bd390f1514218f1c9
Author: Noel Grandin 
AuthorDate: Sat Sep 2 14:32:04 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Sep 2 18:28:09 2023 +0200

drop ChartController service name

not the implementation, just the registering as a component - there
is no way to instantiate and use this object as a real service, it
is intimately tied into the chart2 internals.

Change-Id: I5c80e23f2b043bef23650664a7cc2c7813248433
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156471
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/chartcontroller.component 
b/chart2/source/controller/chartcontroller.component
index 01201cbb2494..ef8e748242e8 100644
--- a/chart2/source/controller/chartcontroller.component
+++ b/chart2/source/controller/chartcontroller.component
@@ -23,11 +23,6 @@
   
constructor="com_sun_star_comp_chart_ElementSelectorToolbarController_get_implementation">
 
   
-  
-
-
-  
   
 
diff --git a/chart2/source/controller/inc/ChartController.hxx 
b/chart2/source/controller/inc/ChartController.hxx
index 0a98b8df0364..8da5a4bba13e 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -100,7 +100,6 @@ class ChartController final : public ::cppu::WeakImplHelper 
<
 ,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
@@ -116,11 +115,6 @@ public:
 
 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;
diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index d33fceff86be..2a233aa5f851 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -306,27 +306,6 @@ bool ChartController::impl_isDisposedOrSuspended() const
 return false;
 }
 
-// lang::XServiceInfo
-
-OUString SAL_CALL ChartController::getImplementationName()
-{
-return CHART_CONTROLLER_SERVICE_IMPLEMENTATION_NAME;
-}
-
-sal_Bool SAL_CALL ChartController::supportsService( const OUString& 
rServiceName )
-{
-return cppu::supportsService(this, rServiceName);
-}
-
-css::uno::Sequence< OUString > SAL_CALL 
ChartController::getSupportedServiceNames()
-{
-return {
-CHART_CONTROLLER_SERVICE_NAME,
-"com.sun.star.frame.Controller"
- @todo : add additional services if you support any further
-};
-}
-
 namespace {
 
 uno::Reference getSidebarFromModel(const 
uno::Reference& xModel)
@@ -1697,11 +1676,4 @@ ViewElementListProvider 
ChartController::getViewElementListProvider()
 
 } //namespace chart
 
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
-com_sun_star_comp_chart2_ChartController_get_implementation(css::uno::XComponentContext
 *context,
-
css::uno::Sequence const &)
-{
-return cppu::acquire(new chart::ChartController(context));
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/servicenames.hxx 
b/chart2/source/inc/servicenames.hxx
index 30e9b40f5efa..b9f0bb554458 100644
--- a/chart2/source/inc/servicenames.hxx
+++ b/chart2/source/inc/servicenames.hxx
@@ -25,12 +25,6 @@ inline constexpr OUStringLiteral 
CHART_MODEL_SERVICE_IMPLEMENTATION_NAME
 inline constexpr OUStringLiteral CHART_MODEL_SERVICE_NAME = 
u"com.sun.star.chart2.ChartDocument";
 //@todo create your own service containing the service 
com.sun.star.document.OfficeDocument
 
-inline constexpr OUStringLiteral CHART_CONTROLLER_SERVICE_IMPLEMENTATION_NAME
-= u"com.sun.star.comp.chart2.ChartController";
-inline constexpr OUStringLiteral CHART_CONTROLLER_SERVICE_NAME
-= u"com.sun.star.chart2.ChartController";
-//@todo crea

[Libreoffice-commits] core.git: chart2/source

2023-09-02 Thread Noel Grandin (via logerrit)
 chart2/source/controller/accessibility/AccessibleBase.cxx |5 
 chart2/source/controller/accessibility/AccessibleChartElement.cxx |9 
 chart2/source/controller/accessibility/AccessibleChartView.cxx|  206 
++
 chart2/source/controller/inc/AccessibleBase.hxx   |3 
 chart2/source/controller/inc/AccessibleChartView.hxx  |   17 
 chart2/source/controller/inc/ChartController.hxx  |4 
 chart2/source/controller/main/ChartController.cxx |   29 -
 7 files changed, 166 insertions(+), 107 deletions(-)

New commits:
commit bdf2d664784b3ebe3e7078b9ec82a02d09d9ded8
Author: Noel Grandin 
AuthorDate: Sat Sep 2 10:44:51 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Sep 2 15:01:44 2023 +0200

use more concrete type in AccessibleChartView

Change-Id: I1ec6c7bdd0f7ab487ba1ade89cd545f5bc97f540
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156466
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx 
b/chart2/source/controller/accessibility/AccessibleBase.cxx
index 29a3eb23b426..905c7f89696e 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -535,7 +536,7 @@ sal_Int64 SAL_CALL AccessibleBase::getAccessibleStateSet()
 {
 if( ! m_bStateSetInitialized )
 {
-Reference< view::XSelectionSupplier > xSelSupp( 
GetInfo().m_xSelectionSupplier );
+rtl::Reference< ::chart::ChartController > xSelSupp( 
GetInfo().m_xChartController );
 if ( xSelSupp.is() )
 {
 ObjectIdentifier aOID( xSelSupp->getSelection() );
@@ -679,7 +680,7 @@ void SAL_CALL AccessibleBase::grabFocus()
 {
 CheckDisposeState();
 
-Reference< view::XSelectionSupplier > xSelSupp( 
GetInfo().m_xSelectionSupplier );
+rtl::Reference< ::chart::ChartController > xSelSupp( 
GetInfo().m_xChartController );
 if ( xSelSupp.is() )
 {
 xSelSupp->select( GetId().getAny() );
diff --git a/chart2/source/controller/accessibility/AccessibleChartElement.cxx 
b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
index 8b37b002d76d..cca038b5be94 100644
--- a/chart2/source/controller/accessibility/AccessibleChartElement.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
@@ -20,6 +20,7 @@
 #include "AccessibleChartElement.hxx"
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -85,13 +86,11 @@ void AccessibleChartElement::InitTextEdit()
 if( ! m_xTextHelper.is())
 {
 // get hard reference
-Reference< view::XSelectionSupplier > xSelSupp( 
GetInfo().m_xSelectionSupplier );
-// get factory from selection supplier (controller)
-Reference< lang::XMultiServiceFactory > xFact( xSelSupp, 
uno::UNO_QUERY );
-if( xFact.is())
+rtl::Reference< ::chart::ChartController > xSelSupp( 
GetInfo().m_xChartController );
+if( xSelSupp.is())
 {
 m_xTextHelper.set(
-xFact->createInstance( CHART_ACCESSIBLE_TEXT_SERVICE_NAME ), 
uno::UNO_QUERY );
+xSelSupp->createInstance( CHART_ACCESSIBLE_TEXT_SERVICE_NAME 
), uno::UNO_QUERY );
 }
 }
 
diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx 
b/chart2/source/controller/accessibility/AccessibleChartView.cxx
index 1f23976d44e5..8f4103ee6060 100644
--- a/chart2/source/controller/accessibility/AccessibleChartView.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx
@@ -26,6 +26,7 @@
 #include "AccessibleViewForwarder.hxx"
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -158,9 +159,11 @@ awt::Point SAL_CALL 
AccessibleChartView::getLocationOnScreen()
 return aResult;
 }
 
-// lang::XInitialization
-
-void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& 
rArguments )
+void AccessibleChartView::initialize( ChartController& rNewChartController,
+ const rtl::Reference<::chart::ChartModel>& xNewChartModel,
+ const rtl::Reference<::chart::ChartView>& xNewChartView,
+ const uno::Reference< XAccessible >& xNewParent,
+ const css::uno::Reference& xNewWindow )
 {
 //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
@@ -171,109 +174,71 @@ void SAL_CALL AccessibleChartView::initialize( const 
Sequence< Any >& rArguments
 bool bOldInvalid = false;
 bool bNewInvalid = false;
 
-Reference< view::XSelectionSupplier > xSelectionSupplier;
+rtl::Reference< ::chart::ChartController > xChartController;
 rtl::Reference<::chart::ChartModel> xChartModel;
 r

[Libreoffice-commits] core.git: chart2/source

2023-08-21 Thread Mike Kaganski (via logerrit)
 chart2/source/tools/OPropertySet.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 0a17e45e3fed13c240629fdf0dbb00b8908f5acc
Author: Mike Kaganski 
AuthorDate: Mon Aug 21 14:31:13 2023 +0300
Commit: Mike Kaganski 
CommitDate: Mon Aug 21 14:36:10 2023 +0200

Drop a leftover

... from commit a3acf41195f4c39cba7950c389dc817b824f76ed (CWS-TOOLING:
integrate CWS chart37, 2009-06-04)

Change-Id: I32b3813ff0d76fc1dffd98080ce894781f3028cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155893
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/chart2/source/tools/OPropertySet.cxx 
b/chart2/source/tools/OPropertySet.cxx
index d029c51763bb..29e7298974da 100644
--- a/chart2/source/tools/OPropertySet.cxx
+++ b/chart2/source/tools/OPropertySet.cxx
@@ -266,7 +266,6 @@ void SAL_CALL OPropertySet::setFastPropertyValue_NoBroadcast
 {
 aDefault.clear();
 }
-SetPropertyValueByHandle( nHandle, rValue );
 if( !m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault && 
aDefault.hasValue() && aDefault == rValue ) //#i98893# don't export defaults to 
file
 SetPropertyToDefault( nHandle );
 else


[Libreoffice-commits] core.git: chart2/source

2023-08-01 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/dialogs/tp_AxisPositions.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit eff5a3fe98ca5d1d28c4f5386c4af8a3be8f5703
Author: Caolán McNamara 
AuthorDate: Mon Jul 31 14:45:42 2023 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 1 10:15:14 2023 +0200

gtk_tree_view_scroll_to_cell: assertion 'tree_view->priv->tree != NULL' 
failed

on loading sw//qa/extras/layout/data/tdf125334.odt and double clicking
chart

Change-Id: I65b10c0223e9c217d77dc7daa73580fadffc32c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155096
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx 
b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index 8a31c73f3dfc..4e3e4bb75987 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -295,7 +295,7 @@ IMPL_LINK_NOARG(AxisPositionsTabPage, CrossesAtSelectHdl, 
weld::ComboBox&, void)
 
 if (m_xED_CrossesAt->get_text().isEmpty())
 m_xED_CrossesAt->GetFormatter().SetValue(0.0);
-if (m_xED_CrossesAtCategory->get_active() == -1)
+if (m_xED_CrossesAtCategory->get_active() == -1 && 
m_xED_CrossesAtCategory->get_count())
 m_xED_CrossesAtCategory->set_active(0);
 
 PlaceLabelsSelectHdl(*m_xLB_PlaceLabels);


[Libreoffice-commits] core.git: chart2/source

2023-07-14 Thread Noel Grandin (via logerrit)
 chart2/source/controller/dialogs/DataBrowser.cxx |   15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

New commits:
commit 4ab8dc5628499b47a065ed2ba54cdd4a90ca43a0
Author: Noel Grandin 
AuthorDate: Thu Jul 13 13:34:17 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 14 18:30:04 2023 +0200

simplify calculations in SeriesHeader::SetPos

Change-Id: I0a3afe10dec530a6d7ddc32cf7d96ec5095604c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154431
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx 
b/chart2/source/controller/dialogs/DataBrowser.cxx
index ab82a772ad02..30182b95eeb8 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -291,20 +291,15 @@ void SeriesHeader::SetPos()
 // series name edit field
 m_spSeriesName->set_margin_start(2);
 
-aSize.setWidth(nSymbolHeight);
-aSize.setHeight(12);
-aSize = m_xDevice->LogicToPixel(aSize, MapMode(MapUnit::MapAppFont));
-aSize.setWidth(m_nWidth - aSize.Width() - 2);
-m_spSeriesName->set_size_request(aSize.Width(), aSize.Height());
+sal_Int32 nHeightPx = m_xDevice->LogicToPixel(Size(0, 12), 
MapMode(MapUnit::MapAppFont)).Height();
+m_spSeriesName->set_size_request(m_nWidth - aSize.Width() - 2, nHeightPx);
 
 // color bar
-aSize.setHeight(3);
-aSize = m_xDevice->LogicToPixel(aSize, MapMode(MapUnit::MapAppFont));
-aSize.setWidth(m_nWidth);
-m_spColorBar->set_size_request(aSize.Width(), aSize.Height());
+nHeightPx = m_xDevice->LogicToPixel(Size(0, 3), 
MapMode(MapUnit::MapAppFont)).Height();
+m_spColorBar->set_size_request(m_nWidth, nHeightPx);
 
 ScopedVclPtr xVirDev(m_spColorBar->create_virtual_device());
-xVirDev->SetOutputSizePixel(aSize);
+xVirDev->SetOutputSizePixel(Size(m_nWidth, nHeightPx));
 xVirDev->SetFillColor(m_aColor);
 xVirDev->SetLineColor(m_aColor);
 xVirDev->DrawRect(tools::Rectangle(Point(0, 0), aSize));


[Libreoffice-commits] core.git: chart2/source include/svx reportdesign/source sd/source svx/source

2023-07-12 Thread Armin Le Grand (allotropia) (via logerrit)
 chart2/source/controller/drawinglayer/DrawViewWrapper.cxx  |1 
 include/svx/sdr/contact/displayinfo.hxx|   11 ---
 include/svx/sdr/contact/objectcontact.hxx  |6 +
 include/svx/sdr/contact/objectcontactofpageview.hxx|6 +
 include/svx/svdpntv.hxx|   35 
--
 reportdesign/source/ui/report/SectionView.cxx  |1 
 sd/source/ui/tools/PreviewRenderer.cxx |8 --
 svx/source/dialog/graphctl.cxx |3 
 svx/source/sdr/contact/displayinfo.cxx |9 --
 svx/source/sdr/contact/objectcontact.cxx   |   12 +++
 svx/source/sdr/contact/objectcontactofpageview.cxx |   12 +++
 svx/source/sdr/contact/viewcontactofsdrpage.cxx|4 -
 svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx |3 
 svx/source/sdr/contact/viewobjectcontactofpageobj.cxx  |4 +
 svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx  |2 
 svx/source/svdraw/sdrpagewindow.cxx|   14 ++--
 svx/source/svdraw/svdpntv.cxx  |   17 +++-
 svx/source/unodraw/UnoGraphicExporter.cxx  |7 +-
 18 files changed, 102 insertions(+), 53 deletions(-)

New commits:
commit 3996eed1870ced736d9f4a01550f5c9f0568edfa
Author: Armin Le Grand (allotropia) 
AuthorDate: Tue Jul 11 13:57:52 2023 +0200
Commit: Armin Le Grand 
CommitDate: Wed Jul 12 17:59:46 2023 +0200

tdf#105362 better support for transparency in PNG & GIF export

The granularity to decide at the SdrView what to paint was not
fine enough, so I added code to get what we need: Do avoid
page decorations (including PageBackgrund aka 'wiese'), but
do include/process MasterPage content.

Change-Id: I49df05abc89b4bcebc973c37d30be0a0c72e59ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154301
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx 
b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index 15cac92fc011..1cd90c06b7ad 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -81,7 +81,6 @@ DrawViewWrapper::DrawViewWrapper(
 {
 SetBufferedOutputAllowed(true);
 SetBufferedOverlayAllowed(true);
-SetPagePaintingAllowed(true);
 
 // #i12587# support for shapes in chart
 SdrOutliner* pOutliner = getOutliner();
diff --git a/include/svx/sdr/contact/displayinfo.hxx 
b/include/svx/sdr/contact/displayinfo.hxx
index 7075b04ccf6f..b2229042a914 100644
--- a/include/svx/sdr/contact/displayinfo.hxx
+++ b/include/svx/sdr/contact/displayinfo.hxx
@@ -46,13 +46,6 @@ namespace sdr::contact
 // painting when the control layer needs to be painted as last 
layer
 bool
mbControlLayerProcessingActive : 1;
 
-// Internal flag to decide if page stuff (background, border, 
MasterPage, grid, etc...)
-// will be processed at all. This flag is user-defined and will 
not be changed from the
-// processing mechanism. Default is true, thus set to false if 
PagePainting should be suppressed.
-// For more granular switching page stuff painting on and off, use 
the according flags at the
-// view (->Is*Visible())
-bool
mbPageProcessingActive : 1;
-
 // Internal flag to remember if EnteredGroupDrawMode is active. 
Default is true
 // since this mode starts activated and gets switched off when 
reaching
 // the current group level. Should only be changed by instances 
which do
@@ -83,10 +76,6 @@ namespace sdr::contact
 void SetControlLayerProcessingActive(bool bDoPaint);
 bool GetControlLayerProcessingActive() const { return 
mbControlLayerProcessingActive; }
 
-// Access to PageProcessingActive flag
-void SetPageProcessingActive(bool bDoPaint);
-bool GetPageProcessingActive() const { return 
mbPageProcessingActive; }
-
 // Save the original DrawMode from outdev
 void ClearGhostedDrawMode();
 void SetGhostedDrawMode();
diff --git a/include/svx/sdr/contact/objectcontact.hxx 
b/include/svx/sdr/contact/objectcontact.hxx
index 40d631f3fae8..f38eb768c4ee 100644
--- a/include/svx/sdr/contact/objectcontact.hxx
+++ b/include/svx/sdr/contact/objectcontact.hxx
@@ -136,6 +136,12 @@ public:
 // print? Default is false
 virtual bool isOutputToPrinter() const;
 
+// display page decoration? Default is true
+virtual bool isPageDecorationActive() const;
+
+/

[Libreoffice-commits] core.git: chart2/source svx/source toolkit/source

2023-07-12 Thread Noel Grandin (via logerrit)
 chart2/source/controller/accessibility/AccessibleViewForwarder.cxx |6 
+++---
 svx/source/unodraw/unoshape.cxx|4 +---
 toolkit/source/hatchwindow/ipwin.cxx   |4 +---
 3 files changed, 5 insertions(+), 9 deletions(-)

New commits:
commit 972aea543ef94066946dedd6cf6890d34869d89c
Author: Noel Grandin 
AuthorDate: Wed Jul 12 14:04:10 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Jul 12 15:25:33 2023 +0200

simplify

Change-Id: I276ba7809b08a359b377ea56259140675c5e00a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154354
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx 
b/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx
index 31395f1181dc..dbd8ac0d51f2 100644
--- a/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx
+++ b/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx
@@ -45,9 +45,9 @@ tools::Rectangle AccessibleViewForwarder::GetVisibleArea() 
const
 tools::Rectangle aVisibleArea;
 if ( m_pWindow )
 {
-aVisibleArea.SetPos( Point( 0, 0 ) );
-aVisibleArea.SetSize( m_pWindow->GetOutputSizePixel() );
-aVisibleArea = m_pWindow->PixelToLogic( aVisibleArea, m_aMapMode );
+aVisibleArea = m_pWindow->PixelToLogic(
+tools::Rectangle( Point( 0, 0 ), m_pWindow->GetOutputSizePixel() ),
+m_aMapMode );
 }
 return aVisibleArea;
 }
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index b186a95097c2..c22c95ba504a 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2112,9 +2112,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, 
const SfxItemPropertyMapEn
 Size aObjSize( aUnoRect.Width, aUnoRect.Height );
 ForceMetricToItemPoolMetric(aTopLeft);
 ForceMetricToItemPoolMetric(aObjSize);
-tools::Rectangle aRect;
-aRect.SetPos(aTopLeft);
-aRect.SetSize(aObjSize);
+tools::Rectangle aRect(aTopLeft, aObjSize);
 pSdrObject->SetSnapRect(aRect);
 return true;
 }
diff --git a/toolkit/source/hatchwindow/ipwin.cxx 
b/toolkit/source/hatchwindow/ipwin.cxx
index d21e94166c7c..52d3668b7ffb 100644
--- a/toolkit/source/hatchwindow/ipwin.cxx
+++ b/toolkit/source/hatchwindow/ipwin.cxx
@@ -189,9 +189,7 @@ short SvResizeHelper::SelectMove( vcl::Window * pWin, const 
Point & rPos )
 }
 else
 {
-tools::Rectangle aRect( GetTrackRectPixel( rPos ) );
-aRect.SetSize( pWin->PixelToLogic( aRect.GetSize() ) );
-aRect.SetPos( pWin->PixelToLogic( aRect.TopLeft() ) );
+tools::Rectangle aRect = pWin->PixelToLogic(GetTrackRectPixel( rPos ));
 pWin->ShowTracking( aRect );
 }
 return nGrab;


[Libreoffice-commits] core.git: chart2/source cui/source cui/uiconfig include/cui include/svl include/svx offapi/com sc/source sd/source svx/source sw/inc sw/source xmloff/source

2023-07-05 Thread Michael Stahl (via logerrit)
 chart2/source/controller/main/ShapeController.cxx |5 +-
 cui/source/dialogs/dlgname.cxx|6 ++
 cui/source/factory/dlgfact.cxx|9 +++-
 cui/source/factory/dlgfact.hxx|3 -
 cui/uiconfig/ui/objecttitledescdialog.ui  |   20 
 include/cui/dlgname.hxx   |6 ++
 include/svl/solar.hrc |2 
 include/svx/strings.hrc   |1 
 include/svx/svdobj.hxx|2 
 include/svx/svdovirt.hxx  |2 
 include/svx/svdundo.hxx   |   16 +++
 include/svx/svxdlg.hxx|3 -
 include/svx/unoshprp.hxx  |4 +
 offapi/com/sun/star/drawing/Shape.idl |9 
 sc/source/ui/drawfunc/drawsh5.cxx |5 +-
 sd/source/ui/view/drviews2.cxx|5 +-
 svx/source/inc/svdobjplusdata.hxx |1 
 svx/source/sdr/contact/viewobjectcontact.cxx  |2 
 svx/source/svdraw/svdobj.cxx  |   34 +++
 svx/source/svdraw/svdobjplusdata.cxx  |1 
 svx/source/svdraw/svdovirt.cxx|   10 
 svx/source/svdraw/svdundo.cxx |   31 +
 svx/source/unodraw/unoprov.cxx|7 +++
 svx/source/unodraw/unoshape.cxx   |   17 +++
 sw/inc/doc.hxx|2 
 sw/inc/fesh.hxx   |2 
 sw/inc/frmfmt.hxx |1 
 sw/inc/strings.hrc|1 
 sw/inc/swundo.hxx |1 
 sw/source/core/doc/docfly.cxx |   22 +
 sw/source/core/frmedt/fefly1.cxx  |   49 ++
 sw/source/core/inc/undoflystrattr.hxx |   17 +++
 sw/source/core/layout/atrfrm.cxx  |   15 ++
 sw/source/core/undo/undobj.cxx|3 +
 sw/source/core/undo/undoflystrattr.cxx|   31 +
 sw/source/uibase/shells/drwbassh.cxx  |5 +-
 sw/source/uibase/shells/frmsh.cxx |5 +-
 xmloff/source/draw/sdpropls.cxx   |2 
 38 files changed, 342 insertions(+), 15 deletions(-)

New commits:
commit 6efc72b99a08384e56c5a4da7918177be60b3b09
Author: Michael Stahl 
AuthorDate: Wed Jul 5 14:04:17 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Jul 5 19:54:17 2023 +0200

tdf#138504 svx,etc.: decorative flag on SdrObject shapes

* SdrObject new member m_IsDecorative
* new Undo SdrUndoObjDecorative
* surprising amount of changes in sw including additional 
SwUndoFlyDecorative
* svx API SvxShape property "Decorative"
* UI checkbox "Decorative"
* ODF import/export as loext:decorative on style:graphic-properties
* PDF/UA export: ViewObjectContcat tag shapes with this flag as Artifact

Change-Id: I37f7a0597eab92c6c6aff94fad6c16c59b231c80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154063
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/chart2/source/controller/main/ShapeController.cxx 
b/chart2/source/controller/main/ShapeController.cxx
index 423703e526f7..97715b07c295 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -401,16 +401,19 @@ void 
ShapeController::executeDispatch_ObjectTitleDescription()
 
 OUString aTitle( pSelectedObj->GetTitle() );
 OUString aDescription( pSelectedObj->GetDescription() );
+bool isDecorative(pSelectedObj->IsDecorative());
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
 weld::Window* pChartWindow(m_pChartController->GetChartFrame());
 ScopedVclPtr< AbstractSvxObjectTitleDescDialog > pDlg(
-pFact->CreateSvxObjectTitleDescDialog(pChartWindow, aTitle, 
aDescription));
+pFact->CreateSvxObjectTitleDescDialog(pChartWindow, aTitle, 
aDescription, isDecorative));
 if ( pDlg->Execute() == RET_OK )
 {
 pDlg->GetTitle( aTitle );
 pDlg->GetDescription( aDescription );
+pDlg->IsDecorative(isDecorative);
 pSelectedObj->SetTitle( aTitle );
 pSelectedObj->SetDescription( aDescription );
+pSelectedObj->SetDecorative(isDecorative);
 }
 }
 
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index da0a3f49..84f21a86d616 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -87,10 +87,12 @@ IMPL_LINK_NOARG(SvxObjectNameDialog, ModifyHdl, 
weld::Entry&, void)
 // Dialog for editing Object Title and Description
 
 SvxObjectTitleDescDialog::SvxObjectTitleDescDialog(weld::Window* pParent, 
const OUString& rTitle,
-

[Libreoffice-commits] core.git: chart2/source

2023-07-05 Thread Noel Grandin (via logerrit)
 chart2/source/controller/inc/ShapeController.h   |   38 ---
 chart2/source/controller/main/DrawCommandDispatch.cxx|  131 +--
 chart2/source/controller/main/DrawCommandDispatch.h  |   42 ---
 chart2/source/controller/main/DrawCommandDispatch.hxx|4 
 chart2/source/controller/main/FeatureCommandDispatchBase.cxx |4 
 chart2/source/controller/main/FeatureCommandDispatchBase.hxx |   44 +++
 chart2/source/controller/main/ShapeController.cxx|   87 +++
 chart2/source/controller/main/ShapeController.hxx|2 
 8 files changed, 154 insertions(+), 198 deletions(-)

New commits:
commit 29eb0b94f27b956d3c9917b318ef7077c6e01036
Author: Noel Grandin 
AuthorDate: Wed Jul 5 12:05:34 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Jul 5 14:55:55 2023 +0200

convert *CommandId enum to scoped enum

merging two different enums in the process

Change-Id: I81ff8f10158a19a1b3a4ffe35fac6653beb677ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154028
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/inc/ShapeController.h 
b/chart2/source/controller/inc/ShapeController.h
deleted file mode 100644
index 433f6af5250f..
--- 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 .
- */
-#pragma once
-
-//Shape Controller Command Ids:
-enum ShapeControllerCommandID
-{
-COMMAND_ID_FORMAT_LINE  =  1,
-COMMAND_ID_FORMAT_AREA  =  2,
-COMMAND_ID_TEXT_ATTRIBUTES  =  3,
-COMMAND_ID_TRANSFORM_DIALOG =  4,
-COMMAND_ID_OBJECT_TITLE_DESCRIPTION =  5,
-COMMAND_ID_RENAME_OBJECT=  6,
-COMMAND_ID_BRING_TO_FRONT   =  8,
-COMMAND_ID_FORWARD  =  9,
-COMMAND_ID_BACKWARD = 10,
-COMMAND_ID_SEND_TO_BACK = 11,
-COMMAND_ID_FONT_DIALOG  = 15,
-COMMAND_ID_PARAGRAPH_DIALOG = 16
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx 
b/chart2/source/controller/main/DrawCommandDispatch.cxx
index 935c0832d649..1446059a0223 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -18,7 +18,6 @@
  */
 
 #include "DrawCommandDispatch.hxx"
-#include "DrawCommandDispatch.h"
 #include 
 #include 
 #include 
@@ -68,7 +67,7 @@ DrawCommandDispatch::~DrawCommandDispatch()
 
 bool DrawCommandDispatch::isFeatureSupported( const OUString& rCommandURL )
 {
-sal_uInt16 nFeatureId = 0;
+ChartCommandID nFeatureId = ChartCommandID::NONE;
 OUString aBaseCommand;
 OUString aCustomShapeType;
 return parseCommandURL( rCommandURL, &nFeatureId, &aBaseCommand, 
&aCustomShapeType );
@@ -165,7 +164,7 @@ void DrawCommandDispatch::setAttributes( SdrObject* pObj )
 
 void DrawCommandDispatch::setLineEnds( SfxItemSet& rAttr )
 {
-if ( !(m_nFeatureId == COMMAND_ID_LINE_ARROW_END && m_pChartController) )
+if ( !(m_nFeatureId == ChartCommandID::DrawLineArrowEnd && 
m_pChartController) )
 return;
 
 DrawModelWrapper* pDrawModelWrapper = 
m_pChartController->GetDrawModelWrapper();
@@ -217,27 +216,27 @@ FeatureState DrawCommandDispatch::getState( const 
OUString& rCommand )
 aReturn.bEnabled = false;
 aReturn.aState <<= false;
 
-sal_uInt16 nFeatureId = 0;
+ChartCommandID nFeatureId = ChartCommandID::NONE;
 OUString aBaseCommand;
 OUString aCustomShapeType;
 if ( parseCommandURL( rCommand, &nFeatureId, &aBaseCommand, 
&aCustomShapeType ) )
 {
 switch ( nFeatureId )
 {
-case COMMAND_ID_OBJECT_SELECT:
-case COMMAND_ID_DRAW_LINE:
-case COMMAND_ID_LINE_ARROW_END:
-case COMMAND_ID_DRAW_RECT:
-case COMMAND_ID_DRAW_ELLIPSE:
-case COMMAND_ID_DRAW_FREELINE_NOFILL:
-case COMMAND_ID_DRAW_TEXT:
-case COMMAND_ID_DRAW_CAPTION:
-   

[Libreoffice-commits] core.git: chart2/source

2023-06-28 Thread Laurent Balland (via logerrit)
 chart2/source/controller/dialogs/ObjectNameProvider.cxx |   48 +---
 1 file changed, 28 insertions(+), 20 deletions(-)

New commits:
commit 125b0f6609332523d30bef600979b698c2d216f8
Author: Laurent Balland 
AuthorDate: Tue Jun 27 21:23:19 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Thu Jun 29 08:02:02 2023 +0200

tdf#155526 Restore status bar for moving average

Previous commit dc03f59374d4fc74dd44ddedc903bb9c00a74bb7 broke text in
status bar when a moving average trend line is selected

Change-Id: I259fb9aee1eccf9fac93038c6dd2755490769f88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153677
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx 
b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index 41eae9e7f1a8..2097e43c2130 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -597,33 +597,41 @@ OUString ObjectNameProvider::getHelpText( 
std::u16string_view rObjectCID, const
 if ( !(xEqProp->getPropertyValue( "YName") >>= 
aYName) )
 aYName = "f(x)";
 }
-xCalculator->setRegressionProperties(aDegree, 
bForceIntercept, aInterceptValue, 2, aMovingType);
+xCalculator->setRegressionProperties(aDegree, 
bForceIntercept, aInterceptValue, aPeriod, aMovingType);
 xCalculator->setXYNames ( aXName, aYName );
 RegressionCurveHelper::initializeCurveCalculator( 
xCalculator, xSeries, xChartModel );
 
-// replace formula
-OUString aWildcard = "%FORMULA";
-sal_Int32 nIndex = aRet.indexOf( aWildcard );
-if( nIndex != -1 )
+// change text for Moving Average
+if ( RegressionCurveHelper::getRegressionType( xCurve 
) == SvxChartRegress::MovingAverage )
+{
+aRet = xCalculator->getRepresentation();
+}
+else
 {
-OUString aFormula ( 
xCalculator->getRepresentation() );
-if ( cDecSeparator != '.' )
+// replace formula
+OUString aWildcard = "%FORMULA";
+sal_Int32 nIndex = aRet.indexOf( aWildcard );
+if( nIndex != -1 )
 {
-aFormula = aFormula.replace( '.', 
cDecSeparator );
+OUString aFormula ( 
xCalculator->getRepresentation() );
+if ( cDecSeparator != '.' )
+{
+aFormula = aFormula.replace( '.', 
cDecSeparator );
+}
+aRet = aRet.replaceAt( nIndex, 
aWildcard.getLength(), aFormula );
 }
-aRet = aRet.replaceAt( nIndex, 
aWildcard.getLength(), aFormula );
-}
 
-// replace r^2
-aWildcard = "%RSQUARED";
-nIndex = aRet.indexOf( aWildcard );
-if( nIndex != -1 )
-{
-double fR( 
xCalculator->getCorrelationCoefficient());
-aRet = aRet.replaceAt(
-nIndex, aWildcard.getLength(),
-::rtl::math::doubleToUString(
-fR*fR, rtl_math_StringFormat_G, 4, 
cDecSeparator, true ));
+// replace r^2
+aWildcard = "%RSQUARED";
+nIndex = aRet.indexOf( aWildcard );
+if( nIndex != -1 )
+{
+double fR( 
xCalculator->getCorrelationCoefficient());
+aRet = aRet.replaceAt(
+nIndex, aWildcard.getLength(),
+::rtl::math::doubleToUString(
+fR*fR, rtl_math_StringFormat_G, 4, 
cDecSeparator, true ));
+}
 }
 }
 catch( const uno::Exception & )


[Libreoffice-commits] core.git: chart2/source

2023-06-26 Thread Laurent Balland (via logerrit)
 chart2/source/controller/main/ControllerCommandDispatch.cxx |   13 ---
 chart2/source/inc/RegressionCurveHelper.hxx |1 
 chart2/source/tools/RegressionCurveHelper.cxx   |   14 
 chart2/source/tools/RegressionCurveModel.cxx|1 
 chart2/source/tools/RegressionEquation.cxx  |8 ++
 5 files changed, 34 insertions(+), 3 deletions(-)

New commits:
commit aa86e7e8c22527eb5da0b8a05dbd4bd749f7a2b8
Author: Laurent Balland 
AuthorDate: Sun Jun 18 19:25:39 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Tue Jun 27 07:48:34 2023 +0200

tdf#155526 Moving average: remove Insert R2

Moving average trend line does not R² value.
This change remove "Insert R²" from context menu when the trend is of
type "Moving average"

Change-Id: I729a6421df34859e7176c798a2b68a6f13cfb544
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153294
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx 
b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index 9e03e495827d..98468a138c3f 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -283,23 +283,28 @@ void ControllerState::update(
 // Trendline Equation
 bMayFormatTrendlineEquation = bMayDeleteTrendlineEquation = 
RegressionCurveHelper::hasEquation( xRegCurve );
 bMayAddTrendlineEquation = !bMayDeleteTrendlineEquation;
+bMayAddR2Value = RegressionCurveHelper::MayHaveCorrelationCoefficient( 
xRegCurve ) && bMayAddTrendlineEquation;
 }
 else if( aObjectType == OBJECTTYPE_DATA_CURVE_EQUATION )
 {
 bMayFormatTrendlineEquation = true;
 bool bHasR2Value = false;
+bool bMayHaveR2 = true;
 try
 {
 uno::Reference< beans::XPropertySet > xEquationProperties =
 ObjectIdentifier::getObjectPropertySet( aSelObjCID, xModel );
 if( xEquationProperties.is() )
+{
 xEquationProperties->getPropertyValue( 
"ShowCorrelationCoefficient" ) >>= bHasR2Value;
+xEquationProperties->getPropertyValue( 
"MayHaveCorrelationCoefficient" ) >>= bMayHaveR2;
+}
 }
 catch(const uno::RuntimeException&)
 {
 TOOLS_WARN_EXCEPTION("chart2", "" );
 }
-bMayAddR2Value = !bHasR2Value;
+bMayAddR2Value = !bHasR2Value && bMayHaveR2;
 bMayDeleteR2Value = bHasR2Value;
 }
 }
@@ -674,8 +679,10 @@ void ControllerCommandDispatch::updateCommandAvailability()
 m_aCommandAvailability[ ".uno:InsertMeanValue" ] = bIsWritable && 
bControllerStateIsValid && m_apControllerState->bMayAddMeanValue;
 m_aCommandAvailability[ ".uno:InsertTrendline" ] = bIsWritable && 
bControllerStateIsValid && m_apControllerState->bMayAddTrendline;
 m_aCommandAvailability[ ".uno:InsertTrendlineEquation" ] = bIsWritable && 
bControllerStateIsValid && m_apControllerState->bMayAddTrendlineEquation;
-m_aCommandAvailability[ ".uno:InsertTrendlineEquationAndR2" ] = 
m_aCommandAvailability[ ".uno:InsertTrendlineEquation" ];
-m_aCommandAvailability[ ".uno:InsertR2Value" ] = bIsWritable && 
bControllerStateIsValid && m_apControllerState->bMayAddR2Value;
+m_aCommandAvailability[ ".uno:InsertTrendlineEquationAndR2" ] =
+m_aCommandAvailability[ ".uno:InsertTrendlineEquation" ] && 
m_apControllerState->bMayAddR2Value;
+m_aCommandAvailability[ ".uno:InsertR2Value" ] = bIsWritable && 
bControllerStateIsValid && m_apControllerState->bMayAddR2Value
+&& !m_apControllerState->bMayAddTrendlineEquation;
 m_aCommandAvailability[ ".uno:DeleteR2Value" ] = bIsWritable && 
bControllerStateIsValid && m_apControllerState->bMayDeleteR2Value;
 
 m_aCommandAvailability[ ".uno:InsertXErrorBars" ] = bIsWritable && 
bControllerStateIsValid && m_apControllerState->bMayAddXErrorBars;
diff --git a/chart2/source/inc/RegressionCurveHelper.hxx 
b/chart2/source/inc/RegressionCurveHelper.hxx
index 9f1b935c0d01..f9d919506460 100644
--- a/chart2/source/inc/RegressionCurveHelper.hxx
+++ b/chart2/source/inc/RegressionCurveHelper.hxx
@@ -195,6 +195,7 @@ namespace chart::RegressionCurveHelper
 const rtl::Reference<::chart::RegressionCurveModel>& xCurve );
 
 OOO_DLLPUBLIC_CHARTTOOLS bool hasEquation(const 
css::uno::Reference& xCurve );
+OOO_DLLPUBLIC_CHARTTOOLS bool MayHaveCorrelationCoefficient(const 
css::uno::Reference& xCurve );
 
 } //  namespace chart
 
diff --git a/chart2/source/tools/RegressionCurveHelper.cxx 
b/chart2/source/tools/RegressionCurveHelper.cxx
index 8d9ba75962e9..65e6b13ac0a0 100644
--- a/chart2/source/tools/RegressionCurveHelper.cxx
+++ b/chart2/source/tools/RegressionCurveHelper.cxx
@@ -898,6 +898,20 @@ bool RegressionCurveHelper::hasEquation( const Reference< 
chart2::XRegres

[Libreoffice-commits] core.git: chart2/source

2023-06-18 Thread Laurent Balland (via logerrit)
 chart2/source/controller/dialogs/ObjectNameProvider.cxx|   13 
+-
 chart2/source/controller/dialogs/res_Trendline.cxx |4 ---
 chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx |   10 ++-
 3 files changed, 11 insertions(+), 16 deletions(-)

New commits:
commit dc03f59374d4fc74dd44ddedc903bb9c00a74bb7
Author: Laurent Balland 
AuthorDate: Mon Jun 12 21:48:13 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Sun Jun 18 13:31:09 2023 +0200

tdf#155526 Add Period to trend line equation

Insert Period value earlier to have it ready for representation
Allow Moving average equation in dialog UI

Change-Id: I1d20572c39462e60b60ab7eec1f174a3cf934d4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153094
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx 
b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index e4ec234362bc..41eae9e7f1a8 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -601,18 +601,9 @@ OUString ObjectNameProvider::getHelpText( 
std::u16string_view rObjectCID, const
 xCalculator->setXYNames ( aXName, aYName );
 RegressionCurveHelper::initializeCurveCalculator( 
xCalculator, xSeries, xChartModel );
 
-// change text for Moving Average
-OUString aWildcard( "%PERIOD" );
-sal_Int32 nIndex = 
xCalculator->getRepresentation().indexOf( aWildcard );
-if( nIndex != -1 )
-{  // replace period
-aRet = xCalculator->getRepresentation();
-aRet = aRet.replaceAt( nIndex, 
aWildcard.getLength(), OUString::number(aPeriod) );
-}
-
 // replace formula
-aWildcard = "%FORMULA";
-nIndex = aRet.indexOf( aWildcard );
+OUString aWildcard = "%FORMULA";
+sal_Int32 nIndex = aRet.indexOf( aWildcard );
 if( nIndex != -1 )
 {
 OUString aFormula ( 
xCalculator->getRepresentation() );
diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx 
b/chart2/source/controller/dialogs/res_Trendline.cxx
index 647c071b1040..58ef6497a538 100644
--- a/chart2/source/controller/dialogs/res_Trendline.cxx
+++ b/chart2/source/controller/dialogs/res_Trendline.cxx
@@ -372,10 +372,8 @@ void TrendlineResources::UpdateControlStates()
 m_xFmtFld_InterceptValue->set_sensitive( bInterceptAvailable );
 if( bMovingAverage )
 {
-m_xCB_ShowEquation->set_state(TRISTATE_FALSE);
 m_xCB_ShowCorrelationCoeff->set_state(TRISTATE_FALSE);
 }
-m_xCB_ShowEquation->set_sensitive( !bMovingAverage );
 m_xCB_ShowCorrelationCoeff->set_sensitive( !bMovingAverage );
 m_xCB_RegressionMovingType->set_sensitive(bMovingAverage);
 m_xNF_Period->set_sensitive(bMovingAverage);
@@ -428,8 +426,6 @@ void TrendlineResources::SetNbPoints( sal_Int32 nNbPoints )
 
 IMPL_LINK_NOARG(TrendlineResources, ShowEquation, weld::Toggleable&, void)
 {
-m_xEE_XName->set_sensitive(m_xCB_ShowEquation->get_active());
-m_xEE_YName->set_sensitive(m_xCB_ShowEquation->get_active());
 UpdateControlStates();
 }
 
diff --git a/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx 
b/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx
index 6726d9d78b36..f71262f738b9 100644
--- a/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx
@@ -157,7 +157,15 @@ OUString 
MovingAverageRegressionCurveCalculator::ImplGetRepresentation(
 const uno::Reference< util::XNumberFormatter >& /*xNumFormatter*/,
 sal_Int32 /*nNumberFormatKey*/, sal_Int32* /*pFormulaLength = nullptr */ ) 
const
 {
-return SchResId( STR_OBJECT_MOVING_AVERAGE_WITH_PARAMETERS );
+OUString aRet = SchResId( STR_OBJECT_MOVING_AVERAGE_WITH_PARAMETERS );
+// change text for Moving Average
+OUString aWildcard( "%PERIOD" );
+sal_Int32 nIndex = aRet.indexOf( aWildcard );
+if( nIndex != -1 )
+{  // replace period
+aRet = aRet.replaceAt( nIndex, aWildcard.getLength(), 
OUString::number(mPeriod) );
+}
+return aRet;
 }
 
 } //  namespace chart


[Libreoffice-commits] core.git: chart2/source cui/source drawinglayer/source editeng/source extensions/source include/svl sc/inc sc/source sd/source sfx2/source svl/source svx/source sw/source vcl/sou

2023-06-07 Thread Noel Grandin (via logerrit)
 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx |2 
 chart2/source/view/main/ChartView.cxx |2 
 chart2/source/view/main/VLegend.cxx   |2 
 cui/source/options/optctl.cxx |   12 +---
 cui/source/options/optgdlg.cxx|2 
 cui/source/options/treeopt.cxx|5 -
 cui/source/tabpages/autocdlg.cxx  |2 
 cui/source/tabpages/chardlg.cxx   |3 -
 cui/source/tabpages/page.cxx  |3 -
 drawinglayer/source/processor2d/getdigitlanguage.cxx  |2 
 editeng/source/editeng/editeng.cxx|2 
 editeng/source/editeng/impedit.hxx|   10 +--
 editeng/source/editeng/impedit2.cxx   |   18 +-
 editeng/source/editeng/impedit3.cxx   |6 --
 extensions/source/propctrlr/formcomponenthandler.cxx  |2 
 include/svl/ctloptions.hxx|   12 ++--
 sc/inc/scmod.hxx  |2 
 sc/source/core/data/documen8.cxx  |6 +-
 sc/source/ui/app/inputhdl.cxx |2 
 sc/source/ui/app/scmod.cxx|2 
 sc/source/ui/docshell/sizedev.cxx |2 
 sc/source/ui/drawfunc/drtxtob.cxx |2 
 sc/source/ui/unoobj/docuno.cxx|2 
 sc/source/ui/view/formatsh.cxx|2 
 sc/source/ui/view/gridwin.cxx |2 
 sc/source/ui/view/preview.cxx |2 
 sc/source/ui/view/tabview5.cxx|2 
 sc/source/ui/view/tabvwshf.cxx|2 
 sc/source/ui/view/viewutil.cxx|2 
 sd/source/ui/func/fubullet.cxx|3 -
 sd/source/ui/inc/WindowUpdater.hxx|4 -
 sd/source/ui/view/WindowUpdater.cxx   |7 +-
 sd/source/ui/view/drtxtob.cxx |2 
 sfx2/source/doc/objcont.cxx   |5 -
 svl/source/config/ctloptions.cxx  |   39 --
 svx/source/dialog/fntctrl.cxx |2 
 svx/source/dialog/srchdlg.cxx |6 --
 svx/source/form/fmtextcontrolshell.cxx|2 
 svx/source/tbxctrls/tbunosearchcontrollers.cxx|3 -
 svx/source/tbxctrls/verttexttbxctrl.cxx   |3 -
 sw/source/core/crsr/swcrsr.cxx|6 --
 sw/source/core/text/inftxt.cxx|2 
 sw/source/core/text/txtfrm.cxx|2 
 sw/source/core/view/printdata.cxx |2 
 sw/source/ui/config/optpage.cxx   |2 
 sw/source/ui/frmdlg/column.cxx|2 
 sw/source/ui/table/tabledlg.cxx   |2 
 sw/source/uibase/app/docst.cxx|2 
 sw/source/uibase/app/docstyle.cxx |2 
 sw/source/uibase/docvw/edtwin.cxx |   13 +---
 sw/source/uibase/shells/annotsh.cxx   |5 -
 sw/source/uibase/shells/drwtxtex.cxx  |5 -
 sw/source/uibase/shells/textsh1.cxx   |3 -
 sw/source/uibase/shells/txtattr.cxx   |2 
 sw/source/uibase/uiview/viewsrch.cxx  |2 
 vcl/source/edit/texteng.cxx   |   11 +--
 56 files changed, 103 insertions(+), 151 deletions(-)

New commits:
commit b542d90447230e1d6705a665f3a3e524fa966b5d
Author: Noel Grandin 
AuthorDate: Tue Jun 6 09:59:21 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 7 15:55:33 2023 +0200

tdf#155376 partially convert SvCTLOptions to officecfg

When accessibility is enabled, Calc will add tens of thousands of
listeners.

We then spend a significant chunk of time creating SvCTLOptions objects
(attached to ImpEditEngine) and adding and removing those objects from
the related listener lists.

But the required information is already globally cached by the officecfg
module, so we can avoid that overhead and just fetch it directly from
officecfg.

Change-Id: I7ff55fd7c4926866eb7086812275ba8bd6e84c75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152645
Tested-by: Jenkins
Reviewed-by: Patrick Luby 
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx 
b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index a0b548e43767..e885fdaef32e 100644
--- a/chart2/source/controller/dialogs/dlg

[Libreoffice-commits] core.git: chart2/source connectivity/source dbaccess/source framework/source package/source sot/source svl/source svtools/source toolkit/source

2023-05-31 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx |3 +--
 connectivity/source/drivers/firebird/Statement.cxx|3 ++-
 connectivity/source/sdbcx/VColumn.cxx |4 
 dbaccess/source/core/api/RowSet.cxx   |2 +-
 framework/source/uielement/buttontoolbarcontroller.cxx|2 +-
 framework/source/uielement/statusbarwrapper.cxx   |2 +-
 package/source/xstor/ocompinstream.cxx|   10 
++
 package/source/xstor/xstorage.cxx |   10 
++
 sot/source/unoolestorage/xolesimplestorage.cxx|2 +-
 svl/source/fsstor/oinputstreamcontainer.cxx   |2 +-
 svl/source/fsstor/ostreamcontainer.cxx|2 +-
 svtools/source/uno/framestatuslistener.cxx|2 +-
 svtools/source/uno/statusbarcontroller.cxx|2 +-
 svtools/source/uno/toolboxcontroller.cxx  |2 +-
 toolkit/source/hatchwindow/documentcloser.cxx |2 +-
 15 files changed, 17 insertions(+), 33 deletions(-)

New commits:
commit 009b889616561176a230bc041699271697f95bf6
Author: Noel Grandin 
AuthorDate: Wed May 31 15:31:36 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed May 31 18:37:34 2023 +0200

do not throw DisposedException when inside a dispose() method

There is no need to do this, as the documentation of
css.lang.XComponent::dispose at

udkapi/com/sun/star/lang/XComponent.idl

states:

After this method has been called, the object should
behave as passive as possible, thus it should ignore all calls

Otherwise, the effect of throwing here is mostly to disturb the flow of
logic in caller code, preventing other parts of teardown from proceeding
smoothly.

Change-Id: I30e6d1b35f85b727debf4405a995fdc0a4fccde6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152450
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 5c27adcbfc18..85ff5c7022c3 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -855,8 +855,7 @@ Reference< uno::XInterface > SAL_CALL 
ChartDocumentWrapper::getCurrentSelection(
 void SAL_CALL ChartDocumentWrapper::dispose()
 {
 if( m_bIsDisposed )
-throw lang::DisposedException("ChartDocumentWrapper is disposed",
-static_cast< ::cppu::OWeakObject* >( this ));
+return;
 
 m_bIsDisposed = true;
 
diff --git a/connectivity/source/drivers/firebird/Statement.cxx 
b/connectivity/source/drivers/firebird/Statement.cxx
index 5d9abdf2ef78..d135c4e4cda4 100644
--- a/connectivity/source/drivers/firebird/Statement.cxx
+++ b/connectivity/source/drivers/firebird/Statement.cxx
@@ -70,7 +70,8 @@ void SAL_CALL OStatement::release() noexcept
 void OStatement::disposeResultSet()
 {
 MutexGuard aGuard(m_aMutex);
-checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
+if (OStatementCommonBase_Base::rBHelper.bDisposed)
+return;
 
 OStatementCommonBase::disposeResultSet();
 
diff --git a/connectivity/source/sdbcx/VColumn.cxx 
b/connectivity/source/sdbcx/VColumn.cxx
index a61d0619a6e3..ad9a52ed12ed 100644
--- a/connectivity/source/sdbcx/VColumn.cxx
+++ b/connectivity/source/sdbcx/VColumn.cxx
@@ -170,10 +170,6 @@ void OColumn::construct()
 void OColumn::disposing()
 {
 OPropertySetHelper::disposing();
-
-::osl::MutexGuard aGuard(m_aMutex);
-checkDisposed(OColumnDescriptor_BASE::rBHelper.bDisposed);
-
 }
 
 Reference< XPropertySet > SAL_CALL OColumn::createDataDescriptor(  )
diff --git a/dbaccess/source/core/api/RowSet.cxx 
b/dbaccess/source/core/api/RowSet.cxx
index b6d73a0d4869..ec4edf6f0fb4 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -2872,7 +2872,7 @@ void ORowSetClone::close()
 {
 MutexGuard aGuard( m_aMutex );
 if (WeakComponentImplHelper::rBHelper.bDisposed)
-throw DisposedException();
+return;
 }
 dispose();
 }
diff --git a/framework/source/uielement/buttontoolbarcontroller.cxx 
b/framework/source/uielement/buttontoolbarcontroller.cxx
index d94e5b0ff25f..d100ee17113e 100644
--- a/framework/source/uielement/buttontoolbarcontroller.cxx
+++ b/framework/source/uielement/buttontoolbarcontroller.cxx
@@ -126,7 +126,7 @@ void SAL_CALL ButtonToolbarController::dispose()
 {
 SolarMutexGuard aSolarMutexGuard;
 if ( m_bDisposed )
-throw DisposedException();
+return;
 
 m_xContext.clear();
 m_xURLTransformer.clear();
diff --git a

[Libreoffice-commits] core.git: chart2/source cui/source include/svx reportdesign/source svx/source

2023-05-24 Thread Tomaž Vajngerl (via logerrit)
 chart2/source/controller/sidebar/ChartColorWrapper.cxx |2 
 chart2/source/controller/sidebar/ChartColorWrapper.hxx |2 
 cui/source/inc/cuitabarea.hxx  |4 -
 cui/source/tabpages/chardlg.cxx|2 
 cui/source/tabpages/tpcolor.cxx|   22 +-
 include/svx/Palette.hxx|   23 +--
 include/svx/PaletteManager.hxx |2 
 include/svx/colorbox.hxx   |   10 ++--
 include/svx/tbcontrl.hxx   |2 
 reportdesign/source/ui/dlg/Condition.cxx   |4 -
 reportdesign/source/ui/dlg/Condition.hxx   |2 
 svx/source/tbxctrls/Palette.cxx|   13 --
 svx/source/tbxctrls/PaletteManager.cxx |4 -
 svx/source/tbxctrls/tbcontrl.cxx   |   35 -
 14 files changed, 49 insertions(+), 78 deletions(-)

New commits:
commit 9a4b768b0a22bd3ae627c7355bbd223b9cf65015
Author: Tomaž Vajngerl 
AuthorDate: Mon May 22 14:35:19 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu May 25 03:59:01 2023 +0200

svx: combine svx::NamedThemedColor into NamedColor

Change-Id: I9a9656ddce9c12564411cfcb3e8e8714ae74a418
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152236
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx 
b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index 7376f37070ff..e1011a684787 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
@@ -87,7 +87,7 @@ ChartColorWrapper::ChartColorWrapper(
 {
 }
 
-void ChartColorWrapper::operator()([[maybe_unused]] const OUString& , const 
svx::NamedThemedColor& rColor)
+void ChartColorWrapper::operator()([[maybe_unused]] const OUString& , const 
NamedColor& rColor)
 {
 css::uno::Reference xPropSet = 
getPropSet(mxModel);
 
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.hxx 
b/chart2/source/controller/sidebar/ChartColorWrapper.hxx
index c4d30a8a314c..6894726768d0 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.hxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.hxx
@@ -28,7 +28,7 @@ public:
 SvxColorToolBoxControl* pControl,
 OUString  rPropertyName);
 
-void operator()(const OUString& rCommand, const svx::NamedThemedColor& 
rColor);
+void operator()(const OUString& rCommand, const NamedColor& rColor);
 // ColorSelectFunction signature
 
 void updateModel(const rtl::Reference<::chart::ChartModel>& xModel);
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 64ec01ef5abf..7399f03eb0be 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -658,7 +658,7 @@ private:
 ColorModel  eCM;
 
 Color   aPreviousColor;
-svx::NamedThemedColor aCurrentColor;
+NamedColor aCurrentColor;
 
 PaletteManager maPaletteManager;
 SvxXRectPreview m_aCtlPreviewOld;
@@ -714,7 +714,7 @@ private:
 DECL_LINK(SelectPaletteLBHdl, weld::ComboBox&, void);
 DECL_LINK( SelectValSetHdl_Impl, ValueSet*, void );
 DECL_LINK( SelectColorModeHdl_Impl, weld::Toggleable&, void );
-void ChangeColor(const svx::NamedThemedColor &rNewColor, bool 
bUpdatePreset = true);
+void ChangeColor(const NamedColor &rNewColor, bool bUpdatePreset = true);
 void SetColorModel(ColorModel eModel);
 void ChangeColorModel();
 void UpdateColorValues( bool bUpdatePreset = true );
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 601dae8dce0e..87984d573281 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1572,7 +1572,7 @@ bool SvxCharEffectsPage::FillItemSetColor_Impl( 
SfxItemSet& rSet )
 sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_COLOR );
 const SfxItemSet& rOldSet = GetItemSet();
 
-svx::NamedThemedColor aSelectedColor;
+NamedColor aSelectedColor;
 bool bChanged = m_bNewFontColor;
 
 if (bChanged)
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 799f53957678..470b1c13a866 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -209,9 +209,9 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& )
 ChangeColorModel();
 
 const Color aColor = pFillColorItem->GetColorValue();
-svx::NamedThemedColor aThemedColor;
-aThemedColor.m_aColor = aColor;
-ChangeColor( aThemedColor );
+NamedColor aNamedColor;
+aNamedColor.m_aColor = aColor;
+ChangeColor(aNamedColor);
 sal_Int32 nPos = FindInPalette( aColor );
 
 if ( nPos != -1 )
@@ -288,9 +288,9 @@ void SvxColorTabPage::Reset( const SfxItemSet* rSet )
 SetColorModel( e

[Libreoffice-commits] core.git: chart2/source

2023-05-24 Thread Justin Luth (via logerrit)
 chart2/source/controller/sidebar/ChartLinePanel.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 73a82b425b4dc02ef4ad3946b71c067a6411045c
Author: Justin Luth 
AuthorDate: Sat May 20 11:38:16 2023 -0400
Commit: Justin Luth 
CommitDate: Wed May 24 23:29:58 2023 +0200

tdf#138279 Revert "On double click on chart select the chart backgroud"

This reverts 7.1 commit 6a915073f8400fd34274cf311994bbc9bf498ab6.

The change was simply wrong. There is NOTHING about this context
that indicates that a double-click is happening.

So whatever this patch was trying to do,
it simply was made in a completely wrong way.

So best to just revert, and put the onus back on the interested
parties to redesign a fix for their double-click issue.

Change-Id: Ia209c0552839d6cce1b348432789f0f861ac5703
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152023
Reviewed-by: Justin Luth 
Tested-by: Jenkins

diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx 
b/chart2/source/controller/sidebar/ChartLinePanel.cxx
index 9dbcc08ebc04..128718ff6694 100644
--- a/chart2/source/controller/sidebar/ChartLinePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx
@@ -55,10 +55,7 @@ OUString getCID(const rtl::Reference<::chart::ChartModel>& 
xModel)
 
 css::uno::Any aAny = xSelectionSupplier->getSelection();
 if (!aAny.hasValue())
-{
-xSelectionSupplier->select(css::uno::Any(OUString("CID/Page=")));
-aAny = xSelectionSupplier->getSelection();
-}
+return OUString();
 
 OUString aCID;
 aAny >>= aCID;


[Libreoffice-commits] core.git: chart2/source

2023-05-11 Thread Noel Grandin (via logerrit)
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx |5 ++-
 chart2/source/controller/dialogs/tp_ChartType.cxx  |   14 
++
 chart2/source/tools/AxisHelper.cxx |8 -
 chart2/source/tools/ReferenceSizeProvider.cxx  |2 +
 4 files changed, 20 insertions(+), 9 deletions(-)

New commits:
commit 39848b5f802c539e5d630bb7905d3d9b8d966c26
Author: Noel Grandin 
AuthorDate: Thu May 11 11:30:46 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu May 11 14:23:25 2023 +0200

tdf#155231 CRASH: with embedded OLE chart

regressions from commits like
commit 70595c0291e4cc137158c77f6136025b10ce6728
Author: Noel Grandin 
Date:   Thu Mar 16 09:20:17 2023 +0200
move setDimension/getDimension inside chart2::Diagram

Change-Id: I535d8e74d621821bde7d31894fe7f0350e91c941
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151664
Reviewed-by: Xisco Fauli 
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx 
b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index 581e5e89cad6..b52dbc289743 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -315,8 +315,9 @@ void ChartTypeDialogController::commitToModel( const 
ChartTypeParameter& rParame
 // locked controllers
 ControllerLockGuardUNO aCtrlLockGuard( xChartModel );
 rtl::Reference< Diagram > xDiagram = xChartModel->getFirstChartDiagram();
-Diagram::tTemplateWithServiceName aTemplateWithService(
-xDiagram->getTemplate( xTemplateManager ));
+Diagram::tTemplateWithServiceName aTemplateWithService;
+if (xDiagram)
+aTemplateWithService = xDiagram->getTemplate( xTemplateManager );
 if( aTemplateWithService.xChartTypeTemplate.is())
 aTemplateWithService.xChartTypeTemplate->resetStyles2( xDiagram );
 xTemplate->changeDiagram( xDiagram );
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx 
b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 5c73ed11eda2..e0ddd62cd6ed 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -245,15 +245,18 @@ void ChartTypeTabPage::selectMainType()
 m_pCurrentMainType->adjustParameterToMainType( aParameter );
 commitToModel( aParameter );
 //detect the new ThreeDLookScheme
-aParameter.eThreeDLookScheme = 
m_xChartModel->getFirstChartDiagram()->detectScheme();
+aParameter.eThreeDLookScheme = ThreeDLookScheme::ThreeDLookScheme_Unknown;
+rtl::Reference< Diagram > xDiagram = m_xChartModel->getFirstChartDiagram();
+if (xDiagram)
+aParameter.eThreeDLookScheme = 
m_xChartModel->getFirstChartDiagram()->detectScheme();
 if (!aParameter.b3DLook
 && aParameter.eThreeDLookScheme != 
ThreeDLookScheme::ThreeDLookScheme_Realistic)
 aParameter.eThreeDLookScheme = 
ThreeDLookScheme::ThreeDLookScheme_Realistic;
 
-rtl::Reference< Diagram > xDiagram = m_xChartModel->getFirstChartDiagram();
 try
 {
-xDiagram->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= 
aParameter.bSortByXValues;
+if (xDiagram)
+xDiagram->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= 
aParameter.bSortByXValues;
 }
 catch ( const uno::Exception& )
 {
@@ -305,8 +308,9 @@ void ChartTypeTabPage::initializePage()
 return;
 rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = 
m_xChartModel->getTypeManager();
 rtl::Reference< Diagram > xDiagram = m_xChartModel->getFirstChartDiagram();
-Diagram::tTemplateWithServiceName aTemplate =
-xDiagram->getTemplate( xChartTypeManager );
+Diagram::tTemplateWithServiceName aTemplate;
+if (xDiagram)
+aTemplate = xDiagram->getTemplate( xChartTypeManager );
 OUString aServiceName( aTemplate.sServiceName );
 
 bool bFound = false;
diff --git a/chart2/source/tools/AxisHelper.cxx 
b/chart2/source/tools/AxisHelper.cxx
index 7e8229352181..e8e90c5e429f 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -849,11 +849,15 @@ void AxisHelper::getAxisOrGridPossibilities( Sequence< 
sal_Bool >& rPossibilityL
 rPossibilityList.realloc(6);
 sal_Bool* pPossibilityList = rPossibilityList.getArray();
 
-sal_Int32 nDimensionCount = xDiagram->getDimension();
+sal_Int32 nDimensionCount = -1;
+if (xDiagram)
+nDimensionCount = xDiagram->getDimension();
 
 //set possibilities:
 sal_Int32 nIndex=0;
-rtl::Reference< ChartType > xChartType = xDiagram->getChartTypeByIndex( 0 
);
+rtl::Reference< ChartType > xChartType;
+if (xDiagram)
+xChartType = xDiagram->getChartTypeByIndex( 0 );
 for(nIndex=0;nIndex<3;nIndex++)
 
pPossibilityList[nIndex]=ChartType

[Libreoffice-commits] core.git: chart2/source

2023-05-10 Thread Julien Nabet (via logerrit)
 chart2/source/controller/dialogs/DialogModel.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b70803101f454fce0461650d22d57a6adb5f5a87
Author: Julien Nabet 
AuthorDate: Wed May 10 19:31:23 2023 +0200
Commit: Julien Nabet 
CommitDate: Wed May 10 21:44:07 2023 +0200

tdf#155231: fix CRASH: with embedded OLE chart

First bt:
6  0x7f19f96b29b2 in rtl::Reference::operator->() const 
(this=0x55f40881f1f0) at include/rtl/ref.hxx:216
7  0x7f19f97b0a03 in chart::DialogModel::isCategoryDiagram() const 
(this=0x55f407cfffb0) at 
/home/julien/lo/libreoffice/chart2/source/controller/dialogs/DialogModel.cxx:656
8  0x7f19f983ab1a in chart::DataSourceTabPage::updateControlState() 
(this=0x55f408bdd840) at 
/home/julien/lo/libreoffice/chart2/source/controller/dialogs/tp_DataSource.cxx:439
9  0x7f19f983a954 in 
chart::DataSourceTabPage::SeriesSelectionChangedHdl(weld::TreeView&) 
(this=0x55f408bdd840) at 
/home/julien/lo/libreoffice/chart2/source/controller/dialogs/tp_DataSource.cxx:469
10 0x7f19f98380e2 in 
chart::DataSourceTabPage::updateControlsFromDialogModel() (this=0x55f408bdd840) 
at 
/home/julien/lo/libreoffice/chart2/source/controller/dialogs/tp_DataSource.cxx:313
see full bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=187190

Second part bt:
6  0x7fc66e0b29b2 in rtl::Reference::operator->() const 
(this=0x7ffce5f5c9b0) at include/rtl/ref.hxx:216
7  0x7fc66e1b00d8 in chart::DialogModel::getCategories() const 
(this=0x5590bff92f10) at 
/home/julien/lo/libreoffice/chart2/source/controller/dialogs/DialogModel.cxx:601
8  0x7fc66e1b0474 in chart::DialogModel::getCategoriesRange() const 
(this=0x5590bff92f10) at 
/home/julien/lo/libreoffice/chart2/source/controller/dialogs/DialogModel.cxx:637
9  0x7fc66e238141 in 
chart::DataSourceTabPage::updateControlsFromDialogModel() (this=0x5590c00c4030) 
at 
/home/julien/lo/libreoffice/chart2/source/controller/dialogs/tp_DataSource.cxx:316

Regression from:
commit 5a4b75dcb5abc2e925870614a28e1c2876df8ed9 (patch)
tree 5fe1f89c70f9c6d90d3eea8f9eb9a68e91f2dec0
parent dab0d4e1f36faace21145a51733bd3a946992624 (diff)
use more concrete types in chart2, Diagram

Change-Id: I4332a237248c5acacab7180733d502f049aead96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151642
Reviewed-by: Noel Grandin 
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/chart2/source/controller/dialogs/DialogModel.cxx 
b/chart2/source/controller/dialogs/DialogModel.cxx
index 032ec26dc912..9458f82bb13d 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -598,7 +598,8 @@ uno::Reference< chart2::data::XLabeledDataSequence > 
DialogModel::getCategories(
 if( m_xChartDocument.is())
 {
 rtl::Reference< Diagram > xDiagram( 
m_xChartDocument->getFirstChartDiagram());
-xResult = xDiagram->getCategories();
+if (xDiagram.is())
+xResult = xDiagram->getCategories();
 }
 }
 catch( const uno::Exception & )
@@ -652,7 +653,7 @@ OUString DialogModel::getCategoriesRange() const
 bool DialogModel::isCategoryDiagram() const
 {
 bool bRet = false;
-if( m_xChartDocument.is())
+if( m_xChartDocument.is() && m_xChartDocument->getFirstChartDiagram())
 bRet = m_xChartDocument->getFirstChartDiagram()->isCategory();
 return bRet;
 }


[Libreoffice-commits] core.git: chart2/source

2023-05-10 Thread gilssonn (via logerrit)
 chart2/source/controller/inc/ShapeController.h  |5 +
 chart2/source/controller/main/DrawCommandDispatch.h |5 +
 2 files changed, 2 insertions(+), 8 deletions(-)

New commits:
commit 47b1e4fdb1d70c9812fe849e6007ca74f3e18787
Author: gilssonn 
AuthorDate: Wed May 10 03:28:50 2023 -0400
Commit: Ilmari Lauhakangas 
CommitDate: Wed May 10 18:33:43 2023 +0200

tdf#143148 Use pragma once instead of include guards in chart2

Change-Id: I6227accbaf35ea810828b018f0f7349f5404778f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151604
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/chart2/source/controller/inc/ShapeController.h 
b/chart2/source/controller/inc/ShapeController.h
index e326450661d3..433f6af5250f 100644
--- a/chart2/source/controller/inc/ShapeController.h
+++ b/chart2/source/controller/inc/ShapeController.h
@@ -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 CHART_SHAPECONTROLLER_H
-#define CHART_SHAPECONTROLLER_H
+#pragma once
 
 //Shape Controller Command Ids:
 enum ShapeControllerCommandID
@@ -36,6 +35,4 @@ enum ShapeControllerCommandID
 COMMAND_ID_PARAGRAPH_DIALOG = 16
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/main/DrawCommandDispatch.h 
b/chart2/source/controller/main/DrawCommandDispatch.h
index c58aa4149bbf..b21febbcc033 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.h
+++ b/chart2/source/controller/main/DrawCommandDispatch.h
@@ -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 CHART_DRAWCOMMANDDISPATCH_HRC
-#define CHART_DRAWCOMMANDDISPATCH_HRC
+#pragma once
 
 //Draw Command Ids:
 enum DrawCommandID
@@ -40,6 +39,4 @@ enum DrawCommandID
 COMMAND_ID_DRAWTBX_CS_STAR= 16
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: chart2/source

2023-05-09 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 40f5a5be9fd228a5d33a3b1218864a38cb70dc1f
Author: Noel Grandin 
AuthorDate: Tue May 9 15:28:58 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue May 9 21:33:24 2023 +0200

tdf#155210 FILESAVE ODT Default chart row labels disappear from Writer chart

revert
commit 6500106dff0f0cd86f509ffd01542aab77c21596
Author: Noel Grandin 
Date:   Tue Apr 19 13:48:55 2022 +0200
tdf#148635 no need to init ChartDataWrapper more than once

Change-Id: I28f078731bd8bfedbde63d0bb2e5fe40f0a4ff46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151583
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
index b54e029d54db..84b98f0d8018 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
@@ -587,14 +587,11 @@ void ChartDataWrapper::switchToInternalDataProvider()
 rtl::Reference< ChartModel > xChartDoc( 
m_spChart2ModelContact->getDocumentModel() );
 if( xChartDoc.is() )
 xChartDoc->createInternalDataProvider( true /*bCloneExistingData*/ );
-m_xDataAccess.clear();
 initDataAccess();
 }
 
 void ChartDataWrapper::initDataAccess()
 {
-if (m_xDataAccess)
-return;
 rtl::Reference< ChartModel > xChartDoc( 
m_spChart2ModelContact->getDocumentModel() );
 if( !xChartDoc.is() )
 return;


[Libreoffice-commits] core.git: chart2/source

2023-05-08 Thread mostafa-elsharnoby (via logerrit)
 chart2/source/controller/dialogs/tp_Scale.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c5c83c8e6c4ddbb7f1fa88b9ab0a67ccbb2627c3
Author: mostafa-elsharnoby 
AuthorDate: Sat Feb 11 14:20:43 2023 +0200
Commit: Hossein 
CommitDate: Mon May 8 12:57:18 2023 +0200

tdf#114441 Convert use of sal_uLong to sal_uInt32

Replaced sal_uLong with sal_uInt32 because implementation of the
GetValue() returns sal_uInt32.

Change-Id: I6e4d9b3f4854da0c60d7ba32b688106639362adc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146821
Tested-by: Hossein 
Reviewed-by: Hossein 

diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx 
b/chart2/source/controller/dialogs/tp_Scale.cxx
index 7147dfa84a31..b8c9f0598357 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -529,7 +529,7 @@ void ScaleTabPage::SetNumFormat()
 if( !pNumFormatItem )
 return;
 
-sal_uLong nFmt = pNumFormatItem->GetValue();
+sal_uInt32 nFmt = pNumFormatItem->GetValue();
 
 Formatter& rFmtFldMax = m_xFmtFldMax->GetFormatter();
 rFmtFldMax.SetFormatKey(nFmt);


[Libreoffice-commits] core.git: chart2/source comphelper/source compilerplugins/clang connectivity/source desktop/qa desktop/source docmodel/source editeng/source helpcompiler/inc helpcompiler/source

2023-04-24 Thread Noel Grandin (via logerrit)
 chart2/source/controller/main/ChartController_Window.cxx|2 
 chart2/source/controller/sidebar/ChartColorWrapper.cxx  |4 
 chart2/source/controller/sidebar/ChartLinePanel.cxx |2 
 comphelper/source/misc/sequenceashashmap.cxx|   16 -
 compilerplugins/clang/test/unnecessarygetstr.cxx|   47 -
 compilerplugins/clang/unnecessarygetstr.cxx |   89 
--
 connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx |2 
 desktop/qa/desktop_lib/test_desktop_lib.cxx |   12 -
 desktop/source/lib/init.cxx |4 
 docmodel/source/theme/ThemeColorJSON.cxx|4 
 editeng/source/editeng/editview.cxx |2 
 editeng/source/editeng/impedit.cxx  |2 
 helpcompiler/inc/HelpCompiler.hxx   |4 
 helpcompiler/source/HelpLinker.cxx  |   18 --
 hwpfilter/source/hwpeq.cxx  |2 
 lingucomponent/source/lingutil/lingutil.hxx |2 
 lingucomponent/source/numbertext/numbertext.cxx |6 
 lingucomponent/source/spellcheck/spell/sspellimp.cxx|6 
 o3tl/qa/test-string_view.cxx|2 
 oox/source/docprop/docprophandler.cxx   |2 
 oox/source/export/drawingml.cxx |2 
 sc/qa/unit/subsequent_export_test4.cxx  |5 
 sc/qa/unit/tiledrendering/tiledrendering.cxx|8 
 sc/source/core/tool/formulalogger.cxx   |2 
 sc/source/ui/Accessibility/AccessibleCsvControl.cxx |2 
 sc/source/ui/app/inputhdl.cxx   |2 
 sc/source/ui/docshell/datastream.cxx|2 
 sc/source/ui/docshell/docsh4.cxx|2 
 sc/source/ui/drawfunc/drawsh2.cxx   |2 
 sc/source/ui/view/gridwin.cxx   |4 
 sc/source/ui/view/tabview.cxx   |6 
 sc/source/ui/view/tabview3.cxx  |2 
 sc/source/ui/view/tabview5.cxx  |2 
 sc/source/ui/view/viewdata.cxx  |2 
 sc/source/ui/view/viewfun2.cxx  |2 
 sd/qa/unit/export-tests-ooxml2.cxx  |8 
 sd/qa/unit/tiledrendering/tiledrendering.cxx|2 
 sd/source/ui/view/Outliner.cxx  |4 
 sfx2/source/control/dispatch.cxx|2 
 sfx2/source/doc/autoredactdialog.cxx|4 
 sfx2/source/doc/objserv.cxx |2 
 sfx2/source/sidebar/SidebarController.cxx   |   10 -
 sfx2/source/view/lokhelper.cxx  |8 
 svtools/source/svhtml/parhtml.cxx   |4 
 svx/source/svdraw/svdmrkv.cxx   |2 
 svx/source/xoutdev/xattr.cxx|2 
 sw/qa/extras/tiledrendering/tiledrendering.cxx  |   78 
 sw/qa/extras/uiwriter/uiwriter5.cxx |4 
 sw/qa/extras/uiwriter/uiwriter6.cxx |4 
 sw/qa/extras/uiwriter/uiwriter8.cxx |5 
 sw/qa/uibase/uno/uno.cxx|   16 -
 sw/source/core/doc/docredln.cxx |2 
 sw/source/core/model/SearchResultLocator.cxx|2 
 sw/source/core/view/viewsh.cxx  |7 
 sw/source/uibase/docvw/PostItMgr.cxx|2 
 sw/source/uibase/uiview/viewling.cxx|2 
 sw/source/uibase/uiview/viewsrch.cxx|2 
 sw/source/uibase/uiview/viewtab.cxx |2 
 tools/qa/cppunit/test_urlobj.cxx|2 
 ucb/source/ucp/cmis/auth_provider.cxx   |2 
 ucb/source/ucp/cmis/cmis_repo_content.cxx   |2 
 unotools/source/i18n/resmgr.cxx |4 
 vcl/qa/cppunit/complextext.cxx  |8 
 vcl/source/app/unohelp2.cxx |2 
 vcl/source/control/edit.cxx |2 
 vcl/source/control/field2.cxx   |2 
 vcl/source/gdi/mtfxmldump.cxx   |2 
 vcl/unx/gtk3/gtkinst.cxx|2 
 writ

[Libreoffice-commits] core.git: chart2/source

2023-04-23 Thread Nabeel Siddiqui (via logerrit)
 chart2/source/tools/InternalData.cxx   |8 ++--
 chart2/source/view/charttypes/BarChart.cxx |4 +---
 2 files changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 52522f4772806d9e74ab7df9cc3e8046f68c5809
Author: Nabeel Siddiqui 
AuthorDate: Sun Mar 19 14:39:25 2023 +0530
Commit: Hossein 
CommitDate: Sun Apr 23 17:51:21 2023 +0200

tdf#148251 Use std::swap instead of using temporary values

Change-Id: I7733ba595634f41ef0a0902ea37d694276417871
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149087
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/chart2/source/tools/InternalData.cxx 
b/chart2/source/tools/InternalData.cxx
index 375e639c7879..38eb848815db 100644
--- a/chart2/source/tools/InternalData.cxx
+++ b/chart2/source/tools/InternalData.cxx
@@ -258,9 +258,7 @@ void InternalData::swapRowWithNext( sal_Int32 nRowIndex )
 {
 size_t nIndex1 = nColIdx + nRowIndex*m_nColumnCount;
 size_t nIndex2 = nIndex1 + m_nColumnCount;
-double fTemp = m_aData[nIndex1];
-m_aData[nIndex1] = m_aData[nIndex2];
-m_aData[nIndex2] = fTemp;
+std::swap(m_aData[nIndex1], m_aData[nIndex2]);
 }
 
 std::vector< uno::Any > aTemp( m_aRowLabels[nRowIndex] );
@@ -278,9 +276,7 @@ void InternalData::swapColumnWithNext( sal_Int32 
nColumnIndex )
 {
 size_t nIndex1 = nColumnIndex + nRowIdx*m_nColumnCount;
 size_t nIndex2 = nIndex1 + 1;
-double fTemp = m_aData[nIndex1];
-m_aData[nIndex1] = m_aData[nIndex2];
-m_aData[nIndex2] = fTemp;
+std::swap(m_aData[nIndex1], m_aData[nIndex2]);
 }
 
 std::vector< uno::Any > aTemp( m_aColumnLabels[nColumnIndex] );
diff --git a/chart2/source/view/charttypes/BarChart.cxx 
b/chart2/source/view/charttypes/BarChart.cxx
index d265f9aa3dd1..eeb30266351b 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -123,9 +123,7 @@ drawing::Direction3D 
BarChart::getPreferredDiagramAspectRatio() const
 }
 if( m_pMainPosHelper && m_pMainPosHelper->isSwapXAndY() )
 {
-double fTemp = aRet.DirectionX;
-aRet.DirectionX = aRet.DirectionY;
-aRet.DirectionY = fTemp;
+std::swap(aRet.DirectionX, aRet.DirectionY);
 }
 }
 else


[Libreoffice-commits] core.git: chart2/source

2023-04-20 Thread Mike Kaganski (via logerrit)
 chart2/source/model/main/DataPointProperties.cxx  |   42 +++---
 chart2/source/model/main/DataSeriesProperties.cxx |2 -
 chart2/source/tools/CharacterProperties.cxx   |   11 +++--
 chart2/source/tools/FillProperties.cxx|   18 +
 chart2/source/tools/LinePropertiesHelper.cxx  |7 ++-
 chart2/source/tools/SceneProperties.cxx   |6 +--
 6 files changed, 46 insertions(+), 40 deletions(-)

New commits:
commit 5cd9de202765e243e41416802f3e4486b8a96f16
Author: Mike Kaganski 
AuthorDate: Thu Apr 20 19:39:28 2023 +0200
Commit: Mike Kaganski 
CommitDate: Thu Apr 20 22:42:57 2023 +0200

Add a bit of consistency

Change-Id: Ib201a8cec7c7a4a0a5cbd3d7e7d6156f8e8e59a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150717
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/chart2/source/model/main/DataPointProperties.cxx 
b/chart2/source/model/main/DataPointProperties.cxx
index 267bf9014dca..819336edd9c4 100644
--- a/chart2/source/model/main/DataPointProperties.cxx
+++ b/chart2/source/model/main/DataPointProperties.cxx
@@ -35,6 +35,8 @@
 #include 
 #include 
 
+#include 
+
 using namespace ::com::sun::star;
 
 using ::com::sun::star::beans::Property;
@@ -450,8 +452,8 @@ void DataPointProperties::AddPropertiesToVector(
 void DataPointProperties::AddDefaultsToMap(
 ::chart::tPropertyValueMap & rOutMap )
 {
-PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, 
PROP_DATAPOINT_COLOR, 0x0099ccff ); // blue 8
-PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, 
PROP_DATAPOINT_TRANSPARENCY, 0 );
+PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_COLOR, 
Color(0x99, 0xcc, 0xff) ); // blue 8
+PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_DATAPOINT_TRANSPARENCY, sal_Int16(0) );
 
 //fill
 PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_DATAPOINT_FILL_STYLE, drawing::FillStyle_SOLID );
@@ -462,29 +464,29 @@ void DataPointProperties::AddDefaultsToMap(
 PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_DATAPOINT_FILL_BACKGROUND, false );
 
 //border
-PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, 
PROP_DATAPOINT_BORDER_COLOR, 0x00 ); // black
+PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_DATAPOINT_BORDER_COLOR, COL_BLACK );
 PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_DATAPOINT_BORDER_STYLE, drawing::LineStyle_SOLID ); // 
drawing::LineStyle_NONE
-PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, 
PROP_DATAPOINT_BORDER_WIDTH, 0 );
+PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_DATAPOINT_BORDER_WIDTH, sal_Int32(0) );
 PropertyHelper::setEmptyPropertyValueDefault( rOutMap, 
PROP_DATAPOINT_BORDER_DASH_NAME );
-PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, 
PROP_DATAPOINT_BORDER_TRANSPARENCY, 0 );
+PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_DATAPOINT_BORDER_TRANSPARENCY, sal_Int16(0) );
 
 //line
 PropertyHelper::setPropertyValueDefault( rOutMap, 
LinePropertiesHelper::PROP_LINE_STYLE, drawing::LineStyle_SOLID );
-PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, 
LinePropertiesHelper::PROP_LINE_WIDTH, 0 );
+PropertyHelper::setPropertyValueDefault( rOutMap, 
LinePropertiesHelper::PROP_LINE_WIDTH, sal_Int32(0) );
 PropertyHelper::setPropertyValueDefault( rOutMap, 
LinePropertiesHelper::PROP_LINE_DASH, drawing::LineDash());
 PropertyHelper::setEmptyPropertyValueDefault( rOutMap, 
LinePropertiesHelper::PROP_LINE_DASH_NAME );
 PropertyHelper::setPropertyValueDefault( rOutMap, 
LinePropertiesHelper::PROP_LINE_CAP, drawing::LineCap_BUTT);
 
 //fill bitmap
-PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, 
FillProperties::PROP_FILL_BITMAP_OFFSETX, 0 );
-PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, 
FillProperties::PROP_FILL_BITMAP_OFFSETY, 0 );
-PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, 
FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETX, 0 );
-PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, 
FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETY, 0 );
+PropertyHelper::setPropertyValueDefault( rOutMap, 
FillProperties::PROP_FILL_BITMAP_OFFSETX, sal_Int16(0) );
+PropertyHelper::setPropertyValueDefault( rOutMap, 
FillProperties::PROP_FILL_BITMAP_OFFSETY, sal_Int16(0) );
+PropertyHelper::setPropertyValueDefault( rOutMap, 
FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETX, sal_Int16(0) );
+PropertyHelper::setPropertyValueDefault( rOutMap, 
FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETY, sal_Int16(0) );
 PropertyHelper::setPropertyValueDefault( rOutMap, 
FillProperties::PROP_FILL_BITMAP_RECTANGLEPOINT, 
drawing::RectanglePoint_MIDDLE_MIDDLE );
 PropertyHelper::setPropertyValueDefault( rOutMap, 
FillProperties::PROP_FILL_BITMAP_LOGICALSIZE, true );
 
-PropertyHelper::setPro

[Libreoffice-commits] core.git: chart2/source

2023-04-20 Thread Noel Grandin (via logerrit)
 chart2/source/tools/RegressionCurveModel.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 877dea227e44e52f789517471c21615ff2d95716
Author: Noel Grandin 
AuthorDate: Thu Apr 20 15:13:28 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Apr 20 18:40:16 2023 +0200

return this map by const&

Change-Id: I471bdc5ceb85d19332d32abc8469f90f28947eee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150699
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/tools/RegressionCurveModel.cxx 
b/chart2/source/tools/RegressionCurveModel.cxx
index 66bd21aa84d4..23d3a4d9ac05 100644
--- a/chart2/source/tools/RegressionCurveModel.cxx
+++ b/chart2/source/tools/RegressionCurveModel.cxx
@@ -99,7 +99,7 @@ void lcl_AddPropertiesToVector(
 beans::PropertyAttribute::BOUND );
 }
 
-::chart::tPropertyValueMap GetStaticXXXDefaults()
+const ::chart::tPropertyValueMap & GetStaticXXXDefaults()
 {
 static ::chart::tPropertyValueMap aStaticDefaults =
 [](){


[Libreoffice-commits] core.git: chart2/source dbaccess/source editeng/source include/comphelper include/editeng include/svx include/vcl sc/inc sc/source sd/Library_sd.mk sd/source sfx2/inc sw/inc sw/s

2023-04-19 Thread Noel Grandin (via logerrit)
 chart2/source/inc/DataSeriesHelper.hxx|5 
 chart2/source/inc/LifeTime.hxx|   17 -
 chart2/source/inc/ModifyListenerHelper.hxx|   20 -
 chart2/source/view/main/VTitle.cxx|   14 -
 chart2/source/view/main/VTitle.hxx|2 
 dbaccess/source/core/inc/table.hxx|1 
 editeng/source/items/frmitems.cxx |6 
 include/comphelper/servicehelper.hxx  |   10 
 include/editeng/lrspitem.hxx  |   21 -
 include/svx/sdtmfitm.hxx  |5 
 include/vcl/toolkit/treelist.hxx  |1 
 sc/inc/postit.hxx |2 
 sc/source/core/data/postit.cxx|9 
 sc/source/filter/xml/XMLExportSharedData.cxx  |6 
 sc/source/filter/xml/XMLExportSharedData.hxx  |1 
 sc/source/ui/inc/impex.hxx|1 
 sd/Library_sd.mk  |1 
 sd/source/filter/eppt/pptx-animations-nodectx.hxx |1 
 sd/source/ui/app/sdxfer.cxx   |6 
 sd/source/ui/inc/SlideSorter.hxx  |   22 --
 sd/source/ui/inc/sdxfer.hxx   |1 
 sd/source/ui/inc/tools/ConfigurationAccess.hxx|   38 ---
 sd/source/ui/inc/tools/PropertySet.hxx|  109 -
 sd/source/ui/slidesorter/controller/SlsProperties.cxx |   43 ---
 sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx |   54 
 sd/source/ui/slidesorter/shell/SlideSorter.cxx|   13 -
 sd/source/ui/tools/ConfigurationAccess.cxx|   60 -
 sd/source/ui/tools/PropertySet.cxx|  153 --
 sfx2/inc/guisaveas.hxx|2 
 sw/inc/hintids.hxx|1 
 sw/inc/hints.hxx  |   11 -
 sw/source/ui/misc/pagenumberdlg.cxx   |5 
 sw/source/uibase/inc/pagenumberdlg.hxx|1 
 vcl/Library_vclplug_gen.mk|1 
 vcl/inc/pdf/pdfwriter_impl.hxx|2 
 vcl/inc/unx/saldisp.hxx   |7 
 vcl/inc/unx/salgdi.h  |   11 -
 vcl/source/treelist/treelist.cxx  |   15 -
 vcl/unx/generic/app/saldisp.cxx   |   36 ---
 vcl/unx/generic/gdi/salgdi2.cxx   |   88 
 40 files changed, 1 insertion(+), 801 deletions(-)

New commits:
commit e2c7a6bd572644b928704f6cb3696b568ac0aba1
Author: Noel Grandin 
AuthorDate: Wed Apr 19 13:17:17 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Apr 19 19:18:51 2023 +0200

loplugin::unusedmethods

Change-Id: I6a07860edb13588b83345babeb53675aedc43f7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150607
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/inc/DataSeriesHelper.hxx 
b/chart2/source/inc/DataSeriesHelper.hxx
index 16bd9d771973..b1f4e0ba3441 100644
--- a/chart2/source/inc/DataSeriesHelper.hxx
+++ b/chart2/source/inc/DataSeriesHelper.hxx
@@ -94,11 +94,6 @@ getAllDataSequences(
 OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference< ::chart::DataSource >
 getDataSource( const std::vector< rtl::Reference< ::chart::DataSeries > > 
& aSeries );
 
-/** Get the label of a labeled sequence including necessary automatic 
generation
- */
-OOO_DLLPUBLIC_CHARTTOOLS OUString getLabelForLabeledDataSequence(
-const css::uno::Reference< css::chart2::data::XLabeledDataSequence > & 
xLabeledSeq );
-
 OOO_DLLPUBLIC_CHARTTOOLS void setStackModeAtSeries(
 const std::vector< rtl::Reference< ::chart::DataSeries > > & aSeries,
 const rtl::Reference< ::chart::BaseCoordinateSystem > & 
xCorrespondingCoordinateSystem,
diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx
index fb9dd7a7f0b6..e16edd1e595a 100644
--- a/chart2/source/inc/LifeTime.hxx
+++ b/chart2/source/inc/LifeTime.hxx
@@ -193,23 +193,6 @@ private:
 LifeTimeGuard& operator= ( const LifeTimeGuard& ) = delete;
 };
 
-template
-class NegativeGuard final
-{
-T * m_pT;
-public:
-
-NegativeGuard(T & t) : m_pT(&t)
-{
-m_pT->release();
-}
-
-~NegativeGuard()
-{
-m_pT->acquire();
-}
-};
-
 }//end namespace apphelper
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ModifyListenerHelper.hxx 
b/chart2/source/inc/ModifyListenerHelper.hxx
index 9f0dd68aadc1..ee90d407a66f 100644
--- a/chart2/source/inc/ModifyListenerHelper.hxx
+++ b/chart2/source/inc/ModifyListenerHelper.hxx
@@ -197,16 +197,6 @@ void addListenerToAllMapElements(
 

[Libreoffice-commits] core.git: chart2/source

2023-04-17 Thread Caolán McNamara (via logerrit)
 chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 13a2ca25e4b16a6ac310c03ec9b543c774a0df6c
Author: Caolán McNamara 
AuthorDate: Mon Apr 17 09:38:45 2023 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 17 17:03:26 2023 +0200

Resolves: tdf#146068 don't crash when MA(central) lacks data

Change-Id: I2c9b78f4d1a963bb71abb21068e61e6983ade777
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150484
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx 
b/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx
index 6236f73b398d..6726d9d78b36 100644
--- a/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx
@@ -84,6 +84,8 @@ void 
MovingAverageRegressionCurveCalculator::calculateValuesCentral(
 RegressionCalculationHelper::tDoubleVectorPair aValues)
 {
 const size_t aSize = aValues.first.size();
+if (aSize == 0)
+return;
 for (size_t i = mPeriod - 1; i < aSize; ++i)
 {
 double yAvg = 0.0;


[Libreoffice-commits] core.git: chart2/source

2023-04-02 Thread Noel Grandin (via logerrit)
 chart2/source/inc/Diagram.hxx|2 +-
 chart2/source/inc/OPropertySet.hxx   |   26 +-
 chart2/source/model/main/Diagram.cxx |4 ++--
 3 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 89170bc27196f9b5a27de7bf42a43b71235676c2
Author: Noel Grandin 
AuthorDate: Sun Apr 2 18:31:41 2023 +0200
Commit: Noel Grandin 
CommitDate: Sun Apr 2 22:10:24 2023 +0200

make some methods final in chart OPropertySet

so that the subclasses use the right overrides to implement custom
behaviour

Change-Id: Ida9d1de51b5595c4d9532a5c98a220bf39d9a208
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149940
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index eba06976cbbf..65532a9a512d 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -106,7 +106,7 @@ public:
 getPropertySetInfo() override;
 
 //  XFastPropertySet 
-virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const 
css::uno::Any& rValue ) override;
+virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, 
const css::uno::Any& rValue ) override;
 
 /// make original interface function visible again
 using ::com::sun::star::beans::XFastPropertySet::getFastPropertyValue;
diff --git a/chart2/source/inc/OPropertySet.hxx 
b/chart2/source/inc/OPropertySet.hxx
index 6e7770174c75..aa5d2e7cd4ba 100644
--- a/chart2/source/inc/OPropertySet.hxx
+++ b/chart2/source/inc/OPropertySet.hxx
@@ -105,7 +105,7 @@ protected:
 ( css::uno::Any & rConvertedValue,
   css::uno::Any & rOldValue,
   sal_Int32 nHandle,
-  const css::uno::Any& rValue ) override;
+  const css::uno::Any& rValue ) override final;
 
 /** The same as setFastPropertyValue; nHandle is always valid.
 The changes must not be broadcasted in this method.
@@ -145,7 +145,7 @@ protected:
 
 public:
 /// make original interface function visible again
-using ::com::sun::star::beans::XFastPropertySet::getFastPropertyValue;
+using ::cppu::OPropertySetHelper::getFastPropertyValue;
 
 // Interfaces
 
@@ -160,35 +160,35 @@ public:
 
 //  XPropertyState 
 virtual css::beans::PropertyState SAL_CALL
-getPropertyState( const OUString& PropertyName ) override;
+getPropertyState( const OUString& PropertyName ) override final;
 virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL
-getPropertyStates( const css::uno::Sequence< OUString >& aPropertyName 
) override;
+getPropertyStates( const css::uno::Sequence< OUString >& aPropertyName 
) override final;
 virtual void SAL_CALL
-setPropertyToDefault( const OUString& PropertyName ) override;
+setPropertyToDefault( const OUString& PropertyName ) override final;
 virtual css::uno::Any SAL_CALL
-getPropertyDefault( const OUString& aPropertyName ) override;
+getPropertyDefault( const OUString& aPropertyName ) override final;
 
 //  XMultiPropertyStates 
 // Note: getPropertyStates() is already implemented in XPropertyState with 
the
 // same signature
 virtual void SAL_CALL
-setAllPropertiesToDefault() override;
+setAllPropertiesToDefault() override final;
 virtual void SAL_CALL
-setPropertiesToDefault( const css::uno::Sequence< OUString >& 
aPropertyNames ) override;
+setPropertiesToDefault( const css::uno::Sequence< OUString >& 
aPropertyNames ) override final;
 virtual css::uno::Sequence< css::uno::Any > SAL_CALL
-getPropertyDefaults( const css::uno::Sequence< OUString >& 
aPropertyNames ) override;
+getPropertyDefaults( const css::uno::Sequence< OUString >& 
aPropertyNames ) override final;
 
 //  XStyleSupplier 
-virtual css::uno::Reference< css::style::XStyle > SAL_CALL getStyle() 
override;
-virtual void SAL_CALL setStyle( const css::uno::Reference< 
css::style::XStyle >& xStyle ) override;
+virtual css::uno::Reference< css::style::XStyle > SAL_CALL getStyle() 
override final;
+virtual void SAL_CALL setStyle( const css::uno::Reference< 
css::style::XStyle >& xStyle ) override final;
 
 //  XMultiPropertySet 
 virtual void SAL_CALL setPropertyValues(
 const css::uno::Sequence< OUString >& PropertyNames,
-const css::uno::Sequence< css::uno::Any >& Values ) override;
+const css::uno::Sequence< css::uno::Any >& Values ) override final;
 
 //  XFastPropertySet 
-virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const 
css::uno::Any& rValue ) override;
+virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const 
css::uno::Any& rValue ) override final;
 
 // Note: it is assumed that the base class implements setPropertyValue by
 // using setFastPropertyValue
diff --git

[Libreoffice-commits] core.git: chart2/source

2023-04-02 Thread Noel Grandin (via logerrit)
 chart2/source/inc/OPropertySet.hxx   |5 ++---
 chart2/source/tools/OPropertySet.cxx |4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 8f6dd1fde5d99418d2db4b547f9761f3449d3490
Author: Noel Grandin 
AuthorDate: Sun Apr 2 18:35:03 2023 +0200
Commit: Noel Grandin 
CommitDate: Sun Apr 2 21:45:04 2023 +0200

map->unordered_map in chart OPropertySet

no need for ordering here

Change-Id: I7e0928284c98aca297d4452e65efd8a4f3b1e56d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149941
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/inc/OPropertySet.hxx 
b/chart2/source/inc/OPropertySet.hxx
index d78312878798..6e7770174c75 100644
--- a/chart2/source/inc/OPropertySet.hxx
+++ b/chart2/source/inc/OPropertySet.hxx
@@ -29,7 +29,7 @@
 #include 
 #include "charttoolsdllapi.hxx"
 
-#include 
+#include 
 
 namespace property
 {
@@ -224,8 +224,7 @@ private:
 bool SetStyle( const css::uno::Reference< css::style::XStyle > & xStyle );
 
 bool m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault;
-typedef std::map< sal_Int32, css::uno::Any > tPropertyMap;
-tPropertyMapm_aProperties;
+std::unordered_map< sal_Int32, css::uno::Any >m_aProperties;
 css::uno::Reference< css::style::XStyle > m_xStyle;
 };
 
diff --git a/chart2/source/tools/OPropertySet.cxx 
b/chart2/source/tools/OPropertySet.cxx
index 817fb44a2c8d..d029c51763bb 100644
--- a/chart2/source/tools/OPropertySet.cxx
+++ b/chart2/source/tools/OPropertySet.cxx
@@ -408,7 +408,7 @@ Sequence< beans::PropertyState > 
OPropertySet::GetPropertyStatesByHandle(
 
 void OPropertySet::SetPropertyToDefault( sal_Int32 nHandle )
 {
-tPropertyMap::iterator aFoundIter( m_aProperties.find( nHandle ) );
+auto aFoundIter( m_aProperties.find( nHandle ) );
 
 if( m_aProperties.end() != aFoundIter )
 {
@@ -434,7 +434,7 @@ bool OPropertySet::GetPropertyValueByHandle(
 {
 bool bResult = false;
 
-tPropertyMap::const_iterator aFoundIter( m_aProperties.find( nHandle ) );
+auto aFoundIter( m_aProperties.find( nHandle ) );
 
 if( m_aProperties.end() != aFoundIter )
 {


[Libreoffice-commits] core.git: chart2/source

2023-04-01 Thread Noel Grandin (via logerrit)
 chart2/source/inc/Diagram.hxx  |   10 +++---
 chart2/source/model/main/Diagram.cxx   |   20 +++-
 chart2/source/tools/AxisHelper.cxx |6 +++---
 chart2/source/tools/ChartModelHelper.cxx   |6 +++---
 chart2/source/view/main/SeriesPlotterContainer.cxx |6 +++---
 5 files changed, 31 insertions(+), 17 deletions(-)

New commits:
commit 84646117baa2ac3463a007207b6b5d1d3cf0e3ae
Author: Noel Grandin 
AuthorDate: Sat Apr 1 21:09:29 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Apr 1 21:57:57 2023 +0200

fix locking in chart::Diagram

we can't return a reference to internal state that needs to be protected by 
a mutex

Change-Id: I13c0128559546cc2078584fc0de818c568617b7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149914
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 874e8e904e5d..eba06976cbbf 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -163,19 +163,15 @@ public:
 std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > >
 tCoordinateSystemContainerType;
 
-const tCoordinateSystemContainerType & getBaseCoordinateSystems() { return 
m_aCoordSystems; }
+tCoordinateSystemContainerType getBaseCoordinateSystems() const;
 void setCoordinateSystems(
 const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > >& 
aCoordinateSystems );
 
-const rtl::Reference< ::chart::Legend > & getLegend2() const { return 
m_xLegend; }
+rtl::Reference< ::chart::Legend > getLegend2() const;
 void setLegend(const rtl::Reference< ::chart::Legend > &);
 
 void setDataTable(const rtl::Reference<::chart::DataTable>& xNewDataTable);
-
-rtl::Reference<::chart::DataTable> const& getDataTableRef() const
-{
-return m_xDataTable;
-};
+rtl::Reference<::chart::DataTable> getDataTableRef() const;
 
 DiagramPositioningMode getDiagramPositioningMode();
 
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index 1522d168c542..63bead4ef1b2 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -354,6 +354,12 @@ uno::Reference< chart2::XLegend > SAL_CALL 
Diagram::getLegend()
 return m_xLegend;
 }
 
+rtl::Reference< ::chart::Legend > Diagram::getLegend2() const
+{
+MutexGuard aGuard( m_aMutex );
+return m_xLegend;
+}
+
 void SAL_CALL Diagram::setLegend( const uno::Reference< chart2::XLegend >& 
xNewLegend )
 {
 auto pLegend = dynamic_cast(xNewLegend.get());
@@ -606,6 +612,12 @@ uno::Sequence< uno::Reference< chart2::XCoordinateSystem > 
> SAL_CALL Diagram::g
 return comphelper::containerToSequence>( m_aCoordSystems );
 }
 
+Diagram::tCoordinateSystemContainerType Diagram::getBaseCoordinateSystems() 
const
+{
+MutexGuard aGuard( m_aMutex );
+return m_aCoordSystems;
+}
+
 void SAL_CALL Diagram::setCoordinateSystems(
 const Sequence< Reference< chart2::XCoordinateSystem > >& 
aCoordinateSystems )
 {
@@ -772,7 +784,13 @@ void SAL_CALL Diagram::getFastPropertyValue( Any& rValue, 
sal_Int32 nHandle ) co
 
 uno::Reference SAL_CALL Diagram::getDataTable()
 {
-MutexGuard aGuard(m_aMutex);
+MutexGuard aGuard( m_aMutex );
+return m_xDataTable;
+}
+
+rtl::Reference<::chart::DataTable> Diagram::getDataTableRef() const
+{
+MutexGuard aGuard( m_aMutex );
 return m_xDataTable;
 }
 
diff --git a/chart2/source/tools/AxisHelper.cxx 
b/chart2/source/tools/AxisHelper.cxx
index 3fe146d259bc..7e8229352181 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -552,9 +552,9 @@ rtl::Reference< ::chart::BaseCoordinateSystem > 
AxisHelper::getCoordinateSystemB
 {
 if(!xDiagram.is())
 return nullptr;
-auto & rCooSysList = xDiagram->getBaseCoordinateSystems();
-if(0<=nIndex && o3tl::make_unsigned(nIndex) < rCooSysList.size())
-return rCooSysList[nIndex];
+auto aCooSysList = xDiagram->getBaseCoordinateSystems();
+if(0<=nIndex && o3tl::make_unsigned(nIndex) < aCooSysList.size())
+return aCooSysList[nIndex];
 return nullptr;
 }
 
diff --git a/chart2/source/tools/ChartModelHelper.cxx 
b/chart2/source/tools/ChartModelHelper.cxx
index 3018797b6dca..0aa2288ff888 100644
--- a/chart2/source/tools/ChartModelHelper.cxx
+++ b/chart2/source/tools/ChartModelHelper.cxx
@@ -81,9 +81,9 @@ rtl::Reference< BaseCoordinateSystem > 
ChartModelHelper::getFirstCoordinateSyste
 rtl::Reference< Diagram > xDiagram = xModel->getFirstChartDiagram();
 if( xDiagram.is() )
 {
-auto& rCooSysSeq( xDiagram->getBaseCoordinateSystems() );
-if( !rCooSysSeq.empty() )
-return rCooSysSeq[0];
+auto aCooSysSeq( xDiagram->getBaseCoordinateSystems() );
+if( !aCooSysSeq.empty() )
+return aCooSysSeq[0];
 

[Libreoffice-commits] core.git: chart2/source

2023-03-31 Thread Caolán McNamara (via logerrit)
 chart2/source/inc/DataSeries.hxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 09b00e959d587058a57be01abccf9873022c969b
Author: Caolán McNamara 
AuthorDate: Fri Mar 31 09:20:37 2023 +0100
Commit: Caolán McNamara 
CommitDate: Fri Mar 31 09:10:32 2023 +

crashtesting: XDataSeries OPropertySetHelper::getFastPropertyValue crash

seen with

gcc --version
gcc (Debian 10.2.1-6) 10.2.1 20210110

similar to

commit ad59487053bcd267b53febde0cecbd64c7f94cc0
Author: Caolán McNamara 
Date:   Sun Mar 19 20:40:35 2023 +

crashtesting: frequent XDiagram 
OPropertySetHelper::getFastPropertyValue crash

Change-Id: If190e0c51a0b983165ff6f36bb2185456ea6bade
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149819
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/chart2/source/inc/DataSeries.hxx b/chart2/source/inc/DataSeries.hxx
index 03325a463a12..932fcd836b9a 100644
--- a/chart2/source/inc/DataSeries.hxx
+++ b/chart2/source/inc/DataSeries.hxx
@@ -60,9 +60,12 @@ typedef ::cppu::WeakImplHelper<
 DataSeries_Base;
 }
 
-class OOO_DLLPUBLIC_CHARTTOOLS DataSeries final :
-public impl::DataSeries_Base,
-public ::property::OPropertySet
+class OOO_DLLPUBLIC_CHARTTOOLS DataSeries
+#if !defined __GNUC__ || __GNUC__ >= 12 || defined __clang__
+final
+#endif
+: public impl::DataSeries_Base
+, public ::property::OPropertySet
 {
 public:
 explicit DataSeries();


[Libreoffice-commits] core.git: chart2/source

2023-03-30 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx |2 
 chart2/source/controller/dialogs/DataBrowserModel.cxx   |2 
 chart2/source/inc/DataSeriesHelper.hxx  |   20 --
 chart2/source/inc/DiagramHelper.hxx |2 
 chart2/source/tools/DataSeriesHelper.cxx|   70 
++
 chart2/source/tools/DiagramHelper.cxx   |2 
 6 files changed, 29 insertions(+), 69 deletions(-)

New commits:
commit efbbc141b0db77510b41b452bf3931fc3c9ecc7e
Author: Noel Grandin 
AuthorDate: Wed Mar 29 16:45:20 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 30 11:14:30 2023 +

use more concrete types in chart2

Change-Id: Iaefad282d40c83f58758b41db9b14f6e95552354
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149742
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git 
a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index ed742df89d88..ac9a53ce331f 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -295,7 +295,7 @@ Any WrappedAttachedAxisProperty::getPropertyValue( const 
Reference< beans::XProp
 {
 Any aRet;
 
-uno::Reference< chart2::XDataSeries > xDataSeries( xInnerPropertySet, 
uno::UNO_QUERY );
+rtl::Reference< ::chart::DataSeries > xDataSeries( 
dynamic_cast<::chart::DataSeries*>(xInnerPropertySet.get()) );
 bool bAttachedToMainAxis = 
::chart::DiagramHelper::isSeriesAttachedToMainAxis( xDataSeries );
 if( bAttachedToMainAxis )
 aRet <<= css::chart::ChartAxisAssign::PRIMARY_Y;
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx 
b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index c0a89a2621d2..63ec6f31fc16 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -460,7 +460,7 @@ void 
DataBrowserModel::removeDataSeriesOrComplexCategoryLevel( sal_Int32 nAtColu
 // Collect all the remaining data sequences in the same chart type. The
 // deleted data series is already gone by this point.
 std::vector > 
aAllDataSeqs =
-DataSeriesHelper::getAllDataSequences(xSeriesCnt->getDataSeries());
+DataSeriesHelper::getAllDataSequences(xSeriesCnt->getDataSeries2());
 
 // Check if the sequences to be deleted are still referenced by any of
 // the other data series.  If not, mark them for deletion.
diff --git a/chart2/source/inc/DataSeriesHelper.hxx 
b/chart2/source/inc/DataSeriesHelper.hxx
index 2de09db7cd76..16bd9d771973 100644
--- a/chart2/source/inc/DataSeriesHelper.hxx
+++ b/chart2/source/inc/DataSeriesHelper.hxx
@@ -84,10 +84,6 @@ OOO_DLLPUBLIC_CHARTTOOLS std::vector<
 
 OOO_DLLPUBLIC_CHARTTOOLS
 std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
-getAllDataSequences(
-const css::uno::Sequence >& 
aSeries );
-OOO_DLLPUBLIC_CHARTTOOLS
-std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
 getAllDataSequences(
 const std::vector >& aSeries );
 
@@ -109,11 +105,11 @@ OOO_DLLPUBLIC_CHARTTOOLS void setStackModeAtSeries(
 StackMode eStackMode );
 
 OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getAttachedAxisIndex(
-const css::uno::Reference< css::chart2::XDataSeries > & xSeries );
+const rtl::Reference< ::chart::DataSeries > & xSeries );
 
 /// @param nAxisIndex, if -1 it is determined by the given data series via 
getAttachedAxisIndex
 OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getNumberFormatKeyFromAxis(
-const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
+const rtl::Reference< ::chart::DataSeries > & xSeries,
 const rtl::Reference< ::chart::BaseCoordinateSystem > & 
xCorrespondingCoordinateSystem,
 sal_Int32 nDimensionIndex,
 sal_Int32 nAxisIndex = -1 );
@@ -121,7 +117,7 @@ OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 
getNumberFormatKeyFromAxis(
 OOO_DLLPUBLIC_CHARTTOOLS
 rtl::Reference< ::chart::BaseCoordinateSystem >
 getCoordinateSystemOfSeries(
-const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
+const rtl::Reference< ::chart::DataSeries > & xSeries,
 const rtl::Reference< ::chart::Diagram > & xDiagram );
 
 OOO_DLLPUBLIC_CHARTTOOLS
@@ -135,20 +131,16 @@ OOO_DLLPUBLIC_CHARTTOOLS void deleteSeries(
 const rtl::Reference< ::chart::ChartType > & xChartType );
 
 OOO_DLLPUBLIC_CHARTTOOLS void switchSymbolsOnOrOff(
-const css::uno::Reference< css::beans::XPropertySet > & xSeriesProperties,
+const rtl::Reference< ::chart::DataSeries > & xSeries,
 bool bSymbolsOn, sal_Int32 nSeriesIndex );
 
 OOO_DLLPUBLIC_CHARTTOOLS void switchLinesOnOrOff(
-const css::uno::Reference< css::beans::XPropertySet > & xSeriesProperties,
+const rtl::Reference< ::ch

[Libreoffice-commits] core.git: chart2/source

2023-03-29 Thread Noel Grandin (via logerrit)
 chart2/source/controller/dialogs/res_LegendPosition.cxx |8 
 chart2/source/controller/main/ChartController_Tools.cxx |   16 
 chart2/source/tools/ReferenceSizeProvider.cxx   |   13 +++--
 3 files changed, 19 insertions(+), 18 deletions(-)

New commits:
commit 73629951f68a2958ec77a74a3a4b50bbf0f3ebea
Author: Noel Grandin 
AuthorDate: Wed Mar 29 11:39:20 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 29 19:02:47 2023 +

use more concrete types in chart2

Change-Id: I1ba60b690a0402d1a98f792c86ddd033e0c39ed0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149726
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx 
b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index 49e348f4484a..1562fcc71943 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx
@@ -80,19 +80,19 @@ void LegendPositionResources::writeToResources( const 
rtl::Reference<::chart::Ch
 try
 {
 rtl::Reference< Diagram > xDiagram = 
xChartModel->getFirstChartDiagram();
-uno::Reference< beans::XPropertySet > xProp( xDiagram->getLegend(), 
uno::UNO_QUERY );
-if( xProp.is() )
+rtl::Reference< Legend > xLegend = xDiagram->getLegend2();
+if( xLegend.is() )
 {
 //show
 bool bShowLegend = false;
-xProp->getPropertyValue( "Show" ) >>= bShowLegend;
+xLegend->getPropertyValue( "Show" ) >>= bShowLegend;
 if (m_xCbxShow)
 m_xCbxShow->set_active( bShowLegend );
 PositionEnable();
 
 //position
 chart2::LegendPosition ePos;
-xProp->getPropertyValue( "AnchorPosition" )  >>= ePos;
+xLegend->getPropertyValue( "AnchorPosition" )  >>= ePos;
 switch( ePos )
 {
 case chart2::LegendPosition_LINE_START:
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx 
b/chart2/source/controller/main/ChartController_Tools.cxx
index e86662dc9beb..acc5dd950391 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -202,12 +202,12 @@ void ChartController::executeDispatch_NewArrangement()
 xDiagram->set3DSettingsToDefault();
 
 // legend
-Reference< beans::XPropertyState > xLegendState( 
xDiagram->getLegend(), uno::UNO_QUERY );
-if( xLegendState.is())
+rtl::Reference< Legend > xLegend = xDiagram->getLegend2();
+if( xLegend.is())
 {
-xLegendState->setPropertyToDefault( "RelativePosition");
-xLegendState->setPropertyToDefault( "RelativeSize");
-xLegendState->setPropertyToDefault( "AnchorPosition");
+xLegend->setPropertyToDefault( "RelativePosition");
+xLegend->setPropertyToDefault( "RelativeSize");
+xLegend->setPropertyToDefault( "AnchorPosition");
 }
 
 // titles
@@ -633,14 +633,14 @@ bool ChartController::executeDispatch_Delete()
 rtl::Reference< Diagram > xDiagram( 
xChartDoc->getFirstChartDiagram());
 if( xDiagram.is())
 {
-uno::Reference< beans::XPropertySet > xLegendProp( 
xDiagram->getLegend(), uno::UNO_QUERY );
-if( xLegendProp.is())
+rtl::Reference< Legend > xLegend( xDiagram->getLegend2() );
+if( xLegend.is())
 {
 UndoGuard aUndoGuard(
 ActionDescriptionProvider::createDescription(
 ActionDescriptionProvider::ActionType::Delete, 
SchResId( STR_OBJECT_LEGEND )),
 m_xUndoManager );
-xLegendProp->setPropertyValue( "Show", uno::Any( false 
));
+xLegend->setPropertyValue( "Show", uno::Any( false ));
 bReturn = true;
 aUndoGuard.commit();
 }
diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx 
b/chart2/source/tools/ReferenceSizeProvider.cxx
index ad71d4e72641..6c99d4e2caeb 100644
--- a/chart2/source/tools/ReferenceSizeProvider.cxx
+++ b/chart2/source/tools/ReferenceSizeProvider.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -238,9 +239,9 @@ ReferenceSizeProvider::AutoResizeState 
ReferenceSizeProvider::getAutoResizeState
 return eResult;
 
 // Legend
-Reference< beans::XPropertySet > xLegendProp( xDiagram->getLegend(), 
uno::UNO_QUERY );
-if( xLegendProp.is())
-getAutoResizeFromPropSet( xLegendProp, eResult );
+rtl::Reference< Legend > xLegend( xDiagram->getLegend2() );
+i

[Libreoffice-commits] core.git: chart2/source solenv/clang-format

2023-03-29 Thread Noel Grandin (via logerrit)
 chart2/source/inc/ChartTypeHelper.hxx |3 ++-
 chart2/source/inc/DataSeriesProperties.hxx|4 ++--
 chart2/source/model/main/DataSeries.cxx   |2 +-
 chart2/source/model/main/DataSeriesProperties.cxx |2 +-
 chart2/source/tools/ChartTypeHelper.cxx   |   10 +-
 solenv/clang-format/excludelist   |2 +-
 6 files changed, 12 insertions(+), 11 deletions(-)

New commits:
commit 856e6627c21b84a0b9ab2e3cb95a5a57864854e8
Author: Noel Grandin 
AuthorDate: Wed Mar 29 08:49:42 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 29 12:50:32 2023 +

use more concrete types in chart2

Change-Id: I938aa1d6d3c20b35d9e11818d4b641d8a03decaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149684
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/inc/ChartTypeHelper.hxx 
b/chart2/source/inc/ChartTypeHelper.hxx
index cd5985f9a51c..379f96ad0e44 100644
--- a/chart2/source/inc/ChartTypeHelper.hxx
+++ b/chart2/source/inc/ChartTypeHelper.hxx
@@ -29,6 +29,7 @@ namespace com::sun::star::chart2 { class XDataSeries; }
 namespace chart
 {
 class ChartType;
+class DataSeries;
 
 class OOO_DLLPUBLIC_CHARTTOOLS ChartTypeHelper
 {
@@ -56,7 +57,7 @@ public:
 //returns sequence of css::chart::DataLabelPlacement
 static css::uno::Sequence < sal_Int32 > getSupportedLabelPlacements(
 const rtl::Reference< ::chart::ChartType >& xChartType, bool bSwapXAndY
-, const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
+, const rtl::Reference< ::chart::DataSeries >& xSeries );
 
 //returns sequence of css::chart::MissingValueTreatment
 static css::uno::Sequence < sal_Int32 > getSupportedMissingValueTreatments(
diff --git a/chart2/source/model/main/DataSeriesProperties.hxx 
b/chart2/source/inc/DataSeriesProperties.hxx
similarity index 96%
rename from chart2/source/model/main/DataSeriesProperties.hxx
rename to chart2/source/inc/DataSeriesProperties.hxx
index 13636d442fb5..7d36721ef066 100644
--- a/chart2/source/model/main/DataSeriesProperties.hxx
+++ b/chart2/source/inc/DataSeriesProperties.hxx
@@ -18,8 +18,8 @@
  */
 #pragma once
 
-#include 
-#include 
+#include "PropertyHelper.hxx"
+#include "FastPropertyIdRanges.hxx"
 
 #include 
 
diff --git a/chart2/source/model/main/DataSeries.cxx 
b/chart2/source/model/main/DataSeries.cxx
index 9008ab8e664b..38f2c474b47a 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -18,7 +18,7 @@
  */
 
 #include 
-#include "DataSeriesProperties.hxx"
+#include 
 #include "DataPointProperties.hxx"
 #include 
 #include 
diff --git a/chart2/source/model/main/DataSeriesProperties.cxx 
b/chart2/source/model/main/DataSeriesProperties.cxx
index d85d264753c1..92201a3544fe 100644
--- a/chart2/source/model/main/DataSeriesProperties.cxx
+++ b/chart2/source/model/main/DataSeriesProperties.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "DataSeriesProperties.hxx"
+#include 
 #include "DataPointProperties.hxx"
 #include 
 #include 
diff --git a/chart2/source/tools/ChartTypeHelper.cxx 
b/chart2/source/tools/ChartTypeHelper.cxx
index 92b0337b917f..b393b344fb0d 100644
--- a/chart2/source/tools/ChartTypeHelper.cxx
+++ b/chart2/source/tools/ChartTypeHelper.cxx
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -33,6 +34,7 @@
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
+using namespace ::chart::DataSeriesProperties;
 
 namespace chart
 {
@@ -240,7 +242,7 @@ bool ChartTypeHelper::isSupportingBarConnectors(
 
 uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedLabelPlacements( 
const rtl::Reference< ChartType >& xChartType
  , 
bool bSwapXAndY
- , 
const uno::Reference< chart2::XDataSeries >& xSeries )
+ , 
const rtl::Reference< DataSeries >& xSeries )
 {
 uno::Sequence < sal_Int32 > aRet;
 if( !xChartType.is() )
@@ -288,9 +290,8 @@ uno::Sequence < sal_Int32 > 
ChartTypeHelper::getSupportedLabelPlacements( const
 
 bool bStacked = false;
 {
-uno::Reference< beans::XPropertySet > xSeriesProp( xSeries, 
uno::UNO_QUERY );
 chart2::StackingDirection eStacking = 
chart2::StackingDirection_NO_STACKING;
-xSeriesProp->getPropertyValue( "StackingDirection" ) >>= eStacking;
+xSeries->getFastPropertyValue( PROP_DATASERIES_STACKING_DIRECTION 
) >>= eStacking; // "StackingDirection"
 bStacked = (eStacking == chart2::StackingDirection_Y_STACKING);
 }
 
@@ -319,9 +320,8 @@ uno::Sequence < sal_Int32 > 
ChartTypeHelper::getSupportedLabelPlacements( const
 {
 bool bStacked = fals

[Libreoffice-commits] core.git: chart2/source

2023-03-29 Thread Caolán McNamara (via logerrit)
 chart2/source/model/main/DataSeries.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 06b34d9f4b7967e87cd53e0effd98bfacfee2bb9
Author: Caolán McNamara 
AuthorDate: Wed Mar 29 11:25:05 2023 +0100
Commit: Caolán McNamara 
CommitDate: Wed Mar 29 12:32:27 2023 +

crashtesting: Null-deref on export of forum-mso-en4-274729.xls to ods

and others, probably since:

commit f02ec0d8489404966596cb0e949bf969e8e66fa2
Date:   Wed Mar 22 08:50:15 2023 +0200

move hasUnhiddenData inside chart2::DataSeries

Change-Id: Icf59439f00a40ef036decaa36f3d5af68787c864
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149688
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/chart2/source/model/main/DataSeries.cxx 
b/chart2/source/model/main/DataSeries.cxx
index 9f863f888dd0..9008ab8e664b 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -686,6 +686,8 @@ OUString DataSeries::getLabelForRole( const OUString & 
rLabelSequenceRole )
 
 static bool lcl_SequenceHasUnhiddenData( const uno::Reference< 
chart2::data::XDataSequence >& xDataSequence )
 {
+if (!xDataSequence.is())
+return false;
 uno::Reference< beans::XPropertySet > xProp( xDataSequence, uno::UNO_QUERY 
);
 if( xProp.is() )
 {


[Libreoffice-commits] core.git: chart2/source sw/source vcl/source

2023-03-29 Thread Noel Grandin (via logerrit)
 chart2/source/inc/Axis.hxx   |3 +++
 chart2/source/inc/DataSeries.hxx |3 +++
 chart2/source/inc/FormattedString.hxx|3 +++
 chart2/source/inc/Legend.hxx |3 +++
 chart2/source/model/main/Axis.cxx|6 ++
 chart2/source/model/main/DataSeries.cxx  |7 +--
 chart2/source/model/main/FormattedString.cxx |   15 +++
 chart2/source/model/main/Legend.cxx  |7 +++
 chart2/source/view/main/ChartItemPool.cxx|   17 +
 sw/source/uibase/uno/unodoc.cxx  |2 +-
 vcl/source/font/fontcache.cxx|4 
 11 files changed, 63 insertions(+), 7 deletions(-)

New commits:
commit a2e78d06df22e99f2dc82ee3245ddc4c5de56acf
Author: Noel Grandin 
AuthorDate: Wed Mar 29 11:43:14 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 29 11:35:24 2023 +

fix concurrent access to fontcache

Every now and then I see a crash in fontcache code.
Add some DBG_SOLARMUTEX calls there, which spots a few issues.

(*) In writer, SwDLL needs to be under the SolarMutex during
init, and we can just move a method call to fix that.

(*) in chart2, life is more complicated. Various of the static
defaults we build want to call OutputDevice::getFontInstance.
We can't just stick a SolarMutex somewhere in the call chain,
because those maps are built on-demand, and then we end up
with ABBA deadlocks between the SolarMutex and the mutex
in the cppu::PropertySetHelper.
So I picked a spot that is init'ed early on in chart2,
and force the init of all the troublesome tables there.

Change-Id: I832978bea35fd5fa681d144b8beff1af13ef3341
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149648
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/inc/Axis.hxx b/chart2/source/inc/Axis.hxx
index 8329ac7365f9..902a67487cf5 100644
--- a/chart2/source/inc/Axis.hxx
+++ b/chart2/source/inc/Axis.hxx
@@ -28,6 +28,7 @@
 #include 
 #include "ModifyListenerHelper.hxx"
 #include "charttoolsdllapi.hxx"
+#include "PropertyHelper.hxx"
 
 namespace chart
 {
@@ -137,6 +138,8 @@ private:
 rtl::Reference< ::chart::Title >  m_xTitle;
 };
 
+OOO_DLLPUBLIC_CHARTTOOLS const ::chart::tPropertyValueMap &  
StaticAxisDefaults();
+
 } //  namespace chart
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/DataSeries.hxx b/chart2/source/inc/DataSeries.hxx
index 86405c19ac8e..03325a463a12 100644
--- a/chart2/source/inc/DataSeries.hxx
+++ b/chart2/source/inc/DataSeries.hxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include "ModifyListenerHelper.hxx"
+#include "PropertyHelper.hxx"
 
 // STL
 #include 
@@ -181,6 +182,8 @@ private:
 rtl::Reference m_xModifyEventForwarder;
 };
 
+OOO_DLLPUBLIC_CHARTTOOLS const tPropertyValueMap & StaticDataSeriesDefaults();
+
 }  // namespace chart
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/FormattedString.hxx 
b/chart2/source/inc/FormattedString.hxx
index d438845c7f06..23c81454facf 100644
--- a/chart2/source/inc/FormattedString.hxx
+++ b/chart2/source/inc/FormattedString.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include "ModifyListenerHelper.hxx"
+#include "PropertyHelper.hxx"
 
 namespace chart
 {
@@ -134,6 +135,8 @@ private:
 rtl::Reference m_xModifyEventForwarder;
 };
 
+OOO_DLLPUBLIC_CHARTTOOLS const ::chart::tPropertyValueMap & 
StaticFormattedStringDefaults();
+
 } //  namespace chart
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/Legend.hxx b/chart2/source/inc/Legend.hxx
index c0aa9326dd22..9caa0c7b06bb 100644
--- a/chart2/source/inc/Legend.hxx
+++ b/chart2/source/inc/Legend.hxx
@@ -26,6 +26,7 @@
 #include 
 #include "ModifyListenerHelper.hxx"
 #include "charttoolsdllapi.hxx"
+#include "PropertyHelper.hxx"
 
 namespace chart
 {
@@ -98,6 +99,8 @@ private:
 rtl::Reference m_xModifyEventForwarder;
 };
 
+OOO_DLLPUBLIC_CHARTTOOLS const ::chart::tPropertyValueMap& 
StaticLegendDefaults();
+
 } //  namespace chart
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/main/Axis.cxx 
b/chart2/source/model/main/Axis.cxx
index 6ee948968369..99e20fbc86fb 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -205,7 +205,10 @@ void lcl_AddPropertiesToVector(
   | beans::PropertyAttribute::MAYBEVOID );
 
 }
+} // namespace
 
+namespace chart
+{
 const ::chart::tPropertyValueMap &  StaticAxisDefaults()
 {
 static ::chart::tPropertyValueMap aStaticDefaults = []()
@@ -239,7 +242,10 @@ const ::chart::tPropertyValueMap &  StaticAxisDefaults()
 }();
 return aStaticDefaults;
 };
+} // namespace chart
 
+namespace
+{
 ::cppu::OPropertyArrayHelper& StaticAxisInfoHelper()
 {
 static ::cppu::OPropertyArrayHelper aPropHelper = []()
diff --git a/chart2/sourc

[Libreoffice-commits] core.git: chart2/source

2023-03-28 Thread Noel Grandin (via logerrit)
 chart2/source/inc/AxisHelper.hxx   |4 ++--
 chart2/source/tools/AxisHelper.cxx |   17 -
 2 files changed, 10 insertions(+), 11 deletions(-)

New commits:
commit 5482a582db942fcb02aec57a904ab16d496006f2
Author: Noel Grandin 
AuthorDate: Tue Mar 28 14:41:25 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 29 06:41:04 2023 +

use more concrete types in chart2

Change-Id: I7ec6df57504b3515be09796016b6db02521e5d67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149673
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/inc/AxisHelper.hxx b/chart2/source/inc/AxisHelper.hxx
index 03d67fe3b5dd..65afc65faaa4 100644
--- a/chart2/source/inc/AxisHelper.hxx
+++ b/chart2/source/inc/AxisHelper.hxx
@@ -105,8 +105,8 @@ public:
 static void hideAxisIfNoDataIsAttached( const rtl::Reference< 
::chart::Axis >& xAxis
   , const rtl::Reference< 
::chart::Diagram >& xDiagram);
 
-SAL_DLLPRIVATE static bool areAxisLabelsVisible( const 
css::uno::Reference< css::beans::XPropertySet >& xAxisProperties );
-static bool isAxisVisible( const css::uno::Reference< css::chart2::XAxis 
>& xAxis );
+SAL_DLLPRIVATE static bool areAxisLabelsVisible( const rtl::Reference< 
::chart::Axis >& xAxisProperties );
+static bool isAxisVisible( const rtl::Reference< ::chart::Axis >& xAxis );
 static bool isGridVisible( const css::uno::Reference< 
css::beans::XPropertySet >& xGridProperties );
 
 static rtl::Reference< ::chart::BaseCoordinateSystem >
diff --git a/chart2/source/tools/AxisHelper.cxx 
b/chart2/source/tools/AxisHelper.cxx
index 4eac09bdab4a..98d269388972 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -645,27 +645,26 @@ bool AxisHelper::isAxisShown( sal_Int32 nDimensionIndex, 
bool bMainAxis
 return AxisHelper::isAxisVisible( AxisHelper::getAxis( nDimensionIndex, 
bMainAxis, xDiagram ) );
 }
 
-bool AxisHelper::isAxisVisible( const Reference< XAxis >& xAxis )
+bool AxisHelper::isAxisVisible( const rtl::Reference< Axis >& xAxis )
 {
 bool bRet = false;
 
-Reference< beans::XPropertySet > xProps( xAxis, uno::UNO_QUERY );
-if( xProps.is() )
+if( xAxis.is() )
 {
-xProps->getPropertyValue( "Show" ) >>= bRet;
-bRet = bRet && ( LinePropertiesHelper::IsLineVisible( xProps )
-|| areAxisLabelsVisible( xProps ) );
+xAxis->getPropertyValue( "Show" ) >>= bRet;
+bRet = bRet && ( LinePropertiesHelper::IsLineVisible( xAxis )
+|| areAxisLabelsVisible( xAxis ) );
 }
 
 return bRet;
 }
 
-bool AxisHelper::areAxisLabelsVisible( const Reference< beans::XPropertySet >& 
xAxisProperties )
+bool AxisHelper::areAxisLabelsVisible( const rtl::Reference< Axis >& xAxis )
 {
 bool bRet = false;
-if( xAxisProperties.is() )
+if( xAxis.is() )
 {
-xAxisProperties->getPropertyValue( "DisplayLabels" ) >>= bRet;
+xAxis->getPropertyValue( "DisplayLabels" ) >>= bRet;
 }
 return bRet;
 }


[Libreoffice-commits] core.git: chart2/source

2023-03-28 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx  |
3 +-
 chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx  |
2 -
 chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx |
4 ++-
 chart2/source/controller/inc/AxisItemConverter.hxx   |
4 +--
 chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx|
4 +--
 chart2/source/inc/AxisHelper.hxx |
5 
 chart2/source/inc/chartview/ExplicitValueProvider.hxx|
4 +--
 chart2/source/tools/AxisHelper.cxx   |   
11 --
 chart2/source/view/main/ExplicitValueProvider.cxx|
2 -
 9 files changed, 13 insertions(+), 26 deletions(-)

New commits:
commit 90baab0f50bcf35ae29f1841509ecdace9be77db
Author: Noel Grandin 
AuthorDate: Tue Mar 28 14:38:49 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Mar 28 19:52:51 2023 +

use more concrete types in chart2

Change-Id: I067e9424a77fb1d835f2847bba3c3f2cda3430f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149652
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx 
b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
index b9ba429433e2..f3ea07e23a3a 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -151,7 +152,7 @@ void Chart2ModelContact::getExplicitValuesForAxis(
 }
 
 sal_Int32 Chart2ModelContact::getExplicitNumberFormatKeyForAxis(
-const Reference< chart2::XAxis >& xAxis )
+const rtl::Reference< ::chart::Axis >& xAxis )
 {
 rtl::Reference< BaseCoordinateSystem > xCooSys(
 AxisHelper::getCoordinateSystemOfAxis(
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx 
b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
index 7a89fb7dd06d..505bc1e144e6 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
@@ -75,7 +75,7 @@ public:
 ExplicitIncrementData & rOutExplicitIncrement );
 
 sal_Int32 getExplicitNumberFormatKeyForAxis(
-const css::uno::Reference< css::chart2::XAxis >& xAxis );
+const rtl::Reference< ::chart::Axis >& xAxis );
 
 static sal_Int32 getExplicitNumberFormatKeyForSeries(
 const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
diff --git 
a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx 
b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
index ad8d1c942f4f..971e69a585e4 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
@@ -19,6 +19,7 @@
 
 #include "WrappedNumberFormatProperty.hxx"
 #include "Chart2ModelContact.hxx"
+#include 
 #include 
 #include 
 #include 
@@ -68,7 +69,8 @@ Any WrappedNumberFormatProperty::getPropertyValue( const 
Reference< beans::XProp
 nKey = Chart2ModelContact::getExplicitNumberFormatKeyForSeries( 
xSeries );
 else
 {
-Reference< chart2::XAxis > xAxis( xInnerPropertySet, 
uno::UNO_QUERY );
+rtl::Reference< Axis > xAxis = 
dynamic_cast(xInnerPropertySet.get());
+assert(xAxis || !xInnerPropertySet);
 nKey = m_spChart2ModelContact->getExplicitNumberFormatKeyForAxis( 
xAxis );
 }
 aRet <<= nKey;
diff --git a/chart2/source/controller/inc/AxisItemConverter.hxx 
b/chart2/source/controller/inc/AxisItemConverter.hxx
index cbb75d2a1db6..c9f3049356a0 100644
--- a/chart2/source/controller/inc/AxisItemConverter.hxx
+++ b/chart2/source/controller/inc/AxisItemConverter.hxx
@@ -27,6 +27,7 @@ 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; }
@@ -60,8 +61,7 @@ protected:
 
 private:
 std::vector< std::unique_ptr >  m_aConverters;
-css::uno::Reference<
-css::chart2::XAxis >  m_xAxis;
+rtl::Reference<::chart::Axis>  m_xAxis;
 
 rtl::Reference<::chart::ChartModel>m_xChartDoc;
 
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index 20ad1504f018..436e6e29b71e 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConvert

[Libreoffice-commits] core.git: chart2/source

2023-03-28 Thread Noel Grandin (via logerrit)
 chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx |3 
 chart2/source/inc/Diagram.hxx|2 
 chart2/source/inc/ThreeDHelper.hxx   |3 
 chart2/source/model/main/Diagram.cxx |   27 
 chart2/source/tools/ThreeDHelper.cxx |  101 ---
 5 files changed, 31 insertions(+), 105 deletions(-)

New commits:
commit ef1f51571654d6449c6ce2872a4bc2bc2475585d
Author: Noel Grandin 
AuthorDate: Tue Mar 28 13:51:47 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Mar 28 17:14:42 2023 +

move switchRightAngledAxes from ThreeDHelper to Diagram

so we can use the get/setFastPropertyValue methods

Change-Id: Id17fa2466f75a3b4530306143ce50f66fc5593b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149651
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx 
b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
index fb05bfde0dbf..138952775e1e 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
@@ -249,7 +249,8 @@ IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, 
RightAngledAxesToggled, weld::Togg
 m_xMFZRotation->set_value(m_nZRotation, FieldUnit::DEGREE);
 }
 
-ThreeDHelper::switchRightAngledAxes( m_xDiagram, 
m_xCbxRightAngledAxes->get_active() );
+if (m_xDiagram)
+m_xDiagram->switchRightAngledAxes( m_xCbxRightAngledAxes->get_active() 
);
 }
 
 } //namespace chart
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 2365d167c6a2..874e8e904e5d 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -350,6 +350,8 @@ public:
 
 void setDefaultRotation( bool bPieOrDonut );
 
+void switchRightAngledAxes( bool bRightAngledAxes );
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/ThreeDHelper.hxx 
b/chart2/source/inc/ThreeDHelper.hxx
index 1969b2305f6f..a8fc1d63fb40 100644
--- a/chart2/source/inc/ThreeDHelper.hxx
+++ b/chart2/source/inc/ThreeDHelper.hxx
@@ -59,9 +59,6 @@ public:
  */
 static css::drawing::CameraGeometry getDefaultCameraGeometry( bool 
bPie=false );
 
-static void switchRightAngledAxes( const rtl::Reference< Diagram >& 
xSceneProperties
-, bool bRightAngledAxes );
-
 static void adaptRadAnglesForRightAngledAxes( double& rfXAngleRad, double& 
rfYAngleRad );
 static double getXDegreeAngleLimitForRightAngledAxes() { return 90.0; }
 static double getYDegreeAngleLimitForRightAngledAxes() { return 45.0; }
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index 8cbdda41422a..1522d168c542 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -2231,6 +2231,33 @@ void Diagram::setDefaultRotation( bool bPieOrDonut )
 uno::Any( BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aSceneRotation 
)));
 }
 
+void Diagram::switchRightAngledAxes( bool bRightAngledAxes )
+{
+try
+{
+bool bOldRightAngledAxes = false;
+getFastPropertyValue( PROP_DIAGRAM_RIGHT_ANGLED_AXES ) >>= 
bOldRightAngledAxes; // "RightAngledAxes"
+if( bOldRightAngledAxes!=bRightAngledAxes)
+{
+setFastPropertyValue( PROP_DIAGRAM_RIGHT_ANGLED_AXES, uno::Any( 
bRightAngledAxes ));
+if(bRightAngledAxes)
+{
+::basegfx::B3DHomMatrix aInverseRotation( 
lcl_getInverseRotationMatrix( *this ) );
+lcl_rotateLights( aInverseRotation, *this );
+}
+else
+{
+::basegfx::B3DHomMatrix aCompleteRotation( 
lcl_getCompleteRotationMatrix( *this ) );
+lcl_rotateLights( aCompleteRotation, *this );
+}
+}
+}
+catch( const uno::Exception & )
+{
+DBG_UNHANDLED_EXCEPTION("chart2");
+}
+}
+
 } //  namespace chart
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
diff --git a/chart2/source/tools/ThreeDHelper.cxx 
b/chart2/source/tools/ThreeDHelper.cxx
index 13c4ca47af3b..5733c6f44ba2 100644
--- a/chart2/source/tools/ThreeDHelper.cxx
+++ b/chart2/source/tools/ThreeDHelper.cxx
@@ -65,77 +65,6 @@ bool lcl_isRightAngledAxesSetAndSupported( const 
rtl::Reference< Diagram >& xDia
 return false;
 }
 
-void lcl_RotateLightSource( const Reference< beans::XPropertySet >& 
xSceneProperties
-   , const OUString& rLightSourceDirection
-   , const OUString& rLightSourceOn
-   , const ::basegfx::B3DHomMatrix& rRotationMatrix )
-{
-if( !xSceneProperties.is() )
-return;
-
-bool bLightOn = false;
-if( !(xSceneProperties->getPropertyValue( rLightSourceOn ) >>= bLightOn) )
-return;
-
-if( bLightOn )
-{
-

[Libreoffice-commits] core.git: chart2/source

2023-03-28 Thread Noel Grandin (via logerrit)
 chart2/source/controller/main/ChartController_Tools.cxx |2 
 chart2/source/inc/Diagram.hxx   |2 
 chart2/source/inc/ThreeDHelper.hxx  |6 
 chart2/source/model/main/Diagram.cxx|  195 +---
 chart2/source/model/template/PieChartTypeTemplate.cxx   |4 
 chart2/source/tools/ThreeDHelper.cxx|   98 
 6 files changed, 123 insertions(+), 184 deletions(-)

New commits:
commit 8eb682f932d7feb1db2157e6d522126152de786c
Author: Noel Grandin 
AuthorDate: Tue Mar 28 13:09:53 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Mar 28 15:48:34 2023 +

move setDefaultRotation from ThreeDHelper to Diagram

so we can use the get/setFastPropertyValue methods

Change-Id: Id9470e5b878ed15e20ca285cacc36cd2e9511365
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149649
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/main/ChartController_Tools.cxx 
b/chart2/source/controller/main/ChartController_Tools.cxx
index 6240e241be8a..5fcfe2bd4550 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -199,7 +199,7 @@ void ChartController::executeDispatch_NewArrangement()
 xDiagram->setPropertyToDefault( "PosSizeExcludeAxes");
 
 // 3d rotation
-ThreeDHelper::set3DSettingsToDefault( xDiagram );
+xDiagram->set3DSettingsToDefault();
 
 // legend
 Reference< beans::XPropertyState > xLegendState( 
xDiagram->getLegend(), uno::UNO_QUERY );
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index c66fb139ec34..2365d167c6a2 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -348,6 +348,8 @@ public:
 ThreeDLookScheme detectScheme();
 void setScheme( ThreeDLookScheme aScheme );
 
+void setDefaultRotation( bool bPieOrDonut );
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/ThreeDHelper.hxx 
b/chart2/source/inc/ThreeDHelper.hxx
index 74063ab61f37..1969b2305f6f 100644
--- a/chart2/source/inc/ThreeDHelper.hxx
+++ b/chart2/source/inc/ThreeDHelper.hxx
@@ -82,12 +82,6 @@ public:
 static double CameraDistanceToPerspective( double fCameraDistance );
 static double PerspectiveToCameraDistance( double fPerspective );
 
-static void set3DSettingsToDefault( const rtl::Reference< ::chart::Diagram 
>& xSceneProperties );
-static void setDefaultRotation( const rtl::Reference< ::chart::Diagram >& 
xDiagram );
-static void setDefaultIllumination( const rtl::Reference< ::chart::Diagram 
>& xDiagram );
-
-static void setDefaultRotation( const css::uno::Reference< 
css::beans::XPropertySet >& xSceneProperties, bool bPieOrDonut );
-
 static CuboidPlanePosition 
getAutomaticCuboidPlanePositionForStandardLeftWall( const rtl::Reference<
 ::chart::Diagram >& xDiagram );
 static CuboidPlanePosition 
getAutomaticCuboidPlanePositionForStandardBackWall(const rtl::Reference<
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index a4af69b7e7bf..8cbdda41422a 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -445,17 +445,118 @@ void SAL_CALL Diagram::setTitleObject( const 
uno::Reference< chart2::XTitle >& x
 //  X3DDefaultSetter 
 void SAL_CALL Diagram::set3DSettingsToDefault()
 {
-ThreeDHelper::set3DSettingsToDefault( this );
+setPropertyToDefault( "D3DSceneDistance");
+setPropertyToDefault( "D3DSceneFocalLength");
+setDefaultRotation();
+setDefaultIllumination();
 }
 
 void SAL_CALL Diagram::setDefaultRotation()
 {
-ThreeDHelper::setDefaultRotation( this );
+bool bPieOrDonut( isPieOrDonutChart() );
+setDefaultRotation( bPieOrDonut );
+}
+
+static ::basegfx::B3DHomMatrix lcl_getCompleteRotationMatrix( Diagram& 
rDiagram )
+{
+::basegfx::B3DHomMatrix aCompleteRotation;
+double fXAngleRad=0.0;
+double fYAngleRad=0.0;
+double fZAngleRad=0.0;
+rDiagram.getRotationAngle( fXAngleRad, fYAngleRad, fZAngleRad );
+aCompleteRotation.rotate( fXAngleRad, fYAngleRad, fZAngleRad );
+return aCompleteRotation;
+}
+static void lcl_RotateLightSource( Diagram& rDiagram
+   , int nLightSourceDirectionProp
+   , int nLightSourceOnProp
+   , const ::basegfx::B3DHomMatrix& rRotationMatrix )
+{
+bool bLightOn = false;
+if( !(rDiagram.getFastPropertyValue( nLightSourceOnProp ) >>= bLightOn) )
+return;
+
+if( bLightOn )
+{
+drawing::Direction3D aLight;
+if( rDiagram.getFastPropertyValue( nLightSourceDirectionProp ) >>= 
aLight )
+{
+::basegfx::B3DVector aLightVector( 
BaseGFXHelper::Direction3DToB3DVector( aL

[Libreoffice-commits] core.git: chart2/source

2023-03-28 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx |4 
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx|2 
 chart2/source/controller/dialogs/DialogModel.cxx  |8 
 chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx|6 
 chart2/source/controller/dialogs/tp_ChartType.cxx |6 
 chart2/source/controller/sidebar/ChartTypePanel.cxx   |7 
 chart2/source/inc/Diagram.hxx |4 
 chart2/source/inc/ThreeDHelper.hxx|4 
 chart2/source/model/main/ChartModel_Persistence.cxx   |2 
 chart2/source/model/main/Diagram.cxx  |  235 
++
 chart2/source/tools/ThreeDHelper.cxx  |  189 

 11 files changed, 256 insertions(+), 211 deletions(-)

New commits:
commit b17a441912da448ca0c731a015f4221ae264d959
Author: Noel Grandin 
AuthorDate: Tue Mar 28 12:15:39 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Mar 28 13:28:10 2023 +

move get/setScheme from ThreeDHelper to Diagram

so we can use the get/setFastPropertyValue methods

Change-Id: I2b57212a1d3933cd2825e647f692e2ae3cb8b484
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149647
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index a2385ba897b7..d3fb9cdec6ce 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -1180,7 +1180,7 @@ uno::Reference< uno::XInterface > SAL_CALL 
ChartDocumentWrapper::createInstance(
 // locked controllers
 ControllerLockGuardUNO aCtrlLockGuard( xChartDoc );
 rtl::Reference< Diagram > xDiagram = 
ChartModelHelper::findDiagram( xChartDoc );
-ThreeDLookScheme e3DScheme = ThreeDHelper::detectScheme( 
xDiagram );
+ThreeDLookScheme e3DScheme = xDiagram->detectScheme();
 rtl::Reference< ::chart::ChartTypeManager > 
xTemplateManager = xChartDoc->getTypeManager();
 Diagram::tTemplateWithServiceName aTemplateWithService(
 xDiagram->getTemplate( xTemplateManager ));
@@ -1189,7 +1189,7 @@ uno::Reference< uno::XInterface > SAL_CALL 
ChartDocumentWrapper::createInstance(
 xTemplate->changeDiagram( xDiagram );
 if( AllSettings::GetMathLayoutRTL() )
 AxisHelper::setRTLAxisLayout( 
AxisHelper::getCoordinateSystemByIndex( xDiagram, 0 ) );
-ThreeDHelper::setScheme( xDiagram, e3DScheme );
+xDiagram->setScheme( e3DScheme );
 }
 else
 {
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx 
b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index d1c6a725decb..c3da09945ac3 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -323,7 +323,7 @@ void ChartTypeDialogController::commitToModel( const 
ChartTypeParameter& rParame
 if( AllSettings::GetMathLayoutRTL() )
 AxisHelper::setRTLAxisLayout( AxisHelper::getCoordinateSystemByIndex( 
xDiagram, 0 ) );
 if( rParameter.b3DLook )
-ThreeDHelper::setScheme( xDiagram, rParameter.eThreeDLookScheme );
+xDiagram->setScheme( rParameter.eThreeDLookScheme );
 
 if (xDiagram.is())
 {
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx 
b/chart2/source/controller/dialogs/DialogModel.cxx
index c9084ca8f518..032ec26dc912 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -548,7 +548,7 @@ rtl::Reference< ::chart::DataSeries > 
DialogModel::insertSeriesAfter(
 try
 {
 rtl::Reference< Diagram > xDiagram( 
m_xChartDocument->getFirstChartDiagram() );
-ThreeDLookScheme e3DScheme = ThreeDHelper::detectScheme( xDiagram );
+ThreeDLookScheme e3DScheme = xDiagram->detectScheme();
 
 sal_Int32 nSeriesInChartType = 0;
 const sal_Int32 nTotalSeries = countSeries();
@@ -571,7 +571,7 @@ rtl::Reference< ::chart::DataSeries > 
DialogModel::insertSeriesAfter(
 if( xNewSeries.is())
 addNewSeriesToContainer(xChartType, xSeries, xNewSeries);
 
-ThreeDHelper::setScheme( xDiagram, e3DScheme );
+xDiagram->setScheme( e3DScheme );
 }
 catch( const uno::Exception & )
 {
@@ -715,7 +715,7 @@ void DialogModel::setData(
 if( xInterpreter.is())
 {
 rtl::Reference< Diagram > xDiagram( 
m_xChartDocument->getFirstChartDiagram() );
-

[Libreoffice-commits] core.git: chart2/source

2023-03-28 Thread Noel Grandin (via logerrit)
 chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx   |4 
 chart2/source/controller/main/DragMethod_RotateDiagram.cxx |   19 
 chart2/source/inc/Diagram.hxx  |9 
 chart2/source/inc/ThreeDHelper.hxx |   16 
 chart2/source/model/main/Diagram.cxx   |  262 -
 chart2/source/tools/ThreeDHelper.cxx   |  209 --
 chart2/source/view/diagram/VDiagram.cxx|2 
 7 files changed, 289 insertions(+), 232 deletions(-)

New commits:
commit 5bcc7e6abfd8a0838f6f2c13b9e7040748913e28
Author: Noel Grandin 
AuthorDate: Tue Mar 28 09:10:59 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Mar 28 10:49:12 2023 +

move get/setRotation from ThreeDHelper to Diagram

so we can use the get/setFastPropertyValue methods

Change-Id: I147ed5c092b44283bfbbf4ea5a3145736417b92c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149642
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx 
b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
index 12e878d237ed..fb05bfde0dbf 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
@@ -69,7 +69,7 @@ 
ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage(weld::Container* pPar
 , 
m_xMFPerspective(m_xBuilder->weld_metric_spin_button("MTR_FLD_PERSPECTIVE", 
FieldUnit::PERCENT))
 {
 double fXAngle, fYAngle, fZAngle;
-ThreeDHelper::getRotationAngleFromDiagram( m_xDiagram, fXAngle, fYAngle, 
fZAngle );
+m_xDiagram->getRotationAngle( fXAngle, fYAngle, fZAngle );
 
 fXAngle = basegfx::rad2deg(fXAngle);
 fYAngle = basegfx::rad2deg(fYAngle);
@@ -159,7 +159,7 @@ void ThreeD_SceneGeometry_TabPage::applyAnglesToModel()
 fYAngle = basegfx::deg2rad(fYAngle);
 fZAngle = basegfx::deg2rad(fZAngle);
 
-ThreeDHelper::setRotationAngleToDiagram( m_xDiagram, fXAngle, fYAngle, 
fZAngle );
+m_xDiagram->setRotationAngle( fXAngle, fYAngle, fZAngle );
 
 m_bAngleChangePending = false;
 m_aAngleTimer.Stop();
diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx 
b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
index c4b2646e1fe8..1fcd94a58a2b 100644
--- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
+++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
@@ -77,11 +77,11 @@ DragMethod_RotateDiagram::DragMethod_RotateDiagram( 
DrawViewWrapper& rDrawViewWr
 if( !xDiagram.is() )
 return;
 
-ThreeDHelper::getRotationFromDiagram( xDiagram
-, m_nInitialHorizontalAngleDegree, m_nInitialVerticalAngleDegree );
+xDiagram->getRotation(
+m_nInitialHorizontalAngleDegree, m_nInitialVerticalAngleDegree );
 
-ThreeDHelper::getRotationAngleFromDiagram( xDiagram
-, m_fInitialXAngleRad, m_fInitialYAngleRad, m_fInitialZAngleRad );
+xDiagram->getRotationAngle(
+m_fInitialXAngleRad, m_fInitialYAngleRad, m_fInitialZAngleRad );
 
 if( ChartTypeHelper::isSupportingRightAngledAxes(
 xDiagram->getChartTypeByIndex( 0 ) ) )
@@ -160,13 +160,16 @@ bool DragMethod_RotateDiagram::EndSdrDrag(bool /*bCopy*/)
 if(m_bRightAngledAxes)
 ThreeDHelper::adaptRadAnglesForRightAngledAxes( fResultX, fResultY 
);
 
-ThreeDHelper::setRotationAngleToDiagram( 
ChartModelHelper::findDiagram( getChartModel() )
-, fResultX, fResultY, fResultZ );
+rtl::Reference xDiagram = ChartModelHelper::findDiagram( 
getChartModel() );
+if (xDiagram)
+xDiagram->setRotationAngle( fResultX, fResultY, fResultZ );
 }
 else
 {
-ThreeDHelper::setRotationToDiagram( ChartModelHelper::findDiagram( 
getChartModel() )
-, 
m_nInitialHorizontalAngleDegree+m_nAdditionalHorizontalAngleDegree, 
m_nInitialVerticalAngleDegree+m_nAdditionalVerticalAngleDegree );
+rtl::Reference xDiagram = ChartModelHelper::findDiagram( 
getChartModel() );
+if (xDiagram)
+xDiagram->setRotation(
+
m_nInitialHorizontalAngleDegree+m_nAdditionalHorizontalAngleDegree, 
m_nInitialVerticalAngleDegree+m_nAdditionalVerticalAngleDegree );
 }
 
 return true;
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index e39b7342e2dd..98f0e17ac82b 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -335,6 +335,15 @@ public:
 double getCameraDistance();
 void setCameraDistance( double fCameraDistance );
 
+void getRotation(
+sal_Int32& rnHorizontalAngleDegree, sal_Int32& 
rnVerticalAngleDegree );
+void setRotation(
+sal_Int32 nHorizontalAngleDegree, sal_Int32 nVerticalYAngleDegree 
);
+void getRotationAngle(
+double& rfXAngleRad, double& rfYAngleRad, double& rfZAngleRad );
+voi

[Libreoffice-commits] core.git: chart2/source

2023-03-28 Thread Noel Grandin (via logerrit)
 chart2/source/inc/Diagram.hxx   |3 +
 chart2/source/inc/ThreeDHelper.hxx  |5 ---
 chart2/source/model/main/Diagram.cxx|   50 ++-
 chart2/source/tools/ThreeDHelper.cxx|   51 
 chart2/source/view/diagram/VDiagram.cxx |2 -
 5 files changed, 52 insertions(+), 59 deletions(-)

New commits:
commit f81b47eb98eee8a2b2c027b91b8d7cea1179fad4
Author: Noel Grandin 
AuthorDate: Mon Mar 27 21:58:56 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Mar 28 07:25:03 2023 +

move get/setCameraDistance from ThreeDHelper to Diagram

so we can use the get/setFastPropertyValue methods

Change-Id: Ibce7c93f067468f2e88f196158dfcb80686d01c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149635
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index c157fe061399..e39b7342e2dd 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -332,6 +332,9 @@ public:
 std::vector >
 getAllRegressionCurvesNotMeanValueLine();
 
+double getCameraDistance();
+void setCameraDistance( double fCameraDistance );
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/ThreeDHelper.hxx 
b/chart2/source/inc/ThreeDHelper.hxx
index b5edf986c26d..8bcb4183ebea 100644
--- a/chart2/source/inc/ThreeDHelper.hxx
+++ b/chart2/source/inc/ThreeDHelper.hxx
@@ -90,11 +90,6 @@ public:
 sal_Int32& rnElevationDeg, sal_Int32& rnRotationDeg
 , double fXRad, double fYRad, double fZRad );
 
-static double getCameraDistance(
-const css::uno::Reference< css::beans::XPropertySet >& 
xSceneProperties );
-static void setCameraDistance(
-const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties
-, double fCameraDistance );
 SAL_DLLPRIVATE static void ensureCameraDistanceRange( double& 
rfCameraDistance );
 SAL_DLLPRIVATE static void getCameraDistanceRange( double& 
rfMinimumDistance, double& rfMaximumDistance );
 
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index 507cf7e895d7..a6c07f84163e 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -41,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -617,7 +619,7 @@ void SAL_CALL Diagram::setFastPropertyValue( sal_Int32 
nHandle, const Any& rValu
 {
 sal_Int32 fPerspective = 20;
 if( rValue >>=fPerspective )
-ThreeDHelper::setCameraDistance( this, 
ThreeDHelper::PerspectiveToCameraDistance( fPerspective ) );
+setCameraDistance( ThreeDHelper::PerspectiveToCameraDistance( 
fPerspective ) );
 }
 else if( nHandle == PROP_DIAGRAM_ROTATION_HORIZONTAL
 || nHandle == PROP_DIAGRAM_ROTATION_VERTICAL )
@@ -644,7 +646,7 @@ void SAL_CALL Diagram::getFastPropertyValue( Any& rValue, 
sal_Int32 nHandle ) co
 if( nHandle == PROP_DIAGRAM_PERSPECTIVE )
 {
 sal_Int32 nPerspective = ::basegfx::fround( 
ThreeDHelper::CameraDistanceToPerspective(
-ThreeDHelper::getCameraDistance( const_cast< Diagram* >( this ) ) 
) );
+const_cast< Diagram* >( this )->getCameraDistance() ) );
 rValue <<= nPerspective;
 }
 else if( nHandle == PROP_DIAGRAM_ROTATION_HORIZONTAL
@@ -1661,6 +1663,50 @@ std::vector< rtl::Reference< RegressionCurveModel > >
 return aResult;
 }
 
+double Diagram::getCameraDistance()
+{
+double fCameraDistance = FIXED_SIZE_FOR_3D_CHART_VOLUME;
+
+try
+{
+drawing::CameraGeometry aCG( ThreeDHelper::getDefaultCameraGeometry() 
);
+getFastPropertyValue( SceneProperties::PROP_SCENE_CAMERA_GEOMETRY ) 
>>= aCG;
+::basegfx::B3DVector aVRP( BaseGFXHelper::Position3DToB3DVector( 
aCG.vrp ) );
+fCameraDistance = aVRP.getLength();
+
+ThreeDHelper::ensureCameraDistanceRange( fCameraDistance );
+}
+catch( const uno::Exception & )
+{
+DBG_UNHANDLED_EXCEPTION("chart2");
+}
+return fCameraDistance;
+}
+
+void Diagram::setCameraDistance(double fCameraDistance )
+{
+try
+{
+if( fCameraDistance <= 0 )
+fCameraDistance = FIXED_SIZE_FOR_3D_CHART_VOLUME;
+
+drawing::CameraGeometry aCG( ThreeDHelper::getDefaultCameraGeometry() 
);
+getFastPropertyValue( SceneProperties::PROP_SCENE_CAMERA_GEOMETRY ) 
>>= aCG;
+::basegfx::B3DVector aVRP( BaseGFXHelper::Position3DToB3DVector( 
aCG.vrp ) );
+if( ::basegfx::fTools::equalZero( aVRP.getLength() ) )
+aVRP = ::basegfx::B3DVector(0,0,1);
+aVRP.setLength(fCameraDistance);
+aCG.vrp = BaseGFXHelper::B3DVectorToPosition3D( aVRP );
+
+setFastPropertyValue( SceneP

[Libreoffice-commits] core.git: chart2/source codemaker/source comphelper/source configmgr/source connectivity/source cppuhelper/source cppu/source cui/source

2023-03-24 Thread Noel Grandin (via logerrit)
 chart2/source/tools/ObjectIdentifier.cxx  |   13 +--
 chart2/source/tools/StatisticsHelper.cxx  |3 
 codemaker/source/codemaker/global.cxx |3 
 comphelper/source/misc/AccessibleImplementationHelper.cxx |3 
 comphelper/source/misc/diagnose_ex.cxx|6 -
 comphelper/source/property/property.cxx   |   20 +++---
 configmgr/source/data.cxx |5 -
 connectivity/source/commontools/DateConversion.cxx|   18 ++---
 connectivity/source/commontools/TIndexes.cxx  |   12 +--
 connectivity/source/commontools/TKeys.cxx |   26 
+++
 connectivity/source/commontools/dbtools.cxx   |5 -
 connectivity/source/commontools/dbtools2.cxx  |   29 
+++-
 connectivity/source/commontools/parameters.cxx|8 --
 connectivity/source/drivers/firebird/Connection.cxx   |   24 
+++
 connectivity/source/drivers/firebird/Tables.cxx   |   19 ++---
 connectivity/source/drivers/firebird/Util.cxx |4 -
 connectivity/source/drivers/hsqldb/HConnection.cxx|3 
 connectivity/source/drivers/hsqldb/HDriver.cxx|3 
 connectivity/source/drivers/hsqldb/HView.cxx  |4 -
 connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx|   12 ---
 connectivity/source/drivers/odbc/OStatement.cxx   |4 -
 connectivity/source/drivers/postgresql/pq_databasemetadata.cxx|3 
 connectivity/source/drivers/postgresql/pq_preparedstatement.cxx   |7 --
 connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx   |3 
 connectivity/source/drivers/postgresql/pq_statement.cxx   |   14 +---
 connectivity/source/drivers/postgresql/pq_tools.cxx   |   14 +---
 connectivity/source/drivers/postgresql/pq_updateableresultset.cxx |8 +-
 connectivity/source/drivers/postgresql/pq_xcolumns.cxx|3 
 cppu/source/uno/lbenv.cxx |   30 
+++--
 cppu/source/uno/lbmap.cxx |   33 
--
 cppuhelper/source/servicemanager.cxx  |6 -
 cui/source/dialogs/FontFeaturesDialog.cxx |5 -
 32 files changed, 147 insertions(+), 203 deletions(-)

New commits:
commit 637cceeefba0b0e2e09ac734bb0327364e8ddd25
Author: Noel Grandin 
AuthorDate: Fri Mar 24 10:09:16 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 24 15:29:18 2023 +

loplugin:stringadd in c*

after my patch to merge the bufferadd loplugin into stringadd

Change-Id: I66f4ce2fd87c1e12eefb14406e0e17212f68ceff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149497
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/tools/ObjectIdentifier.cxx 
b/chart2/source/tools/ObjectIdentifier.cxx
index 587aace2f3d8..883c115126cb 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -90,15 +90,13 @@ OUString lcl_createClassificationStringForType( ObjectType 
eObjectType
 {
 if( !aRet.isEmpty() )
 aRet.append(":");
-aRet.append( m_aDragMethodEquals );
-aRet.append( rDragMethodServiceName );
+aRet.append( OUString::Concat(m_aDragMethodEquals) + 
rDragMethodServiceName );
 
 if( !rDragParameterString.empty() )
 {
 if( !aRet.isEmpty() )
 aRet.append(":");
-aRet.append( m_aDragParameterEquals );
-aRet.append( rDragParameterString );
+aRet.append( OUString::Concat(m_aDragParameterEquals) + 
rDragParameterString );
 }
 }
 return aRet.makeStringAndClear();
@@ -584,9 +582,7 @@ OUString 
ObjectIdentifier::createClassifiedIdentifierWithParent(
 if(!rParentPartical.empty())
 aRet.append(":");
 
-aRet.append(getStringForType( eObjectType ));
-aRet.append("=");
-aRet.append(rParticleID);
+aRet.append(getStringForType( eObjectType ) + "=" + rParticleID);
 
 return aRet.makeStringAndClear();
 }
@@ -1014,8 +1010,7 @@ OUString ObjectIdentifier::createChildParticleWithIndex( 
ObjectType eObjectType,
 OUStringBuffer aRet( getStringForType( eObjectType ) );
 if( !aRet.isEmpty() )
 {
-aRet.append("=");
-aRet.append(nIndex);
+aRet.append("=" + OUString::number(nIndex));
 }
 return aRet.makeStringAndClear();
 }
diff --git a/chart2/source/tools/StatisticsHelper.cxx 
b/chart2/source/tools/StatisticsHelper.cxx
index e97475915705..1336f471432c 100644
--- a/chart2/source/tools/StatisticsHelper.cxx
+++ b/chart2/source/tools/StatisticsHelper.cxx
@@ -82,8 +82,7 @@ uno::Reference< chart2::data::XLabe

[Libreoffice-commits] core.git: chart2/source

2023-03-22 Thread Noel Grandin (via logerrit)
 chart2/source/model/main/Axis.cxx |  132 --
 chart2/source/model/main/BaseCoordinateSystem.cxx |   71 +++
 chart2/source/model/main/DataPoint.cxx|   54 ++---
 chart2/source/model/main/DataSeries.cxx   |   64 +-
 chart2/source/model/main/DataTable.cxx|   69 ++-
 chart2/source/model/main/FormattedString.cxx  |   68 +++
 chart2/source/model/main/GridProperties.cxx   |   89 --
 chart2/source/model/main/Legend.cxx   |  112 ++
 chart2/source/model/main/PageBackground.cxx   |   93 +--
 chart2/source/model/main/StockBar.cxx |   87 --
 chart2/source/model/main/Title.cxx|  128 -
 chart2/source/model/main/Wall.cxx |   93 ---
 12 files changed, 361 insertions(+), 699 deletions(-)

New commits:
commit b2db6b7586b4e7b7e2c175dbc93fd0ace1cddd97
Author: Noel Grandin 
AuthorDate: Wed Mar 22 19:49:10 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 23 06:12:09 2023 +

rtl::Static-> thread-safe-static in chart2

Change-Id: Ie1379a1d40a6d65b28fd94ed114853e399fea5f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149339
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/model/main/Axis.cxx 
b/chart2/source/model/main/Axis.cxx
index f00455f51c4f..923eaf0416d0 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -206,88 +206,56 @@ void lcl_AddPropertiesToVector(
 
 }
 
-struct StaticAxisDefaults_Initializer
+const ::chart::tPropertyValueMap &  StaticAxisDefaults()
 {
-::chart::tPropertyValueMap* operator()()
-{
-static ::chart::tPropertyValueMap aStaticDefaults;
-lcl_AddDefaultsToMap( aStaticDefaults );
-return &aStaticDefaults;
-}
-private:
-static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
-{
-::chart::CharacterProperties::AddDefaultsToMap( rOutMap );
-::chart::LinePropertiesHelper::AddDefaultsToMap( rOutMap );
-
-::chart::PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_AXIS_SHOW, true );
-::chart::PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_AXIS_CROSSOVER_POSITION, css::chart::ChartAxisPosition_ZERO );
-::chart::PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_AXIS_DISPLAY_LABELS, true );
-::chart::PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_AXIS_LINK_NUMBERFORMAT_TO_SOURCE, true );
-::chart::PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_AXIS_LABEL_POSITION, css::chart::ChartAxisLabelPosition_NEAR_AXIS );
-::chart::PropertyHelper::setPropertyValueDefault< double >( rOutMap, 
PROP_AXIS_TEXT_ROTATION, 0.0 );
-::chart::PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_AXIS_TEXT_BREAK, false );
-::chart::PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_AXIS_TEXT_OVERLAP, false );
-::chart::PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_AXIS_TEXT_STACKED, false );
-::chart::PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_AXIS_TEXT_ARRANGE_ORDER, css::chart::ChartAxisArrangeOrderType_AUTO );
-
-float fDefaultCharHeight = 10.0;
-::chart::PropertyHelper::setPropertyValue( rOutMap, 
::chart::CharacterProperties::PROP_CHAR_CHAR_HEIGHT, fDefaultCharHeight );
-::chart::PropertyHelper::setPropertyValue( rOutMap, 
::chart::CharacterProperties::PROP_CHAR_ASIAN_CHAR_HEIGHT, fDefaultCharHeight );
-::chart::PropertyHelper::setPropertyValue( rOutMap, 
::chart::CharacterProperties::PROP_CHAR_COMPLEX_CHAR_HEIGHT, fDefaultCharHeight 
);
-
-::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( 
rOutMap, PROP_AXIS_MAJOR_TICKMARKS, 2 /* CHAXIS_MARK_OUTER */ );
-::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( 
rOutMap, PROP_AXIS_MINOR_TICKMARKS, 0 /* CHAXIS_MARK_NONE */ );
-::chart::PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_AXIS_MARK_POSITION, css::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS );
-::chart::PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_AXIS_DISPLAY_UNITS, false );
-::chart::PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_AXIS_TRY_STAGGERING_FIRST, false );
-}
-};
-
-struct StaticAxisDefaults : public rtl::StaticAggregate< 
::chart::tPropertyValueMap, StaticAxisDefaults_Initializer >
-{
-};
-
-struct StaticAxisInfoHelper_Initializer
-{
-::cppu::OPropertyArrayHelper* operator()()
-{
-static ::cppu::OPropertyArrayHelper aPropHelper( 
lcl_GetPropertySequence() );
-return &aPropHelper;
-}
-
-private:
-static Sequence< Property > lcl_GetPropertySequence()
-{
-std::vector< css::beans::Property > aProperties;
-lcl_AddPropertiesToVector( aProperties );
-::chart::

[Libreoffice-commits] core.git: chart2/source

2023-03-21 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx|2 
 chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx   |2 
 chart2/source/controller/inc/SeriesOptionsItemConverter.hxx|3 -
 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx |4 +
 chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx |   13 
++
 chart2/source/inc/ChartModelHelper.hxx |5 
--
 chart2/source/inc/Diagram.hxx  |7 
---
 chart2/source/inc/RegressionCurveHelper.hxx|2 
 chart2/source/model/main/Diagram.cxx   |   21 
--
 chart2/source/tools/ChartModelHelper.cxx   |8 
---
 chart2/source/tools/RegressionCurveHelper.cxx  |4 -
 11 files changed, 19 insertions(+), 52 deletions(-)

New commits:
commit 949c73f9c35d640c841f03d505e905aa2e1b7a3f
Author: Noel Grandin 
AuthorDate: Thu Mar 16 11:37:03 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 22 05:57:16 2023 +

use more concrete types in chart2

Change-Id: I70042284e4549b3eef67866a35741b06305d720f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149229
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git 
a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index 8961c2731f71..6c0dbe7bce25 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -318,7 +318,7 @@ Any WrappedAttachedAxisProperty::getPropertyValue( const 
Reference< beans::XProp
 
 void WrappedAttachedAxisProperty::setPropertyValue( const Any& rOuterValue, 
const Reference< beans::XPropertySet >& xInnerPropertySet ) const
 {
-uno::Reference< chart2::XDataSeries > xDataSeries( xInnerPropertySet, 
uno::UNO_QUERY );
+rtl::Reference< ::chart::DataSeries > xDataSeries( 
dynamic_cast<::chart::DataSeries*>(xInnerPropertySet.get()) );
 
 sal_Int32 nChartAxisAssign = css::chart::ChartAxisAssign::PRIMARY_Y;
 if( ! (rOuterValue >>= nChartAxisAssign) )
diff --git 
a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx 
b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index 50d4b2c0edd2..79c45ea1d888 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -286,7 +286,7 @@ beans::PropertyState 
WrappedSymbolTypeProperty::getPropertyState( const Referenc
 m_spChart2ModelContact)
 {
 rtl::Reference< ::chart::Diagram > xDiagram( 
m_spChart2ModelContact->getDiagram() );
-Reference< chart2::XDataSeries > xSeries( xInnerPropertyState, 
uno::UNO_QUERY );
+rtl::Reference< ::chart::DataSeries > xSeries( 
dynamic_cast(xInnerPropertyState.get()) );
 rtl::Reference< ChartType > xChartType( 
xDiagram->getChartTypeOfSeries( xSeries ) );
 if( ChartTypeHelper::isSupportingSymbolProperties( xChartType, 2 ) )
 return beans::PropertyState_DIRECT_VALUE;
diff --git a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx 
b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
index 886e6ec91b83..b55457ac5b30 100644
--- a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
+++ b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
@@ -27,6 +27,7 @@ namespace com::sun::star::frame { class XModel; }
 namespace com::sun::star::uno { class XComponentContext; }
 namespace chart { class ChartModel; }
 namespace chart { class BaseCoordinateSystem; }
+namespace chart { class DataSeries; }
 
 namespace chart::wrapper
 {
@@ -37,7 +38,7 @@ public:
 SeriesOptionsItemConverter(
 const rtl::Reference<::chart::ChartModel> & xChartModel,
 css::uno::Reference< css::uno::XComponentContext > xContext,
-const css::uno::Reference< css::beans::XPropertySet > & rPropertySet,
+const rtl::Reference<::chart::DataSeries> & rPropertySet,
 SfxItemPool& rItemPool );
 virtual ~SeriesOptionsItemConverter() override;
 
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index f415cd194386..e71646cf7a8f 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -234,8 +234,10 @@ DataPointItemConverter::DataPointItemConverter(
 m_aConverters.emplace_back( new 
CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, 
"ReferencePageSize"));
 if( bDataSeries )
 {
+assert(dynamic_cast(rPropertySet.get()));
 m_aConverters.emplace_back( new Sta

[Libreoffice-commits] core.git: chart2/source

2023-03-21 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx   |4 -
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx |   12 +--
 chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx |   12 +--
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx  |4 -
 chart2/source/controller/dialogs/DataBrowserModel.cxx   |4 -
 chart2/source/controller/dialogs/dlg_DataSource.cxx |6 -
 chart2/source/controller/dialogs/tp_ChartType.cxx   |4 -
 chart2/source/controller/sidebar/ChartTypePanel.cxx |   10 +-
 chart2/source/inc/Diagram.hxx   |   18 
 chart2/source/inc/DiagramHelper.hxx |   17 
 chart2/source/model/main/ChartModel_Persistence.cxx |2 
 chart2/source/model/main/Diagram.cxx|   39 
+-
 chart2/source/tools/DiagramHelper.cxx   |   38 
-
 13 files changed, 85 insertions(+), 85 deletions(-)

New commits:
commit cde0f27c84599d0d9894148e510254749f7e2784
Author: Noel Grandin 
AuthorDate: Thu Mar 16 09:38:50 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Mar 21 14:24:53 2023 +

move getTemplate inside chart2::Diagram

Change-Id: I05da4e4a9acb2683633eda42cf18d740913c2e37
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149180
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 5ce060e9891f..fbb12b5d4a51 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -1192,8 +1192,8 @@ uno::Reference< uno::XInterface > SAL_CALL 
ChartDocumentWrapper::createInstance(
 rtl::Reference< Diagram > xDiagram = 
ChartModelHelper::findDiagram( xChartDoc );
 ThreeDLookScheme e3DScheme = ThreeDHelper::detectScheme( 
xDiagram );
 rtl::Reference< ::chart::ChartTypeManager > 
xTemplateManager = xChartDoc->getTypeManager();
-DiagramHelper::tTemplateWithServiceName 
aTemplateWithService(
-DiagramHelper::getTemplateForDiagram( xDiagram, 
xTemplateManager ));
+Diagram::tTemplateWithServiceName aTemplateWithService(
+xDiagram->getTemplate( xTemplateManager ));
 if( aTemplateWithService.xChartTypeTemplate.is())
 aTemplateWithService.xChartTypeTemplate->resetStyles2( 
xDiagram );//#i109371#
 xTemplate->changeDiagram( xDiagram );
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 7cc7c57e2862..8ef1429d7565 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -588,8 +588,8 @@ OUString SAL_CALL DiagramWrapper::getDiagramType()
 }
 
 rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = 
xChartDoc->getTypeManager();
-DiagramHelper::tTemplateWithServiceName aTemplateAndService =
-DiagramHelper::getTemplateForDiagram( xDiagram, xChartTypeManager 
);
+Diagram::tTemplateWithServiceName aTemplateAndService =
+xDiagram->getTemplate( xChartTypeManager );
 
 aRet = lcl_getDiagramType( aTemplateAndService.sServiceName );
 }
@@ -1455,8 +1455,8 @@ bool WrappedNumberOfLinesProperty::detectInnerValue( 
uno::Any& rInnerValue ) con
 if( !aSeriesVector.empty() )
 {
 rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = 
xChartDoc->getTypeManager();
-DiagramHelper::tTemplateWithServiceName aTemplateAndService =
-DiagramHelper::getTemplateForDiagram( xDiagram, 
xChartTypeManager );
+Diagram::tTemplateWithServiceName aTemplateAndService =
+xDiagram->getTemplate( xChartTypeManager );
 if( aTemplateAndService.sServiceName == 
"com.sun.star.chart2.template.ColumnWithLine" )
 {
 try
@@ -1494,8 +1494,8 @@ void WrappedNumberOfLinesProperty::setPropertyValue( 
const Any& rOuterValue, con
 return;
 
 rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = 
xChartDoc->getTypeManager();
-DiagramHelper::tTemplateWithServiceName aTemplateAndService =
-DiagramHelper::getTemplateForDiagram( xDiagram, xChartTypeManager 
);
+Diagram::tTemplateWithServiceName aTemplateAndService =
+xDiagram->getTemplate( xChartTypeManager );
 
 rtl::Reference< ChartTypeTemplate > xTemplate;
 if( aTemplateAndService.sServiceName == 
"com.sun.star.chart2.template.Colu

[Libreoffice-commits] core.git: chart2/source

2023-03-21 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx|6 
 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx |2 
 chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx |2 
 chart2/source/inc/Diagram.hxx  |   15 +
 chart2/source/inc/DiagramHelper.hxx|   16 -
 chart2/source/model/main/Diagram.cxx   |   85 
+
 chart2/source/model/template/BarChartTypeTemplate.cxx  |6 
 chart2/source/model/template/StockChartTypeTemplate.cxx|2 
 chart2/source/tools/DiagramHelper.cxx  |   94 
--
 chart2/source/tools/TitleHelper.cxx|4 
 chart2/source/view/main/ChartView.cxx  |4 
 11 files changed, 113 insertions(+), 123 deletions(-)

New commits:
commit df12a23157f4515ba5e78c0bd293dfd1609de668
Author: Noel Grandin 
AuthorDate: Thu Mar 16 09:32:07 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Mar 21 08:44:53 2023 +

move getVertical/setVertical inside chart2::Diagram

Change-Id: Ide512e20fea94b1d7d038290d1c833f1d8cf42ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149164
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 657751ed3c23..7cc7c57e2862 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1385,9 +1385,9 @@ void WrappedVerticalProperty::setPropertyValue( const 
Any& rOuterValue, const Re
 
 bool bFound = false;
 bool bAmbiguous = false;
-bool bOldVertical = DiagramHelper::getVertical( xDiagram, bFound, 
bAmbiguous );
+bool bOldVertical = xDiagram->getVertical( bFound, bAmbiguous );
 if( bFound && ( bOldVertical != bNewVertical || bAmbiguous ) )
-DiagramHelper::setVertical( xDiagram, bNewVertical );
+xDiagram->setVertical( bNewVertical );
 }
 
 Any WrappedVerticalProperty::getPropertyValue( const Reference< 
beans::XPropertySet >& /*xInnerPropertySet*/ ) const
@@ -1397,7 +1397,7 @@ Any WrappedVerticalProperty::getPropertyValue( const 
Reference< beans::XProperty
 {
 bool bFound = false;
 bool bAmbiguous = false;
-bool bVertical = DiagramHelper::getVertical( xDiagram, bFound, 
bAmbiguous );
+bool bVertical = xDiagram->getVertical( bFound, bAmbiguous );
 if( bFound )
 m_aOuterValue <<= bVertical;
 }
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index b0155174cd94..f415cd194386 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -242,7 +242,7 @@ DataPointItemConverter::DataPointItemConverter(
 rtl::Reference< ChartType > xChartType( xDiagram->getChartTypeOfSeries( 
xSeries ) );
 bool bFound = false;
 bool bAmbiguous = false;
-bool bSwapXAndY = DiagramHelper::getVertical( xDiagram, bFound, bAmbiguous 
);
+bool bSwapXAndY = xDiagram->getVertical( bFound, bAmbiguous );
 m_aAvailableLabelPlacements = 
ChartTypeHelper::getSupportedLabelPlacements( xChartType, bSwapXAndY, xSeries );
 
 m_bForbidPercentValue = ChartTypeHelper::getAxisType( xChartType, 0 ) != 
AxisType::CATEGORY;
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
index 929f1c7c48b9..b4097d21da41 100644
--- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
@@ -215,7 +215,7 @@ TextLabelItemConverter::TextLabelItemConverter(
 rtl::Reference< ChartType > 
xChartType(xDiagram->getChartTypeOfSeries(xSeries));
 bool bFound = false;
 bool bAmbiguous = false;
-bool bSwapXAndY = DiagramHelper::getVertical(xDiagram, bFound, bAmbiguous);
+bool bSwapXAndY = xDiagram->getVertical(bFound, bAmbiguous);
 maAvailableLabelPlacements = 
ChartTypeHelper::getSupportedLabelPlacements(xChartType, bSwapXAndY, xSeries);
 
 mbForbidPercentValue = ChartTypeHelper::getAxisType(xChartType, 0) != 
AxisType::CATEGORY;
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 9ff0f94bb020..c24d10af9d83 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -300,6 +300,21 @@ public:
  */
 void setStackMode(StackMode eStackMode);
 
+
+/** Sets the "SwapXAndYAxis" property at all coordinate systems found in 
the
+given diagram.
+
+"vertical==true" for bar charts, "vertical==false" for column charts
+ */
+void setVer

[Libreoffice-commits] core.git: chart2/source

2023-03-20 Thread Stephan Bergmann (via logerrit)
 chart2/source/inc/Diagram.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 28fba1a4002cefb6d77f0b682f1d632e18c0967d
Author: Stephan Bergmann 
AuthorDate: Mon Mar 20 11:50:37 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Mar 20 14:53:38 2023 +

Don't let workaround for old GCC affect Clang

(which defines __GNUC__ as 4)

Change-Id: I5cf79ed9194150b13e480c91289c42e7bfeed31c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149152
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index ee003e1af778..5e4bc2ed1c62 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -68,7 +68,7 @@ typedef ::cppu::WeakImplHelper<
 }
 
 class OOO_DLLPUBLIC_CHARTTOOLS Diagram
-#if !defined __GNUC__ || __GNUC__ >= 12
+#if !defined __GNUC__ || __GNUC__ >= 12 || defined __clang__
 final
 #endif
 : public impl::Diagram_Base


[Libreoffice-commits] core.git: chart2/source

2023-03-20 Thread Noel Grandin (via logerrit)
 chart2/source/inc/Diagram.hxx |7 +++
 chart2/source/inc/DiagramHelper.hxx   |8 
 chart2/source/model/main/Diagram.cxx  |   24 
 chart2/source/tools/DiagramHelper.cxx |   32 +---
 4 files changed, 32 insertions(+), 39 deletions(-)

New commits:
commit 369b241a7dd30e5102306273263cc92f613e12b4
Author: Noel Grandin 
AuthorDate: Thu Mar 16 09:13:23 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Mar 20 13:07:47 2023 +

move replaceCoordinateSystem inside chart2::Diagram

Change-Id: I49d70e40bd06bb1522ee98185fb0404aede1e7fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149136
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 234868c3ec27..ee003e1af778 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -266,6 +266,13 @@ public:
 const css::uno::Reference< css::uno::XComponentContext > & xContext,
 bool bAdaptAxes=true );
 
+/** Replaces all occurrences of xCooSysToReplace in the tree with
+xReplacement in the diagram's tree
+ */
+SAL_DLLPRIVATE void replaceCoordinateSystem(
+const rtl::Reference< ::chart::BaseCoordinateSystem > & 
xCooSysToReplace,
+const rtl::Reference< ::chart::BaseCoordinateSystem > & xReplacement );
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/DiagramHelper.hxx 
b/chart2/source/inc/DiagramHelper.hxx
index e041e49bca52..5ec3998f1f3e 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -136,14 +136,6 @@ public:
 const rtl::Reference< ::chart::Diagram > & xDiagram,
 sal_Int32 nNewDimensionCount );
 
-/** Replaces all occurrences of xCooSysToReplace in the tree with
-xReplacement in the diagram's tree
- */
-SAL_DLLPRIVATE static void replaceCoordinateSystem(
-const rtl::Reference< ::chart::Diagram > & xDiagram,
-const rtl::Reference< ::chart::BaseCoordinateSystem > & 
xCooSysToReplace,
-const rtl::Reference< ::chart::BaseCoordinateSystem > & xReplacement );
-
 static bool isSeriesAttachedToMainAxis(
 const css::uno::Reference< css::chart2::XDataSeries >& xDataSeries );
 
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index 73fb2b381e29..b3670bc37ee6 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -1342,6 +1342,30 @@ bool Diagram::attachSeriesToAxis( bool bAttachToMainAxis
 return bChanged;
 }
 
+void Diagram::replaceCoordinateSystem(
+const rtl::Reference< BaseCoordinateSystem > & xCooSysToReplace,
+const rtl::Reference< BaseCoordinateSystem > & xReplacement )
+{
+// update the coordinate-system container
+try
+{
+uno::Reference< chart2::data::XLabeledDataSequence > xCategories = 
getCategories();
+
+// move chart types of xCooSysToReplace to xReplacement
+xReplacement->setChartTypes( xCooSysToReplace->getChartTypes());
+
+removeCoordinateSystem( xCooSysToReplace );
+addCoordinateSystem( xReplacement );
+
+if( xCategories.is() )
+setCategories( xCategories );
+}
+catch( const uno::Exception & )
+{
+DBG_UNHANDLED_EXCEPTION("chart2");
+}
+}
+
 } //  namespace chart
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
diff --git a/chart2/source/tools/DiagramHelper.cxx 
b/chart2/source/tools/DiagramHelper.cxx
index b43afae2aac5..f90da4a02428 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -454,7 +454,7 @@ void DiagramHelper::setDimension(
 }
 
 // replace the old coordinate system at all places where it was 
used
-DiagramHelper::replaceCoordinateSystem( xDiagram, xOldCooSys, 
xNewCooSys );
+xDiagram->replaceCoordinateSystem( xOldCooSys, xNewCooSys );
 }
 
 //correct stack mode if necessary
@@ -469,36 +469,6 @@ void DiagramHelper::setDimension(
 }
 }
 
-void DiagramHelper::replaceCoordinateSystem(
-const rtl::Reference< Diagram > & xDiagram,
-const rtl::Reference< BaseCoordinateSystem > & xCooSysToReplace,
-const rtl::Reference< BaseCoordinateSystem > & xReplacement )
-{
-OSL_ASSERT( xDiagram.is());
-if( ! xDiagram.is())
-return;
-
-// update the coordinate-system container
-
-try
-{
-uno::Reference< chart2::data::XLabeledDataSequence > xCategories = 
xDiagram->getCategories();
-
-// move chart types of xCooSysToReplace to xReplacement
-xReplacement->setChartTypes( xCooSysToReplace->getChartTypes());
-
-xDiagram->removeCoordinateSystem( xCooSysToReplace );
-xDiagram->addCoordinateSystem( xReplacement );
-
-if( xCategories.is() )
-  

[Libreoffice-commits] core.git: chart2/source

2023-03-20 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx|2 
 chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx |4 
 chart2/source/controller/sidebar/ChartSeriesPanel.cxx  |2 
 chart2/source/inc/Diagram.hxx  |5 +
 chart2/source/inc/DiagramHelper.hxx|6 -
 chart2/source/model/main/Diagram.cxx   |   42 
+
 chart2/source/tools/DiagramHelper.cxx  |   43 
--
 7 files changed, 51 insertions(+), 53 deletions(-)

New commits:
commit 514d2c7d20b3d63fc753918e4013eec71d2b342e
Author: Noel Grandin 
AuthorDate: Thu Mar 16 09:04:28 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Mar 20 10:50:47 2023 +

move attachSeriesToAxis inside chart2::Diagram

Change-Id: I3559fe9b9f0830c32a44c23b0b4d1a3683bafbd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149135
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git 
a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index 4466b78cee82..6edc2732f2b3 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -331,7 +331,7 @@ void WrappedAttachedAxisProperty::setPropertyValue( const 
Any& rOuterValue, cons
 {
 rtl::Reference< ::chart::Diagram > xDiagram( 
m_spChart2ModelContact->getDiagram() );
 if( xDiagram.is() )
-::chart::DiagramHelper::attachSeriesToAxis( 
bNewAttachedToMainAxis, xDataSeries, xDiagram, 
m_spChart2ModelContact->m_xContext, false );
+xDiagram->attachSeriesToAxis( bNewAttachedToMainAxis, xDataSeries, 
m_spChart2ModelContact->m_xContext, false );
 }
 }
 
diff --git 
a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index 90adfba537cc..3823d1577ed9 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -184,8 +184,8 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( 
sal_uInt16 nWhichId, const Sf
 if( bAttachToMainAxis != m_bAttachToMainAxis )
 {
 //change model:
-bChanged = DiagramHelper::attachSeriesToAxis( 
bAttachToMainAxis, uno::Reference< XDataSeries >::query( GetPropertySet() )
-, ChartModelHelper::findDiagram(m_xChartModel), m_xCC );
+bChanged = 
ChartModelHelper::findDiagram(m_xChartModel)->attachSeriesToAxis( 
bAttachToMainAxis, uno::Reference< XDataSeries >::query( GetPropertySet() )
+, m_xCC );
 
 if( bChanged )
 m_bAttachToMainAxis = bAttachToMainAxis;
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx 
b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index ad77a6aa5e5d..2b8417eaa48c 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -219,7 +219,7 @@ void setAttachedAxisType(const 
rtl::Reference<::chart::ChartModel>&
 return;
 
 rtl::Reference xDiagram = xModel->getFirstChartDiagram();
-DiagramHelper::attachSeriesToAxis(bPrimary, xDataSeries, xDiagram, 
comphelper::getProcessComponentContext());
+xDiagram->attachSeriesToAxis(bPrimary, xDataSeries, 
comphelper::getProcessComponentContext());
 }
 
 rtl::Reference getChartType(
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 2d40831c1892..234868c3ec27 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -261,6 +261,11 @@ public:
 rtl::Reference< ::chart::Axis > getAttachedAxis(
 const rtl::Reference< ::chart::DataSeries >& xSeries );
 
+bool attachSeriesToAxis( bool bMainAxis,
+const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+const css::uno::Reference< css::uno::XComponentContext > & xContext,
+bool bAdaptAxes=true );
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/DiagramHelper.hxx 
b/chart2/source/inc/DiagramHelper.hxx
index a6679c6e5ec4..e041e49bca52 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -147,12 +147,6 @@ public:
 static bool isSeriesAttachedToMainAxis(
 const css::uno::Reference< css::chart2::XDataSeries >& xDataSeries );
 
-static bool attachSeriesToAxis( bool bMainAxis,
-const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
-const rtl::Reference< ::chart::Diagram >& xDiagram,
-const css::uno::Reference< css::uno::XComponentContext > & xContext

[Libreoffice-commits] core.git: chart2/source

2023-03-20 Thread Caolán McNamara (via logerrit)
 chart2/source/inc/Diagram.hxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit ad59487053bcd267b53febde0cecbd64c7f94cc0
Author: Caolán McNamara 
AuthorDate: Sun Mar 19 20:40:35 2023 +
Commit: Caolán McNamara 
CommitDate: Mon Mar 20 09:02:41 2023 +

crashtesting: frequent XDiagram OPropertySetHelper::getFastPropertyValue 
crash

seen with

gcc --version
gcc (Debian 10.2.1-6) 10.2.1 20210110

bt

 #1  0x7702fd36 in cppu::OPropertySetHelper::getFastPropertyValue 
(this=this@entry=0x5991baa0,
 nHandle=nHandle@entry=0) at 
/home/buildslave/source/libo-core/cppuhelper/source/propshlp.cxx:550
 #2  0x7fffd6e97b4d in chart::Diagram::getDiagramPositioningMode 
(this=0x5991ba30)
 at 
/home/buildslave/source/libo-core/chart2/source/model/main/Diagram.cxx:720
 #3  0x7fffd6dd9575 in 
chart::SeriesPlotterContainer::initializeCooSysAndSeriesPlotter 
(this=0x59aa44a0,
 rChartModel=...) at 
/home/buildslave/source/libo-core/chart2/source/view/main/SeriesPlotterContainer.cxx:231
 #4  0x7fffd6d96e02 in chart::ChartView::createShapes2D 
(this=this@entry=0x58fb1fa0, rPageSize=...)
 at /usr/include/c++/10/bits/shared_ptr_base.h:1324
 #5  0x7fffd6d98420 in chart::ChartView::createShapes 
(this=this@entry=0x58fb1fa0)
 at 
/home/buildslave/source/libo-core/chart2/source/view/main/ChartView.cxx:1398
 #6  0x7fffd6d98647 in chart::ChartView::impl_updateView 
(this=0x58fb1fa0,
 bCheckLockedCtrler=bCheckLockedCtrler@entry=false)
 at 
/home/buildslave/source/libo-core/chart2/source/view/main/ChartView.cxx:1451
 #7  0x7fffd6d9c5f0 in chart::ChartView::updateHard (this=)

info vtbl this

vtable for 'cppu::OPropertySetHelper' @ 0x7fffd71c7980 (subobject @ 
0x5991baa0):
[0]: 0x7fffd6ea0529 
[1]: 0x7fffd6e95434 
[2]: 0x7fffd6e953ba 
[3]: 0x7fffd6e9ff43 
[4]: 0x7702ff0b 
[5]: 0xff88
[6]: 0x7fffd71c7008 
[7]: 0x7fffd6ea0520 
[8]: 0x7fffd6e9542e 
[9]: 0x7fffd6e953b4 
[10]: 0x7fffd6e9ae67 
[11]: 0x7702de17 
[12]: 0x7702de89 
[13]: 0x7702f6ec  
const&)>
[14]: 0x7702f8be  
const&)>
[15]: 0x7702fb24  
const&)>
[16]: 0x7702fcf6  
const&)>
[17]: 0xff28
[18]: 0x7fffd71c7008 
[19]: 0x7fffd6ea0514 
[20]: 0x7fffd6e95425 

but without "final" used

info vtbl this (and this is what I also get with fedora's gcc 12.2.1
with "final" used)

vtable for 'cppu::OPropertySetHelper' @ 0x7fffd79c8850 (subobject @ 
0x5991cc98):
[0]: 0x7fffd76a1370 
[1]: 0x7fffd76962d2 
[2]: 0x7fffd7696258 
[3]: 0x7fffd769bcf7 
[4]: 0x7fffd77fcd5c 

 const&, com::sun::star::uno::Sequence const&)>
[5]: 0x7702e320 

 const&)>
[6]: 0x7702f1ac 

 const&, 
com::sun::star::uno::Reference
 const&)>
[7]: 0x7702f282 

 const&)>
[8]: 0x7703085a 

 const&, 
com::sun::star::uno::Reference
 const&)>
[9]: 0x7702dde2 

[10]: 0x7702de1e 

[11]: 0x7702f490 
 
const&)>
[12]: 0x7702f6f6 
 
const&)>
[13]: 0x7702f8c8 
 
const&)>
[14]: 0x7702fb2e 
 
const&)>
[15]: 0x7fffd76a0dae 
[16]: 0x7702fd00 
[17]: 0x7fffd769bc26 
[18]: 0x7fffd77f78c0 

[19]: 0x7fffd77fcb46 

[20]: 0x7fffd76a0f5f 

seen with exporting forum-de2-10559.odt to odt

Change-Id: I18f7ddb90f9249eda5f5635fe4e9d185a2e092f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149117
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 403dfbb15385..2d40831c1892 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -67,9 +67,12 @@ typedef ::cppu::WeakImplHelper<
 Diagram_Base;
 }
 
-class OOO_DLLPUBLIC_CHARTTOOLS Diagram final :
-public impl::Diagram_Base,
-public ::property::OPropertySet
+class OOO_DLLPUBLIC_CHARTTOOLS Diagram
+#if !defined __GNUC__ || __GNUC__ >= 12
+final
+#endif
+: public impl::Diagram_Base
+, public ::property::OPropertySet
 {
 public:
 Diagram( css::uno::Reference< css::uno::XComponentContext > xContext );


[Libreoffice-commits] core.git: chart2/source

2023-03-19 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx |  
  2 
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx |  
  8 +-
 chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx |  
 39 +-
 chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx |  
  4 -
 chart2/source/controller/dialogs/DialogModel.cxx|  
  2 
 chart2/source/controller/dialogs/ObjectNameProvider.cxx |  
  4 -
 chart2/source/controller/main/ChartController_Insert.cxx|  
  4 -
 chart2/source/inc/Diagram.hxx   |  
  3 
 chart2/source/inc/DiagramHelper.hxx |  
  4 -
 chart2/source/model/main/Diagram.cxx|  
 29 ++-
 chart2/source/model/template/AreaChartTypeTemplate.cxx  |  
  2 
 chart2/source/model/template/BarChartTypeTemplate.cxx   |  
  2 
 chart2/source/model/template/ChartTypeTemplate.cxx  |  
  2 
 chart2/source/model/template/LineChartTypeTemplate.cxx  |  
  2 
 chart2/source/model/template/NetChartTypeTemplate.cxx   |  
  2 
 chart2/source/model/template/PieChartTypeTemplate.cxx   |  
  4 -
 chart2/source/model/template/ScatterChartTypeTemplate.cxx   |  
  2 
 chart2/source/model/template/StockChartTypeTemplate.cxx |  
  2 
 chart2/source/tools/AxisHelper.cxx  |  
  4 -
 chart2/source/tools/ChartModelHelper.cxx|  
  2 
 chart2/source/tools/DataSourceHelper.cxx|  
  6 +
 chart2/source/tools/DiagramHelper.cxx   |  
 27 --
 chart2/source/tools/ReferenceSizeProvider.cxx   |  
  4 -
 chart2/source/tools/RegressionCurveHelper.cxx   |  
  3 
 chart2/source/tools/ThreeDHelper.cxx|  
  4 -
 chart2/source/view/main/SeriesPlotterContainer.cxx  |  
  3 
 26 files changed, 84 insertions(+), 86 deletions(-)

New commits:
commit fd299d209d82495eb6528fb444e0b68f41c8ae0d
Author: Noel Grandin 
AuthorDate: Thu Mar 16 08:51:23 2023 +0200
Commit: Noel Grandin 
CommitDate: Sun Mar 19 12:55:30 2023 +

move getDataSeries inside chart2::Diagram

Change-Id: Ie60d288dba9c8d006de03c80d3cfc7bf8f108782
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149085
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git 
a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index 83f4bd16843d..fc7ae7c4f272 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -560,7 +560,7 @@ rtl::Reference< DataSeries > 
DataSeriesPointWrapper::getDataSeries()
 {
 rtl::Reference< ::chart::Diagram > xDiagram( 
m_spChart2ModelContact->getDiagram() );
 std::vector< rtl::Reference< DataSeries > > aSeriesList =
-::chart::DiagramHelper::getDataSeriesFromDiagram( xDiagram );
+xDiagram->getDataSeries();
 
 if( m_nSeriesIndexInNewAPI >= 0 && 
o3tl::make_unsigned(m_nSeriesIndexInNewAPI) < aSeriesList.size() )
 xSeries = aSeriesList[m_nSeriesIndexInNewAPI];
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 5654ef2ec8fc..2de5055c41aa 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -447,7 +447,7 @@ sal_Int32 lcl_getNewAPIIndexForOldAPIIndex(
 }
 
 std::vector< rtl::Reference< ::chart::DataSeries > > aSeriesList =
-::chart::DiagramHelper::getDataSeriesFromDiagram( xDiagram );
+xDiagram->getDataSeries();
 if( nNewAPIIndex >= static_cast(aSeriesList.size()) )
 nNewAPIIndex = -1;
 
@@ -1451,7 +1451,7 @@ bool WrappedNumberOfLinesProperty::detectInnerValue( 
uno::Any& rInnerValue ) con
 if( xDiagram.is() && xChartDoc.is() )
 {
 std::vector< rtl::Reference< DataSeries > > aSeriesVector =
-DiagramHelper::getDataSeriesFromDiagram( xDiagram );
+xDiagram->getDataSeries();
 if( !aSeriesVector.empty() )
 {
 rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = 
xChartDoc->getTypeManager();
@@ -1600,7 +1600,7 @@ void 
WrappedAttributedDataPointsProperty::setPropertyValue( const Any& rOuterVal
 return;
 
 std::vector< rtl::Reference< DataSeries > > aSeriesVector =
-::chart::DiagramHelper::getD

[Libreoffice-commits] core.git: chart2/source

2023-03-18 Thread Noel Grandin (via logerrit)
 chart2/source/inc/Diagram.hxx  |7 +++
 chart2/source/inc/DiagramHelper.hxx|8 
 chart2/source/model/main/Diagram.cxx   |   16 
 chart2/source/model/template/ChartTypeTemplate.cxx |4 ++--
 chart2/source/tools/DiagramHelper.cxx  |   20 
 5 files changed, 25 insertions(+), 30 deletions(-)

New commits:
commit 61e6afb4d556f95d3cb7dc64262d834c627518f1
Author: Noel Grandin 
AuthorDate: Wed Mar 15 16:50:12 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Mar 18 19:27:29 2023 +

move getDataSeriesGroups inside chart2::Diagram

Change-Id: I776e07ad6dce63df9891ab6823811ad20a37e77c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149084
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 44bca5c24a8c..b370d38057c4 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -236,6 +236,13 @@ public:
 
 bool isCategory();
 
+/** return all data series in this diagram grouped by chart-types
+ */
+std::vector<
+   std::vector<
+   rtl::Reference< ::chart::DataSeries > > >
+getDataSeriesGroups();
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/DiagramHelper.hxx 
b/chart2/source/inc/DiagramHelper.hxx
index e018a1817ed4..ab88483664cb 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -170,14 +170,6 @@ public:
 getDataSeriesFromDiagram(
 const rtl::Reference< ::chart::Diagram > & xDiagram );
 
-/** return all data series in this diagram grouped by chart-types
- */
-static std::vector<
-   std::vector<
-   rtl::Reference< ::chart::DataSeries > > >
-getDataSeriesGroups(
-const rtl::Reference< ::chart::Diagram > & xDiagram );
-
 static css::uno::Sequence< OUString >
 getExplicitSimpleCategories( ChartModel& rModel );
 
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index 92b443b744f9..2005eb90feda 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -1210,6 +1210,22 @@ bool Diagram::isCategory()
 return false;
 }
 
+std::vector< std::vector< rtl::Reference< DataSeries > > >
+Diagram::getDataSeriesGroups()
+{
+std::vector< std::vector< rtl::Reference< DataSeries > > > aResult;
+
+//iterate through all coordinate systems
+for( rtl::Reference< BaseCoordinateSystem > const & coords : 
getBaseCoordinateSystems() )
+{
+//iterate through all chart types in the current coordinate system
+for( rtl::Reference< ChartType >  const & chartType : 
coords->getChartTypes2() )
+{
+aResult.push_back( chartType->getDataSeries2() );
+}
+}
+return aResult;
+}
 
 } //  namespace chart
 
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx 
b/chart2/source/model/template/ChartTypeTemplate.cxx
index a23b74af57e8..383fcac73163 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -183,7 +183,7 @@ void ChartTypeTemplate::changeDiagram( const 
rtl::Reference< Diagram >& xDiagram
 try
 {
 std::vector< std::vector< rtl::Reference< DataSeries > > > aSeriesSeq =
-DiagramHelper::getDataSeriesGroups( xDiagram );
+xDiagram->getDataSeriesGroups();
 std::vector< rtl::Reference< DataSeries > > aFlatSeriesSeq( 
FlattenSequence( aSeriesSeq ));
 const sal_Int32 nFormerSeriesCount = aFlatSeriesSeq.size();
 
@@ -394,7 +394,7 @@ void ChartTypeTemplate::applyStyles( const rtl::Reference< 
::chart::Diagram >& x
 {
 // apply chart-type specific styles, like "symbols on" for example
 std::vector< std::vector< rtl::Reference< DataSeries > > > aNewSeriesSeq(
-DiagramHelper::getDataSeriesGroups( xDiagram ));
+xDiagram->getDataSeriesGroups());
 for( std::size_t i=0; i >
 return aResult;
 }
 
-std::vector< std::vector< rtl::Reference< DataSeries > > >
-DiagramHelper::getDataSeriesGroups( const rtl::Reference< Diagram > & 
xDiagram )
-{
-if (!xDiagram)
-return {};
-
-std::vector< std::vector< rtl::Reference< DataSeries > > > aResult;
-
-//iterate through all coordinate systems
-for( rtl::Reference< BaseCoordinateSystem > const & coords : 
xDiagram->getBaseCoordinateSystems() )
-{
-//iterate through all chart types in the current coordinate system
-for( rtl::Reference< ChartType >  const & chartType : 
coords->getChartTypes2() )
-{
-aResult.push_back( chartType->getDataSeries2() );
-}
-}
-return aResult;
-}
-
 static void lcl_generateAutomaticCategoriesFromChartType(
 

[Libreoffice-commits] core.git: chart2/source

2023-03-18 Thread Noel Grandin (via logerrit)
 chart2/source/controller/dialogs/DataBrowserModel.cxx |2 -
 chart2/source/controller/dialogs/DialogModel.cxx  |2 -
 chart2/source/inc/Diagram.hxx |2 +
 chart2/source/inc/DiagramHelper.hxx   |3 -
 chart2/source/model/main/Diagram.cxx  |   32 ++
 chart2/source/tools/DiagramHelper.cxx |   32 --
 6 files changed, 36 insertions(+), 37 deletions(-)

New commits:
commit c8fc36154e1933bb3d9e2a549b7ab4d4e5e46c75
Author: Noel Grandin 
AuthorDate: Wed Mar 15 16:48:39 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Mar 18 15:47:04 2023 +

move isCategory inside chart2::Diagram

Change-Id: I568a573004c20d7bbf60a947b34a6a8223217b19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149083
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx 
b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index 595efe79cf36..75e4edbbca57 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -201,7 +201,7 @@ private:
 
 bool lcl_ShowCategoriesAsDataLabel( const rtl::Reference< ::chart::Diagram > & 
xDiagram )
 {
-return !DiagramHelper::isCategoryDiagram(xDiagram);
+return !xDiagram->isCategory();
 }
 
 } // anonymous namespace
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx 
b/chart2/source/controller/dialogs/DialogModel.cxx
index 6bd55142670c..1b0f7ed31abe 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -653,7 +653,7 @@ bool DialogModel::isCategoryDiagram() const
 {
 bool bRet = false;
 if( m_xChartDocument.is())
-bRet = DiagramHelper::isCategoryDiagram( 
m_xChartDocument->getFirstChartDiagram() );
+bRet = m_xChartDocument->getFirstChartDiagram()->isCategory();
 return bRet;
 }
 
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 1d612902e568..44bca5c24a8c 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -234,6 +234,8 @@ public:
 bool bSetAxisType = false, // when this flag is true ...
 bool bCategoryAxis = true);// set the AxisType to CATEGORY or back 
to REALNUMBER
 
+bool isCategory();
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/DiagramHelper.hxx 
b/chart2/source/inc/DiagramHelper.hxx
index 4bba95a7b1af..e018a1817ed4 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -178,9 +178,6 @@ public:
 getDataSeriesGroups(
 const rtl::Reference< ::chart::Diagram > & xDiagram );
 
-static bool isCategoryDiagram(
-const rtl::Reference< ::chart::Diagram >& xDiagram );
-
 static css::uno::Sequence< OUString >
 getExplicitSimpleCategories( ChartModel& rModel );
 
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index bd8d9c06d260..92b443b744f9 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -1179,6 +1179,38 @@ void Diagram::setCategories(
 }
 }
 
+bool Diagram::isCategory()
+{
+try
+{
+for( rtl::Reference< BaseCoordinateSystem > const & xCooSys : 
getBaseCoordinateSystems() )
+{
+for( sal_Int32 nN = xCooSys->getDimension(); nN--; )
+{
+const sal_Int32 nMaximumScaleIndex = 
xCooSys->getMaximumAxisIndexByDimension(nN);
+for(sal_Int32 nI=0; nI<=nMaximumScaleIndex; ++nI)
+{
+rtl::Reference< Axis > xAxis = 
xCooSys->getAxisByDimension2( nN,nI );
+OSL_ASSERT( xAxis.is());
+if( xAxis.is())
+{
+chart2::ScaleData aScaleData = xAxis->getScaleData();
+if( aScaleData.AxisType == chart2::AxisType::CATEGORY 
|| aScaleData.AxisType == chart2::AxisType::DATE )
+return true;
+}
+}
+}
+}
+}
+catch( const uno::Exception & )
+{
+DBG_UNHANDLED_EXCEPTION("chart2");
+}
+
+return false;
+}
+
+
 } //  namespace chart
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
diff --git a/chart2/source/tools/DiagramHelper.cxx 
b/chart2/source/tools/DiagramHelper.cxx
index 8007a4f3a009..bf7b9f3ee537 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -643,38 +643,6 @@ std::vector< std::vector< rtl::Reference< DataSeries > > >
 return aResult;
 }
 
-bool DiagramHelper::isCategoryDiagram(
-const rtl::Reference< Diagram >& xDiagram )
-{
-try
-{
-for( rtl::Reference< BaseCoordinateSystem > const & xCooSys : 
xDia

[Libreoffice-commits] core.git: chart2/source

2023-03-18 Thread Noel Grandin (via logerrit)
 chart2/source/controller/dialogs/DialogModel.cxx   |4 
 chart2/source/inc/Diagram.hxx  |8 +
 chart2/source/inc/DiagramHelper.hxx|   10 -
 chart2/source/model/main/Diagram.cxx   |  112 ++
 chart2/source/model/template/ChartTypeTemplate.cxx |4 
 chart2/source/tools/AxisHelper.cxx |2 
 chart2/source/tools/DataSourceHelper.cxx   |   14 +-
 chart2/source/tools/DiagramHelper.cxx  |  124 -
 chart2/source/tools/InternalDataProvider.cxx   |8 -
 9 files changed, 140 insertions(+), 146 deletions(-)

New commits:
commit 183c3d58fbaf20a61b589d8f8f29bffc07fbe7dd
Author: Noel Grandin 
AuthorDate: Wed Mar 15 16:44:01 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Mar 18 13:30:03 2023 +

move getCategories/setCategories inside chart2::Diagram

Change-Id: I7c6b4e92bb131cc3c6b5b4eedb3304128b8bd988
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149082
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/dialogs/DialogModel.cxx 
b/chart2/source/controller/dialogs/DialogModel.cxx
index 501e68f201c1..6bd55142670c 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -598,7 +598,7 @@ uno::Reference< chart2::data::XLabeledDataSequence > 
DialogModel::getCategories(
 if( m_xChartDocument.is())
 {
 rtl::Reference< Diagram > xDiagram( 
m_xChartDocument->getFirstChartDiagram());
-xResult = DiagramHelper::getCategoriesFromDiagram( xDiagram );
+xResult = xDiagram->getCategories();
 }
 }
 catch( const uno::Exception & )
@@ -626,7 +626,7 @@ void DialogModel::setCategories( const Reference< 
chart2::data::XLabeledDataSequ
 sal_Int32 nAxisType = ChartTypeHelper::getAxisType( xFirstChartType, 0 
); // x-axis
 bSupportsCategories = (nAxisType == AxisType::CATEGORY);
 }
-DiagramHelper::setCategoriesToDiagram( xCategories, xDiagram, true, 
bSupportsCategories );
+xDiagram->setCategories( xCategories, true, bSupportsCategories );
 }
 
 OUString DialogModel::getCategoriesRange() const
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index d28ad7bd0575..1d612902e568 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -226,6 +226,14 @@ public:
 
 bool isSupportingDateAxis();
 
+css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+getCategories();
+
+void setCategories(
+const css::uno::Reference< css::chart2::data::XLabeledDataSequence 
>& xCategories,
+bool bSetAxisType = false, // when this flag is true ...
+bool bCategoryAxis = true);// set the AxisType to CATEGORY or back 
to REALNUMBER
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/DiagramHelper.hxx 
b/chart2/source/inc/DiagramHelper.hxx
index 0e02db670287..4bba95a7b1af 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -181,16 +181,6 @@ public:
 static bool isCategoryDiagram(
 const rtl::Reference< ::chart::Diagram >& xDiagram );
 
-static void setCategoriesToDiagram(
-const css::uno::Reference< css::chart2::data::XLabeledDataSequence 
>& xCategories,
-const rtl::Reference< ::chart::Diagram >& xDiagram,
-bool bSetAxisType = false, // when this flag is true ...
-bool bCategoryAxis = true);// set the AxisType to CATEGORY or back 
to REALNUMBER
-
-static css::uno::Reference< css::chart2::data::XLabeledDataSequence >
-getCategoriesFromDiagram(
-const rtl::Reference< ::chart::Diagram > & xDiagram );
-
 static css::uno::Sequence< OUString >
 getExplicitSimpleCategories( ChartModel& rModel );
 
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index daf1b91970d4..bd8d9c06d260 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -35,11 +35,13 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1065,7 +1067,117 @@ bool Diagram::isSupportingDateAxis()
 return ::chart::ChartTypeHelper::isSupportingDateAxis( 
getChartTypeByIndex( 0 ), 0 );
 }
 
+static std::vector< rtl::Reference< Axis > > 
lcl_getAxisHoldingCategoriesFromDiagram(
+Diagram& rDiagram )
+{
+std::vector< rtl::Reference< Axis > > aRet;
+
+// return first x-axis as fall-back
+rtl::Reference< Axis > xFallBack;
+try
+{
+for( rtl::Reference< BaseCoordinateSystem > const & xCooSys : 
rDiagram.getBaseCoordinateSystems() )
+{
+OSL_ASSERT( xCooSys.is());
+for( sal_Int32 nN = xCooSys->getDimension(); nN--; )

[Libreoffice-commits] core.git: chart2/source

2023-03-18 Thread Noel Grandin (via logerrit)
 chart2/source/inc/Diagram.hxx  |2 ++
 chart2/source/inc/DiagramHelper.hxx|1 -
 chart2/source/model/main/Diagram.cxx   |6 ++
 chart2/source/tools/AxisHelper.cxx |2 +-
 chart2/source/tools/DiagramHelper.cxx  |6 --
 chart2/source/view/main/SeriesPlotterContainer.cxx |2 +-
 6 files changed, 10 insertions(+), 9 deletions(-)

New commits:
commit 0bb487ae390b29fd75258cae6fb3a7645fefcc86
Author: Noel Grandin 
AuthorDate: Wed Mar 15 16:34:10 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Mar 18 12:01:29 2023 +

move isSupportingDateAxis inside chart2::Diagram

Change-Id: I6c0d6d68c08cc66bffc6ff8189d2e7e24c39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149079
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index adae9200d0e6..d28ad7bd0575 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -224,6 +224,8 @@ public:
 
 rtl::Reference< ChartType > getChartTypeByIndex( sal_Int32 nIndex );
 
+bool isSupportingDateAxis();
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/DiagramHelper.hxx 
b/chart2/source/inc/DiagramHelper.hxx
index 09fdb8960a97..0e02db670287 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -204,7 +204,6 @@ public:
 static void switchToTextCategories(
 const rtl::Reference<::chart::ChartModel> & xChartDoc );
 
-static bool isSupportingDateAxis( const rtl::Reference< ::chart::Diagram 
>& xDiagram );
 static bool isDateNumberFormat( sal_Int32 nNumberFormat, const 
css::uno::Reference< css::util::XNumberFormats >& xNumberFormats );
 static sal_Int32 getDateNumberFormat( const css::uno::Reference< 
css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
 static sal_Int32 getDateTimeInputNumberFormat( const css::uno::Reference< 
css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier, double fNumber );
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index 55e96fab6685..daf1b91970d4 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -1060,6 +1060,12 @@ rtl::Reference< ChartType > 
Diagram::getChartTypeByIndex( sal_Int32 nIndex )
 return xChartType;
 }
 
+bool Diagram::isSupportingDateAxis()
+{
+return ::chart::ChartTypeHelper::isSupportingDateAxis( 
getChartTypeByIndex( 0 ), 0 );
+}
+
+
 
 } //  namespace chart
 
diff --git a/chart2/source/tools/AxisHelper.cxx 
b/chart2/source/tools/AxisHelper.cxx
index 5a1a0088d6ab..5fd8de93dcf7 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -194,7 +194,7 @@ sal_Int32 AxisHelper::getExplicitNumberFormatKeyForAxis(
 else if( xChartDoc.is() && xChartDoc->hasInternalDataProvider() && 
nDimensionIndex == 0 ) //maybe date axis
 {
 rtl::Reference< Diagram > xDiagram( 
xChartDoc->getFirstChartDiagram() );
-if( DiagramHelper::isSupportingDateAxis( xDiagram ) )
+if( xDiagram->isSupportingDateAxis() )
 {
 nNumberFormatKey = DiagramHelper::getDateNumberFormat( 
xChartDoc );
 }
diff --git a/chart2/source/tools/DiagramHelper.cxx 
b/chart2/source/tools/DiagramHelper.cxx
index f81e1449d140..cf27162c936c 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -968,12 +968,6 @@ void DiagramHelper::switchToTextCategories( const 
rtl::Reference<::chart::ChartM
 }
 }
 
-bool DiagramHelper::isSupportingDateAxis( const rtl::Reference< Diagram >& 
xDiagram )
-{
-return ::chart::ChartTypeHelper::isSupportingDateAxis(
-xDiagram->getChartTypeByIndex( 0 ), 0 );
-}
-
 bool DiagramHelper::isDateNumberFormat( sal_Int32 nNumberFormat, const 
Reference< util::XNumberFormats >& xNumberFormats )
 {
 bool bIsDate = false;
diff --git a/chart2/source/view/main/SeriesPlotterContainer.cxx 
b/chart2/source/view/main/SeriesPlotterContainer.cxx
index 6bba86eb61e9..c9e0b7239aea 100644
--- a/chart2/source/view/main/SeriesPlotterContainer.cxx
+++ b/chart2/source/view/main/SeriesPlotterContainer.cxx
@@ -135,7 +135,7 @@ void 
SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChart
 return;
 
 uno::Reference 
xNumberFormatsSupplier(&rChartModel);
-if (rChartModel.hasInternalDataProvider() && 
DiagramHelper::isSupportingDateAxis(xDiagram))
+if (rChartModel.hasInternalDataProvider() && 
xDiagram->isSupportingDateAxis())
 m_nDefaultDateNumberFormat = 
DiagramHelper::getDateNumberFormat(xNumberFormatsSupplier);
 
 sal_Int32 nDimensionCount = DiagramHelper::getDimension(xDiagram);


[Libreoffice-commits] core.git: chart2/source

2023-03-17 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx |   19 +---
 chart2/source/controller/dialogs/DataBrowserModel.cxx   |2 
 chart2/source/controller/dialogs/DialogModel.cxx|2 
 chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx|2 
 chart2/source/controller/main/ControllerCommandDispatch.cxx |4 +
 chart2/source/controller/main/DragMethod_RotateDiagram.cxx  |2 
 chart2/source/controller/main/ObjectHierarchy.cxx   |2 
 chart2/source/inc/Diagram.hxx   |2 
 chart2/source/inc/DiagramHelper.hxx |3 -
 chart2/source/model/main/Diagram.cxx|   23 +-
 chart2/source/model/template/LineChartTypeTemplate.cxx  |3 -
 chart2/source/model/template/PieChartTypeTemplate.cxx   |2 
 chart2/source/model/template/ScatterChartTypeTemplate.cxx   |2 
 chart2/source/tools/AxisHelper.cxx  |2 
 chart2/source/tools/DiagramHelper.cxx   |   26 
 chart2/source/tools/ObjectIdentifier.cxx|   14 +++---
 chart2/source/tools/ThreeDHelper.cxx|   14 +++---
 chart2/source/view/diagram/VDiagram.cxx |2 
 chart2/source/view/main/ChartView.cxx   |8 ++-
 19 files changed, 69 insertions(+), 65 deletions(-)

New commits:
commit 7a519bc2afec54f1c4c78d30023415d7ae7dc6c4
Author: Noel Grandin 
AuthorDate: Wed Mar 15 16:32:38 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 17 16:31:35 2023 +

move getChartTypeByIndex inside chart2::Diagram

Change-Id: Idff60dbd7c1cdb8c60e7ac07ad3abe3c6b07e321
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149050
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index f0d85a4bcc1f..5654ef2ec8fc 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -421,10 +421,10 @@ struct StaticDiagramWrapperPropertyArray : public 
rtl::StaticAggregate< Sequence
 {
 };
 
-bool lcl_isXYChart( const rtl::Reference< ::chart::Diagram >& rDiagram )
+bool lcl_isXYChart( const rtl::Reference< ::chart::Diagram >& xDiagram )
 {
 bool bRet = false;
-rtl::Reference< ::chart::ChartType > xChartType( 
::chart::DiagramHelper::getChartTypeByIndex( rDiagram, 0 ) );
+rtl::Reference< ::chart::ChartType > xChartType( 
xDiagram->getChartTypeByIndex( 0 ) );
 if( xChartType.is() )
 {
 OUString aChartType( xChartType->getChartType() );
@@ -594,20 +594,23 @@ OUString SAL_CALL DiagramWrapper::getDiagramType()
 aRet = lcl_getDiagramType( aTemplateAndService.sServiceName );
 }
 
-if( aRet.isEmpty())
+if( !aRet.isEmpty())
+return aRet;
+
+// none of the standard templates matched
+// use first chart type
+if (xDiagram)
 {
-// none of the standard templates matched
-// use first chart type
-rtl::Reference< ChartType > xChartType( 
DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) );
+rtl::Reference< ChartType > xChartType( xDiagram->getChartTypeByIndex( 
0 ) );
 if( xChartType.is() )
 {
 aRet = xChartType->getChartType();
 if( !aRet.isEmpty() )
 aRet = lcl_getOldChartTypeName( aRet );
 }
-if( aRet.isEmpty())
-aRet = "com.sun.star.chart.BarDiagram";
 }
+if( aRet.isEmpty())
+aRet = "com.sun.star.chart.BarDiagram";
 
 return aRet;
 }
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx 
b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index a26a9d86b2ca..595efe79cf36 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -314,7 +314,7 @@ void DataBrowserModel::insertDataSeries( sal_Int32 
nAfterColumnIndex )
 else
 {
 // No data series at specified column position. Use the first chart 
type.
-xChartType = DiagramHelper::getChartTypeByIndex( xDiagram, 0 );
+xChartType = xDiagram->getChartTypeByIndex( 0 );
 nStartCol = nAfterColumnIndex;
 }
 
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx 
b/chart2/source/controller/dialogs/DialogModel.cxx
index aa9663e7d0bc..501e68f201c1 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -620,7 +620,7 @@ void DialogModel::setCategories( const Reference< 
chart2::data::XLabeledDataSequ
 // categories
 bool bSupportsCategories = true;
 
-rtl::Reference< ChartType > xFirstChartType( 
DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) );
+rtl::Reference< ChartType > xFirstChartType( 
xDiagram->getChartTypeByIndex( 

[Libreoffice-commits] core.git: chart2/source

2023-03-17 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx   |6 --
 chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx|8 +--
 chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx |4 -
 chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx |   12 
++---
 chart2/source/controller/dialogs/DialogModel.cxx |4 -
 chart2/source/inc/Diagram.hxx|2 
 chart2/source/inc/DiagramHelper.hxx  |4 -
 chart2/source/model/main/Diagram.cxx |   22 
-
 chart2/source/model/template/ChartTypeTemplate.cxx   |4 -
 chart2/source/tools/DiagramHelper.cxx|   24 
--
 10 files changed, 41 insertions(+), 49 deletions(-)

New commits:
commit 57914a4084da9107ec6815b1916a4be117c400bf
Author: Noel Grandin 
AuthorDate: Wed Mar 15 16:27:11 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 17 13:46:21 2023 +

move getChartTypes inside chart2::Diagram

Change-Id: I43fd96feb1e3d34a5f3327b2e6398ca4b5e9f928
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149049
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
index 925c85834fa0..65be4793f01c 100644
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
@@ -157,8 +157,7 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL 
MinMaxLineWrapper::getPropert
 void SAL_CALL MinMaxLineWrapper::setPropertyValue( const OUString& 
rPropertyName, const uno::Any& rValue )
 {
 rtl::Reference< ::chart::Diagram > xDiagram( 
m_spChart2ModelContact->getDiagram() );
-const std::vector< rtl::Reference< ChartType > > & aTypes(
-::chart::DiagramHelper::getChartTypesFromDiagram( xDiagram ) );
+const std::vector< rtl::Reference< ChartType > > & aTypes = 
xDiagram->getChartTypes();
 for( rtl::Reference< ChartType > const & xType : aTypes )
 {
 if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK 
)
@@ -189,8 +188,7 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyValue( 
const OUString& rProperty
 rtl::Reference< DataSeries > xPropSet;
 
 rtl::Reference< ::chart::Diagram > xDiagram( 
m_spChart2ModelContact->getDiagram() );
-const std::vector< rtl::Reference< ChartType > > aTypes(
-::chart::DiagramHelper::getChartTypesFromDiagram( xDiagram ) );
+const std::vector< rtl::Reference< ChartType > > aTypes = 
xDiagram->getChartTypes();
 for( rtl::Reference< ChartType > const & xType : aTypes )
 {
 if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK 
)
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
index febfa344870b..143d0123ee63 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
@@ -165,8 +165,8 @@ void SAL_CALL UpDownBarWrapper::setPropertyValue( const 
OUString& rPropertyName,
 {
 Reference< beans::XPropertySet > xPropSet;
 
-const std::vector< rtl::Reference< ChartType > > aTypes(
-::chart::DiagramHelper::getChartTypesFromDiagram( 
m_spChart2ModelContact->getDiagram() ) );
+const std::vector< rtl::Reference< ChartType > > aTypes =
+m_spChart2ModelContact->getDiagram()->getChartTypes();
 for( rtl::Reference< ChartType > const & xType : aTypes )
 {
 if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK 
)
@@ -183,8 +183,8 @@ uno::Any SAL_CALL UpDownBarWrapper::getPropertyValue( const 
OUString& rPropertyN
 
 Reference< beans::XPropertySet > xPropSet;
 
-const std::vector< rtl::Reference< ChartType > > aTypes(
-::chart::DiagramHelper::getChartTypesFromDiagram( 
m_spChart2ModelContact->getDiagram() ) );
+const std::vector< rtl::Reference< ChartType > > aTypes =
+m_spChart2ModelContact->getDiagram()->getChartTypes();
 for( rtl::Reference const & xType : aTypes )
 {
 if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK 
)
diff --git 
a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx 
b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx
index 7be1af161593..3c0cbb353192 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx
@@ -78,7 +78,7 @@ void WrappedBarPositionProperty_Base::setPropertyValue( const 
Any& rOuterValue,
 if( m_nDimensionIndex!=1 )
 return;
 
-const std::vector< rtl::Reference< ChartType > > aCh

[Libreoffice-commits] core.git: chart2/source

2023-03-17 Thread Noel Grandin (via logerrit)
 chart2/source/controller/dialogs/DialogModel.cxx |2 +-
 chart2/source/controller/dialogs/DialogModel.hxx |2 +-
 chart2/source/inc/Diagram.hxx|5 +++--
 chart2/source/model/main/Diagram.cxx |   14 --
 4 files changed, 9 insertions(+), 14 deletions(-)

New commits:
commit 5f0a3a20efd26f50efbe92643c95f09bd21dfc0f
Author: Noel Grandin 
AuthorDate: Wed Mar 15 16:21:40 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 17 12:47:20 2023 +

use more concrete types in Diagram::moveSeries

Change-Id: Ic5bb7f36137afe112d1a542bd642355d996cf68c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149048
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/dialogs/DialogModel.cxx 
b/chart2/source/controller/dialogs/DialogModel.cxx
index 495bf8f396d3..36015c560285 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -524,7 +524,7 @@ DialogModel::tRolesWithRanges 
DialogModel::getRolesWithRanges(
 }
 
 void DialogModel::moveSeries(
-const Reference< XDataSeries > & xSeries,
+const rtl::Reference< DataSeries > & xSeries,
 MoveDirection eDirection )
 {
 m_aTimerTriggeredControllerLock.startTimer();
diff --git a/chart2/source/controller/dialogs/DialogModel.hxx 
b/chart2/source/controller/dialogs/DialogModel.hxx
index 9b7cf1cdcf25..576f29c20f4b 100644
--- a/chart2/source/controller/dialogs/DialogModel.hxx
+++ b/chart2/source/controller/dialogs/DialogModel.hxx
@@ -104,7 +104,7 @@ public:
 Down, Up
 };
 
-void moveSeries( const css::uno::Reference< css::chart2::XDataSeries > & 
xSeries,
+void moveSeries( const rtl::Reference< DataSeries > & xSeries,
  MoveDirection eDirection );
 
 /// @return the newly inserted series
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index a5e877a1f4cf..4c1d40df28bf 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -41,6 +41,7 @@ namespace chart
 {
 class BaseCoordinateSystem;
 class ChartType;
+class DataSeries;
 class Legend;
 class DataTable;
 class Wall;
@@ -197,7 +198,7 @@ public:
 *
 */
 bool moveSeries(
-const css::uno::Reference< css::chart2::XDataSeries >& 
xGivenDataSeries,
+const rtl::Reference< DataSeries >& xGivenDataSeries,
 bool bForward );
 
 /**
@@ -216,7 +217,7 @@ public:
 *
 */
 bool isSeriesMoveable(
-const css::uno::Reference< css::chart2::XDataSeries >& 
xGivenDataSeries,
+const rtl::Reference< DataSeries >& xGivenDataSeries,
 bool bForward );
 
 private:
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index fabaa5b5db1a..aced36a4a98d 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -1002,29 +1002,23 @@ static bool lcl_moveSeriesOrCheckIfMoveIsAllowed(
 }
 
 bool Diagram::isSeriesMoveable(
-const Reference< css::chart2::XDataSeries >& xGivenDataSeries,
+const rtl::Reference< DataSeries >& xGivenDataSeries,
 bool bForward )
 {
 const bool bDoMove = false;
 
-rtl::Reference pGivenDataSeries = 
dynamic_cast(xGivenDataSeries.get());
-assert(pGivenDataSeries || !xGivenDataSeries);
-
 bool bIsMoveable = lcl_moveSeriesOrCheckIfMoveIsAllowed(
-*this, pGivenDataSeries, bForward, bDoMove );
+*this, xGivenDataSeries, bForward, bDoMove );
 
 return bIsMoveable;
 }
 
-bool Diagram::moveSeries( const Reference< css::chart2::XDataSeries >& 
xGivenDataSeries, bool bForward )
+bool Diagram::moveSeries( const rtl::Reference< DataSeries >& 
xGivenDataSeries, bool bForward )
 {
 const bool bDoMove = true;
 
-rtl::Reference pGivenDataSeries = 
dynamic_cast(xGivenDataSeries.get());
-assert(pGivenDataSeries || !xGivenDataSeries);
-
 bool bMoved = lcl_moveSeriesOrCheckIfMoveIsAllowed(
-*this, pGivenDataSeries, bForward, bDoMove );
+*this, xGivenDataSeries, bForward, bDoMove );
 
 return bMoved;
 }


[Libreoffice-commits] core.git: chart2/source

2023-03-17 Thread Noel Grandin (via logerrit)
 chart2/source/controller/dialogs/DialogModel.cxx|2 
 chart2/source/controller/main/ChartController.cxx   |2 
 chart2/source/controller/main/ControllerCommandDispatch.cxx |6 
 chart2/source/inc/Diagram.hxx   |   39 ++
 chart2/source/inc/DiagramHelper.hxx |   40 --
 chart2/source/model/main/Diagram.cxx|  188 +++
 chart2/source/tools/DiagramHelper.cxx   |  191 
 7 files changed, 231 insertions(+), 237 deletions(-)

New commits:
commit 0fc4f285b2578a68e30004baafc37ea189aa8c00
Author: Noel Grandin 
AuthorDate: Wed Mar 15 16:18:55 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 17 11:03:45 2023 +

move isSeriesMoveable inside chart2::Diagram

Change-Id: I119552a4f1300eafc8b060f56a74dc11772f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149038
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/dialogs/DialogModel.cxx 
b/chart2/source/controller/dialogs/DialogModel.cxx
index d6d1fbd71b97..495bf8f396d3 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -531,7 +531,7 @@ void DialogModel::moveSeries(
 ControllerLockGuardUNO aLockedControllers( m_xChartDocument );
 
 rtl::Reference< Diagram > xDiagram( 
m_xChartDocument->getFirstChartDiagram());
-DiagramHelper::moveSeries( xDiagram, xSeries, 
eDirection==MoveDirection::Down );
+xDiagram->moveSeries( xSeries, eDirection==MoveDirection::Down );
 }
 
 rtl::Reference< ::chart::DataSeries > DialogModel::insertSeriesAfter(
diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index dbd7efb9d147..bc658ef03267 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1437,7 +1437,7 @@ void ChartController::executeDispatch_MoveSeries( bool 
bForward )
 SchResId(STR_OBJECT_DATASERIES)),
 m_xUndoManager );
 
-bool bChanged = DiagramHelper::moveSeries( getFirstDiagram(), 
xGivenDataSeries, bForward );
+bool bChanged = getFirstDiagram()->moveSeries( xGivenDataSeries, bForward 
);
 if( bChanged )
 {
 m_aSelection.setSelection( ObjectIdentifier::getMovedSeriesCID( 
aObjectCID, bForward ) );
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx 
b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index 6e90d50bf2e7..53e02f017aaa 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -204,13 +204,11 @@ void ControllerState::update(
 
 bIsDeleteableObjectSelected = ChartController::isObjectDeleteable( aSelObj 
);
 
-bMayMoveSeriesForward = (aObjectType!=OBJECTTYPE_DATA_POINT) && 
DiagramHelper::isSeriesMoveable(
-ChartModelHelper::findDiagram( xModel ),
+bMayMoveSeriesForward = (aObjectType!=OBJECTTYPE_DATA_POINT) && xDiagram 
&& xDiagram->isSeriesMoveable(
 xGivenDataSeries,
 MOVE_SERIES_FORWARD );
 
-bMayMoveSeriesBackward = (aObjectType!=OBJECTTYPE_DATA_POINT) && 
DiagramHelper::isSeriesMoveable(
-ChartModelHelper::findDiagram( xModel ),
+bMayMoveSeriesBackward = (aObjectType!=OBJECTTYPE_DATA_POINT) && xDiagram 
&& xDiagram->isSeriesMoveable(
 xGivenDataSeries,
 MOVE_SERIES_BACKWARD );
 
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index c505d42824a1..a5e877a1f4cf 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -33,6 +33,7 @@
 #include 
 
 namespace com::sun::star::beans { struct PropertyValue; }
+namespace com::sun::star::chart2 { class XDataSeries; }
 namespace com::sun::star::chart2::data { class XDataSource; }
 namespace com::sun::star::uno { class XComponentContext; }
 
@@ -180,6 +181,44 @@ public:
 
 bool isSupportingFloorAndWall();
 
+/**
+* Move a series forward or backward.
+*
+* @param xDiagram
+*  Reference to the diagram that contains the series.
+*
+* @param xGivenDataSeries
+*  Reference to the series that should be moved.
+*
+* @param bForward
+*  Direction in which the series should be moved.
+*
+* @returns  if the series was moved successfully.
+*
+*/
+bool moveSeries(
+const css::uno::Reference< css::chart2::XDataSeries >& 
xGivenDataSeries,
+bool bForward );
+
+/**
+* Test if a series can be moved.
+*
+* @param xDiagram
+*  Reference to the diagram that contains the series.
+*
+* @param xGivenDataSeries
+*  Reference to the series that should be tested for moving.
+*
+* @param bForward
+*  Direction of the move to be checked.
+*
+* @returns  if the series can be moved.
+*
+*/
+b

[Libreoffice-commits] core.git: chart2/source

2023-03-16 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx |4 -
 chart2/source/inc/Diagram.hxx   |2 
 chart2/source/inc/DiagramHelper.hxx |4 -
 chart2/source/model/main/Diagram.cxx|   44 
 chart2/source/model/template/BarChartTypeTemplate.cxx   |2 
 chart2/source/tools/DiagramHelper.cxx   |   44 
 6 files changed, 49 insertions(+), 51 deletions(-)

New commits:
commit dfcca2ff48384de1fb36c376a06decea97a1441e
Author: Noel Grandin 
AuthorDate: Wed Mar 15 16:03:49 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 17 06:15:47 2023 +

move getGeometry3D inside chart2::Diagram

Change-Id: I71f557016c0e107b97ad839b0514efbae4f3665b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148977
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index b778e49af878..f0d85a4bcc1f 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1691,7 +1691,7 @@ void WrappedSolidTypeProperty::setPropertyValue( const 
Any& rOuterValue, const R
 
 bool bFound = false;
 bool bAmbiguous = false;
-sal_Int32 nOldSolidType = DiagramHelper::getGeometry3D( xDiagram, bFound, 
bAmbiguous );
+sal_Int32 nOldSolidType = xDiagram->getGeometry3D( bFound, bAmbiguous );
 if( bFound && ( nOldSolidType != nNewSolidType || bAmbiguous ) )
 xDiagram->setGeometry3D( nNewSolidType );
 }
@@ -1703,7 +1703,7 @@ Any WrappedSolidTypeProperty::getPropertyValue( const 
Reference< beans::XPropert
 {
 bool bFound = false;
 bool bAmbiguous = false;
-sal_Int32 nGeometry = DiagramHelper::getGeometry3D( xDiagram, bFound, 
bAmbiguous );
+sal_Int32 nGeometry = xDiagram->getGeometry3D( bFound, bAmbiguous );
 if( bFound )
 m_aOuterValue <<= nGeometry;
 }
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index a63afad3786d..680c8f92fe30 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -174,6 +174,8 @@ public:
 
 void setGeometry3D( sal_Int32 nNewGeometry );
 
+sal_Int32 getGeometry3D( bool& rbFound, bool& rbAmbiguous );
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/DiagramHelper.hxx 
b/chart2/source/inc/DiagramHelper.hxx
index 254c27387bd6..e9b719f3abcb 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -267,10 +267,6 @@ public:
 
 static bool isPieOrDonutChart( const rtl::Reference< ::chart::Diagram >& 
xDiagram );
 
-static sal_Int32 getGeometry3D(
-const rtl::Reference< ::chart::Diagram > & xDiagram,
-bool& rbFound, bool& rbAmbiguous );
-
 static bool setDiagramPositioning( const 
rtl::Reference<::chart::ChartModel>& xChartModel,
 const css::awt::Rectangle& rPosRect /*100th mm*/ );
 
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index ec7272a28da8..14f4de16404c 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -38,6 +38,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -761,6 +762,49 @@ void Diagram::setGeometry3D( sal_Int32 nNewGeometry )
 }
 }
 
+sal_Int32 Diagram::getGeometry3D( bool& rbFound, bool& rbAmbiguous )
+{
+sal_Int32 nCommonGeom( css::chart2::DataPointGeometry3D::CUBOID );
+rbFound = false;
+rbAmbiguous = false;
+
+std::vector< rtl::Reference< DataSeries > > aSeriesVec =
+DiagramHelper::getDataSeriesFromDiagram( this );
+
+if( aSeriesVec.empty())
+rbAmbiguous = true;
+
+for (auto const& series : aSeriesVec)
+{
+try
+{
+sal_Int32 nGeom = 0;
+if( series->getPropertyValue( "Geometry3D") >>= nGeom )
+{
+if( ! rbFound )
+{
+// first series
+nCommonGeom = nGeom;
+rbFound = true;
+}
+// further series: compare for uniqueness
+else if( nCommonGeom != nGeom )
+{
+rbAmbiguous = true;
+break;
+}
+}
+}
+catch( const uno::Exception & )
+{
+DBG_UNHANDLED_EXCEPTION("chart2");
+}
+}
+
+return nCommonGeom;
+}
+
+
 
 } //  namespace chart
 
diff --git a/chart2/source/model/template/BarChartTypeTemplate.cxx 
b/chart2/source/model/template/BarChartTypeTemplate.cxx
index 58a3196df3bd..51f01db94f0b 100644
--- a/chart2/source/model/template/BarChartTypeTemplate.cxx
+++ b/chart2/source/model/template/BarChartTy

[Libreoffice-commits] core.git: chart2/source

2023-03-16 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx |2 -
 chart2/source/inc/Diagram.hxx   |2 +
 chart2/source/inc/DiagramHelper.hxx |4 ---
 chart2/source/model/main/Diagram.cxx|   13 +++
 chart2/source/tools/DiagramHelper.cxx   |   14 
 5 files changed, 16 insertions(+), 19 deletions(-)

New commits:
commit b209507a57e4ff01c6a06a20d741083b3ddef69d
Author: Noel Grandin 
AuthorDate: Wed Mar 15 16:01:18 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 16 17:00:07 2023 +

move setGeometry3D inside chart2::Diagram

Change-Id: I3825349e3889c45bbb5cbc467dad2f100ccd2298
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148952
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 332c018d786b..b778e49af878 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1693,7 +1693,7 @@ void WrappedSolidTypeProperty::setPropertyValue( const 
Any& rOuterValue, const R
 bool bAmbiguous = false;
 sal_Int32 nOldSolidType = DiagramHelper::getGeometry3D( xDiagram, bFound, 
bAmbiguous );
 if( bFound && ( nOldSolidType != nNewSolidType || bAmbiguous ) )
-DiagramHelper::setGeometry3D( xDiagram, nNewSolidType );
+xDiagram->setGeometry3D( nNewSolidType );
 }
 
 Any WrappedSolidTypeProperty::getPropertyValue( const Reference< 
beans::XPropertySet >& /*xInnerPropertySet*/ ) const
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 99d9dc3aee65..a63afad3786d 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -172,6 +172,8 @@ public:
 sal_Int32 getCorrectedMissingValueTreatment(
 const rtl::Reference< ::chart::ChartType >& xChartType );
 
+void setGeometry3D( sal_Int32 nNewGeometry );
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/DiagramHelper.hxx 
b/chart2/source/inc/DiagramHelper.hxx
index 355516cf..254c27387bd6 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -271,10 +271,6 @@ public:
 const rtl::Reference< ::chart::Diagram > & xDiagram,
 bool& rbFound, bool& rbAmbiguous );
 
-static void setGeometry3D(
-const rtl::Reference< ::chart::Diagram > & xDiagram,
-sal_Int32 nNewGeometry );
-
 static bool setDiagramPositioning( const 
rtl::Reference<::chart::ChartModel>& xChartModel,
 const css::awt::Rectangle& rPosRect /*100th mm*/ );
 
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index bcbef67f5b41..ec7272a28da8 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include "Wall.hxx"
 #include 
@@ -748,6 +749,18 @@ sal_Int32 Diagram::getCorrectedMissingValueTreatment(
 return nResult;
 }
 
+void Diagram::setGeometry3D( sal_Int32 nNewGeometry )
+{
+std::vector< rtl::Reference< DataSeries > > aSeriesVec =
+DiagramHelper::getDataSeriesFromDiagram( this );
+
+for (auto const& series : aSeriesVec)
+{
+DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(
+series, "Geometry3D", uno::Any( nNewGeometry ));
+}
+}
+
 
 } //  namespace chart
 
diff --git a/chart2/source/tools/DiagramHelper.cxx 
b/chart2/source/tools/DiagramHelper.cxx
index d5cbf8b0bf7c..ec11f8c8799e 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -1398,20 +1398,6 @@ sal_Int32 DiagramHelper::getGeometry3D(
 return nCommonGeom;
 }
 
-void DiagramHelper::setGeometry3D(
-const rtl::Reference< Diagram > & xDiagram,
-sal_Int32 nNewGeometry )
-{
-std::vector< rtl::Reference< DataSeries > > aSeriesVec =
-DiagramHelper::getDataSeriesFromDiagram( xDiagram );
-
-for (auto const& series : aSeriesVec)
-{
-DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(
-series, "Geometry3D", uno::Any( nNewGeometry ));
-}
-}
-
 static void lcl_ensureRange0to1( double& rValue )
 {
 if(rValue<0.0)


[Libreoffice-commits] core.git: chart2/source

2023-03-16 Thread Noel Grandin (via logerrit)
 chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx |3 -
 chart2/source/inc/Diagram.hxx  |5 +
 chart2/source/inc/DiagramHelper.hxx|5 -
 chart2/source/model/main/Diagram.cxx   |   28 
++
 chart2/source/tools/DiagramHelper.cxx  |   26 
-
 chart2/source/view/main/SeriesPlotterContainer.cxx |2 
 6 files changed, 35 insertions(+), 34 deletions(-)

New commits:
commit d14a83bf989d09e27ab3b787f4d3dcac087c9f0d
Author: Noel Grandin 
AuthorDate: Wed Mar 15 15:33:12 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 16 09:36:35 2023 +

move getCorrectedMissingValueTreatment inside chart2::Diagram

and also switch to using getFastPropertyValue

Change-Id: I0c6617841a364ccb8e1c7b624e1ef6fde28426d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148928
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git 
a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index 568ca28639c4..2af1e694156f 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -130,8 +130,7 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter(
 }
 
 m_aSupportedMissingValueTreatments = 
ChartTypeHelper::getSupportedMissingValueTreatments( xChartType );
-m_nMissingValueTreatment = 
DiagramHelper::getCorrectedMissingValueTreatment(
-ChartModelHelper::findDiagram(m_xChartModel), xChartType );
+m_nMissingValueTreatment = 
xDiagram->getCorrectedMissingValueTreatment( xChartType );
 
 uno::Reference< beans::XPropertySet > xProp( 
m_xChartModel->getDataProvider(), uno::UNO_QUERY );
 if( xProp.is() )
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index d9c4b17aa283..99d9dc3aee65 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -39,6 +39,7 @@ namespace com::sun::star::uno { class XComponentContext; }
 namespace chart
 {
 class BaseCoordinateSystem;
+class ChartType;
 class Legend;
 class DataTable;
 class Wall;
@@ -167,6 +168,10 @@ public:
 
 DiagramPositioningMode getDiagramPositioningMode();
 
+//returns integer from constant group css::chart::MissingValueTreatment
+sal_Int32 getCorrectedMissingValueTreatment(
+const rtl::Reference< ::chart::ChartType >& xChartType );
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/DiagramHelper.hxx 
b/chart2/source/inc/DiagramHelper.hxx
index 0798a3305021..355516cf 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -275,11 +275,6 @@ public:
 const rtl::Reference< ::chart::Diagram > & xDiagram,
 sal_Int32 nNewGeometry );
 
-//returns integer from constant group css::chart::MissingValueTreatment
-static sal_Int32 getCorrectedMissingValueTreatment(
-const rtl::Reference< ::chart::Diagram > & xDiagram,
-const rtl::Reference< ::chart::ChartType >& xChartType );
-
 static bool setDiagramPositioning( const 
rtl::Reference<::chart::ChartModel>& xChartModel,
 const css::awt::Rectangle& rPosRect /*100th mm*/ );
 
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index cda52d52a5bc..bcbef67f5b41 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -38,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -721,6 +723,32 @@ DiagramPositioningMode Diagram::getDiagramPositioningMode()
 }
 
 
+sal_Int32 Diagram::getCorrectedMissingValueTreatment(
+const rtl::Reference< ChartType >& xChartType )
+{
+sal_Int32 nResult = css::chart::MissingValueTreatment::LEAVE_GAP;
+const uno::Sequence < sal_Int32 > aAvailableMissingValueTreatments(
+ChartTypeHelper::getSupportedMissingValueTreatments( 
xChartType ) );
+
+if( getFastPropertyValue( PROP_DIAGRAM_MISSING_VALUE_TREATMENT ) >>= 
nResult )
+{
+//ensure that the set value is supported by this charttype
+for( sal_Int32 n : aAvailableMissingValueTreatments )
+if( n == nResult )
+return nResult; //ok
+}
+
+//otherwise use the first supported one
+if( aAvailableMissingValueTreatments.hasElements() )
+{
+nResult = aAvailableMissingValueTreatments[0];
+return nResult;
+}
+
+return nResult;
+}
+
+
 } //  namespace chart
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
diff --git a/chart2/source/tools/Diagra

[Libreoffice-commits] core.git: chart2/source

2023-03-15 Thread Noel Grandin (via logerrit)
 chart2/source/tools/ObjectIdentifier.cxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit dcf65e4ce94840ea2072eb968a30c81ded0f21cf
Author: Noel Grandin 
AuthorDate: Wed Mar 15 11:38:05 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 16 06:27:42 2023 +

use more OUStringLiteral in chart2::ObjectIdentifier

Change-Id: I9387b6f5f65c030a6ddea47b34927b613533ff26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148913
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/tools/ObjectIdentifier.cxx 
b/chart2/source/tools/ObjectIdentifier.cxx
index 366c32d5dd4c..e13feb1277d1 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -57,10 +57,10 @@ using namespace ::com::sun::star::chart2;
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::Any;
 
-const sal_Unicode m_aMultiClick[] = u"MultiClick";
-const sal_Unicode m_aDragMethodEquals[] = u"DragMethod=";
-const sal_Unicode m_aDragParameterEquals[] = u"DragParameter=";
-const sal_Unicode m_aProtocol[] = u"CID/";
+const OUStringLiteral m_aMultiClick = u"MultiClick";
+const OUStringLiteral m_aDragMethodEquals = u"DragMethod=";
+const OUStringLiteral m_aDragParameterEquals = u"DragParameter=";
+const OUStringLiteral m_aProtocol = u"CID/";
 const OUString m_aPieSegmentDragMethodServiceName("PieSegmentDragging");
 
 namespace
@@ -442,7 +442,7 @@ OUString 
ObjectIdentifier::createClassifiedIdentifierForParticles(
 
 OUStringBuffer aRet( m_aProtocol );
 aRet.append( lcl_createClassificationStringForType( eObjectType, 
rDragMethodServiceName, rDragParameterString ));
-if(o3tl::make_unsigned(aRet.getLength()) >= std::size(m_aProtocol))
+if(aRet.getLength() > m_aProtocol.getLength())
 aRet.append("/");
 
 if(!rParentParticle.empty())
@@ -571,7 +571,7 @@ OUString 
ObjectIdentifier::createClassifiedIdentifierWithParent(
 
 OUStringBuffer aRet( m_aProtocol );
 aRet.append( lcl_createClassificationStringForType( eObjectType, 
rDragMethodServiceName, rDragParameterString ));
-if(o3tl::make_unsigned(aRet.getLength()) >= std::size(m_aProtocol))
+if(aRet.getLength() > m_aProtocol.getLength())
 aRet.append("/");
 aRet.append(rParentPartical);
 if(!rParentPartical.empty())
@@ -747,7 +747,7 @@ bool ObjectIdentifier::isMultiClickObject( 
std::u16string_view rClassifiedIdenti
 //was selected before;
 
 //! by definition the name of a MultiClickObject starts with 
"CID/MultiClick:"
-bool bRet = o3tl::starts_with(rClassifiedIdentifier.substr( 
std::size(m_aProtocol)-1 ), m_aMultiClick);
+bool bRet = o3tl::starts_with(rClassifiedIdentifier.substr( 
m_aProtocol.getLength() ), m_aMultiClick);
 return bRet;
 }
 


[Libreoffice-commits] core.git: chart2/source

2023-03-15 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx |4 ++--
 chart2/source/inc/Diagram.hxx   |6 ++
 chart2/source/model/main/Diagram.cxx|6 +++---
 chart2/source/view/main/SeriesPlotterContainer.cxx  |2 +-
 4 files changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 61ed494b4acd7664c03a19577c67c9b2c2dec59a
Author: Noel Grandin 
AuthorDate: Wed Mar 15 09:10:55 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 16 06:27:18 2023 +

convert DiagramPositioningMode to scoped enum

Change-Id: I235a9e8bc4fa5406ff71f70c65038127716d58e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148907
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx 
b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
index 50bedc860974..b9ba429433e2 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
@@ -196,7 +196,7 @@ awt::Rectangle 
Chart2ModelContact::GetDiagramRectangleIncludingAxes() const
 awt::Rectangle aRect(0,0,0,0);
 rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( 
m_xChartModel );
 
-if( xDiagram && xDiagram->getDiagramPositioningMode() == 
DiagramPositioningMode_INCLUDING )
+if( xDiagram && xDiagram->getDiagramPositioningMode() == 
DiagramPositioningMode::Including )
 aRect = 
DiagramHelper::getDiagramRectangleFromModel(m_xChartModel.get());
 else
 {
@@ -212,7 +212,7 @@ awt::Rectangle 
Chart2ModelContact::GetDiagramRectangleExcludingAxes() const
 awt::Rectangle aRect(0,0,0,0);
 rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( 
m_xChartModel );
 
-if( xDiagram && xDiagram->getDiagramPositioningMode() == 
DiagramPositioningMode_EXCLUDING )
+if( xDiagram && xDiagram->getDiagramPositioningMode() == 
DiagramPositioningMode::Excluding )
 aRect = 
DiagramHelper::getDiagramRectangleFromModel(m_xChartModel.get());
 else
 {
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 3844b34d7638..d9c4b17aa283 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -43,11 +43,9 @@ class Legend;
 class DataTable;
 class Wall;
 
-enum DiagramPositioningMode
+enum class DiagramPositioningMode
 {
-DiagramPositioningMode_AUTO,
-DiagramPositioningMode_EXCLUDING,
-DiagramPositioningMode_INCLUDING
+Auto, Excluding, Including
 };
 
 
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index 7fbc3459fc49..cda52d52a5bc 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -704,7 +704,7 @@ css::uno::Sequence< OUString > SAL_CALL 
Diagram::getSupportedServiceNames()
 
 DiagramPositioningMode Diagram::getDiagramPositioningMode()
 {
-DiagramPositioningMode eMode = DiagramPositioningMode_AUTO;
+DiagramPositioningMode eMode = DiagramPositioningMode::Auto;
 chart2::RelativePosition aRelPos;
 chart2::RelativeSize aRelSize;
 if( (getFastPropertyValue(PROP_DIAGRAM_REL_POS) >>= aRelPos ) &&
@@ -713,9 +713,9 @@ DiagramPositioningMode Diagram::getDiagramPositioningMode()
 bool bPosSizeExcludeAxes=false;
 getFastPropertyValue(PROP_DIAGRAM_POSSIZE_EXCLUDE_LABELS) >>= 
bPosSizeExcludeAxes;
 if( bPosSizeExcludeAxes )
-eMode = DiagramPositioningMode_EXCLUDING;
+eMode = DiagramPositioningMode::Excluding;
 else
-eMode = DiagramPositioningMode_INCLUDING;
+eMode = DiagramPositioningMode::Including;
 }
 return eMode;
 }
diff --git a/chart2/source/view/main/SeriesPlotterContainer.cxx 
b/chart2/source/view/main/SeriesPlotterContainer.cxx
index 9f409d0b43b7..bb699e3378c1 100644
--- a/chart2/source/view/main/SeriesPlotterContainer.cxx
+++ b/chart2/source/view/main/SeriesPlotterContainer.cxx
@@ -228,7 +228,7 @@ void 
SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChart
 = 
ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault(xChartType);
 
 bool bExcludingPositioning
-= xDiagram->getDiagramPositioningMode() == 
DiagramPositioningMode_EXCLUDING;
+= xDiagram->getDiagramPositioningMode() == 
DiagramPositioningMode::Excluding;
 VSeriesPlotter* pPlotter = VSeriesPlotter::createSeriesPlotter(
 xChartType, nDimensionCount, bExcludingPositioning);
 if (!pPlotter)


[Libreoffice-commits] core.git: chart2/source dbaccess/source editeng/source

2023-03-15 Thread NirnayK (via logerrit)
 chart2/source/controller/dialogs/tp_AxisPositions.cxx |2 +-
 dbaccess/source/ui/app/AppController.cxx  |2 +-
 editeng/source/outliner/outliner.cxx  |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 158be75c71a2a22f108685bc03c64dbac77e9b73
Author: NirnayK 
AuthorDate: Mon Mar 6 18:30:00 2023 +0530
Commit: Andreas Heinisch 
CommitDate: Wed Mar 15 13:43:03 2023 +

tdf#114441: Convert use of sal_uLong to better integer types

In tp_AxisPosition.cxx the sal_uLong has been changed to sal_uInt32 as the 
GetValue returns a 32 bit integer
In outliner.cxx the sal_uLong is converted to sal_uInt64 as the the sum of 
2 sal_uInt32 might exceed 32 bits


Change-Id: I560faf952520078f6a0747dfdec8a3039927e5c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148335
Reviewed-by: Andreas Heinisch 
Tested-by: Andreas Heinisch 

diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx 
b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index dc1eb926ecfd..8a31c73f3dfc 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -262,7 +262,7 @@ void AxisPositionsTabPage::SetNumFormatter( 
SvNumberFormatter* pFormatter )
 
 if( const SfxUInt32Item* pNumFormatItem = 
GetItemSet().GetItemIfSet(SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT) )
 {
-sal_uLong nFmt = pNumFormatItem->GetValue();
+sal_uInt32 nFmt = pNumFormatItem->GetValue();
 rCrossFormatter.SetFormatKey(nFmt);
 }
 }
diff --git a/dbaccess/source/ui/app/AppController.cxx 
b/dbaccess/source/ui/app/AppController.cxx
index bb16c0173ff4..ad18bff5892c 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1025,7 +1025,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, 
const Sequence< PropertyVa
 {
 if ( pIter->Name == "FormatStringId" )
 {
-sal_uLong nTmp;
+sal_uInt32 nTmp;
 if ( pIter->Value >>= nTmp )
 
pasteFormat(static_cast(nTmp));
 break;
diff --git a/editeng/source/outliner/outliner.cxx 
b/editeng/source/outliner/outliner.cxx
index fa0e7958ce79..72340587ba05 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -359,7 +359,7 @@ sal_Int32 Outliner::GetBulletsNumberingStatus() const
 
 std::optional Outliner::CreateParaObject( sal_Int32 
nStartPara, sal_Int32 nCount ) const
 {
-if ( static_cast(nStartPara) + nCount >
+if ( static_cast(nStartPara) + nCount >
 o3tl::make_unsigned(pParaList->GetParagraphCount()) )
 nCount = pParaList->GetParagraphCount() - nStartPara;
 


[Libreoffice-commits] core.git: chart2/source

2023-03-15 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx |8 +--
 chart2/source/inc/Diagram.hxx   |   10 
 chart2/source/inc/DiagramHelper.hxx |9 
 chart2/source/model/main/Diagram.cxx|   19 
 chart2/source/tools/DiagramHelper.cxx   |   22 
--
 chart2/source/view/main/SeriesPlotterContainer.cxx  |4 -
 6 files changed, 35 insertions(+), 37 deletions(-)

New commits:
commit 8d024174dcb95c86400f47556738d092487ce429
Author: Noel Grandin 
AuthorDate: Wed Mar 15 09:08:32 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 15 13:24:43 2023 +

move getDiagramPositioningMode inside chart2::Diagram

and also switch to using getFastPropertyValue

Change-Id: Idef712def160abb500770aceedf6d94d385e5da3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148906
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx 
b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
index 6e6648272dc2..50bedc860974 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
@@ -194,9 +194,9 @@ awt::Rectangle 
Chart2ModelContact::GetDiagramRectangleIncludingTitle() const
 awt::Rectangle Chart2ModelContact::GetDiagramRectangleIncludingAxes() const
 {
 awt::Rectangle aRect(0,0,0,0);
-rtl::Reference< Diagram > xDiagram =  ChartModelHelper::findDiagram( 
m_xChartModel );
+rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( 
m_xChartModel );
 
-if( DiagramHelper::getDiagramPositioningMode( xDiagram ) == 
DiagramPositioningMode_INCLUDING )
+if( xDiagram && xDiagram->getDiagramPositioningMode() == 
DiagramPositioningMode_INCLUDING )
 aRect = 
DiagramHelper::getDiagramRectangleFromModel(m_xChartModel.get());
 else
 {
@@ -210,9 +210,9 @@ awt::Rectangle 
Chart2ModelContact::GetDiagramRectangleIncludingAxes() const
 awt::Rectangle Chart2ModelContact::GetDiagramRectangleExcludingAxes() const
 {
 awt::Rectangle aRect(0,0,0,0);
-rtl::Reference< Diagram > xDiagram =  ChartModelHelper::findDiagram( 
m_xChartModel );
+rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( 
m_xChartModel );
 
-if( DiagramHelper::getDiagramPositioningMode( xDiagram ) == 
DiagramPositioningMode_EXCLUDING )
+if( xDiagram && xDiagram->getDiagramPositioningMode() == 
DiagramPositioningMode_EXCLUDING )
 aRect = 
DiagramHelper::getDiagramRectangleFromModel(m_xChartModel.get());
 else
 {
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index f343bba7ca57..3844b34d7638 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -43,6 +43,14 @@ class Legend;
 class DataTable;
 class Wall;
 
+enum DiagramPositioningMode
+{
+DiagramPositioningMode_AUTO,
+DiagramPositioningMode_EXCLUDING,
+DiagramPositioningMode_INCLUDING
+};
+
+
 namespace impl
 {
 typedef ::cppu::WeakImplHelper<
@@ -159,6 +167,8 @@ public:
 return m_xDataTable;
 };
 
+DiagramPositioningMode getDiagramPositioningMode();
+
 private:
 //  XModifyListener 
 virtual void SAL_CALL modified(
diff --git a/chart2/source/inc/DiagramHelper.hxx 
b/chart2/source/inc/DiagramHelper.hxx
index f874a1afafa7..0798a3305021 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -51,13 +51,6 @@ class DataSeries;
 class Diagram;
 class LabeledDataSequence;
 
-enum DiagramPositioningMode
-{
-DiagramPositioningMode_AUTO,
-DiagramPositioningMode_EXCLUDING,
-DiagramPositioningMode_INCLUDING
-};
-
 class OOO_DLLPUBLIC_CHARTTOOLS DiagramHelper
 {
 public:
@@ -287,8 +280,6 @@ public:
 const rtl::Reference< ::chart::Diagram > & xDiagram,
 const rtl::Reference< ::chart::ChartType >& xChartType );
 
-static DiagramPositioningMode getDiagramPositioningMode( const 
rtl::Reference< ::chart::Diagram > & xDiagram );
-
 static bool setDiagramPositioning( const 
rtl::Reference<::chart::ChartModel>& xChartModel,
 const css::awt::Rectangle& rPosRect /*100th mm*/ );
 
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index 17cf8ecd63ae..7fbc3459fc49 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -702,6 +702,25 @@ css::uno::Sequence< OUString > SAL_CALL 
Diagram::getSupportedServiceNames()
 "com.sun.star.beans.PropertySet" };
 }
 
+DiagramPositioningMode Diagram::getDiagramPositioningMode()
+{
+DiagramPositioningMode eMode = DiagramPositioningMode_AUTO;
+chart2::RelativePosition aRelPos;
+chart2::RelativeSize aRelSize;
+if( (getFastPropertyValue(PROP_DIAGRAM_REL_POS) >>= aRelPos ) &&
+(g

[Libreoffice-commits] core.git: chart2/source

2023-03-10 Thread Noel Grandin (via logerrit)
 chart2/source/inc/ConfigColorScheme.hxx   |2 +-
 chart2/source/tools/ConfigColorScheme.cxx |   22 +++---
 2 files changed, 8 insertions(+), 16 deletions(-)

New commits:
commit f74490877aae984d2991e18118baae797db04e92
Author: Noel Grandin 
AuthorDate: Fri Mar 10 12:41:11 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 10 18:51:53 2023 +

simplify ConfigColorScheme

there is only one property that we are interested in

Change-Id: I5c2b80e7ade38c822f495b79bda7e541b191199a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148603
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/inc/ConfigColorScheme.hxx 
b/chart2/source/inc/ConfigColorScheme.hxx
index 0cf65d0307ec..8375c600277e 100644
--- a/chart2/source/inc/ConfigColorScheme.hxx
+++ b/chart2/source/inc/ConfigColorScheme.hxx
@@ -54,7 +54,7 @@ public:
 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() 
override;
 
 //  ConfigItemListener 
-void notify( std::u16string_view rPropertyName );
+void notify();
 
 protected:
 //  XColorScheme 
diff --git a/chart2/source/tools/ConfigColorScheme.cxx 
b/chart2/source/tools/ConfigColorScheme.cxx
index f6bbfe232dd2..b3b77ac2a212 100644
--- a/chart2/source/tools/ConfigColorScheme.cxx
+++ b/chart2/source/tools/ConfigColorScheme.cxx
@@ -53,7 +53,6 @@ class ChartConfigItem : public ::utl::ConfigItem
 public:
 explicit ChartConfigItem( ConfigColorScheme & rListener );
 
-void addPropertyNotification( const OUString & rPropertyName );
 uno::Any getProperty( const OUString & aPropertyName );
 
 protected:
@@ -63,32 +62,27 @@ protected:
 
 private:
 ConfigColorScheme &  m_rListener;
-std::set< OUString >   m_aPropertiesToNotify;
 };
 
 ChartConfigItem::ChartConfigItem( ConfigColorScheme & rListener ) :
 ::utl::ConfigItem( "Office.Chart/DefaultColor" ),
 m_rListener( rListener )
-{}
+{
+EnableNotification( { aSeriesPropName } );
+}
 
 void ChartConfigItem::Notify( const Sequence< OUString > & aPropertyNames )
 {
 for( OUString const & s : aPropertyNames )
 {
-if( m_aPropertiesToNotify.find( s ) != m_aPropertiesToNotify.end())
-m_rListener.notify( s );
+if( s == aSeriesPropName )
+m_rListener.notify();
 }
 }
 
 void ChartConfigItem::ImplCommit()
 {}
 
-void ChartConfigItem::addPropertyNotification( const OUString & rPropertyName )
-{
-m_aPropertiesToNotify.insert( rPropertyName );
-EnableNotification( comphelper::containerToSequence( m_aPropertiesToNotify 
));
-}
-
 uno::Any ChartConfigItem::getProperty( const OUString & aPropertyName )
 {
 Sequence< uno::Any > aValues(
@@ -122,7 +116,6 @@ void ConfigColorScheme::retrieveConfigColors()
 {
 m_apChartConfigItem.reset(
 new impl::ChartConfigItem( *this ));
-m_apChartConfigItem->addPropertyNotification( aSeriesPropName );
 }
 assert(m_apChartConfigItem && "this can only be set at this point");
 
@@ -155,10 +148,9 @@ void ConfigColorScheme::retrieveConfigColors()
 return nDefaultColors[ nIndex % nMaxDefaultColors ];
 }
 
-void ConfigColorScheme::notify( std::u16string_view rPropertyName )
+void ConfigColorScheme::notify()
 {
-if( rPropertyName == aSeriesPropName )
-m_bNeedsUpdate = true;
+m_bNeedsUpdate = true;
 }
 
 OUString SAL_CALL ConfigColorScheme::getImplementationName()


[Libreoffice-commits] core.git: chart2/source

2023-03-01 Thread Noel Grandin (via logerrit)
 chart2/source/view/inc/VDataSeries.hxx  |   27 +-
 chart2/source/view/main/VDataSeries.cxx |   82 
 2 files changed, 55 insertions(+), 54 deletions(-)

New commits:
commit 4def1399b17792e14882152c58b7f1f8d46aedfd
Author: Noel Grandin 
AuthorDate: Wed Mar 1 12:00:29 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 1 13:11:32 2023 +

allocate cached values inline in VDataSeries

to reduce pointer chasing - these values are all small

Change-Id: I96782494f2657bf35c06136b4b87f29fdd2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148039
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/view/inc/VDataSeries.hxx 
b/chart2/source/view/inc/VDataSeries.hxx
index 29a71918b549..0ab4fffe0e93 100644
--- a/chart2/source/view/inc/VDataSeries.hxx
+++ b/chart2/source/view/inc/VDataSeries.hxx
@@ -20,7 +20,9 @@
 
 #include "PropertyMapper.hxx"
 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -34,8 +36,6 @@ namespace com::sun::star::beans { class XPropertySet; }
 namespace com::sun::star::chart2 { class XChartType; }
 namespace com::sun::star::chart2 { class XDataSeries; }
 namespace com::sun::star::chart2::data { class XDataSequence; }
-namespace com::sun::star::chart2 { struct DataPointLabel; }
-namespace com::sun::star::chart2 { struct Symbol; }
 namespace com::sun::star::drawing { class XShapes; }
 
 namespace chart
@@ -238,20 +238,19 @@ private: //member
 sal_Int32   m_nGlobalSeriesIndex;
 
 //some cached values for data labels as they are very expensive
-mutable std::unique_ptr
-m_apLabel_Series;
-mutable std::unique_ptrm_apLabelPropNames_Series;
-mutable std::unique_ptr m_apLabelPropValues_Series;
-mutable std::unique_ptr  m_apSymbolProperties_Series;
-
-mutable std::unique_ptr
-m_apLabel_AttributedPoint;
+mutable std::optional
+  m_oLabel_Series;
+mutable std::optional  m_oLabelPropNames_Series;
+mutable std::optional   m_oLabelPropValues_Series;
+mutable std::optionalm_oSymbolProperties_Series;
+
+mutable std::optional
+  m_oLabel_AttributedPoint;
 mutable std::unique_ptr
m_apLabelPropNames_AttributedPoint;
 mutable std::unique_ptr 
m_apLabelPropValues_AttributedPoint;
-mutable std::unique_ptr  
m_apSymbolProperties_AttributedPoint;
-mutable std::unique_ptr
-
m_apSymbolProperties_InvisibleSymbolForSelection;
-mutable sal_Int32   m_nCurrentAttributedPoint;
+mutable std::optional
m_oSymbolProperties_AttributedPoint;
+mutable std::optional
m_oSymbolProperties_InvisibleSymbolForSelection;
+mutable sal_Int32 m_nCurrentAttributedPoint;
 css::awt::Size m_aReferenceSize;
 
 sal_Int32   m_nMissingValueTreatment;
diff --git a/chart2/source/view/main/VDataSeries.cxx 
b/chart2/source/view/main/VDataSeries.cxx
index 81a975496d8e..d1dc3db8a09c 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -765,26 +765,26 @@ double VDataSeries::getYMeanValue() const
 return m_fYMeanValue;
 }
 
-static std::unique_ptr getSymbolPropertiesFromPropertySet( const 
uno::Reference< beans::XPropertySet >& xProp )
+static std::optional getSymbolPropertiesFromPropertySet( const 
uno::Reference< beans::XPropertySet >& xProp )
 {
-std::unique_ptr< Symbol > apSymbolProps( new Symbol() );
+Symbol aSymbolProps;
 try
 {
-if( xProp->getPropertyValue("Symbol") >>= *apSymbolProps )
+if( xProp->getPropertyValue("Symbol") >>= aSymbolProps )
 {
 //use main color to fill symbols
-xProp->getPropertyValue("Color") >>= apSymbolProps->FillColor;
+xProp->getPropertyValue("Color") >>= aSymbolProps.FillColor;
 // border of symbols always same as fill color
-apSymbolProps->BorderColor = apSymbolProps->FillColor;
+aSymbolProps.BorderColor = aSymbolProps.FillColor;
 }
 else
-apSymbolProps.reset();
+return std::nullopt;
 }
 catch(const uno::Exception &)
 {
 TOOLS_WARN_EXCEPTION("chart2", "" );
 }
-return apSymbolProps;
+return aSymbolProps;
 }
 
 Symbol* VDataSeries::getSymbolProperties( sal_Int32 index ) const
@@ -793,38 +793,38 @@ Symbol* VDataSeries::getSymbolProperties( sal_Int32 index 
) const
 if( isAttributedDataPoint( index ) )
 {
 adaptPointCache( index );
-if (!m_apSymbolProperties_AttributedPoint)
-m_apSymbolProperties_AttributedPoint
+if (!m_oSymbolProperties_Attribu

[Libreoffice-commits] core.git: chart2/source sw/qa

2023-02-27 Thread László Németh (via logerrit)
 chart2/source/controller/dialogs/DialogModel.cxx |   17 +
 sw/qa/uitest/writer_tests7/tdf132714.py  |   28 +++
 2 files changed, 40 insertions(+), 5 deletions(-)

New commits:
commit e706698353a7187f46ddbf0faf1f6f7772753df6
Author: László Németh 
AuthorDate: Mon Feb 27 13:56:01 2023 +0100
Commit: László Németh 
CommitDate: Mon Feb 27 22:46:29 2023 +

tdf#153859 sw: crash fix for setting chart with deleted data table

Opening Data Ranges dialog window of a chart with
deleted data table crashed Writer immediately.

Follow-up to commit 5b9855acc7fa6d1e4a5f53ff0bc47e1dd4729827
"tdf#132714 sw: fix crash at table row deletion associated
to a chart".

Change-Id: I96e901db75d40ae234f58827a957204bca13aa92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147893
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/chart2/source/controller/dialogs/DialogModel.cxx 
b/chart2/source/controller/dialogs/DialogModel.cxx
index 564343c62671..d6d1fbd71b97 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -631,13 +631,20 @@ void DialogModel::setCategories( const Reference< 
chart2::data::XLabeledDataSequ
 
 OUString DialogModel::getCategoriesRange() const
 {
-uno::Reference< chart2::data::XLabeledDataSequence > xLSeq( 
getCategories());
 OUString aRange;
-if( xLSeq.is())
+try
+{
+uno::Reference< chart2::data::XLabeledDataSequence > xLSeq( 
getCategories());
+if( xLSeq.is())
+{
+Reference< data::XDataSequence > xSeq( xLSeq->getValues());
+if( xSeq.is())
+aRange = xSeq->getSourceRangeRepresentation();
+}
+}
+catch (const lang::DisposedException&)
 {
-Reference< data::XDataSequence > xSeq( xLSeq->getValues());
-if( xSeq.is())
-aRange = xSeq->getSourceRangeRepresentation();
+TOOLS_WARN_EXCEPTION( "chart2", "unexpected exception caught" );
 }
 return aRange;
 }
diff --git a/sw/qa/uitest/writer_tests7/tdf132714.py 
b/sw/qa/uitest/writer_tests7/tdf132714.py
index 7ccedbeb6f4d..cad8ff24e80d 100644
--- a/sw/qa/uitest/writer_tests7/tdf132714.py
+++ b/sw/qa/uitest/writer_tests7/tdf132714.py
@@ -66,4 +66,32 @@ class tdf132714(UITestCase):
 # Without the fix in place, this test would have crashed here
 xToolkitRobot.mouseMove(xMouseEvent)
 
+def test_data_ranges(self):
+with self.ui_test.load_file(get_url_for_data_file("tdf132714.odt")) as 
document:
+
+# delete second row (first data row) in the associated text table 
of the chart
+self.xUITest.executeCommand(".uno:GoDown")
+self.xUITest.executeCommand(".uno:GoDown")
+# Without the fix in place, at this point crash occurs.
+self.xUITest.executeCommand(".uno:DeleteTable")
+
+# select embedded chart
+self.assertEqual(1, document.EmbeddedObjects.Count)
+
document.CurrentController.select(document.getEmbeddedObjects().getByIndex(0))
+self.assertEqual("SwXTextEmbeddedObject", 
document.CurrentSelection.getImplementationName())
+
+xChartMainTop = self.xUITest.getTopFocusWindow()
+xWriterEdit = xChartMainTop.getChild("writer_edit")
+# edit object by pressing Enter
+xWriterEdit.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"RETURN"}))
+
+# open DataRanges dialog window
+xChartMain = xChartMainTop.getChild("chart_window")
+xSeriesObj =  xChartMain.getChild("CID/Page=")
+
+# Without the fix in place, this test would have crashed here
+with self.ui_test.execute_dialog_through_action(xSeriesObj, 
"COMMAND", mkPropertyValues({"COMMAND": "DataRanges"})) as xDialog:
+pass
+
+
 # vim: set shiftwidth=4 softtabstop=4 expandtab:


[Libreoffice-commits] core.git: chart2/source sw/qa sw/source

2023-02-27 Thread László Németh (via logerrit)
 chart2/source/controller/dialogs/ObjectNameProvider.cxx |   26 +
 chart2/source/tools/DataSeriesHelper.cxx|   13 +++-
 sw/qa/uitest/writer_tests7/tdf132714.py |   46 
 sw/source/core/unocore/unochart.cxx |   25 +---
 4 files changed, 89 insertions(+), 21 deletions(-)

New commits:
commit 4f2dcc4bc70c3602e2612dab611b610410637920
Author: László Németh 
AuthorDate: Mon Feb 27 11:20:09 2023 +0100
Commit: László Németh 
CommitDate: Mon Feb 27 15:22:52 2023 +

tdf#153858 sw: crash fix for chart with deleted data table

Using mouse, e.g. simply moving the mouse pointer
during editing a chart with a deleted data table
crashed Writer immediately.

Follow-up to commit 5b9855acc7fa6d1e4a5f53ff0bc47e1dd4729827
"tdf#132714 sw: fix crash at table row deletion associated
to a chart".

Change-Id: I6d89eabc84565c548e2d9ded922789d623367ce4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147882
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx 
b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index 2bf6af62..c60ff1ca364a 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -124,13 +124,15 @@ OUString lcl_getDataPointValueText( const rtl::Reference< 
DataSeries >& xSeries,
 uno::Reference  xDataSequence( 
aDataSequences[nN]->getValues());
 if( !xDataSequence.is() )
 continue;
-Sequence< Any > aData( xDataSequence->getData() );
-if( nPointIndex >= aData.getLength() )
-continue;
-uno::Reference xProp(xDataSequence, 
uno::UNO_QUERY );
-if( xProp.is())
+
+try
 {
-try
+Sequence< Any > aData( xDataSequence->getData() );
+
+if( nPointIndex >= aData.getLength() )
+continue;
+uno::Reference xProp(xDataSequence, 
uno::UNO_QUERY );
+if( xProp.is())
 {
 uno::Any aARole = xProp->getPropertyValue( "Role" );
 OUString aRole;
@@ -179,10 +181,14 @@ OUString lcl_getDataPointValueText( const rtl::Reference< 
DataSeries >& xSeries,
 a_Size = aNumberFormatterWrapper.getFormattedString( 
nNumberFormatKey, fValue, nLabelColor, bColorChanged );
 }
 }
-catch( const uno::Exception& )
-{
-TOOLS_WARN_EXCEPTION("chart2", "" );
-}
+}
+catch (const lang::DisposedException&)
+{
+TOOLS_WARN_EXCEPTION( "chart2", "unexpected exception caught" );
+}
+catch( const uno::Exception& )
+{
+TOOLS_WARN_EXCEPTION("chart2", "" );
 }
 }
 
diff --git a/chart2/source/tools/DataSeriesHelper.cxx 
b/chart2/source/tools/DataSeriesHelper.cxx
index 52c4c0637179..a2c25366dd3a 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -208,10 +208,17 @@ uno::Reference< chart2::data::XLabeledDataSequence >
 if( ! xSource.is())
 return aNoResult;
 const Sequence< Reference< chart2::data::XLabeledDataSequence > > 
aLabeledSeq( xSource->getDataSequences());
-for (auto const & i : aLabeledSeq)
+try
+{
+for (auto const & i : aLabeledSeq)
+{
+if (lcl_MatchesRole(aRole, bMatchPrefix)(i))
+return i;
+}
+}
+catch (const lang::DisposedException&)
 {
-if (lcl_MatchesRole(aRole, bMatchPrefix)(i))
-return i;
+TOOLS_WARN_EXCEPTION( "chart2", "unexpected exception caught" );
 }
 
 return aNoResult;
diff --git a/sw/qa/uitest/writer_tests7/tdf132714.py 
b/sw/qa/uitest/writer_tests7/tdf132714.py
index 971db5f97ad3..7ccedbeb6f4d 100644
--- a/sw/qa/uitest/writer_tests7/tdf132714.py
+++ b/sw/qa/uitest/writer_tests7/tdf132714.py
@@ -8,6 +8,9 @@
 #
 from uitest.framework import UITestCase
 from uitest.uihelper.common import get_url_for_data_file
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from com.sun.star.awt import MouseButton
+from com.sun.star.awt import MouseEvent
 
 class tdf132714(UITestCase):
 def test_tdf132714(self):
@@ -20,4 +23,47 @@ class tdf132714(UITestCase):
 # Without the fix in place, at this point crash occurs.
 self.xUITest.executeCommand(".uno:DeleteRows")
 
+def test_delete_table(self):
+with self.ui_test.load_file(get_url_for_data_file("tdf132714.odt")) as 
document:
+
+# delete second row (first data row) in the associated text table 
of the chart
+self.xUITest.executeCommand(".uno:GoDown")
+self.xUITest.executeCommand(".uno:GoDown")
+# Without the fix in place, at this point crash occurs.
+self.

[Libreoffice-commits] core.git: chart2/source

2023-02-24 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx |   10 ++
 chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx |8 
 2 files changed, 10 insertions(+), 8 deletions(-)

New commits:
commit bd70713132fa92abcf7255ff151ffe8666948b40
Author: Noel Grandin 
AuthorDate: Thu Feb 23 11:04:22 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 24 11:06:11 2023 +

BaseMutex->std::mutex in UpDownBarWrapper

Change-Id: I24a4400b3d223be76af135bd3da710490f029194
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147580
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
index 6206878b2dbb..febfa344870b 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
@@ -126,7 +126,6 @@ namespace chart::wrapper
 UpDownBarWrapper::UpDownBarWrapper(
 bool bUp, std::shared_ptr spChart2ModelContact)
 : m_spChart2ModelContact(std::move( spChart2ModelContact ))
-, m_aEventListenerContainer( m_aMutex )
 , m_aPropertySetName( bUp ? OUString( "WhiteDay" ) : OUString( 
"BlackDay" ))
 {
 }
@@ -138,20 +137,23 @@ UpDownBarWrapper::~UpDownBarWrapper()
 //  XComponent 
 void SAL_CALL UpDownBarWrapper::dispose()
 {
+std::unique_lock g(m_aMutex);
 Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( 
this ) );
-m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
+m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( xSource ) 
);
 }
 
 void SAL_CALL UpDownBarWrapper::addEventListener(
 const Reference< lang::XEventListener >& xListener )
 {
-m_aEventListenerContainer.addInterface( xListener );
+std::unique_lock g(m_aMutex);
+m_aEventListenerContainer.addInterface( g, xListener );
 }
 
 void SAL_CALL UpDownBarWrapper::removeEventListener(
 const Reference< lang::XEventListener >& aListener )
 {
-m_aEventListenerContainer.removeInterface( aListener );
+std::unique_lock g(m_aMutex);
+m_aEventListenerContainer.removeInterface( g, aListener );
 }
 
 //XPropertySet
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx 
b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
index b1605a0f7282..740097fc3051 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
@@ -18,7 +18,7 @@
  */
 #pragma once
 
-#include 
+#include 
 
 #include 
 #include 
@@ -36,8 +36,7 @@ namespace chart::wrapper
 
 class Chart2ModelContact;
 
-class UpDownBarWrapper : public cppu::BaseMutex
-   , public ::cppu::WeakImplHelper
+class UpDownBarWrapper : public ::cppu::WeakImplHelper
 < css::lang::XComponent
 , css::lang::XServiceInfo
 , css::beans::XPropertySet
@@ -94,8 +93,9 @@ public:
 virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults( 
const css::uno::Sequence< OUString >& aPropertyNames ) override;
 
 private: //member
+std::mutex m_aMutex;
 std::shared_ptr< Chart2ModelContact >   m_spChart2ModelContact;
-::comphelper::OInterfaceContainerHelper3 
m_aEventListenerContainer;
+::comphelper::OInterfaceContainerHelper4 
m_aEventListenerContainer;
 
 OUString   m_aPropertySetName;
 };


[Libreoffice-commits] core.git: chart2/source

2023-02-23 Thread Noel Grandin (via logerrit)
 chart2/source/tools/RegressionCurveCalculator.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 37751d878b87765a4d2cfb50d0a39280c585ece1
Author: Noel Grandin 
AuthorDate: Thu Feb 23 12:11:48 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Feb 23 12:15:31 2023 +

blind fix for crashes in RegressionCurveCalculator

if mPeriod is < 0, then we could crash in calculateValuesCentral

Change-Id: I554b46ed7bf5b5b0a32fcf69829aa1c2c75833f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147508
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/tools/RegressionCurveCalculator.cxx 
b/chart2/source/tools/RegressionCurveCalculator.cxx
index fd2ca4329e42..8f22f9834bdc 100644
--- a/chart2/source/tools/RegressionCurveCalculator.cxx
+++ b/chart2/source/tools/RegressionCurveCalculator.cxx
@@ -75,6 +75,8 @@ void RegressionCurveCalculator::setRegressionProperties(
 sal_Int32   aPeriod,
 sal_Int32   nMovingType )
 {
+if( aPeriod < 0 )
+throw lang::IllegalArgumentException("aPeriod may not be < 0", 
static_cast(this), 3);
 mDegree = aDegree;
 mForceIntercept = aForceIntercept;
 mInterceptValue = aInterceptValue;


[Libreoffice-commits] core.git: chart2/source

2023-02-22 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx |   30 ++
 chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx |9 +--
 2 files changed, 24 insertions(+), 15 deletions(-)

New commits:
commit 24b3e4a5ba91d604ab68f49347ab065edaf48218
Author: Noel Grandin 
AuthorDate: Tue Feb 21 12:53:16 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Feb 22 10:06:40 2023 +

BaseMutex->std::mutex in ChartDataWrapper

Change-Id: Ieee3fc918a5a3acdb19a1d95c475d225e6d90355
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147401
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
index 0cde76dcf22c..c624f9074687 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
@@ -366,7 +366,6 @@ struct lcl_DateCategoriesOperator : public lcl_Operator
 
 ChartDataWrapper::ChartDataWrapper(std::shared_ptr 
spChart2ModelContact)
 : m_spChart2ModelContact(std::move(spChart2ModelContact))
-, m_aEventListenerContainer(m_aMutex)
 {
 osl_atomic_increment( &m_refCount );
 initDataAccess();
@@ -375,8 +374,7 @@ 
ChartDataWrapper::ChartDataWrapper(std::shared_ptr spChart2M
 
 ChartDataWrapper::ChartDataWrapper( std::shared_ptr 
spChart2ModelContact,
 const Reference< XChartData >& xNewData ) :
-m_spChart2ModelContact(std::move( spChart2ModelContact )),
-m_aEventListenerContainer( m_aMutex )
+m_spChart2ModelContact(std::move( spChart2ModelContact ))
 {
 osl_atomic_increment( &m_refCount );
 lcl_AllOperator aOperator( xNewData );
@@ -513,13 +511,15 @@ void SAL_CALL ChartDataWrapper::setDateCategories( const 
Sequence< double >& rDa
 void SAL_CALL ChartDataWrapper::addChartDataChangeEventListener(
 const uno::Reference< css::chart::XChartDataChangeEventListener >& 
aListener )
 {
-m_aEventListenerContainer.addInterface( aListener );
+std::unique_lock g(m_aMutex);
+m_aEventListenerContainer.addInterface( g, aListener );
 }
 
 void SAL_CALL ChartDataWrapper::removeChartDataChangeEventListener(
 const uno::Reference< css::chart::XChartDataChangeEventListener >& 
aListener )
 {
-m_aEventListenerContainer.removeInterface( aListener );
+std::unique_lock g(m_aMutex);
+m_aEventListenerContainer.removeInterface( g, aListener );
 }
 
 double SAL_CALL ChartDataWrapper::getNotANumber()
@@ -537,20 +537,23 @@ sal_Bool SAL_CALL ChartDataWrapper::isNotANumber( double 
nNumber )
 //  XComponent 
 void SAL_CALL ChartDataWrapper::dispose()
 {
-m_aEventListenerContainer.disposeAndClear( lang::EventObject( static_cast< 
::cppu::OWeakObject* >( this )));
+std::unique_lock g(m_aMutex);
+m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( 
static_cast< ::cppu::OWeakObject* >( this )));
 m_xDataAccess=nullptr;
 }
 
 void SAL_CALL ChartDataWrapper::addEventListener(
 const uno::Reference< lang::XEventListener > & xListener )
 {
-m_aEventListenerContainer.addInterface( xListener );
+std::unique_lock g(m_aMutex);
+m_aEventListenerContainer.addInterface( g, xListener );
 }
 
 void SAL_CALL ChartDataWrapper::removeEventListener(
 const uno::Reference< lang::XEventListener >& aListener )
 {
-m_aEventListenerContainer.removeInterface( aListener );
+std::unique_lock g(m_aMutex);
+m_aEventListenerContainer.removeInterface( g, aListener );
 }
 
 //  XEventListener 
@@ -560,7 +563,8 @@ void SAL_CALL ChartDataWrapper::disposing( const 
lang::EventObject& /* Source */
 
 void ChartDataWrapper::fireChartDataChangeEvent( 
css::chart::ChartDataChangeEvent& aEvent )
 {
-if( ! m_aEventListenerContainer.getLength() )
+std::unique_lock g(m_aMutex);
+if( ! m_aEventListenerContainer.getLength(g) )
 return;
 
 uno::Reference< uno::XInterface > xSrc( static_cast< cppu::OWeakObject* >( 
this ));
@@ -568,7 +572,13 @@ void ChartDataWrapper::fireChartDataChangeEvent( 
css::chart::ChartDataChangeEven
 if( xSrc.is() )
 aEvent.Source = xSrc;
 
-m_aEventListenerContainer.notifyEach( 
&css::chart::XChartDataChangeEventListener::chartDataChanged, aEvent );
+m_aEventListenerContainer.forEach( g,
+[&aEvent](const uno::Reference& l)
+{
+uno::Reference cl(l, 
uno::UNO_QUERY);
+if (cl)
+cl->chartDataChanged(aEvent);
+});
 }
 
 void ChartDataWrapper::switchToInternalDataProvider()
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx 
b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx
index 854602a23965..3c6602d4e028 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx
@@ -18,9 +18,8 @@
  */
 #pragma once
 

[Libreoffice-commits] core.git: chart2/source include/comphelper

2023-02-21 Thread Noel Grandin (via logerrit)
 chart2/source/controller/main/CommandDispatch.cxx   |   44 
 chart2/source/controller/main/CommandDispatch.hxx   |   15 +---
 chart2/source/controller/main/CommandDispatchContainer.cxx  |1 
 chart2/source/controller/main/ControllerCommandDispatch.cxx |2 
 chart2/source/controller/main/ControllerCommandDispatch.hxx |2 
 chart2/source/controller/main/DrawCommandDispatch.cxx   |2 
 chart2/source/controller/main/DrawCommandDispatch.hxx   |2 
 chart2/source/controller/main/ShapeController.cxx   |2 
 chart2/source/controller/main/ShapeController.hxx   |2 
 chart2/source/controller/main/StatusBarCommandDispatch.cxx  |2 
 chart2/source/controller/main/StatusBarCommandDispatch.hxx  |2 
 chart2/source/controller/main/UndoCommandDispatch.cxx   |2 
 chart2/source/controller/main/UndoCommandDispatch.hxx   |2 
 include/comphelper/compbase.hxx |4 -
 14 files changed, 37 insertions(+), 47 deletions(-)

New commits:
commit bdc4dc93a9edd5f46bdede12514ac5f66bf43167
Author: Noel Grandin 
AuthorDate: Tue Feb 21 14:26:39 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Feb 22 07:52:17 2023 +

BaseMutex->std::mutex in CommandDispatch

Change-Id: Ic73a84eb793d45e1041698e45e2c844a1e2f2f66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147415
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/main/CommandDispatch.cxx 
b/chart2/source/controller/main/CommandDispatch.cxx
index c7e4f622c522..37a56e151254 100644
--- a/chart2/source/controller/main/CommandDispatch.cxx
+++ b/chart2/source/controller/main/CommandDispatch.cxx
@@ -31,7 +31,6 @@ namespace chart
 
 CommandDispatch::CommandDispatch(
 const Reference< uno::XComponentContext > & xContext ) :
-impl::CommandDispatch_Base( m_aMutex ),
 m_xContext( xContext )
 {
 }
@@ -44,11 +43,11 @@ void CommandDispatch::initialize()
 
 //  WeakComponentImplHelperBase 
 /// is called when this is disposed
-void SAL_CALL CommandDispatch::disposing()
+void CommandDispatch::disposing(std::unique_lock& rGuard)
 {
 Reference< uno::XInterface > xEventSource(static_cast< cppu::OWeakObject* 
>( this ));
 for( auto& rElement : m_aListeners )
-rElement.second.disposeAndClear( xEventSource );
+rElement.second.disposeAndClear( rGuard, xEventSource );
 m_aListeners.clear();
 }
 
@@ -58,25 +57,29 @@ void SAL_CALL CommandDispatch::dispatch( const util::URL& 
/* URL */, const Seque
 
 void SAL_CALL CommandDispatch::addStatusListener( const Reference< 
frame::XStatusListener >& Control, const util::URL& URL )
 {
-tListenerMap::iterator aIt( m_aListeners.find( URL.Complete ));
-if( aIt == m_aListeners.end())
 {
-aIt = m_aListeners.emplace(
-std::piecewise_construct,
-std::forward_as_tuple(URL.Complete),
-std::forward_as_tuple( m_aMutex )).first;
-}
-assert( aIt != m_aListeners.end());
+std::unique_lock g(m_aMutex);
+tListenerMap::iterator aIt( m_aListeners.find( URL.Complete ));
+if( aIt == m_aListeners.end())
+{
+aIt = m_aListeners.emplace(
+std::piecewise_construct,
+std::forward_as_tuple(URL.Complete),
+std::forward_as_tuple()).first;
+}
+assert( aIt != m_aListeners.end());
 
-aIt->second.addInterface( Control );
+aIt->second.addInterface( g, Control );
+}
 fireStatusEvent( URL.Complete, Control );
 }
 
 void SAL_CALL CommandDispatch::removeStatusListener( const Reference< 
frame::XStatusListener >& Control, const util::URL& URL )
 {
+std::unique_lock g(m_aMutex);
 tListenerMap::iterator aIt( m_aListeners.find( URL.Complete ));
 if( aIt != m_aListeners.end())
-(*aIt).second.removeInterface( Control );
+(*aIt).second.removeInterface( g, Control );
 }
 
 //  XModifyListener 
@@ -127,19 +130,8 @@ void CommandDispatch::fireStatusEventForURL(
 tListenerMap::iterator aIt( m_aListeners.find( aURL.Complete ));
 if( aIt != m_aListeners.end())
 {
-::comphelper::OInterfaceIteratorHelper3 aIntfIt( aIt->second );
-
-while( aIntfIt.hasMoreElements())
-{
-try
-{
-aIntfIt.next()->statusChanged( aEventToSend );
-}
-catch( const uno::Exception & )
-{
-DBG_UNHANDLED_EXCEPTION("chart2");
-}
-}
+std::unique_lock g(m_aMutex);
+aIt->second.notifyEach(g, 
&css::frame::XStatusListener::statusChanged, aEventToSend);
 }
 }
 }
diff --git a/chart2/source/controller/main/CommandDispatch.hxx 
b/chart2/source/controller/main/CommandDispatch.hxx
index d156b8d8cf8d..41171

[Libreoffice-commits] core.git: chart2/source

2023-02-21 Thread Noel Grandin (via logerrit)
 chart2/source/inc/ErrorBar.hxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit cc0654cab158b73124cb9e079753482693f0bd5a
Author: Noel Grandin 
AuthorDate: Tue Feb 21 14:02:31 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Feb 22 07:42:23 2023 +

BaseMutex is unused in ErrorBar

Change-Id: I5e0890fcefedeaef4a8276c187d1604f8f96d23b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147414
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/inc/ErrorBar.hxx b/chart2/source/inc/ErrorBar.hxx
index bf31ed364d72..ed6d646be5a0 100644
--- a/chart2/source/inc/ErrorBar.hxx
+++ b/chart2/source/inc/ErrorBar.hxx
@@ -18,7 +18,6 @@
  */
 #pragma once
 
-#include 
 #include "charttoolsdllapi.hxx"
 
 #include 
@@ -57,9 +56,7 @@ typedef ::cppu::WeakImplHelper<
 ErrorBar_Base;
 }
 
-class ErrorBar final :
-public cppu::BaseMutex,
-public impl::ErrorBar_Base
+class ErrorBar final : public impl::ErrorBar_Base
 {
 private:
 OUString maDashName;


[Libreoffice-commits] core.git: chart2/source include/svx sd/source svx/source

2023-01-30 Thread Tomaž Vajngerl (via logerrit)
 chart2/source/view/main/DrawModelWrapper.cxx  |2 -
 include/svx/svdetc.hxx|3 --
 include/svx/svdmodel.hxx  |5 ---
 sd/source/core/drawdoc.cxx|1 
 sd/source/ui/app/sdxfer.cxx   |2 -
 svx/source/customshapes/EnhancedCustomShape3d.cxx |2 -
 svx/source/dialog/graphctl.cxx|3 --
 svx/source/svdraw/svdmodel.cxx|   31 ++
 svx/source/svdraw/svdograf.cxx|8 ++---
 svx/source/svdraw/svdotext.cxx|4 +-
 svx/source/svdraw/svdxcgv.cxx |   14 -
 svx/source/unodraw/UnoGraphicExporter.cxx |   17 
 12 files changed, 25 insertions(+), 67 deletions(-)

New commits:
commit 743dd1d3c1142c1c99b0844cc26dd0be91a1de40
Author: Tomaž Vajngerl 
AuthorDate: Mon Jan 30 14:44:01 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Jan 31 05:47:27 2023 +

SdrModel: we never set scale fraction to anything else than 1/1

This removes the scale fraction on SdrModel - SetScaleFraction and
the m_aObjUnit instance variable, as it is never set to anything
else than 1/1 (and don't see it usefult to set it to anything else
than this).

Change-Id: I990d20f110b3be00e6770b68e39df212f9c576be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146348
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/chart2/source/view/main/DrawModelWrapper.cxx 
b/chart2/source/view/main/DrawModelWrapper.cxx
index 6a6488435f97..1767d2ccdb6b 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -48,8 +48,6 @@ DrawModelWrapper::DrawModelWrapper()
 {
 m_xChartItemPool = ChartItemPool::CreateChartItemPool();
 
-SetScaleUnit(MapUnit::Map100thMM);
-SetScaleFraction(Fraction(1, 1));
 SetDefaultFontHeight(423); // 12pt
 
 SfxItemPool* pMasterPool = &GetItemPool();
diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx
index e6d448bfb691..266fba753f97 100644
--- a/include/svx/svdetc.hxx
+++ b/include/svx/svdetc.hxx
@@ -77,9 +77,6 @@ namespace SdrEngineDefaults
 // Incidentally, every newly instantiated SdrModel is assigned this 
MapMode by default.
 // Default MapUnit is MapUnit::Map100thMM
 inline MapUnit GetMapUnit() { return MapUnit::Map100thMM; }
-
-// Default MapFraction is 1/1.
-inline Fraction GetMapFraction() { return Fraction(1, 1); }
 };
 
 class SfxItemSet;
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 3eac3de05489..76c63a40d351 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -173,7 +173,6 @@ protected:
 std::vector> maPages;
 std::function)> m_aUndoLink;  // link 
to a NotifyUndo-Handler
 Size   m_aMaxObjSize; // e.g. for auto-growing text
-Fraction   m_aObjUnit;   // description of the coordinate units for 
ClipBoard, Drag&Drop, ...
 MapUnitm_eObjUnit;   // see above
 FieldUnit  m_eUIUnit;  // unit, scale (e.g. 1/1000) for the UI 
(status bar) is set by ImpSetUIUnit()
 Fraction   m_aUIScale; // see above
@@ -370,10 +369,6 @@ public:
 // with the correct sizes.
 MapUnit  GetScaleUnit() const   { return 
m_eObjUnit; }
 void SetScaleUnit(MapUnit eMap);
-const Fraction&  GetScaleFraction() const   { return 
m_aObjUnit; }
-void SetScaleFraction(const Fraction& rFrac);
-// Setting both simultaneously performs a little better
-void SetScaleUnit(MapUnit eMap, const Fraction& rFrac);
 
 // maximal size e.g. for auto growing texts
 const Size&  GetMaxObjSize() const  { return 
m_aMaxObjSize; }
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index d3d5b1063694..90033352f1c9 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -165,7 +165,6 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, 
SfxObjectShell* pDrDocSh)
 SetUIUnit( static_cast(pOptions->GetMetric()), Fraction( 1, 
1 ) );// default
 
 SetScaleUnit(MapUnit::Map100thMM);
-SetScaleFraction(Fraction(1, 1));
 SetDefaultFontHeight(o3tl::convert(24, o3tl::Length::pt, 
o3tl::Length::mm100));
 
 m_pItemPool->SetDefaultMetric(MapUnit::Map100thMM);
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 7e7d42dacd92..d9345cc3de95 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -251,7 +251,7 @@ void SdTransferable::CreateData()
 CreateObjectReplacement( pPage->GetObj( 0 ) );
 
 mpVDev = VclPtr::Create( 
*Application::GetDefaultDevice() );
-mpVDev->SetMapMode( MapMode( mpSdDrawDocumentIntern->GetScaleUnit(), 
Point(), mpSdDrawDocumentIntern->GetScaleFraction(), 
mpSdDrawDocumentI

[Libreoffice-commits] core.git: chart2/source

2023-01-28 Thread Rasenkai (via logerrit)
 chart2/source/controller/main/DrawCommandDispatch.h |   37 ++--
 1 file changed, 20 insertions(+), 17 deletions(-)

New commits:
commit 0e09fff5f89b38245b108edb67d5e75e57774874
Author: Rasenkai 
AuthorDate: Fri Jan 27 22:12:20 2023 +0530
Commit: Hossein 
CommitDate: Sat Jan 28 22:10:29 2023 +

tdf#145614 chart2: controller: Convert #define to enum

Rename CommandID to DrawCommandID

Change-Id: I4bef2cc030e5b326589b08e22f3dd427772fc79f
Signed-off-by: Rasenkai 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146268
Reviewed-by: Hossein 
Tested-by: Hossein 

diff --git a/chart2/source/controller/main/DrawCommandDispatch.h 
b/chart2/source/controller/main/DrawCommandDispatch.h
index faf70bde1047..c58aa4149bbf 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.h
+++ b/chart2/source/controller/main/DrawCommandDispatch.h
@@ -19,23 +19,26 @@
 #ifndef CHART_DRAWCOMMANDDISPATCH_HRC
 #define CHART_DRAWCOMMANDDISPATCH_HRC
 
-//Command Ids:
-#define COMMAND_ID_OBJECT_SELECT1
-#define COMMAND_ID_DRAW_LINE2
-#define COMMAND_ID_LINE_ARROW_END   3
-#define COMMAND_ID_DRAW_RECT4
-#define COMMAND_ID_DRAW_ELLIPSE 5
-#define COMMAND_ID_DRAW_FREELINE_NOFILL 6
-#define COMMAND_ID_DRAW_TEXT7
-#define COMMAND_ID_DRAW_TEXT_VERTICAL   8
-#define COMMAND_ID_DRAW_CAPTION 9
-#define COMMAND_ID_DRAW_CAPTION_VERTICAL   10
-#define COMMAND_ID_DRAWTBX_CS_BASIC11
-#define COMMAND_ID_DRAWTBX_CS_SYMBOL   12
-#define COMMAND_ID_DRAWTBX_CS_ARROW13
-#define COMMAND_ID_DRAWTBX_CS_FLOWCHART14
-#define COMMAND_ID_DRAWTBX_CS_CALLOUT  15
-#define COMMAND_ID_DRAWTBX_CS_STAR 16
+//Draw Command Ids:
+enum DrawCommandID
+{
+COMMAND_ID_OBJECT_SELECT  = 1,
+COMMAND_ID_DRAW_LINE  = 2,
+COMMAND_ID_LINE_ARROW_END = 3,
+COMMAND_ID_DRAW_RECT  = 4,
+COMMAND_ID_DRAW_ELLIPSE   = 5,
+COMMAND_ID_DRAW_FREELINE_NOFILL   = 6,
+COMMAND_ID_DRAW_TEXT  = 7,
+COMMAND_ID_DRAW_TEXT_VERTICAL = 8,
+COMMAND_ID_DRAW_CAPTION   = 9,
+COMMAND_ID_DRAW_CAPTION_VERTICAL  = 10,
+COMMAND_ID_DRAWTBX_CS_BASIC   = 11,
+COMMAND_ID_DRAWTBX_CS_SYMBOL  = 12,
+COMMAND_ID_DRAWTBX_CS_ARROW   = 13,
+COMMAND_ID_DRAWTBX_CS_FLOWCHART   = 14,
+COMMAND_ID_DRAWTBX_CS_CALLOUT = 15,
+COMMAND_ID_DRAWTBX_CS_STAR= 16
+};
 
 #endif
 


[Libreoffice-commits] core.git: chart2/source compilerplugins/clang solenv/CompilerTest_compilerplugins_clang.mk

2023-01-20 Thread Stephan Bergmann (via logerrit)
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx |1 
 compilerplugins/clang/check.cxx   |4 
 compilerplugins/clang/check.hxx   |5 
 compilerplugins/clang/test/unoaggregation.cxx |   42 +
 compilerplugins/clang/unoaggregation.cxx  |  215 
++
 solenv/CompilerTest_compilerplugins_clang.mk  |1 
 6 files changed, 264 insertions(+), 4 deletions(-)

New commits:
commit 022085ece4149a31d22cc85028e71cd2340409ed
Author: Stephan Bergmann 
AuthorDate: Fri Jan 20 15:21:15 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Jan 20 20:26:36 2023 +

New loplugin:unoaggregation

"Find classes that derive from css::uno::XAggregation, but which implement
queryInterface in violation of the protocol laid out in the documentation at
udkapi/com/sun/star/uno/XAggregation.idl (which implies that such a class 
either
doesn't actually make use of the deprecated XAggregation mechanism, which 
should
thus be removed from that class hierarchy, or that its implementation of
queryInterface needs to be fixed)." 
(compilerplugins/clang/unoaggregation.cxx)

The basesHaveOnlyPureQueryInterface check in
compilerplugins/clang/unoaggregation.cxx is "a crude approximation (but 
which
appears to work OK)" to filter out any queryInterface base implementations 
of
class hierarchies supporting XAggregation (i.e.,
cppu::OWeakAggObject::queryInterface).  It only fails for the odd
ChartDocumentWrapper::queryInterface, which manually implements the 
XAggregation
functionality rather than (indirectly) deriving from OWeakAggObject.  But
changing that manual implementation looks tricky, so leave that alone for 
now
and add a loplugin warning suppression there, and leave proper clean up for
later.

Change-Id: Ib16e26237bd703e60b0d9cb7134cb39840842d54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145912
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 51f066c3ba3e..5ce060e9891f 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -653,6 +653,7 @@ ChartDocumentWrapper::~ChartDocumentWrapper()
 }
 
 //  XInterface (for new interfaces) 
+// [-loplugin:unoaggregation]
 uno::Any SAL_CALL ChartDocumentWrapper::queryInterface( const uno::Type& aType 
)
 {
 if( m_xDelegator.is())
diff --git a/compilerplugins/clang/check.cxx b/compilerplugins/clang/check.cxx
index 7be98bf97d5c..4ff081b6923e 100644
--- a/compilerplugins/clang/check.cxx
+++ b/compilerplugins/clang/check.cxx
@@ -374,10 +374,10 @@ static bool BaseCheckNotSubclass(const 
clang::CXXRecordDecl *BaseDefinition, voi
 return true;
 }
 
-bool isDerivedFrom(const clang::CXXRecordDecl *decl, DeclChecker base) {
+bool isDerivedFrom(const clang::CXXRecordDecl *decl, DeclChecker base, bool 
checkSelf) {
 if (!decl)
 return false;
-if (base(decl))
+if (checkSelf && base(decl))
 return true;
 if (!decl->hasDefinition()) {
 return false;
diff --git a/compilerplugins/clang/check.hxx b/compilerplugins/clang/check.hxx
index 4ac311759832..a7b7ba820d09 100644
--- a/compilerplugins/clang/check.hxx
+++ b/compilerplugins/clang/check.hxx
@@ -160,8 +160,9 @@ private:
 
 
 typedef std::function DeclChecker;
-// Returns true if the class has a base matching the checker, or if the class 
itself matches.
-bool isDerivedFrom(const clang::CXXRecordDecl *decl, DeclChecker base);
+// Returns true if the class has a base matching the checker, or, when 
checkSelf is true, if the
+// class itself matches.
+bool isDerivedFrom(const clang::CXXRecordDecl *decl, DeclChecker base, bool 
checkSelf = true);
 
 
 namespace detail {
diff --git a/compilerplugins/clang/test/unoaggregation.cxx 
b/compilerplugins/clang/test/unoaggregation.cxx
new file mode 100644
index ..01e0dd832e9d
--- /dev/null
+++ b/compilerplugins/clang/test/unoaggregation.cxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+class Base : public cppu::WeakAggImplHelper1
+{
+public:
+void SAL_CALL initialize(css::uno::Sequence const& 
aArguments) override;
+};
+
+class Good : public Base, public css::lang::XMain
+{
+public:
+css::uno::Any SAL_CALL queryInterface(css::uno::Ty

[Libreoffice-commits] core.git: chart2/source

2023-01-13 Thread Noel Grandin (via logerrit)
 chart2/source/controller/accessibility/AccessibleChartView.cxx |   13 
++
 chart2/source/controller/inc/AccessibleChartView.hxx   |3 +-
 2 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit fd6df89dbc26cda08c54e76644b43219d8b75236
Author: Noel Grandin 
AuthorDate: Fri Jan 13 18:59:38 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Jan 14 07:28:02 2023 +

use more concrete types in chart

Change-Id: I23888f636e36f6163405603a542a2f2f12eefa1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145488
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx 
b/chart2/source/controller/accessibility/AccessibleChartView.cxx
index 2b96c684ff43..8e35e05706ac 100644
--- a/chart2/source/controller/accessibility/AccessibleChartView.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx
@@ -25,6 +25,7 @@
 #include 
 #include "AccessibleViewForwarder.hxx"
 #include 
+#include 
 
 #include 
 #include 
@@ -172,14 +173,14 @@ void SAL_CALL AccessibleChartView::initialize( const 
Sequence< Any >& rArguments
 
 Reference< view::XSelectionSupplier > xSelectionSupplier;
 rtl::Reference<::chart::ChartModel> xChartModel;
-Reference< uno::XInterface > xChartView;
+rtl::Reference<::chart::ChartView> xChartView;
 Reference< XAccessible > xParent;
 Reference< awt::XWindow > xWindow;
 {
 MutexGuard aGuard( m_aMutex);
 xSelectionSupplier.set( m_xSelectionSupplier );
 xChartModel = m_xChartModel;
-xChartView.set( m_xChartView );
+xChartView = m_xChartView;
 xParent.set( m_xParent );
 xWindow.set( m_xWindow );
 }
@@ -209,8 +210,10 @@ void SAL_CALL AccessibleChartView::initialize( const 
Sequence< Any >& rArguments
 
 if( rArguments.getLength() > 2 )
 {
-Reference< uno::XInterface > xNewChartView;
-rArguments[2] >>= xNewChartView;
+Reference< uno::XInterface > xTmp;
+rArguments[2] >>= xTmp;
+rtl::Reference<::chart::ChartView> xNewChartView = 
dynamic_cast<::chart::ChartView*>(xTmp.get());
+assert(bool(xTmp)==bool(xNewChartView) && "we only support ChartView");
 if( xNewChartView != xChartView )
 {
 xChartView = xNewChartView;
@@ -283,7 +286,7 @@ void SAL_CALL AccessibleChartView::initialize( const 
Sequence< Any >& rArguments
 MutexGuard aGuard( m_aMutex);
 m_xSelectionSupplier = WeakReference< view::XSelectionSupplier 
>(xSelectionSupplier);
 m_xChartModel = xChartModel.get();
-m_xChartView = WeakReference< uno::XInterface >(xChartView);
+m_xChartView = xChartView.get();
 m_xParent = WeakReference< XAccessible >(xParent);
 m_xWindow = WeakReference< awt::XWindow >(xWindow);
 }
diff --git a/chart2/source/controller/inc/AccessibleChartView.hxx 
b/chart2/source/controller/inc/AccessibleChartView.hxx
index 3e1217d67233..c66578c0c09e 100644
--- a/chart2/source/controller/inc/AccessibleChartView.hxx
+++ b/chart2/source/controller/inc/AccessibleChartView.hxx
@@ -38,6 +38,7 @@ class IAccessibleViewForwarder;
 
 namespace chart
 {
+class ChartView;
 
 namespace impl
 {
@@ -103,7 +104,7 @@ private: // methods
 private: // members
 css::uno::WeakReference< css::view::XSelectionSupplier >
m_xSelectionSupplier;
 unotools::WeakReference<::chart::ChartModel>
m_xChartModel;
-css::uno::WeakReference< css::uno::XInterface > 
m_xChartView;
+unotools::WeakReference< ChartView >
m_xChartView;
 css::uno::WeakReference< css::awt::XWindow >m_xWindow;
 css::uno::WeakReference< css::accessibility::XAccessible >  m_xParent;
 


[Libreoffice-commits] core.git: chart2/source

2023-01-13 Thread Noel Grandin (via logerrit)
 chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx |5 +
 chart2/source/controller/inc/ChartController.hxx |5 +
 chart2/source/controller/inc/dlg_InsertErrorBars.hxx |   10 ++-
 chart2/source/controller/main/ChartController.cxx|   24 +++-
 chart2/source/controller/main/ChartController_Insert.cxx |1 
 chart2/source/controller/main/ChartController_Position.cxx   |6 +-
 chart2/source/controller/main/ChartController_Properties.cxx |3 -
 chart2/source/controller/main/ChartController_TextEdit.cxx   |   11 +--
 chart2/source/controller/main/ChartController_Window.cxx |   32 +++
 chart2/source/controller/uitest/uiobject.cxx |8 +-
 10 files changed, 48 insertions(+), 57 deletions(-)

New commits:
commit b0e0a74d72af09c01e0c6e1324b42fcc2ef55451
Author: Noel Grandin 
AuthorDate: Fri Jan 13 19:18:46 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Jan 14 07:27:31 2023 +

use more concrete types in chart

Change-Id: I87a7aed6f0168e92f3de7e188a1858b93b44a9cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145489
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx 
b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
index 6d3aa87d20a0..7f00dcc976db 100644
--- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -68,12 +69,12 @@ void 
InsertErrorBarsDialog::SetAxisMinorStepWidthForErrorBarDecimals( double fMi
 
 double InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals(
 const rtl::Reference<::chart::ChartModel>& xChartModel,
-const Reference< uno::XInterface >& xChartView,
+const rtl::Reference<::chart::ChartView>& xChartView,
 std::u16string_view rSelectedObjectCID )
 {
 double fStepWidth = 0.001;
 
-ExplicitValueProvider* pExplicitValueProvider( 
comphelper::getFromUnoTunnel(xChartView) );
+ExplicitValueProvider* pExplicitValueProvider( xChartView.get() );
 if( pExplicitValueProvider )
 {
 rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( 
xChartModel ) );
diff --git a/chart2/source/controller/inc/ChartController.hxx 
b/chart2/source/controller/inc/ChartController.hxx
index f948e3bc6303..63fb4d4fc302 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -83,6 +83,7 @@ namespace chart
 {
 
 class UndoGuard;
+class ChartView;
 class ChartWindow;
 class DrawModelWrapper;
 class DrawViewWrapper;
@@ -341,7 +342,7 @@ public:
 
 void NotifyUndoActionHdl( std::unique_ptr );
 
-css::uno::Reference const & getChartView() const;
+rtl::Reference<::chart::ChartView> const & getChartView() const { return 
m_xChartView; }
 
 rtl::Reference<::chart::ChartModel> getChartModel();
 rtl::Reference<::chart::Diagram> getFirstDiagram();
@@ -395,7 +396,7 @@ private:
 
 //view
 css::uno::Reference m_xViewWindow;
-css::uno::Reference m_xChartView;
+rtl::Reference<::chart::ChartView> m_xChartView;
 std::shared_ptr< DrawModelWrapper > m_pDrawModelWrapper;
 std::unique_ptr m_pDrawViewWrapper;
 
diff --git a/chart2/source/controller/inc/dlg_InsertErrorBars.hxx 
b/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
index 59911c2f5ed2..4f8e8d094a34 100644
--- a/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
+++ b/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
@@ -31,6 +31,8 @@ class XModel;
 
 namespace chart
 {
+class ChartView;
+
 class InsertErrorBarsDialog final : public weld::GenericDialogController
 {
 public:
@@ -40,10 +42,10 @@ public:
 
 void SetAxisMinorStepWidthForErrorBarDecimals(double fMinorStepWidth);
 
-static double getAxisMinorStepWidthForErrorBarDecimals(
-const rtl::Reference<::chart::ChartModel>& xChartModel,
-const css::uno::Reference& xChartView,
-std::u16string_view rSelectedObjectCID);
+static double
+getAxisMinorStepWidthForErrorBarDecimals(const 
rtl::Reference<::chart::ChartModel>& xChartModel,
+ const 
rtl::Reference<::chart::ChartView>& xChartView,
+ std::u16string_view 
rSelectedObjectCID);
 
 void FillItemSet(SfxItemSet& rOutAttrs);
 
diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index 1a59bb161ec3..6007499248c1 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -543,9 +544,8 @@ sal_Bool SAL_CALL ChartController::attachModel( const 
uno::Reference< frame::XMo
 //--handle relations to the old mod

[Libreoffice-commits] core.git: chart2/source extensions/source framework/source include/vcl sc/source sd/source starmath/source svtools/source svx/source sw/source vcl/Library_vcl.mk vcl/source

2022-12-20 Thread Stephan Bergmann (via logerrit)
 chart2/source/controller/sidebar/Chart2PanelFactory.cxx |3 +-
 extensions/source/propctrlr/browserline.cxx |3 +-
 extensions/source/propctrlr/handlerhelper.cxx   |6 +++-
 extensions/source/propctrlr/propcontroller.cxx  |5 ++-
 framework/source/uielement/toolbarwrapper.cxx   |3 +-
 include/vcl/weldutils.hxx   |   12 -
 sc/source/ui/sidebar/ScPanelFactory.cxx |3 +-
 sd/source/ui/sidebar/PanelFactory.cxx   |2 -
 starmath/source/SmPanelFactory.cxx  |3 +-
 svtools/source/uno/toolboxcontroller.cxx|3 +-
 svx/source/sidebar/PanelFactory.cxx |3 +-
 sw/source/uibase/sidebar/SwPanelFactory.cxx |3 +-
 vcl/Library_vcl.mk  |1 
 vcl/source/window/weldutils.cxx |   21 
 14 files changed, 57 insertions(+), 14 deletions(-)

New commits:
commit feba0ddb1521d1142560fe54b7d7696ee910237f
Author: Stephan Bergmann 
AuthorDate: Tue Dec 13 09:30:25 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Dec 20 08:34:38 2022 +

loplugin:unocast (weld::TransportAsXWindow)

(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)

On macOS, where we implicitly use 
-fvisibility-inlines-hidden-static-local-var
since


"Make -fvisibility-inlines-hidden apply to static local variables in inline
functions on Darwin", the static id local var in
weld::TransportAsXWindow::getUnoTunnelId cannot be in an inline function
implicitly hidden via -fvisibility-inlines-hidden.  Explicitly marking the
function as VCL_DLLPUBLIC would help, but would in turn cause MSVC error 
2487
("member of a dll interface class may not be declared with dll interface"). 
 So
just make the function non-inline in a new vcl/source/window/weldutils.cxx
(which would arguably be the best approach for the whole class, anyway).

Change-Id: Ib5615f6aae19346ea05b8b85ff77c0e5ea860994
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144331
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx 
b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
index 081322b09408..4d0208fbc450 100644
--- a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
+++ b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -61,7 +62,7 @@ Reference SAL_CALL 
ChartPanelFactory::createUIElement (
 Reference xController 
(aArguments.getOrDefault("Controller", Reference()));
 
 weld::Widget* pParent(nullptr);
-if (weld::TransportAsXWindow* pTunnel = 
dynamic_cast(xParentWindow.get()))
+if (weld::TransportAsXWindow* pTunnel = 
comphelper::getFromUnoTunnel(xParentWindow))
 pParent = pTunnel->getWidget();
 
 if (!pParent)
diff --git a/extensions/source/propctrlr/browserline.cxx 
b/extensions/source/propctrlr/browserline.cxx
index 53a58966e25d..c77d211314a0 100644
--- a/extensions/source/propctrlr/browserline.cxx
+++ b/extensions/source/propctrlr/browserline.cxx
@@ -26,6 +26,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -110,7 +111,7 @@ namespace pcr
 {
 m_xControl = rxControl;
 auto xWindow = m_xControl->getControlWindow();
-if (weld::TransportAsXWindow* pTunnel = 
dynamic_cast(xWindow.get()))
+if (weld::TransportAsXWindow* pTunnel = 
comphelper::getFromUnoTunnel(xWindow))
 m_pControlWindow = pTunnel->getWidget();
 else
 m_pControlWindow = nullptr;
diff --git a/extensions/source/propctrlr/handlerhelper.cxx 
b/extensions/source/propctrlr/handlerhelper.cxx
index 77743c622ad7..55ffb9182f48 100644
--- a/extensions/source/propctrlr/handlerhelper.cxx
+++ b/extensions/source/propctrlr/handlerhelper.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -291,8 +292,9 @@ namespace pcr
 std::unique_ptr PropertyHandlerHelper::makeBuilder(const 
OUString& rUIFile, const Reference& rContext)
 {
 Reference xWindow(rContext->getValueByName("BuilderParent"), 
UNO_QUERY_THROW);
-weld::TransportAsXWindow& rTunnel = 
dynamic_cast(*xWindow);
-return Application::CreateBuilder(rTunnel.getWidget(), rUIFile);
+weld::TransportAsXWindow* rTunnel
+= comphelper::getFromUnoTunnel(xWindow);
+return Application::CreateBuilder(rTunnel->getWidget(), rUIFile);
 }
 
 void PropertyHandlerHelper::setBuilderParent(const 
css::uno::Reference& rContext, weld::Widget* 
pParent)
diff --git a/extensi

[Libreoffice-commits] core.git: chart2/source

2022-12-19 Thread Stephan Bergmann (via logerrit)
 chart2/source/tools/DataSeriesHelper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d7ada1052f9c237755e7b199274b52842861da40
Author: Stephan Bergmann 
AuthorDate: Mon Dec 19 12:22:34 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Dec 19 20:32:18 2022 +

-Werror=maybe-uninitialized

Change-Id: Id243f28f267a5ea22625e277d6272f8514d33ad9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144469
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/chart2/source/tools/DataSeriesHelper.cxx 
b/chart2/source/tools/DataSeriesHelper.cxx
index e2bc3cfbe7d0..52c4c0637179 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -422,7 +422,7 @@ void setStackModeAtSeries(
 {
 dataSeries->setPropertyValue( "StackingDirection", aPropValue 
);
 
-sal_Int32 nAxisIndex;
+sal_Int32 nAxisIndex = 0;
 dataSeries->getPropertyValue( "AttachedAxisIndex" ) >>= 
nAxisIndex;
 aAxisIndexSet.insert(nAxisIndex);
 }


[Libreoffice-commits] core.git: chart2/source include/sfx2 sfx2/source

2022-12-16 Thread Stephan Bergmann (via logerrit)
 chart2/source/controller/main/ChartController.cxx |4 ++--
 include/sfx2/sidebar/SidebarController.hxx|7 ++-
 sfx2/source/sidebar/SidebarController.cxx |   16 +---
 3 files changed, 21 insertions(+), 6 deletions(-)

New commits:
commit 88b4f966202717cd4ad38a30a8eda22c3e69ed35
Author: Stephan Bergmann 
AuthorDate: Tue Dec 13 13:42:10 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Dec 16 20:17:34 2022 +

loplugin:unocast (sfx2::sidebar::SidebarController)

(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)

Change-Id: Ib681b4eaa44c65b9da5988c74c03f1829e3a1507
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144334
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index 1a59bb161ec3..2ba57aa45d33 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -377,7 +377,7 @@ void SAL_CALL ChartController::attachFrame(
 uno::Reference xSidebar = 
getSidebarFromModel(getChartModel());
 if (xSidebar.is())
 {
-auto pSidebar = 
dynamic_cast(xSidebar.get());
+auto pSidebar = 
comphelper::getFromUnoTunnel(xSidebar);
 assert(pSidebar);
 pSidebar->registerSidebarForFrame(this);
 pSidebar->updateModel(getChartModel());
@@ -761,7 +761,7 @@ void SAL_CALL ChartController::dispose()
 if (getModel().is())
 {
 uno::Reference xSidebar = 
getSidebarFromModel(getChartModel());
-if (sfx2::sidebar::SidebarController* pSidebar = 
dynamic_cast(xSidebar.get()))
+if (sfx2::sidebar::SidebarController* pSidebar = 
comphelper::getFromUnoTunnel(xSidebar))
 {
 pSidebar->unregisterSidebarForFrame(this);
 }
diff --git a/include/sfx2/sidebar/SidebarController.hxx 
b/include/sfx2/sidebar/SidebarController.hxx
index 208af98b2fc2..be0a12b3a671 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -48,7 +49,8 @@ typedef comphelper::WeakComponentImplHelper <
 css::beans::XPropertyChangeListener,
 css::ui::XSidebar,
 css::frame::XStatusListener,
-css::frame::XFrameActionListener
+css::frame::XFrameActionListener,
+css::lang::XUnoTunnel
 > SidebarControllerInterfaceBase;
 
 class SfxSplitWindow;
@@ -175,6 +177,9 @@ public:
 
 static SidebarController* GetSidebarControllerForView(const SfxViewShell* 
pViewShell);
 
+sal_Int64 SAL_CALL getSomething(css::uno::Sequence const & 
aIdentifier) override;
+static css::uno::Sequence const & getUnoTunnelId();
+
 private:
 SidebarController(SidebarDockingWindow* pParentWindow, const SfxViewFrame* 
pViewFrame);
 
diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index a35bb1f7488c..550b1e8cc5d7 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -41,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -186,10 +187,10 @@ SidebarController* 
SidebarController::GetSidebarControllerForFrame (
 ::comphelper::getProcessComponentContext(),
 xController,
 [] (uno::Reference const& xRef)
-{ return nullptr != dynamic_cast(xRef.get()); }
+{ return nullptr != 
comphelper::getFromUnoTunnel(xRef); }
 ));
 
-return dynamic_cast(xListener.get());
+return comphelper::getFromUnoTunnel(xListener);
 }
 
 void SidebarController::registerSidebarForFrame(const 
css::uno::Reference& xController)
@@ -1646,7 +1647,16 @@ sfx2::sidebar::SidebarController* 
SidebarController::GetSidebarControllerForView
 if (!xSidebar.is())
 return nullptr;
 
-return dynamic_cast(xSidebar.get());
+return 
comphelper::getFromUnoTunnel(xSidebar);
+}
+
+sal_Int64 SidebarController::getSomething(css::uno::Sequence const & 
aIdentifier) {
+return comphelper::getSomethingImpl(aIdentifier, this);
+}
+
+css::uno::Sequence const & SidebarController::getUnoTunnelId() {
+static comphelper::UnoIdInit const id;
+return id.getSeq();
 }
 
 } // end of namespace sfx2::sidebar


[Libreoffice-commits] core.git: chart2/source

2022-12-06 Thread Noel Grandin (via logerrit)
 chart2/source/inc/Axis.hxx   |2 -
 chart2/source/inc/BaseCoordinateSystem.hxx   |2 -
 chart2/source/inc/ChartType.hxx  |2 -
 chart2/source/inc/DataSeries.hxx |2 -
 chart2/source/inc/DataTable.hxx  |4 --
 chart2/source/inc/Diagram.hxx|2 -
 chart2/source/inc/Legend.hxx |2 -
 chart2/source/inc/OPropertySet.hxx   |9 ++
 chart2/source/inc/RegressionCurveModel.hxx   |2 -
 chart2/source/inc/Title.hxx  |2 -
 chart2/source/model/inc/StockBar.hxx |2 -
 chart2/source/model/main/Axis.cxx|3 --
 chart2/source/model/main/BaseCoordinateSystem.cxx|3 --
 chart2/source/model/main/DataPoint.cxx   |3 --
 chart2/source/model/main/DataPoint.hxx   |2 -
 chart2/source/model/main/DataSeries.cxx  |3 --
 chart2/source/model/main/DataTable.cxx   |5 +--
 chart2/source/model/main/Diagram.cxx |3 --
 chart2/source/model/main/FormattedString.cxx |3 --
 chart2/source/model/main/FormattedString.hxx |2 -
 chart2/source/model/main/GridProperties.cxx  |3 --
 chart2/source/model/main/GridProperties.hxx  |2 -
 chart2/source/model/main/Legend.cxx  |3 --
 chart2/source/model/main/PageBackground.cxx  |3 --
 chart2/source/model/main/PageBackground.hxx  |2 -
 chart2/source/model/main/StockBar.cxx|3 --
 chart2/source/model/main/Title.cxx   |3 --
 chart2/source/model/main/Wall.cxx|3 --
 chart2/source/model/main/Wall.hxx|2 -
 chart2/source/model/template/AreaChartTypeTemplate.cxx   |1 
 chart2/source/model/template/AreaChartTypeTemplate.hxx   |2 -
 chart2/source/model/template/BarChartTypeTemplate.cxx|1 
 chart2/source/model/template/BarChartTypeTemplate.hxx|2 -
 chart2/source/model/template/BubbleChartTypeTemplate.cxx |3 --
 chart2/source/model/template/BubbleChartTypeTemplate.hxx |2 -
 chart2/source/model/template/ChartType.cxx   |3 --
 chart2/source/model/template/ColumnLineChartTypeTemplate.cxx |1 
 chart2/source/model/template/ColumnLineChartTypeTemplate.hxx |2 -
 chart2/source/model/template/LineChartTypeTemplate.cxx   |1 
 chart2/source/model/template/LineChartTypeTemplate.hxx   |2 -
 chart2/source/model/template/PieChartTypeTemplate.cxx|3 --
 chart2/source/model/template/PieChartTypeTemplate.hxx|2 -
 chart2/source/model/template/ScatterChartTypeTemplate.cxx|1 
 chart2/source/model/template/ScatterChartTypeTemplate.hxx|2 -
 chart2/source/model/template/StockChartTypeTemplate.cxx  |1 
 chart2/source/model/template/StockChartTypeTemplate.hxx  |2 -
 chart2/source/tools/OPropertySet.cxx |   16 ++-
 chart2/source/tools/RegressionCurveModel.cxx |3 --
 chart2/source/tools/RegressionEquation.cxx   |3 --
 chart2/source/tools/RegressionEquation.hxx   |2 -
 50 files changed, 33 insertions(+), 104 deletions(-)

New commits:
commit a8b21abb09ab514206dc564f7b63016e5b6fac0b
Author: Noel Grandin 
AuthorDate: Mon Dec 5 15:41:18 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 6 09:11:18 2022 +

Move cppu::BaseMutex up to the base class OPropertySet

Change-Id: I0e51987714e32ece19609c7a6d500995e6fc3601
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143674
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/inc/Axis.hxx b/chart2/source/inc/Axis.hxx
index 7b5ce75fa6fa..eecd9b4a1fca 100644
--- a/chart2/source/inc/Axis.hxx
+++ b/chart2/source/inc/Axis.hxx
@@ -19,7 +19,6 @@
 #pragma once
 
 #include "OPropertySet.hxx"
-#include 
 #include 
 #include 
 
@@ -46,7 +45,6 @@ typedef ::cppu::WeakImplHelper<
 }
 
 class OOO_DLLPUBLIC_CHARTTOOLS Axis final :
-public cppu::BaseMutex,
 public impl::Axis_Base,
 public ::property::OPropertySet
 {
diff --git a/chart2/source/inc/BaseCoordinateSystem.hxx 
b/chart2/source/inc/BaseCoordinateSystem.hxx
index 2a308d5c25ed..71f226abcd51 100644
--- a/chart2/source/inc/BaseCoordinateSystem.hxx
+++ b/chart2/source/inc/BaseCoordinateSystem.hxx
@@ -19,7 +19,6 @@
 #pragma once
 
 #include "OPropertySet.hxx"
-#include 
 #include 
 #include 
 #include 
@@ -49,7 +48,6 @@ typedef ::cppu::WeakImplHelper
 
 class SAL_DLLPUBLIC_RTTI BaseCoordinateSystem :
 

  1   2   3   4   5   6   7   8   9   10   >