diff --git a/bsc882383.patch b/bsc882383.patch new file mode 100644 index 0000000..cd11305 --- /dev/null +++ b/bsc882383.patch @@ -0,0 +1,38 @@ +From 7ff2bfbf8af599bb7536721e6c221486519d7e42 Mon Sep 17 00:00:00 2001 +From: Tamas Bunth +Date: Mon, 26 Nov 2018 07:19:41 +0100 +Subject: [PATCH] Put text label outside of the pie if.. + +performLabelBestFitInnerPlacement fails. + +Change-Id: Ic84e8b42e02da2023b22a9406c44d462170c5305 +Reviewed-on: https://gerrit.libreoffice.org/64015 +Tested-by: Jenkins +Reviewed-by: Tamás Bunth +(cherry picked from commit 3339c730f8c9a6088a2e8b335185f1bf0b232216) +--- + +diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx +index f3f1ef3..3cc4dc3 100644 +--- a/chart2/source/view/charttypes/PieChart.cxx ++++ b/chart2/source/view/charttypes/PieChart.cxx +@@ -1590,7 +1590,18 @@ + + if( !performLabelBestFitInnerPlacement(rShapeParam, rPieLabelInfo) ) + { +- // TODO ++ // If it does not fit inside, let's put it outside ++ PolarLabelPositionHelper aPolarPosHelper(m_pPosHelper.get(),m_nDimension,m_xLogicTarget,m_pShapeFactory); ++ auto eAlignment = LABEL_ALIGN_CENTER; ++ awt::Point aScreenPosition2D( ++ aPolarPosHelper.getLabelScreenPositionAndAlignmentForUnitCircleValues(eAlignment, css::chart::DataLabelPlacement::OUTSIDE ++ , rShapeParam.mfUnitCircleStartAngleDegree, rShapeParam.mfUnitCircleWidthAngleDegree ++ , rShapeParam.mfUnitCircleInnerRadius, rShapeParam.mfUnitCircleOuterRadius, rShapeParam.mfLogicZ+0.5, 0 )); ++ basegfx::B2IVector aTranslationVector = rPieLabelInfo.aFirstPosition - rPieLabelInfo.aOrigin; ++ aTranslationVector.setLength(150); ++ aScreenPosition2D.X += aTranslationVector.getX(); ++ aScreenPosition2D.Y += aTranslationVector.getY(); ++ rPieLabelInfo.xLabelGroupShape->setPosition(aScreenPosition2D); + } + } + diff --git a/libreoffice.changes b/libreoffice.changes index af2bf6c..991f8fe 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Nov 26 14:38:54 UTC 2018 - andras.timar@collabora.com + +- bsc#882383 - LO-L3: Chart in PPTX lacks color and is too large + * bsc882383.patch + ------------------------------------------------------------------- Mon Nov 12 08:50:57 UTC 2018 - andras.timar@collabora.com diff --git a/libreoffice.spec b/libreoffice.spec index 91767e3..b428a0b 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -108,6 +108,8 @@ Patch6: 0001-call-System.runFinalizersOnExit-by-reflection-since-.patch Patch7: bsc1110348.patch # Bug 1112112 - LO-L3: [PPTX] SmartArt: Basic rendering of several list types Patch8: bsc1112112.patch +# Bug 882383 - LO-L3: Chart in PPTX lacks color and is too large +Patch9: bsc882383.patch # try to save space by using hardlinks Patch990: install-with-hardlinks.diff BuildRequires: %{name}-share-linker @@ -956,6 +958,7 @@ Provides %{langname} translations and additional resources (help files, etc.) fo %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %patch990 -p1 # Disable some of the failing tests (some are random)