diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2020-08-25 12:32:02 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-08-27 12:10:03 +0200 |
commit | 75a8b367f2a06e0d485fc2b9f4472e8bb29d71e3 (patch) | |
tree | babccb4f46b654c14fd38f5406251fe2639ed7a1 /chart2 | |
parent | 636d16efe45a55c1a5a7a451c46fbb8618bf0393 (diff) |
tdf#136105 tdf#134883 pie chart: improve data label position
Set the maximum text width of data point label shape based
on the remaining space, when text wrapping is enabled and
the label placement is OUTSIDE.
Change-Id: I9132658e44886000c692efadaee4841c4d3ffc7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101317
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 45 | ||||
-rw-r--r-- | chart2/qa/extras/data/xlsx/tdf136105.xlsx | bin | 0 -> 16753 bytes | |||
-rw-r--r-- | chart2/qa/extras/xshape/data/reference/tdf90839-2.xml | 84 | ||||
-rw-r--r-- | chart2/qa/extras/xshape/data/reference/tdf90839-3.xml | 36 | ||||
-rw-r--r-- | chart2/qa/extras/xshape/data/reference/tdf90839-4.xml | 96 | ||||
-rw-r--r-- | chart2/source/view/charttypes/PieChart.cxx | 15 | ||||
-rw-r--r-- | chart2/source/view/charttypes/VSeriesPlotter.cxx | 1 | ||||
-rw-r--r-- | chart2/source/view/diagram/VDiagram.cxx | 4 | ||||
-rw-r--r-- | chart2/source/view/inc/VSeriesPlotter.hxx | 3 | ||||
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 5 |
10 files changed, 177 insertions, 112 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index d502d163fc64..651d2b829e06 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -162,6 +162,7 @@ public: void testStockChartShiftedCategoryPosition(); void testTdf133376(); void testTdf134225(); + void testTdf136105(); void testTdf91250(); void testTdf134111(); @@ -274,6 +275,7 @@ public: CPPUNIT_TEST(testStockChartShiftedCategoryPosition); CPPUNIT_TEST(testTdf133376); CPPUNIT_TEST(testTdf134225); + CPPUNIT_TEST(testTdf136105); CPPUNIT_TEST(testTdf91250); CPPUNIT_TEST(testTdf134111); @@ -2525,8 +2527,8 @@ void Chart2ImportTest::testTdf133376() CPPUNIT_ASSERT(xDataPointLabel.is()); // Check the position of the 3rd data point label, which is out from the pie slice awt::Point aLabelPosition = xDataPointLabel->getPosition(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1071, aLabelPosition.X, 30); - CPPUNIT_ASSERT_DOUBLES_EQUAL(5269, aLabelPosition.Y, 30); + CPPUNIT_ASSERT_DOUBLES_EQUAL(482, aLabelPosition.X, 30); + CPPUNIT_ASSERT_DOUBLES_EQUAL(5427, aLabelPosition.Y, 30); } void Chart2ImportTest::testTdf134225() @@ -2557,6 +2559,45 @@ void Chart2ImportTest::testTdf134225() #endif } +void Chart2ImportTest::testTdf136105() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf136105.xlsx"); + // 1st chart with fix inner position and size + { + Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent), + UNO_QUERY_THROW); + + Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW); + Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW); + Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW); + Reference<drawing::XShape> xDataPointLabel(getShapeByName(xShapes, + "CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"), UNO_SET_THROW); + + CPPUNIT_ASSERT(xDataPointLabel.is()); + // Check the position of the 1st data point label, which is out from the pie slice + awt::Point aLabelPosition = xDataPointLabel->getPosition(); + CPPUNIT_ASSERT_DOUBLES_EQUAL(8797, aLabelPosition.X, 500); + CPPUNIT_ASSERT_DOUBLES_EQUAL(1374, aLabelPosition.Y, 500); + } + // 2nd chart with auto inner position and size + { + Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(1, mxComponent), + UNO_QUERY_THROW); + + Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW); + Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW); + Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW); + Reference<drawing::XShape> xDataPointLabel(getShapeByName(xShapes, + "CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"), UNO_SET_THROW); + + CPPUNIT_ASSERT(xDataPointLabel.is()); + // Check the position of the 1st data point label, which is out from the pie slice + awt::Point aLabelPosition = xDataPointLabel->getPosition(); + CPPUNIT_ASSERT_DOUBLES_EQUAL(8610, aLabelPosition.X, 500); + CPPUNIT_ASSERT_DOUBLES_EQUAL(1684, aLabelPosition.Y, 500); + } +} + void Chart2ImportTest::testTdf91250() { load("/chart2/qa/extras/data/docx/", "tdf91250.docx"); diff --git a/chart2/qa/extras/data/xlsx/tdf136105.xlsx b/chart2/qa/extras/data/xlsx/tdf136105.xlsx Binary files differnew file mode 100644 index 000000000000..bc3a9092244f --- /dev/null +++ b/chart2/qa/extras/data/xlsx/tdf136105.xlsx diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml b/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml index 46a4d7986c31..d23c93e558a2 100644 --- a/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml +++ b/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml @@ -14,7 +14,7 @@ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="4609" positionY="2700" sizeX="19412" sizeY="11357" type="com.sun.star.drawing.GroupShape" name="CID/D=0"> + <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape" name="CID/D=0"> <XShapes> <XShape positionX="8207" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> @@ -30,7 +30,7 @@ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="4609" positionY="2700" sizeX="19412" sizeY="11357" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName=""> + <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> @@ -39,12 +39,12 @@ <LineStart/> <LineEnd/> <Transformation> - <Line1 column1="19413.000000" column2="0.000000" column3="4609.000000"/> - <Line2 column1="0.000000" column2="11358.000000" column3="2700.000000"/> + <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/> + <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="4609" positionY="2700" sizeX="19412" sizeY="11357" type="com.sun.star.drawing.GroupShape"> + <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape"> <XShapes> <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9723" type="com.sun.star.drawing.GroupShape"> <XShapes> @@ -175,11 +175,11 @@ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="4609" positionY="2700" sizeX="19412" sizeY="11357" type="com.sun.star.drawing.GroupShape"> + <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape"> <XShapes> - <XShape positionX="4609" positionY="2700" sizeX="19412" sizeY="11357" type="com.sun.star.drawing.GroupShape"> + <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape"> <XShapes> - <XShape positionX="4609" positionY="2700" sizeX="19412" sizeY="11357" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0:DataLabels="> + <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0:DataLabels="> <XShapes> <XShape positionX="17907" positionY="9553" sizeX="6114" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"> <XShapes> @@ -204,9 +204,9 @@ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="6858" positionY="12784" sizeX="3336" sizeY="1273" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1"> + <XShape positionX="3974" positionY="12784" sizeX="6220" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1"> <XShapes> - <XShape positionX="6858" positionY="12784" sizeX="3336" sizeY="1273" type="com.sun.star.drawing.TextShape" text="Black - The color of night and coffee 28%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3889" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> + <XShape positionX="3974" positionY="12784" sizeX="6220" sizeY="849" type="com.sun.star.drawing.TextShape" text="Black - The color of night and coffee 28%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="10279" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> @@ -215,21 +215,21 @@ <LineStart/> <LineEnd/> <Transformation> - <Line1 column1="3337.000000" column2="0.000000" column3="6858.000000"/> - <Line2 column1="0.000000" column2="1274.000000" column3="12784.000000"/> + <Line1 column1="6221.000000" column2="0.000000" column3="3974.000000"/> + <Line2 column1="0.000000" column2="850.000000" column3="12784.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="3337.000000" column2="0.000000" column3="6858.000000"/> - <Line2 column1="0.000000" column2="1274.000000" column3="12784.000000"/> + <Line1 column1="6221.000000" column2="0.000000" column3="3974.000000"/> + <Line2 column1="0.000000" column2="850.000000" column3="12784.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="4609" positionY="7607" sizeX="3468" sizeY="1273" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=2"> + <XShape positionX="1910" positionY="7819" sizeX="6167" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=2"> <XShapes> - <XShape positionX="4609" positionY="7607" sizeX="3468" sizeY="1273" type="com.sun.star.drawing.TextShape" text="Green - The color of grass and hope 6%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3889" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> + <XShape positionX="1910" positionY="7819" sizeX="6167" sizeY="849" type="com.sun.star.drawing.TextShape" text="Green - The color of grass and hope 6%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="8225" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> @@ -238,21 +238,21 @@ <LineStart/> <LineEnd/> <Transformation> - <Line1 column1="3469.000000" column2="0.000000" column3="4609.000000"/> - <Line2 column1="0.000000" column2="1274.000000" column3="7607.000000"/> + <Line1 column1="6168.000000" column2="0.000000" column3="1910.000000"/> + <Line2 column1="0.000000" column2="850.000000" column3="7819.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="3469.000000" column2="0.000000" column3="4609.000000"/> - <Line2 column1="0.000000" column2="1274.000000" column3="7607.000000"/> + <Line1 column1="6168.000000" column2="0.000000" column3="1910.000000"/> + <Line2 column1="0.000000" column2="850.000000" column3="7819.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="6777" positionY="3570" sizeX="3071" sizeY="1273" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=3"> + <XShape positionX="3813" positionY="3994" sizeX="6035" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=3"> <XShapes> - <XShape positionX="6777" positionY="3570" sizeX="3071" sizeY="1273" type="com.sun.star.drawing.TextShape" text="Red - The color of rose and passion 19%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3889" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> + <XShape positionX="3813" positionY="3994" sizeX="6035" sizeY="849" type="com.sun.star.drawing.TextShape" text="Red - The color of rose and passion 19%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="9943" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> @@ -261,21 +261,21 @@ <LineStart/> <LineEnd/> <Transformation> - <Line1 column1="3072.000000" column2="0.000000" column3="6777.000000"/> - <Line2 column1="0.000000" column2="1274.000000" column3="3570.000000"/> + <Line1 column1="6036.000000" column2="0.000000" column3="3813.000000"/> + <Line2 column1="0.000000" column2="850.000000" column3="3994.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="3072.000000" column2="0.000000" column3="6777.000000"/> - <Line2 column1="0.000000" column2="1274.000000" column3="3570.000000"/> + <Line1 column1="6036.000000" column2="0.000000" column3="3813.000000"/> + <Line2 column1="0.000000" column2="850.000000" column3="3994.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="13060" positionY="2700" sizeX="3442" sizeY="1273" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=4"> + <XShape positionX="11711" positionY="3124" sizeX="6140" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=4"> <XShapes> - <XShape positionX="13060" positionY="2700" sizeX="3442" sizeY="1273" type="com.sun.star.drawing.TextShape" text="White - The color of milk and purity 14%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3889" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> + <XShape positionX="11711" positionY="3124" sizeX="6140" sizeY="849" type="com.sun.star.drawing.TextShape" text="White - The color of milk and purity 14%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="26494" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> @@ -284,50 +284,50 @@ <LineStart/> <LineEnd/> <Transformation> - <Line1 column1="3443.000000" column2="0.000000" column3="13060.000000"/> - <Line2 column1="0.000000" column2="1274.000000" column3="2700.000000"/> + <Line1 column1="6141.000000" column2="0.000000" column3="11711.000000"/> + <Line2 column1="0.000000" column2="850.000000" column3="3124.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="3443.000000" column2="0.000000" column3="13060.000000"/> - <Line2 column1="0.000000" column2="1274.000000" column3="2700.000000"/> + <Line1 column1="6141.000000" column2="0.000000" column3="11711.000000"/> + <Line2 column1="0.000000" column2="850.000000" column3="3124.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="19413.000000" column2="0.000000" column3="4609.000000"/> - <Line2 column1="0.000000" column2="11358.000000" column3="2700.000000"/> + <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/> + <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="19413.000000" column2="0.000000" column3="4609.000000"/> - <Line2 column1="0.000000" column2="11358.000000" column3="2700.000000"/> + <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/> + <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="19413.000000" column2="0.000000" column3="4609.000000"/> - <Line2 column1="0.000000" column2="11358.000000" column3="2700.000000"/> + <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/> + <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="19413.000000" column2="0.000000" column3="4609.000000"/> - <Line2 column1="0.000000" column2="11358.000000" column3="2700.000000"/> + <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/> + <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="19413.000000" column2="0.000000" column3="4609.000000"/> - <Line2 column1="0.000000" column2="11358.000000" column3="2700.000000"/> + <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/> + <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml b/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml index 074e3df51d95..e4e1bd07273b 100644 --- a/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml +++ b/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml @@ -14,7 +14,7 @@ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="1910" positionY="3124" sizeX="19544" sizeY="10509" type="com.sun.star.drawing.GroupShape" name="CID/D=0"> + <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape" name="CID/D=0"> <XShapes> <XShape positionX="8207" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> @@ -30,7 +30,7 @@ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="1910" positionY="3124" sizeX="19544" sizeY="10509" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName=""> + <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> @@ -39,12 +39,12 @@ <LineStart/> <LineEnd/> <Transformation> - <Line1 column1="19545.000000" column2="0.000000" column3="1910.000000"/> + <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/> <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="1910" positionY="3124" sizeX="19544" sizeY="10509" type="com.sun.star.drawing.GroupShape"> + <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape"> <XShapes> <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9723" type="com.sun.star.drawing.GroupShape"> <XShapes> @@ -175,15 +175,15 @@ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="1910" positionY="3124" sizeX="19544" sizeY="10509" type="com.sun.star.drawing.GroupShape"> + <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape"> <XShapes> - <XShape positionX="1910" positionY="3124" sizeX="19544" sizeY="10509" type="com.sun.star.drawing.GroupShape"> + <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape"> <XShapes> - <XShape positionX="1910" positionY="3124" sizeX="19544" sizeY="10509" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0:DataLabels="> + <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0:DataLabels="> <XShapes> - <XShape positionX="17907" positionY="9341" sizeX="3547" sizeY="1273" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"> + <XShape positionX="17907" positionY="9553" sizeX="6114" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"> <XShapes> - <XShape positionX="17907" positionY="9341" sizeX="3547" sizeY="1273" type="com.sun.star.drawing.TextShape" text="Yellow - The color of sun and honey 33%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3889" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> + <XShape positionX="17907" positionY="9553" sizeX="6114" sizeY="849" type="com.sun.star.drawing.TextShape" text="Yellow - The color of sun and honey 33%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="8732" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> @@ -192,15 +192,15 @@ <LineStart/> <LineEnd/> <Transformation> - <Line1 column1="3548.000000" column2="0.000000" column3="17907.000000"/> - <Line2 column1="0.000000" column2="1274.000000" column3="9341.000000"/> + <Line1 column1="6115.000000" column2="0.000000" column3="17907.000000"/> + <Line2 column1="0.000000" column2="850.000000" column3="9553.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="3548.000000" column2="0.000000" column3="17907.000000"/> - <Line2 column1="0.000000" column2="1274.000000" column3="9341.000000"/> + <Line1 column1="6115.000000" column2="0.000000" column3="17907.000000"/> + <Line2 column1="0.000000" column2="850.000000" column3="9553.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> @@ -298,35 +298,35 @@ </XShape> </XShapes> <Transformation> - <Line1 column1="19545.000000" column2="0.000000" column3="1910.000000"/> + <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/> <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="19545.000000" column2="0.000000" column3="1910.000000"/> + <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/> <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="19545.000000" column2="0.000000" column3="1910.000000"/> + <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/> <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="19545.000000" column2="0.000000" column3="1910.000000"/> + <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/> <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="19545.000000" column2="0.000000" column3="1910.000000"/> + <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/> <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml b/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml index 54e0ad187850..9c1ce02d4583 100644 --- a/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml +++ b/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml @@ -14,7 +14,7 @@ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="4436" positionY="2344" sizeX="16701" sizeY="12078" type="com.sun.star.drawing.GroupShape" name="CID/D=0"> + <XShape positionX="1737" positionY="2768" sizeX="21967" sizeY="11230" type="com.sun.star.drawing.GroupShape" name="CID/D=0"> <XShapes> <XShape positionX="8034" positionY="3894" sizeX="9575" sizeY="9575" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> @@ -30,7 +30,7 @@ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="4436" positionY="2344" sizeX="16701" sizeY="12078" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName=""> + <XShape positionX="1737" positionY="2768" sizeX="21967" sizeY="11230" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> @@ -39,12 +39,12 @@ <LineStart/> <LineEnd/> <Transformation> - <Line1 column1="16702.000000" column2="0.000000" column3="4436.000000"/> - <Line2 column1="0.000000" column2="12079.000000" column3="2344.000000"/> + <Line1 column1="21968.000000" column2="0.000000" column3="1737.000000"/> + <Line2 column1="0.000000" column2="11231.000000" column3="2768.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="4436" positionY="2344" sizeX="16701" sizeY="12078" type="com.sun.star.drawing.GroupShape"> + <XShape positionX="1737" positionY="2768" sizeX="21967" sizeY="11230" type="com.sun.star.drawing.GroupShape"> <XShapes> <XShape positionX="8034" positionY="3892" sizeX="9575" sizeY="9577" type="com.sun.star.drawing.GroupShape"> <XShapes> @@ -175,15 +175,15 @@ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="4436" positionY="2344" sizeX="16701" sizeY="12078" type="com.sun.star.drawing.GroupShape"> + <XShape positionX="1737" positionY="2768" sizeX="21967" sizeY="11230" type="com.sun.star.drawing.GroupShape"> <XShapes> - <XShape positionX="4436" positionY="2344" sizeX="16701" sizeY="12078" type="com.sun.star.drawing.GroupShape"> + <XShape positionX="1737" positionY="2768" sizeX="21967" sizeY="11230" type="com.sun.star.drawing.GroupShape"> <XShapes> - <XShape positionX="4436" positionY="2344" sizeX="16701" sizeY="12078" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0:DataLabels="> + <XShape positionX="1737" positionY="2768" sizeX="21967" sizeY="11230" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0:DataLabels="> <XShapes> - <XShape positionX="17590" positionY="9110" sizeX="3547" sizeY="1697" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"> + <XShape positionX="17590" positionY="9322" sizeX="6114" sizeY="1273" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"> <XShapes> - <XShape positionX="17590" positionY="9110" sizeX="3547" sizeY="1697" type="com.sun.star.drawing.TextShape" text="Yellow - The color of sun and honey 120 33%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3831" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> + <XShape positionX="17590" positionY="9322" sizeX="6114" sizeY="1273" type="com.sun.star.drawing.TextShape" text="Yellow - The color of sun and honey 120 33%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="8546" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> @@ -192,21 +192,21 @@ <LineStart/> <LineEnd/> <Transformation> - <Line1 column1="3548.000000" column2="0.000000" column3="17590.000000"/> - <Line2 column1="0.000000" column2="1698.000000" column3="9110.000000"/> + <Line1 column1="6115.000000" column2="0.000000" column3="17590.000000"/> + <Line2 column1="0.000000" column2="1274.000000" column3="9322.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="3548.000000" column2="0.000000" column3="17590.000000"/> - <Line2 column1="0.000000" column2="1698.000000" column3="9110.000000"/> + <Line1 column1="6115.000000" column2="0.000000" column3="17590.000000"/> + <Line2 column1="0.000000" column2="1274.000000" column3="9322.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="6654" positionY="12725" sizeX="3336" sizeY="1697" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1"> + <XShape positionX="3770" positionY="12725" sizeX="6220" sizeY="1273" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1"> <XShapes> - <XShape positionX="6654" positionY="12725" sizeX="3336" sizeY="1697" type="com.sun.star.drawing.TextShape" text="Black - The color of night and coffee 100 28%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3831" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> + <XShape positionX="3770" positionY="12725" sizeX="6220" sizeY="1273" type="com.sun.star.drawing.TextShape" text="Black - The color of night and coffee 100 28%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="10075" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> @@ -215,21 +215,21 @@ <LineStart/> <LineEnd/> <Transformation> - <Line1 column1="3337.000000" column2="0.000000" column3="6654.000000"/> - <Line2 column1="0.000000" column2="1698.000000" column3="12725.000000"/> + <Line1 column1="6221.000000" column2="0.000000" column3="3770.000000"/> + <Line2 column1="0.000000" column2="1274.000000" column3="12725.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="3337.000000" column2="0.000000" column3="6654.000000"/> - <Line2 column1="0.000000" column2="1698.000000" column3="12725.000000"/> + <Line1 column1="6221.000000" column2="0.000000" column3="3770.000000"/> + <Line2 column1="0.000000" column2="1274.000000" column3="12725.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="4436" positionY="7402" sizeX="3468" sizeY="1697" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=2"> + <XShape positionX="1737" positionY="7614" sizeX="6167" sizeY="1273" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=2"> <XShapes> - <XShape positionX="4436" positionY="7402" sizeX="3468" sizeY="1697" type="com.sun.star.drawing.TextShape" text="Green - The color of grass and hope 20 6%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3831" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> + <XShape positionX="1737" positionY="7614" sizeX="6167" sizeY="1273" type="com.sun.star.drawing.TextShape" text="Green - The color of grass and hope 20 6%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="8052" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> @@ -238,21 +238,21 @@ <LineStart/> <LineEnd/> <Transformation> - <Line1 column1="3469.000000" column2="0.000000" column3="4436.000000"/> - <Line2 column1="0.000000" column2="1698.000000" column3="7402.000000"/> + <Line1 column1="6168.000000" column2="0.000000" column3="1737.000000"/> + <Line2 column1="0.000000" column2="1274.000000" column3="7614.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="3469.000000" column2="0.000000" column3="4436.000000"/> - <Line2 column1="0.000000" column2="1698.000000" column3="7402.000000"/> + <Line1 column1="6168.000000" column2="0.000000" column3="1737.000000"/> + <Line2 column1="0.000000" column2="1274.000000" column3="7614.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="6578" positionY="3202" sizeX="3071" sizeY="1697" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=3"> + <XShape positionX="3614" positionY="3626" sizeX="6035" sizeY="1273" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=3"> <XShapes> - <XShape positionX="6578" positionY="3202" sizeX="3071" sizeY="1697" type="com.sun.star.drawing.TextShape" text="Red - The color of rose and passion 70 19%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3831" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> + <XShape positionX="3614" positionY="3626" sizeX="6035" sizeY="1273" type="com.sun.star.drawing.TextShape" text="Red - The color of rose and passion 70 19%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="9744" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> @@ -261,21 +261,21 @@ <LineStart/> <LineEnd/> <Transformation> - <Line1 column1="3072.000000" column2="0.000000" column3="6578.000000"/> - <Line2 column1="0.000000" column2="1698.000000" column3="3202.000000"/> + <Line1 column1="6036.000000" column2="0.000000" column3="3614.000000"/> + <Line2 column1="0.000000" column2="1274.000000" column3="3626.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="3072.000000" column2="0.000000" column3="6578.000000"/> - <Line2 column1="0.000000" column2="1698.000000" column3="3202.000000"/> + <Line1 column1="6036.000000" column2="0.000000" column3="3614.000000"/> + <Line2 column1="0.000000" column2="1274.000000" column3="3626.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> - <XShape positionX="12789" positionY="2344" sizeX="3442" sizeY="1697" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=4"> + <XShape positionX="11440" positionY="2768" sizeX="6140" sizeY="1273" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=4"> <XShapes> - <XShape positionX="12789" positionY="2344" sizeX="3442" sizeY="1697" type="com.sun.star.drawing.TextShape" text="White - The color of milk and purity 50 14%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3831" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> + <XShape positionX="11440" positionY="2768" sizeX="6140" sizeY="1273" type="com.sun.star.drawing.TextShape" text="White - The color of milk and purity 50 14%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="25991" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName=""> <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> @@ -284,50 +284,50 @@ <LineStart/> <LineEnd/> <Transformation> - <Line1 column1="3443.000000" column2="0.000000" column3="12789.000000"/> - <Line2 column1="0.000000" column2="1698.000000" column3="2344.000000"/> + <Line1 column1="6141.000000" column2="0.000000" column3="11440.000000"/> + <Line2 column1="0.000000" column2="1274.000000" column3="2768.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="3443.000000" column2="0.000000" column3="12789.000000"/> - <Line2 column1="0.000000" column2="1698.000000" column3="2344.000000"/> + <Line1 column1="6141.000000" column2="0.000000" column3="11440.000000"/> + <Line2 column1="0.000000" column2="1274.000000" column3="2768.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="16702.000000" column2="0.000000" column3="4436.000000"/> - <Line2 column1="0.000000" column2="12079.000000" column3="2344.000000"/> + <Line1 column1="21968.000000" column2="0.000000" column3="1737.000000"/> + <Line2 column1="0.000000" column2="11231.000000" column3="2768.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="16702.000000" column2="0.000000" column3="4436.000000"/> - <Line2 column1="0.000000" column2="12079.000000" column3="2344.000000"/> + <Line1 column1="21968.000000" column2="0.000000" column3="1737.000000"/> + <Line2 column1="0.000000" column2="11231.000000" column3="2768.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="16702.000000" column2="0.000000" column3="4436.000000"/> - <Line2 column1="0.000000" column2="12079.000000" column3="2344.000000"/> + <Line1 column1="21968.000000" column2="0.000000" column3="1737.000000"/> + <Line2 column1="0.000000" column2="11231.000000" column3="2768.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="16702.000000" column2="0.000000" column3="4436.000000"/> - <Line2 column1="0.000000" column2="12079.000000" column3="2344.000000"/> + <Line1 column1="21968.000000" column2="0.000000" column3="1737.000000"/> + <Line2 column1="0.000000" column2="11231.000000" column3="2768.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> </XShapes> <Transformation> - <Line1 column1="16702.000000" column2="0.000000" column3="4436.000000"/> - <Line2 column1="0.000000" column2="12079.000000" column3="2344.000000"/> + <Line1 column1="21968.000000" column2="0.000000" column3="1737.000000"/> + <Line2 column1="0.000000" column2="11231.000000" column3="2768.000000"/> <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> </Transformation> </XShape> diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx index 5ab60729cf93..000a3f4a8a90 100644 --- a/chart2/source/view/charttypes/PieChart.cxx +++ b/chart2/source/view/charttypes/PieChart.cxx @@ -350,6 +350,21 @@ void PieChart::createTextLabelShape( // set the maximum text width to be used when text wrapping is enabled double fTextMaximumFrameWidth = 0.8 * fPieRadius; + if( nLabelPlacement == css::chart::DataLabelPlacement::OUTSIDE && m_aAvailableOuterRect.getWidth() ) + { + double fAngleDegree = rParam.mfUnitCircleStartAngleDegree + rParam.mfUnitCircleWidthAngleDegree / 2.0; + while (fAngleDegree > 360.0) + fAngleDegree -= 360.0; + while (fAngleDegree < 0.0) + fAngleDegree += 360.0; + + if (fAngleDegree < 67.5 || fAngleDegree >= 292.5) + fTextMaximumFrameWidth = m_aAvailableOuterRect.getMaxX() - aPieLabelInfo.aFirstPosition.getX(); + else if (fAngleDegree < 112.5 || fAngleDegree >= 247.5) + fTextMaximumFrameWidth = m_aAvailableOuterRect.getWidth(); + else + fTextMaximumFrameWidth = aPieLabelInfo.aFirstPosition.getX() - m_aAvailableOuterRect.getMinX(); + } sal_Int32 nTextMaximumFrameWidth = ceil(fTextMaximumFrameWidth); ///the text shape for the label is created diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 8f7dcbb59a1d..232e86369f1d 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -151,6 +151,7 @@ VSeriesPlotter::VSeriesPlotter( const uno::Reference<XChartType>& xChartTypeMode , m_pExplicitCategoriesProvider(nullptr) , m_bPointsWereSkipped(false) , m_bPieLabelsAllowToMove(false) + , m_aAvailableOuterRect(0, 0, 0, 0) { SAL_WARN_IF(!m_xChartTypeModel.is(),"chart2","no XChartType available in view, fallback to default values may be wrong"); } diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx index 53b96b036266..c89981bea282 100644 --- a/chart2/source/view/diagram/VDiagram.cxx +++ b/chart2/source/view/diagram/VDiagram.cxx @@ -675,8 +675,8 @@ void VDiagram::reduceToMinimumSize() awt::Size aMaxSize( m_aAvailableSizeIncludingAxes ); awt::Point aMaxPos( m_aAvailablePosIncludingAxes ); - sal_Int32 nNewWidth = aMaxSize.Width/3; - sal_Int32 nNewHeight = aMaxSize.Height/3; + sal_Int32 nNewWidth = std::round(aMaxSize.Width/2.2); + sal_Int32 nNewHeight = std::round(aMaxSize.Height/2.2); awt::Size aNewSize( nNewWidth, nNewHeight ); awt::Point aNewPos( aMaxPos ); aNewPos.X += nNewWidth; diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx index 17215faae4b5..735922911e9b 100644 --- a/chart2/source/view/inc/VSeriesPlotter.hxx +++ b/chart2/source/view/inc/VSeriesPlotter.hxx @@ -25,6 +25,7 @@ #include "LabelAlignment.hxx" #include "MinimumAndMaximumSupplier.hxx" #include "LegendEntryProvider.hxx" +#include <basegfx/range/b2irectangle.hxx> #include <com/sun/star/drawing/Direction3D.hpp> namespace com::sun::star::awt { struct Point; } @@ -242,6 +243,7 @@ public: void setCoordinateSystemResolution( const css::uno::Sequence< sal_Int32 >& rCoordinateSystemResolution ); bool PointsWereSkipped() const { return m_bPointsWereSkipped;} void setPieLabelsAllowToMove( bool bIsPieOrDonut ) { m_bPieLabelsAllowToMove = bIsPieOrDonut; }; + void setAvailableOuterRect( basegfx::B2IRectangle& aAvailableOuterRect ) { m_aAvailableOuterRect = aAvailableOuterRect; }; //return the depth for a logic 1 double getTransformedDepth() const; @@ -424,6 +426,7 @@ protected: css::uno::Sequence< sal_Int32 > m_aCoordinateSystemResolution; bool m_bPointsWereSkipped; bool m_bPieLabelsAllowToMove; + basegfx::B2IRectangle m_aAvailableOuterRect; private: typedef std::map< sal_Int32 , ExplicitScaleData > tSecondaryValueScales; diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 49c9906f23c6..02c5ab550df8 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1591,6 +1591,11 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D } // Do not allow to move data labels in case of pie or donut chart, yet! pSeriesPlotter->setPieLabelsAllowToMove(!bIsPieOrDonut); + // use the pagesize as remaining space if we have a fixed inner size + if( rParam.mbUseFixedInnerSize ) + aAvailableOuterRect = BaseGFXHelper::makeRectangle(awt::Rectangle(0, 0, rPageSize.Width, rPageSize.Height)); + // set the available space for data labels to avoid moving out from chart area + pSeriesPlotter->setAvailableOuterRect(aAvailableOuterRect); pSeriesPlotter->createShapes(); m_bPointsWereSkipped = m_bPointsWereSkipped || pSeriesPlotter->PointsWereSkipped(); } |