configure.ac | 2 editeng/source/items/frmitems.cxx | 12 ++++- external/libnumbertext/EmptyString.patch1 | 13 +++++ external/libnumbertext/UnpackedTarball_libnumbertext.mk | 1 include/editeng/brushitem.hxx | 5 ++ sc/qa/unit/data/xlsx/tdf148820.xlsx |binary sc/qa/unit/subsequent_export_test2.cxx | 32 +++++++++++++ sc/source/filter/inc/stylesbuffer.hxx | 2 sc/source/filter/oox/autofilterbuffer.cxx | 2 sc/source/filter/oox/stylesbuffer.cxx | 17 +++++-- svtools/source/control/ctrlbox.cxx | 3 - svx/qa/unit/table.cxx | 38 ++++++++++++++++ svx/source/table/tablecontroller.cxx | 7 ++ writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 14 files changed, 127 insertions(+), 9 deletions(-)
New commits: commit 10ffe3bf44effec88c0510222b3a66b513b70139 Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Mon Jun 27 19:36:13 2022 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Jun 27 19:36:13 2022 +0200 Bump version to 22.05.3.1 Change-Id: I9f5884ad4a2cacd5f9266616235803c82f5b1920 diff --git a/configure.ac b/configure.ac index 93319018fa4d..f3375595e235 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl in order to create a configure script. # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. -AC_INIT([Collabora Office],[22.05.2.1],[],[],[https://collaboraoffice.com/]) +AC_INIT([Collabora Office],[22.05.3.1],[],[],[https://collaboraoffice.com/]) dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard commit b351612821e782d26713c4ab53382bf628bf1bd1 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Tue Jun 21 16:58:24 2022 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Jun 27 19:26:47 2022 +0200 svtools: avoid divide by zero in calcCustomItemSize See https://crashreport.libreoffice.org/stats/signature/%60anonymous%20namespace'::calcCustomItemSize Change-Id: I5f1b19b7679c73cf29952629469e5151395b2b12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136254 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit ec03eef9b431048ea21a733c39c79b792b0f653c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136393 Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136451 diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 0b1c67e31980..393eea9e80fd 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -343,7 +343,8 @@ namespace gUserItemSz.setHeight(gUserItemSz.Height() / 10); size_t nMaxDeviceHeight = SAL_MAX_INT16 / 2; // see limitXCreatePixmap - gPreviewsPerDevice = nMaxDeviceHeight / gUserItemSz.Height(); + assert(gUserItemSz.Height() != 0); + gPreviewsPerDevice = gUserItemSz.Height() == 0 ? 16 : nMaxDeviceHeight / gUserItemSz.Height(); } } commit 8db2090059c79599c71493bc19536558c85d2975 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Fri Jun 24 10:46:40 2022 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Jun 27 19:26:47 2022 +0200 tdf#148522 svx: fix undo of cell border changes text alignment in other cells The Impress table properties dialog has multiple purposes: normally it only affects the properties of the currently active cell, but shadow is applied on the whole shape. Regression from commit fdeb04f7c59cf8032fe17072ed779e70505cc6ab (tdf#129961 svx: finish UI for table shadow as direct format, 2020-12-15), we started to apply properties to the current cell, and then to the whole shape as well, unconditionally. This affects undo/redo, as there is a separate undo manager while the text edit of a table cell is active and when the text edit is ended. Fix the problem by only applying properties on the shape when there we actually have some properties: this way the text edit is typically not ended, bringing back the old undo/redo behavior. Note that we still need to end the text edit if the user explicitly sets some shadow properties, that part is unchanged with this commit. Change-Id: I78e28bd326a2c12c3775b33957adca4cd95ac582 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136357 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins (cherry picked from commit 3edfbc19950610bb2061d29cb58b3811b1a0b1a5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136460 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit 750568d77812202c9c01fa87945b507a358c6db5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136468 diff --git a/svx/qa/unit/table.cxx b/svx/qa/unit/table.cxx index c82f331f2d17..c68abe18beea 100644 --- a/svx/qa/unit/table.cxx +++ b/svx/qa/unit/table.cxx @@ -24,6 +24,11 @@ #include <svx/unopage.hxx> #include <vcl/virdev.hxx> #include <sdr/contact/objectcontactofobjlistpainter.hxx> +#include <comphelper/propertyvalue.hxx> +#include <sfx2/viewsh.hxx> +#include <svx/svdview.hxx> +#include <svx/sdr/table/tablecontroller.hxx> +#include <editeng/editobj.hxx> using namespace ::com::sun::star; @@ -99,6 +104,39 @@ CPPUNIT_TEST_FIXTURE(Test, testTableShadowBlur) // itself and the transparency of the cell fill. assertXPath(pDocument, "//objectinfo/unifiedtransparence[1]", "transparence", "80"); } + +CPPUNIT_TEST_FIXTURE(Test, testSvxTableControllerSetAttrToSelectedShape) +{ + // Given a document with a table shape, editing cell text: + getComponent() = loadFromDesktop("private:factory/simpress", + "com.sun.star.presentation.PresentationDocument"); + uno::Sequence<beans::PropertyValue> aArgs + = { comphelper::makePropertyValue("Rows", sal_Int32(2)), + comphelper::makePropertyValue("Columns", sal_Int32(2)) }; + dispatchCommand(mxComponent, ".uno:InsertTable", aArgs); + uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY); + uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), + uno::UNO_QUERY); + auto pDrawPage = dynamic_cast<SvxDrawPage*>(xDrawPage.get()); + CPPUNIT_ASSERT(pDrawPage); + SdrPage* pSdrPage = pDrawPage->GetSdrPage(); + auto pSdrObject + = dynamic_cast<sdr::table::SdrTableObj*>(pSdrPage->GetObj(pSdrPage->GetObjCount() - 1)); + SfxViewShell* pViewShell = SfxViewShell::Current(); + SdrView* pSdrView = pViewShell->GetDrawView(); + pSdrView->SdrBeginTextEdit(pSdrObject); + CPPUNIT_ASSERT(pSdrView->IsTextEdit()); + const EditTextObject& rEdit = pSdrObject->getText(0)->GetOutlinerParaObject()->GetTextObject(); + SfxItemSet aSet(rEdit.GetParaAttribs(0)); + auto pTableController + = dynamic_cast<sdr::table::SvxTableController*>(pSdrView->getSelectionController().get()); + + // When applying attributes which only affect the cell text, not the table shape: + pTableController->SetAttrToSelectedShape(aSet); + + // Then make sure the text edit is not ended: + CPPUNIT_ASSERT(pSdrView->IsTextEdit()); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index d11b22988148..42712b09296f 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -2752,6 +2752,13 @@ void SvxTableController::SetAttrToSelectedShape(const SfxItemSet& rAttr) SfxItemSetFixed<SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST> aSet(*rAttr.GetPool()); aSet.Put(rAttr); + if (!aSet.Count()) + { + // If there are no items to be applied on the shape, then don't set anything, it would + // terminate text edit without a good reason, which affects undo/redo. + return; + } + // Set shadow items on the marked shape. mrView.SetAttrToMarked(aSet, /*bReplaceAll=*/false); } commit 2b567b9f3c06349ecb368c2592fd48599c91bb56 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Jun 27 10:00:13 2022 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Jun 27 19:26:46 2022 +0200 crashtesting: fix assert seen with forum-mso-en-8349.docx a string that ends in spaces Change-Id: I808f046be816d0d4a76f801a349e284024a2061c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136465 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 738065c53b58..a1c280a9869a 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -4482,7 +4482,7 @@ static OUString lcl_ExtractVariableAndHint( const OUString& rCommand, OUString& sal_Int32 nIndex = rCommand.indexOf( ' ', 2); //find last space after 'ASK' if (nIndex == -1) return OUString(); - while(rCommand[nIndex] == ' ') + while (nIndex < rCommand.getLength() && rCommand[nIndex] == ' ') ++nIndex; OUString sShortCommand( rCommand.copy( nIndex ) ); //cut off the " ASK " commit 74ab282da2b020f71c24fb6006cd3c3d63c3f21f Author: Balazs Varga <balazs.varga...@gmail.com> AuthorDate: Fri Jun 17 16:51:22 2022 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Jun 27 19:26:46 2022 +0200 tdf#148820 sc: fix conditional formatted cell color Store foreground color for color filtering, because in OOXML the foreground color is used for color filtering and we overwrote it with the background color which is used for conditional formatted cells too. Regression from commit: 6f908b48373b71d45c8119b296b0504fb586f6f8 (tdf#143104 Fix xlsx import/export of color filter colors) Change-Id: I737e6f1170851822a2689fa477db59e62f0d47fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136055 Tested-by: Jenkins Tested-by: Gabor Kelemen <kelem...@ubuntu.com> Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> (cherry picked from commit 415dc3bb1c03dbdbc3cbca274bc435ac7557ba2d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136457 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136479 diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index ba55d734515c..45ac886d5c50 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -2809,6 +2809,7 @@ void SvxLineItem::SetLine( const SvxBorderLine* pNew ) SvxBrushItem::SvxBrushItem(sal_uInt16 _nWhich) : SfxPoolItem(_nWhich) , aColor(COL_TRANSPARENT) + , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) , nGraphicTransparency(0) , eGraphicPos(GPOS_NONE) @@ -2819,6 +2820,7 @@ SvxBrushItem::SvxBrushItem(sal_uInt16 _nWhich) SvxBrushItem::SvxBrushItem(const Color& rColor, sal_uInt16 _nWhich) : SfxPoolItem(_nWhich) , aColor(rColor) + , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) , nGraphicTransparency(0) , eGraphicPos(GPOS_NONE) @@ -2829,6 +2831,7 @@ SvxBrushItem::SvxBrushItem(const Color& rColor, sal_uInt16 _nWhich) SvxBrushItem::SvxBrushItem(const Graphic& rGraphic, SvxGraphicPosition ePos, sal_uInt16 _nWhich) : SfxPoolItem(_nWhich) , aColor(COL_TRANSPARENT) + , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) , xGraphicObject(new GraphicObject(rGraphic)) , nGraphicTransparency(0) @@ -2841,6 +2844,7 @@ SvxBrushItem::SvxBrushItem(const Graphic& rGraphic, SvxGraphicPosition ePos, sal SvxBrushItem::SvxBrushItem(const GraphicObject& rGraphicObj, SvxGraphicPosition ePos, sal_uInt16 _nWhich) : SfxPoolItem(_nWhich) , aColor(COL_TRANSPARENT) + , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) , xGraphicObject(new GraphicObject(rGraphicObj)) , nGraphicTransparency(0) @@ -2854,6 +2858,7 @@ SvxBrushItem::SvxBrushItem(const OUString& rLink, const OUString& rFilter, SvxGraphicPosition ePos, sal_uInt16 _nWhich) : SfxPoolItem(_nWhich) , aColor(COL_TRANSPARENT) + , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) , nGraphicTransparency(0) , maStrLink(rLink) @@ -2867,6 +2872,7 @@ SvxBrushItem::SvxBrushItem(const OUString& rLink, const OUString& rFilter, SvxBrushItem::SvxBrushItem(const SvxBrushItem& rItem) : SfxPoolItem(rItem) , aColor(rItem.aColor) + , aFilterColor(rItem.aFilterColor) , nShadingValue(rItem.nShadingValue) , xGraphicObject(rItem.xGraphicObject ? new GraphicObject(*rItem.xGraphicObject) : nullptr) , nGraphicTransparency(rItem.nGraphicTransparency) @@ -2880,6 +2886,7 @@ SvxBrushItem::SvxBrushItem(const SvxBrushItem& rItem) SvxBrushItem::SvxBrushItem(SvxBrushItem&& rItem) : SfxPoolItem(std::move(rItem)) , aColor(std::move(rItem.aColor)) + , aFilterColor(std::move(rItem.aFilterColor)) , nShadingValue(std::move(rItem.nShadingValue)) , xGraphicObject(std::move(rItem.xGraphicObject)) , nGraphicTransparency(std::move(rItem.nGraphicTransparency)) @@ -3134,8 +3141,8 @@ bool SvxBrushItem::operator==( const SfxPoolItem& rAttr ) const assert(SfxPoolItem::operator==(rAttr)); const SvxBrushItem& rCmp = static_cast<const SvxBrushItem&>(rAttr); - bool bEqual = ( aColor == rCmp.aColor && eGraphicPos == rCmp.eGraphicPos && - nGraphicTransparency == rCmp.nGraphicTransparency); + bool bEqual = ( aColor == rCmp.aColor && aFilterColor == rCmp.aFilterColor && + eGraphicPos == rCmp.eGraphicPos && nGraphicTransparency == rCmp.nGraphicTransparency); if ( bEqual ) { @@ -3343,6 +3350,7 @@ void SvxBrushItem::dumpAsXml(xmlTextWriterPtr pWriter) const (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SvxBrushItem")); (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("color"), BAD_CAST(aColor.AsRGBHexString().toUtf8().getStr())); + (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("filtercolor"), BAD_CAST(aFilterColor.AsRGBHexString().toUtf8().getStr())); (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("shadingValue"), BAD_CAST(OString::number(nShadingValue).getStr())); (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("link"), BAD_CAST(maStrLink.toUtf8().getStr())); (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("filter"), BAD_CAST(maStrFilter.toUtf8().getStr())); diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx index 036463c85079..1a841c32d6a1 100644 --- a/include/editeng/brushitem.hxx +++ b/include/editeng/brushitem.hxx @@ -43,6 +43,7 @@ enum SvxGraphicPosition class EDITENG_DLLPUBLIC SvxBrushItem final : public SfxPoolItem { Color aColor; + Color aFilterColor; sal_Int32 nShadingValue; mutable std::unique_ptr<GraphicObject> xGraphicObject; sal_Int8 nGraphicTransparency; //contains a percentage value which is @@ -90,6 +91,10 @@ public: Color& GetColor() { return aColor; } void SetColor( const Color& rCol) { aColor = rCol; } + const Color& GetFiltColor() const { return aFilterColor; } + Color& GetFiltColor() { return aFilterColor; } + void SetFiltColor( const Color& rCol) { aFilterColor = rCol; } + SvxGraphicPosition GetGraphicPos() const { return eGraphicPos; } sal_Int32 GetShadingValue() const { return nShadingValue; } diff --git a/sc/qa/unit/data/xlsx/tdf148820.xlsx b/sc/qa/unit/data/xlsx/tdf148820.xlsx new file mode 100644 index 000000000000..89c6488e1775 Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf148820.xlsx differ diff --git a/sc/qa/unit/subsequent_export_test2.cxx b/sc/qa/unit/subsequent_export_test2.cxx index 9776b1629197..c958f40402ef 100644 --- a/sc/qa/unit/subsequent_export_test2.cxx +++ b/sc/qa/unit/subsequent_export_test2.cxx @@ -218,6 +218,7 @@ public: void testTdf130104_XLSXIndent(); void testWholeRowBold(); void testXlsxRowsOrder(); + void testTdf148820(); CPPUNIT_TEST_SUITE(ScExportTest2); @@ -335,6 +336,7 @@ public: CPPUNIT_TEST(testTdf130104_XLSXIndent); CPPUNIT_TEST(testWholeRowBold); CPPUNIT_TEST(testXlsxRowsOrder); + CPPUNIT_TEST(testTdf148820); CPPUNIT_TEST_SUITE_END(); @@ -3124,6 +3126,36 @@ void ScExportTest2::testXlsxRowsOrder() xDocSh->DoClose(); } +void ScExportTest2::testTdf148820() +{ + ScDocShellRef xDocSh = loadDoc(u"tdf148820.", FORMAT_XLSX); + std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(*xDocSh, FORMAT_XLSX); + xmlDocUniquePtr pSheet + = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/worksheets/sheet1.xml"); + CPPUNIT_ASSERT(pSheet); + + sal_Int32 nDxfIdCondFormatFirst + = getXPath(pSheet, "/x:worksheet/x:conditionalFormatting[1]/x:cfRule", "dxfId").toInt32() + + 1; + sal_Int32 nDxfIdCondFormatLast + = getXPath(pSheet, "/x:worksheet/x:conditionalFormatting[20]/x:cfRule", "dxfId").toInt32() + + 1; + + xmlDocUniquePtr pStyles = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/styles.xml"); + CPPUNIT_ASSERT(pStyles); + + OString sDxfCondFormatXPath("/x:styleSheet/x:dxfs/x:dxf[" + + OString::number(nDxfIdCondFormatFirst) + + "]/x:fill/x:patternFill/x:bgColor"); + assertXPath(pStyles, sDxfCondFormatXPath, "rgb", "FF53B5A9"); + sDxfCondFormatXPath + = OString("/x:styleSheet/x:dxfs/x:dxf[" + OString::number(nDxfIdCondFormatLast) + + "]/x:fill/x:patternFill/x:bgColor"); + assertXPath(pStyles, sDxfCondFormatXPath, "rgb", "FFA30000"); + + xDocSh->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest2); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx index d0a32d599db1..4d9e7aeed33d 100644 --- a/sc/source/filter/inc/stylesbuffer.hxx +++ b/sc/source/filter/inc/stylesbuffer.hxx @@ -466,6 +466,7 @@ typedef std::shared_ptr< Border > BorderRef; struct PatternFillModel { Color maPatternColor; /// Pattern foreground color. + Color maFilterPatternColor; /// Pattern foreground for color filter. Color maFillColor; /// Background fill color. sal_Int32 mnPattern; /// Pattern identifier (e.g. solid). bool mbPattColorUsed; /// True = pattern foreground color used. @@ -503,6 +504,7 @@ struct GradientFillModel struct ApiSolidFillData { ::Color mnColor; /// Fill color. + ::Color mnFilterColor; /// Fill color filtering. bool mbTransparent; /// True = transparent area. bool mbUsed; /// True = fill data is valid. diff --git a/sc/source/filter/oox/autofilterbuffer.cxx b/sc/source/filter/oox/autofilterbuffer.cxx index 6bffe8e53b25..fc2ecb22030e 100644 --- a/sc/source/filter/oox/autofilterbuffer.cxx +++ b/sc/source/filter/oox/autofilterbuffer.cxx @@ -443,7 +443,7 @@ ApiFilterSettings ColorFilter::finalizeImport() const SfxItemSet& rItemSet = pStyleSheet->GetItemSet(); // Color (whether text or background color) is always stored in ATTR_BACKGROUND const SvxBrushItem* pItem = rItemSet.GetItem<SvxBrushItem>(ATTR_BACKGROUND); - ::Color aColor = pItem->GetColor(); + ::Color aColor = pItem->GetFiltColor(); util::Color nColor(aColor); aSettings.appendField(true, nColor, mbIsBackgroundColor); return aSettings; diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index d40fcdc3d395..9edfb0081b29 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -1618,6 +1618,7 @@ PatternFillModel::PatternFillModel( bool bDxf ) : mbPatternUsed( !bDxf ) { maPatternColor.setIndexed( OOX_COLOR_WINDOWTEXT ); + maFilterPatternColor.setIndexed( OOX_COLOR_WINDOWTEXT ); maFillColor.setIndexed( OOX_COLOR_WINDOWBACK ); } @@ -1676,6 +1677,7 @@ void GradientFillModel::readGradientStop( SequenceInputStream& rStrm, bool bDxf ApiSolidFillData::ApiSolidFillData() : mnColor( API_RGB_TRANSPARENT ), + mnFilterColor( API_RGB_TRANSPARENT ), mbTransparent( true ), mbUsed( false ) { @@ -1827,8 +1829,8 @@ void Fill::finalizeImport() { if( rModel.mbFillColorUsed && (!rModel.mbPatternUsed || (rModel.mnPattern == XML_solid)) ) { - if (!rModel.mbPatternUsed) - rModel.maPatternColor = rModel.maFillColor; + rModel.maFilterPatternColor = rModel.maPatternColor; + rModel.maPatternColor = rModel.maFillColor; rModel.mnPattern = XML_solid; rModel.mbPattColorUsed = rModel.mbPatternUsed = true; } @@ -1838,6 +1840,8 @@ void Fill::finalizeImport() { rModel.mbPatternUsed = false; } + else + rModel.maFilterPatternColor = rModel.maPatternColor; } // convert to API fill settings @@ -1875,15 +1879,20 @@ void Fill::finalizeImport() ::Color nWinTextColor = rGraphicHelper.getSystemColor( XML_windowText ); ::Color nWinColor = rGraphicHelper.getSystemColor( XML_window ); - if( !rModel.mbPattColorUsed ) + if (!rModel.mbPattColorUsed) + { rModel.maPatternColor.setAuto(); + rModel.maFilterPatternColor.setAuto(); + } ::Color nPattColor = rModel.maPatternColor.getColor( rGraphicHelper, nWinTextColor ); + ::Color nFiltPattColor = rModel.maFilterPatternColor.getColor( rGraphicHelper, nWinTextColor ); if( !rModel.mbFillColorUsed ) rModel.maFillColor.setAuto(); ::Color nFillColor = rModel.maFillColor.getColor( rGraphicHelper, nWinColor ); maApiData.mnColor = lclGetMixedColor( nPattColor, nFillColor, nAlpha ); + maApiData.mnFilterColor = lclGetMixedColor( nFiltPattColor, nFillColor, nAlpha ); maApiData.mbTransparent = false; } } @@ -1913,10 +1922,12 @@ void Fill::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) const if ( maApiData.mbTransparent ) { aBrushItem.SetColor( COL_TRANSPARENT ); + aBrushItem.SetFiltColor( COL_TRANSPARENT ); } else { aBrushItem.SetColor( maApiData.mnColor ); + aBrushItem.SetFiltColor( maApiData.mnFilterColor ); } ScfTools::PutItem( rItemSet, aBrushItem, bSkipPoolDefs ); } commit ad2a818c1d91c89ed3dedab5005f278ac9d6792c Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Jun 27 09:40:22 2022 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Jun 27 19:11:29 2022 +0200 crashtesting: fix assert seen on loading forum-nl-1226.ods Change-Id: If8c08a51b11a459a03b4a0604c1fb9897351e598 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136467 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Jenkins diff --git a/external/libnumbertext/EmptyString.patch1 b/external/libnumbertext/EmptyString.patch1 new file mode 100644 index 000000000000..d6570117da09 --- /dev/null +++ b/external/libnumbertext/EmptyString.patch1 @@ -0,0 +1,13 @@ +--- a/src/Soros.cxx 2022-06-27 09:36:46.486075920 +0100 ++++ b/src/Soros.cxx 2022-06-27 09:37:52.594072196 +0100 +@@ -98,8 +98,8 @@ + s = regex_replace(s, quoteEnd, L""); + s = translate(s, c.substr(1), m.substr(1), L""); + replace(s, slash, L"\\\\"); // -> \\, ", ;, # +- begins.push_back(s[0] == L'^'); +- ends.push_back(s[s.length()-1] == L'$'); ++ begins.push_back(!s.empty() && s[0] == L'^'); ++ ends.push_back(!s.empty() && s[s.length()-1] == L'$'); + s = L"^" + regex_replace(s, wregex(L"^\\^"), L""); + s = regex_replace(s, wregex(L"\\$$"), L"") + L"$"; + try diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk b/external/libnumbertext/UnpackedTarball_libnumbertext.mk index 48cd2a9a273d..fb88366d5aef 100644 --- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk +++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk @@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libnumbertext,1)) $(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \ external/libnumbertext/MSVCNonBMPBug.patch1 \ external/libnumbertext/WinUnicodePath.patch1 \ + external/libnumbertext/EmptyString.patch1 \ )) # vim: set noet sw=4 ts=4: