core.git: chart2/source editeng/source framework/inc framework/source include/linguistic include/sfx2 include/svtools sc/inc sc/source sd/source sw/inc sw/source vcl/inc vcl/unx

2024-06-20 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/TitleWrapper.hxx   |2 
 editeng/source/editeng/impedit.hxx  |5 
 framework/inc/helper/wakeupthread.hxx   |3 
 framework/source/helper/wakeupthread.cxx|   17 --
 include/linguistic/lngprophelp.hxx  |1 
 include/sfx2/dinfdlg.hxx|1 
 include/svtools/recorditemwindow.hxx|1 
 sc/inc/markarr.hxx  |1 
 sc/source/core/data/markarr.cxx |   76 
 sd/source/ui/dlg/NavigatorChildWindow.cxx   |5 
 sd/source/ui/inc/navigatr.hxx   |1 
 sd/source/ui/inc/sdtreelb.hxx   |5 
 sd/source/ui/inc/smarttag.hxx   |2 
 sw/inc/PostItMgr.hxx|1 
 sw/inc/modcfg.hxx   |4 
 sw/source/core/inc/drawfont.hxx |5 
 sw/source/filter/ww8/ww8scan.hxx|1 
 sw/source/ui/dialog/macassgn.cxx|   28 
 sw/source/uibase/docvw/PostItMgr.cxx|9 -
 sw/source/uibase/inc/macassgn.hxx   |2 
 sw/source/uibase/inc/wrtsh.hxx  |2 
 sw/source/writerfilter/dmapper/DomainMapperTableManager.cxx |8 -
 sw/source/writerfilter/dmapper/DomainMapperTableManager.hxx |1 
 sw/source/writerfilter/dmapper/PropertyMap.hxx  |5 
 sw/source/writerfilter/dmapper/TablePositionHandler.hxx |   12 -
 vcl/inc/graphic/MemoryManaged.hxx   |2 
 vcl/inc/unx/gtk/gtkdata.hxx |4 
 vcl/unx/gtk3/a11y/atkutil.cxx   |   11 -
 28 files changed, 215 deletions(-)

New commits:
commit 4aa2cc878dae3b34b16ccacd9358fda5e6d6a197
Author: Noel Grandin 
AuthorDate: Thu Jun 20 10:46:59 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 20 12:21:54 2024 +0200

loplugin:unusedmethods

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

diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx 
b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
index aecf5f304231..91a48258174d 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
@@ -95,8 +95,6 @@ private:
 virtual const css::uno::Sequence< css::beans::Property >& 
getPropertySequence() override;
 virtual std::vector< std::unique_ptr > 
createWrappedProperties() override;
 
-css::uno::Reference< css::beans::XPropertySet > 
getFirstCharacterPropertySet();
-
 css::uno::Reference< css::chart2::XTitle > getTitleObject();
 
 std::shared_ptr< Chart2ModelContact >   m_spChart2ModelContact;
diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index 9f465f4d9d5d..d5f465de5f6d 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -1270,11 +1270,6 @@ public:
 
 void setScalingParameters(ScalingParameters const& rScalingParameters);
 
-void resetScalingParameters()
-{
-setScalingParameters(ScalingParameters());
-}
-
 ScalingParameters getScalingParameters()
 {
 return maScalingParameters;
diff --git a/framework/inc/helper/wakeupthread.hxx 
b/framework/inc/helper/wakeupthread.hxx
index b25a933dc8c8..962f4b724fa2 100644
--- a/framework/inc/helper/wakeupthread.hxx
+++ b/framework/inc/helper/wakeupthread.hxx
@@ -39,9 +39,6 @@ class WakeUpThread final
 public:
 WakeUpThread(css::uno::Reference const& updatable);
 void stop();
-
-static void joinThread();
-static void startThread();
 };
 }
 
diff --git a/framework/source/helper/wakeupthread.cxx 
b/framework/source/helper/wakeupthread.cxx
index 63d52a82da76..9a9fc37f7442 100644
--- a/framework/source/helper/wakeupthread.cxx
+++ b/framework/source/helper/wakeupthread.cxx
@@ -88,13 +88,6 @@ public:
 }
 }
 
-static void startThread()
-{
-std::unique_lock g(getMutex());
-if (!updatables.empty() && !wakeupThread)
-wakeupThread = new SharedWakeUpThread();
-}
-
 void stopWithLock(std::unique_lock& g)
 {
 terminate = true;
@@ -142,12 +135,6 @@ public:
 if (updatables.empty())
 disposeThreadWithLock(g);
 }
-
-static void joinThread()
-{
-std::unique_lock g(getMutex());
-disposeThreadWithLock(g);
-}
 };
 
 rtl::Reference SharedWakeUpThread::wakeupThread;
@@ -156,8 +143,6 @@ std::vector> 
SharedWakeUpThread::
 
 namespace framework
 {
-/* static */ 

core.git: chart2/source include/svx svx/inc svx/source sw/source

2024-06-19 Thread Sahil Gautam (via logerrit)
 chart2/source/controller/main/DragMethod_RotateDiagram.cxx |2 
 chart2/source/controller/main/DragMethod_RotateDiagram.hxx |2 
 include/svx/svddrgmt.hxx   |   14 +-
 include/svx/svddrgv.hxx|2 
 include/svx/svdedtv.hxx|1 
 include/svx/svdobj.hxx |1 
 svx/inc/dragmt3d.hxx   |2 
 svx/source/engine3d/dragmt3d.cxx   |2 
 svx/source/svdraw/svddrgmt.cxx |   33 --
 svx/source/svdraw/svddrgv.cxx  |4 
 svx/source/svdraw/svdedtv1.cxx |9 +
 svx/source/svdraw/svdobj.cxx   |5 
 sw/source/core/draw/dflyobj.cxx|7 +
 sw/source/core/inc/dflyobj.hxx |1 
 sw/source/core/inc/flyfrm.hxx  |1 
 sw/source/core/layout/fly.cxx  |   67 +
 16 files changed, 128 insertions(+), 25 deletions(-)

New commits:
commit 86cd6036273a9031212e131141c03ed4e16e011b
Author: Sahil Gautam 
AuthorDate: Tue Jun 18 08:51:36 2024 +
Commit: Heiko Tietze 
CommitDate: Wed Jun 19 15:38:27 2024 +0200

tdf#159543 - Proper feedback needed when resizing a frame...

When autosize (a frame property) is enabled, then the (text) frame
manages it's height/width based on the content such that all the text
is visible. The user cannot decrease the height/width to be less than
the content height/width, but the resize  handles show up, and clicking and
dragging is enabled, which shows a blue virtual resize frame.

This patch adds UI feedback mechanism such that if the drag leads
to some change in any dimention of the original frame, then the
frame color will remain blue, otherwise it turns red.

Change-Id: Id4b3e3ae2c9864154e6028ca03008261bbc3e1b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165817
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx 
b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
index 6e496dbe1c4e..c7bac7c33749 100644
--- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
+++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
@@ -173,7 +173,7 @@ bool DragMethod_RotateDiagram::EndSdrDrag(bool /*bCopy*/)
 }
 void DragMethod_RotateDiagram::CreateOverlayGeometry(
 sdr::overlay::OverlayManager& rOverlayManager,
-const sdr::contact::ObjectContact& rObjectContact)
+const sdr::contact::ObjectContact& rObjectContact, bool /* 
bIsGeometrySizeValid */)
 {
 ::basegfx::B3DHomMatrix aCurrentTransform;
 aCurrentTransform.translate( -FIXED_SIZE_FOR_3D_CHART_VOLUME/2.0,
diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.hxx 
b/chart2/source/controller/main/DragMethod_RotateDiagram.hxx
index 69e9050eeb4e..d50fb42354ea 100644
--- a/chart2/source/controller/main/DragMethod_RotateDiagram.hxx
+++ b/chart2/source/controller/main/DragMethod_RotateDiagram.hxx
@@ -54,7 +54,7 @@ public:
 
 virtual void CreateOverlayGeometry(
 sdr::overlay::OverlayManager& rOverlayManager,
-const sdr::contact::ObjectContact& rObjectContact) override;
+const sdr::contact::ObjectContact& rObjectContact, bool 
bIsGeometrySizeValid=true) override;
 
 private:
 E3dScene*   m_pScene;
diff --git a/include/svx/svddrgmt.hxx b/include/svx/svddrgmt.hxx
index 5b01852ea363..58639bc85df5 100644
--- a/include/svx/svddrgmt.hxx
+++ b/include/svx/svddrgmt.hxx
@@ -41,7 +41,7 @@ public:
 SdrDragEntry();
 virtual ~SdrDragEntry();
 
-virtual drawinglayer::primitive2d::Primitive2DContainer 
createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) = 0;
+virtual drawinglayer::primitive2d::Primitive2DContainer 
createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod, bool 
IsDragSizeValid=true) = 0;
 
 // data read access
 bool getAddToTransparent() const { return mbAddToTransparent; }
@@ -57,7 +57,7 @@ public:
 SdrDragEntryPolyPolygon(basegfx::B2DPolyPolygon aOriginalPolyPolygon);
 virtual ~SdrDragEntryPolyPolygon() override;
 
-virtual drawinglayer::primitive2d::Primitive2DContainer 
createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override;
+virtual drawinglayer::primitive2d::Primitive2DContainer 
createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod, bool 
IsDragSizeValid=true) override;
 };
 
 
@@ -80,7 +80,7 @@ public:
 const SdrObject& getOriginal() const { return maOriginal; }
 SdrObject* getClone() { return mxClone.get(); }
 
-virtual drawinglayer::primitive2d::Primitive2DContainer 
createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override;
+virtual 

core.git: chart2/source

2024-06-14 Thread Noel Grandin (via logerrit)
 chart2/source/model/template/ChartTypeTemplate.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 013282b1421c0bba66ef54ccbfe4a649a4b97628
Author: Noel Grandin 
AuthorDate: Fri Jun 14 15:43:22 2024 +0200
Commit: Noel Grandin 
CommitDate: Fri Jun 14 19:02:48 2024 +0200

tdf#160522 Chart > 4 columns, Only 4 colors

regression from
commit 337a9a454c1bc95214111578d3f9c0622c55c509
Author: Noel Grandin 
Date:   Mon May 18 09:17:04 2020 +0200
use for-range on Sequence in chart2

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

diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx 
b/chart2/source/model/template/ChartTypeTemplate.cxx
index a0a607802677..8e6e83fc9a7a 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -220,7 +220,8 @@ void ChartTypeTemplate::changeDiagram( const 
rtl::Reference< Diagram >& xDiagram
 for( auto const & j : i )
 {
 if( nIndex >= nFormerSeriesCount )
-lcl_applyDefaultStyle( j, nIndex++, xDiagram );
+lcl_applyDefaultStyle( j, nIndex, xDiagram );
+nIndex++;
 }
 
 // remove charttype groups from all coordinate systems


core.git: chart2/source

2024-05-16 Thread Kurt Nordback (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |   92 -
 chart2/source/view/charttypes/PieChart.hxx |9 ++
 2 files changed, 62 insertions(+), 39 deletions(-)

New commits:
commit 86dcdfd097b0fdd91d69ecb8be0e72a84112a514
Author: Kurt Nordback 
AuthorDate: Wed May 15 17:27:22 2024 -0600
Commit: Noel Grandin 
CommitDate: Thu May 16 10:56:21 2024 +0200

tdf#159547 of-pie connector lines aren't quite geometrically correct

Fixed code computing the left endpoints of of-pie connector lines, so
that they're tangent to the circle when the composite slice is large enough
(and they terminate at the tangent point).

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index d99e3d944af3..fcb79ef1907a 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -807,6 +807,47 @@ bool PieChart::isSeparateStackingForDifferentSigns( 
sal_Int32 /* nDimensionIndex
 return false;
 }
 
+// Determine left endpoints of connecting lines. These will terminate either
+// at the corners of the composite wedge (if the wedge is small enough), or
+// tangent to the left pie circle (if the wedge is larger). The endpoints
+// are at the returned values (xl0, +/-yl0).
+// static
+void PieChart::leftConnEndpoints(double* xl0_p, double* yl0_p,
+const PieDataSrcBase *pDataSrc,
+const VDataSeries *pSeries,
+const ShapeParam )
+{
+const sal_Int32 nEnd = pDataSrc->getNPoints(pSeries, SubPieType::LEFT);
+const double compFrac = pDataSrc->getData(pSeries, nEnd - 1,
+SubPieType::LEFT) / aParam.mfLogicYSum;
+
+// Assuming temporarily that the left circle is at the origin,
+// the tangent point (xp0, yp0) on the left circle satisfies
+// (1) xp0 = (1-r) / t
+// (2) xp0^2 + yp0^2 = 1
+// where the left-hand circle has radius 1, the right-hand circle
+// has radius r, and the right-hand circle is centered at (t, 0).
+const double r0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale;
+const double rho = m_fRightScale / m_fLeftScale;
+const double xp0 = (1 - rho) / (m_fRightShift - m_fLeftShift);
+// Determine if the composite wedge is large enough that the
+// connecting lines hit the tangent point, instead of the corners of
+// the wedge
+assert(abs(xp0) <= 1.0);
+const double theta = acos(xp0);
+
+double xl0, yl0;
+if (compFrac < theta / M_PI) {
+xl0 = r0 * cos(compFrac * M_PI);
+yl0 = r0 * sin(compFrac * M_PI);
+} else {
+xl0 = r0 * xp0;
+yl0 = sqrt(r0 * r0 - xl0 * xl0);
+}
+*xl0_p = xl0;
+*yl0_p = yl0;
+}
+
 void PieChart::createShapes()
 {
 ///a ZSlot is a vector< vector< VDataSeriesGroup > >. There is only one
@@ -941,19 +982,9 @@ void PieChart::createShapes()
 //
 double xl0, xl1, yl0, yl1, x0, y0, x1, y1, y2, y3;
 
-// Get coordinates of "corners" of left composite wedge
-sal_Int32 nEnd = pDataSrc->getNPoints(pSeries, SubPieType::LEFT);
-double compFrac = pDataSrc->getData(pSeries, nEnd - 1,
-SubPieType::LEFT) / aParam.mfLogicYSum;
-if (compFrac < 0.5) {
-xl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale *
-cos(compFrac * M_PI) + m_fLeftShift;
-yl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale *
-sin(compFrac * M_PI);
-} else {
-xl0 = m_fLeftShift;
-yl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale;
-}
+leftConnEndpoints(, , pDataSrc, pSeries, aParam);
+
+xl0 += m_fLeftShift;
 
 // Coordinates of bar top left corner
 xl1 = m_fBarLeft;
@@ -1000,39 +1031,22 @@ void PieChart::createShapes()
 //
 double xl0, xl1, yl0, yl1, x0, y0, x1, y1, y2, y3;
 
-// Get coordinates of "corners" of left composite wedge
-sal_Int32 nEnd = pDataSrc->getNPoints(pSeries, SubPieType::LEFT);
-double compFrac = pDataSrc->getData(pSeries, nEnd - 1,
-SubPieType::LEFT) / aParam.mfLogicYSum;
-// The following isn't quite right. The tangent points on the left
-// pie are only at pi/2 and -pi/2 for composite wedges over 1/2 the
-// total if left and right pies are the same diameter. And the
-// threshold of 1/2 isn't quite right either. So there
-// really should be a more sophisticated approach here. TODO
-if (compFrac < 0.5) {
-// Translated, per below
-xl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale *
-

core.git: chart2/source dbaccess/source forms/source sc/source sd/source uui/source xmloff/source

2024-05-16 Thread Gabor Kelemen (via logerrit)
 chart2/source/controller/accessibility/AccessibleChartElement.cxx   |1 -
 chart2/source/controller/accessibility/AccessibleChartView.cxx  |2 --
 chart2/source/controller/accessibility/AccessibleTextHelper.cxx |1 -
 chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx |1 -
 chart2/source/controller/main/ChartController_Insert.cxx|1 -
 chart2/source/controller/main/ObjectHierarchy.cxx   |1 -
 chart2/source/model/main/UndoManager.cxx|2 --
 chart2/source/tools/CachedDataSequence.cxx  |1 -
 chart2/source/tools/UncachedDataSequence.cxx|1 -
 dbaccess/source/core/dataaccess/databaseregistrations.cxx   |1 -
 forms/source/helper/windowstateguard.cxx|1 -
 sc/source/filter/excel/xiescher.cxx |1 -
 sd/source/core/CustomAnimationPreset.cxx|1 -
 uui/source/iahndl.cxx   |3 ---
 xmloff/source/text/XMLIndexTOCContext.cxx   |1 -
 15 files changed, 19 deletions(-)

New commits:
commit e3ca92bcfda624136af5ba741fef8f732f2856fc
Author: Gabor Kelemen 
AuthorDate: Wed Apr 10 17:44:02 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Thu May 16 08:35:11 2024 +0200

Drop unneeded 'using' instances

found with bin/find-unused-using.sh

Change-Id: I647f493ee313e79e7a9967960ea089b729de59a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167637
Reviewed-by: Gabor Kelemen 
Tested-by: Jenkins

diff --git a/chart2/source/controller/accessibility/AccessibleChartElement.cxx 
b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
index ddc727277978..2ed0d06e29c4 100644
--- a/chart2/source/controller/accessibility/AccessibleChartElement.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
@@ -35,7 +35,6 @@ using namespace ::com::sun::star::accessibility;
 
 using ::com::sun::star::uno::UNO_QUERY;
 using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
 
 namespace chart
 {
diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx 
b/chart2/source/controller/accessibility/AccessibleChartView.cxx
index fe83052f472b..73645a82e2a9 100644
--- a/chart2/source/controller/accessibility/AccessibleChartView.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx
@@ -40,10 +40,8 @@
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::accessibility;
 
-using ::com::sun::star::uno::Sequence;
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::WeakReference;
-using ::com::sun::star::uno::Any;
 using osl::MutexGuard;
 
 namespace chart
diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx 
b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
index 6fc26b1c82ad..a117186f4521 100644
--- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
+++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
@@ -39,7 +39,6 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::accessibility;
 
 using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
 
 namespace chart
 {
diff --git 
a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx 
b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
index ef0a1fc4c098..bbbee7cf318a 100644
--- a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
+++ b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
@@ -38,7 +38,6 @@
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
 using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
 
 namespace chart::wrapper {
 
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx 
b/chart2/source/controller/main/ChartController_Insert.cxx
index 3ec8b62c1ecb..d74ede874b36 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -67,7 +67,6 @@
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
 using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
 
 namespace
 {
diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx 
b/chart2/source/controller/main/ObjectHierarchy.cxx
index f2d130aa014c..5cf427133a9e 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -53,7 +53,6 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
 
 using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
 
 namespace
 {
diff --git a/chart2/source/model/main/UndoManager.cxx 
b/chart2/source/model/main/UndoManager.cxx
index 

core.git: chart2/source

2024-05-10 Thread Michael Weghorn (via logerrit)
 chart2/source/controller/accessibility/AccessibleBase.cxx |9 -
 chart2/source/controller/inc/AccessibleBase.hxx   |5 +
 2 files changed, 5 insertions(+), 9 deletions(-)

New commits:
commit 34bfb9f506fa661a19498176f20bf3dfb7d8ff6c
Author: Michael Weghorn 
AuthorDate: Fri May 10 08:18:56 2024 +0200
Commit: Michael Weghorn 
CommitDate: Fri May 10 16:23:27 2024 +0200

chart2 a11y: Drop ChildListVectorType typedef

Change-Id: Ie7ad5157bdcd261c8e5e6507b93b2820424c9125
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167432
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins

diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx 
b/chart2/source/controller/accessibility/AccessibleBase.cxx
index a823cf25c003..c297814bebcd 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -144,7 +144,7 @@ bool AccessibleBase::NotifyEvent( EventType eEventType, 
const AccessibleUniqueId
 
 ClearableMutexGuard aGuard( m_aMutex );
 // make local copy for notification
-ChildListVectorType aLocalChildList( m_aChildList );
+std::vector> aLocalChildList(m_aChildList);
 aGuard.clear();
 
 for (auto const& localChild : aLocalChildList)
@@ -285,8 +285,7 @@ void AccessibleBase::RemoveChildByOId( const 
ObjectIdentifier& rOId )
 m_aChildOIDMap.erase( aIt );
 
 // search child in vector
-ChildListVectorType::iterator aVecIter =
-std::find( m_aChildList.begin(), m_aChildList.end(), xChild );
+auto aVecIter = std::find(m_aChildList.begin(), m_aChildList.end(), 
xChild);
 
 OSL_ENSURE( aVecIter != m_aChildList.end(),
 "Inconsistent ChildMap" );
@@ -361,7 +360,7 @@ void AccessibleBase::KillAllChildren()
 ClearableMutexGuard aGuard( m_aMutex );
 
 // make local copy for notification, and remove all children
-ChildListVectorType aLocalChildList;
+std::vector> aLocalChildList;
 aLocalChildList.swap( m_aChildList );
 m_aChildOIDMap.clear();
 
@@ -586,7 +585,7 @@ Reference< XAccessible > SAL_CALL 
AccessibleBase::getAccessibleAtPoint( const aw
 ( aRect.Y <= aPoint.Y && aPoint.Y <= (aRect.Y + aRect.Height)))
 {
 ClearableMutexGuard aGuard( m_aMutex );
-ChildListVectorType aLocalChildList( m_aChildList );
+std::vector> aLocalChildList( m_aChildList );
 aGuard.clear();
 
 Reference< XAccessibleComponent > aComp;
diff --git a/chart2/source/controller/inc/AccessibleBase.hxx 
b/chart2/source/controller/inc/AccessibleBase.hxx
index b7ccbac900da..788de8cebcae 100644
--- a/chart2/source/controller/inc/AccessibleBase.hxx
+++ b/chart2/source/controller/inc/AccessibleBase.hxx
@@ -283,9 +283,6 @@ private:
 Color getColor( eColorType eColType );
 
 private:
-/** type of the vector containing the accessible children
- */
-typedef std::vector< css::uno::Reference< css::accessibility::XAccessible 
> > ChildListVectorType;
 /** type of the hash containing a vector index for every AccessibleUniqueId
 of the object in the child list
  */
@@ -294,7 +291,7 @@ private:
 bool  m_bIsDisposed;
 const boolm_bMayHaveChildren;
 bool  m_bChildrenInitialized;
-ChildListVectorType   m_aChildList;
+std::vector> 
m_aChildList;
 
 ChildOIDMap   m_aChildOIDMap;
 


core.git: chart2/source

2024-05-10 Thread Michael Weghorn (via logerrit)
 chart2/source/controller/main/ChartController.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2684a1be8dceb0864772b57ce89ab822d198da04
Author: Michael Weghorn 
AuthorDate: Fri May 10 07:50:15 2024 +0200
Commit: Michael Weghorn 
CommitDate: Fri May 10 16:23:00 2024 +0200

chart2 a11y: Use XAccessible ref, not XInterface

Use the more specific type that
`Window::GetAccessible` returns.

Change-Id: Ied837b043997b4a51b280c71d0b35ca7eaa07385
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167431
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index f21bfad50549..5c9bbb2d0133 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1550,7 +1550,7 @@ void ChartController::impl_initializeAccessible()
 auto pChartWindow(GetChartWindow());
 if( !pChartWindow )
 return;
-Reference< XInterface > xInit( pChartWindow->GetAccessible(false) );
+Reference xInit = pChartWindow->GetAccessible(false);
 if(xInit.is())
 impl_initializeAccessible( dynamic_cast(*xInit) 
);
 #endif


core.git: chart2/source

2024-05-09 Thread Balazs Varga (via logerrit)
 chart2/source/controller/main/ChartController_Tools.cxx |6 +++---
 chart2/source/controller/main/ControllerCommandDispatch.cxx |3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 654150ffd05f43813332eedb969ab07fffa51b21
Author: Balazs Varga 
AuthorDate: Wed May 8 17:22:24 2024 +0200
Commit: Balazs Varga 
CommitDate: Thu May 9 09:54:53 2024 +0200

tdf#58038 - chart: make available format characters toolbar for

text boxes or shapes *inside* charts (as created with the Drawing toolbar).

follow-up commit: 4f994cec388377cc5c2bddb804bd92eb4cd7dc8d
(tdf#39052 - Chart: make characters formatable in editable chart textshapes)

Change-Id: Iccc5ee350ea0a37d8bda9652e09d3d61339f1d71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167366
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/controller/main/ChartController_Tools.cxx 
b/chart2/source/controller/main/ChartController_Tools.cxx
index 67ea64a11fb9..ded134db24c6 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -582,9 +582,9 @@ bool ChartController::isShapeContext() const
 
 bool ChartController::IsTextEdit() const
 {
-// only Title objects are editable textshapes
-return m_aSelection.isTitleObjectSelected() &&
-m_pDrawViewWrapper && m_pDrawViewWrapper->IsTextEdit();
+// only Title objects and additional shapes are editable textshapes in 
chart
+return m_pDrawViewWrapper && m_pDrawViewWrapper->IsTextEdit() &&
+(m_aSelection.isTitleObjectSelected() || 
m_aSelection.isAdditionalShapeSelected());
 }
 
 void ChartController::impl_ClearSelection()
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx 
b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index 787968b3f13b..ee9d7d480de3 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -599,7 +599,8 @@ void ControllerCommandDispatch::updateCommandAvailability()
 // format objects
 bool bFormatObjectAvailable = bIsWritable && bControllerStateIsValid && 
m_apControllerState->bIsFormateableObjectSelected;
 m_aCommandAvailability[ u".uno:FormatSelection"_ustr ] = 
bFormatObjectAvailable && !bIsTextEdit;
-m_aCommandAvailability[ u".uno:FontDialog"_ustr ] = bFormatObjectAvailable 
&& bIsTextEdit;
+m_aCommandAvailability[ u".uno:FontDialog"_ustr ] = (bShapeContext ? 
isShapeControllerCommandAvailable(u".uno:FontDialog"_ustr) :
+bFormatObjectAvailable) && bIsTextEdit;
 m_aCommandAvailability[ u".uno:FormatAxis"_ustr ] = bFormatObjectAvailable;
 m_aCommandAvailability[ u".uno:FormatTitle"_ustr ] = 
bFormatObjectAvailable && !bIsTextEdit;
 m_aCommandAvailability[ u".uno:FormatDataSeries"_ustr ] = 
bFormatObjectAvailable;


core.git: chart2/source

2024-04-09 Thread Gabor Kelemen (via logerrit)
 chart2/source/controller/chartapiwrapper/GridWrapper.cxx   |1 -
 chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx |1 -
 chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx  |1 -
 chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx  |1 -
 chart2/source/controller/dialogs/TitleDialogData.cxx   |1 -
 chart2/source/controller/dialogs/dlg_ChartType.cxx |1 -
 chart2/source/controller/dialogs/dlg_DataSource.cxx|1 -
 chart2/source/controller/dialogs/dlg_View3D.cxx|1 -
 chart2/source/controller/main/ChartController_Position.cxx |1 -
 chart2/source/inc/ChartResourceGroups.hxx  |1 -
 chart2/source/model/main/ChartModel.cxx|1 -
 chart2/source/model/template/ColumnLineChartTypeTemplate.cxx   |1 -
 chart2/source/model/template/FilledNetChartType.cxx|1 -
 chart2/source/model/template/StockChartTypeTemplate.cxx|1 -
 chart2/source/tools/ColorPerPointHelper.cxx|1 -
 chart2/source/view/axes/VPolarAngleAxis.cxx|1 -
 chart2/source/view/axes/VPolarAxis.cxx |1 -
 chart2/source/view/axes/VPolarCoordinateSystem.cxx |1 -
 chart2/source/view/charttypes/BarPositionHelper.cxx|1 -
 chart2/source/view/charttypes/BubbleChart.cxx  |1 -
 chart2/source/view/charttypes/CandleStickChart.cxx |1 -
 chart2/source/view/main/LabelPositionHelper.cxx|1 -
 chart2/source/view/main/PlotterBase.cxx|1 -
 chart2/source/view/main/PolarLabelPositionHelper.cxx   |1 -
 24 files changed, 24 deletions(-)

New commits:
commit 6e1647699fb7de69b7b14498dbc9b133c24508d4
Author: Gabor Kelemen 
AuthorDate: Sat Mar 30 21:25:06 2024 +0100
Commit: Gabor Kelemen 
CommitDate: Tue Apr 9 10:43:12 2024 +0200

tdf#146619 Drop unused 'using namespace' in: chart2/

Change-Id: I632d0dda0e62e5b1bf0956e731ab5ed6417db1ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165688
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
index 8a9f4267e785..5f75aa686a69 100644
--- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
@@ -34,7 +34,6 @@
 #include 
 
 using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
 
 using ::com::sun::star::beans::Property;
 using ::com::sun::star::uno::Reference;
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
index 4f98fa5923f2..d0cb5eab6552 100644
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
@@ -32,7 +32,6 @@
 #include 
 
 using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
 
 using ::com::sun::star::beans::Property;
 using ::com::sun::star::uno::Reference;
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
index 9fa2e5132168..c63090d81ac8 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
@@ -32,7 +32,6 @@
 #include 
 
 using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
 
 using ::com::sun::star::beans::Property;
 using ::com::sun::star::uno::Reference;
diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
index dc5742aef63b..9c8a6f61afb0 100644
--- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
@@ -31,7 +31,6 @@
 #include 
 
 using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
 
 using ::com::sun::star::beans::Property;
 using ::com::sun::star::uno::Reference;
diff --git a/chart2/source/controller/dialogs/TitleDialogData.cxx 
b/chart2/source/controller/dialogs/TitleDialogData.cxx
index b8f3ed6d9429..75d59bbb43b4 100644
--- a/chart2/source/controller/dialogs/TitleDialogData.cxx
+++ b/chart2/source/controller/dialogs/TitleDialogData.cxx
@@ -28,7 +28,6 @@
 namespace chart
 {
 using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
 
 TitleDialogData::TitleDialogData( std::optional 
pRefSizeProvider )
 : aPossibilityList{ true, true, true, true, true, true, true }
diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx 
b/chart2/source/controller/dialogs/dlg_ChartType.cxx
index e6e88dae42b8..a1f52f5169a5 100644
--- 

core.git: chart2/source dbaccess/source include/vcl sc/source sd/source svx/source sw/source vcl/source

2024-04-08 Thread Noel Grandin (via logerrit)
 chart2/source/controller/main/ChartController_Tools.cxx |6 -
 dbaccess/source/ui/misc/TableCopyHelper.cxx |   15 +--
 dbaccess/source/ui/tabledesign/TEditControl.cxx |5 -
 include/vcl/transfer.hxx|4 
 sc/source/ui/app/transobj.cxx   |4 
 sc/source/ui/view/gridwin.cxx   |2 
 sc/source/ui/view/viewfun3.cxx  |   24 ++---
 sc/source/ui/view/viewfun4.cxx  |4 
 sc/source/ui/view/viewfun5.cxx  |9 --
 sd/source/ui/view/sdview3.cxx   |   36 ++--
 svx/source/gallery2/galtheme.cxx|4 
 sw/source/uibase/dochdl/swdtflvr.cxx|9 --
 vcl/source/treelist/transfer.cxx|   67 +++-
 13 files changed, 78 insertions(+), 111 deletions(-)

New commits:
commit e7bb3a52067c426eedffddf86e7d5f0903562da2
Author: Noel Grandin 
AuthorDate: Sun Apr 7 20:23:26 2024 +0100
Commit: Noel Grandin 
CommitDate: Mon Apr 8 23:16:25 2024 +0200

cid#1596254 Null pointer dereferences in GetSotStorageStream

Re-arrange the calling convention to make it obvious that
a valid stream is the same as a good (true) result.

Change-Id: I974b023a8e7231e70ab649628fdbe43c33001e5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165874
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 539516de7466..5774ff1350d4 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -266,8 +266,7 @@ void ChartController::executeDispatch_Paste()
 {
 if ( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) )
 {
-std::unique_ptr xStm;
-if ( aDataHelper.GetSotStorageStream( 
SotClipboardFormatId::DRAWING, xStm ) )
+if (std::unique_ptr xStm = 
aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING) )
 {
 xStm->Seek( 0 );
 Reference< io::XInputStream > xInputStream( new 
utl::OInputStreamWrapper( *xStm ) );
@@ -284,8 +283,7 @@ void ChartController::executeDispatch_Paste()
 else if ( aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) )
 {
 // graphic exchange format (graphic manager bitmap format?)
-std::unique_ptr xStm;
-if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, 
xStm ))
+if (std::unique_ptr xStm = 
aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB ))
 {
 TypeSerializer aSerializer(*xStm);
 aSerializer.readGraphic(aGraphic);
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx 
b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index 9da2cb100f3d..5d22c90468c8 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -180,16 +180,15 @@ void OTableCopyHelper::pasteTable( SotClipboardFormatId 
_nFormatId
 try
 {
 DropDescriptor aTrans;
-bool bOk;
 if ( _nFormatId != SotClipboardFormatId::RTF )
-bOk = 
_rTransData.GetSotStorageStream(SotClipboardFormatId::HTML 
,aTrans.aHtmlRtfStorage);
+aTrans.aHtmlRtfStorage = 
_rTransData.GetSotStorageStream(SotClipboardFormatId::HTML);
 else
-bOk = 
_rTransData.GetSotStorageStream(SotClipboardFormatId::RTF,aTrans.aHtmlRtfStorage);
+aTrans.aHtmlRtfStorage = 
_rTransData.GetSotStorageStream(SotClipboardFormatId::RTF);
 
 aTrans.nType= E_TABLE;
 aTrans.bHtml= SotClipboardFormatId::HTML == _nFormatId;
 aTrans.sDefaultTableName = GetTableNameForAppend();
-if ( !bOk || !copyTagTable(aTrans,false,_xConnection) )
+if ( !aTrans.aHtmlRtfStorage || 
!copyTagTable(aTrans,false,_xConnection) )
 
m_pController->showError(SQLException(DBA_RES(STR_NO_TABLE_FORMAT_INSIDE), 
*m_pController, "S1000", 0, Any()));
 }
 catch(const SQLException&)
@@ -254,16 +253,12 @@ bool OTableCopyHelper::copyTagTable(const 
TransferableDataHelper& _aDroppedData
 bool bHtml = _aDroppedData.HasFormat(SotClipboardFormatId::HTML);
 if ( bHtml || _aDroppedData.HasFormat(SotClipboardFormatId::RTF) )
 {
-bool bOk;
-if ( bHtml )
-bOk = _aDroppedData.GetSotStorageStream(SotClipboardFormatId::HTML 
,_rAsyncDrop.aHtmlRtfStorage);
-else
-bOk = 
_aDroppedData.GetSotStorageStream(SotClipboardFormatId::RTF,_rAsyncDrop.aHtmlRtfStorage);
+_rAsyncDrop.aHtmlRtfStorage = _aDroppedData.GetSotStorageStream(bHtml 
? SotClipboardFormatId::HTML : 

core.git: chart2/source chart2/uiconfig

2024-04-02 Thread Balazs Varga (via logerrit)
 chart2/source/controller/dialogs/TitleDialogData.cxx|2 
 chart2/source/controller/inc/ChartController.hxx|5 
 chart2/source/controller/inc/SelectionHelper.hxx|1 
 chart2/source/controller/main/ChartController.cxx   |6 
 chart2/source/controller/main/ChartController_TextEdit.cxx  |   93 +++-
 chart2/source/controller/main/ChartController_Tools.cxx |   11 +
 chart2/source/controller/main/ChartController_Window.cxx|   10 -
 chart2/source/controller/main/ControllerCommandDispatch.cxx |6 
 chart2/source/controller/main/SelectionHelper.cxx   |5 
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |3 
 chart2/source/inc/TitleHelper.hxx   |4 
 chart2/source/tools/TitleHelper.cxx |   72 ++---
 chart2/uiconfig/menubar/menubar.xml |1 
 chart2/uiconfig/toolbar/toolbar.xml |1 
 14 files changed, 180 insertions(+), 40 deletions(-)

New commits:
commit 4f994cec388377cc5c2bddb804bd92eb4cd7dc8d
Author: Balazs Varga 
AuthorDate: Thu Mar 28 17:55:30 2024 +0100
Commit: Balazs Varga 
CommitDate: Tue Apr 2 23:27:03 2024 +0200

tdf#39052 - Chart: make characters formatable in editable chart textshapes

Editable textshapes include main chart title, sub chart title, axis titles.

In chart2 the chart2::XFormattedString and chart2::XFormattedString2 store
the formatted characters from textshapes, so we need to set all the 
character
properties from the EditTextObject and need to add them to to the 
XFormattedString
array with all the related texts which are formatted individually.

For formatting of the characters the .uno:FontDialog command can be used,
which can be called from the chart menubar, toolbar and with right click
on the text when we are in edit mode in the textshape.

(Note: in the next patch the OOXML export will be fixed.)

Change-Id: I5750a5fe694b384dc6b28e2ef03ac1f2b03957db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165501
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/controller/dialogs/TitleDialogData.cxx 
b/chart2/source/controller/dialogs/TitleDialogData.cxx
index 45dda2c897b0..b8f3ed6d9429 100644
--- a/chart2/source/controller/dialogs/TitleDialogData.cxx
+++ b/chart2/source/controller/dialogs/TitleDialogData.cxx
@@ -99,7 +99,7 @@ bool TitleDialogData::writeDifferenceToModel(
 TitleHelper::getTitle( static_cast< TitleHelper::eTitleType >( 
nN ), xChartModel ) );
 if(xTitle.is())
 {
-TitleHelper::setCompleteString( aTextList[nN], xTitle, 
xContext );
+TitleHelper::setCompleteString( aTextList[nN], xTitle, 
xContext, nullptr, true );
 bChanged = true;
 }
 }
diff --git a/chart2/source/controller/inc/ChartController.hxx 
b/chart2/source/controller/inc/ChartController.hxx
index d1e95efafac3..737d0cf3768f 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -323,6 +323,7 @@ public:
 void setDrawMode( ChartDrawMode eMode ) { m_eDrawMode = eMode; }
 
 bool isShapeContext() const;
+bool IsTextEdit() const;
 
 ViewElementListProvider getViewElementListProvider();
 DrawModelWrapper* GetDrawModelWrapper();
@@ -484,6 +485,8 @@ private:
 void executeDispatch_MoveSeries( bool bForward );
 
 bool EndTextEdit();
+css::uno::Sequence< css::uno::Reference> 
GetFormattedTitle(
+const EditTextObject& aEdit, const css::uno::Reference< 
css::drawing::XShape >& xShape );
 
 void executeDispatch_View3D();
 void executeDispatch_PositionAndSize( const ::css::uno::Sequence< 
::css::beans::PropertyValue >* pArgs = nullptr );
@@ -514,7 +517,7 @@ private:
 const css::uno::Sequence< css::beans::PropertyValue >& rArgs );
 
 DECL_LINK( DoubleClickWaitingHdl, Timer*, void );
-void execute_DoubleClick( const Point* pMousePixel );
+void execute_DoubleClick( const Point* pMousePixel, bool  );
 void startDoubleClickWaiting();
 void stopDoubleClickWaiting();
 
diff --git a/chart2/source/controller/inc/SelectionHelper.hxx 
b/chart2/source/controller/inc/SelectionHelper.hxx
index ff0e95eee27a..119640bd4300 100644
--- a/chart2/source/controller/inc/SelectionHelper.hxx
+++ b/chart2/source/controller/inc/SelectionHelper.hxx
@@ -39,6 +39,7 @@ public: //methods
 
 bool isResizeableObjectSelected() const;
 bool isRotateableObjectSelected( const 
rtl::Reference<::chart::ChartModel>& xChartModel ) const;
+bool isTitleObjectSelected() const;
 bool isDragableObjectSelected() const;
 
 bool isAdditionalShapeSelected() const;
diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx

core.git: chart2/source oox/inc oox/source

2024-04-02 Thread Balazs Varga (via logerrit)
 chart2/source/view/main/PropertyMapper.cxx  |3 
 chart2/source/view/main/ShapeFactory.cxx|   72 ++--
 oox/inc/drawingml/textcharacterproperties.hxx   |8 +
 oox/source/drawingml/chart/titleconverter.cxx   |   11 ++
 oox/source/drawingml/textcharacterpropertiescontext.cxx |3 
 5 files changed, 71 insertions(+), 26 deletions(-)

New commits:
commit f31a8ff9ea15ad81aeac265fce6eafe6342a68b7
Author: Balazs Varga 
AuthorDate: Thu Mar 28 17:17:47 2024 +0100
Commit: Balazs Varga 
CommitDate: Tue Apr 2 23:26:13 2024 +0200

tdf#78027 - Fix Chart OOXML Import with non-uniform formatted titles

Character formats are disappeared from Chart Title textobjects if they were
formatted non-uniform. In this patch only the OOXML import and the chartview
part will be fixed which make it visible after the import.

(Note: next patch will contain the chart controller part where the 
characters
can be formatted during title editing).

Change-Id: I4fb5c3d80b7889935d198e70fb49e2c68108b235
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165500
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/view/main/PropertyMapper.cxx 
b/chart2/source/view/main/PropertyMapper.cxx
index c3241049057a..79206624f436 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -268,7 +268,8 @@ const tPropertyNameMap& 
PropertyMapper::getPropertyNameMapForCharacterProperties
 {"CharColor","CharColor"},
 {"CharContoured","CharContoured"},
 {"CharEmphasis", "CharEmphasis"},//the service 
style::CharacterProperties  describes a property called 'CharEmphasize' which 
is nowhere implemented
-
+{"CharEscapement",   "CharEscapement"},
+{"CharEscapementHeight", "CharEscapementHeight"},
 {"CharFontFamily",   "CharFontFamily"},
 {"CharFontFamilyAsian",  "CharFontFamilyAsian"},
 {"CharFontFamilyComplex","CharFontFamilyComplex"},
diff --git a/chart2/source/view/main/ShapeFactory.cxx 
b/chart2/source/view/main/ShapeFactory.cxx
index 0e572a7e8dcb..c681c581a7b3 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -2183,7 +2183,8 @@ rtl::Reference
 
 //set text and text properties
 uno::Reference< text::XTextCursor > xTextCursor( 
xShape->createTextCursor() );
-if( !xTextCursor.is() )
+uno::Reference< text::XTextCursor > xSelectionCursor( 
xShape->createTextCursor() );
+if( !xTextCursor.is() || !xSelectionCursor.is() )
 return xShape;
 
 tPropertyNameValueMap aValueMap;
@@ -2232,18 +2233,32 @@ rtl::Reference
 //if the characters should be stacked we use only the first 
character properties for code simplicity
 if( xFormattedString.hasElements() )
 {
-OUString aLabel;
-for (const auto& i : xFormattedString)
-aLabel += i->getString();
-aLabel = ShapeFactory::getStackedString( aLabel, 
bStackCharacters );
-
-xTextCursor->gotoEnd(false);
-xShape->insertString( xTextCursor, aLabel, false );
-xTextCursor->gotoEnd(true);
-uno::Reference< beans::XPropertySet > xSourceProps( 
xFormattedString[0], uno::UNO_QUERY );
-
-PropertyMapper::setMappedProperties( *xShape, xSourceProps
-, 
PropertyMapper::getPropertyNameMapForCharacterProperties() );
+size_t nLBreaks = xFormattedString.size() - 1;
+uno::Reference< beans::XPropertySet > 
xSelectionProp(xSelectionCursor, uno::UNO_QUERY);
+for (const uno::Reference& rxFS : 
xFormattedString)
+{
+if (!rxFS->getString().isEmpty())
+{
+xTextCursor->gotoEnd(false);
+xSelectionCursor->gotoEnd(false);
+OUString aLabel = 
ShapeFactory::getStackedString(rxFS->getString(), bStackCharacters);
+if (nLBreaks-- > 0)
+aLabel += OUStringChar(' ');
+xShape->insertString(xTextCursor, aLabel, false);
+xSelectionCursor->gotoEnd(true); // select current 
paragraph
+uno::Reference< beans::XPropertySet > 
xSourceProps(rxFS, uno::UNO_QUERY);
+if (xFormattedString.size() > 1 && xSelectionProp.is())
+{
+
PropertyMapper::setMappedProperties(xSelectionProp, xSourceProps,
+
PropertyMapper::getPropertyNameMapForTextShapeProperties());
+}
+else
+   

core.git: chart2/source

2024-04-02 Thread Gökay Şatır (via logerrit)
 chart2/source/controller/main/ChartController_Window.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3eb61ea78d73c4b1311bf3ec4e5b4e0332e9f0ba
Author: Gökay Şatır 
AuthorDate: Mon Mar 18 15:34:01 2024 +0300
Commit: Caolán McNamara 
CommitDate: Tue Apr 2 12:26:18 2024 +0200

Disable chart modification in readony view mode.

Signed-off-by: Gökay Şatır 
Change-Id: I271caa12eed69099d6f0acd9bdcff53efcc26972
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164970
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit dd232051d7ac43f1f15731916708a95403b78b62)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165627
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/chart2/source/controller/main/ChartController_Window.cxx 
b/chart2/source/controller/main/ChartController_Window.cxx
index 681c0ae95f0b..116e65090126 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -935,8 +935,8 @@ void ChartController::execute_MouseButtonUp( const 
MouseEvent& rMEvt )
 void ChartController::execute_DoubleClick( const Point* pMousePixel )
 {
 const SfxViewShell* pViewShell = SfxViewShell::Current();
-bool isMobilePhone = pViewShell && pViewShell->isLOKMobilePhone();
-if (isMobilePhone)
+bool notAllowed = pViewShell && (pViewShell->isLOKMobilePhone() || 
pViewShell->IsLokReadOnlyView());
+if (notAllowed)
 return;
 
 bool bEditText = false;


core.git: chart2/source dbaccess/source include/sot include/svx include/vcl sc/source sd/source sot/source svx/inc svx/source sw/source vcl/source

2024-04-01 Thread Noel Grandin (via logerrit)
 chart2/source/controller/main/ChartController_Tools.cxx |4 -
 chart2/source/controller/main/ChartTransferable.cxx |8 +-
 chart2/source/controller/main/ChartTransferable.hxx |2 
 dbaccess/source/ui/browser/dbexchange.cxx   |6 -
 dbaccess/source/ui/inc/TableCopyHelper.hxx  |2 
 dbaccess/source/ui/inc/TableRowExchange.hxx |2 
 dbaccess/source/ui/inc/dbexchange.hxx   |2 
 dbaccess/source/ui/misc/TableCopyHelper.cxx |   10 +--
 dbaccess/source/ui/tabledesign/TEditControl.cxx |4 -
 dbaccess/source/ui/tabledesign/TableRowExchange.cxx |6 -
 include/sot/storage.hxx |   10 ---
 include/svx/galmisc.hxx |5 -
 include/svx/galtheme.hxx|4 -
 include/vcl/transfer.hxx|7 --
 sc/source/ui/app/drwtrans.cxx   |   18 ++---
 sc/source/ui/app/transobj.cxx   |   22 +++
 sc/source/ui/inc/drwtrans.hxx   |2 
 sc/source/ui/inc/transobj.hxx   |2 
 sc/source/ui/view/gridwin.cxx   |2 
 sc/source/ui/view/viewfun3.cxx  |2 
 sc/source/ui/view/viewfun4.cxx  |6 -
 sc/source/ui/view/viewfun5.cxx  |8 +-
 sd/source/ui/app/sdxfer.cxx |   12 +--
 sd/source/ui/inc/View.hxx   |2 
 sd/source/ui/inc/sdxfer.hxx |2 
 sd/source/ui/view/sdview3.cxx   |   24 +++
 sot/source/sdstor/storage.cxx   |   50 
 svx/inc/galleryfilestorage.hxx  |6 -
 svx/source/gallery2/galleryfilestorage.cxx  |   14 +---
 svx/source/gallery2/galmisc.cxx |   18 ++---
 svx/source/gallery2/galtheme.cxx|   12 +--
 sw/source/uibase/dochdl/swdtflvr.cxx|   32 +-
 sw/source/uibase/inc/swdtflvr.hxx   |2 
 vcl/source/treelist/transfer.cxx|   36 +--
 34 files changed, 145 insertions(+), 199 deletions(-)

New commits:
commit 25b642fdd87da4d5ed556600d0eb69d72865f666
Author: Noel Grandin 
AuthorDate: Mon Apr 1 20:52:59 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue Apr 2 07:53:43 2024 +0200

simplify SotTempStream and lifetime

It is really just an SvStream instance, and the lifetime does
not need reference counting

Change-Id: Idb5ffd96f852aae0dc1a94cddc0a83fbcdf974ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165655
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 6df81215f261..6cf3a22e41ad 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -266,7 +266,7 @@ void ChartController::executeDispatch_Paste()
 {
 if ( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) )
 {
-tools::SvRef xStm;
+std::unique_ptr xStm;
 if ( aDataHelper.GetSotStorageStream( 
SotClipboardFormatId::DRAWING, xStm ) )
 {
 xStm->Seek( 0 );
@@ -284,7 +284,7 @@ void ChartController::executeDispatch_Paste()
 else if ( aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) )
 {
 // graphic exchange format (graphic manager bitmap format?)
-tools::SvRef xStm;
+std::unique_ptr xStm;
 if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, 
xStm ))
 {
 TypeSerializer aSerializer(*xStm);
diff --git a/chart2/source/controller/main/ChartTransferable.cxx 
b/chart2/source/controller/main/ChartTransferable.cxx
index d369562d03d2..7c8eb12041f6 100644
--- a/chart2/source/controller/main/ChartTransferable.cxx
+++ b/chart2/source/controller/main/ChartTransferable.cxx
@@ -105,7 +105,7 @@ bool ChartTransferable::GetData( const 
css::datatransfer::DataFlavor& rFlavor, c
 return bResult;
 }
 
-bool ChartTransferable::WriteObject( tools::SvRef& rxOStm, 
void* pUserObject, sal_uInt32 nUserObjectId,
+bool ChartTransferable::WriteObject( SvStream& rOStm, void* pUserObject, 
sal_uInt32 nUserObjectId,
 const datatransfer::DataFlavor& /* rFlavor */ )
 {
 // called from SetObject, put data into stream
@@ -118,7 +118,7 @@ bool ChartTransferable::WriteObject( 
tools::SvRef& rxOStm, void*
 SdrModel* pMarkedObjModel = static_cast< SdrModel* >( 
pUserObject );
 if ( pMarkedObjModel )
 {
-rxOStm->SetBufferSize( 0xff00 );
+   

core.git: chart2/source include/vcl offapi/com sd/source uitest/uitest vcl/source

2024-03-28 Thread Noel Grandin (via logerrit)
 chart2/source/controller/inc/uiobject.hxx|2 ++
 chart2/source/controller/uitest/uiobject.cxx |8 
 include/vcl/uitest/uiobject.hxx  |9 +
 offapi/com/sun/star/ui/test/XUIObject.idl|5 +
 sd/source/ui/uitest/uiobject.cxx |   10 ++
 uitest/uitest/test.py|   17 +
 vcl/source/treelist/uiobject.cxx |9 +
 vcl/source/uitest/uiobject.cxx   |8 
 vcl/source/uitest/uno/uiobject_uno.cxx   |5 +
 vcl/source/uitest/uno/uiobject_uno.hxx   |2 ++
 10 files changed, 67 insertions(+), 8 deletions(-)

New commits:
commit 5ec7c4eecf955090cc3bdd7a283aa5a291d12385
Author: Noel Grandin 
AuthorDate: Wed Mar 27 21:56:50 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 28 17:17:32 2024 +0100

fix comparison of UIObject's inside UITests

using == to compare them doesnt work, because we return
a new one with every call to getTopFocusWindow and similar.
So add a equals() method to the UNO interface to do the comparison.

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

diff --git a/chart2/source/controller/inc/uiobject.hxx 
b/chart2/source/controller/inc/uiobject.hxx
index 917ba322bf5e..6de63f5d3fdf 100644
--- a/chart2/source/controller/inc/uiobject.hxx
+++ b/chart2/source/controller/inc/uiobject.hxx
@@ -32,6 +32,8 @@ public:
 
 virtual OUString get_type() const override;
 
+virtual bool equals(const UIObject& rOther) const override;
+
 private:
 
 OUString maCID;
diff --git a/chart2/source/controller/uitest/uiobject.cxx 
b/chart2/source/controller/uitest/uiobject.cxx
index 783a91982f84..c75f15c3885c 100644
--- a/chart2/source/controller/uitest/uiobject.cxx
+++ b/chart2/source/controller/uitest/uiobject.cxx
@@ -95,6 +95,14 @@ OUString ChartUIObject::get_type() const
 return "ChartUIObject for type: ";
 }
 
+bool ChartUIObject::equals(const UIObject& rOther) const
+{
+const ChartUIObject* pOther = dynamic_cast();
+if (!pOther)
+return false;
+return mxChartWindow.get() == pOther->mxChartWindow.get();
+}
+
 ChartWindowUIObject::ChartWindowUIObject(const VclPtr& 
xChartWindow):
 WindowUIObject(xChartWindow),
 mxChartWindow(xChartWindow)
diff --git a/include/vcl/uitest/uiobject.hxx b/include/vcl/uitest/uiobject.hxx
index d27140b2c21b..8f1624dc7f7a 100644
--- a/include/vcl/uitest/uiobject.hxx
+++ b/include/vcl/uitest/uiobject.hxx
@@ -113,6 +113,11 @@ public:
  * Gets the corresponding Action string for the event.
  */
 virtual OUString get_action(VclEventId nEvent) const;
+
+/**
+ * Does this represent the same underlying UI widget as rOther?
+ */
+virtual bool equals(const UIObject& rOther) const = 0;
 };
 
 class UITEST_DLLPUBLIC WindowUIObject : public UIObject
@@ -144,6 +149,8 @@ public:
 
 static std::unique_ptr create(vcl::Window* pWindow);
 
+virtual bool equals(const UIObject& rOther) const override;
+
 protected:
 
 virtual OUString get_name() const;
@@ -505,6 +512,8 @@ public:
 
 virtual OUString get_type() const override;
 
+virtual bool equals(const UIObject& rOther) const override;
+
 private:
 
 SvTreeListEntry* getEntry() const;
diff --git a/offapi/com/sun/star/ui/test/XUIObject.idl 
b/offapi/com/sun/star/ui/test/XUIObject.idl
index 8f5febffb17e..4f37b11568e1 100644
--- a/offapi/com/sun/star/ui/test/XUIObject.idl
+++ b/offapi/com/sun/star/ui/test/XUIObject.idl
@@ -22,6 +22,11 @@ interface XUIObject
 sequence getChildren();
 
 string getHierarchy();
+
+/** Return true if the other XUIObject represents the same underlying vcl 
widget.
+This is necessary because we return a new XUIObject every time we call 
getChild.
+*/
+boolean equals([in] XUIObject other);
 };
 
 }; }; }; }; };
diff --git a/sd/source/ui/uitest/uiobject.cxx b/sd/source/ui/uitest/uiobject.cxx
index 00884fc90d6f..2c96b9495b14 100644
--- a/sd/source/ui/uitest/uiobject.cxx
+++ b/sd/source/ui/uitest/uiobject.cxx
@@ -29,6 +29,8 @@ public:
 
 SdrObject* get_object() override;
 
+virtual bool equals(const UIObject& rOther) const override;
+
 private:
 VclPtr mxWindow;
 
@@ -74,6 +76,14 @@ ImpressSdrObject::ImpressSdrObject(const VclPtr& 
xImpressWin, OUStri
 
 SdrObject* ImpressSdrObject::get_object() { return getObject(mxWindow, 
maName); }
 
+bool ImpressSdrObject::equals(const UIObject& rOther) const
+{
+const ImpressSdrObject* pOther = dynamic_cast();
+if (!pOther)
+return false;
+return mxWindow.get() == pOther->mxWindow.get();
+}
+
 ImpressWindowUIObject::ImpressWindowUIObject(const VclPtr& xWindow)
 : WindowUIObject(xWindow)
 , mxWindow(xWindow)
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py
index fbe5d2a87c99..e6491af3f67f 100644
--- 

core.git: chart2/source

2024-03-27 Thread Noel Grandin (via logerrit)
 chart2/source/inc/UncachedDataSequence.hxx   |   11 --
 chart2/source/tools/UncachedDataSequence.cxx |   28 ++-
 2 files changed, 16 insertions(+), 23 deletions(-)

New commits:
commit afd6bd25ec748063825c74156bc9006366481f7f
Author: Noel Grandin 
AuthorDate: Tue Mar 26 15:30:12 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 27 10:51:18 2024 +0100

convert UncachedDataSequence to comphelper::WeakComponentImplHelper

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

diff --git a/chart2/source/inc/UncachedDataSequence.hxx 
b/chart2/source/inc/UncachedDataSequence.hxx
index ca32af236d80..c134601944ff 100644
--- a/chart2/source/inc/UncachedDataSequence.hxx
+++ b/chart2/source/inc/UncachedDataSequence.hxx
@@ -19,10 +19,10 @@
 #pragma once
 
 // helper classes
-#include 
+#include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 
@@ -46,7 +46,7 @@ class ModifyEventForwarder;
 
 namespace impl
 {
-typedef ::cppu::WeakComponentImplHelper<
+typedef ::comphelper::WeakComponentImplHelper<
 css::chart2::data::XDataSequence,
 css::chart2::data::XNumericalDataSequence,
 css::chart2::data::XTextualDataSequence,
@@ -69,8 +69,7 @@ typedef ::cppu::WeakComponentImplHelper<
  * 'label 2', ...
  */
 class UncachedDataSequence final :
-public ::comphelper::OMutexAndBroadcastHelper,
-public ::comphelper::OPropertyContainer,
+public ::comphelper::OPropertyContainer2,
 public ::comphelper::OPropertyArrayUsageHelper< UncachedDataSequence >,
 public impl::UncachedDataSequence_Base
 {
@@ -103,7 +102,7 @@ private:
 /// @see css::beans::XPropertySet
 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL 
getPropertySetInfo() override;
 /// @see ::comphelper::OPropertySetHelper
-virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
+virtual ::cppu::IPropertyArrayHelper& getInfoHelper() override;
 /// @see ::comphelper::OPropertyArrayUsageHelper
 virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const override;
 
diff --git a/chart2/source/tools/UncachedDataSequence.cxx 
b/chart2/source/tools/UncachedDataSequence.cxx
index 7211daedba6f..176eadafe8b1 100644
--- a/chart2/source/tools/UncachedDataSequence.cxx
+++ b/chart2/source/tools/UncachedDataSequence.cxx
@@ -36,7 +36,6 @@ using ::com::sun::star::uno::Any;
 using ::osl::MutexGuard;
 
 // necessary for MS compiler
-using ::comphelper::OPropertyContainer;
 using ::chart::impl::UncachedDataSequence_Base;
 
 namespace
@@ -57,9 +56,7 @@ namespace chart
 UncachedDataSequence::UncachedDataSequence(
 rtl::Reference< InternalDataProvider > xIntDataProv,
 OUString aRangeRepresentation )
-: OPropertyContainer( GetBroadcastHelper()),
-  UncachedDataSequence_Base( GetMutex()),
-  m_nNumberFormatKey(0),
+: m_nNumberFormatKey(0),
   m_xDataProvider(std::move( xIntDataProv )),
   m_aSourceRepresentation(std::move( aRangeRepresentation )),
   m_xModifyEventForwarder( new ModifyEventForwarder() )
@@ -71,21 +68,18 @@ UncachedDataSequence::UncachedDataSequence(
 rtl::Reference< InternalDataProvider > xIntDataProv,
 OUString aRangeRepresentation,
 const OUString & rRole )
-: OPropertyContainer( GetBroadcastHelper()),
-  UncachedDataSequence_Base( GetMutex()),
-  m_nNumberFormatKey(0),
+: m_nNumberFormatKey(0),
   m_xDataProvider(std::move( xIntDataProv )),
   m_aSourceRepresentation(std::move( aRangeRepresentation )),
   m_xModifyEventForwarder( new ModifyEventForwarder() )
 {
 registerProperties();
-setFastPropertyValue_NoBroadcast( PROP_PROPOSED_ROLE, uno::Any( rRole ));
+std::unique_lock aGuard;
+setFastPropertyValue_NoBroadcast( aGuard, PROP_PROPOSED_ROLE, uno::Any( 
rRole ));
 }
 
 UncachedDataSequence::UncachedDataSequence( const UncachedDataSequence & 
rSource )
-: OPropertyContainer( GetBroadcastHelper()),
-  UncachedDataSequence_Base( GetMutex()),
-  m_nNumberFormatKey( rSource.m_nNumberFormatKey ),
+: m_nNumberFormatKey( rSource.m_nNumberFormatKey ),
   m_sRole( rSource.m_sRole ),
   m_xDataProvider( rSource.m_xDataProvider ),
   m_aSourceRepresentation( rSource.m_aSourceRepresentation ),
@@ -118,8 +112,8 @@ void UncachedDataSequence::registerProperties()
   cppu::UnoType::get() );
 }
 
-IMPLEMENT_FORWARD_XINTERFACE2( UncachedDataSequence, 
UncachedDataSequence_Base, OPropertyContainer )
-IMPLEMENT_FORWARD_XTYPEPROVIDER2( UncachedDataSequence, 
UncachedDataSequence_Base, OPropertyContainer )
+IMPLEMENT_FORWARD_XINTERFACE2( UncachedDataSequence, 
UncachedDataSequence_Base, comphelper::OPropertyContainer2 )
+IMPLEMENT_FORWARD_XTYPEPROVIDER2( UncachedDataSequence, 

core.git: chart2/source

2024-03-27 Thread Noel Grandin (via logerrit)
 chart2/source/inc/CachedDataSequence.hxx   |   12 +---
 chart2/source/tools/CachedDataSequence.cxx |   27 +--
 2 files changed, 14 insertions(+), 25 deletions(-)

New commits:
commit ebe0f745e88a4d96bb29e52f4a56ec788c7c06ae
Author: Noel Grandin 
AuthorDate: Tue Mar 26 15:26:53 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 27 10:09:33 2024 +0100

convert CachedDataSequence to comphelper::WeakComponentImplHelper

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

diff --git a/chart2/source/inc/CachedDataSequence.hxx 
b/chart2/source/inc/CachedDataSequence.hxx
index e9c1b9d50d25..513907c2429d 100644
--- a/chart2/source/inc/CachedDataSequence.hxx
+++ b/chart2/source/inc/CachedDataSequence.hxx
@@ -19,10 +19,9 @@
 #pragma once
 
 // helper classes
-#include 
+#include 
 #include 
-#include 
-#include 
+#include 
 #include 
 
 // interfaces and types
@@ -41,7 +40,7 @@ namespace chart
 
 namespace impl
 {
-typedef ::cppu::WeakComponentImplHelper<
+typedef ::comphelper::WeakComponentImplHelper<
 css::chart2::data::XDataSequence,
 css::chart2::data::XNumericalDataSequence,
 css::chart2::data::XTextualDataSequence,
@@ -56,8 +55,7 @@ typedef ::cppu::WeakComponentImplHelper<
  * This sequence object does store actual values within, hence "cached".
  */
 class CachedDataSequence final :
-public ::comphelper::OMutexAndBroadcastHelper,
-public ::comphelper::OPropertyContainer,
+public ::comphelper::OPropertyContainer2,
 public ::comphelper::OPropertyArrayUsageHelper< CachedDataSequence >,
 public impl::CachedDataSequence_Base
 {
@@ -93,7 +91,7 @@ private:
 /// @see css::beans::XPropertySet
 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL 
getPropertySetInfo() override;
 /// @see ::comphelper::OPropertySetHelper
-virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
+virtual ::cppu::IPropertyArrayHelper& getInfoHelper() override;
 /// @see ::comphelper::OPropertyArrayUsageHelper
 virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const override;
 
diff --git a/chart2/source/tools/CachedDataSequence.cxx 
b/chart2/source/tools/CachedDataSequence.cxx
index 23f5add5f85f..7ddc9a010408 100644
--- a/chart2/source/tools/CachedDataSequence.cxx
+++ b/chart2/source/tools/CachedDataSequence.cxx
@@ -34,7 +34,6 @@ using ::com::sun::star::uno::Any;
 using ::osl::MutexGuard;
 
 // necessary for MS compiler
-using ::comphelper::OPropertyContainer;
 using ::chart::impl::CachedDataSequence_Base;
 
 namespace
@@ -53,26 +52,20 @@ namespace chart
 {
 
 CachedDataSequence::CachedDataSequence()
-: OPropertyContainer( GetBroadcastHelper()),
-  CachedDataSequence_Base( GetMutex()),
-  m_eCurrentDataType( NUMERICAL ),
+: m_eCurrentDataType( NUMERICAL ),
   m_xModifyEventForwarder( new ModifyEventForwarder() )
 {
 registerProperties();
 }
 CachedDataSequence::CachedDataSequence( const Reference< 
uno::XComponentContext > & /*xContext*/ )
-: OPropertyContainer( GetBroadcastHelper()),
-  CachedDataSequence_Base( GetMutex()),
-  m_eCurrentDataType( MIXED ),
+: m_eCurrentDataType( MIXED ),
   m_xModifyEventForwarder( new ModifyEventForwarder() )
 {
 registerProperties();
 }
 
 CachedDataSequence::CachedDataSequence( const OUString & rSingleText )
-: OPropertyContainer( GetBroadcastHelper()),
-  CachedDataSequence_Base( GetMutex()),
-  m_eCurrentDataType( TEXTUAL ),
+: m_eCurrentDataType( TEXTUAL ),
   m_aTextualSequence({rSingleText}),
   m_xModifyEventForwarder( new ModifyEventForwarder() )
 {
@@ -80,9 +73,7 @@ CachedDataSequence::CachedDataSequence( const OUString & 
rSingleText )
 }
 
 CachedDataSequence::CachedDataSequence( const CachedDataSequence & rSource )
-: OPropertyContainer( GetBroadcastHelper()),
-  CachedDataSequence_Base( GetMutex()),
-  m_nNumberFormatKey( rSource.m_nNumberFormatKey ),
+: m_nNumberFormatKey( rSource.m_nNumberFormatKey ),
   m_sRole( rSource.m_sRole ),
   m_eCurrentDataType( rSource.m_eCurrentDataType ),
   m_xModifyEventForwarder( new ModifyEventForwarder() )
@@ -213,8 +204,8 @@ Sequence< Any > CachedDataSequence::Impl_getMixedData() 
const
 return aResult;
 }
 
-IMPLEMENT_FORWARD_XINTERFACE2( CachedDataSequence, CachedDataSequence_Base, 
OPropertyContainer )
-IMPLEMENT_FORWARD_XTYPEPROVIDER2( CachedDataSequence, CachedDataSequence_Base, 
OPropertyContainer )
+IMPLEMENT_FORWARD_XINTERFACE2( CachedDataSequence, CachedDataSequence_Base, 
comphelper::OPropertyContainer2 )
+IMPLEMENT_FORWARD_XTYPEPROVIDER2( CachedDataSequence, CachedDataSequence_Base, 
comphelper::OPropertyContainer2 )
 
 //  XPropertySet 
 Reference< 

core.git: chart2/source cui/source editeng/source include/svl include/svx sc/source sd/source sfx2/source svl/source svx/inc svx/source sw/source

2024-03-21 Thread Armin Le Grand (allotropia) (via logerrit)
 chart2/source/controller/dialogs/res_DataTableProperties.cxx |8 
 chart2/source/controller/dialogs/res_ErrorBar.cxx|8 
 chart2/source/controller/dialogs/res_Trendline.cxx   |8 
 chart2/source/controller/dialogs/tp_AxisLabel.cxx|   10 -
 chart2/source/controller/itemsetwrapper/ItemConverter.cxx|2 
 chart2/source/controller/main/DrawCommandDispatch.cxx|2 
 cui/source/tabpages/align.cxx|   14 -
 cui/source/tabpages/chardlg.cxx  |   42 ++--
 cui/source/tabpages/measure.cxx  |   16 -
 cui/source/tabpages/numfmt.cxx   |2 
 cui/source/tabpages/paragrph.cxx |   26 +-
 cui/source/tabpages/textattr.cxx |   20 +-
 cui/source/tabpages/tparea.cxx   |2 
 cui/source/tabpages/tpbitmap.cxx |   20 +-
 cui/source/tabpages/tpline.cxx   |   24 +-
 cui/source/tabpages/tplnedef.cxx |2 
 cui/source/tabpages/tpshadow.cxx |   32 +--
 cui/source/tabpages/tptrans.cxx  |4 
 editeng/source/editeng/editdbg.cxx   |2 
 editeng/source/uno/unofored.cxx  |6 
 editeng/source/uno/unotext.cxx   |   12 -
 include/svl/itemset.hxx  |2 
 include/svl/poolitem.hxx |8 
 include/svx/sdr/properties/properties.hxx|2 
 sc/source/core/data/documen8.cxx |2 
 sc/source/core/data/patattr.cxx  |4 
 sc/source/core/data/stlpool.cxx  |6 
 sc/source/core/tool/editutil.cxx |6 
 sc/source/filter/html/htmlexp.cxx|2 
 sc/source/filter/rtf/eeimpars.cxx|4 
 sc/source/ui/app/inputhdl.cxx|8 
 sc/source/ui/attrdlg/tabpages.cxx|2 
 sc/source/ui/docshell/docsh6.cxx |2 
 sc/source/ui/drawfunc/drtxtob.cxx|   14 -
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx  |2 
 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx |6 
 sc/source/ui/unoobj/cellsuno.cxx |2 
 sc/source/ui/vba/vbafont.cxx |   18 -
 sc/source/ui/vba/vbaformat.cxx   |4 
 sc/source/ui/vba/vbarange.cxx|6 
 sc/source/ui/view/editsh.cxx |4 
 sc/source/ui/view/formatsh.cxx   |   22 +-
 sc/source/ui/view/viewfun2.cxx   |4 
 sc/source/ui/view/viewutil.cxx   |2 
 sd/source/ui/dlg/tpaction.cxx|4 
 sd/source/ui/func/fuconrec.cxx   |2 
 sd/source/ui/unoidl/unopback.cxx |2 
 sd/source/ui/view/drtxtob.cxx|4 
 sd/source/ui/view/drtxtob1.cxx   |2 
 sd/source/ui/view/drviews2.cxx   |6 
 sd/source/ui/view/drviewsf.cxx   |8 
 sfx2/source/control/bindings.cxx |6 
 sfx2/source/control/ctrlitem.cxx |4 
 sfx2/source/control/shell.cxx|4 
 sfx2/source/control/unoctitm.cxx |6 
 sfx2/source/dialog/tabdlg.cxx|2 
 sfx2/source/doc/objcont.cxx  |2 
 sfx2/source/toolbox/tbxitem.cxx  |8 
 svl/source/items/itemset.cxx |   26 --
 svx/inc/sdr/properties/e3dcompoundproperties.hxx |2 
 svx/inc/sdr/properties/e3dsceneproperties.hxx|2 
 svx/inc/sdr/properties/groupproperties.hxx   |2 
 svx/source/dialog/connctrl.cxx   |2 
 svx/source/dialog/rlrcitem.cxx   |2 
 svx/source/dialog/srchdlg.cxx|9 
 svx/source/dialog/weldeditview.cxx   |6 
 svx/source/engine3d/float3d.cxx  |  110 +--
 svx/source/sdr/properties/e3dsceneproperties.cxx |2 
 svx/source/sdr/properties/groupproperties.cxx|2 
 svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx  |2 
 svx/source/svdraw/constructhelper.cxx

core.git: chart2/source

2024-03-17 Thread Julien Nabet (via logerrit)
 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 9661b094e10602148c3cf68bcce01f4a6714bedd
Author: Julien Nabet 
AuthorDate: Sun Mar 17 09:31:22 2024 +0100
Commit: Julien Nabet 
CommitDate: Sun Mar 17 11:14:23 2024 +0100

tdf#160225, related tdf#92768: hide axis title not taken into account 
when...

duplicating sheet or when saving a file and reopen it.

When creating a title for an axis, "createTitle" is called.
Before tdf#92768 "support hiding title objects", when unchecking "axis 
title" in sidebar,
the title was removed (via "removeTitle")
But since tdf#92768, "hideTitle" is called instead.

The pb is "Visible" attribute wasn't registered in 
StaticTitleWrapperPropertyArray.
So when duplicating sheet after having created a title and hidden it,
when duplicating sheet, the new sheet had the title visible.
In the same way if, after having created a title and hidden it,
you save the file and reopen it, the title is displayed.

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

diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
index 75d6c9e98f1f..9c802462ff09 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
@@ -127,6 +127,7 @@ namespace
 enum
 {
 PROP_TITLE_STRING,
+PROP_TITLE_VISIBLE,
 PROP_TITLE_TEXT_ROTATION,
 PROP_TITLE_TEXT_STACKED
 };
@@ -140,6 +141,12 @@ void lcl_AddPropertiesToVector(
   beans::PropertyAttribute::BOUND
   | beans::PropertyAttribute::MAYBEVOID );
 
+rOutProperties.emplace_back( "Visible",
+  PROP_TITLE_VISIBLE,
+  cppu::UnoType::get(),
+  beans::PropertyAttribute::BOUND
+  | beans::PropertyAttribute::MAYBEVOID );
+
 rOutProperties.emplace_back( "TextRotation",
   PROP_TITLE_TEXT_ROTATION,
   cppu::UnoType::get(),


core.git: chart2/source

2024-03-11 Thread Kurt Nordback (via logerrit)
 chart2/source/view/charttypes/BarChart.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 46e96625e9dc3c452a7323c8bf231fea3acab606
Author: Kurt Nordback 
AuthorDate: Thu Jan 4 09:17:48 2024 -0700
Commit: Ilmari Lauhakangas 
CommitDate: Mon Mar 11 14:56:28 2024 +0100

tdf#96944: Stacked column chart does not show connection lines

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

diff --git a/chart2/source/view/charttypes/BarChart.cxx 
b/chart2/source/view/charttypes/BarChart.cxx
index cd8ab4e86c48..fcc969b898ad 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -542,8 +542,6 @@ void BarChart::createShapes()
 getSeriesGroupShape(pSeries.get(), xSeriesTarget) );
 rtl::Reference xShape( 
ShapeFactory::createLine2D(
 xSeriesGroupShape_Shapes, aPoly ) );
-PropertyMapper::setMappedProperties( *xShape, 
pSeries->getPropertiesOfSeries()
-, 
PropertyMapper::getPropertyNameMapForFilledSeriesProperties() );
 }
 }
 }


core.git: chart2/source

2024-03-09 Thread Sujatro Bhadra (via logerrit)
 chart2/source/view/main/VDataSeries.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ddd5017410f4ec2f4860a27f4946e05458686afd
Author: Sujatro Bhadra 
AuthorDate: Fri Mar 8 20:14:36 2024 +0530
Commit: Hossein 
CommitDate: Sat Mar 9 12:27:57 2024 +0100

tdf#158237 Use C++20 contains() instead of find() and end()

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

diff --git a/chart2/source/view/main/VDataSeries.cxx 
b/chart2/source/view/main/VDataSeries.cxx
index b6605942e338..0462effd8a6b 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -1148,7 +1148,7 @@ double VDataSeries::getValueByProperty( sal_Int32 nIndex, 
const OUString& rPropN
 
 bool VDataSeries::hasPropertyMapping(const OUString& rPropName ) const
 {
-return m_PropertyMap.find(rPropName) != m_PropertyMap.end();
+return m_PropertyMap.contains(rPropName);
 }
 
 } //namespace chart


core.git: chart2/source sw/qa

2024-03-08 Thread Balazs Varga (via logerrit)
 chart2/source/view/main/SeriesPlotterContainer.cxx |7 +
 chart2/source/view/main/SeriesPlotterContainer.hxx |2 -
 sw/qa/extras/layout/layout3.cxx|   25 +
 3 files changed, 28 insertions(+), 6 deletions(-)

New commits:
commit 40a19e61efff859d83e0689c0ed7d40c8e9ae8fe
Author: Balazs Varga 
AuthorDate: Thu Mar 7 14:32:44 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 8 09:42:42 2024 +0100

tdf#159456 - chart view: fix wrongly shifted value Y axis

We only have to shift the category axis only, and not the
value axis, if we have a chart data table.

Change-Id: Ie77ea829e8f8987702dce7d17cb3e20054f3d8cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164539
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/view/main/SeriesPlotterContainer.cxx 
b/chart2/source/view/main/SeriesPlotterContainer.cxx
index b70e51510b7d..06a22207634d 100644
--- a/chart2/source/view/main/SeriesPlotterContainer.cxx
+++ b/chart2/source/view/main/SeriesPlotterContainer.cxx
@@ -174,7 +174,7 @@ void 
SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChart
 }
 
 if (xDiagram->getDataTable().is())
-m_bForceShiftPosition = true;
+m_bTableShiftPosition = true;
 
 //prepare for autoscaling and shape creation
 // - create plotter for charttypes (for each first scale group at each 
plotter, as they are independent)
@@ -357,12 +357,9 @@ void 
SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChart
 bool SeriesPlotterContainer::isCategoryPositionShifted(const 
chart2::ScaleData& rSourceScale,
bool 
bHasComplexCategories)
 {
-if (m_bForceShiftPosition)
-return true;
-
 if (rSourceScale.AxisType == AxisType::CATEGORY)
 return bHasComplexCategories || rSourceScale.ShiftedCategoryPosition
-   || m_bChartTypeUsesShiftedCategoryPositionPerDefault;
+   || m_bTableShiftPosition || 
m_bChartTypeUsesShiftedCategoryPositionPerDefault;
 
 if (rSourceScale.AxisType == AxisType::DATE)
 return rSourceScale.ShiftedCategoryPosition;
diff --git a/chart2/source/view/main/SeriesPlotterContainer.hxx 
b/chart2/source/view/main/SeriesPlotterContainer.hxx
index 578f2ba2760c..38f3c8b909c8 100644
--- a/chart2/source/view/main/SeriesPlotterContainer.hxx
+++ b/chart2/source/view/main/SeriesPlotterContainer.hxx
@@ -151,7 +151,7 @@ private:
 sal_Int32 m_nMaxAxisIndex;
 
 bool m_bChartTypeUsesShiftedCategoryPositionPerDefault;
-bool m_bForceShiftPosition = false;
+bool m_bTableShiftPosition = false;
 sal_Int32 m_nDefaultDateNumberFormat;
 };
 
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index 7bb1dbced75c..9d2de1ea0497 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -2458,6 +2458,31 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159422)
 CPPUNIT_ASSERT_DOUBLES_EQUAL(6573, nYSymbol3, 20);
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159456)
+{
+// Given a document with chart, which have a datatable
+createSwDoc("charttable.odt");
+SwDoc* pDoc = getSwDoc();
+SwDocShell* pShell = pDoc->GetDocShell();
+
+// Dump the rendering of the first page as an XML file.
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ Without the fix, this would fail:
+ - Expected: 1
+ - Actual  : 1.5
+ - In <>, XPath contents of child does not match
+assertXPathContent(
+pXmlDoc,
+
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[103]/textarray/text"_ostr,
+"1");
+assertXPathContent(
+pXmlDoc,
+
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[104]/textarray/text"_ostr,
+"2");
+}
+
 } // end of anonymous namespace
 
 CPPUNIT_PLUGIN_IMPLEMENT();


core.git: chart2/source sw/qa

2024-03-08 Thread Balazs Varga (via logerrit)
 chart2/source/view/main/DataTableView.cxx |9 +++---
 sw/qa/extras/layout/data/charttable.odt   |binary
 sw/qa/extras/layout/layout3.cxx   |   39 ++
 3 files changed, 44 insertions(+), 4 deletions(-)

New commits:
commit f4ba83e82aafc206d17d2fa66a27573ebc5a3624
Author: Balazs Varga 
AuthorDate: Wed Mar 6 22:52:44 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 8 09:41:15 2024 +0100

tdf#159422 - chart view: fix symbols position of data table legend

Calculate the correct/optimal row height after calculating and set
correct width of a table cell. Then we will have the correct row height
for the symbol positions.

Change-Id: I65bc0f0579ea100906b0b32449c2200a54c2a353
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164512
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/view/main/DataTableView.cxx 
b/chart2/source/view/main/DataTableView.cxx
index c3c807ca099b..eacd91a6a651 100644
--- a/chart2/source/view/main/DataTableView.cxx
+++ b/chart2/source/view/main/DataTableView.cxx
@@ -455,11 +455,9 @@ void DataTableView::createShapes(basegfx::B2DVector const& 
rStart, basegfx::B2DV
 nRow++;
 }
 
+// force recalculation of column widths in the table shape
 xBroadcaster->unlockBroadcasts();
-
-// force recalculation of all cells in the table shape
 pTableObject->DistributeColumns(0, nColumnCount, true, true);
-pTableObject->DistributeRows(0, nRowCount, true, true);
 
 xBroadcaster->lockBroadcasts();
 
@@ -477,6 +475,10 @@ void DataTableView::createShapes(basegfx::B2DVector const& 
rStart, basegfx::B2DV
 xPropertySet->setPropertyValue("Width", uno::Any(nColumnWidth));
 }
 
+// force recalculation of row heights in the table shape
+xBroadcaster->unlockBroadcasts();
+pTableObject->DistributeRows(0, nRowCount, true, true);
+
 if (bKeys)
 {
 sal_Int32 nTotalHeight = 0;
@@ -501,7 +503,6 @@ void DataTableView::createShapes(basegfx::B2DVector const& 
rStart, basegfx::B2DV
 }
 }
 }
-xBroadcaster->unlockBroadcasts();
 }
 
 void DataTableView::changePosition(sal_Int32 x, sal_Int32 y)
