chart2/source/controller/accessibility/AccessibleTextHelper.cxx | 3 chart2/source/controller/inc/AccessibleTextHelper.hxx | 8 - chart2/source/controller/main/ChartController_TextEdit.cxx | 1 chart2/source/view/axes/VAxisBase.cxx | 2 chart2/source/view/axes/VCoordinateSystem.cxx | 6 chart2/source/view/charttypes/AreaChart.cxx | 6 chart2/source/view/charttypes/BarChart.cxx | 6 chart2/source/view/charttypes/BubbleChart.cxx | 3 chart2/source/view/charttypes/CandleStickChart.cxx | 4 chart2/source/view/charttypes/NetChart.cxx | 4 chart2/source/view/charttypes/PieChart.cxx | 3 chart2/source/view/charttypes/VSeriesPlotter.cxx | 57 +++---- chart2/source/view/diagram/VDiagram.cxx | 6 chart2/source/view/inc/ShapeFactory.hxx | 9 - chart2/source/view/inc/VDataSeries.hxx | 4 chart2/source/view/inc/VLegendSymbolFactory.hxx | 4 chart2/source/view/inc/VSeriesPlotter.hxx | 8 - chart2/source/view/main/ChartView.cxx | 6 chart2/source/view/main/DataPointSymbolSupplier.cxx | 2 chart2/source/view/main/PlotterBase.cxx | 2 chart2/source/view/main/ShapeFactory.cxx | 73 +++++----- chart2/source/view/main/VButton.cxx | 7 chart2/source/view/main/VButton.hxx | 4 chart2/source/view/main/VLegend.cxx | 9 - chart2/source/view/main/VLegend.hxx | 5 chart2/source/view/main/VLegendSymbolFactory.cxx | 12 - include/svx/unoshape.hxx | 4 osx/soffice.xcodeproj/project.pbxproj | 10 + 28 files changed, 145 insertions(+), 123 deletions(-)
New commits: commit 57a58433e6a9fc7443cd3a2e7811bf508946cacf Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Wed Dec 29 14:14:41 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Dec 30 06:47:30 2021 +0100 use concrete types in chart2, SvxGroupShape and SvxShapePolyPolygon Change-Id: I2b86c39610f31260fe8fb5abdbb94e853ec31cec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127700 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/chart2/source/view/axes/VAxisBase.cxx b/chart2/source/view/axes/VAxisBase.cxx index 32a0458ea325..cfb73df05e82 100644 --- a/chart2/source/view/axes/VAxisBase.cxx +++ b/chart2/source/view/axes/VAxisBase.cxx @@ -187,7 +187,7 @@ bool VAxisBase::prepareShapeCreation() m_xGroupShape_Shapes = createGroupShape( m_xLogicTarget, m_nDimension==2 ? m_aCID : ""); if( m_aAxisProperties.m_bDisplayLabels ) - m_xTextTarget = m_pShapeFactory->createGroup2D( m_xFinalTarget, m_aCID ); + m_xTextTarget = ShapeFactory::createGroup2D( m_xFinalTarget, m_aCID ); return true; } diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx index f546af789ddd..98d819e56164 100644 --- a/chart2/source/view/axes/VCoordinateSystem.cxx +++ b/chart2/source/view/axes/VCoordinateSystem.cxx @@ -97,9 +97,9 @@ void VCoordinateSystem::initPlottingTargets( const Reference< drawing::XShapes if(nDimensionCount==2) { //create and add to target - m_xLogicTargetForGrids = pShapeFactory->createGroup2D( xLogicTarget ); - xLogicTargetForSeriesBehindAxis = pShapeFactory->createGroup2D( xLogicTarget ); - m_xLogicTargetForAxes = pShapeFactory->createGroup2D( xLogicTarget ); + m_xLogicTargetForGrids = ShapeFactory::createGroup2D( xLogicTarget ); + xLogicTargetForSeriesBehindAxis = ShapeFactory::createGroup2D( xLogicTarget ); + m_xLogicTargetForAxes = ShapeFactory::createGroup2D( xLogicTarget ); } else { diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx index 0d0105246b0a..63e7555b1402 100644 --- a/chart2/source/view/charttypes/AreaChart.cxx +++ b/chart2/source/view/charttypes/AreaChart.cxx @@ -509,7 +509,7 @@ bool AreaChart::impl_createArea( VDataSeries* pSeries } else //m_nDimension!=3 { - xShape = m_pShapeFactory->createArea2D( xSeriesGroupShape_Shapes + xShape = ShapeFactory::createArea2D( xSeriesGroupShape_Shapes , aPoly ); } setMappedProperties( xShape @@ -629,8 +629,8 @@ void AreaChart::createShapes() m_xErrorBarTarget = createGroupShape( m_xLogicTarget ); else m_xErrorBarTarget = m_xSeriesTarget; - m_xTextTarget = m_pShapeFactory->createGroup2D( m_xFinalTarget ); - m_xRegressionCurveEquationTarget = m_pShapeFactory->createGroup2D( m_xFinalTarget ); + m_xTextTarget = ShapeFactory::createGroup2D( m_xFinalTarget ); + m_xRegressionCurveEquationTarget = ShapeFactory::createGroup2D( m_xFinalTarget ); //check necessary here that different Y axis can not be stacked in the same group? ... hm? diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx index 359080667746..c092d34b691f 100644 --- a/chart2/source/view/charttypes/BarChart.cxx +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -467,10 +467,10 @@ void BarChart::createShapes() uno::Reference< drawing::XShapes > xRegressionCurveTarget( createGroupShape( m_xLogicTarget )); uno::Reference< drawing::XShapes > xTextTarget( - m_pShapeFactory->createGroup2D( m_xFinalTarget )); + ShapeFactory::createGroup2D( m_xFinalTarget )); uno::Reference< drawing::XShapes > xRegressionCurveEquationTarget( - m_pShapeFactory->createGroup2D( m_xFinalTarget )); + ShapeFactory::createGroup2D( m_xFinalTarget )); //check necessary here that different Y axis can not be stacked in the same group? ... hm? double fLogicZ = 1.0;//as defined @@ -853,7 +853,7 @@ void BarChart::createShapes() AddPointToPoly( aPoly, aLeftUpperPoint ); AddPointToPoly( aPoly, drawing::Position3D( fLogicX-fLogicBarWidth/2.0,fLowerYValue,fLogicZ) ); pPosHelper->transformScaledLogicToScene( aPoly ); - xShape = m_pShapeFactory->createArea2D( xSeriesGroupShape_Shapes, aPoly ); + xShape = ShapeFactory::createArea2D( xSeriesGroupShape_Shapes, aPoly ); setMappedProperties( xShape, xDataPointProperties, PropertyMapper::getPropertyNameMapForFilledSeriesProperties() ); } diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx index aa1431516c54..a763458419bb 100644 --- a/chart2/source/view/charttypes/BubbleChart.cxx +++ b/chart2/source/view/charttypes/BubbleChart.cxx @@ -171,8 +171,7 @@ void BubbleChart::createShapes() //(because the text group is created after the series group the texts are displayed on top) uno::Reference< drawing::XShapes > xSeriesTarget( createGroupShape( m_xLogicTarget )); - uno::Reference< drawing::XShapes > xTextTarget( - m_pShapeFactory->createGroup2D( m_xFinalTarget )); + rtl::Reference< SvxShapeGroup > xTextTarget = ShapeFactory::createGroup2D( m_xFinalTarget ); //update/create information for current group double fLogicZ = 1.0;//as defined diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx index 3294e3d04fd4..f7c8253ef1b3 100644 --- a/chart2/source/view/charttypes/CandleStickChart.cxx +++ b/chart2/source/view/charttypes/CandleStickChart.cxx @@ -94,8 +94,8 @@ void CandleStickChart::createShapes() uno::Reference< drawing::XShapes > xGainTarget( createGroupShape( m_xLogicTarget, ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DATA_STOCK_GAIN, u"" ))); - uno::Reference< drawing::XShapes > xTextTarget( - m_pShapeFactory->createGroup2D( m_xFinalTarget )); + rtl::Reference< SvxShapeGroup > xTextTarget = + ShapeFactory::createGroup2D( m_xFinalTarget ); //check necessary here that different Y axis can not be stacked in the same group? ... hm? diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx index 2db1dd5512ae..1f33285344e7 100644 --- a/chart2/source/view/charttypes/NetChart.cxx +++ b/chart2/source/view/charttypes/NetChart.cxx @@ -223,7 +223,7 @@ bool NetChart::impl_createArea( VDataSeries* pSeries //create area: uno::Reference< drawing::XShape > - xShape = m_pShapeFactory->createArea2D( xSeriesGroupShape_Shapes + xShape = ShapeFactory::createArea2D( xSeriesGroupShape_Shapes , aPoly ); setMappedProperties( xShape , pSeries->getPropertiesOfSeries() @@ -334,7 +334,7 @@ void NetChart::createShapes() //therefore create an own group for the texts and the error bars to move them to front //(because the text group is created after the series group the texts are displayed on top) m_xSeriesTarget = createGroupShape( m_xLogicTarget ); - m_xTextTarget = m_pShapeFactory->createGroup2D( m_xFinalTarget ); + m_xTextTarget = ShapeFactory::createGroup2D( m_xFinalTarget ); //check necessary here that different Y axis can not be stacked in the same group? ... hm? diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx index 331b5e4da107..e0a7b344f498 100644 --- a/chart2/source/view/charttypes/PieChart.cxx +++ b/chart2/source/view/charttypes/PieChart.cxx @@ -674,8 +674,7 @@ void PieChart::createShapes() ///displayed on top) uno::Reference< drawing::XShapes > xSeriesTarget( createGroupShape( m_xLogicTarget )); - uno::Reference< drawing::XShapes > xTextTarget( - m_pShapeFactory->createGroup2D( m_xFinalTarget )); + rtl::Reference<SvxShapeGroup> xTextTarget = ShapeFactory::createGroup2D( m_xFinalTarget ); //check necessary here that different Y axis can not be stacked in the same group? ... hm? ///pay attention that the `m_bSwapXAndY` parameter used by the polar diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 7084fce1c4a3..d49127e44cd5 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -316,19 +316,16 @@ uno::Reference< drawing::XShapes > VSeriesPlotter::getSeriesGroupShapeBackChild( return xShapes; } -uno::Reference< drawing::XShapes > VSeriesPlotter::getLabelsGroupShape( VDataSeries& rDataSeries +rtl::Reference<SvxShapeGroup> VSeriesPlotter::getLabelsGroupShape( VDataSeries& rDataSeries , const uno::Reference< drawing::XShapes >& xTextTarget ) { //xTextTarget needs to be a 2D shape container always! - - uno::Reference< drawing::XShapes > xShapes( rDataSeries.m_xLabelsGroupShape ); - if(!xShapes.is()) + if(!rDataSeries.m_xLabelsGroupShape) { //create a 2D group shape for texts of this series and add to text target: - xShapes = m_pShapeFactory->createGroup2D( xTextTarget, rDataSeries.getLabelsCID() ); - rDataSeries.m_xLabelsGroupShape = xShapes; + rDataSeries.m_xLabelsGroupShape = ShapeFactory::createGroup2D( xTextTarget, rDataSeries.getLabelsCID() ); } - return xShapes; + return rDataSeries.m_xLabelsGroupShape; } uno::Reference< drawing::XShapes > VSeriesPlotter::getErrorBarsGroupShape( VDataSeries& rDataSeries @@ -428,8 +425,8 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re else if(eAlignment==LABEL_ALIGN_BOTTOM) aScreenPosition2D.Y += nOffset; - uno::Reference< drawing::XShapes > xTarget_ = - m_pShapeFactory->createGroup2D( + rtl::Reference<SvxShapeGroup> xTarget_ = + ShapeFactory::createGroup2D( getLabelsGroupShape(rDataSeries, xTarget), ObjectIdentifier::createPointCID( rDataSeries.getLabelCID_Stub(), nPointIndex)); @@ -456,7 +453,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re // the font height is used for computing the size of an optional legend // symbol to be prepended to the text label. - Reference< drawing::XShape > xSymbol; + rtl::Reference< SvxShapeGroup > xSymbol; if(pLabel->ShowLegendSymbol) { sal_Int32 nSymbolHeight = static_cast< sal_Int32 >( fViewFontSize * 0.6 ); @@ -469,9 +466,9 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re awt::Size aMaxSymbolExtent( nSymbolWidth, nSymbolHeight ); if( rDataSeries.isVaryColorsByPoint() ) - xSymbol.set( VSeriesPlotter::createLegendSymbolForPoint( aMaxSymbolExtent, rDataSeries, nPointIndex, xTarget_, m_xShapeFactory ) ); + xSymbol = VSeriesPlotter::createLegendSymbolForPoint( aMaxSymbolExtent, rDataSeries, nPointIndex, xTarget_, m_xShapeFactory ); else - xSymbol.set( VSeriesPlotter::createLegendSymbolForSeries( aMaxSymbolExtent, rDataSeries, xTarget_, m_xShapeFactory ) ); + xSymbol = VSeriesPlotter::createLegendSymbolForSeries( aMaxSymbolExtent, rDataSeries, xTarget_, m_xShapeFactory ); } //prepare text @@ -2576,7 +2573,7 @@ uno::Any VSeriesPlotter::getExplicitSymbol( const VDataSeries& /*rSeries*/, sal_ return uno::Any(); } -Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForSeries( +rtl::Reference<SvxShapeGroup> VSeriesPlotter::createLegendSymbolForSeries( const awt::Size& rEntryKeyAspectRatio , const VDataSeries& rSeries , const Reference< drawing::XShapes >& xTarget @@ -2599,14 +2596,14 @@ Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForSeries( default: break; } - Reference< drawing::XShape > xShape( VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio, + rtl::Reference<SvxShapeGroup> xShape = VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio, xTarget, eLegendSymbolStyle, xShapeFactory - , rSeries.getPropertiesOfSeries(), ePropType, aExplicitSymbol )); + , rSeries.getPropertiesOfSeries(), ePropType, aExplicitSymbol ); return xShape; } -Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForPoint( +rtl::Reference< SvxShapeGroup > VSeriesPlotter::createLegendSymbolForPoint( const awt::Size& rEntryKeyAspectRatio , const VDataSeries& rSeries , sal_Int32 nPointIndex @@ -2655,8 +2652,8 @@ Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForPoint( } } - Reference< drawing::XShape > xShape( VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio, - xTarget, eLegendSymbolStyle, xShapeFactory, xPointSet, ePropType, aExplicitSymbol )); + rtl::Reference< SvxShapeGroup > xShape = VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio, + xTarget, eLegendSymbolStyle, xShapeFactory, xPointSet, ePropType, aExplicitSymbol ); return xShape; } @@ -2723,11 +2720,11 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( continue; // symbol - uno::Reference< drawing::XShapes > xSymbolGroup( ShapeFactory::getOrCreateShapeFactory(xShapeFactory)->createGroup2D( xTarget )); + uno::Reference< drawing::XShapes > xSymbolGroup(ShapeFactory::createGroup2D( xTarget )); // create the symbol - Reference< drawing::XShape > xShape( createLegendSymbolForPoint( rEntryKeyAspectRatio, - rSeries, nIdx, xSymbolGroup, xShapeFactory ) ); + rtl::Reference< SvxShapeGroup > xShape = createLegendSymbolForPoint( rEntryKeyAspectRatio, + rSeries, nIdx, xSymbolGroup, xShapeFactory ); // set CID to symbol for selection if( xShape.is() ) @@ -2737,7 +2734,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_DATA_POINT, nIdx ) ); aChildParticle = ObjectIdentifier::addChildParticle( aChildParticle, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) ); OUString aCID = ObjectIdentifier::createClassifiedIdentifierForParticles( rSeries.getSeriesParticle(), aChildParticle ); - ShapeFactory::setShapeName( xShape, aCID ); + ShapeFactory::setShapeName( *xShape, aCID ); } // label @@ -2752,11 +2749,11 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( else { // symbol - uno::Reference< drawing::XShapes > xSymbolGroup( ShapeFactory::getOrCreateShapeFactory(xShapeFactory)->createGroup2D( xTarget )); + uno::Reference< drawing::XShapes > xSymbolGroup(ShapeFactory::createGroup2D( xTarget )); // create the symbol - Reference< drawing::XShape > xShape( createLegendSymbolForSeries( - rEntryKeyAspectRatio, rSeries, xSymbolGroup, xShapeFactory ) ); + rtl::Reference<SvxShapeGroup> xShape = createLegendSymbolForSeries( + rEntryKeyAspectRatio, rSeries, xSymbolGroup, xShapeFactory ); // set CID to symbol for selection if( xShape.is()) @@ -2765,7 +2762,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) ); OUString aCID = ObjectIdentifier::createClassifiedIdentifierForParticles( rSeries.getSeriesParticle(), aChildParticle ); - ShapeFactory::setShapeName( xShape, aCID ); + ShapeFactory::setShapeName( *xShape, aCID ); } // label @@ -2795,13 +2792,13 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( aEntry.aLabel = FormattedStringHelper::createFormattedStringSequence( xContext, aResStr, xTextProperties ); // symbol - uno::Reference< drawing::XShapes > xSymbolGroup( ShapeFactory::getOrCreateShapeFactory(xShapeFactory)->createGroup2D( xTarget )); + uno::Reference< drawing::XShapes > xSymbolGroup(ShapeFactory::createGroup2D( xTarget )); // create the symbol - Reference< drawing::XShape > xShape( VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio, + rtl::Reference<SvxShapeGroup> xShape = VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio, xSymbolGroup, LegendSymbolStyle::Line, xShapeFactory, Reference< beans::XPropertySet >( aCurves[i], uno::UNO_QUERY ), - VLegendSymbolFactory::PropertyType::Line, uno::Any() )); + VLegendSymbolFactory::PropertyType::Line, uno::Any() ); // set CID to symbol for selection if( xShape.is()) @@ -2813,7 +2810,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( eObjectType, i ) ); aChildParticle = ObjectIdentifier::addChildParticle( aChildParticle, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) ); OUString aCID = ObjectIdentifier::createClassifiedIdentifierForParticles( rSeries.getSeriesParticle(), aChildParticle ); - ShapeFactory::setShapeName( xShape, aCID ); + ShapeFactory::setShapeName( *xShape, aCID ); } aResult.push_back(aEntry); diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx index d9b2eddd7cc0..91fa4b936080 100644 --- a/chart2/source/view/diagram/VDiagram.cxx +++ b/chart2/source/view/diagram/VDiagram.cxx @@ -142,14 +142,14 @@ void VDiagram::createShapes_2d() return; //create group shape - uno::Reference< drawing::XShapes > xOuterGroup_Shapes = m_pShapeFactory->createGroup2D(m_xTarget); + uno::Reference< drawing::XShapes > xOuterGroup_Shapes = ShapeFactory::createGroup2D(m_xTarget); m_xOuterGroupShape.set( xOuterGroup_Shapes, uno::UNO_QUERY ); - uno::Reference< drawing::XShapes > xGroupForWall( m_pShapeFactory->createGroup2D(xOuterGroup_Shapes,"PlotAreaExcludingAxes") ); + uno::Reference< drawing::XShapes > xGroupForWall( ShapeFactory::createGroup2D(xOuterGroup_Shapes,"PlotAreaExcludingAxes") ); //create independent group shape as container for datapoints and such things { - uno::Reference< drawing::XShapes > xShapes = m_pShapeFactory->createGroup2D(xOuterGroup_Shapes,"testonly;CooContainer=XXX_CID"); + uno::Reference< drawing::XShapes > xShapes = ShapeFactory::createGroup2D(xOuterGroup_Shapes,"testonly;CooContainer=XXX_CID"); m_xCoordinateRegionShape.set( xShapes, uno::UNO_QUERY ); } diff --git a/chart2/source/view/inc/ShapeFactory.hxx b/chart2/source/view/inc/ShapeFactory.hxx index f2699e5372f1..8f3072cb1313 100644 --- a/chart2/source/view/inc/ShapeFactory.hxx +++ b/chart2/source/view/inc/ShapeFactory.hxx @@ -24,7 +24,9 @@ #include <com/sun/star/awt/Point.hpp> #include <com/sun/star/drawing/PointSequenceSequence.hpp> +#include <rtl/ref.hxx> #include <rtl/ustring.hxx> +#include <svx/unoshape.hxx> namespace chart { struct VLineProperties; } namespace com::sun::star::beans { class XPropertySet; } @@ -39,7 +41,6 @@ namespace com::sun::star::graphic { class XGraphic; } namespace com::sun::star::lang { class XMultiServiceFactory; } namespace com::sun::star::drawing { struct Direction3D; } - namespace chart { class Stripe; @@ -78,7 +79,8 @@ public: static ShapeFactory* getOrCreateShapeFactory(const css::uno::Reference< css::lang::XMultiServiceFactory>& xFactory); ShapeFactory() = delete; - css::uno::Reference< css::drawing::XShapes > + + static rtl::Reference< SvxShapeGroup > createGroup2D( const css::uno::Reference< css::drawing::XShapes >& xTarget , const OUString& aName = OUString() ); @@ -147,7 +149,7 @@ public: , const css::drawing::PolyPolygonShape3D& rPolyPolygon , double fDepth); - css::uno::Reference< css::drawing::XShape > + static rtl::Reference<SvxShapePolyPolygon> createArea2D( const css::uno::Reference< css::drawing::XShapes >& xTarget , const css::drawing::PolyPolygonShape3D& rPolyPolygon); @@ -244,6 +246,7 @@ public: static void setShapeName( const css::uno::Reference< css::drawing::XShape >& xShape , const OUString& rName ); + static void setShapeName( SvxShape& rShape, const OUString& rName ); static OUString getShapeName( const css::uno::Reference< css::drawing::XShape >& xShape ); diff --git a/chart2/source/view/inc/VDataSeries.hxx b/chart2/source/view/inc/VDataSeries.hxx index cc6943f2d51a..b8922c4d47f9 100644 --- a/chart2/source/view/inc/VDataSeries.hxx +++ b/chart2/source/view/inc/VDataSeries.hxx @@ -24,6 +24,8 @@ #include <com/sun/star/drawing/PolyPolygonShape3D.hpp> #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/awt/Point.hpp> +#include <rtl/ref.hxx> +#include <svx/unoshape.hxx> #include <memory> #include <map> @@ -181,7 +183,7 @@ private: //methods public: //member css::uno::Reference<css::drawing::XShapes> m_xGroupShape; - css::uno::Reference<css::drawing::XShapes> m_xLabelsGroupShape; + rtl::Reference<SvxShapeGroup> m_xLabelsGroupShape; css::uno::Reference<css::drawing::XShapes> m_xErrorXBarsGroupShape; css::uno::Reference<css::drawing::XShapes> m_xErrorYBarsGroupShape; diff --git a/chart2/source/view/inc/VLegendSymbolFactory.hxx b/chart2/source/view/inc/VLegendSymbolFactory.hxx index d7e34035ece6..d9189575ee24 100644 --- a/chart2/source/view/inc/VLegendSymbolFactory.hxx +++ b/chart2/source/view/inc/VLegendSymbolFactory.hxx @@ -20,6 +20,8 @@ #include "LegendEntryProvider.hxx" #include <com/sun/star/uno/Reference.h> +#include <rtl/ref.hxx> +#include <svx/unoshape.hxx> namespace com::sun::star::awt { struct Size; } namespace com::sun::star::beans { class XPropertySet; } @@ -37,7 +39,7 @@ namespace chart::VLegendSymbolFactory Line, }; - css::uno::Reference< css::drawing::XShape > + rtl::Reference< SvxShapeGroup > createSymbol( const css::awt::Size& rEntryKeyAspectRatio, const css::uno::Reference< css::drawing::XShapes >& rSymbolContainer, diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx index a824ff14c77b..2033942a3eb2 100644 --- a/chart2/source/view/inc/VSeriesPlotter.hxx +++ b/chart2/source/view/inc/VSeriesPlotter.hxx @@ -26,6 +26,8 @@ #include "LegendEntryProvider.hxx" #include <basegfx/range/b2irectangle.hxx> #include <com/sun/star/drawing/Direction3D.hpp> +#include <rtl/ref.hxx> +#include <svx/unoshape.hxx> namespace com::sun::star::awt { struct Point; } namespace com::sun::star::chart2 { class XChartType; } @@ -195,13 +197,13 @@ public: virtual css::uno::Any getExplicitSymbol( const VDataSeries& rSeries, sal_Int32 nPointIndex/*-1 for series symbol*/ ); - css::uno::Reference< css::drawing::XShape > createLegendSymbolForSeries( + rtl::Reference<SvxShapeGroup> createLegendSymbolForSeries( const css::awt::Size& rEntryKeyAspectRatio , const VDataSeries& rSeries , const css::uno::Reference< css::drawing::XShapes >& xTarget , const css::uno::Reference< css::lang::XMultiServiceFactory >& xShapeFactory ); - css::uno::Reference< css::drawing::XShape > createLegendSymbolForPoint( + rtl::Reference< SvxShapeGroup > createLegendSymbolForPoint( const css::awt::Size& rEntryKeyAspectRatio , const VDataSeries& rSeries , sal_Int32 nPointIndex @@ -278,7 +280,7 @@ protected: /// This method creates a 2D group shape for containing all text shapes /// needed for this series; the group is added to the text target; - css::uno::Reference< css::drawing::XShapes > + static rtl::Reference<SvxShapeGroup> getLabelsGroupShape( VDataSeries& rDataSeries , const css:: uno::Reference< css::drawing::XShapes >& xTarget ); diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index bc76dcf585ca..8b602c64f78e 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1456,7 +1456,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D } uno::Reference< drawing::XShapes > xTextTargetShapes = - ShapeFactory::getOrCreateShapeFactory(m_xShapeFactory)->createGroup2D(rParam.mxDiagramWithAxesShapes); + ShapeFactory::createGroup2D(rParam.mxDiagramWithAxesShapes); // - create axis and grids for all coordinate systems @@ -2908,7 +2908,7 @@ void ChartView::createShapes2D( const awt::Size& rPageSize ) OUString aDiagramCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::number( 0 ) ) );//todo: other index if more than one diagram is possible uno::Reference< drawing::XShapes > xDiagramPlusAxesPlusMarkHandlesGroup_Shapes( - pShapeFactory->createGroup2D(mxRootShape,aDiagramCID) ); + ShapeFactory::createGroup2D(mxRootShape,aDiagramCID) ); aParam.mxMarkHandles = pShapeFactory->createInvisibleRectangle( xDiagramPlusAxesPlusMarkHandlesGroup_Shapes, awt::Size(0,0)); @@ -2918,7 +2918,7 @@ void ChartView::createShapes2D( const awt::Size& rPageSize ) xDiagramPlusAxesPlusMarkHandlesGroup_Shapes, awt::Size(0, 0)); ShapeFactory::setShapeName(aParam.mxPlotAreaWithAxes, "PlotAreaIncludingAxes"); - aParam.mxDiagramWithAxesShapes = pShapeFactory->createGroup2D(xDiagramPlusAxesPlusMarkHandlesGroup_Shapes); + aParam.mxDiagramWithAxesShapes = ShapeFactory::createGroup2D(xDiagramPlusAxesPlusMarkHandlesGroup_Shapes); bool bAutoPositionDummy = true; diff --git a/chart2/source/view/main/DataPointSymbolSupplier.cxx b/chart2/source/view/main/DataPointSymbolSupplier.cxx index 7f446139ac22..740776475cf6 100644 --- a/chart2/source/view/main/DataPointSymbolSupplier.cxx +++ b/chart2/source/view/main/DataPointSymbolSupplier.cxx @@ -32,7 +32,7 @@ uno::Reference< drawing::XShapes > DataPointSymbolSupplier::create2DSymbolList( { ShapeFactory* pShapeFactory = ShapeFactory::getOrCreateShapeFactory(xShapeFactory); uno::Reference< drawing::XShapes > xGroupShapes = - pShapeFactory->createGroup2D( xTarget ); + ShapeFactory::createGroup2D( xTarget ); drawing::Position3D aPos(0,0,0); for(sal_Int32 nS=0;nS<ShapeFactory::getSymbolCount();nS++) diff --git a/chart2/source/view/main/PlotterBase.cxx b/chart2/source/view/main/PlotterBase.cxx index 7cf5515fd6bf..c0d26dbdc8b5 100644 --- a/chart2/source/view/main/PlotterBase.cxx +++ b/chart2/source/view/main/PlotterBase.cxx @@ -82,7 +82,7 @@ uno::Reference< drawing::XShapes > PlotterBase::createGroupShape( if(m_nDimension==2) { //create and add to target - return m_pShapeFactory->createGroup2D( xTarget, rName ); + return ShapeFactory::createGroup2D( xTarget, rName ); } else { diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index a7011527dfc6..0e0ea450f9b8 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -1117,7 +1117,8 @@ uno::Reference< drawing::XShape > return xShape; } -uno::Reference< drawing::XShape > + +rtl::Reference<SvxShapePolyPolygon> ShapeFactory::createArea2D( const uno::Reference< drawing::XShapes >& xTarget , const drawing::PolyPolygonShape3D& rPolyPolygon ) { @@ -1125,34 +1126,28 @@ uno::Reference< drawing::XShape > return nullptr; //create shape - uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( - "com.sun.star.drawing.PolyPolygonShape" ), uno::UNO_QUERY ); - xTarget->add(xShape); + rtl::Reference<SvxShapePolyPolygon> xShape = new SvxShapePolyPolygon(nullptr); + xShape->setShapeKind(OBJ_POLY); + xTarget->add(uno::Reference<drawing::XShape>(xShape)); //set properties - uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - OSL_ENSURE(xProp.is(), "created shape offers no XPropertySet"); - if( xProp.is()) + try { - try - { - //UNO_NAME_POLYGON "Polygon" drawing::PointSequence* - drawing::PointSequenceSequence aPoints( PolyToPointSequence(rPolyPolygon) ); + //UNO_NAME_POLYGON "Polygon" drawing::PointSequence* + drawing::PointSequenceSequence aPoints( PolyToPointSequence(rPolyPolygon) ); - //Polygon - xProp->setPropertyValue( UNO_NAME_POLYPOLYGON - , uno::Any( aPoints ) ); + //Polygon + xShape->SvxShape::setPropertyValue( UNO_NAME_POLYPOLYGON + , uno::Any( aPoints ) ); - //ZOrder - //an area should always be behind other shapes - xProp->setPropertyValue( UNO_NAME_MISC_OBJ_ZORDER - , uno::Any( sal_Int32(0) ) ); - } - catch( const uno::Exception& ) - { - TOOLS_WARN_EXCEPTION("chart2", "" ); - } + //ZOrder + //an area should always be behind other shapes + xShape->SvxShape::setPropertyValue( UNO_NAME_MISC_OBJ_ZORDER + , uno::Any( sal_Int32(0) ) ); + } + catch( const uno::Exception& ) + { + TOOLS_WARN_EXCEPTION("chart2", "" ); } return xShape; } @@ -1755,7 +1750,7 @@ uno::Reference< drawing::XShape > return xShape; } -uno::Reference< drawing::XShapes > +rtl::Reference< SvxShapeGroup > ShapeFactory::createGroup2D( const uno::Reference< drawing::XShapes >& xTarget , const OUString& aName ) { @@ -1764,23 +1759,21 @@ uno::Reference< drawing::XShapes > try { //create and add to target - uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( - "com.sun.star.drawing.GroupShape" ), uno::UNO_QUERY ); + rtl::Reference<SvxShapeGroup> xShapeGroup = new SvxShapeGroup(nullptr, nullptr); + xShapeGroup->setShapeKind(OBJ_GRUP); + uno::Reference< drawing::XShape > xShape(static_cast<cppu::OWeakObject*>(xShapeGroup.get()), uno::UNO_QUERY_THROW); xTarget->add(xShape); //set name if(!aName.isEmpty()) - setShapeName( xShape , aName ); + setShapeName( xShape, aName ); {//workaround //need this null size as otherwise empty group shapes where painted with a gray border - xShape->setSize(awt::Size(0,0)); + xShapeGroup->setSize(awt::Size(0,0)); } - //return - uno::Reference< drawing::XShapes > xShapes( xShape, uno::UNO_QUERY ); - return xShapes; + return xShapeGroup; } catch( const uno::Exception& ) { @@ -2490,6 +2483,20 @@ void ShapeFactory::setShapeName( const uno::Reference< drawing::XShape >& xShape } } +// set a name/CID at a shape (is used for selection handling) + +void ShapeFactory::setShapeName( SvxShape& rShape, const OUString& rName ) +{ + try + { + rShape.setPropertyValue( UNO_NAME_MISC_OBJ_NAME, uno::Any( rName ) ); + } + catch( const uno::Exception& ) + { + TOOLS_WARN_EXCEPTION("chart2", "" ); + } +} + OUString ShapeFactory::getShapeName( const uno::Reference< drawing::XShape >& xShape ) { OUString aRet; diff --git a/chart2/source/view/main/VButton.cxx b/chart2/source/view/main/VButton.cxx index 2e20d97110f8..6f13a750fead 100644 --- a/chart2/source/view/main/VButton.cxx +++ b/chart2/source/view/main/VButton.cxx @@ -100,13 +100,12 @@ void VButton::createShapes(const uno::Reference<beans::XPropertySet>& xTextProp) PropertyMapper::getTextLabelMultiPropertyLists(xTextProp, aPropNames, aPropValues); - m_xShape.set(pShapeFactory->createGroup2D(m_xTarget, m_sCID), uno::UNO_QUERY); + m_xShape = ShapeFactory::createGroup2D(m_xTarget, m_sCID); m_xShape->setPosition(m_aPosition); m_xShape->setSize(m_aSize); - uno::Reference<drawing::XShapes> xContainer(m_xShape, uno::UNO_QUERY); - if (!xContainer.is()) - return; + uno::Reference<drawing::XShapes> xContainer(static_cast<cppu::OWeakObject*>(m_xShape.get()), + uno::UNO_QUERY_THROW); tPropertyNameValueMap aTextValueMap; aTextValueMap["CharHeight"] <<= 10.0f; diff --git a/chart2/source/view/main/VButton.hxx b/chart2/source/view/main/VButton.hxx index 133689b3932c..35761e349991 100644 --- a/chart2/source/view/main/VButton.hxx +++ b/chart2/source/view/main/VButton.hxx @@ -13,6 +13,8 @@ #include <com/sun/star/awt/Point.hpp> #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/uno/Reference.hxx> +#include <rtl/ref.hxx> +#include <svx/unoshape.hxx> namespace com::sun::star::beans { class XPropertySet; } namespace com::sun::star::drawing { class XShape; } @@ -27,7 +29,7 @@ class VButton final private: css::uno::Reference<css::lang::XMultiServiceFactory> m_xShapeFactory; css::uno::Reference<css::drawing::XShapes> m_xTarget; - css::uno::Reference<css::drawing::XShape> m_xShape; + rtl::Reference<SvxShapeGroup> m_xShape; OUString m_sLabel; OUString m_sCID; css::awt::Point m_aPosition; diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 1f2ef6625c99..2e7ddbf8f4f3 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -931,13 +931,12 @@ void VLegend::createShapes( //create shape and add to page ShapeFactory* pShapeFactory = ShapeFactory::getOrCreateShapeFactory(m_xShapeFactory); OUString aLegendParticle( ObjectIdentifier::createParticleForLegend( mrModel ) ); - m_xShape.set( pShapeFactory->createGroup2D( m_xTarget, - ObjectIdentifier::createClassifiedIdentifierForParticle( aLegendParticle )), - uno::UNO_QUERY); + m_xShape = ShapeFactory::createGroup2D( m_xTarget, + ObjectIdentifier::createClassifiedIdentifierForParticle( aLegendParticle ) ); // create and insert sub-shapes - Reference< drawing::XShapes > xLegendContainer( m_xShape, uno::UNO_QUERY ); - if( xLegendContainer.is()) + Reference< drawing::XShapes > xLegendContainer = m_xShape; + if( xLegendContainer.is() ) { // for quickly setting properties tPropertyValues aLineFillProperties; diff --git a/chart2/source/view/main/VLegend.hxx b/chart2/source/view/main/VLegend.hxx index c037b38cdefc..d4963cd69671 100644 --- a/chart2/source/view/main/VLegend.hxx +++ b/chart2/source/view/main/VLegend.hxx @@ -19,7 +19,8 @@ #pragma once #include <com/sun/star/uno/Reference.hxx> - +#include <rtl/ref.hxx> +#include <svx/unoshape.hxx> #include <vector> namespace chart { class ChartModel; } @@ -73,7 +74,7 @@ private: css::uno::Reference< css::drawing::XShapes > m_xTarget; css::uno::Reference< css::lang::XMultiServiceFactory> m_xShapeFactory; css::uno::Reference< css::chart2::XLegend > m_xLegend; - css::uno::Reference< css::drawing::XShape > m_xShape; + rtl::Reference< SvxShapeGroup > m_xShape; ChartModel& mrModel; diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx index 8af21c374dba..655c63850c05 100644 --- a/chart2/source/view/main/VLegendSymbolFactory.cxx +++ b/chart2/source/view/main/VLegendSymbolFactory.cxx @@ -91,7 +91,7 @@ void lcl_setPropertiesToShape( namespace chart { -Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( +rtl::Reference< SvxShapeGroup > VLegendSymbolFactory::createSymbol( const awt::Size& rEntryKeyAspectRatio, const Reference< drawing::XShapes >& rSymbolContainer, LegendSymbolStyle eStyle, @@ -99,18 +99,18 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( const Reference< beans::XPropertySet > & xLegendEntryProperties, PropertyType ePropertyType, const uno::Any& rExplicitSymbol ) { - Reference< drawing::XShape > xResult; + rtl::Reference< SvxShapeGroup > xResult; if( ! (rSymbolContainer.is() && xShapeFactory.is())) return xResult; ShapeFactory* pShapeFactory = ShapeFactory::getOrCreateShapeFactory(xShapeFactory); - xResult.set( pShapeFactory->createGroup2D( rSymbolContainer ), uno::UNO_QUERY ); - - Reference< drawing::XShapes > xResultGroup( xResult, uno::UNO_QUERY ); - if( ! xResultGroup.is()) + xResult = ShapeFactory::createGroup2D( rSymbolContainer ); + if( ! xResult) return xResult; + Reference< drawing::XShapes > xResultGroup( static_cast<cppu::OWeakObject*>(xResult.get()), uno::UNO_QUERY_THROW ); + // add an invisible square box to maintain aspect ratio pShapeFactory->createInvisibleRectangle( xResultGroup, rEntryKeyAspectRatio ); diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx index fab12be594ad..51422fd9dfd6 100644 --- a/include/svx/unoshape.hxx +++ b/include/svx/unoshape.hxx @@ -415,7 +415,7 @@ public: /*********************************************************************** * * ***********************************************************************/ -class SvxShapeGroup final : public SvxShape, +class SVXCORE_DLLPUBLIC SvxShapeGroup final : public SvxShape, public css::drawing::XShapeGroup, public css::drawing::XShapes2, public css::drawing::XShapes @@ -622,7 +622,7 @@ class SvxShapePolyPolygon final : public SvxShapeText public: /// @throws css::lang::IllegalArgumentException /// @throws css::beans::PropertyVetoException - SvxShapePolyPolygon( SdrObject* pObj ); + SVXCORE_DLLPUBLIC SvxShapePolyPolygon( SdrObject* pObj ); virtual ~SvxShapePolyPolygon() noexcept override; // Local support functions diff --git a/osx/soffice.xcodeproj/project.pbxproj b/osx/soffice.xcodeproj/project.pbxproj index 7cf857dce7f7..e540ccf9d73a 100644 --- a/osx/soffice.xcodeproj/project.pbxproj +++ b/osx/soffice.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXFileReference section */ + 456E58CF277CB9C700FA12D2 /* unoshap2.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = unoshap2.cxx; path = ../svx/source/unodraw/unoshap2.cxx; sourceTree = "<group>"; }; BE017B8725AF2ABE00244ED8 /* autostyl.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = autostyl.cxx; path = ../sc/source/ui/docshell/autostyl.cxx; sourceTree = "<group>"; }; BE017B8825AF2ABE00244ED8 /* servobj.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = servobj.cxx; path = ../sc/source/ui/docshell/servobj.cxx; sourceTree = "<group>"; }; BE017B8925AF2ABE00244ED8 /* docsh4.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = docsh4.cxx; path = ../sc/source/ui/docshell/docsh4.cxx; sourceTree = "<group>"; }; @@ -959,6 +960,14 @@ /* End PBXFileReference section */ /* Begin PBXGroup section */ + 456E58D0277CB9DE00FA12D2 /* unodraw */ = { + isa = PBXGroup; + children = ( + 456E58CF277CB9C700FA12D2 /* unoshap2.cxx */, + ); + name = unodraw; + sourceTree = "<group>"; + }; BE017B8525AF2A5A00244ED8 /* ui */ = { isa = PBXGroup; children = ( @@ -1882,6 +1891,7 @@ BEACEEC5257FC7F5001BAABA /* svx */ = { isa = PBXGroup; children = ( + 456E58D0277CB9DE00FA12D2 /* unodraw */, BEACEEC6257FC82A001BAABA /* tbxctrls */, ); name = svx; commit 85fc392926ec5b74bf4328867460ea312ab0cbac Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Tue Dec 28 21:20:44 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Dec 30 06:47:15 2021 +0100 use comphelper::WeakComponentImplHelper in AccessibleTextHelper Change-Id: I886d510fc1ebccb058446703a64854c7854891bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127688 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx index d2b56b2b7364..2a58d9484f17 100644 --- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx +++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx @@ -33,6 +33,8 @@ #include <com/sun/star/awt/XWindow.hpp> #include <com/sun/star/accessibility/AccessibleRole.hpp> +#include <osl/diagnose.h> + using namespace ::com::sun::star; using namespace ::com::sun::star::accessibility; @@ -44,7 +46,6 @@ namespace chart AccessibleTextHelper::AccessibleTextHelper( DrawViewWrapper * pDrawViewWrapper ) : - impl::AccessibleTextHelper_Base( m_aMutex ), m_pDrawViewWrapper( pDrawViewWrapper ) {} diff --git a/chart2/source/controller/inc/AccessibleTextHelper.hxx b/chart2/source/controller/inc/AccessibleTextHelper.hxx index ad6d865932fb..075fbf0f9709 100644 --- a/chart2/source/controller/inc/AccessibleTextHelper.hxx +++ b/chart2/source/controller/inc/AccessibleTextHelper.hxx @@ -19,8 +19,7 @@ #pragma once #include <memory> -#include <cppuhelper/basemutex.hxx> -#include <cppuhelper/compbase.hxx> +#include <comphelper/compbase.hxx> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/accessibility/XAccessibleContext.hpp> @@ -37,14 +36,13 @@ class DrawViewWrapper; namespace impl { -typedef ::cppu::WeakComponentImplHelper< +typedef comphelper::WeakComponentImplHelper< css::lang::XInitialization, css::accessibility::XAccessibleContext > AccessibleTextHelper_Base; } -class AccessibleTextHelper : - public cppu::BaseMutex, +class AccessibleTextHelper final : public impl::AccessibleTextHelper_Base { public: diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index 524d57762292..f2aa1b5db47f 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -29,6 +29,7 @@ #include <AccessibleTextHelper.hxx> #include <strings.hrc> #include <chartview/DrawModelWrapper.hxx> +#include <osl/diagnose.h> #include <svx/svdoutl.hxx> #include <svx/svxdlg.hxx>