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

2022-01-06 Thread Noel Grandin (via logerrit)
 
chart2/qa/extras/chart2dump/reference/columnbarcharttest/column_chart_small_spacing.txt
   |   96 +-
 chart2/qa/extras/chart2dump/reference/columnbarcharttest/normal_bar_chart.txt  
   |   64 +++---
 
chart2/qa/extras/chart2dump/reference/columnbarcharttest/normal_column_chart.txt
  |   80 
 
chart2/qa/extras/chart2dump/reference/columnbarcharttest/percent_stacked_bar_chart.txt
|   76 +++
 
chart2/qa/extras/chart2dump/reference/columnbarcharttest/percent_stacked_column_chart.txt
 |   76 +++
 chart2/qa/extras/chart2dump/reference/columnbarcharttest/stacked_bar_chart.txt 
   |   76 +++
 
chart2/qa/extras/chart2dump/reference/columnbarcharttest/stacked_column_chart.txt
 |   80 
 chart2/source/view/charttypes/BarChart.cxx 
   |   11 -
 chart2/source/view/inc/ShapeFactory.hxx
   |3 
 chart2/source/view/main/ShapeFactory.cxx   
   |   11 -
 sw/qa/extras/layout/layout2.cxx
   |7 
 11 files changed, 298 insertions(+), 282 deletions(-)

New commits:
commit 302b44125aa0c1d5216f986ecf8e341cd6e57418
Author: Noel Grandin 
AuthorDate: Thu Dec 9 11:45:36 2021 +0200
Commit: Noel Grandin 
CommitDate: Thu Jan 6 12:20:22 2022 +0100

use background XShapeGroup for bar-chart area

which means we don't have to set the Z-order, which is expensive for
large charts.
Shaves 5% off the load time

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

diff --git 
a/chart2/qa/extras/chart2dump/reference/columnbarcharttest/column_chart_small_spacing.txt
 
b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/column_chart_small_spacing.txt
index b3192a728377..f9ec3b65a2f8 100644
--- 
a/chart2/qa/extras/chart2dump/reference/columnbarcharttest/column_chart_small_spacing.txt
+++ 
b/chart2/qa/extras/chart2dump/reference/columnbarcharttest/column_chart_small_spacing.txt
@@ -7,17 +7,17 @@
 1
 // static_cast(aSeriesColumnOrBarFillColor)
 16711807
-/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2
+/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0
 // aColumnOrBarPosition.X
-13522
+3698
 // aColumnOrBarPosition.Y
-4147
+4414
 // aColumnOrBarSize.Height
-3202
+2935
 // aColumnOrBarSize.Width
-1169
+1170
 // aColumnOrBarTransformation
-1169;0;13522;0;3202;4147;0;0;1
+1170;0;3698;0;2935;4414;0;0;1
 /// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1
 // aColumnOrBarPosition.X
 8610
@@ -29,17 +29,17 @@
 1170
 // aColumnOrBarTransformation
 1170;0;8610;0;5403;1946;0;0;1
-/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0
+/// CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2
 // aColumnOrBarPosition.X
-3698
+13522
 // aColumnOrBarPosition.Y
-4414
+4147
 // aColumnOrBarSize.Height
-2935
+3202
 // aColumnOrBarSize.Width
-1170
+1169
 // aColumnOrBarTransformation
-1170;0;3698;0;2935;4414;0;0;1
+1169;0;13522;0;3202;4147;0;0;1
 /// Series 1 ColumnsOrBars
 // nColumnOrBarCountInSeries
 3
@@ -47,17 +47,17 @@
 4
 // static_cast(aSeriesColumnOrBarFillColor)
 10079487
-/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2
+/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0
 // aColumnOrBarPosition.X
-14691
+4868
 // aColumnOrBarPosition.Y
-3747
+5247
 // aColumnOrBarSize.Height
-3602
+2102
 // aColumnOrBarSize.Width
-1170
+1169
 // aColumnOrBarTransformation
-1170;0;14691;0;3602;3747;0;0;1
+1169;0;4868;0;2102;5247;0;0;1
 /// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1
 // aColumnOrBarPosition.X
 9780
@@ -69,17 +69,17 @@
 1169
 // aColumnOrBarTransformation
 1169;0;9780;0;3002;4347;0;0;1
-/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0
+/// CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2
 // aColumnOrBarPosition.X
-4868
+14691
 // aColumnOrBarPosition.Y
-5247
+3747
 // aColumnOrBarSize.Height
-2102
+3602
 // aColumnOrBarSize.Width
-1169
+1170
 // aColumnOrBarTransformation
-1169;0;4868;0;2102;5247;0;0;1
+1170;0;14691;0;3602;3747;0;0;1
 /// Series 2 ColumnsOrBars
 // nColumnOrBarCountInSeries
 3
@@ -87,17 +87,17 @@
 3
 // static_cast(aSeriesColumnOrBarFillColor)
 10079487
-/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2
+/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0
 // aColumnOrBarPosition.X
-15861
+6037
 // aColumnOrBarPosition.Y
-5214
+6281
 // aColumnOrBarSize.Height
-2135
+1068
 // aColumnOrBarSize.Width
-1169
+1170
 // aColumnOrBarTransformation
-1169;0;15861;0;2135;5214;0;0;1
+1170;0;6037;0;1068;6281;0;0;1
 /// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=1
 // aColumnOrBarPosition.X
 10949
@@ -109,17 +109,17 @@
 1169
 // aColumnOrBarTransformation
 1169;0;10949;0;2935;4414;0;0;1
-/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=0
+/// CID/MultiClick/D=0:CS=0:CT=0:Series=2:Point=2
 // aColumnOrBarPosition.X
-6037
+15861
 // aColumnOrBar

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

2020-12-16 Thread Tünde Tóth (via logerrit)
 chart2/qa/extras/chart2import.cxx |8 ++---
 chart2/qa/extras/xshape/data/reference/tdf90839-2.xml |   12 +++-
 chart2/qa/extras/xshape/data/reference/tdf90839-3.xml |6 +---
 chart2/qa/extras/xshape/data/reference/tdf90839-4.xml |   10 +++
 chart2/source/view/charttypes/PieChart.cxx|   25 +++---
 sw/qa/extras/layout/data/outside_long_data_label.docx |binary
 sw/qa/extras/layout/layout2.cxx   |   18 
 7 files changed, 44 insertions(+), 35 deletions(-)

New commits:
commit b0068342398786ca50304260434a18880dddf74d
Author: Tünde Tóth 
AuthorDate: Fri Dec 11 09:13:46 2020 +0100
Commit: László Németh 
CommitDate: Wed Dec 16 18:26:26 2020 +0100

tdf#138777 pie chart: improve long data label width

to avoid chart distortion.

Reduce the maximum text width of data point label shape based,
because in some cases the long data label flowed out of the chart.

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

diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index e4742405d967..9bb042fb6867 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -2581,8 +2581,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(458, aLabelPosition.X, 30);
-CPPUNIT_ASSERT_DOUBLES_EQUAL(5114, aLabelPosition.Y, 30);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(1082, aLabelPosition.X, 30);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(5462, aLabelPosition.Y, 30);
 }
 
 void Chart2ImportTest::testTdf134225()
@@ -2652,8 +2652,8 @@ void Chart2ImportTest::testTdf136105()
 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);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(7978, aLabelPosition.X, 500);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(1048, aLabelPosition.Y, 500);
 }
 }
 
diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml 
b/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
index c8afb487a4ae..d7e5c4a364f9 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
@@ -206,7 +206,7 @@


 
- 
+ 
   
   
   
@@ -229,7 +229,7 @@


 
- 
+ 
   
   
   
@@ -252,7 +252,7 @@


 
- 
+ 
   
   
   
@@ -275,7 +275,7 @@


 
- 
+ 
   
   
   
@@ -331,6 +331,4 @@

   
  
-
-
-
+
\ No newline at end of file
diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml 
b/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml
index 7b67bd226da6..77a1ac06f80a 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml
@@ -183,7 +183,7 @@
   

 
- 
+ 
   
   
   
@@ -331,6 +331,4 @@

   
  
-
-
-
+
\ No newline at end of file
diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml 
b/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml
index 7fabc697c751..6b182821f1c9 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml
@@ -183,7 +183,7 @@
   

 
- 
+ 
   
   
   
@@ -206,7 +206,7 @@


 
- 
+ 
   
   
   
@@ -229,7 +229,7 @@


 
- 
+ 
   
   
   
@@ -252,7 +252,7 @@


 
- 
+ 
   
   
   