diff --git a/sw/qa/extras/layout/data/charttable.odt 
b/sw/qa/extras/layout/data/charttable.odt
new file mode 100644
index ..e8dfa37d8006
Binary files /dev/null and b/sw/qa/extras/layout/data/charttable.odt differ
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index f96b786cc093..7bb1dbced75c 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -2419,6 +2419,45 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159443)
 "4.3");
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159422)
+{
+// Given a document with chart, which have a datatable
+createSwDoc("charttable.odt");
+SwDoc* pDoc = getSwDoc();
+SwDocShell* pShell = pDoc->GetDocShell();
+
+// Dump the rendering of the first page as an XML file.
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+CPPUNIT_ASSERT(pXmlDoc);
+ Without the fix, this would fail:
+ - Expected: 5877
+ - Actual  : 5649
+ - Delta   : 20
+sal_Int32 nYSymbol1
+= getXPath(
+  pXmlDoc,
+  
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[99]/polypolygon/polygon/point[1]"_ostr,
+  "y"_ostr)
+  .toInt32();
+CPPUNIT_ASSERT_DOUBLES_EQUAL(5877, nYSymbol1, 20);
+sal_Int32 nYSymbol2
+= getXPath(
+  pXmlDoc,
+  
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[100]/polypolygon/polygon/point[1]"_ostr,
+  "y"_ostr)
+  .toInt32();
+CPPUNIT_ASSERT_DOUBLES_EQUAL(6225, nYSymbol2, 20);
+sal_Int32 nYSymbol3
+= getXPath(
+  pXmlDoc,
+  
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[101]/polypolygon/polygon/point[1]"_ostr,
+  "y"_ostr)
+  .toInt32();
+CPPUNIT_ASSERT_DOUBLES_EQUAL(6573, nYSymbol3, 20);
+}
+
 } // end of anonymous namespace
 
 CPPUNIT_PLUGIN_IMPLEMENT();


core.git: chart2/source sw/qa

2024-03-08 Thread Balazs Varga (via logerrit)
 chart2/source/view/axes/VCartesianAxis.cxx |7 ++
 sw/qa/extras/layout/data/tdf159443.odt |binary
 sw/qa/extras/layout/layout3.cxx|   30 +
 3 files changed, 37 insertions(+)

New commits:
commit f856733ed18353b8ac7d7e19348cf9b1107cc14b
Author: Balazs Varga 
AuthorDate: Wed Mar 6 14:54:22 2024 +0100
Commit: Balazs Varga 
CommitDate: Fri Mar 8 09:40:14 2024 +0100

tdf#159443 - chart view: fix Data table is not rendered below chart

If we have 1 dataseries we will have no tickmarks, in that case the
distance between two tickmarks is the width of the chart.

Change-Id: Ifea11329f1dcb80e8e390c1408306d1df7d49ded
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164471
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/chart2/source/view/axes/VCartesianAxis.cxx 
b/chart2/source/view/axes/VCartesianAxis.cxx
index 8163058ad5e0..a0c4a329d76d 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -1687,6 +1687,13 @@ void 
VCartesianAxis::createDataTableShape(std::unique_ptr const&
 nDistance *= 2;
 }
 
+if (nDistance <= 0)
+{
+// we only have one data series so we have no TickMarks, therefor 
calculate and use the table size
+auto rDelta = aEnd - aStart;
+nDistance = basegfx::fround(rDelta.getX());
+}
+
 if (nDistance > 0)
 {
 m_pDataTableView->createShapes(aStart, aEnd, nDistance);
diff --git a/sw/qa/extras/layout/data/tdf159443.odt 
b/sw/qa/extras/layout/data/tdf159443.odt
new file mode 100644
index ..8ec733aedb06
Binary files /dev/null and b/sw/qa/extras/layout/data/tdf159443.odt differ
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index de11ac7d788d..f96b786cc093 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -2389,6 +2389,36 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, 
testPageBreakInHiddenSection)
 assertXPath(pXmlDoc, "//page[4]/body/section/infos/bounds"_ostr, 
"height"_ostr, u"0"_ustr);
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159443)
+{
+// Given a document with chart, which have a datatable
+createSwDoc("tdf159443.odt");
+SwDoc* pDoc = getSwDoc();
+SwDocShell* pShell = pDoc->GetDocShell();
+
+// Dump the rendering of the first page as an XML file.
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+CPPUNIT_ASSERT(pXmlDoc);
+ Without the fix, this would fail:
+ - Expected: DataSeries1
+ - Actual  : 1.25
+ - In <>, XPath contents of child does not match
+assertXPathContent(
+pXmlDoc,
+
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[47]/textarray/text"_ostr,
+"DataSeries1");
+assertXPathContent(
+pXmlDoc,
+
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[49]/textarray/text"_ostr,
+"Category1");
+assertXPathContent(
+pXmlDoc,
+
"/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/push[51]/textarray/text"_ostr,
+"4.3");
+}
+
 } // end of anonymous namespace
 
 CPPUNIT_PLUGIN_IMPLEMENT();


core.git: chart2/source

2024-03-03 Thread codewithvk (via logerrit)
 chart2/source/controller/inc/ChartController.hxx |2 
 chart2/source/controller/main/ChartController_Insert.cxx |9 -
 chart2/source/controller/main/ChartController_Properties.cxx |   58 +--
 3 files changed, 32 insertions(+), 37 deletions(-)

New commits:
commit 8c3fa629f489fdd5ec73c9ec18010eeaf39955a4
Author: codewithvk 
AuthorDate: Thu Jan 25 18:39:18 2024 +0530
Commit: Caolán McNamara 
CommitDate: Sun Mar 3 14:52:38 2024 +0100

Make Chart Object Properties Dialogs Async

How to reproduce it:
When double-clicking on a chart, it will now open the Chart Object 
Properties dialog box.

Previously synchronous, this commit updates it to be asynchronous.

Signed-off-by: codewithvk 
Change-Id: I54c24e0cd30d6ec8b2bfa93567e830405d2fd30c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162576
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 748a5a01165d40e9bcaa7bfc75b0e6f74fc5a07d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164125
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/chart2/source/controller/inc/ChartController.hxx 
b/chart2/source/controller/inc/ChartController.hxx
index e6d42f139053..d1e95efafac3 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -430,7 +430,7 @@ private:
 void executeDispatch_ObjectProperties();
 void executeDispatch_FormatObject( std::u16string_view rDispatchCommand );
 void executeDlg_ObjectProperties( const OUString& rObjectCID );
-bool executeDlg_ObjectProperties_withoutUndoGuard( const OUString& 
rObjectCID, bool bSuccessOnUnchanged );
+void executeDlg_ObjectProperties_withUndoGuard( std::shared_ptr 
aUndoGuard, const OUString& rObjectCID, bool bSuccessOnUnchanged );
 
 void executeDispatch_ChartType();
 
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx 
b/chart2/source/controller/main/ChartController_Insert.cxx
index b80ef2bd5fd1..6461955cbc24 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -358,7 +358,7 @@ void ChartController::executeDispatch_OpenLegendDialog()
 
 void ChartController::executeDispatch_InsertMenu_DataLabels()
 {
-UndoGuard aUndoGuard(
+std::shared_ptr aUndoGuard = std::make_shared(
 ActionDescriptionProvider::createDescription(
 ActionDescriptionProvider::ActionType::Insert, SchResId( 
STR_OBJECT_DATALABELS )),
 m_xUndoManager );
@@ -375,12 +375,9 @@ void 
ChartController::executeDispatch_InsertMenu_DataLabels()
 OUString aObjectCID = 
ObjectIdentifier::createClassifiedIdentifierForParticles(
 
ObjectIdentifier::getSeriesParticleFromCID(m_aSelection.getSelectedCID()), 
aChildParticle );
 
-bool bSuccess = 
ChartController::executeDlg_ObjectProperties_withoutUndoGuard( aObjectCID, true 
);
-if( bSuccess )
-aUndoGuard.commit();
+ChartController::executeDlg_ObjectProperties_withUndoGuard( 
aUndoGuard, aObjectCID, true );
 return;
 }
-
 try
 {
 wrapper::AllDataLabelItemConverter aItemConverter(
@@ -408,7 +405,7 @@ void 
ChartController::executeDispatch_InsertMenu_DataLabels()
 ControllerLockGuardUNO aCLGuard( getChartModel() );
 bool bChanged = aItemConverter.ApplyItemSet( aOutItemSet );//model 
should be changed now
 if( bChanged )
-aUndoGuard.commit();
+aUndoGuard->commit();
 }
 }
 catch(const uno::RuntimeException&)
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx 
b/chart2/source/controller/main/ChartController_Properties.cxx
index 84f1fdcb9e33..79b6159d4a6e 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -703,24 +703,22 @@ void ChartController::executeDlg_ObjectProperties( const 
OUString& rSelectedObje
 {
 OUString aObjectCID = lcl_getFormatCIDforSelectedCID( rSelectedObjectCID );
 
-UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription(
-ActionDescriptionProvider::ActionType::Format,
-ObjectNameProvider::getName( ObjectIdentifier::getObjectType( 
aObjectCID ))),
-m_xUndoManager );
+auto aUndoGuard = std::make_shared(
+ActionDescriptionProvider::createDescription(
+ActionDescriptionProvider::ActionType::Format,
+ObjectNameProvider::getName( ObjectIdentifier::getObjectType( 
aObjectCID ))),
+m_xUndoManager );
 
-bool bSuccess = 
ChartController::executeDlg_ObjectProperties_withoutUndoGuard( aObjectCID, 
false );
-if( bSuccess )
-aUndoGuard.commit();
+ChartController::executeDlg_ObjectProperties_withUndoGuard( aUndoGuard, 
aObjectCID, false );

core.git: chart2/source

2024-02-29 Thread Caolán McNamara (via logerrit)
 chart2/source/view/main/VDataSeries.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 0956dda717473eb7ac0d0936ce457e66301ab400
Author: Caolán McNamara 
AuthorDate: Thu Feb 29 08:29:31 2024 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 29 15:07:18 2024 +0100

cid#1169880 Uninitialized scalar field

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

diff --git a/chart2/source/view/main/VDataSeries.cxx 
b/chart2/source/view/main/VDataSeries.cxx
index 88462ebcf0b7..b6605942e338 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -1083,6 +1083,7 @@ VDataSeries::VDataSeries()
 , m_bConnectBars(false)
 , m_bGroupBarsPerAxis(false)
 , m_nStartingAngle(0)
+, m_ePieChartSubType(PieChartSubType_NONE)
 , m_nGlobalSeriesIndex(0)
 , m_nCurrentAttributedPoint(0)
 , m_nMissingValueTreatment(0)


core.git: chart2/source

2024-02-27 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/main/ChartController.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit edc45294fda1bb37cceb9bcf6355b4760e7ff712
Author: Caolán McNamara 
AuthorDate: Tue Feb 27 08:56:53 2024 +
Commit: Caolán McNamara 
CommitDate: Tue Feb 27 12:56:19 2024 +0100

cid#1592375 COPY_INSTEAD_OF_MOVE

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

diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index f9b3ac2a5858..9eca81b25513 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1393,15 +1393,15 @@ void ChartController::executeDispatch_SourceData()
 rModel.attachDataProvider(xDataProvider);
 }
 }
-auto aUndoGuard = 
std::make_shared(SchResId(STR_ACTION_EDIT_DATA_RANGES),
+auto xUndoGuard = 
std::make_shared(SchResId(STR_ACTION_EDIT_DATA_RANGES),
 m_xUndoManager);
 SolarMutexGuard aSolarGuard;
 auto aDlg = std::make_shared(GetChartFrame(), xChartDoc);
-weld::DialogController::runAsync(aDlg, [this, aUndoGuard](int nResult) {
+weld::DialogController::runAsync(aDlg, [this, 
xUndoGuard=std::move(xUndoGuard)](int nResult) {
 if (nResult == RET_OK)
 {
 impl_adaptDataSeriesAutoResize();
-aUndoGuard->commit();
+xUndoGuard->commit();
 }
 });
 }


core.git: chart2/source

2024-02-23 Thread Caolán McNamara (via logerrit)
 chart2/source/view/main/ShapeFactory.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 4052ce767a020383781c7351632e58d6ceea74d0
Author: Caolán McNamara 
AuthorDate: Thu Feb 22 16:33:23 2024 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 23 10:36:45 2024 +0100

crashtesting: isNaN as fUnitCircleWidthAngleDegree

presumably since recent tdf#50934 work

affect files are:

forums/xlsx/forum-mso-en4-295952.xlsx
forums/xlsx/forum-mso-en4-523214.xlsx
forums/xlsx/forum-mso-en4-656086.xlsx
forums/xlsx/forum-mso-en4-702681.xlsx

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

diff --git a/chart2/source/view/main/ShapeFactory.cxx 
b/chart2/source/view/main/ShapeFactory.cxx
index 228d4b2a1156..0e572a7e8dcb 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -898,6 +898,12 @@ rtl::Reference
 xShape->setShapeKind(SdrObjKind::PathFill); // aka ClosedBezierShape
 xTarget->addShape(*xShape); //need to add the shape before setting of 
properties
 
+if (std::isnan(fUnitCircleWidthAngleDegree))
+{
+SAL_WARN("chart2", "fUnitCircleWidthAngleDegree isNaN");
+return xShape;
+}
+
 //set properties
 try
 {


core.git: chart2/source include/svx svx/source svx/uiconfig

2024-02-20 Thread AkshayWarrier (via logerrit)
 chart2/source/controller/sidebar/ChartLinePanel.cxx |   17 -
 chart2/source/controller/sidebar/ChartLinePanel.hxx |4 
 include/svx/sidebar/LinePropertyPanelBase.hxx   |   17 -
 svx/source/sidebar/line/LinePropertyPanel.cxx   |   26 --
 svx/source/sidebar/line/LinePropertyPanel.hxx   |4 
 svx/source/sidebar/line/LinePropertyPanelBase.cxx   |  200 
 svx/uiconfig/ui/sidebarline.ui  |  133 +
 7 files changed, 29 insertions(+), 372 deletions(-)

New commits:
commit 8cd4cd31e9cffb593ccfba765fa28c2494a2d6f7
Author: AkshayWarrier 
AuthorDate: Mon Jan 22 20:31:16 2024 +0530
Commit: Hossein 
CommitDate: Tue Feb 20 20:54:17 2024 +0100

tdf#157882 svx: Remove cap/corner styles and move arrowhead control to new 
row

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

diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx 
b/chart2/source/controller/sidebar/ChartLinePanel.cxx
index 453c573e5198..c029d70b1619 100644
--- a/chart2/source/controller/sidebar/ChartLinePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx
@@ -232,23 +232,6 @@ void 
ChartLinePanel::updateModel(css::uno::Reference xModel)
 doUpdateModel(pModel);
 }
 
-void ChartLinePanel::setLineJoint(const XLineJointItem* pItem)
-{
-css::uno::Reference xPropSet =
-getPropSet(mxModel);
-
-if (!xPropSet.is())
-return;
-
-PreventUpdate aPreventUpdate(mbUpdate);
-if (pItem)
-xPropSet->setPropertyValue("LineJoint", 
css::uno::Any(pItem->GetValue()));
-}
-
-void ChartLinePanel::setLineCap(const XLineCapItem* /*pItem*/)
-{
-}
-
 void ChartLinePanel::setLineTransparency(const XLineTransparenceItem& rItem)
 {
 css::uno::Reference xPropSet =
diff --git a/chart2/source/controller/sidebar/ChartLinePanel.hxx 
b/chart2/source/controller/sidebar/ChartLinePanel.hxx
index 002ca51cc139..ca3d8be14244 100644
--- a/chart2/source/controller/sidebar/ChartLinePanel.hxx
+++ b/chart2/source/controller/sidebar/ChartLinePanel.hxx
@@ -16,10 +16,8 @@
 #include "ChartSidebarSelectionListener.hxx"
 #include "ChartColorWrapper.hxx"
 
-class XLineCapItem;
 class XLineDashItem;
 class XLineEndItem;
-class XLineJointItem;
 class XLineStartItem;
 class XLineStyleItem;
 class XLineTransparenceItem;
@@ -62,8 +60,6 @@ public:
 protected:
 
 virtual void setLineTransparency(const XLineTransparenceItem& rItem) 
override;
-virtual void setLineJoint(const XLineJointItem* pItem) override;
-virtual void setLineCap(const XLineCapItem* pItem) override;
 
 virtual void updateLineWidth(bool bDisabled, bool bSetOrDefault, const 
SfxPoolItem* pItem) override;
 
diff --git a/include/svx/sidebar/LinePropertyPanelBase.hxx 
b/include/svx/sidebar/LinePropertyPanelBase.hxx
index 7fc9d92da357..f15f0de9fc2b 100644
--- a/include/svx/sidebar/LinePropertyPanelBase.hxx
+++ b/include/svx/sidebar/LinePropertyPanelBase.hxx
@@ -34,8 +34,6 @@ class XLineStartItem;
 class XLineWidthItem;
 class XLineEndItem;
 class XLineEndList;
-class XLineJointItem;
-class XLineCapItem;
 class XLineTransparenceItem;
 class XDashList;
 
@@ -73,13 +71,9 @@ protected:
 void ActivateControls();
 
 virtual void setLineTransparency(const XLineTransparenceItem& rItem) = 0;
-virtual void setLineJoint(const XLineJointItem* pItem) = 0;
-virtual void setLineCap(const XLineCapItem* pItem) = 0;
 
 void updateLineTransparence(bool bDisabled, bool bSetOrDefault, const 
SfxPoolItem* pItem);
 virtual void updateLineWidth(bool bDisabled, bool bSetOrDefault, const 
SfxPoolItem* pItem);
-void updateLineJoint(bool bDisabled, bool bSetOrDefault, const 
SfxPoolItem* pItem);
-void updateLineCap(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* 
pItem);
 
 void setMapUnit(MapUnit eMapUnit);
 
@@ -101,12 +95,9 @@ private:
 std::unique_ptr mxTBWidth;
 std::unique_ptr mxFTTransparency;
 std::unique_ptr mxMFTransparent;
-std::unique_ptr mxFTEdgeStyle;
-std::unique_ptr mxLBEdgeStyle;
-std::unique_ptr mxFTCapStyle;
-std::unique_ptr mxLBCapStyle;
-std::unique_ptr mxGridLineProps;
-std::unique_ptr mxBoxArrowProps;
+std::unique_ptr mxArrowHeadStyleFT;
+std::unique_ptr mxArrowHeadStyleTB;
+std::unique_ptr mxArrowHeadStyleDispatch;
 //popup windows
 std::unique_ptr mxLineWidthPopup;
 
@@ -129,8 +120,6 @@ private:
 
 DECL_DLLPRIVATE_LINK(ToolboxWidthSelectHdl, const OUString&, void);
 DECL_DLLPRIVATE_LINK(ChangeTransparentHdl, weld::MetricSpinButton&, void);
-DECL_DLLPRIVATE_LINK(ChangeEdgeStyleHdl, weld::ComboBox&, void);
-DECL_DLLPRIVATE_LINK(ChangeCapStyleHdl, weld::ComboBox&, void);
 };
 
 } // end of namespace svx::sidebar
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx 
b/svx/source/sidebar/line/LinePropertyPanel.cxx
index 83a33b922888..53b4e0b325d7 100644
--- 

core.git: chart2/source dbaccess/source editeng/source extensions/source include/svl reportdesign/source sc/source sfx2/source svl/qa svl/source svx/source sw/source

2024-02-19 Thread Armin Le Grand (allotropia) (via logerrit)
 chart2/source/view/main/ChartItemPool.cxx  |3 -
 dbaccess/source/ui/dlg/dbadmin.cxx |2 
 dbaccess/source/ui/misc/UITools.cxx|2 
 editeng/source/editeng/eerdll.cxx  |2 
 extensions/source/propctrlr/fontdialog.cxx |2 
 include/svl/itempool.hxx   |   13 -
 reportdesign/source/ui/misc/UITools.cxx|2 
 reportdesign/source/ui/report/ReportController.cxx |4 +
 sc/source/core/data/docpool.cxx|2 
 sc/source/ui/app/msgpool.cxx   |3 -
 sfx2/source/explorer/nochaos.cxx   |2 
 svl/qa/unit/items/stylepool.cxx|5 ++
 svl/source/items/itempool.cxx  |   49 +++--
 svl/source/items/itemset.cxx   |   48 ++--
 svl/source/items/poolitem.cxx  |   32 ++---
 svx/source/dialog/imapwnd.cxx  |2 
 svx/source/svdraw/svdattr.cxx  |2 
 sw/source/core/bastyp/init.cxx |2 
 sw/source/core/unocore/unoevent.cxx|6 +-
 19 files changed, 133 insertions(+), 50 deletions(-)

New commits:
commit 9bd2012df77da01b9ee30b25698237fb45673f49
Author: Armin Le Grand (allotropia) 
AuthorDate: Mon Feb 19 14:50:37 2024 +0100
Commit: Armin Le Grand 
CommitDate: Mon Feb 19 20:04:34 2024 +0100

ITEM: Speedup SlotIDToWhichID translations

With ItemInfoPackages we now can have a buffered, static
global translation table from SlotIDs to WhichIDs since
the ItemInfoStatic used already contains all the needed
information.
Register that in registerItemInfoPackage at the Pool and
use it for lookup. That speeds up the lookup from O(n)
to O(1). Since that lookup is used in UI and UNO API
implementations this has positive effect on load/safe,
but also all interactive stuff in the whole office.

NOTE: I tried to use a merged version of that translation
table in the parent pool, but this shows double SlotIDs,
what is no wonder since that's what those are used for:
To get different WhichIDs for a SlotID in Item handling.
This *might* prevent getting rid of the chanined Pools
at all - sadly. The returned WhichID directly depends
on which Pool the function(s) GetWhichIDFromSlotID and
GetTrueWhichIDFromSlotID are called.

NOTE: Very strange is that the parameter 'bDeep' in that
functions is *not* passed down to the call to the
secondary Pool - probably an error, but risky to fix,
that may change already the behaviour :-(

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

diff --git a/chart2/source/view/main/ChartItemPool.cxx 
b/chart2/source/view/main/ChartItemPool.cxx
index e11e46ba2b8d..e28bb97f81db 100644
--- a/chart2/source/view/main/ChartItemPool.cxx
+++ b/chart2/source/view/main/ChartItemPool.cxx
@@ -182,8 +182,9 @@ static ItemInfoPackage& getItemInfoPackageChart()
 { SCHATTR_DATA_TABLE_KEYS, new 
SfxBoolItem(SCHATTR_DATA_TABLE_KEYS, false), 0, SFX_ITEMINFOFLAG_NONE }
 }};
 
