chart2/source/view/main/DataTableView.cxx | 11 +++++++++-- oox/source/drawingml/chart/objectformatter.cxx | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-)
New commits: commit e425ee936ee762825a20cd10e6027163eab747a2 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 18 08:48:17 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> diff --git a/chart2/source/view/main/DataTableView.cxx b/chart2/source/view/main/DataTableView.cxx index e5f3933aa8cb..5e1a7157cc3e 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::Any(style::ParagraphAdjust_CENTER)); } commit 3115a9f3a903f14a71003f51dc30eed824ea92fb 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 18 08:48:05 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> diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index e552dea82fb9..ff52053c97c9 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -559,7 +559,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