@@ -275,7 +275,7 @@


 
- 
+ 
   
   
   
diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index 7bf2eaa2a89b..3b61c

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

2020-10-19 Thread Tünde Tóth (via logerrit)
 chart2/qa/extras/chart2import.cxx |4 +--
 chart2/qa/extras/xshape/data/reference/tdf90839-2.xml |   16 +++---
 chart2/qa/extras/xshape/data/reference/tdf90839-3.xml |   16 +++---
 chart2/qa/extras/xshape/data/reference/tdf90839-4.xml |   16 +++---
 chart2/source/view/main/PolarLabelPositionHelper.cxx  |   20 +++---
 sw/qa/extras/layout/data/tdf137154.docx   |binary
 sw/qa/extras/layout/layout2.cxx   |   20 ++
 7 files changed, 54 insertions(+), 38 deletions(-)

New commits:
commit db49cdcf2f367e27ed8fb5f1619f0b41f2c63fd2
Author: Tünde Tóth 
AuthorDate: Wed Sep 30 13:11:26 2020 +0200
Commit: László Németh 
CommitDate: Mon Oct 19 08:58:51 2020 +0200

tdf#137154 pie chart: improve Outside position of data labels

Some pie chart data labels were too close to the pie
with Outside placement.

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

diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index d901f879ea18..1318a1ddebfa 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -2573,8 +2573,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(349, aLabelPosition.X, 30);
-CPPUNIT_ASSERT_DOUBLES_EQUAL(5480, aLabelPosition.Y, 30);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(458, aLabelPosition.X, 30);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(5114, aLabelPosition.Y, 30);
 }
 
 void Chart2ImportTest::testTdf134225()
diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml 
b/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
index d23c93e558a2..84eb759612ff 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
@@ -181,9 +181,9 @@
 
  
   
-   
+   
 
- 
+ 
   
   
   
@@ -193,14 +193,14 @@
   
   

-   
+   

   
  
 
 
  
- 
+ 
  
 

@@ -273,9 +273,9 @@
  
 

-   
+   
 
- 
+ 
   
   
   
@@ -284,14 +284,14 @@
   
   
   
-   
+   


   
  
 
 
- 
+ 
  
  
 
diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml 
b/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml
index e4e1bd07273b..11dd8ecfe15b 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml
@@ -181,9 +181,9 @@
 
  
   
-   
+   
 
- 
+ 
   
   
   
@@ -193,14 +193,14 @@
   
   

-   
+   

   
  
 
 
  
- 
+ 
  
 

@@ -273,9 +273,9 @@
  
 

-   
+   
 
- 
+ 
   
   
   
@@ -284,14 +284,14 @@
   
   
   
-   
+   


   
  
 
 
- 
+ 
  
  
 
diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml 
b/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml
index 9c1ce02d4583..4774a7e3e0b4 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml
@@ -181,9 +181,9 @@
 
  
   
-   
+   
 
- 
+ 
   
   
   
@@ -193,14 +193,14 @@
   
   

-   
+   

   
  
 
 
  
- 
+ 
  
 

@@ -273,9 +273,9 @@
 

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

2020-10-02 Thread Tünde Tóth (via logerrit)
 chart2/qa/extras/chart2import.cxx  |4 -
 chart2/source/view/charttypes/PieChart.cxx |  115 +++--
 chart2/source/view/charttypes/PieChart.hxx |2 
 sw/qa/extras/layout/data/tdf137116.docx|binary
 sw/qa/extras/layout/layout.cxx |   20 +
 5 files changed, 66 insertions(+), 75 deletions(-)

New commits:
commit a91ac466e2a996a07248ec4a2518d5ba9bdf3d61
Author: Tünde Tóth 
AuthorDate: Tue Sep 29 13:32:40 2020 +0200
Commit: László Németh 
CommitDate: Fri Oct 2 17:01:02 2020 +0200

tdf#137116 pie chart: improve BestFit position of data labels

