summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTünde Tóth <tundeth@gmail.com>2020-03-02 08:56:11 +0100
committerLászló Németh <nemeth@numbertext.org>2020-03-05 12:27:04 +0100
commit9fab1ba8ddc59924c633aa17c65f7330a4762726 (patch)
treea3c1ad1a03c6970182c7345a41d220a1df726d3a /oox
parentd264170ebbc92f8a920cd51d7f6f2744aa465be1 (diff)
tdf#75330 add a new overlay/no-overlay feature for the legend
Implement "Show the legend without overlapping the chart" option for chart legend. Change-Id: Ifbba4c81136e13995d276434dc17a97b0675428c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89810 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/chart/titleconverter.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx
index a6623aa1ed49..c0de3919571e 100644
--- a/oox/source/drawingml/chart/titleconverter.cxx
+++ b/oox/source/drawingml/chart/titleconverter.cxx
@@ -201,7 +201,7 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram )
getFormatter().convertFormatting( aPropSet, mrModel.mxShapeProp, mrModel.mxTextProp, OBJECTTYPE_LEGEND );
// predefined legend position and expansion
- cssc2::LegendPosition eLegendPos = cssc2::LegendPosition_CUSTOM;
+ cssc2::LegendPosition eLegendPos = cssc2::LegendPosition_LINE_END;
cssc::ChartLegendExpansion eLegendExpand = cssc::ChartLegendExpansion_CUSTOM;
RelativePosition eRelPos;
bool bTopRight=false;
@@ -216,7 +216,6 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram )
eLegendExpand = cssc::ChartLegendExpansion_HIGH;
break;
case XML_tr: // top-right not supported
- eLegendPos = LegendPosition_CUSTOM;
eRelPos.Primary = 1;
eRelPos.Secondary =0;
eRelPos.Anchor = Alignment_TOP_RIGHT;
@@ -248,7 +247,7 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram )
aPropSet.setProperty( PROP_AnchorPosition, eLegendPos );
aPropSet.setProperty( PROP_Expansion, eLegendExpand );
- if(eLegendPos == LegendPosition_CUSTOM && bTopRight && !bManualLayout)
+ if (bTopRight && !bManualLayout)
aPropSet.setProperty( PROP_RelativePosition , makeAny(eRelPos));
if (mrModel.maLegendEntries.size() > 0)
legendEntriesFormatting(rxDiagram);