-public:
+virtual const ItemInfoStatic& getItemInfoStatic(size_t nIndex) const 
override { return maItemInfos[nIndex]; }
 
+public:
 virtual size_t size() const override { return maItemInfos.size(); }
 virtual const ItemInfo& getItemInfo(size_t nIndex, SfxItemPool& 
/*rPool*/) override { return maItemInfos[nIndex]; }
 };
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx 
b/dbaccess/source/ui/dlg/dbadmin.cxx
index 67cf6298f247..7c4d6d7145d8 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -339,6 +339,8 @@ static ItemInfoPackage& getItemInfoPackageAdminDlg()
 { DSID_POSTGRES_PORTNUMBER, new 
SfxInt32Item(DSID_POSTGRES_PORTNUMBER, 5432), 0, SFX_ITEMINFOFLAG_NONE }
 }};
 
+virtual const ItemInfoStatic& getItemInfoStatic(size_t nIndex) const 
override { return maItemInfos[nIndex]; }
+
 public:
 ItemInfoPackageAdminDlg()
 {
diff --git a/dbaccess/source/ui/misc/UITools.cxx 
b/dbaccess/source/ui/misc/UITools.cxx
index 2a9747c01e5a..55e7f709f7b2 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -763,6 +763,8 @@ static ItemInfoPackage& 
getItemInfoPackageColumnFormatDialog()
 { SBA_ATTR_ALIGN_HOR_JUSTIFY, new 
SvxHorJustifyItem(SvxCellHorJustify::Standard, SBA_ATTR_ALIGN_HOR_JUSTIFY), 
SID_ATTR_ALIGN_HOR_JUSTIFY, SFX_ITEMINFOFLAG_NONE },
 }};
 
+virtual const ItemInfoStatic& getItemInfoStatic(size_t nIndex) const 
override { return maItemInfos[nIndex]; }
+
 public:
 virtual size_t size() const override { return maItemInfos.size(); }
 

core.git: chart2/source

2024-02-19 Thread Kurt Nordback (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cf2715782d9ccb2acf46dc316e9a8c6990bdf368
Author: Kurt Nordback 
AuthorDate: Sun Dec 10 21:06:44 2023 -0700
Commit: Noel Grandin 
CommitDate: Mon Feb 19 12:19:33 2024 +0100

tdf#50934: Fix color of composite wedge for imported of-pie charts

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index 6d2f0ce091aa..b70fde756c74 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -1193,7 +1193,7 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 pSeries->getTotalPointCount() :
 nPointIndex);
 ///point color:
-if (!pSeries->hasPointOwnColor(nPointIndex) && m_xColorScheme.is())
+if (!pSeries->hasPointOwnColor(nPropIdx) && m_xColorScheme.is())
 {
 xPointShape->setPropertyValue("FillColor",
 uno::Any(m_xColorScheme->getColorByIndex( nPropIdx )));


core.git: chart2/source

2024-02-19 Thread Kurt Nordback (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 67e58d16f25332d2c96e2c9702bd78e9d76501c0
Author: Kurt Nordback 
AuthorDate: Thu Dec 7 19:47:47 2023 -0700
Commit: Noel Grandin 
CommitDate: Mon Feb 19 09:19:21 2024 +0100

tdf#50934: Fix left of-pie ordering for imported charts

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index 61583c9d477a..6d2f0ce091aa 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -182,7 +182,7 @@ bool PiePositionHelper::getInnerAndOuterRadius( double 
fCategoryX
 bool PiePositionHelper::clockwiseWedges() const
 {
 const ExplicitScaleData& rAngleScale = m_bSwapXAndY ? m_aScales[1] : 
m_aScales[0];
-return rAngleScale.Orientation == AxisOrientation_MATHEMATICAL;
+return rAngleScale.Orientation == AxisOrientation_REVERSE;
 }
 
 


core.git: chart2/source

2024-02-18 Thread Kurt Nordback (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |   13 +++--
 chart2/source/view/charttypes/PieChart.hxx |7 +++
 2 files changed, 18 insertions(+), 2 deletions(-)

New commits:
commit dfacc5a522a7458646f4ec42b9fc58c1f3fdb0a8
Author: Kurt Nordback 
AuthorDate: Thu Dec 7 06:47:50 2023 -0700
Commit: Noel Grandin 
CommitDate: Mon Feb 19 07:57:44 2024 +0100

tdf#50934: Try to fix wedge ordering for imported of-pie charts

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index 402857b85cdc..61583c9d477a 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -178,6 +178,14 @@ bool PiePositionHelper::getInnerAndOuterRadius( double 
fCategoryX
 return true;
 }
 
+
+bool PiePositionHelper::clockwiseWedges() const
+{
+const ExplicitScaleData& rAngleScale = m_bSwapXAndY ? m_aScales[1] : 
m_aScales[0];
+return rAngleScale.Orientation == AxisOrientation_MATHEMATICAL;
+}
+
+
 PieChart::PieChart( const rtl::Reference& xChartTypeModel
, sal_Int32 nDimensionCount
, bool bExcludingPositioning )
@@ -1087,8 +1095,9 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 // Left of-pie has the "composite" wedge (the one expanded in the 
right
 // subgraph) facing to the right in the chart, to allow the 
expansion
 // lines to meet it
-double compositeVal = pDataSrc->getData(pSeries, nRingPtCnt - 1, 
eType);
-return compositeVal * 360 / (ringSum * 2);
+const double compositeVal = pDataSrc->getData(pSeries, nRingPtCnt 
- 1, eType);
+const double degAng = compositeVal * 360 / (ringSum * 2);
+return m_aPosHelper.clockwiseWedges() ? 360 - degAng : degAng;
 } else {
 /// The angle degree offset is set by the same property of the
 /// data series.
diff --git a/chart2/source/view/charttypes/PieChart.hxx 
b/chart2/source/view/charttypes/PieChart.hxx
index a3e4519ead8c..abcf1cc2db9b 100644
--- a/chart2/source/view/charttypes/PieChart.hxx
+++ b/chart2/source/view/charttypes/PieChart.hxx
@@ -39,6 +39,10 @@ public:
 
 boolgetInnerAndOuterRadius( double fCategoryX, double& 
fLogicInnerRadius, double& fLogicOuterRadius, bool bUseRings, double fMaxOffset 
) const;
 
+// Determine if the pie wedges are ordered clockwise (returns true) or
+// counterclockwise (returns false)
+boolclockwiseWedges() const;
+
 public:
 //Distance between different category rings, seen relative to width of a 
ring:
 double  m_fRingDistance; //>=0 m_fRingDistance=1 --> distance == width
@@ -222,6 +226,9 @@ struct PieLabelInfo;
 sal_Int32 n3DRelativeHeight);
 
 private: //member
+// Constants for of-pie charts. Some of these will want to become
+// user-selectable values. TODO
+
 // Radius scalings for left and right of-pie subcharts
 static constexpr double m_fLeftScale = 2.0/3;
 static constexpr double m_fRightScale = 1.0/3;


core.git: chart2/source include/oox oox/inc oox/source xmloff/inc

2024-02-18 Thread Kurt Nordback (via logerrit)
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx |7 +
 chart2/source/inc/ChartType.hxx |6 +
 chart2/source/model/main/Diagram.cxx|8 +
 chart2/source/model/template/PieChartType.hxx   |1 
 chart2/source/model/template/PieChartTypeTemplate.cxx   |3 
 chart2/source/view/inc/VDataSeries.hxx  |6 +
 chart2/source/view/main/SeriesPlotterContainer.cxx  |   10 +
 chart2/source/view/main/VDataSeries.cxx |   11 ++
 include/oox/export/chartexport.hxx  |2 
 oox/inc/drawingml/chart/typegroupcontext.hxx|   14 ++
 oox/inc/drawingml/chart/typegroupconverter.hxx  |3 
 oox/source/drawingml/chart/plotareacontext.cxx  |3 
 oox/source/drawingml/chart/typegroupcontext.cxx |   30 +
 oox/source/drawingml/chart/typegroupconverter.cxx   |   28 +
 oox/source/export/chartexport.cxx   |   66 +---
 oox/source/token/properties.txt |1 
 xmloff/inc/xmlprop.hxx  |1 
 17 files changed, 184 insertions(+), 16 deletions(-)

New commits:
commit 1cda27cf69054b006aa1b16cab8f56339274588b
Author: Kurt Nordback 
AuthorDate: Fri Dec 1 11:18:31 2023 -0700
Commit: Noel Grandin 
CommitDate: Mon Feb 19 01:29:36 2024 +0100

tdf#50934: OfPie inport from OOXML, plus initial work for export

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

diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 711d3017a8ee..949aaa9a6dae 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -54,6 +54,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -102,6 +103,7 @@ enum
 PROP_DIAGRAM_SORT_BY_X_VALUES,
 
 PROP_DIAGRAM_STARTING_ANGLE,
+PROP_DIAGRAM_OF_PIE_TYPE,
 
 PROP_DIAGRAM_RIGHT_ANGLED_AXES,
 PROP_DIAGRAM_PERSPECTIVE,
@@ -228,6 +230,11 @@ void lcl_AddPropertiesToVector(
   cppu::UnoType::get(),
   beans::PropertyAttribute::BOUND
   | beans::PropertyAttribute::MAYBEDEFAULT );
+rOutProperties.emplace_back( "SubPieType",
+  PROP_DIAGRAM_OF_PIE_TYPE,
+  cppu::UnoType::get(),
+  beans::PropertyAttribute::BOUND
+  | beans::PropertyAttribute::MAYBEDEFAULT );
 
 //new for 3D charts
 rOutProperties.emplace_back( "RightAngledAxes",
diff --git a/chart2/source/inc/ChartType.hxx b/chart2/source/inc/ChartType.hxx
index fa55cf05694f..fccafdb323b6 100644
--- a/chart2/source/inc/ChartType.hxx
+++ b/chart2/source/inc/ChartType.hxx
@@ -75,6 +75,12 @@ public:
 //  XChartType 
 // still abstract ! implement !
 virtual OUString SAL_CALL getChartType() override = 0;
+#if 0
+virtual ::com::sun::star::chart2::PieChartSubType SAL_CALL 
getPieChartSubType() override
+{
+return ::com::sun::star::chart2::PieChartSubType_NONE;
+}
+#endif
 virtual css::uno::Reference< css::chart2::XCoordinateSystem > SAL_CALL
 createCoordinateSystem( ::sal_Int32 DimensionCount ) final override;
 virtual css::uno::Sequence< OUString > SAL_CALL
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index 2a4b63c73401..1ef884c796f9 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -97,6 +98,7 @@ enum
 PROP_DIAGRAM_MISSING_VALUE_TREATMENT,
 PROP_DIAGRAM_3DRELATIVEHEIGHT,
 PROP_DIAGRAM_DATATABLEHBORDER,
+PROP_DIAGRAM_OF_PIE_TYPE,
 PROP_DIAGRAM_DATATABLEVBORDER,
 PROP_DIAGRAM_DATATABLEOUTLINE,
 PROP_DIAGRAM_EXTERNALDATA
@@ -183,6 +185,10 @@ void lcl_AddPropertiesToVector(
   PROP_DIAGRAM_3DRELATIVEHEIGHT,
   cppu::UnoType::get(),
   beans::PropertyAttribute::MAYBEVOID );
+rOutProperties.emplace_back( "SubPieType",
+  PROP_DIAGRAM_OF_PIE_TYPE,
+  cppu::UnoType::get(),
+  beans::PropertyAttribute::MAYBEVOID );
 rOutProperties.emplace_back( "ExternalData",
   PROP_DIAGRAM_EXTERNALDATA,
   cppu::UnoType::get(),
@@ -202,6 +208,8 @@ const ::chart::tPropertyValueMap& StaticDiagramDefaults()
 ::chart::PropertyHelper::setPropertyValueDefault( aMap, 
PROP_DIAGRAM_RIGHT_ANGLED_AXES, false );
 ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aMap, 
PROP_DIAGRAM_STARTING_ANGLE, 90 );
  

core.git: chart2/source

2024-02-18 Thread Kurt Nordback (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 1036994301de43f5a41134084ca866ed9ec7bf35
Author: Kurt Nordback 
AuthorDate: Mon Nov 20 11:53:42 2023 -0700
Commit: Noel Grandin 
CommitDate: Sun Feb 18 10:10:39 2024 +0100

tdf#50934: Add a comment

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index 9b1494596598..402857b85cdc 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -996,6 +996,11 @@ void PieChart::createShapes()
 sal_Int32 nEnd = pDataSrc->getNPoints(pSeries, SubPieType::LEFT);
 double compFrac = pDataSrc->getData(pSeries, nEnd - 1,
 SubPieType::LEFT) / aParam.mfLogicYSum;
+// The following isn't quite right. The tangent points on the left
+// pie are only at pi/2 and -pi/2 for composite wedges over 1/2 the
+// total if left and right pies are the same diameter. And the
+// threshold of 1/2 isn't quite right either. So there
+// really should be a more sophisticated approach here. TODO
 if (compFrac < 0.5) {
 // Translated, per below
 xl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale *


core.git: chart2/source

2024-02-17 Thread Kurt Nordback (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |   83 ++---
 1 file changed, 76 insertions(+), 7 deletions(-)

New commits:
commit e1573deaf1b2ecd946d23a4ce623546c08036ec7
Author: Kurt Nordback 
AuthorDate: Mon Nov 20 11:46:10 2023 -0700
Commit: Noel Grandin 
CommitDate: Sun Feb 18 07:33:18 2024 +0100

tdf#50934: Implement connector lines for pie-of-pie

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index a946616ea5fe..9b1494596598 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -928,20 +928,26 @@ void PieChart::createShapes()
 createOneBar(SubPieType::RIGHT, aParam, xSeriesTarget,
 xTextTarget, pSeries, pDataSrc, n3DRelativeHeight);
 
-// draw connecting lines
+//
+// Draw connecting lines
+//
 double xl0, xl1, yl0, yl1, x0, y0, x1, y1, y2, y3;
 
-if (m_aPosHelper.m_fAngleDegreeOffset < 90.0) {
+// Get coordinates of "corners" of left composite wedge
+sal_Int32 nEnd = pDataSrc->getNPoints(pSeries, SubPieType::LEFT);
+double compFrac = pDataSrc->getData(pSeries, nEnd - 1,
+SubPieType::LEFT) / aParam.mfLogicYSum;
+if (compFrac < 0.5) {
 xl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale *
-cos(m_aPosHelper.m_fAngleDegreeOffset * M_PI / 180) +
-m_fLeftShift;
+cos(compFrac * M_PI) + m_fLeftShift;
 yl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale *
-sin(m_aPosHelper.m_fAngleDegreeOffset * M_PI / 180);
+sin(compFrac * M_PI);
 } else {
 xl0 = m_fLeftShift;
 yl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale;
 }
 
+// Coordinates of bar top left corner
 xl1 = m_fBarLeft;
 yl1 = m_fFullBarHeight / 2;
 
@@ -974,12 +980,75 @@ void PieChart::createShapes()
 break;
 }
 case PieChartSubType_PIE:
+{
 pDataSrc = 
 createOneRing(SubPieType::LEFT, 0, aParam, xSeriesTarget,
 xTextTarget, pSeries, pDataSrc, n3DRelativeHeight);
 createOneRing(SubPieType::RIGHT, 0, aParam, xSeriesTarget,
 xTextTarget, pSeries, pDataSrc, n3DRelativeHeight);
+
+//
+// Draw connecting lines
+//
+double xl0, xl1, yl0, yl1, x0, y0, x1, y1, y2, y3;
+
+// Get coordinates of "corners" of left composite wedge
+sal_Int32 nEnd = pDataSrc->getNPoints(pSeries, SubPieType::LEFT);
+double compFrac = pDataSrc->getData(pSeries, nEnd - 1,
+SubPieType::LEFT) / aParam.mfLogicYSum;
+if (compFrac < 0.5) {
+// Translated, per below
+xl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale *
+cos(compFrac * M_PI) + m_fLeftShift - m_fRightShift;
+yl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale *
+sin(compFrac * M_PI);
+} else {
+// Translated, per below
+xl0 = m_fLeftShift - m_fRightShift;
+yl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale;
+}
+
+// Compute tangent point on the right-hand circle of the line
+// through (xl0, yl0). If we translate things so the right-hand
+// circle is centered on the origin, then this point (x,y)
+// satisfies these two equations, where r is the radius of the
+// right-hand circle:
+// (1) x^2 + y^2 = r^2
+// (2) (y - yl0) / (x - xl0) = -x / y
+const double r = aParam.mfUnitCircleOuterRadius * m_fRightScale;
+
+xl1 = (r*r * xl0 + yl0 * r * sqrt(xl0*xl0 + yl0*yl0 - r*r)) /
+(xl0*xl0 + yl0*yl0);
+yl1 = sqrt(r*r - xl1*xl1);
+
+// Now translate back to the coordinates we use
+xl0 += m_fRightShift;
+xl1 += m_fRightShift;
+
+x0 = m_aPosHelper.transformUnitCircleToScene(0, xl0, 0).PositionX;
+y0 = m_aPosHelper.transformUnitCircleToScene(90, yl0, 0).PositionY;
+x1 = m_aPosHelper.transformUnitCircleToScene(0, xl1, 0).PositionX;
+y1 = m_aPosHelper.transformUnitCircleToScene(90, yl1, 0).PositionY;
+y2 = m_aPosHelper.transformUnitCircleToScene(90, -yl0, 
0).PositionY;
+y3 = m_aPosHelper.transformUnitCircleToScene(90, -yl1, 
0).PositionY;
+
+std::vector> linePts;
+linePts.resize(2);
+   

core.git: chart2/source

2024-02-17 Thread Kurt Nordback (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |   19 ---
 1 file changed, 12 insertions(+), 7 deletions(-)

New commits:
commit 5d0093e8c3a862172ca96081d68e7757dfdf6067
Author: Kurt Nordback 
AuthorDate: Sat Nov 18 19:43:52 2023 -0700
Commit: Noel Grandin 
CommitDate: Sat Feb 17 18:00:49 2024 +0100

tdf#50934: Improvements to fill color for of-pie composite wedge

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index c3d36cd186fb..a946616ea5fe 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -227,7 +227,6 @@ PieChart::~PieChart()
 void PieChart::setScales( std::vector< ExplicitScaleData >&& rScales, bool /* 
bSwapXAndYAxis */ )
 {
 OSL_ENSURE(m_nDimension<=static_cast(rScales.size()),"Dimension 
of Plotter does not fit two dimension of given scale sequence");
-m_aCartesianScales = m_pPosHelper->getScales();
 m_aPosHelper.setScales( std::move(rScales), true );
 }
 
@@ -1104,17 +1103,23 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 xPointProperties, aParam, nRingPtCnt,
 bConcentricExplosion);
 
+// Handle coloring of the composite wedge
+sal_Int32 nEnd = pDataSrc->getNPoints(pSeries, eType);
+const sal_Int32 nPropIdx = (
+eType == SubPieType::LEFT && nPointIndex == nEnd - 1 ?
+pSeries->getTotalPointCount() :
+nPointIndex);
 ///point color:
 if (!pSeries->hasPointOwnColor(nPointIndex) && m_xColorScheme.is())
 {
 xPointShape->setPropertyValue("FillColor",
-uno::Any(m_xColorScheme->getColorByIndex( nPointIndex )));
+uno::Any(m_xColorScheme->getColorByIndex( nPropIdx )));
 }
 
 
 if(bHasFillColorMapping)
 {
-double nPropVal = pSeries->getValueByProperty(nPointIndex, 
"FillColor");
+double nPropVal = pSeries->getValueByProperty(nPropIdx, 
"FillColor");
 if(!std::isnan(nPropVal))
 {
 xPointShape->setPropertyValue("FillColor", 
uno::Any(static_cast( nPropVal)));
@@ -2106,16 +2111,16 @@ uno::Reference< beans::XPropertySet > 
OfPieDataSrc::getProps(
 const VDataSeries* pSeries, sal_Int32 nPtIdx,
 enum SubPieType eType) const
 {
-const sal_Int32 n = pSeries->getTotalPointCount() - 3;
+const sal_Int32 nPts = pSeries->getTotalPointCount();
+const sal_Int32 n = nPts - 3;
 if (eType == SubPieType::LEFT) {
 // nPtIdx should be in [0, n]
 if (nPtIdx < n) {
 return pSeries->getPropertiesOfPoint( nPtIdx );
 } else {
-assert(nPtIdx == n);
 // The aggregated wedge
-// Not sure what to do here, but this isn't right. TODO
-return pSeries->getPropertiesOfPoint(n);
+assert(nPtIdx == n);
+return pSeries->getPropertiesOfPoint(nPts);
 }
 } else {
 assert(eType == SubPieType::RIGHT);


core.git: chart2/source

2024-02-16 Thread Kurt Nordback (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |   46 +
 1 file changed, 46 insertions(+)

New commits:
commit 4df39957bd985af591f452439c8aa5fc5c7a0d62
Author: Kurt Nordback 
AuthorDate: Thu Nov 16 17:09:11 2023 -0700
Commit: Noel Grandin 
CommitDate: Sat Feb 17 07:08:20 2024 +0100

tdf#50934: Ensure of-pie connector lines are black

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index b74a5365374a..c3d36cd186fb 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -922,12 +922,58 @@ void PieChart::createShapes()
 xTextTarget, pSeries, pDataSrc, n3DRelativeHeight);
 break;
 case PieChartSubType_BAR:
+{
 pDataSrc = 
 createOneRing(SubPieType::LEFT, 0, aParam, xSeriesTarget,
 xTextTarget, pSeries, pDataSrc, n3DRelativeHeight);
 createOneBar(SubPieType::RIGHT, aParam, xSeriesTarget,
 xTextTarget, pSeries, pDataSrc, n3DRelativeHeight);
+
+// draw connecting lines
+double xl0, xl1, yl0, yl1, x0, y0, x1, y1, y2, y3;
+
+if (m_aPosHelper.m_fAngleDegreeOffset < 90.0) {
+xl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale *
+cos(m_aPosHelper.m_fAngleDegreeOffset * M_PI / 180) +
+m_fLeftShift;
+yl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale *
+sin(m_aPosHelper.m_fAngleDegreeOffset * M_PI / 180);
+} else {
+xl0 = m_fLeftShift;
+yl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale;
+}
+
+xl1 = m_fBarLeft;
+yl1 = m_fFullBarHeight / 2;
+
+x0 = m_aPosHelper.transformUnitCircleToScene(0, xl0, 0).PositionX;
+y0 = m_aPosHelper.transformUnitCircleToScene(90, yl0, 0).PositionY;
+x1 = m_aPosHelper.transformUnitCircleToScene(0, xl1, 0).PositionX;
+y1 = m_aPosHelper.transformUnitCircleToScene(90, yl1, 0).PositionY;
+y2 = m_aPosHelper.transformUnitCircleToScene(90, -yl0, 
0).PositionY;
+y3 = m_aPosHelper.transformUnitCircleToScene(90, -yl1, 
0).PositionY;
+
+std::vector> linePts;
+linePts.resize(2);
+linePts[0].push_back(css::drawing::Position3D(x0, y0, 
aParam.mfLogicZ));
+linePts[0].push_back(css::drawing::Position3D(x1, y1, 
aParam.mfLogicZ));
+linePts[1].push_back(css::drawing::Position3D(x0, y2, 
aParam.mfLogicZ));
+linePts[1].push_back(css::drawing::Position3D(x1, y3, 
aParam.mfLogicZ));
+
+VLineProperties aVLineProperties;   // default black
+
+//create line
+rtl::Reference xSeriesGroupShape_Shapes =
+getSeriesGroupShape(pSeries, xSeriesTarget);
+rtl::Reference xShape = ShapeFactory::createLine2D(
+xSeriesGroupShape_Shapes, linePts, );
+
+// need to set properties?
+//PropertyMapper::setMappedProperties( *xShape, xObjectProperties,
+//
PropertyMapper::getPropertyNameMapForLineSeriesProperties() );
+
 break;
+}
 case PieChartSubType_PIE:
 pDataSrc = 
 createOneRing(SubPieType::LEFT, 0, aParam, xSeriesTarget,


core.git: chart2/source

2024-02-16 Thread Kurt Nordback (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |   68 -
 chart2/source/view/charttypes/PieChart.hxx |   28 +++
 2 files changed, 39 insertions(+), 57 deletions(-)

New commits:
commit 756f8c850a38679e5b1b8c68c4c2ea5fe4883fbd
Author: Kurt Nordback 
AuthorDate: Thu Nov 16 16:45:19 2023 -0700
Commit: Noel Grandin 
CommitDate: Sat Feb 17 07:07:39 2024 +0100

tdf#50934: Initial implementation of connector lines for bar-of-pie

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index ed20a65fc0ca..b74a5365374a 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -952,24 +952,11 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 {
 bool bHasFillColorMapping = pSeries->hasPropertyMapping("FillColor");
 
-/// The angle degree offset is set by the same property of the
-/// data series.
-/// Counter-clockwise offset from the 3 o'clock position.
-m_aPosHelper.m_fAngleDegreeOffset = pSeries->getStartingAngle();
-
-///the `explodeable` ring is the first one except when the radius axis
-///orientation is reversed (always!?) and we are dealing with a donut: in
-///such a case the `explodeable` ring is the last one.
-std::vector< VDataSeriesGroup >::size_type nExplodeableSlot = 0;
-if( m_aPosHelper.isMathematicalOrientationRadius() && m_bUseRings )
-nExplodeableSlot = m_aZSlots.front().size()-1;
-
-sal_Int32 nBegin = pDataSrc->getBeginIndex(pSeries, eType);
-sal_Int32 nEnd = pDataSrc->getEndIndex(pSeries, eType);
+sal_Int32 nRingPtCnt = pDataSrc->getNPoints(pSeries, eType);
 
 // Find sum of entries for this ring or sub-pie
 double ringSum = 0;
-for (sal_Int32 nPointIndex = nBegin; nPointIndex < nEnd; nPointIndex++ ) {
+for (sal_Int32 nPointIndex = 0; nPointIndex < nRingPtCnt; nPointIndex++ ) {
 double fY = pDataSrc->getData(pSeries, nPointIndex, eType);
 if (!std::isnan(fY) ) ringSum += fY;
 }
@@ -981,7 +968,7 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 // Left of-pie has the "composite" wedge (the one expanded in the 
right
 // subgraph) facing to the right in the chart, to allow the 
expansion
 // lines to meet it
-double compositeVal = pDataSrc->getData(pSeries, nEnd - 1, eType);
+double compositeVal = pDataSrc->getData(pSeries, nRingPtCnt - 1, 
eType);
 return compositeVal * 360 / (ringSum * 2);
 } else {
 /// The angle degree offset is set by the same property of the
@@ -993,9 +980,16 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 
 m_aPosHelper.m_fAngleDegreeOffset = sAngle();
 
+///the `explodeable` ring is the first one except when the radius axis
+///orientation is reversed (always!?) and we are dealing with a donut: in
+///such a case the `explodeable` ring is the last one.
+std::vector< VDataSeriesGroup >::size_type nExplodeableSlot = 0;
+if( m_aPosHelper.isMathematicalOrientationRadius() && m_bUseRings )
+nExplodeableSlot = m_aZSlots.front().size()-1;
+
 double fLogicYForNextPoint = 0.0;
 ///iterate through all points to create shapes
-for(sal_Int32 nPointIndex = nBegin; nPointIndex < nEnd; nPointIndex++ )
+for(sal_Int32 nPointIndex = 0; nPointIndex < nRingPtCnt; nPointIndex++ )
 {
 double fLogicInnerRadius, fLogicOuterRadius;
 
@@ -1061,7 +1055,8 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 const bool bConcentricExplosion = m_bUseRings && 
(m_aZSlots.front().size() > 1);
 rtl::Reference xPointShape =
 createDataPoint(eType, xSeriesGroupShape_Shapes,
-xPointProperties, aParam, nEnd, bConcentricExplosion);
+xPointProperties, aParam, nRingPtCnt,
+bConcentricExplosion);
 
 ///point color:
 if (!pSeries->hasPointOwnColor(nPointIndex) && m_xColorScheme.is())
@@ -1134,12 +1129,11 @@ void PieChart::createOneBar(
 {
 bool bHasFillColorMapping = pSeries->hasPropertyMapping("FillColor");
 
-sal_Int32 nBegin = pDataSrc->getBeginIndex(pSeries, eType);
-sal_Int32 nEnd = pDataSrc->getEndIndex(pSeries, eType);
+sal_Int32 nBarPtCnt = pDataSrc->getNPoints(pSeries, eType);
 
 // Find sum of entries for this bar chart
 double barSum = 0;
-for (sal_Int32 nPointIndex = nBegin; nPointIndex < nEnd; nPointIndex++ ) {
+for (sal_Int32 nPointIndex = 0; nPointIndex < nBarPtCnt; nPointIndex++ ) {
 double fY = pDataSrc->getData(pSeries, nPointIndex, eType);
 if (!std::isnan(fY) ) barSum 

core.git: chart2/source

2024-02-16 Thread Kurt Nordback (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |   49 -
 chart2/source/view/charttypes/PieChart.hxx |   14 +---
 2 files changed, 45 insertions(+), 18 deletions(-)

New commits:
commit 853736f0d523c4f5459e15e7e109e81340f8c25e
Author: Kurt Nordback 
AuthorDate: Wed Nov 15 16:49:41 2023 -0700
Commit: Noel Grandin 
CommitDate: Sat Feb 17 07:06:56 2024 +0100

tdf#50934: Fix of-pie subchart colors

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index aee48da35084..ed20a65fc0ca 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -964,11 +964,12 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 if( m_aPosHelper.isMathematicalOrientationRadius() && m_bUseRings )
 nExplodeableSlot = m_aZSlots.front().size()-1;
 
-sal_Int32 nRingPtCnt = pDataSrc->getNPoints(pSeries, eType);
+sal_Int32 nBegin = pDataSrc->getBeginIndex(pSeries, eType);
+sal_Int32 nEnd = pDataSrc->getEndIndex(pSeries, eType);
 
 // Find sum of entries for this ring or sub-pie
 double ringSum = 0;
-for (sal_Int32 nPointIndex = 0; nPointIndex < nRingPtCnt; nPointIndex++ ) {
+for (sal_Int32 nPointIndex = nBegin; nPointIndex < nEnd; nPointIndex++ ) {
 double fY = pDataSrc->getData(pSeries, nPointIndex, eType);
 if (!std::isnan(fY) ) ringSum += fY;
 }
@@ -980,7 +981,7 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 // Left of-pie has the "composite" wedge (the one expanded in the 
right
 // subgraph) facing to the right in the chart, to allow the 
expansion
 // lines to meet it
-double compositeVal = pDataSrc->getData(pSeries, nRingPtCnt - 1, 
eType);
+double compositeVal = pDataSrc->getData(pSeries, nEnd - 1, eType);
 return compositeVal * 360 / (ringSum * 2);
 } else {
 /// The angle degree offset is set by the same property of the
@@ -994,7 +995,7 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 
 double fLogicYForNextPoint = 0.0;
 ///iterate through all points to create shapes
-for(sal_Int32 nPointIndex = 0; nPointIndex < nRingPtCnt; nPointIndex++ )
+for(sal_Int32 nPointIndex = nBegin; nPointIndex < nEnd; nPointIndex++ )
 {
 double fLogicInnerRadius, fLogicOuterRadius;
 
@@ -1060,8 +1061,7 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 const bool bConcentricExplosion = m_bUseRings && 
(m_aZSlots.front().size() > 1);
 rtl::Reference xPointShape =
 createDataPoint(eType, xSeriesGroupShape_Shapes,
-xPointProperties, aParam, nRingPtCnt,
-bConcentricExplosion);
+xPointProperties, aParam, nEnd, bConcentricExplosion);
 
 ///point color:
 if (!pSeries->hasPointOwnColor(nPointIndex) && m_xColorScheme.is())
@@ -1134,11 +1134,12 @@ void PieChart::createOneBar(
 {
 bool bHasFillColorMapping = pSeries->hasPropertyMapping("FillColor");
 
-sal_Int32 nBarPtCnt = pDataSrc->getNPoints(pSeries, eType);
+sal_Int32 nBegin = pDataSrc->getBeginIndex(pSeries, eType);
+sal_Int32 nEnd = pDataSrc->getEndIndex(pSeries, eType);
 
 // Find sum of entries for this bar chart
 double barSum = 0;
-for (sal_Int32 nPointIndex = 0; nPointIndex < nBarPtCnt; nPointIndex++ ) {
+for (sal_Int32 nPointIndex = nBegin; nPointIndex < nEnd; nPointIndex++ ) {
 double fY = pDataSrc->getData(pSeries, nPointIndex, eType);
 if (!std::isnan(fY) ) barSum += fY;
 }
@@ -1146,7 +1147,7 @@ void PieChart::createOneBar(
 double fBarBottom = 0.0;
 double fBarTop = -0.5;  // make the bar go from -0.5 to 0.5
 ///iterate through all points to create shapes
-for(sal_Int32 nPointIndex = 0; nPointIndex < nBarPtCnt; nPointIndex++ )
+for(sal_Int32 nPointIndex = nBegin; nPointIndex < nEnd; nPointIndex++ )
 {
 aParam.mfDepth  = getTransformedDepth() * (n3DRelativeHeight / 100.0);
 
@@ -2005,7 +2006,14 @@ double PieDataSrc::getData(const VDataSeries* pSeries, 
sal_Int32 nPtIdx,
 return fabs(pSeries->getYValue( nPtIdx ));
 }
 
-sal_Int32 PieDataSrc::getNPoints(const VDataSeries* pSeries,
+sal_Int32 PieDataSrc::getBeginIndex([[maybe_unused]]const VDataSeries* pSeries,
+[[maybe_unused]] enum SubPieType eType) const
+{
+assert(eType == SubPieType::NONE);
+return 0;
+}
+
+sal_Int32 PieDataSrc::getEndIndex(const VDataSeries* pSeries,
 [[maybe_unused]] enum SubPieType eType) const
 {
 assert(eType == SubPieType::NONE);
@@ -2030,14 +2038,25 @@ uno::Reference< 

core.git: chart2/source

2024-02-16 Thread codewithvk (via logerrit)
 chart2/source/controller/main/ChartController.cxx |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 4965b055b5998dc345ecaeb80fc8c3874b19e2a5
Author: codewithvk 
AuthorDate: Wed Feb 14 15:15:37 2024 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Feb 16 12:08:55 2024 +0100

Chart: Make Data Range Dialog Async

To reproduce the step, double-click on the chart and right-click to open 
the context menu, where you can see the option for data ranges.

Signed-off-by: codewithvk 
Change-Id: I0697d5918d35d132aa7c17f86204742017f7ff17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163358
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit afbb4e44478e520b866032df8f0a0a344568233e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163402
Tested-by: Jenkins

diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index f17c3dae353e..f9b3ac2a5858 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1393,17 +1393,17 @@ void ChartController::executeDispatch_SourceData()
 rModel.attachDataProvider(xDataProvider);
 }
 }
-
-UndoLiveUpdateGuard aUndoGuard(
-SchResId(STR_ACTION_EDIT_DATA_RANGES), m_xUndoManager);
-
+auto aUndoGuard = 
std::make_shared(SchResId(STR_ACTION_EDIT_DATA_RANGES),
+m_xUndoManager);
 SolarMutexGuard aSolarGuard;
-::chart::DataSourceDialog aDlg(GetChartFrame(), xChartDoc);
-if (aDlg.run() == RET_OK)
-{
-impl_adaptDataSeriesAutoResize();
-aUndoGuard.commit();
-}
+auto aDlg = std::make_shared(GetChartFrame(), xChartDoc);
+weld::DialogController::runAsync(aDlg, [this, aUndoGuard](int nResult) {
+if (nResult == RET_OK)
+{
+impl_adaptDataSeriesAutoResize();
+aUndoGuard->commit();
+}
+});
 }
 
 void ChartController::executeDispatch_MoveSeries( bool bForward )


core.git: chart2/source compilerplugins/clang

2024-02-16 Thread Kevin Suo (via logerrit)
 chart2/source/model/template/CandleStickChartType.hxx |4 +---
 compilerplugins/clang/fragiledestructor.cxx   |2 --
 2 files changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 90d22daf99e3d07ba19b7d16f240ab53b0873d49
Author: Kevin Suo 
AuthorDate: Thu Feb 15 23:16:50 2024 +0800
Commit: Caolán McNamara 
CommitDate: Fri Feb 16 10:11:29 2024 +0100

tdf#142467: restore "final" in CandleStickChartType class

The "final" was removed in commit
e06f2bb00137655dbf6f0a8c8c2fc555720f4d3f (tdf#142467 crash on calling
'getInfoHelper' in final class, 2021-05-26)
and commit
6cb1745c24c7651050e30216860c539fa13cc0e2 (tdf#142467: Update comments
with GCC bug ID, 2021-05-31)
due to a bug in gcc .

Now it has been amost 3 years past and that gcc bug has long been fixed,
so it is time to restore the "final".

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

diff --git a/chart2/source/model/template/CandleStickChartType.hxx 
b/chart2/source/model/template/CandleStickChartType.hxx
index e7610750758f..822422aac85f 100644
--- a/chart2/source/model/template/CandleStickChartType.hxx
+++ b/chart2/source/model/template/CandleStickChartType.hxx
@@ -23,9 +23,7 @@
 namespace chart
 {
 
-// see  "[10/11/12 
Regression] using
-// declaration causing virtual call with wrongly adjusted this pointer" before 
restoring 'final'
-class CandleStickChartType /* final */ : public ChartType
+class CandleStickChartType final : public ChartType
 {
 public:
 explicit CandleStickChartType();
diff --git a/compilerplugins/clang/fragiledestructor.cxx 
b/compilerplugins/clang/fragiledestructor.cxx
index f8ec76a561f8..10056684 100644
--- a/compilerplugins/clang/fragiledestructor.cxx
+++ b/compilerplugins/clang/fragiledestructor.cxx
@@ -51,8 +51,6 @@ public:
  return false;
 if (loplugin::isSamePathname(fn, SRCDIR 
"/sw/source/core/layout/ssfrm.cxx")) // ~SwFrame calling IsDeleteForbidden
  return false;
-if (loplugin::isSamePathname(fn, SRCDIR 
"/chart2/source/model/template/CandleStickChartType.cxx")) // to ignore 
 "[10/11/12 Regression] 
using declaration causing virtual call with wrongly adjusted this pointer" 
workaround
- return false;
 
 return true;
 }


core.git: chart2/source

2024-02-15 Thread Kurt Nordback (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |  148 +
 chart2/source/view/charttypes/PieChart.hxx |   80 ++-
 2 files changed, 205 insertions(+), 23 deletions(-)

New commits:
commit 63562694beb42b86d0f00dd3c18ac47bb094c9fe
Author: Kurt Nordback 
AuthorDate: Tue Oct 31 20:29:34 2023 -0600
Commit: Noel Grandin 
CommitDate: Fri Feb 16 08:07:12 2024 +0100

tdf#50934: Implement PieDataSrc and related structure

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index 201e226119ab..0424130c8d5e 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -855,20 +855,38 @@ void PieChart::createShapes()
 aParam.mfLogicYSum += fabs(fY);
 }
 
-if (aParam.mfLogicYSum == 0.0)
+if (aParam.mfLogicYSum == 0.0) {
 // Total sum of all Y values in this series is zero. Skip the 
whole series.
 continue;
+}
+
+PieDataSrcBase *pDataSrc = nullptr;
+PieDataSrc normalPieSrc;
+OfPieDataSrc ofPieSrc;
+
+// Default to regular pie if too few points for of-pie
+::css::chart2::PieChartSubType eSubType =
+nPointCount >= OfPieDataSrc::minPoints() ?
+m_eSubType :
+PieChartSubType_NONE;
 
-switch (m_eSubType) {
+switch (eSubType) {
 case PieChartSubType_NONE:
-createOneRing(SubPieType::NONE, fSlotX, aParam, xSeriesTarget, 
xTextTarget, pSeries, n3DRelativeHeight);
+pDataSrc = 
+createOneRing(SubPieType::NONE, fSlotX, aParam, xSeriesTarget,
+xTextTarget, pSeries, pDataSrc, n3DRelativeHeight);
 break;
 case PieChartSubType_BAR:
-createOneRing(SubPieType::LEFT, 0, aParam, xSeriesTarget, 
xTextTarget, pSeries, n3DRelativeHeight);
+pDataSrc = 
+createOneRing(SubPieType::LEFT, 0, aParam, xSeriesTarget,
+xTextTarget, pSeries, pDataSrc, n3DRelativeHeight);
 break;
 case PieChartSubType_PIE:
-createOneRing(SubPieType::LEFT, 0, aParam, xSeriesTarget, 
xTextTarget, pSeries, n3DRelativeHeight);
-createOneRing(SubPieType::RIGHT, 0, aParam, xSeriesTarget, 
xTextTarget, pSeries, n3DRelativeHeight);
+pDataSrc = 
+createOneRing(SubPieType::LEFT, 0, aParam, xSeriesTarget,
+xTextTarget, pSeries, pDataSrc, n3DRelativeHeight);
+createOneRing(SubPieType::RIGHT, 0, aParam, xSeriesTarget,
+xTextTarget, pSeries, pDataSrc, n3DRelativeHeight);
 break;
 default:
 assert(false); // this shouldn't happen
@@ -882,6 +900,7 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 const rtl::Reference& xSeriesTarget,
 const rtl::Reference& xTextTarget,
 VDataSeries* pSeries,
+const PieDataSrcBase *pDataSrc,
 sal_Int32 n3DRelativeHeight)
 {
 bool bHasFillColorMapping = pSeries->hasPropertyMapping("FillColor");
@@ -891,10 +910,6 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 /// Counter-clockwise offset from the 3 o'clock position.
 m_aPosHelper.m_fAngleDegreeOffset = pSeries->getStartingAngle();
 
-///iterate through all points to get the sum of all entries of
-///the current data series
-sal_Int32 nPointCount=pSeries->getTotalPointCount();
-
 ///the `explodeable` ring is the first one except when the radius axis
 ///orientation is reversed (always!?) and we are dealing with a donut: in
 ///such a case the `explodeable` ring is the last one.
@@ -902,9 +917,18 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 if( m_aPosHelper.isMathematicalOrientationRadius() && m_bUseRings )
 nExplodeableSlot = m_aZSlots.front().size()-1;
 
+sal_Int32 nRingPtCnt = pDataSrc->getNPoints(pSeries, eType);
+
+// Find sum of entries for this ring or sub-pie
+double ringSum = 0;
+for (sal_Int32 nPointIndex = 0; nPointIndex < nRingPtCnt; nPointIndex++ ) {
+double fY = pDataSrc->getData(pSeries, nPointIndex, eType);
+if (!std::isnan(fY) ) ringSum += fY;
+}
+
 double fLogicYForNextPoint = 0.0;
 ///iterate through all points to create shapes
-for(sal_Int32 nPointIndex = 0; nPointIndex < nPointCount; nPointIndex++ )
+for(sal_Int32 nPointIndex = 0; nPointIndex < nRingPtCnt; nPointIndex++ )
 {
 double fLogicInnerRadius, fLogicOuterRadius;
 
@@ -923,8 +947,9 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 aParam.mfDepth  = getTransformedDepth() * (n3DRelativeHeight / 100.0);
 
 

core.git: chart2/source

2024-02-15 Thread Kurt Nordback (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |   37 +
 chart2/source/view/charttypes/PieChart.hxx |1 
 2 files changed, 28 insertions(+), 10 deletions(-)

New commits:
commit 8da681e5ef48606716219b2a4919ee90bf7a0d6b
Author: Kurt Nordback 
AuthorDate: Tue Sep 26 15:23:52 2023 -0600
Commit: Noel Grandin 
CommitDate: Thu Feb 15 20:26:24 2024 +0100

tdf#50934: Some rejiggering of of-pie code, plus implementing subpie chart

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index 49cf48de3f05..201e226119ab 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -243,6 +243,7 @@ bool PieChart::shouldSnapRectToUsedArea()
 }
 
 rtl::Reference PieChart::createDataPoint(
+const SubPieType e_subType,
 const rtl::Reference& xTarget,
 const uno::Reference& xObjectProperties,
 const ShapeParam& rParam,
@@ -286,12 +287,28 @@ rtl::Reference PieChart::createDataPoint(
 drawing::Position3D aNewOrigin = 
m_aPosHelper.transformUnitCircleToScene(fAngle, fRadius, rParam.mfLogicZ);
 aOffset = aNewOrigin - aOrigin;
 }
-} else if (m_eSubType != PieChartSubType_NONE) {
-// Draw the main pie for bar-of-pie/pie-of-pie smaller and to the left
-drawing::Position3D aOrigin = 
m_aPosHelper.transformUnitCircleToScene(0, 0, rParam.mfLogicZ);
-drawing::Position3D aNewOrigin = 
m_aPosHelper.transformUnitCircleToScene(180, 1.0, rParam.mfLogicZ);
-aOffset = aNewOrigin - aOrigin;
-fExplodedOuterRadius *= 2.0/3;
+} else {
+drawing::Position3D aOrigin, aNewOrigin;
+switch (e_subType) {
+case SubPieType::LEFT:
+// Draw the main pie for bar-of-pie/pie-of-pie smaller and to 
the left
+aOrigin = m_aPosHelper.transformUnitCircleToScene(0, 0, 
rParam.mfLogicZ);
+aNewOrigin = m_aPosHelper.transformUnitCircleToScene(180, 
0.75, rParam.mfLogicZ);
+aOffset = aNewOrigin - aOrigin;
+fExplodedOuterRadius *= 2.0/3;
+break;
+case SubPieType::RIGHT:
+// Draw the sub-pie for pie-of-pie much smaller and to the 
right
+aOrigin = m_aPosHelper.transformUnitCircleToScene(0, 0, 
rParam.mfLogicZ);
+aNewOrigin = m_aPosHelper.transformUnitCircleToScene(0, 0.75, 
rParam.mfLogicZ);
+aOffset = aNewOrigin - aOrigin;
+fExplodedOuterRadius *= 1.0/3;
+break;
+case SubPieType::NONE:
+default:
+// no change
+break;
+}
 }
 
 
@@ -847,10 +864,11 @@ void PieChart::createShapes()
 createOneRing(SubPieType::NONE, fSlotX, aParam, xSeriesTarget, 
xTextTarget, pSeries, n3DRelativeHeight);
 break;
 case PieChartSubType_BAR:
-createOneRing(SubPieType::LEFT, fSlotX, aParam, xSeriesTarget, 
xTextTarget, pSeries, n3DRelativeHeight);
+createOneRing(SubPieType::LEFT, 0, aParam, xSeriesTarget, 
xTextTarget, pSeries, n3DRelativeHeight);
 break;
 case PieChartSubType_PIE:
-createOneRing(SubPieType::LEFT, fSlotX, aParam, xSeriesTarget, 
xTextTarget, pSeries, n3DRelativeHeight);
+createOneRing(SubPieType::LEFT, 0, aParam, xSeriesTarget, 
xTextTarget, pSeries, n3DRelativeHeight);
+createOneRing(SubPieType::RIGHT, 0, aParam, xSeriesTarget, 
xTextTarget, pSeries, n3DRelativeHeight);
 break;
 default:
 assert(false); // this shouldn't happen
@@ -949,8 +967,7 @@ void PieChart::createOneRing([[maybe_unused]]enum 
SubPieType eType,
 // Do concentric explosion if it's a donut chart with more than 
one series
 const bool bConcentricExplosion = m_bUseRings && 
(m_aZSlots.front().size() > 1);
 rtl::Reference xPointShape =
-createDataPoint(
-xSeriesGroupShape_Shapes, xPointProperties, aParam, 
nPointCount,
+createDataPoint(eType, xSeriesGroupShape_Shapes, 
xPointProperties, aParam, nPointCount,
 bConcentricExplosion);
 
 ///point color:
diff --git a/chart2/source/view/charttypes/PieChart.hxx 
b/chart2/source/view/charttypes/PieChart.hxx
index 5c04ee05cf86..0517c87d67cd 100644
--- a/chart2/source/view/charttypes/PieChart.hxx
+++ b/chart2/source/view/charttypes/PieChart.hxx
@@ -84,6 +84,7 @@ public:
 private: //methods
 rtl::Reference
 createDataPoint(
+enum SubPieType eType,
 const rtl::Reference& xTarget,
 const css::uno::Reference& 
xObjectProperties,
 const ShapeParam& rParam,


core.git: chart2/source

2024-02-13 Thread Kurt Nordback (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |  286 -
 chart2/source/view/charttypes/PieChart.hxx |   14 +
 2 files changed, 173 insertions(+), 127 deletions(-)

New commits:
commit d81c98623b2abb991ca696b3b09011f6bb3de673
Author: Kurt Nordback 
AuthorDate: Fri Sep 1 16:13:15 2023 -0600
Commit: Noel Grandin 
CommitDate: Wed Feb 14 07:58:41 2024 +0100

tdf#50934: Restructuring for of-pie charts

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index 0f924de7c5ab..49cf48de3f05 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -790,13 +790,6 @@ void PieChart::createShapes()
 ///the angle axis scale range is [0, 1]. The max_offset parameter is used
 ///for exploded pie chart and its value is 0.5.
 
-///the `explodeable` ring is the first one except when the radius axis
-///orientation is reversed (always!?) and we are dealing with a donut: in
-///such a case the `explodeable` ring is the last one.
-std::vector< VDataSeriesGroup >::size_type nExplodeableSlot = 0;
-if( m_aPosHelper.isMathematicalOrientationRadius() && m_bUseRings )
-nExplodeableSlot = m_aZSlots.front().size()-1;
-
 m_aLabelInfoList.clear();
 m_fMaxOffset = std::numeric_limits::quiet_NaN();
 sal_Int32 n3DRelativeHeight = 100;
@@ -815,8 +808,6 @@ void PieChart::createShapes()
 ///(m_bUseRings||fSlotX<0.5)
 for( double fSlotX=0; aXSlotIter != aXSlotEnd && (m_bUseRings||fSlotX<0.5 
); ++aXSlotIter, fSlotX+=1.0 )
 {
-ShapeParam aParam;
-
 std::vector< std::unique_ptr >* pSeriesList = 
&(aXSlotIter->m_aSeriesVector);
 if(pSeriesList->empty())//there should be only one series in each x 
slot
 continue;
@@ -824,8 +815,6 @@ void PieChart::createShapes()
 if(!pSeries)
 continue;
 
-bool bHasFillColorMapping = pSeries->hasPropertyMapping("FillColor");
-
 /// The angle degree offset is set by the same property of the
 /// data series.
 /// Counter-clockwise offset from the 3 o'clock position.
@@ -835,6 +824,8 @@ void PieChart::createShapes()
 ///the current data series
 sal_Int32 nPointIndex=0;
 sal_Int32 nPointCount=pSeries->getTotalPointCount();
+ShapeParam aParam;
+
 for( nPointIndex = 0; nPointIndex < nPointCount; nPointIndex++ )
 {
 double fY = pSeries->getYValue( nPointIndex );
@@ -851,134 +842,175 @@ void PieChart::createShapes()
 // Total sum of all Y values in this series is zero. Skip the 
whole series.
 continue;
 
-double fLogicYForNextPoint = 0.0;
-///iterate through all points to create shapes
-for( nPointIndex = 0; nPointIndex < nPointCount; nPointIndex++ )
-{
-double fLogicInnerRadius, fLogicOuterRadius;
-
-///compute the maximum relative distance offset of the current 
slice
-///from the pie center
-///it is worth noting that after the first invocation the maximum
-///offset value is cached, so it is evaluated only once per each
-///call to `createShapes`
-double fOffset = getMaxOffset();
-
-///compute the outer and the inner radius for the current ring 
slice
-bool bIsVisible = m_aPosHelper.getInnerAndOuterRadius( fSlotX+1.0, 
fLogicInnerRadius, fLogicOuterRadius, m_bUseRings, fOffset );
-if( !bIsVisible )
-continue;
+switch (m_eSubType) {
+case PieChartSubType_NONE:
+createOneRing(SubPieType::NONE, fSlotX, aParam, xSeriesTarget, 
xTextTarget, pSeries, n3DRelativeHeight);
+break;
+case PieChartSubType_BAR:
+createOneRing(SubPieType::LEFT, fSlotX, aParam, xSeriesTarget, 
xTextTarget, pSeries, n3DRelativeHeight);
+break;
+case PieChartSubType_PIE:
+createOneRing(SubPieType::LEFT, fSlotX, aParam, xSeriesTarget, 
xTextTarget, pSeries, n3DRelativeHeight);
+break;
+default:
+assert(false); // this shouldn't happen
+}
+}//next x slot
+}
 
-aParam.mfDepth  = getTransformedDepth() * (n3DRelativeHeight / 
100.0);
+void PieChart::createOneRing([[maybe_unused]]enum SubPieType eType,
+double fSlotX,
+ShapeParam& aParam,
+const rtl::Reference& xSeriesTarget,
+const rtl::Reference& xTextTarget,
+VDataSeries* pSeries,
+sal_Int32 n3DRelativeHeight)
+{
+bool bHasFillColorMapping = pSeries->hasPropertyMapping("FillColor");
 
-rtl::Reference xSeriesGroupShape_Shapes = 
getSeriesGroupShape(pSeries, xSeriesTarget);
-

core.git: chart2/source

2024-02-09 Thread Kurt Nordback (via logerrit)
 chart2/source/model/template/ChartTypeTemplate.cxx |8 +++-
 chart2/source/view/charttypes/PieChart.cxx |1 +
 2 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 800b767f13d4fe9c7e7fc3271427a7193e17dbb6
Author: Kurt Nordback 
AuthorDate: Thu Aug 31 18:39:02 2023 -0600
Commit: Noel Grandin 
CommitDate: Fri Feb 9 11:03:22 2024 +0100

tdf#50934: Ensure BarOfPie has ScaleData::ShiftedCategoryPosition == false

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

diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx 
b/chart2/source/model/template/ChartTypeTemplate.cxx
index 670391422a85..e91eab13e4e9 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -571,7 +571,13 @@ void ChartTypeTemplate::adaptScales(
 rtl::Reference< ChartType > xChartType = 
getChartTypeForNewSeries2({});
 if( aData.AxisType == AxisType::CATEGORY )
 {
-aData.ShiftedCategoryPosition = 
m_aServiceName.indexOf("Column") != -1 || m_aServiceName.indexOf("Bar") != -1 
|| m_aServiceName.endsWith("Close");
+// Shift for Column, Hi-Lo-Close, and regular
+// Bar types, but not BarOfPie
+aData.ShiftedCategoryPosition =
+m_aServiceName.indexOf("Column") != -1 ||
+(m_aServiceName.indexOf("Bar") != -1 &&
+ !m_aServiceName.indexOf("BarOfPie")) ||
+m_aServiceName.endsWith("Close");
 }
 bool bSupportsDates = 
::chart::ChartTypeHelper::isSupportingDateAxis( xChartType, nDimensionX );
 if( aData.AxisType != AxisType::CATEGORY && ( 
aData.AxisType != AxisType::DATE || !bSupportsDates) )
diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index 7aeb18d2f6e3..0f924de7c5ab 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -287,6 +287,7 @@ rtl::Reference PieChart::createDataPoint(
 aOffset = aNewOrigin - aOrigin;
 }
 } else if (m_eSubType != PieChartSubType_NONE) {
+// Draw the main pie for bar-of-pie/pie-of-pie smaller and to the left
 drawing::Position3D aOrigin = 
m_aPosHelper.transformUnitCircleToScene(0, 0, rParam.mfLogicZ);
 drawing::Position3D aNewOrigin = 
m_aPosHelper.transformUnitCircleToScene(180, 1.0, rParam.mfLogicZ);
 aOffset = aNewOrigin - aOrigin;


core.git: chart2/source

2024-02-06 Thread codewithvk (via logerrit)
 chart2/source/controller/main/ChartController.cxx|   18 -
 chart2/source/controller/main/ChartController_Insert.cxx |  166 +++
 2 files changed, 97 insertions(+), 87 deletions(-)

New commits:
commit b9a46c1ec295fe3227a5adb864c849e55838e89e
Author: codewithvk 
AuthorDate: Sun Jan 28 13:43:09 2024 +0530
Commit: Caolán McNamara 
CommitDate: Tue Feb 6 16:43:43 2024 +0100

Async Dialogs for Few Chart Properties

Updated the chart properties dialogs to work asynchronously. The changes 
affect the following dialogs:

Chart Type: Accessible by double-clicking on a chart to select it, then 
right-clicking to open the context menu. Selecting 'Chart type...' opens the 
dialog for modifying chart types.

Insert Axes: Triggered by double-clicking on a chart to select it, then 
right-clicking and choosing 'Insert/Delete Axes' from the context menu. This 
dialog allows users to add or remove chart axes.

Insert Titles: Opens when you double-click on a chart, right-click, and 
select 'Insert Titles...' from the context menu. It's used for adding titles to 
the chart and its axes.

Insert Trendline: For column charts, you can double-click on a column, 
right-click, and choose 'Insert trendline..' to open this dialog.

Insert Error Bars: In a column chart, after selecting a column, 
right-clicking and choosing 'Insert X Error Bars..' or 'Insert Y Error Bars..' 
opens the dialog for adding error bars to the chart.

Signed-off-by: codewithvk 
Change-Id: Id7bb8682150f2e3115420d9259c6afd41682641e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162655
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 71a3cfb71dddba8098d74d7bb1dd414e4696914b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162824
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index ae09e6813dd5..29f5d9b6a24d 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1339,17 +1339,19 @@ void SAL_CALL 
ChartController::releaseContextMenuInterceptor(
 
 void ChartController::executeDispatch_ChartType()
 {
-UndoLiveUpdateGuard aUndoGuard(
-SchResId( STR_ACTION_EDIT_CHARTTYPE ), m_xUndoManager );
+auto aUndoGuard = 
std::make_shared(SchResId(STR_ACTION_EDIT_CHARTTYPE),
+m_xUndoManager);
 
 SolarMutexGuard aSolarGuard;
 //prepare and open dialog
-ChartTypeDialog aDlg(GetChartFrame(), getChartModel());
-if (aDlg.run() == RET_OK)
-{
-impl_adaptDataSeriesAutoResize();
-aUndoGuard.commit();
-}
+auto aDlg =  std::make_shared(GetChartFrame(), 
getChartModel());
+weld::DialogController::runAsync(aDlg, [this, aUndoGuard](int nResult) {
+if (nResult == RET_OK)
+{
+impl_adaptDataSeriesAutoResize();
+aUndoGuard->commit();
+}
+});
 }
 
 void ChartController::executeDispatch_SourceData()
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx 
b/chart2/source/controller/main/ChartController_Insert.cxx
index 1038e97943db..adb5b74b67d3 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -90,34 +90,36 @@ namespace chart
 
 void ChartController::executeDispatch_InsertAxes()
 {
-UndoGuard aUndoGuard(
+auto aUndoGuard = std::make_shared(
 ActionDescriptionProvider::createDescription(
 ActionDescriptionProvider::ActionType::Insert, SchResId( 
STR_OBJECT_AXES )),
 m_xUndoManager );
 
 try
 {
-InsertAxisOrGridDialogData aDialogInput;
+auto aDialogInput = std::make_shared();
 rtl::Reference< Diagram > xDiagram = getFirstDiagram();
-AxisHelper::getAxisOrGridExistence( aDialogInput.aExistenceList, 
xDiagram );
-AxisHelper::getAxisOrGridPossibilities( aDialogInput.aPossibilityList, 
xDiagram );
+AxisHelper::getAxisOrGridExistence( aDialogInput->aExistenceList, 
xDiagram );
+AxisHelper::getAxisOrGridPossibilities( 
aDialogInput->aPossibilityList, xDiagram );
 
 SolarMutexGuard aGuard;
-SchAxisDlg aDlg(GetChartFrame(), aDialogInput);
-if (aDlg.run() == RET_OK)
-{
-// lock controllers till end of block
-ControllerLockGuardUNO aCLGuard( getChartModel() );
+auto aDlg = std::make_shared(GetChartFrame(), 
*aDialogInput);
+weld::DialogController::runAsync(aDlg, [this, aDlg, aDialogInput, 
aUndoGuard](int nResult) {
+if ( nResult == RET_OK )
+{
+// lock controllers till end of block
+ControllerLockGuardUNO aCLGuard( getChartModel() );
 
-

core.git: chart2/source offapi/com

2024-02-06 Thread Kurt Nordback (via logerrit)
 chart2/source/controller/dialogs/tp_ChartType.cxx |2 +-
 chart2/source/model/template/ChartTypeManager.cxx |6 ++
 chart2/source/model/template/PieChartTypeTemplate.cxx |   17 +
 chart2/source/view/charttypes/PieChart.cxx|   15 +++
 chart2/source/view/charttypes/PieChart.hxx|2 ++
 offapi/com/sun/star/chart2/PieChartSubType.idl|1 +
 6 files changed, 34 insertions(+), 9 deletions(-)

New commits:
commit 15633d637e6296df218d56130d041660bf0e8317
Author: Kurt Nordback 
AuthorDate: Sat Feb 3 09:40:44 2024 -0700
Commit: Noel Grandin 
CommitDate: Tue Feb 6 15:16:31 2024 +0100

tdf#50934: Add a version comment, and more structure for of-pie

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

diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx 
b/chart2/source/controller/dialogs/tp_ChartType.cxx
index e0ddd62cd6ed..7d791815e70f 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -78,7 +78,7 @@ ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, 
weld::DialogControlle
 
 m_xSubTypeList->SetStyle(m_xSubTypeList->GetStyle() |
 WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD | WB_FLATVALUESET | 
WB_3DLOOK );
-m_xSubTypeList->SetColCount(4);
+m_xSubTypeList->SetColCount(6);
 m_xSubTypeList->SetLineCount(1);
 
 bool bEnableComplexChartTypes = true;
diff --git a/chart2/source/model/template/ChartTypeManager.cxx 
b/chart2/source/model/template/ChartTypeManager.cxx
index accf2078c2a6..2e6753444d99 100644
--- a/chart2/source/model/template/ChartTypeManager.cxx
+++ b/chart2/source/model/template/ChartTypeManager.cxx
@@ -405,13 +405,11 @@ rtl::Reference< ::chart::ChartTypeTemplate > 
ChartTypeManager::createTemplate(
 break;
 case TEMPLATE_BAROFPIE:
 xTemplate.set( new PieChartTypeTemplate( m_xContext, 
aServiceSpecifier,
-chart2::PieChartOffsetMode_ALL_EXPLODED, true,
-chart2::PieChartSubType_BAR ));
+chart2::PieChartOffsetMode_NONE, false, 
chart2::PieChartSubType_BAR ));
 break;
 case TEMPLATE_PIEOFPIE:
 xTemplate.set( new PieChartTypeTemplate( m_xContext, 
aServiceSpecifier,
-chart2::PieChartOffsetMode_ALL_EXPLODED, true,
-chart2::PieChartSubType_PIE ));
+chart2::PieChartOffsetMode_NONE, false, 
chart2::PieChartSubType_PIE ));
 break;
 case TEMPLATE_THREEDPIE:
 xTemplate.set( new PieChartTypeTemplate( m_xContext, 
aServiceSpecifier,
diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx 
b/chart2/source/model/template/PieChartTypeTemplate.cxx
index 2f8c7fb7705f..322b75243fb9 100644
--- a/chart2/source/model/template/PieChartTypeTemplate.cxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.cxx
@@ -266,6 +266,8 @@ void PieChartTypeTemplate::createChartTypes(
 rtl::Reference< ChartType > xCT = new PieChartType();
 xCT->setFastPropertyValue(
 PROP_PIECHARTTYPE_USE_RINGS, getFastPropertyValue( 
PROP_PIE_TEMPLATE_USE_RINGS )); // "UseRings"
+xCT->setFastPropertyValue(
+PROP_PIECHARTTYPE_SUBTYPE, getFastPropertyValue( 
PROP_PIE_TEMPLATE_SUB_PIE_TYPE )); // "SubType"
 rCoordSys[0]->setChartTypes( std::vector{xCT} );
 
 if( !aSeriesSeq.empty() )
@@ -294,10 +296,8 @@ bool PieChartTypeTemplate::matchesTemplate2(
 getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS ) >>= bTemplateUsesRings;
 chart2::PieChartOffsetMode ePieOffsetMode;
 getFastPropertyValue( PROP_PIE_TEMPLATE_OFFSET_MODE ) >>= ePieOffsetMode;
-/*
-chart2::PieChartSubType ePieSubType;
-getFastPropertyValue( PROP_PIE_TEMPLATE_SUB_PIE_TYPE ) >>= ePieSubType;
-*/
+chart2::PieChartSubType eTemplateSubType;
+getFastPropertyValue( PROP_PIE_TEMPLATE_SUB_PIE_TYPE ) >>= 
eTemplateSubType;
 
 //check offset-mode
 if( bResult )
@@ -372,6 +372,15 @@ bool PieChartTypeTemplate::matchesTemplate2(
 bResult = ( bTemplateUsesRings == bUseRings );
 }
 }
+if( bResult )
+{
+rtl::Reference< ChartType > xCTProp = xDiagram->getChartTypeByIndex( 0 
);
+chart2::PieChartSubType eSubType = chart2::PieChartSubType_NONE;
+if( xCTProp->getFastPropertyValue( PROP_PIECHARTTYPE_SUBTYPE ) >>= 
eSubType )
+{
+bResult = ( eTemplateSubType == eSubType );
+}
+}
 
 return bResult;
 }
diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index d97324288416..7aeb18d2f6e3 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -185,6 +185,7 @@ PieChart::PieChart( const 

core.git: chart2/source

2024-02-04 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/drawinglayer/DrawViewWrapper.cxx |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 32b814355b50e2f271ce46058990049bc7098266
Author: Caolán McNamara 
AuthorDate: Wed Jan 31 19:51:33 2024 +
Commit: Caolán McNamara 
CommitDate: Sun Feb 4 10:30:42 2024 +0100

use ViewShell DOCCOLOR when available for charts

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

diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx 
b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index 56f1440e23ff..02d37de41d03 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -40,6 +40,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
@@ -212,8 +213,14 @@ void DrawViewWrapper::setMarkHandleProvider( 
MarkHandleProvider* pMarkHandleProv
 
 void DrawViewWrapper::CompleteRedraw(OutputDevice* pOut, const vcl::Region& 
rReg, sdr::contact::ViewObjectContactRedirector* /* pRedirector */)
 {
-svtools::ColorConfig aColorConfig;
-Color aFillColor( aColorConfig.GetColorValue( svtools::DOCCOLOR ).nColor );
+Color aFillColor;
+if (const SfxViewShell* pViewShell = SfxViewShell::Current())
+aFillColor = pViewShell->GetColorConfigColor(svtools::DOCCOLOR);
+else
+{
+svtools::ColorConfig aColorConfig;
+aFillColor = aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor;
+}
 SetApplicationBackgroundColor(aFillColor);
 
 SdrOutliner& rOutliner = GetModel().GetDrawOutliner();


core.git: chart2/source

2024-01-31 Thread Justin Luth (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |   43 ++---
 1 file changed, 40 insertions(+), 3 deletions(-)

New commits:
commit 1925e13993806545552cc49da79a7bd6b990
Author: Justin Luth 
AuthorDate: Fri Jan 26 08:36:26 2024 -0500
Commit: Miklos Vajna 
CommitDate: Wed Jan 31 14:53:48 2024 +0100

related tdf#146756 chart2: code-readers documentation

Sorely needed to avoid misconceptions.

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index ba87e8ce0cbe..d97324288416 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -395,12 +395,35 @@ void PieChart::createTextLabelShape(
 const double fAngleDegree
 = NormAngle360(rParam.mfUnitCircleStartAngleDegree + 
fHalfWidthAngleDegree);
 
+// aOuterPosition: slice midpoint on the circumference,
+// which is where an outside/custom label would be connected
 awt::Point aOuterPosition = 
PlottingPositionHelper::transformSceneToScreenPosition(
 m_aPosHelper.transformUnitCircleToScene(fAngleDegree, 
rParam.mfUnitCircleOuterRadius, 0),
 m_xLogicTarget, m_nDimension);
 aPieLabelInfo.aOuterPosition = basegfx::B2IVector(aOuterPosition.X, 
aOuterPosition.Y);
 
-// set the maximum text width to be used when text wrapping is enabled
+/* There are basically three places where a label could be placed in a pie 
chart
+ * 1.) outside the slice
+ *  -typically used for long labels or charts with many, thin slices
+ * 2.) inside the slice (center or edge)
+ *  -typically used for charts with 5 or less slices
+ * 3.) in a custom location
+ *  -typically set (by auto-positioning I presume) when labels overlap
+ *
+ * Selecting a good width for the text is critical to achieving 
good-looking labels.
+ * Our bestFit algorithm completely depends on a good starting guess.
+ * Lots of room for improvement here...
+ * Warning: complication due to 3D ovals (so can't use normal circle 
functions),
+ * donuts(m_bUseRings), auto re-scaling of the pie chart, etc.
+ *
+ * Based on observation, Microsoft uses 1/5 of the chart space as its text 
limit,
+ * although it will reduce the width (as long as it is not a custom 
position)
+ * if doing so means that the now-taller-text will fit inside the slice,
+ * so best if we do the same for our charts.
+ */
+
+// set the maximum text width to be used when text wrapping is enabled 
(default text wrap is on)
+/* A reasonable start for bestFitting a 90deg slice oriented on an Axis is 
80% of the radius */
 double fTextMaximumFrameWidth = 0.8 * fPieRadius;
 const double fCompatMaxTextLen =  m_aAvailableOuterRect.getWidth() / 5.0;
 if (m_aAvailableOuterRect.getWidth())
@@ -417,15 +440,21 @@ void PieChart::createTextLabelShape(
 }
 else if (nLabelPlacement == css::chart::DataLabelPlacement::OUTSIDE)
 {
+// use up to 80% of the available space from the slice edge to the 
edge of the chart
 const sal_Int32 nOuterX = aPieLabelInfo.aOuterPosition.getX();
 if (fAngleDegree < 90 || fAngleDegree > 270) // label is placed on 
the right side
 fTextMaximumFrameWidth = 0.8 * 
abs(m_aAvailableOuterRect.getWidth() - nOuterX);
 else // label is placed on the left side
 fTextMaximumFrameWidth = 0.8 * nOuterX;
 
+// limited of course to the 1/5 maximum allowed for compatibility
 fTextMaximumFrameWidth = std::min(fTextMaximumFrameWidth, 
fCompatMaxTextLen);
  }
 }
+/* TODO: better guesses for INSIDE: does the slice better handle wide text 
or tall/wrapped text?
+ *   * wide: center near X-axis, shorter text content, slice > 
90degree wide
+ *   * tall: center near Y-axis, longer text content, many categories 
shown
+ */
 sal_Int32 nTextMaximumFrameWidth = ceil(fTextMaximumFrameWidth);
 
 ///the text shape for the label is created
@@ -449,11 +478,17 @@ void PieChart::createTextLabelShape(
  *  First off the routine try to place the label inside the related 
pie slice,
  *  if this is not possible the label is placed outside.
  */
+
+/* Note: bestFit surprisingly does not adjust the width of the label,
+ *   so having an optimal width already set when createDataLabel 
ran earlier
+ *   is crucial (and currently lacking)!
+ * TODO: * change bestFit to treat the width as a max width, and 
reduce if beneficial
+ */
 if (!performLabelBestFitInnerPlacement(rParam, aPieLabelInfo))
 {
 if (m_aAvailableOuterRect.getWidth())

core.git: chart2/source

2024-01-30 Thread Andrea Gelmini (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dfcdef6d94993131b5f150d00d08cc81a987eebb
Author: Andrea Gelmini 
AuthorDate: Tue Jan 30 16:46:16 2024 +0100
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Tue Jan 30 23:59:55 2024 +0100

Fix typo

Change-Id: I384f3c97286a5b336d44df42e911870100542198
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162766
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index 3635ea3fd3bc..2d72da5f5886 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -468,7 +468,7 @@ void PieChart::createTextLabelShape(
  *
  * Therefore, handle this by making the label as small as 
possible.
  *
- * Complication (tdf122765.pptx): it is possiible for the 
aOuterPosition
+ * Complication (tdf122765.pptx): it is possible for the 
aOuterPosition
  * to be outside of the available outer rectangle (somehow),
  * so in that bizarre case just try the positive value of the 
result...
  */


core.git: chart2/source

2024-01-30 Thread Julien Nabet (via logerrit)
 chart2/source/tools/CharacterProperties.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit dd5e179f0fd7c9bf37872acf53301be28bb71cfc
Author: Julien Nabet 
AuthorDate: Tue Jan 30 10:22:15 2024 +0100
Commit: Noel Grandin 
CommitDate: Tue Jan 30 13:18:28 2024 +0100

tdf#159288: Assertion on insert trend line

5  0x7fd6780533a2 in __assert_fail
   (assertion=0x7fd66de41177 
"ImplGetSVData()->mpDefInst->GetYieldMutex()->IsCurrentThread() && \"SolarMutex 
not owned!\"", file=0x7fd66df2c58b 
"/home/julien/lo/libreoffice/vcl/source/app/dbggui.cxx", line=35, 
function=0x7fd66de5d0c6 "void ImplDbgTestSolarMutex()") at ./assert/assert.c:101
6  0x7fd66f0dd6a2 in ImplDbgTestSolarMutex() () at 
/home/julien/lo/libreoffice/vcl/source/app/dbggui.cxx:35
7  0x7fd677522f10 in DbgTestSolarMutex() () at 
/home/julien/lo/libreoffice/tools/source/debug/debug.cxx:54
8  0x7fd66f3aea88 in 
ImplFontCache::GetFontInstance(vcl::font::PhysicalFontCollection const*, 
vcl::font::FontSelectPattern&) (this=0x564a8f77e0c0, pFontList=0x564a8f7783d0, 
aFontSelData=...)
   at /home/julien/lo/libreoffice/vcl/source/font/fontcache.cxx:117
9  0x7fd66f3ae987 in 
ImplFontCache::GetFontInstance(vcl::font::PhysicalFontCollection const*, 
vcl::Font const&, Size const&, float, bool)
   (this=0x564a8f77e0c0, pFontList=0x564a8f7783d0, rFont=..., rSize=Size = 
{...}, fExactHeight=12, bNonAntialias=false) at 
/home/julien/lo/libreoffice/vcl/source/font/fontcache.cxx:111
10 0x7fd66eb905f6 in OutputDevice::GetDefaultFont(DefaultFontType, 
o3tl::strong_int, GetDefaultFontFlags, 
OutputDevice const*)
   (nType=DefaultFontType::CJK_SPREADSHEET, eLang=..., 
nFlags=GetDefaultFontFlags::OnlyOne, pOutDev=0x564a8f6bfca0) at 
/home/julien/lo/libreoffice/vcl/source/outdev/font.cxx:573
11 0x7fd62e86669d in 
chart::CharacterProperties::AddDefaultsToMap(std::__debug::unordered_map, std::equal_to, 
std::allocator > >&) 
(rOutMap=std::__debug::unordered_map with 19 elements = {...}) at 
/home/julien/lo/libreoffice/chart2/source/tools/CharacterProperties.cxx:358
12 0x7fd62e951686 in (anonymous 
namespace)::GetStaticRegressionEquationDefaults()::$_0::operator()() const 
(this=0x7ffe3f9b6b80)
   at 
/home/julien/lo/libreoffice/chart2/source/tools/RegressionEquation.cxx:121
13 0x7fd62e9500e7 in (anonymous 
namespace)::GetStaticRegressionEquationDefaults() () at 
/home/julien/lo/libreoffice/chart2/source/tools/RegressionEquation.cxx:117
14 0x7fd62e94ff98 in chart::RegressionEquation::GetDefaultValue(int, 
com::sun::star::uno::Any&) const (this=0x564a90aa2870, nHandle=4, 
rAny=uno::Any(void))
   at 
/home/julien/lo/libreoffice/chart2/source/tools/RegressionEquation.cxx:196

See full bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=192072

Change-Id: I8048b9a69761dba618ef556335c2cadab6647627
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162737
Tested-by: Heiko Tietze 
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/chart2/source/tools/CharacterProperties.cxx 
b/chart2/source/tools/CharacterProperties.cxx
index 7669d3245a27..bf44c6a4c08f 100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -340,6 +341,7 @@ void CharacterProperties::AddPropertiesToVector(
 void CharacterProperties::AddDefaultsToMap(
 ::chart::tPropertyValueMap & rOutMap )
 {
+SolarMutexGuard aGuard;
 const float fDefaultFontHeight = 13.0;
 
 SvtLinguConfig aLinguConfig;


core.git: chart2/source

2024-01-29 Thread Justin Luth (via logerrit)
 chart2/source/view/main/LabelPositionHelper.cxx |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 6955e89903b5ec4328cab15f8a17663ad8ba3e9a
Author: Justin Luth 
AuthorDate: Thu Jan 25 09:15:29 2024 -0500
Commit: Justin Luth 
CommitDate: Mon Jan 29 14:17:26 2024 +0100

NFC chart2: trivial avoidance of unnecessary calculations

Change-Id: Ia3bfce9ba6c7b8cab55e46e4d1e8c2afe54a65b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162588
Reviewed-by: Justin Luth 
Tested-by: Justin Luth 

diff --git a/chart2/source/view/main/LabelPositionHelper.cxx 
b/chart2/source/view/main/LabelPositionHelper.cxx
index 449c5776e4d7..471d76662ef2 100644
--- a/chart2/source/view/main/LabelPositionHelper.cxx
+++ b/chart2/source/view/main/LabelPositionHelper.cxx
@@ -53,28 +53,28 @@ awt::Point 
LabelPositionHelper::transformSceneToScreenPosition( const drawing::P
 
 void LabelPositionHelper::changeTextAdjustment( tAnySequence& rPropValues, 
const tNameSequence& rPropNames, LabelAlignment eAlignment)
 {
-//HorizontalAdjustment
+uno::Any* pHorizontalAdjustAny
+= PropertyMapper::getValuePointer(rPropValues, rPropNames, 
u"TextHorizontalAdjust");
+if (pHorizontalAdjustAny)
 {
 drawing::TextHorizontalAdjust eHorizontalAdjust = 
drawing::TextHorizontalAdjust_CENTER;
 if( eAlignment==LABEL_ALIGN_RIGHT || eAlignment==LABEL_ALIGN_RIGHT_TOP 
|| eAlignment==LABEL_ALIGN_RIGHT_BOTTOM )
 eHorizontalAdjust = drawing::TextHorizontalAdjust_LEFT;
 else if( eAlignment==LABEL_ALIGN_LEFT || 
eAlignment==LABEL_ALIGN_LEFT_TOP || eAlignment==LABEL_ALIGN_LEFT_BOTTOM )
 eHorizontalAdjust = drawing::TextHorizontalAdjust_RIGHT;
-uno::Any* pHorizontalAdjustAny = 
PropertyMapper::getValuePointer(rPropValues,rPropNames,u"TextHorizontalAdjust");
-if(pHorizontalAdjustAny)
-*pHorizontalAdjustAny <<= eHorizontalAdjust;
+*pHorizontalAdjustAny <<= eHorizontalAdjust;
 }
 
-//VerticalAdjustment
+uno::Any* pVerticalAdjustAny
+= PropertyMapper::getValuePointer(rPropValues, rPropNames, 
u"TextVerticalAdjust");
+if (pVerticalAdjustAny)
 {
 drawing::TextVerticalAdjust eVerticalAdjust = 
drawing::TextVerticalAdjust_CENTER;
 if( eAlignment==LABEL_ALIGN_TOP || eAlignment==LABEL_ALIGN_RIGHT_TOP 
|| eAlignment==LABEL_ALIGN_LEFT_TOP )
 eVerticalAdjust = drawing::TextVerticalAdjust_BOTTOM;
 else if( eAlignment==LABEL_ALIGN_BOTTOM || 
eAlignment==LABEL_ALIGN_RIGHT_BOTTOM || eAlignment==LABEL_ALIGN_LEFT_BOTTOM )
 eVerticalAdjust = drawing::TextVerticalAdjust_TOP;
-uno::Any* pVerticalAdjustAny = 
PropertyMapper::getValuePointer(rPropValues,rPropNames,u"TextVerticalAdjust");
-if(pVerticalAdjustAny)
-*pVerticalAdjustAny <<= eVerticalAdjust;
+*pVerticalAdjustAny <<= eVerticalAdjust;
 }
 }
 


core.git: chart2/source

2024-01-29 Thread Justin Luth (via logerrit)
 chart2/source/view/charttypes/VSeriesPlotter.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 4b2e44f81cdac757a62e431505075fc8a3d98471
Author: Justin Luth 
AuthorDate: Thu Jan 25 09:10:52 2024 -0500
Commit: Justin Luth 
CommitDate: Mon Jan 29 14:16:28 2024 +0100

NFC chart2: remove unnecessary variables

Change-Id: I089972f0fd60fbaaff27a304c248a7eb882b972b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162587
Tested-by: Justin Luth 
Reviewed-by: Justin Luth 

diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx 
b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index f3a3a8bebd61..b9773494d785 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -731,13 +731,11 @@ rtl::Reference 
VSeriesPlotter::createDataLabel( const rtl::Referen
 
 // in case legend symbol has to be displayed, text shape position is
 // slightly changed.
-const awt::Point aUnrotatedTextPos(xTextShape->getPosition());
 if( xSymbol.is() )
 {
-const awt::Point aOldTextPos( xTextShape->getPosition() );
-awt::Point aNewTextPos( aOldTextPos );
+awt::Point aNewTextPos(xTextShape->getPosition());
 
-awt::Point aSymbolPosition( aUnrotatedTextPos );
+awt::Point aSymbolPosition(aNewTextPos);
 awt::Size aSymbolSize( xSymbol->getSize() );
 awt::Size aTextSize = xTextShape->getSize();
 


core.git: chart2/source

2024-01-27 Thread Justin Luth (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx   |   28 ---
 chart2/source/view/charttypes/VSeriesPlotter.cxx |   16 +++--
 2 files changed, 9 insertions(+), 35 deletions(-)

New commits:
commit dc8c295605d190d0fc9d4a9a8b369c319be9d44b
Author: Justin Luth 
AuthorDate: Thu Jan 25 08:58:43 2024 -0500
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Sun Jan 28 06:18:59 2024 +0100

chart2: use std::clamp

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index efbef5a083eb..5e3a6dcaad17 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -506,17 +506,8 @@ void PieChart::createTextLabelShape(
 {
 sal_Int32 nX1 = aPieLabelInfo.aOuterPosition.getX();
 sal_Int32 nY1 = aPieLabelInfo.aOuterPosition.getY();
-sal_Int32 nX2 = nX1;
-sal_Int32 nY2 = nY1;
-if (nX1 < aRect.getMinX())
-nX2 = aRect.getMinX();
-else if (nX1 > aRect.getMaxX())
-nX2 = aRect.getMaxX();
-
-if (nY1 < aRect.getMinY())
-nY2 = aRect.getMinY();
-else if (nY1 > aRect.getMaxY())
-nY2 = aRect.getMaxY();
+const sal_Int32 nX2 = std::clamp(nX1, aRect.getMinX(), 
aRect.getMaxX());
+const sal_Int32 nY2 = std::clamp(nY1, aRect.getMinY(), 
aRect.getMaxY());
 
 const sal_Int32 nLabelSquaredDistanceFromOrigin
 = (nX2 - aOrigin.X) * (nX2 - aOrigin.X) + (nY2 - aOrigin.Y) * 
(nY2 - aOrigin.Y);
@@ -1286,20 +1277,11 @@ void PieChart::rearrangeLabelToAvoidOverlapIfRequested( 
const awt::Size& rPageSi
 {
 if( labelInfo.bMoved && labelInfo.bShowLeaderLine )
 {
+const basegfx::B2IRectangle 
aRect(lcl_getRect(labelInfo.xLabelGroupShape));
 sal_Int32 nX1 = labelInfo.aOuterPosition.getX();
 sal_Int32 nY1 = labelInfo.aOuterPosition.getY();
-sal_Int32 nX2 = nX1;
-sal_Int32 nY2 = nY1;
-::basegfx::B2IRectangle aRect( lcl_getRect( 
labelInfo.xLabelGroupShape ) );
-if( nX1 < aRect.getMinX() )
-nX2 = aRect.getMinX();
-else if( nX1 > aRect.getMaxX() )
-nX2 = aRect.getMaxX();
-
-if( nY1 < aRect.getMinY() )
-nY2 = aRect.getMinY();
-else if( nY1 > aRect.getMaxY() )
-nY2 = aRect.getMaxY();
+const sal_Int32 nX2 = std::clamp(nX1, aRect.getMinX(), 
aRect.getMaxX());
+const sal_Int32 nY2 = std::clamp(nY1, aRect.getMinY(), 
aRect.getMaxY());
 
 //when the line is very short compared to the page size don't 
create one
 ::basegfx::B2DVector aLength(nX1-nX2, nY1-nY2);
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx 
b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index ef13248bf0a6..f3a3a8bebd61 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -707,20 +707,12 @@ rtl::Reference 
VSeriesPlotter::createDataLabel( const rtl::Referen
 // "ShowCustomLeaderLines"
 rDataSeries.getModel()->getFastPropertyValue( 
PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES ).get())
 {
+const basegfx::B2IRectangle aRect(
+BaseGFXHelper::makeRectangle(aRelPos, 
xTextShape->getSize()));
 sal_Int32 nX1 = rScreenPosition2D.X;
 sal_Int32 nY1 = rScreenPosition2D.Y;
-sal_Int32 nX2 = nX1;
-sal_Int32 nY2 = nY1;
-::basegfx::B2IRectangle 
aRect(BaseGFXHelper::makeRectangle(aRelPos, xTextShape->getSize()));
-if (nX1 < aRelPos.X)
-nX2 = aRelPos.X;
-else if (nX1 > aRect.getMaxX())
-nX2 = aRect.getMaxX();
-
-if (nY1 < aRect.getMinY())
-nY2 = aRect.getMinY();
-else if (nY1 > aRect.getMaxY())
-nY2 = aRect.getMaxY();
+const sal_Int32 nX2 = std::clamp(nX1, aRelPos.X, 
aRect.getMaxX());
+const sal_Int32 nY2 = std::clamp(nY1, aRect.getMinY(), 
aRect.getMaxY());
 
 //when the line is very short compared to the page size 
don't create one
 ::basegfx::B2DVector aLength(nX1 - nX2, nY1 - nY2);


core.git: chart2/source

2024-01-27 Thread Justin Luth (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |   10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 5e81ce5aec86ef5a93cc9cb4445fc4983e8a59ea
Author: Justin Luth 
AuthorDate: Thu Jan 25 08:41:41 2024 -0500
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Sun Jan 28 05:40:51 2024 +0100

chart2: use NormAngle360

In various places, the degrees refer to an area/width,
and in those cases 360 means everything, so mk correctly
removed NormAngle for those situations.

But now copy/paste has added that to areas where a simple
angle is being described, and in those cases
using NormAngle360 is better.

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index b9dd0517cf1f..efbef5a083eb 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -386,12 +386,10 @@ void PieChart::createTextLabelShape(
 aOuterCirclePoint.Y - aPieLabelInfo.aOrigin.getY() );
 double fSquaredPieRadius = aRadiusVector.scalar(aRadiusVector);
 double fPieRadius = sqrt( fSquaredPieRadius );
-double fAngleDegree
-= rParam.mfUnitCircleStartAngleDegree + 
rParam.mfUnitCircleWidthAngleDegree / 2.0;
-while (fAngleDegree > 360.0)
-fAngleDegree -= 360.0;
-while (fAngleDegree < 0.0)
-fAngleDegree += 360.0;
+const double fHalfWidthAngleDegree = rParam.mfUnitCircleWidthAngleDegree / 
2.0;
+// fAngleDegree: the angle through the center of the slice / the bisecting 
ray
+const double fAngleDegree
+= NormAngle360(rParam.mfUnitCircleStartAngleDegree + 
fHalfWidthAngleDegree);
 
 awt::Point aOuterPosition = 
PlottingPositionHelper::transformSceneToScreenPosition(
 m_aPosHelper.transformUnitCircleToScene(fAngleDegree, 
rParam.mfUnitCircleOuterRadius, 0),


core.git: chart2/source cui/source dbaccess/source editeng/source extensions/source forms/source include/svl reportdesign/source sc/qa sc/source sd/source sfx2/source starmath/source svl/qa svl/source

2024-01-27 Thread Armin Le Grand (allotropia) (via logerrit)
 chart2/source/controller/drawinglayer/DrawViewWrapper.cxx |8 -
 chart2/source/controller/itemsetwrapper/ItemConverter.cxx |2 
 chart2/source/controller/main/ChartTransferable.cxx   |2 
 chart2/source/view/main/ChartItemPool.cxx |4 
 chart2/source/view/main/ChartView.cxx |4 
 chart2/source/view/main/DrawModelWrapper.cxx  |4 
 cui/source/tabpages/TextColumnsPage.cxx   |4 
 cui/source/tabpages/connect.cxx   |8 -
 cui/source/tabpages/measure.cxx   |   12 -
 cui/source/tabpages/textanim.cxx  |   14 -
 cui/source/tabpages/textattr.cxx  |8 -
 cui/source/tabpages/tpshadow.cxx  |4 
 dbaccess/source/ui/control/sqledit.cxx|   12 -
 dbaccess/source/ui/dlg/DbAdminImpl.cxx|2 
 dbaccess/source/ui/dlg/dbadmin.cxx|2 
 editeng/source/editeng/editdoc.cxx|4 
 editeng/source/editeng/impedit4.cxx   |   10 -
 editeng/source/editeng/impedit5.cxx   |2 
 editeng/source/outliner/outlvw.cxx|2 
 editeng/source/rtf/rtfitem.cxx|4 
 editeng/source/rtf/svxrtf.cxx |8 -
 editeng/source/uno/unofdesc.cxx   |   14 -
 editeng/source/uno/unoipset.cxx   |6 
 editeng/source/uno/unotext.cxx|2 
 extensions/source/propctrlr/fontdialog.cxx|4 
 forms/source/richtext/richtextengine.cxx  |   10 -
 include/svl/itempool.hxx  |   69 +---
 include/svl/poolitem.hxx  |   36 ++--
 reportdesign/source/ui/report/ReportController.cxx|2 
 sc/qa/unit/subsequent_export_test.cxx |   12 -
 sc/source/core/data/attarray.cxx  |   10 -
 sc/source/core/data/docpool.cxx   |2 
 sc/source/core/data/documen3.cxx  |8 -
 sc/source/core/data/documen9.cxx  |8 -
 sc/source/core/data/document.cxx  |4 
 sc/source/core/data/drwlayer.cxx  |   20 +-
 sc/source/core/data/fillinfo.cxx  |6 
 sc/source/core/data/global.cxx|4 
 sc/source/core/data/patattr.cxx   |2 
 sc/source/core/data/stlsheet.cxx  |   16 +-
 sc/source/core/data/table4.cxx|2 
 sc/source/filter/ftools/ftools.cxx|2 
 sc/source/filter/rtf/rtfparse.cxx |2 
 sc/source/filter/xml/xmlfonte.cxx |2 
 sc/source/ui/app/drwtrans.cxx |2 
 sc/source/ui/app/msgpool.cxx  |2 
 sc/source/ui/docshell/docfunc.cxx |2 
 sc/source/ui/undo/undoblk.cxx |2 
 sc/source/ui/unoobj/defltuno.cxx  |   12 -
 sc/source/ui/view/printfun.cxx|6 
 sd/source/core/drawdoc.cxx|2 
 sd/source/core/drawdoc2.cxx   |2 
 sd/source/core/drawdoc4.cxx   |   10 -
 sd/source/core/stlpool.cxx|2 
 sd/source/core/stlsheet.cxx   |6 
 sd/source/ui/annotations/annotationmanager.cxx|4 
 sd/source/ui/dlg/dlgolbul.cxx |2 
 sd/source/ui/func/fuolbull.cxx|2 
 sd/source/ui/unoidl/unomodel.cxx  |2 
 sd/source/ui/unoidl/unopback.cxx  |6 
 sd/source/ui/view/viewshel.cxx|2 
 sfx2/source/control/shell.cxx |2 
 sfx2/source/dialog/tabdlg.cxx |2 
 sfx2/source/explorer/nochaos.cxx  |4 
 starmath/source/smediteng.cxx |8 -
 svl/qa/unit/items/stylepool.cxx   |4 
 svl/source/items/itempool.cxx |  108 +++---
 svl/source/items/itemprop.cxx |4 
 svl/source/items/itemset.cxx  |   20 +-
 svl/source/items/poolitem.cxx |3 
 svx/source/dialog/hdft.cxx|2 
 svx/source/dialog/weldeditview.cxx|   12 -
 svx/source/engine3d/view3d1.cxx   |4 
 svx/source/svdraw/svdattr.cxx

core.git: chart2/source

2024-01-26 Thread Justin Luth (via logerrit)
 chart2/source/view/charttypes/PieChart.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 87facad88d565e8e9fe21d04897058cca0ea55cd
Author: Justin Luth 
AuthorDate: Fri Jan 26 10:46:37 2024 -0500
Commit: Justin Luth 
CommitDate: Fri Jan 26 19:58:20 2024 +0100

tdf#134121 pie chart2: fix missing leaderLines at top/bottom of 3D ovals

Yeah, it took me a while to clue in that this is no longer
a circle, so we can't apply circle logic to it any more.

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

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index 68e65b15d949..b9dd0517cf1f 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -520,11 +520,14 @@ void PieChart::createTextLabelShape(
 else if (nY1 > aRect.getMaxY())
 nY2 = aRect.getMaxY();
 
-sal_Int32 nSquaredDistanceFromOrigin
+const sal_Int32 nLabelSquaredDistanceFromOrigin
 = (nX2 - aOrigin.X) * (nX2 - aOrigin.X) + (nY2 - aOrigin.Y) * 
(nY2 - aOrigin.Y);
+// can't use fSquaredPieRadius for 3D charts, since no longer a 
true circle
+const sal_Int32 nPieEdgeSquaredDistanceFromOrigin
+= (nX1 - aOrigin.X) * (nX1 - aOrigin.X) + (nY1 - aOrigin.Y) * 
(nY1 - aOrigin.Y);
 
 // tdf#138018 Don't show leader line when custom positioned data 
label is inside pie chart
-if (nSquaredDistanceFromOrigin > fSquaredPieRadius)
+if (nLabelSquaredDistanceFromOrigin > 
nPieEdgeSquaredDistanceFromOrigin)
 {
 //when the line is very short compared to the page size don't 
create one
 ::basegfx::B2DVector aLength(nX1 - nX2, nY1 - nY2);


core.git: chart2/source sc/source sd/source sw/source

2024-01-24 Thread Noel Grandin (via logerrit)
 chart2/source/controller/main/ShapeController.cxx |   28 --
 sc/source/ui/drawfunc/drawsh.cxx  |9 ++--
 sc/source/ui/drawfunc/drtxtob.cxx |   42 +++---
 sd/source/ui/func/futxtatt.cxx|   31 
 sw/source/uibase/shells/drawdlg.cxx   |   38 +++
 sw/source/uibase/shells/drwtxtsh.cxx  |   24 +++-
 6 files changed, 104 insertions(+), 68 deletions(-)

New commits:
commit a9ee88cc47783a809f6c49f5b7326180dc0bbead
Author: Noel Grandin 
AuthorDate: Tue Jan 23 12:58:48 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed Jan 24 10:51:00 2024 +0100

make text-table dialog async

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

diff --git a/chart2/source/controller/main/ShapeController.cxx 
b/chart2/source/controller/main/ShapeController.cxx
index fe09d3e9af61..c440a7d97925 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -320,20 +320,26 @@ void ShapeController::executeDispatch_TextAttributes()
 pDrawViewWrapper->MergeAttrFromMarked( aAttr, false );
 }
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-ScopedVclPtr< SfxAbstractTabDialog > pDlg(
+VclPtr< SfxAbstractTabDialog > pDlg(
 pFact->CreateTextTabDialog(pChartWindow, , pDrawViewWrapper));
-if ( pDlg->Execute() == RET_OK )
-{
-const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
-if ( bHasMarked )
-{
-pDrawViewWrapper->SetAttributes( *pOutAttr );
-}
-else
+pDlg->StartExecuteAsync(
+[pDlg, bHasMarked, pDrawViewWrapper] (sal_Int32 nResult)->void
 {
-pDrawViewWrapper->SetDefaultAttr( *pOutAttr, false );
+if ( RET_OK == nResult )
+{
+const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+if ( bHasMarked )
+{
+pDrawViewWrapper->SetAttributes( *pOutAttr );
+}
+else
+{
+pDrawViewWrapper->SetDefaultAttr( *pOutAttr, false );
+}
+}
+pDlg->disposeOnce();
 }
-}
+);
 }
 
 void ShapeController::executeDispatch_TransformDialog()
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index dfc3d94ef79f..19e455fd2169 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -559,10 +559,12 @@ void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq )
 weld::Window* pWin = rViewData.GetDialogParent();
 VclPtr pDlg(pFact->CreateTextTabDialog(pWin, 
, pView));
 
+auto xRequest = std::make_shared(rReq);
+rReq.Ignore(); // the 'old' request is not relevant any more
 pDlg->StartExecuteAsync(
-[pDlg, bHasMarked, pView] (sal_Int32 nResult)->void
+[pDlg, xRequest, bHasMarked, pView] (sal_Int32 nResult)->void
 {
-if (nResult == RET_OK)
+if ( RET_OK == nResult )
 {
 if ( bHasMarked )
 pView->SetAttributes( *pDlg->GetOutputItemSet() );
@@ -570,12 +572,11 @@ void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq )
 pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
 
 pView->InvalidateAttribs();
+xRequest->Done();
 }
 pDlg->disposeOnce();
 }
 );
-
-rReq.Done();
 }
 
 void ScDrawShell::ExecuteMeasureDlg( SfxRequest& rReq )
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx 
b/sc/source/ui/drawfunc/drtxtob.cxx
index a04f86a2f44d..b283e0546b6a 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -887,19 +887,35 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest  )
 case SID_DRAWTEXT_ATTR_DLG:
 {
 SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
-ScopedVclPtr 
pDlg(pFact->CreateTextTabDialog(mrViewData.GetDialogParent(), , 
pView));
-
-bDone = ( RET_OK == pDlg->Execute() );
-
-if ( bDone )
-aNewAttr.Put( *pDlg->GetOutputItemSet() );
-
-pDlg.disposeAndClear();
-
-SfxBindings& rBindings = mrViewData.GetBindings();
-rBindings.Invalidate( SID_TABLE_VERT_NONE );
-rBindings.Invalidate( SID_TABLE_VERT_CENTER );
-rBindings.Invalidate( SID_TABLE_VERT_BOTTOM );
+VclPtr 
pDlg(pFact->CreateTextTabDialog(mrViewData.GetDialogParent(), , 
pView));
+auto xRequest = std::make_shared(rReq);
+

core.git: chart2/source cui/source sc/source sd/source starmath/source sw/source

2024-01-22 Thread Noel Grandin (via logerrit)
 chart2/source/controller/main/ChartController_TextEdit.cxx |   77 +++--
 cui/source/factory/dlgfact.cxx |2 
 cui/source/factory/dlgfact.hxx |2 
 sc/source/ui/view/cellsh1.cxx  |9 +
 sc/source/ui/view/viewutil.cxx |9 +
 sd/source/ui/func/fubullet.cxx |9 +
 starmath/source/view.cxx   |9 +
 sw/source/ui/misc/insfnote.cxx |   51 
 sw/source/ui/misc/srtdlg.cxx   |   20 ++-
 sw/source/uibase/shells/annotsh.cxx|9 +
 sw/source/uibase/shells/drwtxtsh.cxx   |9 +
 sw/source/uibase/shells/textsh.cxx |9 +
 12 files changed, 135 insertions(+), 80 deletions(-)

New commits:
commit 6a5ef1a2b009f208745a251828bf8e8c51146bfe
Author: Noel Grandin 
AuthorDate: Mon Jan 22 12:35:50 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon Jan 22 19:48:14 2024 +0100

make charmap dialog async

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

diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx 
b/chart2/source/controller/main/ChartController_TextEdit.cxx
index f2d21779ba69..10d89fd92442 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -177,42 +177,49 @@ void 
ChartController::executeDispatch_InsertSpecialCharacter()
 vcl::Font aCurFont = 
m_pDrawViewWrapper->getOutliner()->GetRefDevice()->GetFont();
 aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), 
aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), 
SID_ATTR_CHAR_FONT ) );
 
-ScopedVclPtr 
pDlg(pFact->CreateCharMapDialog(GetChartFrame(), aSet, nullptr));
-if( pDlg->Execute() != RET_OK )
-return;
-
-const SfxItemSet* pSet = pDlg->GetOutputItemSet();
-OUString aString;
-if (pSet)
-if (const SfxStringItem* pCharMapItem = 
pSet->GetItemIfSet(SID_CHARMAP))
-aString = pCharMapItem->GetValue();
-
-OutlinerView* pOutlinerView = 
m_pDrawViewWrapper->GetTextEditOutlinerView();
-SdrOutliner*  pOutliner = m_pDrawViewWrapper->getOutliner();
-
-if(!pOutliner || !pOutlinerView)
-return;
-
-// insert string to outliner
-
-// prevent flicker
-pOutlinerView->HideCursor();
-pOutliner->SetUpdateLayout(false);
-
-// delete current selection by inserting empty String, so current
-// attributes become unique (sel. has to be erased anyway)
-pOutlinerView->InsertText(OUString());
-
-pOutlinerView->InsertText(aString, true);
-
-ESelection aSel = pOutlinerView->GetSelection();
-aSel.nStartPara = aSel.nEndPara;
-aSel.nStartPos = aSel.nEndPos;
-pOutlinerView->SetSelection(aSel);
+VclPtr pDlg(pFact->CreateCharMapDialog(GetChartFrame(), 
aSet, nullptr));
+pDlg->StartExecuteAsync(
+[this, pDlg] (sal_Int32 nResult)->void
+{
+if (nResult == RET_OK)
+{
+const SfxItemSet* pSet = pDlg->GetOutputItemSet();
+OUString aString;
+if (pSet)
+if (const SfxStringItem* pCharMapItem = 
pSet->GetItemIfSet(SID_CHARMAP))
+aString = pCharMapItem->GetValue();
+
+OutlinerView* pOutlinerView = 
m_pDrawViewWrapper->GetTextEditOutlinerView();
+SdrOutliner*  pOutliner = m_pDrawViewWrapper->getOutliner();
+
+if(pOutliner && pOutlinerView)
+{
+// insert string to outliner
+
+// prevent flicker
+pOutlinerView->HideCursor();
+pOutliner->SetUpdateLayout(false);
+
+// delete current selection by inserting empty String, so 
current
+// attributes become unique (sel. has to be erased anyway)
+pOutlinerView->InsertText(OUString());
+
+pOutlinerView->InsertText(aString, true);
+
+ESelection aSel = pOutlinerView->GetSelection();
+aSel.nStartPara = aSel.nEndPara;
+aSel.nStartPos = aSel.nEndPos;
+pOutlinerView->SetSelection(aSel);
+
+// show changes
+pOutliner->SetUpdateLayout(true);
+pOutlinerView->ShowCursor();
+}
+}
+pDlg->disposeOnce();
+}
+);
 
-// show changes
-pOutliner->SetUpdateLayout(true);
-pOutlinerView->ShowCursor();
 }
 
 rtl::Reference< ::chart::AccessibleTextHelper >
diff --git a/cui/source/factory/dlgfact.cxx 

core.git: chart2/source cui/source include/svx sc/source sd/source sw/source

2024-01-22 Thread Noel Grandin (via logerrit)
 chart2/source/controller/main/ShapeController.cxx  |   14 +++--
 cui/source/factory/dlgfact.cxx |   20 +++---
 cui/source/factory/dlgfact.hxx |   10 +++
 cui/source/options/optcolor.cxx|5 +--
 cui/source/options/tsaurls.cxx |6 +---
 cui/source/tabpages/tpbitmap.cxx   |4 +-
 cui/source/tabpages/tpcolor.cxx|2 -
 cui/source/tabpages/tpgradnt.cxx   |4 +-
 cui/source/tabpages/tphatch.cxx|4 +-
 cui/source/tabpages/tplnedef.cxx   |4 +-
 cui/source/tabpages/tplneend.cxx   |4 +-
 cui/source/tabpages/tppattern.cxx  |4 +-
 include/svx/svxdlg.hxx |   10 +++
 sc/source/ui/drawfunc/drawsh5.cxx  |   14 +++--
 sd/source/ui/docshell/docshel2.cxx |5 +--
 sd/source/ui/func/fulinend.cxx |2 -
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |   12 ++--
 sd/source/ui/view/drviews2.cxx |   15 +++---
 sd/source/ui/view/drviewsb.cxx |3 --
 sd/source/ui/view/drviewsc.cxx |3 --
 sd/source/ui/view/sdview2.cxx  |2 -
 sw/source/core/access/AccessibilityIssue.cxx   |   24 -
 sw/source/uibase/shells/drwbassh.cxx   |   15 +++---
 sw/source/uibase/shells/frmsh.cxx  |   13 ++---
 24 files changed, 78 insertions(+), 121 deletions(-)

New commits:
commit 27f15f1d50b1b67c940bf57e1581240011806159
Author: Noel Grandin 
AuthorDate: Mon Jan 22 09:45:16 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon Jan 22 14:51:12 2024 +0100

simplify the getters in AbstractSvx*Dialog

to look like getters elsewhere, which compose better

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

diff --git a/chart2/source/controller/main/ShapeController.cxx 
b/chart2/source/controller/main/ShapeController.cxx
index 115229de0e57..f977259ce77b 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -217,8 +217,7 @@ void ShapeController::describeSupportedFeatures()
 
 IMPL_LINK( ShapeController, CheckNameHdl, AbstractSvxObjectNameDialog&, 
rDialog, bool )
 {
-OUString aName;
-rDialog.GetName( aName );
+OUString aName = rDialog.GetName();
 
 if ( !aName.isEmpty() )
 {
@@ -408,12 +407,9 @@ void 
ShapeController::executeDispatch_ObjectTitleDescription()
 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);
+pSelectedObj->SetTitle( pDlg->GetTitle() );
+pSelectedObj->SetDescription( pDlg->GetDescription() );
+pSelectedObj->SetDecorative(pDlg->IsDecorative());
 }
 }
 
@@ -439,7 +435,7 @@ void ShapeController::executeDispatch_RenameObject()
 pDlg->SetCheckNameHdl( LINK( this, ShapeController, CheckNameHdl ) );
 if ( pDlg->Execute() == RET_OK )
 {
-pDlg->GetName(aName);
+aName = pDlg->GetName();
 if (pSelectedObj->GetName() != aName)
 {
 pSelectedObj->SetName( aName );
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index ffb5fd301069..ec4532f2058d 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -546,9 +546,9 @@ tools::Long AbstractFmInputRecordNoDialog_Impl::GetValue() 
const
 return m_xDlg->GetNewDictionary();
 }
 
-void AbstractSvxNameDialog_Impl::GetName(OUString& rName)
+OUString AbstractSvxNameDialog_Impl::GetName()
 {
-rName = m_xDlg->GetName();
+return m_xDlg->GetName();
 }
 
 void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const 
Link& rLink )
@@ -594,9 +594,9 @@ IMPL_LINK_NOARG(AbstractSvxNameDialog_Impl, 
CheckNameTooltipHdl, SvxNameDialog&,
 return aCheckNameTooltipHdl.Call(*this);
 }
 
-void AbstractSvxObjectNameDialog_Impl::GetName(OUString& rName)
+OUString AbstractSvxObjectNameDialog_Impl::GetName()
 {
-rName = m_xDlg->GetName();
+return m_xDlg->GetName();
 }
 
 void AbstractSvxObjectNameDialog_Impl::SetCheckNameHdl(const 
Link& rLink)
@@ -618,19 +618,19 @@ IMPL_LINK_NOARG(AbstractSvxObjectNameDialog_Impl, 
CheckNameHdl, SvxObjectNameDia
 return aCheckNameHdl.Call(*this);
 }
 
-void 

core.git: chart2/source

2024-01-22 Thread Noel Grandin (via logerrit)
 chart2/source/controller/main/ShapeController.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0ad94d52c022a0acb20be21b5a1dfcf445e12f0c
Author: Noel Grandin 
AuthorDate: Mon Jan 22 11:39:42 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon Jan 22 12:31:20 2024 +0100

fix bug in renaming chart objects

introduced by
commit c5bb73cae7c172ad0f02f8c67dd57b53337f1d78
Author: Kohei Yoshida 
Date:   Tue Jan 31 16:03:46 2012 -0500
Get the whole thing to build after the method sig change in
SdrObject.

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

diff --git a/chart2/source/controller/main/ShapeController.cxx 
b/chart2/source/controller/main/ShapeController.cxx
index 97715b07c295..115229de0e57 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -440,7 +440,7 @@ void ShapeController::executeDispatch_RenameObject()
 if ( pDlg->Execute() == RET_OK )
 {
 pDlg->GetName(aName);
-if (pSelectedObj->GetName() == aName)
+if (pSelectedObj->GetName() != aName)
 {
 pSelectedObj->SetName( aName );
 }


core.git: chart2/source drawinglayer/source include/basegfx include/drawinglayer include/tools svx/source

2024-01-16 Thread offtkp (via logerrit)
 chart2/source/model/main/PageBackground.cxx |   11 ---
 drawinglayer/source/geometry/viewinformation2d.cxx  |   13 -
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx |6 +-
 include/basegfx/color/bcolor.hxx|4 
 include/drawinglayer/geometry/viewinformation2d.hxx |4 
 include/tools/color.hxx |5 -
 svx/source/sdr/contact/objectcontactofpageview.cxx  |4 
 7 files changed, 41 insertions(+), 6 deletions(-)

New commits:
commit 925c05ee1a1259641a28fe43588f425aff06b95e
Author: offtkp 
AuthorDate: Wed Dec 13 03:39:14 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Tue Jan 16 14:19:56 2024 +0100

chart2: Make automatic area coloring for charts work for tiled rendering

Charts now get a temporary colored applied to the area property set if
their color was set to automatic, which is done by default in tiled
rendering mode.

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

diff --git a/chart2/source/model/main/PageBackground.cxx 
b/chart2/source/model/main/PageBackground.cxx
index c866bdbb3f4a..b4c21df55fb4 100644
--- a/chart2/source/model/main/PageBackground.cxx
+++ b/chart2/source/model/main/PageBackground.cxx
@@ -18,6 +18,7 @@
  */
 
 #include "PageBackground.hxx"
+#include 
 #include 
 #include 
 #include 
@@ -51,10 +52,14 @@ const ::chart::tPropertyValueMap& 
StaticPageBackgroundDefaults()
 
 // override other defaults
 Color aDocColor = COL_WHITE;
-if (SfxViewShell::Current()) {
-aDocColor = 
SfxViewShell::Current()->GetColorConfigColor(svtools::DOCCOLOR);
+if (comphelper::LibreOfficeKit::isActive()) {
+aDocColor = COL_AUTO;
 } else {
-SAL_WARN("chart2", "SfxViewShell::Current() returned nullptr");
+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 );
diff --git a/drawinglayer/source/geometry/viewinformation2d.cxx 
b/drawinglayer/source/geometry/viewinformation2d.cxx
index 67993d95544b..d238c9b893e0 100644
--- a/drawinglayer/source/geometry/viewinformation2d.cxx
+++ b/drawinglayer/source/geometry/viewinformation2d.cxx
@@ -87,6 +87,9 @@ protected:
 // the point in time
 double mfViewTime;
 
+// color to use for automatic color
+Color maAutoColor;
+
 // allow to reduce DisplayQuality (e.g. sw 3d fallback renderer for 
interactions)
 bool mbReducedDisplayQuality : 1;
 
@@ -106,6 +109,7 @@ public:
 , maDiscreteViewport()
 , mxVisualizedPage()
 , mfViewTime(0.0)
+, maAutoColor(COL_AUTO)
 , mbReducedDisplayQuality(false)
 , mbUseAntiAliasing(ViewInformation2D::getGlobalAntiAliasing())
 , mbPixelSnapHairline(mbUseAntiAliasing && bForwardPixelSnapHairline)
@@ -190,6 +194,9 @@ public:
 mxVisualizedPage = rNew;
 }
 
+Color getAutoColor() const { return maAutoColor; }
+void setAutoColor(Color aNew) { maAutoColor = aNew; }
+
 bool getReducedDisplayQuality() const { return mbReducedDisplayQuality; }
 void setReducedDisplayQuality(bool bNew) { mbReducedDisplayQuality = bNew; 
}
 
@@ -205,7 +212,7 @@ public:
 && maViewTransformation == rCandidate.maViewTransformation
 && maViewport == rCandidate.maViewport
 && mxVisualizedPage == rCandidate.mxVisualizedPage
-&& mfViewTime == rCandidate.mfViewTime
+&& mfViewTime == rCandidate.mfViewTime && maAutoColor == 
rCandidate.maAutoColor
 && mbReducedDisplayQuality == 
rCandidate.mbReducedDisplayQuality
 && mbUseAntiAliasing == rCandidate.mbUseAntiAliasing
 && mbPixelSnapHairline == rCandidate.mbPixelSnapHairline);
@@ -342,6 +349,10 @@ void ViewInformation2D::setUseAntiAliasing(bool bNew)
 mpViewInformation2D->setUseAntiAliasing(bNew);
 }
 
+Color ViewInformation2D::getAutoColor() const { return 
mpViewInformation2D->getAutoColor(); }
+
+void ViewInformation2D::setAutoColor(Color aNew) { 
mpViewInformation2D->setAutoColor(aNew); }
+
 bool ViewInformation2D::getPixelSnapHairline() const
 {
 return mpViewInformation2D->getPixelSnapHairline();
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx 

core.git: chart2/source dbaccess/source editeng/source extensions/source include/svl reportdesign/source sc/source sfx2/source svl/qa svl/source svx/source sw/source

2024-01-14 Thread Armin Le Grand (allotropia) (via logerrit)
 chart2/source/view/main/ChartItemPool.cxx  |   13 
 dbaccess/source/ui/dlg/dbadmin.cxx |  124 +++
 dbaccess/source/ui/misc/UITools.cxx|   12 
 editeng/source/editeng/editdoc.cxx |  116 +++
 extensions/source/propctrlr/fontdialog.cxx |   42 +-
 include/svl/itempool.hxx   |   48 +-
 include/svl/itemset.hxx|2 
 include/svl/poolitem.hxx   |   25 +
 reportdesign/source/ui/misc/UITools.cxx|  118 +++
 reportdesign/source/ui/report/ReportController.cxx |   64 +--
 sc/source/core/data/docpool.cxx|  180 +-
 sc/source/ui/app/msgpool.cxx   |   22 -
 sc/source/ui/condformat/condformatdlgitem.cxx  |1 
 sfx2/source/explorer/nochaos.cxx   |4 
 svl/qa/unit/items/stylepool.cxx|8 
 svl/source/items/itempool.cxx  |   36 --
 svl/source/items/itemset.cxx   |   41 --
 svl/source/items/poolitem.cxx  |1 
 svl/source/items/stylepool.cxx |4 
 svx/source/svdraw/svdattr.cxx  |   49 +-
 svx/source/xoutdev/xpool.cxx   |   89 ++---
 sw/source/core/attr/cellatr.cxx|1 
 sw/source/core/bastyp/init.cxx |  344 ++---
 sw/source/core/layout/atrfrm.cxx   |7 
 sw/source/core/para/paratr.cxx |2 
 sw/source/core/tox/tox.cxx |3 
 sw/source/core/txtnode/atrfld.cxx  |3 
 sw/source/core/txtnode/atrflyin.cxx|1 
 sw/source/core/txtnode/atrftn.cxx  |1 
 sw/source/core/txtnode/atrref.cxx  |2 
 sw/source/core/txtnode/attrcontentcontrol.cxx  |2 
 sw/source/core/txtnode/attrlinebreak.cxx   |1 
 sw/source/core/txtnode/fmtatr2.cxx |   17 -
 33 files changed, 700 insertions(+), 683 deletions(-)

New commits:
commit 845d92e1f30eef5745480604fb9f6e4c3e3b7284
Author: Armin Le Grand (allotropia) 
AuthorDate: Fri Jan 12 18:40:24 2024 +0100
Commit: Armin Le Grand 
CommitDate: Sun Jan 14 21:02:46 2024 +0100

ITEM: Move Shareable ItemFlag to SfxPolItem

Currently a Pool-Attribute (in SfxItemInfo), but should
be a SfxPoolItem property. Originally 'moved' from old
'poolable' used as hint. I identified needs more general
and moved it to where it belongs.

Also reworked SfxItemInfo to no longer have/support
single bollean flags, but a FlagVariable and defined
SFX_ITEMINFOFLAG_* entries to access these, that will
make future changes easier without having to change
all palces where these get defined over and over again.

Added CheckItemInfoFlag for gereral access to that flag
and e.g. NeedsSurrogateSupport to directly check for
the SFX_ITEMINFOFLAG_SUPPORT_SURROGATE flag as syntactical
sugar, that makes the intention clear.

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

diff --git a/chart2/source/view/main/ChartItemPool.cxx 
b/chart2/source/view/main/ChartItemPool.cxx
index 8f787cd4bd70..afecbf047107 100644
--- a/chart2/source/view/main/ChartItemPool.cxx
+++ b/chart2/source/view/main/ChartItemPool.cxx
@@ -190,16 +190,15 @@ ChartItemPool::ChartItemPool():
 const sal_uInt16 nMax = SCHATTR_END - SCHATTR_START + 1;
 for( sal_uInt16 i = 0; i < nMax; i++ )
 {
-// _nSID, _bNeedsPoolRegistration, _bShareable
-pItemInfos[i]._nSID = 0;
-pItemInfos[i]._bNeedsPoolRegistration = false;
-pItemInfos[i]._bShareable = true;
+// _nItemInfoSlotID, _nItemInfoFlags
+pItemInfos[i]._nItemInfoSlotID = 0;
+pItemInfos[i]._nItemInfoFlags = SFX_ITEMINFOFLAG_NONE;
 }
 
 // slot ids differing from which ids
-pItemInfos[SCHATTR_SYMBOL_BRUSH - SCHATTR_START]._nSID = SID_ATTR_BRUSH;
-pItemInfos[SCHATTR_STYLE_SYMBOL - SCHATTR_START]._nSID = 
SID_ATTR_SYMBOLTYPE;
-pItemInfos[SCHATTR_SYMBOL_SIZE - SCHATTR_START]._nSID  = 
SID_ATTR_SYMBOLSIZE;
+pItemInfos[SCHATTR_SYMBOL_BRUSH - SCHATTR_START]._nItemInfoSlotID = 
SID_ATTR_BRUSH;
+pItemInfos[SCHATTR_STYLE_SYMBOL - SCHATTR_START]._nItemInfoSlotID = 
SID_ATTR_SYMBOLTYPE;
+pItemInfos[SCHATTR_SYMBOL_SIZE - SCHATTR_START]._nItemInfoSlotID  = 
SID_ATTR_SYMBOLSIZE;
 
 SetDefaults(ppPoolDefaults);
 SetItemInfos(pItemInfos.get());
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx 
b/dbaccess/source/ui/dlg/dbadmin.cxx
index 372e72e258a7..8fe5d8a5bd27 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -340,68 +340,68 @@ void 
ODbAdminDialog::createItemSet(std::unique_ptr& _rpSet, rtl::Ref
  

core.git: chart2/source

2024-01-14 Thread Caolán McNamara (via logerrit)
 chart2/source/model/main/ChartModel.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 04777d49b17834a5edf0063e89b968afae457191
Author: Caolán McNamara 
AuthorDate: Sun Jan 14 16:32:33 2024 +
Commit: Caolán McNamara 
CommitDate: Sun Jan 14 20:55:35 2024 +0100

cid#1585558 Using a moved object

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

diff --git a/chart2/source/model/main/ChartModel.cxx 
b/chart2/source/model/main/ChartModel.cxx
index 6c4fe2dfa658..4b97963cc42a 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -169,7 +169,7 @@ ChartModel::ChartModel( const ChartModel & rOther )
 xListener = this;
 m_xTitle = xNewTitle;
 m_xDiagram = xNewDiagram;
-m_xPageBackground = std::move(xNewPageBackground);
+m_xPageBackground = xNewPageBackground;
 m_xChartTypeManager = std::move(xChartTypeManager);
 m_xXMLNamespaceMap = std::move(xXMLNamespaceMap);
 }


core.git: chart2/source connectivity/source framework/source include/oox oox/source sc/source ucb/source vcl/inc writerfilter/source xmlhelp/source

2024-01-13 Thread Caolán McNamara (via logerrit)
 chart2/source/model/main/ChartModel.cxx  |   21 ---
 chart2/source/model/main/Diagram.cxx |4 +-
 chart2/source/view/charttypes/CandleStickChart.cxx   |4 --
 connectivity/source/manager/mdrivermanager.cxx   |4 +-
 framework/source/services/frame.cxx  |   18 +++-
 include/oox/helper/refvector.hxx |6 ++--
 oox/source/ole/vbaproject.cxx|4 +-
 sc/source/core/data/column.cxx   |8 +++--
 sc/source/core/data/table3.cxx   |   12 +---
 ucb/source/core/ucbstore.cxx |2 -
 vcl/inc/jsdialog/jsdialogbuilder.hxx |6 ++--
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |5 ++-
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx  |8 ++---
 xmlhelp/source/cxxhelp/provider/databases.cxx|3 --
 14 files changed, 57 insertions(+), 48 deletions(-)

New commits:
commit 0cfb4aa2623b1606bbc66ef16256315778143227
Author: Caolán McNamara 
AuthorDate: Sat Jan 13 19:13:00 2024 +
Commit: Caolán McNamara 
CommitDate: Sat Jan 13 22:53:50 2024 +0100

cid#1546354 COPY_INSTEAD_OF_MOVE

and

cid#1546319 COPY_INSTEAD_OF_MOVE
cid#1546286 COPY_INSTEAD_OF_MOVE
cid#1546283 COPY_INSTEAD_OF_MOVE
cid#1546191 COPY_INSTEAD_OF_MOVE
cid#1545953 COPY_INSTEAD_OF_MOVE
cid#1545874 COPY_INSTEAD_OF_MOVE
cid#1545857 COPY_INSTEAD_OF_MOVE
cid#1545781 COPY_INSTEAD_OF_MOVE
cid#1545765 COPY_INSTEAD_OF_MOVE
cid#1545546 COPY_INSTEAD_OF_MOVE
cid#1545338 COPY_INSTEAD_OF_MOVE
cid#1545190 COPY_INSTEAD_OF_MOVE
cid#1545272 COPY_INSTEAD_OF_MOVE
cid#1545242 COPY_INSTEAD_OF_MOVE
cid#1545229 COPY_INSTEAD_OF_MOVE

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

diff --git a/chart2/source/model/main/ChartModel.cxx 
b/chart2/source/model/main/ChartModel.cxx
index 19fccff373e9..6c4fe2dfa658 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -159,17 +159,20 @@ ChartModel::ChartModel( const ChartModel & rOther )
 if (rOther.m_xDiagram.is())
 xNewDiagram = new ::chart::Diagram( *rOther.m_xDiagram );
 rtl::Reference< ::chart::PageBackground > xNewPageBackground = new 
PageBackground( *rOther.m_xPageBackground );
-rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager; // does 
not implement XCloneable
-rtl::Reference< ::chart::NameContainer > xXMLNamespaceMap = new 
NameContainer( *rOther.m_xXMLNamespaceMap );
 
 {
-MutexGuard aGuard( m_aModelMutex );
-xListener = this;
-m_xTitle = xNewTitle;
-m_xDiagram = xNewDiagram;
-m_xPageBackground = xNewPageBackground;
-m_xChartTypeManager = xChartTypeManager;
-m_xXMLNamespaceMap = xXMLNamespaceMap;
+rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager; // 
does not implement XCloneable
+rtl::Reference< ::chart::NameContainer > xXMLNamespaceMap = new 
NameContainer( *rOther.m_xXMLNamespaceMap );
+
+{
+MutexGuard aGuard( m_aModelMutex );
+xListener = this;
+m_xTitle = xNewTitle;
+m_xDiagram = xNewDiagram;
+m_xPageBackground = std::move(xNewPageBackground);
+m_xChartTypeManager = std::move(xChartTypeManager);
+m_xXMLNamespaceMap = std::move(xXMLNamespaceMap);
+}
 }
 
 ModifyListenerHelper::addListener( xNewTitle, xListener );
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index 99065d8910c5..2a4b63c73401 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -1098,11 +1098,11 @@ static bool lcl_moveSeriesOrCheckIfMoveIsAllowed(
 std::vector< rtl::Reference< 
DataSeries > > aOtherSeriesList = xOtherChartType->getDataSeries2();
 if( !aOtherSeriesList.empty() )
 {
-rtl::Reference< DataSeries > 
xExchangeSeries( aOtherSeriesList[0] );
+rtl::Reference 
xExchangeSeries(aOtherSeriesList[0]);
 aOtherSeriesList[0] = 
xGivenDataSeries;
 
xOtherChartType->setDataSeries(aOtherSeriesList);
 
-
aSeriesList[nOldSeriesIndex]=xExchangeSeries;
+aSeriesList[nOldSeriesIndex] = 
std::move(xExchangeSeries);
 

core.git: chart2/source

2024-01-11 Thread Kurt Nordback (via logerrit)
 chart2/source/view/charttypes/VSeriesPlotter.cxx   |   42 +
 chart2/source/view/inc/VSeriesPlotter.hxx  |2 +
 chart2/source/view/main/SeriesPlotterContainer.cxx |7 +++
 3 files changed, 51 insertions(+)

New commits:
commit ca3112f38ea67d3cff1c9784adcc30ffcb200a0a
Author: Kurt Nordback 
AuthorDate: Mon Jan 8 09:37:28 2024 -0700
Commit: Noel Grandin 
CommitDate: Fri Jan 12 07:55:02 2024 +0100

tdf#159043: combo chart render order isn't right

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

diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx 
b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index f9fa8fe0fea9..34a702d7b696 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -2307,6 +2307,48 @@ OUString VSeriesPlotter::getCategoryName( sal_Int32 
nPointIndex ) const
 return OUString();
 }
 
+namespace {
+// The following it to support rendering order for combo charts. A chart type
+// with a lower rendering order is rendered before (i.e., behind) a chart with 
a
+// higher rendering order. The rendering orders are based on rough guesses 
about
+// how much one chart (type) will obscure another chart (type). The intent is 
to
+// minimize obscuring of data, by putting charts that generally cover more
+// pixels (e.g., area charts) behind ones that generally cover fewer (e.g., 
line
+// charts).
+struct ROrderPair
+{
+ROrderPair(OUString n, sal_Int32 r) : chartName(n), renderOrder(r) {}
+
+OUString chartName;
+sal_Int32 renderOrder;
+};
+
+const ROrderPair pairList[] = {
+ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_AREA, 0),
+ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_BAR, 6),   // bar & column are 
same
+ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_COLUMN, 6),
+ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_LINE, 8),
+ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_SCATTER, 5),
+ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_PIE, 1),
+ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_NET, 3),
+ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET, 2),
+ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK, 7),
+ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE, 4)
+};
+} // unnamed
+
+sal_Int32 VSeriesPlotter::getRenderOrder() const
+{
+OUString aChartType = m_xChartTypeModel->getChartType();
+for (size_t n = 0; n < sizeof(pairList); ++n) {
+if (aChartType.equalsIgnoreAsciiCase(pairList[n].chartName)) {
+return pairList[n].renderOrder;
+}
+}
+SAL_WARN("chart2", "Unsupported chart type in getRenderOrder()");
+return 0;
+}
+
 std::vector VSeriesPlotter::getAllSeries() const
 {
 std::vector aAllSeries;
diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx 
b/chart2/source/view/inc/VSeriesPlotter.hxx
index eaf27495d0ed..45676830b538 100644
--- a/chart2/source/view/inc/VSeriesPlotter.hxx
+++ b/chart2/source/view/inc/VSeriesPlotter.hxx
@@ -275,6 +275,8 @@ public:
 OUString getLabelTextForValue(VDataSeries const & rDataSeries, sal_Int32 
nPointIndex,
   double fValue, bool bAsPercentage);
 
+sal_Int32 getRenderOrder() const;
+
 protected:
 
 VSeriesPlotter( rtl::Reference< ::chart::ChartType > xChartTypeModel
diff --git a/chart2/source/view/main/SeriesPlotterContainer.cxx 
b/chart2/source/view/main/SeriesPlotterContainer.cxx
index bcc5b0f482a3..67e4d75c0b9b 100644
--- a/chart2/source/view/main/SeriesPlotterContainer.cxx
+++ b/chart2/source/view/main/SeriesPlotterContainer.cxx
@@ -317,6 +317,13 @@ void 
SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChart
 }
 }
 
+auto order
+= [](const std::unique_ptr& a, const 
std::unique_ptr& b) {
+  return a->getRenderOrder() < b->getRenderOrder();
+  };
+
+std::stable_sort(m_aSeriesPlotterList.begin(), m_aSeriesPlotterList.end(), 
order);
+
 //transport seriesnames to the coordinatesystems if needed
 if (m_aSeriesPlotterList.empty())
 return;


core.git: chart2/source drawinglayer/source emfio/source filter/source oox/source sc/source sd/source sfx2/source sw/source toolkit/source vcl/source writerfilter/source

2024-01-08 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/main/UndoActions.cxx  |2 +-
 drawinglayer/source/processor2d/vclprocessor2d.cxx |2 +-
 drawinglayer/source/processor3d/defaultprocessor3d.cxx |2 +-
 emfio/source/reader/mtftools.cxx   |6 +++---
 filter/source/msfilter/msdffimp.cxx|2 +-
 oox/source/drawingml/diagram/layoutatomvisitors.cxx|4 ++--
 sc/source/core/data/tabprotection.cxx  |   16 +---
 sc/source/core/tool/addincol.cxx   |7 ++-
 sc/source/ui/docshell/externalrefmgr.cxx   |3 ++-
 sc/source/ui/view/dbfunc3.cxx  |3 +--
 sd/source/filter/grf/sdgrffilter.cxx   |5 ++---
 sd/source/ui/app/sdxfer.cxx|2 +-
 sfx2/source/doc/objstor.cxx|3 ++-
 sw/source/core/access/AccessibilityIssue.cxx   |4 ++--
 sw/source/core/text/pormulti.cxx   |2 +-
 sw/source/core/unocore/unochart.cxx|2 +-
 sw/source/core/unocore/unoparagraph.cxx|2 +-
 sw/source/core/unocore/unostyle.cxx|4 ++--
 sw/source/filter/ww8/docxattributeoutput.cxx   |4 ++--
 sw/source/filter/ww8/rtfattributeoutput.cxx|4 ++--
 sw/source/filter/ww8/ww8par.cxx|4 ++--
 sw/source/filter/ww8/ww8par2.cxx   |6 +++---
 sw/source/ui/fldui/fldedt.cxx  |2 +-
 toolkit/source/helper/unowrapper.cxx   |7 +++
 vcl/source/outdev/font.cxx |2 +-
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx|5 +++--
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx  |3 +--
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |2 +-
 28 files changed, 54 insertions(+), 56 deletions(-)

New commits:
commit 6342aa6c665012f51a5c11f0293d5d3ff3a573ee
Author: Caolán McNamara 
AuthorDate: Sun Jan 7 16:24:23 2024 +
Commit: Caolán McNamara 
CommitDate: Mon Jan 8 13:09:02 2024 +0100

cid#1545370 COPY_INSTEAD_OF_MOVE

and

cid#1545364 COPY_INSTEAD_OF_MOVE
cid#1545363 COPY_INSTEAD_OF_MOVE
cid#1545344 COPY_INSTEAD_OF_MOVE
cid#1545299 COPY_INSTEAD_OF_MOVE
cid#1545287 COPY_INSTEAD_OF_MOVE
cid#1545267 COPY_INSTEAD_OF_MOVE
cid#1545256 COPY_INSTEAD_OF_MOVE
cid#1545226 COPY_INSTEAD_OF_MOVE
cid#1545500 COPY_INSTEAD_OF_MOVE
cid#1545538 COPY_INSTEAD_OF_MOVE
cid#1545618 COPY_INSTEAD_OF_MOVE
cid#1545681 COPY_INSTEAD_OF_MOVE
cid#1545750 COPY_INSTEAD_OF_MOVE
cid#1545778 COPY_INSTEAD_OF_MOVE
cid#1545785 COPY_INSTEAD_OF_MOVE
cid#1545799 COPY_INSTEAD_OF_MOVE
cid#1545847 COPY_INSTEAD_OF_MOVE
cid#1545958 COPY_INSTEAD_OF_MOVE
cid#1545963 COPY_INSTEAD_OF_MOVE
cid#1545990 COPY_INSTEAD_OF_MOVE
cid#1546013 COPY_INSTEAD_OF_MOVE
cid#1546029 COPY_INSTEAD_OF_MOVE
cid#1546079 COPY_INSTEAD_OF_MOVE
cid#1546104 COPY_INSTEAD_OF_MOVE
cid#1546127 COPY_INSTEAD_OF_MOVE
cid#1546133 COPY_INSTEAD_OF_MOVE
cid#1546155 COPY_INSTEAD_OF_MOVE
cid#1546190 COPY_INSTEAD_OF_MOVE
cid#1546216 COPY_INSTEAD_OF_MOVE
cid#1546273 COPY_INSTEAD_OF_MOVE
cid#1546315 COPY_INSTEAD_OF_MOVE
cid#1546326 COPY_INSTEAD_OF_MOVE
cid#1546387 COPY_INSTEAD_OF_MOVE

accept some reasonable suggestions

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

diff --git a/chart2/source/controller/main/UndoActions.cxx 
b/chart2/source/controller/main/UndoActions.cxx
index cf2de5eb5a37..a3c899253295 100644
--- a/chart2/source/controller/main/UndoActions.cxx
+++ b/chart2/source/controller/main/UndoActions.cxx
@@ -65,7 +65,7 @@ void UndoElement::impl_toggleModelState()
 // apply the previous snapshot to our model
 m_pModelClone->applyToModel( m_xDocumentModel );
 // remember the new snapshot, for the next toggle
-m_pModelClone = pNewClone;
+m_pModelClone = std::move(pNewClone);
 }
 
 void SAL_CALL UndoElement::undo(  )
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 2c3521ace0dd..9049bec591b2 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -974,7 +974,7 @@ void VclProcessor2D::RenderTransparencePrimitive2D(
 process(rTransCandidate.getTransparence());
 
 // back to old color stack
-maBColorModifierStack = aLastBColorModifierStack;
+maBColorModifierStack = std::move(aLastBColorModifierStack);
 
 // back to old OutDev
 mpOutputDevice = pLastOutputDevice;
diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx 
b/drawinglayer/source/processor3d/defaultprocessor3d.cxx

core.git: chart2/source

2024-01-01 Thread Julien Nabet (via logerrit)
 chart2/source/view/main/VLegend.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 77585439438d9ccfd77534341178a948a575edee
Author: Julien Nabet 
AuthorDate: Sun Dec 31 12:08:04 2023 +0100
Commit: Julien Nabet 
CommitDate: Mon Jan 1 12:10:15 2024 +0100

Replace "size() == 0 with empty()" (chart2)

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

diff --git a/chart2/source/view/main/VLegend.cxx 
b/chart2/source/view/main/VLegend.cxx
index 8a4935e9b058..72c0165a69f5 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -449,7 +449,7 @@ awt::Size lcl_placeLegendEntries(
 else
 --nNewLen;
 }
-if (aTextShapes.size() == 0)
+if (aTextShapes.empty())
 {
 DrawModelWrapper::removeShape(rEntries[0].xSymbol);
 rEntries.pop_back();


core.git: chart2/source

2024-01-01 Thread Luv Sharma (via logerrit)
 chart2/source/tools/NameContainer.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a058fa6eb87dcc4a01dac14674e15ff3ba611ced
Author: Luv Sharma 
AuthorDate: Sun Dec 31 17:04:17 2023 +0530
Commit: Ilmari Lauhakangas 
CommitDate: Mon Jan 1 12:05:25 2024 +0100

tdf#158237 chart2: use c++20 contains() instead of find() and end()

Change-Id: I065f672de257e8a16a4cb9d41ff6334e5fea1823
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161492
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/chart2/source/tools/NameContainer.cxx 
b/chart2/source/tools/NameContainer.cxx
index 23e0a2821d1c..1cc79a8eaec0 100644
--- a/chart2/source/tools/NameContainer.cxx
+++ b/chart2/source/tools/NameContainer.cxx
@@ -65,7 +65,7 @@ Sequence< OUString > SAL_CALL 
NameContainer::getSupportedServiceNames()
 // XNameContainer
 void SAL_CALL NameContainer::insertByName( const OUString& rName, const Any& 
rElement )
 {
-if( m_aMap.find( rName ) != m_aMap.end() )
+if( m_aMap.contains( rName ))
 throw container::ElementExistException();
 m_aMap.emplace( rName, rElement );
 }


core.git: chart2/source

2023-12-21 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/main/ChartController_Properties.cxx |   20 ++-
 1 file changed, 11 insertions(+), 9 deletions(-)

New commits:
commit 8ed865ffc151c6778f122b4e83b46a28f26ebe5e
Author: Caolán McNamara 
AuthorDate: Thu Dec 21 12:44:46 2023 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 21 15:36:31 2023 +0100

crash when one user deletes a chart another has a property dialog open for

Insert a chart, user #1 select it, user #2 select it. User #1 double click
it, double click again the legend to get dialog to edit it. User #2 delete
chart, User #1 'ok'

 #0  0x7f5365797d59 in osl::Mutex::acquire (this=) at 
include/osl/mutex.hxx:63
 #1  osl::ClearableGuard::ClearableGuard (t=..., 
this=0x7ffc7ffcccf0) at include/osl/mutex.hxx:182
 #2  apphelper::LifeTimeGuard::LifeTimeGuard (rManager=..., 
this=0x7ffc7ffcccf0) at chart2/source/inc/LifeTime.hxx:175
 #3  chart::ChartModel::lockControllers (this=0x0) at 
chart2/source/model/main/ChartModel.cxx:415
 #4  0x7f53658375ab in 
chart::ControllerLockGuardUNO::ControllerLockGuardUNO 
(this=this@entry=0x7ffc7ffcce80, xModel=...)
 at chart2/source/tools/ControllerLockGuard.cxx:34
 #5  0x7f5364df5f34 in 
chart::ChartController::executeDlg_ObjectProperties_withoutUndoGuard 
(this=, rObjectCID=..., bSuccessOnUnchanged=)
 at chart2/source/controller/main/ChartController_Properties.cxx:797
 #6  0x7f5364df7a5e in 
chart::ChartController::executeDlg_ObjectProperties (this=0x7f535401f310, 
rSelectedObjectCID=...)
 at chart2/source/controller/main/ChartController_Properties.cxx:707
 #7  0x7f5364e0f497 in chart::ChartController::execute_MouseButtonUp 
(this=, rMEvt=...) at 
chart2/source/controller/main/ChartController_Window.cxx:924
 #8  0x7f53760d61dc in (anonymous namespace)::LOKPostAsyncEvent 
(pEv=0x55e2f1b93db0) at sfx2/source/view/lokhelper.cxx:893
 #9  0x7f53760d0977 in LokChartHelper::postMouseEvent (this=, nType=1, nX=, nY=, nCount=2, nButtons=1, 
nModifier=0, fScaleX=0.083329,
 fScaleY=0.083329) at 
sfx2/source/view/lokcharthelper.cxx:294

just hold a reference to the chart the dialog operates on

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

diff --git a/chart2/source/controller/main/ChartController_Properties.cxx 
b/chart2/source/controller/main/ChartController_Properties.cxx
index 9dccb435ebf0..84f1fdcb9e33 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -740,8 +740,10 @@ bool 
ChartController::executeDlg_ObjectProperties_withoutUndoGuard(
 
 ReferenceSizeProvider aRefSizeProv(impl_createReferenceSizeProvider());
 
+rtl::Reference<::chart::ChartModel> xChartDoc(getChartModel());
+
 std::unique_ptr pItemConverter(
-createItemConverter( rObjectCID, getChartModel(), m_xCC,
+createItemConverter( rObjectCID, xChartDoc, m_xCC,
  m_pDrawModelWrapper->getSdrModel(),
  m_xChartView.get(),
  ));
@@ -758,24 +760,24 @@ bool 
ChartController::executeDlg_ObjectProperties_withoutUndoGuard(
 
 //prepare dialog
 ObjectPropertiesDialogParameter aDialogParameter( rObjectCID );
-aDialogParameter.init( getChartModel() );
+aDialogParameter.init(xChartDoc);
 ViewElementListProvider aViewElementListProvider( 
m_pDrawModelWrapper.get() );
 
 SolarMutexGuard aGuard;
 SchAttribTabDlg aDlg(
 GetChartFrame(), , ,
 ,
-getChartModel() );
+xChartDoc );
 
 if(aDialogParameter.HasSymbolProperties())
 {
 uno::Reference< beans::XPropertySet > xObjectProperties =
-ObjectIdentifier::getObjectPropertySet( rObjectCID, 
getChartModel() );
-wrapper::DataPointItemConverter aSymbolItemConverter( 
getChartModel(), m_xCC
-, xObjectProperties, 
ObjectIdentifier::getDataSeriesForCID( rObjectCID, getChartModel() )
+ObjectIdentifier::getObjectPropertySet( rObjectCID, xChartDoc 
);
+wrapper::DataPointItemConverter aSymbolItemConverter( xChartDoc, 
m_xCC
+, xObjectProperties, 
ObjectIdentifier::getDataSeriesForCID( rObjectCID, xChartDoc )
 , 
m_pDrawModelWrapper->getSdrModel().GetItemPool()
 , m_pDrawModelWrapper->getSdrModel()
-, getChartModel()
+, xChartDoc
 , 

core.git: chart2/source

2023-12-17 Thread Noel Grandin (via logerrit)
 chart2/source/controller/inc/AxisItemConverter.hxx  |  
  5 -
 chart2/source/controller/inc/CharacterPropertyItemConverter.hxx |  
  2 
 chart2/source/controller/inc/DataPointItemConverter.hxx |  
  6 -
 chart2/source/controller/inc/LegendItemConverter.hxx|  
  6 -
 chart2/source/controller/inc/MultipleChartConverters.hxx|  
  5 -
 chart2/source/controller/inc/RegressionEquationItemConverter.hxx|  
  6 -
 chart2/source/controller/inc/TextLabelItemConverter.hxx |  
  5 -
 chart2/source/controller/inc/TitleItemConverter.hxx |  
  5 -
 chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx   |  
  2 
 chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx  |  
  2 
 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx  |  
  2 
 chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx |  
  2 
 chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx |  
  6 -
 chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx |  
  2 
 chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx  |  
  2 
 chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx  |  
  6 -
 chart2/source/controller/main/ChartController_Properties.cxx|  
 42 +-
 17 files changed, 55 insertions(+), 51 deletions(-)

New commits:
commit 40cec25c21f3ea5d7348d778c1ab5343fa7bb456
Author: Noel Grandin 
AuthorDate: Fri Dec 15 21:37:04 2023 +0200
Commit: Noel Grandin 
CommitDate: Sun Dec 17 10:33:52 2023 +0100

unique_ptr to optional in chart2

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

diff --git a/chart2/source/controller/inc/AxisItemConverter.hxx 
b/chart2/source/controller/inc/AxisItemConverter.hxx
index c9f3049356a0..c14ef82bd595 100644
--- a/chart2/source/controller/inc/AxisItemConverter.hxx
+++ b/chart2/source/controller/inc/AxisItemConverter.hxx
@@ -19,11 +19,12 @@
 #pragma once
 
 #include "ItemConverter.hxx"
+#include 
 #include 
 
+#include 
 #include 
 
-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; }
@@ -45,7 +46,7 @@ public:
 const rtl::Reference<::chart::ChartModel> & xChartDoc,
 ExplicitScaleData const * pScale,
 ExplicitIncrementData const * pIncrement,
-const css::awt::Size* pRefSize );
+const std::optional& pRefSize );
 
 virtual ~AxisItemConverter() override;
 
diff --git a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx 
b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
index a3d6ed6b26b3..65ff58ea45ab 100644
--- a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
+++ b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
@@ -35,7 +35,7 @@ public:
 CharacterPropertyItemConverter(
 const css::uno::Reference& rPropertySet,
 SfxItemPool& rItemPool,
-const css::awt::Size* pRefSize,
+const std::optional& pRefSize,
 OUString aRefSizePropertyName,
 const css::uno::Reference& rRefSizePropSet = 
css::uno::Reference() );
 
diff --git a/chart2/source/controller/inc/DataPointItemConverter.hxx 
b/chart2/source/controller/inc/DataPointItemConverter.hxx
index 3c6e276ff763..720cc0fef2e7 100644
--- a/chart2/source/controller/inc/DataPointItemConverter.hxx
+++ b/chart2/source/controller/inc/DataPointItemConverter.hxx
@@ -20,14 +20,14 @@
 
 #include "ItemConverter.hxx"
 #include "GraphicPropertyItemConverter.hxx"
+#include 
 #include 
 
 #include 
 #include 
-
+#include 
 #include 
 
-namespace com::sun::star::awt { struct Size; }
 namespace com::sun::star::chart2 { class XDataSeries; }
 namespace com::sun::star::frame { class XModel; }
 namespace com::sun::star::uno { class XComponentContext; }
@@ -49,7 +49,7 @@ public:
 SdrModel& rDrawModel,
 const css::uno::Reference& 
xNamedPropertyContainerFactory,
 GraphicObjectType eMapTo,
-const css::awt::Size* pRefSize = nullptr,
+const std::optional& pRefSize = std::nullopt,
 bool bDataSeries = false,
 bool bUseSpecialFillColor = false,
 sal_Int32 nSpecialFillColor = 0,
diff --git a/chart2/source/controller/inc/LegendItemConverter.hxx 
b/chart2/source/controller/inc/LegendItemConverter.hxx
index 3e9315acc20d..cbb657edf0d3 100644
--- a/chart2/source/controller/inc/LegendItemConverter.hxx
+++ b/chart2/source/controller/inc/LegendItemConverter.hxx
@@ -19,10 +19,10 @@
 #pragma once
 
 #include "ItemConverter.hxx"
-
+#include 
+#include 
 #include 
 

core.git: chart2/source

2023-12-16 Thread Noel Grandin (via logerrit)
 chart2/source/view/axes/VPolarAngleAxis.cxx|8 +-
 chart2/source/view/axes/VPolarAxis.cxx |3 
 chart2/source/view/axes/VPolarAxis.hxx |5 -
 chart2/source/view/axes/VPolarGrid.cxx |5 -
 chart2/source/view/axes/VPolarGrid.hxx |4 -
 chart2/source/view/charttypes/AreaChart.cxx|7 --
 chart2/source/view/charttypes/AreaChart.hxx|4 -
 chart2/source/view/charttypes/BarChart.cxx |   11 +--
 chart2/source/view/charttypes/BarChart.hxx |4 -
 chart2/source/view/charttypes/CandleStickChart.cxx |9 +-
 chart2/source/view/charttypes/CandleStickChart.hxx |4 -
 chart2/source/view/charttypes/PieChart.cxx |   71 -
 chart2/source/view/charttypes/PieChart.hxx |   17 -
 13 files changed, 72 insertions(+), 80 deletions(-)

New commits:
commit 676d24f06303b4576f527b5a933e5cbec284bb8f
Author: Noel Grandin 
AuthorDate: Fri Dec 15 20:47:16 2023 +0200
Commit: Noel Grandin 
CommitDate: Sun Dec 17 07:52:37 2023 +0100

unique_ptr to optional in chart2

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

diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx 
b/chart2/source/view/axes/VPolarAngleAxis.cxx
index 13f66cec9cbf..279f784c3006 100644
--- a/chart2/source/view/axes/VPolarAngleAxis.cxx
+++ b/chart2/source/view/axes/VPolarAngleAxis.cxx
@@ -113,7 +113,7 @@ void VPolarAngleAxis::createTextShapes_ForAngleAxis(
 double fLogicAngle = pTickInfo->getUnscaledTickValue();
 
 LabelAlignment eLabelAlignment(LABEL_ALIGN_CENTER);
-PolarLabelPositionHelper 
aPolarLabelPositionHelper(m_pPosHelper.get(), 2/*nDimensionCount*/, xTarget);
+PolarLabelPositionHelper aPolarLabelPositionHelper(_aPosHelper, 
2/*nDimensionCount*/, xTarget);
 sal_Int32 nScreenValueOffsetInRadiusDirection = 
m_aAxisLabelProperties.m_aMaximumSpaceForLabels.Height/15;
 awt::Point aAnchorScreenPosition2D( 
aPolarLabelPositionHelper.getLabelScreenPositionAndAlignmentForLogicValues(
 eLabelAlignment, fLogicAngle, fLogicRadius, fLogicZ, 
nScreenValueOffsetInRadiusDirection ));
@@ -156,7 +156,7 @@ void VPolarAngleAxis::createLabels()
 if( !prepareShapeCreation() )
 return;
 
-double fLogicRadius = m_pPosHelper->getOuterLogicRadius();
+double fLogicRadius = m_aPosHelper.getOuterLogicRadius();
 
 if( !m_aAxisProperties.m_bDisplayLabels )
 return;
@@ -185,12 +185,12 @@ void VPolarAngleAxis::createShapes()
 if( !prepareShapeCreation() )
 return;
 
-double fLogicRadius = m_pPosHelper->getOuterLogicRadius();
+double fLogicRadius = m_aPosHelper.getOuterLogicRadius();
 double const fLogicZ = 1.0;//as defined
 
 //create axis main lines
 drawing::PointSequenceSequence aPoints(1);
-VPolarGrid::createLinePointSequence_ForAngleAxis( aPoints, 
m_aAllTickInfos, m_aIncrement, m_aScale, m_pPosHelper.get(), fLogicRadius, 
fLogicZ );
+VPolarGrid::createLinePointSequence_ForAngleAxis( aPoints, 
m_aAllTickInfos, m_aIncrement, m_aScale, _aPosHelper, fLogicRadius, fLogicZ );
 rtl::Reference xShape = ShapeFactory::createLine2D(
 m_xGroupShape_Shapes, aPoints, 
_aAxisProperties.m_aLineProperties );
 //because of this name this line will be used for marking the axis
diff --git a/chart2/source/view/axes/VPolarAxis.cxx 
b/chart2/source/view/axes/VPolarAxis.cxx
index d9dfe08ec6f5..22297a561421 100644
--- a/chart2/source/view/axes/VPolarAxis.cxx
+++ b/chart2/source/view/axes/VPolarAxis.cxx
@@ -40,9 +40,8 @@ VPolarAxis::VPolarAxis( const AxisProperties& rAxisProperties
 , const uno::Reference< util::XNumberFormatsSupplier >& 
xNumberFormatsSupplier
 , sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount )
 : VAxisBase( nDimensionIndex, nDimensionCount, rAxisProperties, 
xNumberFormatsSupplier )
-, m_pPosHelper( new PolarPlottingPositionHelper() )
 {
-PlotterBase::m_pPosHelper = m_pPosHelper.get();
+PlotterBase::m_pPosHelper = _aPosHelper;
 }
 
 VPolarAxis::~VPolarAxis()
diff --git a/chart2/source/view/axes/VPolarAxis.hxx 
b/chart2/source/view/axes/VPolarAxis.hxx
index 42e22ae7dfe9..dc6233a71e02 100644
--- a/chart2/source/view/axes/VPolarAxis.hxx
+++ b/chart2/source/view/axes/VPolarAxis.hxx
@@ -19,13 +19,12 @@
 #pragma once
 
 #include "VAxisBase.hxx"
+#include 
 #include 
 
 namespace chart
 {
 
-class PolarPlottingPositionHelper;
-
 class VPolarAxis : public VAxisBase
 {
 public:
@@ -45,7 +44,7 @@ protected:
, sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount );
 
 protected: //member
-std::unique_ptr m_pPosHelper;
+PolarPlottingPositionHelper m_aPosHelper;
 std::vector< ExplicitIncrementData >   m_aIncrements;
 };
 
diff --git 

core.git: chart2/source

2023-12-16 Thread Noel Grandin (via logerrit)
 chart2/source/view/charttypes/Splines.cxx |   13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 73e5161baef01bf4355d3c0bc2831646192907f2
Author: Noel Grandin 
AuthorDate: Fri Dec 15 21:12:41 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Dec 16 12:11:08 2023 +0100

no need to allocate these on the heap

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

diff --git a/chart2/source/view/charttypes/Splines.cxx 
b/chart2/source/view/charttypes/Splines.cxx
index 2aac969291f2..0f089d1b7758 100644
--- a/chart2/source/view/charttypes/Splines.cxx
+++ b/chart2/source/view/charttypes/Splines.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -569,8 +570,8 @@ void SplineCalculater::CalculateCubicSplines(
 
 // generate a spline for each coordinate. It holds the complete
 // information to calculate each point of the curve
-std::unique_ptr aSplineX;
-std::unique_ptr aSplineY;
+std::optional aSplineX;
+std::optional aSplineY;
 // lcl_SplineCalculation* aSplineZ; the z-coordinates of all points in
 // a data series are equal. No spline calculation needed, but copy
 // coordinate to output
@@ -580,15 +581,15 @@ void SplineCalculater::CalculateCubicSplines(
 pOld[ 0 ].PositionZ == pOld[nMaxIndexPoints].PositionZ &&
 nMaxIndexPoints >=2 )
 {   // periodic spline
-aSplineX = 
std::make_unique(std::move(aInputX));
-aSplineY = 
std::make_unique(std::move(aInputY));
+aSplineX.emplace(std::move(aInputX));
+aSplineY.emplace(std::move(aInputY));
 }
 else // generate the kind "natural spline"
 {
 double fXDerivation = std::numeric_limits::infinity();
 double fYDerivation = std::numeric_limits::infinity();
-aSplineX = 
std::make_unique(std::move(aInputX), fXDerivation, 
fXDerivation);
-aSplineY = 
std::make_unique(std::move(aInputY), fYDerivation, 
fYDerivation);
+aSplineX.emplace(std::move(aInputX), fXDerivation, fXDerivation);
+aSplineY.emplace(std::move(aInputY), fYDerivation, fYDerivation);
 }
 
 // fill result polygon with calculated values


core.git: chart2/source

2023-12-16 Thread Noel Grandin (via logerrit)
 chart2/source/view/inc/VDataSeries.hxx  |4 ++--
 chart2/source/view/main/VDataSeries.cxx |   16 
 2 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 23f8c4786681c120022fb726f03ec248517136f4
Author: Noel Grandin 
AuthorDate: Fri Dec 15 20:42:04 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Dec 16 10:44:56 2023 +0100

unique_ptr to optional in chart2

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

diff --git a/chart2/source/view/inc/VDataSeries.hxx 
b/chart2/source/view/inc/VDataSeries.hxx
index 0ab4fffe0e93..65f7247bc197 100644
--- a/chart2/source/view/inc/VDataSeries.hxx
+++ b/chart2/source/view/inc/VDataSeries.hxx
@@ -246,8 +246,8 @@ private: //member
 
 mutable std::optional
   m_oLabel_AttributedPoint;
-mutable std::unique_ptr
m_apLabelPropNames_AttributedPoint;
-mutable std::unique_ptr 
m_apLabelPropValues_AttributedPoint;
+mutable std::optional  
m_oLabelPropNames_AttributedPoint;
+mutable std::optional   
m_oLabelPropValues_AttributedPoint;
 mutable std::optional
m_oSymbolProperties_AttributedPoint;
 mutable std::optional
m_oSymbolProperties_InvisibleSymbolForSelection;
 mutable sal_Int32 m_nCurrentAttributedPoint;
diff --git a/chart2/source/view/main/VDataSeries.cxx 
b/chart2/source/view/main/VDataSeries.cxx
index abfc7766d762..845e6d6ef0db 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -933,8 +933,8 @@ void VDataSeries::adaptPointCache( sal_Int32 nNewPointIndex 
) const
 if( m_nCurrentAttributedPoint != nNewPointIndex )
 {
 m_oLabel_AttributedPoint.reset();
-m_apLabelPropNames_AttributedPoint.reset();
-m_apLabelPropValues_AttributedPoint.reset();
+m_oLabelPropNames_AttributedPoint.reset();
+m_oLabelPropValues_AttributedPoint.reset();
 m_oSymbolProperties_AttributedPoint.reset();
 m_nCurrentAttributedPoint = nNewPointIndex;
 }
@@ -987,18 +987,18 @@ bool VDataSeries::getTextLabelMultiPropertyLists( 
sal_Int32 index
 if( isAttributedDataPoint( index ) )
 {
 adaptPointCache( index );
-if (!m_apLabelPropValues_AttributedPoint)
+if (!m_oLabelPropValues_AttributedPoint)
 {
 // Cache these properties for this point.
-m_apLabelPropNames_AttributedPoint.reset(new tNameSequence);
-m_apLabelPropValues_AttributedPoint.reset(new tAnySequence);
+m_oLabelPropNames_AttributedPoint.emplace();
+m_oLabelPropValues_AttributedPoint.emplace();
 xTextProp.set( getPropertiesOfPoint( index ));
 PropertyMapper::getTextLabelMultiPropertyLists(
-xTextProp, *m_apLabelPropNames_AttributedPoint, 
*m_apLabelPropValues_AttributedPoint);
+xTextProp, *m_oLabelPropNames_AttributedPoint, 
*m_oLabelPropValues_AttributedPoint);
 bDoDynamicFontResize = true;
 }
-pPropNames = m_apLabelPropNames_AttributedPoint.get();
-pPropValues = m_apLabelPropValues_AttributedPoint.get();
+pPropNames = &*m_oLabelPropNames_AttributedPoint;
+pPropValues = &*m_oLabelPropValues_AttributedPoint;
 }
 else
 {


core.git: chart2/source

2023-12-16 Thread Noel Grandin (via logerrit)
 chart2/source/controller/accessibility/AccessibleTextHelper.cxx |   16 
+-
 chart2/source/controller/inc/AccessibleTextHelper.hxx   |8 +
 2 files changed, 10 insertions(+), 14 deletions(-)

New commits:
commit bc640ec91106fa55886af84f48eb58b7fa8610b5
Author: Noel Grandin 
AuthorDate: Fri Dec 15 21:44:43 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Dec 16 10:44:35 2023 +0100

no need to allocate this on the heap

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

diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx 
b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
index ed98cd296706..6fc26b1c82ad 100644
--- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
+++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
@@ -65,7 +65,7 @@ void AccessibleTextHelper::initialize( const OUString& aCID,
 
 SolarMutexGuard aSolarGuard;
 
-m_pTextHelper.reset();
+m_oTextHelper.reset();
 
 VclPtr pWindow( VCLUnoHelper::GetWindow( xWindow ));
 if( pWindow )
@@ -76,32 +76,32 @@ void AccessibleTextHelper::initialize( const OUString& aCID,
 SdrObject * pTextObj = m_pDrawViewWrapper->getNamedSdrObject( aCID 
);
 if( pTextObj )
 {
-m_pTextHelper.reset( new 
::accessibility::AccessibleTextHelper(std::make_unique(*pTextObj,
 nullptr, *pView, *pWindow->GetOutDev())) );
-m_pTextHelper->SetEventSource( xEventSource );
+m_oTextHelper.emplace( 
std::make_unique(*pTextObj, nullptr, *pView, 
*pWindow->GetOutDev()) );
+m_oTextHelper->SetEventSource( xEventSource );
 }
 }
 }
 
-OSL_ENSURE( m_pTextHelper, "Couldn't create text helper" );
+OSL_ENSURE( m_oTextHelper, "Couldn't create text helper" );
 }
 
 //  XAccessibleContext 
 sal_Int64 SAL_CALL AccessibleTextHelper::getAccessibleChildCount()
 {
-if( m_pTextHelper )
+if( m_oTextHelper )
 {
 SolarMutexGuard aSolarGuard;
-return m_pTextHelper->GetChildCount();
+return m_oTextHelper->GetChildCount();
 }
 return 0;
 }
 
 Reference< XAccessible > SAL_CALL AccessibleTextHelper::getAccessibleChild( 
sal_Int64 i )
 {
-if( m_pTextHelper )
+if( m_oTextHelper )
 {
 SolarMutexGuard aSolarGuard;
-return m_pTextHelper->GetChild( i );
+return m_oTextHelper->GetChild( i );
 }
 return Reference< XAccessible >();
 }
diff --git a/chart2/source/controller/inc/AccessibleTextHelper.hxx 
b/chart2/source/controller/inc/AccessibleTextHelper.hxx
index 937af7da05cc..9002a81fb75c 100644
--- a/chart2/source/controller/inc/AccessibleTextHelper.hxx
+++ b/chart2/source/controller/inc/AccessibleTextHelper.hxx
@@ -20,14 +20,10 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 
-// forward declaration of helper class from svx
-namespace accessibility
-{
-class AccessibleTextHelper;
-}
 
 namespace chart
 {
@@ -78,7 +74,7 @@ public:
 virtual css::lang::Locale SAL_CALL getLocale() override;
 
 private:
-std::unique_ptr<::accessibility::AccessibleTextHelper> m_pTextHelper;
+std::optional<::accessibility::AccessibleTextHelper>   m_oTextHelper;
 DrawViewWrapper *  m_pDrawViewWrapper;
 };
 


core.git: chart2/source

2023-12-15 Thread Noel Grandin (via logerrit)
 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx |6 
+++---
 chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx |8 
+---
 chart2/source/tools/DataSeriesHelper.cxx   |2 +-
 3 files changed, 9 insertions(+), 7 deletions(-)

New commits:
commit df9499d520c3afccba969fb16e59a44273e57f59
Author: Noel Grandin 
AuthorDate: Fri Dec 15 18:21:26 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Dec 15 21:03:55 2023 +0100

use more getFastProperty in chart2

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

diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 8ac9b33cdb08..02542a91b832 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -599,9 +599,9 @@ bool DataPointItemConverter::ApplySpecialItem(
 {
 bool bNew = static_cast(rItemSet.Get(nWhichId)).GetValue();
 bool bOld = true;
-if( (m_xSeries->getPropertyValue("ShowCustomLeaderLines") >>= 
bOld) && bOld != bNew )
+if( 
(m_xSeries->getFastPropertyValue(PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES) >>= 
bOld) && bOld != bNew )
 {
-m_xSeries->setPropertyValue("ShowCustomLeaderLines", 
uno::Any(bNew));
+
m_xSeries->setFastPropertyValue(PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES, 
uno::Any(bNew));
 bChanged = true;
 }
 }
@@ -765,7 +765,7 @@ void DataPointItemConverter::FillSpecialItem(
 try
 {
 bool bValue = true;
-if( m_xSeries->getPropertyValue( "ShowCustomLeaderLines" ) >>= 
bValue )
+if( m_xSeries->getFastPropertyValue( 
PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES ) >>= bValue )
 rOutItemSet.Put(SfxBoolItem(nWhichId, bValue));
 }
 catch (const uno::Exception&)
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
index 4d2e6749f1fe..9bf0883d6c94 100644
--- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -54,6 +55,7 @@
 using namespace com::sun::star;
 using namespace com::sun::star::chart2;
 using com::sun::star::uno::Reference;
+using namespace ::chart::DataSeriesProperties;
 
 namespace chart::wrapper {
 
@@ -513,9 +515,9 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 
nWhichId, const SfxIte
 {
 bool bNew = static_cast(rItemSet.Get(nWhichId)).GetValue();
 bool bOld = true;
-if( (m_xSeries->getPropertyValue("ShowCustomLeaderLines") >>= 
bOld) && bOld != bNew )
+if( 
(m_xSeries->getFastPropertyValue(PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES) >>= 
bOld) && bOld != bNew )
 {
-m_xSeries->setPropertyValue("ShowCustomLeaderLines", 
uno::Any(bNew));
+
m_xSeries->setFastPropertyValue(PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES, 
uno::Any(bNew));
 bChanged = true;
 }
 }
@@ -669,7 +671,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 
nWhichId, SfxItemSet& r
 try
 {
 bool bValue = true;
-if( m_xSeries->getPropertyValue( "ShowCustomLeaderLines" ) >>= 
bValue )
+if( m_xSeries->getFastPropertyValue( 
PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES ) >>= bValue )
 rOutItemSet.Put(SfxBoolItem(nWhichId, bValue));
 }
 catch (const uno::Exception&)
diff --git a/chart2/source/tools/DataSeriesHelper.cxx 
b/chart2/source/tools/DataSeriesHelper.cxx
index de88c37ecc96..136191f66ade 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -318,7 +318,7 @@ sal_Int32 getAttachedAxisIndex( const rtl::Reference< 
DataSeries > & xSeries )
 {
 if( xSeries.is() )
 {
-xSeries->getPropertyValue( "AttachedAxisIndex" ) >>= nRet;
+xSeries->getFastPropertyValue( PROP_DATASERIES_ATTACHED_AXIS_INDEX 
) >>= nRet;
 }
 }
 catch( const uno::Exception & )


core.git: chart2/source connectivity/source cui/source drawinglayer/source extensions/source sc/inc sc/source sd/source svx/source sw/source writerfilter/source

2023-12-14 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx |   15 +
 connectivity/source/inc/dbase/dindexnode.hxx|   12 ++--
 cui/source/dialogs/AdditionsDialog.cxx  |3 -
 drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx|   26 
+-
 extensions/source/dbpilots/listcombowizard.cxx  |   11 ++--
 sc/inc/fstalgorithm.hxx |6 --
 sc/source/core/data/dptabsrc.cxx|3 -
 sd/source/ui/view/drviews2.cxx  |   20 ---
 svx/source/sdr/contact/viewobjectcontact.cxx|   11 ++--
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx|   14 ++---
 svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx|6 +-
 sw/source/uibase/shells/basesh.cxx  |6 --
 writerfilter/source/dmapper/DomainMapper.cxx|6 +-
 writerfilter/source/dmapper/DomainMapper.hxx|6 +-
 writerfilter/source/dmapper/FontTable.cxx   |6 +-
 writerfilter/source/dmapper/FontTable.hxx   |6 +-
 writerfilter/source/dmapper/GraphicImport.cxx   |   13 +
 writerfilter/source/dmapper/GraphicImport.hxx   |6 +-
 writerfilter/source/dmapper/LoggedResources.hxx |6 +-
 19 files changed, 85 insertions(+), 97 deletions(-)

New commits:
commit 7dd028c0e498ba86d96e0e99744fec6ddc21a91d
Author: Caolán McNamara 
AuthorDate: Wed Dec 13 16:41:40 2023 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 14 12:28:46 2023 +0100

cid#1545211 COPY_INSTEAD_OF_MOVE

and

cid#1545218 COPY_INSTEAD_OF_MOVE
cid#1545232 COPY_INSTEAD_OF_MOVE
cid#1545243 COPY_INSTEAD_OF_MOVE
cid#1545246 COPY_INSTEAD_OF_MOVE
cid#1545251 COPY_INSTEAD_OF_MOVE
cid#1545260 COPY_INSTEAD_OF_MOVE
cid#1545261 COPY_INSTEAD_OF_MOVE
cid#1545276 COPY_INSTEAD_OF_MOVE
cid#1545295 COPY_INSTEAD_OF_MOVE
cid#1545297 COPY_INSTEAD_OF_MOVE
cid#1545301 COPY_INSTEAD_OF_MOVE
cid#1545302 COPY_INSTEAD_OF_MOVE

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

diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx 
b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
index aab6f4992b09..ba286cc62623 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
@@ -64,16 +64,11 @@ void Chart2ModelContact::setDocumentModel( ChartModel* 
pChartModel )
 if( !pChartModel )
 return;
 
-uno::Reference< container::XNameContainer > xDashTable( 
pChartModel->createInstance("com.sun.star.drawing.DashTable"), uno::UNO_QUERY );
-uno::Reference< container::XNameContainer > xGradientTable( 
pChartModel->createInstance("com.sun.star.drawing.GradientTable"), 
uno::UNO_QUERY );
-uno::Reference< container::XNameContainer > xHatchTable( 
pChartModel->createInstance("com.sun.star.drawing.HatchTable"), uno::UNO_QUERY 
);
-uno::Reference< container::XNameContainer > xBitmapTable( 
pChartModel->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY 
);
-uno::Reference< container::XNameContainer > xTransparencyGradientTable( 
pChartModel->createInstance("com.sun.star.drawing.TransparencyGradientTable"), 
uno::UNO_QUERY );
-m_aTableMap["LineDashName"] = xDashTable;
-m_aTableMap["FillGradientName"] = xGradientTable;
-m_aTableMap["FillHatchName"] = xHatchTable;
-m_aTableMap["FillBitmapName"] = xBitmapTable;
-m_aTableMap["FillTransparenceGradientName"] = xTransparencyGradientTable;
+
m_aTableMap["LineDashName"].set(pChartModel->createInstance("com.sun.star.drawing.DashTable"),
 uno::UNO_QUERY);
+
m_aTableMap["FillGradientName"].set(pChartModel->createInstance("com.sun.star.drawing.GradientTable"),
 uno::UNO_QUERY);
+
m_aTableMap["FillHatchName"].set(pChartModel->createInstance("com.sun.star.drawing.HatchTable"),
 uno::UNO_QUERY);
+
m_aTableMap["FillBitmapName"].set(pChartModel->createInstance("com.sun.star.drawing.BitmapTable"),
 uno::UNO_QUERY);
+
m_aTableMap["FillTransparenceGradientName"].set(pChartModel->createInstance("com.sun.star.drawing.TransparencyGradientTable"),
 uno::UNO_QUERY);
 }
 
 void Chart2ModelContact::clear()
diff --git a/connectivity/source/inc/dbase/dindexnode.hxx 
b/connectivity/source/inc/dbase/dindexnode.hxx
index 85666f9e5290..8369a15dfab5 100644
--- a/connectivity/source/inc/dbase/dindexnode.hxx
+++ b/connectivity/source/inc/dbase/dindexnode.hxx
@@ -163,8 +163,8 @@ namespace connectivity::dbase
 const ODbaseIndex& GetIndex() const {return rIndex;}
 
 // Setting the child, via reference to 

core.git: chart2/source

2023-12-13 Thread Julien Nabet (via logerrit)
 chart2/source/controller/dialogs/ChartResourceGroups.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4eb875d95622fb4346d3f8b24327a1b84230eca1
Author: Julien Nabet 
AuthorDate: Wed Dec 13 21:23:30 2023 +0100
Commit: Julien Nabet 
CommitDate: Thu Dec 14 08:48:48 2023 +0100

tdf#158684: CHART XY Scatter Chart: line type "stepped" ignores parameters

Regression from 65752e649872edfd98915035b61aca510ae8f271
Date:   Fri Mar 24 10:52:13 2023 +0100
jsdialog: enable and make async chart line prop dialog

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

diff --git a/chart2/source/controller/dialogs/ChartResourceGroups.cxx 
b/chart2/source/controller/dialogs/ChartResourceGroups.cxx
index 3cf5996ed300..e1550d2766c7 100644
--- a/chart2/source/controller/dialogs/ChartResourceGroups.cxx
+++ b/chart2/source/controller/dialogs/ChartResourceGroups.cxx
@@ -328,7 +328,7 @@ IMPL_LINK_NOARG(SplineResourceGroup, 
SteppedDetailsDialogHdl, weld::Button&, voi
 weld::GenericDialogController::runAsync(
 xDlg, [this, xDlg, aOldParameter, iOldLineTypePos](sal_Int32 nResult) {
 m_xSteppedPropertiesDialog = nullptr;
-auto xNewDlg = getSplinePropertiesDialog();
+auto xNewDlg = getSteppedPropertiesDialog();
 
 if (nResult == RET_OK)
 {


[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 
 

[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 

[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 

[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< 

[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 = ();
 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< 

[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 != )
 {
-if(xChartController != )
-{
-bChanged = true;
+if (xChartController)
 xChartController->removeSelectionChangeListener(this);
-rNewChartController.addSelectionChangeListener(this);
-xChartController = 
-}
-}
-else if( xChartController.is() )
-{
+rNewChartController.addSelectionChangeListener(this);
+xChartController = 
 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

[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 

[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;
 

[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;


  1   2   3   4   5   6   7   8   9   10   >