chart2/source/view/main/DataTableView.cxx | 11 +++++++++-- oox/source/drawingml/chart/objectformatter.cxx | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-)
New commits: commit 666d45bf909c0f021f490c8edec7a74280e5be77 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Wed Aug 17 23:22:41 2022 +0200 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Thu Aug 25 13:09:43 2022 +0200 chart2: convert the fill color only when style is "solid" The CharBackColor should only be set when the fill style has the value "FillStyle_SOLID", otherwise don't set it as we can't handle any other fill style. Change-Id: Icaec8996d47966bb32bd8cf88b8c5aad70ab07a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138462 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> (cherry picked from commit e425ee936ee762825a20cd10e6027163eab747a2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138794 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/chart2/source/view/main/DataTableView.cxx b/chart2/source/view/main/DataTableView.cxx index ab4c224ddf18..080b04cf919f 100644 --- a/chart2/source/view/main/DataTableView.cxx +++ b/chart2/source/view/main/DataTableView.cxx @@ -27,6 +27,7 @@ #include <com/sun/star/drawing/TextVerticalAdjust.hpp> #include <com/sun/star/drawing/LineDash.hpp> #include <com/sun/star/drawing/LineStyle.hpp> +#include <com/sun/star/drawing/FillStyle.hpp> #include <com/sun/star/util/XBroadcaster.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/uno/XComponentContext.hpp> @@ -143,8 +144,14 @@ void DataTableView::setCellCharAndParagraphProperties( copyProperty(xPropertySet, xDataTableProperties, "CharWeightComplex"); copyProperty(xPropertySet, xDataTableProperties, "CharWordMode"); - xPropertySet->setPropertyValue("CharBackColor", - xDataTableProperties->getPropertyValue("FillColor")); + drawing::FillStyle eFillStyle = drawing::FillStyle_NONE; + xDataTableProperties->getPropertyValue("FillStyle") >>= eFillStyle; + if (eFillStyle == drawing::FillStyle_SOLID) + { + sal_Int32 aColor = 0; + if (xDataTableProperties->getPropertyValue("FillColor") >>= aColor) + xPropertySet->setPropertyValue("CharBackColor", uno::Any(aColor)); + } xPropertySet->setPropertyValue("ParaAdjust", uno::makeAny(style::ParagraphAdjust_CENTER)); } commit e79e0195b824e05052bbdf27b42b110d01644529 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Wed Aug 17 23:20:58 2022 +0200 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Thu Aug 25 13:09:31 2022 +0200 oox: set fill properties correctly for the data table at import Change-Id: Ia108c5b67e85ba770bd84d90ad1d3dd27046b245 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138461 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> (cherry picked from commit 3115a9f3a903f14a71003f51dc30eed824ea92fb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138793 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index d02a8d8644e2..40fe87b49447 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -554,7 +554,7 @@ const ObjectTypeFormatEntry spObjTypeFormatEntries[] = TYPEFORMAT_LINE( OBJECTTYPE_HILOLINE, saLinearPropInfo, nullptr, spOtherLines ), TYPEFORMAT_FRAME( OBJECTTYPE_UPBAR, saCommonPropInfo, nullptr, spUpDownBarLines, spUpBarFills ), TYPEFORMAT_FRAME( OBJECTTYPE_DOWNBAR, saCommonPropInfo, nullptr, spUpDownBarLines, spDownBarFills ), - TYPEFORMAT_LINE( OBJECTTYPE_DATATABLE, saCommonPropInfo, spOtherTexts, spDataTableLines ) + TYPEFORMAT_FRAME( OBJECTTYPE_DATATABLE, saCommonPropInfo, spOtherTexts, spDataTableLines, nullptr ) }; #undef TYPEFORMAT_FRAME