Regression from commit: 2e1a1054a4a98415057e72269ace9db075d3b191
(tdf#136752 pie chart: improve data label position)

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

diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index 6097a8a0388f..dadc782c0af6 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -2579,8 +2579,8 @@ void Chart2ImportTest::testTdf134225()
 awt::Point aLabelPosition2 = xDataPointLabel2->getPosition();
 
 // Check the distance between the position of the 1st data point label and 
the second one
-CPPUNIT_ASSERT_DOUBLES_EQUAL(1800, sal_Int32(aLabelPosition2.X - 
aLabelPosition1.X), 30);
-CPPUNIT_ASSERT_DOUBLES_EQUAL(2123, sal_Int32(aLabelPosition2.Y - 
aLabelPosition1.Y), 30);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(1669, sal_Int32(aLabelPosition2.X - 
aLabelPosition1.X), 30);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(2166, sal_Int32(aLabelPosition2.Y - 
aLabelPosition1.Y), 30);
 #endif
 }
 
diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index e2dd04f6c645..6042b0d0dbe4 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -389,26 +389,51 @@ void PieChart::createTextLabelShape(
  *  First off the routine try to place the label inside the related 
pie slice,
  *  if this is not possible the label is placed outside.
  */
-if (!performLabelBestFitInnerPlacement(rParam, aPieLabelInfo)
-&& m_aAvailableOuterRect.getWidth())
+if (!performLabelBestFitInnerPlacement(rParam, aPieLabelInfo))
 {
-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
-= 0.8 * (m_aAvailableOuterRect.getMaxX() - 
aPieLabelInfo.aFirstPosition.getX());
-else if (fAngleDegree < 112.5 || fAngleDegree >= 247.5)
-fTextMaximumFrameWidth = 0.8 * 
m_aAvailableOuterRect.getWidth();
-else
-fTextMaximumFrameWidth
-= 0.8 * (aPieLabelInfo.aFirstPosition.getX() - 
m_aAvailableOuterRect.getMinX());
-
-nTextMaximumFrameWidth = ceil(fTextMaximumFrameWidth);
+if (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
+= 0.8
+  * (m_aAvailableOuterRect.getMaxX() - 
aPieLabelInfo.aFirstPosition.getX());
+else if (fAngleDegree < 112.5 || fAngleDegree >= 247.5)
+fTextMaximumFrameWidth = 0.8 * 
m_aAvailableOuterRect.getWidth();
+else
+fTextMaximumFrameWidth
+= 0.8
+  * (aPieLabelInfo.aFirstPosition.getX() - 
m_aAvailableOuterRect.getMinX());
+
+nTextMaximumFrameWidth = ceil(fTextMaximumFrameWidth);
+}
+
+nScreenValueOffsetInRadiusDirection = (m_nDimension != 3) ? 150 : 
0;
+aScreenPosition2D
+= 
aPolarPosHelper.getLabelScreenPositionAndAlignmentForUnitCircleValues(
+eAlignment, css::chart::DataLabelPlacement::OUTSIDE,
+rParam.mfUnitCircleStartAngleDegree,
+rParam.mfUnitCircleWidthAngleDegree, 
rParam.mfUnitCircleInnerRadius,
+rParam.mfUnitCircleOuterRadius, rParam.mfLogicZ + 0.5, 0);
+aPieLabelInfo.aFirstPosition
+   

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

2018-12-18 Thread Libreoffice Gerrit user
 chart2/qa/extras/chart2import.cxx  |   20 
 chart2/qa/extras/data/ods/tdf108021.ods|binary
 chart2/source/view/axes/VCartesianAxis.cxx |4 +++-
 sw/qa/extras/layout/data/tdf108021.odt |binary
 sw/qa/extras/layout/layout.cxx |   20 
 5 files changed, 43 insertions(+), 1 deletion(-)

New commits:
commit f8d6de19181d749d7c2b345ce7084c0c07fa3eab
Author: Balazs Varga 
AuthorDate: Fri Dec 14 14:38:49 2018 +0100
Commit: Bartosz Kosiorek 
CommitDate: Tue Dec 18 11:04:40 2018 +0100

tdf#108021 Chart: Fix text break of column chart X axis

With this patch the text break is allowed for column chart
X axis if the text is rotated with 0, 90 or 270 degree.
(The MS Office only allowed the text break of X axis
text when the rotation is 0, 90, or 270 degree.)

Change-Id: I0914f6208d5a5c0c864dc0227032ef858b05
Reviewed-on: https://gerrit.libreoffice.org/65165
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek 

diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index 64e343c6d639..b8b9a871142a 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -69,6 +69,7 @@ public:
 void testTdf86624(); // manually placed legends
 void testTdf105517();
 void testTdf106217();
+void testTdf108021();
 void testAutoBackgroundXLSX();
 void testChartAreaStyleBackgroundXLSX();
 void testChartHatchFillXLSX();
@@ -151,6 +152,7 @@ public:
 CPPUNIT_TEST(testTdf86624);
 CPPUNIT_TEST(testTdf105517);
 CPPUNIT_TEST(testTdf106217);
+CPPUNIT_TEST(testTdf108021);
 CPPUNIT_TEST(testAutoBackgroundXLSX);
 CPPUNIT_TEST(testChartAreaStyleBackgroundXLSX);
 CPPUNIT_TEST(testChartHatchFillXLSX);
@@ -853,6 +855,24 @@ void Chart2ImportTest::testTdf106217()
 CPPUNIT_ASSERT_EQUAL(sal_Int32(2700), aSize.Height);
 }
 
+void Chart2ImportTest::testTdf108021()
+{
+// Tdf108021 : To check TextBreak value is true.
+load("/chart2/qa/extras/data/ods/", "tdf108021.ods");
+uno::Reference< chart::XDiagram > mxDiagram;
+uno::Reference< beans::XPropertySet > xAxisProp;
+bool bTextBreak = false;
+uno::Reference< chart::XChartDocument > xChartDoc ( getChartCompFromSheet( 
0, mxComponent ), UNO_QUERY_THROW);
+mxDiagram.set(xChartDoc->getDiagram());
+CPPUNIT_ASSERT(mxDiagram.is());
+uno::Reference< chart::XAxisXSupplier > xAxisXSupp( mxDiagram, 
uno::UNO_QUERY );
+CPPUNIT_ASSERT(xAxisXSupp.is());
+xAxisProp = xAxisXSupp->getXAxis();
+xAxisProp->getPropertyValue("TextBreak") >>= bTextBreak;
+// Expected value of 'TextBreak' is true
+CPPUNIT_ASSERT(bTextBreak);
+}
+
 void Chart2ImportTest::testTransparentBackground(OUString const & filename)
 {
 load("/chart2/qa/extras/data/xlsx/", filename);
diff --git a/chart2/qa/extras/data/ods/tdf108021.ods 
b/chart2/qa/extras/data/ods/tdf108021.ods
new file mode 100755
index ..ebbc5e56f24f
Binary files /dev/null and b/chart2/qa/extras/data/ods/tdf108021.ods differ
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx 
b/chart2/source/view/axes/VCartesianAxis.cxx
index 7a025878733b..feaf09027c01 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -521,7 +521,9 @@ bool VCartesianAxis::isBreakOfLabelsAllowed(
 //no break for value axis
 if( !m_bUseTextLabels )
 return false;
-if( rAxisLabelProperties.fRotationAngleDegree != 0.0 )
+if( !( rAxisLabelProperties.fRotationAngleDegree == 0.0 ||
+   rAxisLabelProperties.fRotationAngleDegree == 90.0 ||
+   rAxisLabelProperties.fRotationAngleDegree == 270.0 ) )
 return false;
 //break only for horizontal axis
 return bIsHorizontalAxis;
diff --git a/sw/qa/extras/layout/data/tdf108021.odt 
b/sw/qa/extras/layout/data/tdf108021.odt
new file mode 100755
index ..39ef6df80d2f
Binary files /dev/null and b/sw/qa/extras/layout/data/tdf108021.odt differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 633a31f3b30b..f1c167f2b2e2 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -41,6 +41,7 @@ public:
 void testRedlineCharAttributes();
 void testTdf116830();
 void testTdf114163();
+void testTdf108021();
 void testTdf116925();
 void testTdf117028();
 void testTdf106390();
@@ -77,6 +78,7 @@ public:
 CPPUNIT_TEST(testRedlineCharAttributes);
 CPPUNIT_TEST(testTdf116830);
 CPPUNIT_TEST(testTdf114163);
+CPPUNIT_TEST(testTdf108021);
 CPPUNIT_TEST(testTdf116925);
 CPPUNIT_TEST(testTdf117028);
 CPPUNIT_TEST(testTdf106390);
@@ -2323,6 +2325,24 @@ void SwLayoutWriter::testTdf114163()
 // This failed, if the legend first label is not "Data3".
 }
 
+void SwLayoutWriter::testTdf108021()
+{
+SwDoc* pDoc = createDoc("tdf108021.odt");
+SwDocShell* pShell = pDoc-