diff --git a/bsc1198666.patch b/bsc1198666.patch deleted file mode 100644 index 5416a59..0000000 --- a/bsc1198666.patch +++ /dev/null @@ -1,520 +0,0 @@ -From 8da40c7a3c9680adb4ab0209384808545146b8e0 Mon Sep 17 00:00:00 2001 -From: Sarper Akdemir -Date: Tue, 28 Feb 2023 16:13:48 +0300 -Subject: [PATCH] tdf#102261: introduce editeng paragraph tab stop default - distance - -Adds mnDefaultDistance to SvxTabStopItem that if defined -will set a paragraph wide tab stop default distance and -override the document wide setting. - -Also makes editeng consider mnDefaultDistance while getting -tab stop default distance. - -Change-Id: I0fa098f874d6b9c91ddbaa2634224ff55cafcc95 -Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148058 -Tested-by: Jenkins -Reviewed-by: Miklos Vajna - -tdf#102261: pptx import: handle defTabSz - -Introduce import of defTabSz using ParaTabStopDefaultDistance. - -Change-Id: Ied59c2bc5d9dfffa6254ef87849c3dbad4c48d07 -Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148059 -Tested-by: Jenkins -Reviewed-by: Miklos Vajna - -tdf#102261: pptx export: implement defTabSz ParaTabStopDefaultDistance - -Adds export of ParaTabStopDefaultDistance property into defTabSz. - -Also adds a unit test that checks pptx roundtrip of the property. - -Change-Id: I5be9ea88b15e3e8cab25af79488983a71b96dae1 -Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148539 -Tested-by: Jenkins -Reviewed-by: Miklos Vajna - -related tdf#102261: consider ParaTabStopDefaultDistance in SvxRuler - -If there's a paragraph scoped tab default distance defined, -use that as the default tab distance in the SvxRuler instead -of the document wide setting. - -Change-Id: I9b0e7d0db0b25aee08bd27948b2e462b4a4ee496 -Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148060 -Tested-by: Jenkins -Reviewed-by: Sarper Akdemir - -related tdf#102261: xmloff: ODF import/export for ParaTabStopDefaultDistance - -Introduces ODF import/export for ParaTabStopDefaultDistance -(loext:tab-stop-distance). - -Also adds a unit test that covers import & export of the -property. - -Change-Id: I8a69a9e2b73e8f1172f92dc35fada901f4b887f4 -Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148540 -Tested-by: Jenkins -Reviewed-by: Miklos Vajna ---- - editeng/source/editeng/editdoc.cxx | 11 +++++ - editeng/source/items/paraitem.cxx | 32 ++++++++++++++ - include/editeng/memberids.h | 1 + - include/editeng/tstpitem.hxx | 3 ++ - include/editeng/unoprnms.hxx | 1 + - include/editeng/unotext.hxx | 1 + - oox/inc/drawingml/textparagraphproperties.hxx | 2 + - .../drawingml/textparagraphproperties.cxx | 7 +++ - .../textparagraphpropertiescontext.cxx | 12 +++-- - oox/source/export/drawingml.cxx | 6 +++ - oox/source/token/properties.txt | 1 + - .../OpenDocument-v1.3+libreoffice-schema.rng | 6 +++ - ...102261_testParaTabStopDefaultDistance.pptx | Bin 0 -> 32892 bytes - sd/qa/unit/export-tests-ooxml3.cxx | 24 ++++++++++ - sd/qa/unit/import-tests2.cxx | 4 +- - svx/source/dialog/svxruler.cxx | 9 ++-- - xmloff/inc/xmlprop.hxx | 1 + - .../data/paragraph-tab-stop-distance.fodp | 19 ++++++++ - xmloff/qa/unit/text.cxx | 41 ++++++++++++++++++ - xmloff/source/text/txtprmap.cxx | 2 + - 20 files changed, 174 insertions(+), 9 deletions(-) - create mode 100644 sd/qa/unit/data/pptx/tdf102261_testParaTabStopDefaultDistance.pptx - create mode 100644 xmloff/qa/unit/data/paragraph-tab-stop-distance.fodp - -diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx -index 1fbf46de184b..9fff222d9368 100644 ---- a/editeng/source/editeng/editdoc.cxx -+++ b/editeng/source/editeng/editdoc.cxx -@@ -857,6 +857,13 @@ void ConvertItem( std::unique_ptr& rPoolItem, MapUnit eSourceUnit, - assert(dynamic_cast(rPoolItem.get()) != nullptr); - SvxTabStopItem& rItem = static_cast(*rPoolItem); - SvxTabStopItem* pNewItem(new SvxTabStopItem(EE_PARA_TABS)); -+ -+ if (sal_Int32 nDefTabDistance = rItem.GetDefaultDistance()) -+ { -+ pNewItem->SetDefaultDistance( -+ OutputDevice::LogicToLogic(nDefTabDistance, eSourceUnit, eDestUnit)); -+ } -+ - for ( sal_uInt16 i = 0; i < rItem.Count(); i++ ) - { - const SvxTabStop& rTab = rItem[i]; -@@ -1821,6 +1828,10 @@ SvxTabStop ContentAttribs::FindTabStop( sal_Int32 nCurPos, sal_uInt16 nDefTab ) - return rTab; - } - -+ // if there's a default tab size defined for this item use that instead -+ if (rTabs.GetDefaultDistance()) -+ nDefTab = rTabs.GetDefaultDistance(); -+ - // Determine DefTab ... - SvxTabStop aTabStop; - const sal_Int32 x = nCurPos / nDefTab + 1; -diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx -index 9368dfdf3c2a..f67ddf599b06 100644 ---- a/editeng/source/items/paraitem.cxx -+++ b/editeng/source/items/paraitem.cxx -@@ -821,6 +821,15 @@ sal_uInt16 SvxTabStopItem::GetPos( const sal_Int32 nPos ) const - return it != maTabStops.end() ? it - maTabStops.begin() : SVX_TAB_NOTFOUND; - } - -+void SvxTabStopItem::SetDefaultDistance(sal_Int32 nDefaultDistance) -+{ -+ mnDefaultDistance = nDefaultDistance; -+} -+ -+sal_Int32 SvxTabStopItem::GetDefaultDistance() const -+{ -+ return mnDefaultDistance; -+} - - bool SvxTabStopItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const - { -@@ -859,6 +868,11 @@ bool SvxTabStopItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const - rVal <<= static_cast(bConvert ? convertTwipToMm100(rTab.GetTabPos()) : rTab.GetTabPos()); - break; - } -+ case MID_TABSTOP_DEFAULT_DISTANCE: -+ { -+ rVal <<= static_cast(bConvert ? convertTwipToMm100(mnDefaultDistance) : mnDefaultDistance); -+ break; -+ } - } - return true; - } -@@ -956,6 +970,18 @@ bool SvxTabStopItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) - Insert( aNewTab ); - break; - } -+ case MID_TABSTOP_DEFAULT_DISTANCE: -+ { -+ sal_Int32 nNewDefaultDistance = 0; -+ if (!(rVal >>= nNewDefaultDistance)) -+ return false; -+ if (bConvert) -+ nNewDefaultDistance = o3tl::toTwips(nNewDefaultDistance, o3tl::Length::mm100); -+ if (nNewDefaultDistance <= 0) -+ return false; -+ mnDefaultDistance = nNewDefaultDistance; -+ break; -+ } - } - return true; - } -@@ -967,6 +993,9 @@ bool SvxTabStopItem::operator==( const SfxPoolItem& rAttr ) const - - const SvxTabStopItem& rTSI = static_cast(rAttr); - -+ if ( mnDefaultDistance != rTSI.GetDefaultDistance() ) -+ return false; -+ - if ( Count() != rTSI.Count() ) - return false; - -@@ -990,6 +1019,7 @@ bool SvxTabStopItem::GetPresentation - ) const - { - rText.clear(); -+ // TODO also consider mnDefaultTabDistance here - - bool bComma = false; - -@@ -1038,6 +1068,8 @@ void SvxTabStopItem::Insert( const SvxTabStopItem* pTabs ) - void SvxTabStopItem::dumpAsXml(xmlTextWriterPtr pWriter) const - { - (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SvxTabStopItem")); -+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("mnDefaultDistance"), -+ BAD_CAST(OString::number(mnDefaultDistance).getStr())); - for (const auto& rTabStop : maTabStops) - rTabStop.dumpAsXml(pWriter); - (void)xmlTextWriterEndElement(pWriter); -diff --git a/include/editeng/memberids.h b/include/editeng/memberids.h -index 9b89ebafaefb..ca3be460c566 100644 ---- a/include/editeng/memberids.h -+++ b/include/editeng/memberids.h -@@ -40,6 +40,7 @@ - // SvxTabStop - #define MID_TABSTOPS 0 - #define MID_STD_TAB 1 -+#define MID_TABSTOP_DEFAULT_DISTANCE 2 - - //SvxHyphenZoneItem - #define MID_IS_HYPHEN 0 -diff --git a/include/editeng/tstpitem.hxx b/include/editeng/tstpitem.hxx -index b5aab04bc92d..4c015d6677ec 100644 ---- a/include/editeng/tstpitem.hxx -+++ b/include/editeng/tstpitem.hxx -@@ -92,6 +92,7 @@ typedef o3tl::sorted_vector SvxTabStopArr; - class EDITENG_DLLPUBLIC SvxTabStopItem final : public SfxPoolItem - { - SvxTabStopArr maTabStops; -+ sal_Int32 mnDefaultDistance = 0; - - public: - static SfxPoolItem* CreateDefault(); -@@ -107,6 +108,8 @@ public: - - // Returns index of the tab at nPos, or TAB_NOTFOUND - sal_uInt16 GetPos( const sal_Int32 nPos ) const; -+ void SetDefaultDistance(sal_Int32 nDefaultDistancenDefTabSize); -+ sal_Int32 GetDefaultDistance() const; - - // unprivatized: - sal_uInt16 Count() const { return maTabStops.size(); } -diff --git a/include/editeng/unoprnms.hxx b/include/editeng/unoprnms.hxx -index 7a95ba989b86..f8239b470404 100644 ---- a/include/editeng/unoprnms.hxx -+++ b/include/editeng/unoprnms.hxx -@@ -291,6 +291,7 @@ inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_LMARGIN = u"ParaLeftMargin"; - inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_LINESPACING = u"ParaLineSpacing"; - inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_RMARGIN = u"ParaRightMargin"; - inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_TAPSTOPS = u"ParaTabStops"; -+inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_TABSTOP_DEFAULT_DISTANCE = u"ParaTabStopDefaultDistance"; - inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_TMARGIN = u"ParaTopMargin"; - inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_IS_HYPHEN = u"ParaIsHyphenation"; - inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION = u"ParaIsHangingPunctuation"; -diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx -index 1d6743a0e410..d76305df24bd 100644 ---- a/include/editeng/unotext.hxx -+++ b/include/editeng/unotext.hxx -@@ -146,6 +146,7 @@ struct SfxItemPropertyMapEntry; - { UNO_NAME_EDIT_PARA_LINESPACING, EE_PARA_SBL, cppu::UnoType::get(), 0, CONVERT_TWIPS}, \ - { UNO_NAME_EDIT_PARA_RMARGIN, EE_PARA_LRSPACE, ::cppu::UnoType::get(), 0, MID_R_MARGIN, PropertyMoreFlags::METRIC_ITEM }, \ - { UNO_NAME_EDIT_PARA_TAPSTOPS, EE_PARA_TABS, cppu::UnoType>::get(), 0, 0 }, \ -+ { UNO_NAME_EDIT_PARA_TABSTOP_DEFAULT_DISTANCE, EE_PARA_TABS, ::cppu::UnoType::get(), 0, MID_TABSTOP_DEFAULT_DISTANCE }, \ - { UNO_NAME_EDIT_PARA_TMARGIN, EE_PARA_ULSPACE, ::cppu::UnoType::get(), 0, MID_UP_MARGIN, PropertyMoreFlags::METRIC_ITEM },\ - { UNO_NAME_EDIT_PARA_FIRST_LINE_INDENT, EE_PARA_LRSPACE, ::cppu::UnoType::get(), 0, MID_FIRST_LINE_INDENT, PropertyMoreFlags::METRIC_ITEM}, \ - { UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION,EE_PARA_HANGINGPUNCTUATION, cppu::UnoType::get(), 0 ,0 }, \ -diff --git a/oox/inc/drawingml/textparagraphproperties.hxx b/oox/inc/drawingml/textparagraphproperties.hxx -index 083b61e37da7..d3742e7377e0 100644 ---- a/oox/inc/drawingml/textparagraphproperties.hxx -+++ b/oox/inc/drawingml/textparagraphproperties.hxx -@@ -89,6 +89,7 @@ public: - TextSpacing& getParaBottomMargin() { return maParaBottomMargin; } - std::optional< sal_Int32 >& getParaLeftMargin(){ return moParaLeftMargin; } - std::optional< sal_Int32 >& getFirstLineIndentation(){ return moFirstLineIndentation; } -+ std::optional& getDefaultTabSize() { return moDefaultTabSize; } - - std::optional< css::style::ParagraphAdjust >& getParaAdjust() { return moParaAdjust; } - void setParaAdjust( css::style::ParagraphAdjust nParaAdjust ) { moParaAdjust = nParaAdjust; } -@@ -125,6 +126,7 @@ private: - std::optional< sal_Int32 > moParaLeftMargin; - std::optional< sal_Int32 > moFirstLineIndentation; - std::optional< css::style::ParagraphAdjust > moParaAdjust; -+ std::optional< sal_Int32 > moDefaultTabSize; - sal_Int16 mnLevel; - TextSpacing maLineSpacing; - }; -diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx -index 0006b7530a76..af65e0037d16 100644 ---- a/oox/source/drawingml/textparagraphproperties.cxx -+++ b/oox/source/drawingml/textparagraphproperties.cxx -@@ -395,6 +395,8 @@ void TextParagraphProperties::apply( const TextParagraphProperties& rSourceProps - moParaLeftMargin = rSourceProps.moParaLeftMargin; - if ( rSourceProps.moFirstLineIndentation ) - moFirstLineIndentation = rSourceProps.moFirstLineIndentation; -+ if ( rSourceProps.moDefaultTabSize ) -+ moDefaultTabSize = rSourceProps.moDefaultTabSize; - if( rSourceProps.mnLevel ) - mnLevel = rSourceProps.mnLevel; - if( rSourceProps.moParaAdjust ) -@@ -501,6 +503,11 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p - } - } - -+ if ( moDefaultTabSize ) -+ { -+ aPropSet.setProperty( PROP_ParaTabStopDefaultDistance, *moDefaultTabSize ); -+ } -+ - if ( moParaAdjust ) - { - aPropSet.setProperty( PROP_ParaAdjust, *moParaAdjust); -diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx -index 4e83d2ece24b..e75d65913cd9 100644 ---- a/oox/source/drawingml/textparagraphpropertiescontext.cxx -+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx -@@ -93,10 +93,14 @@ TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler2H - // TODO see to do the same with RubyAdjust - - // ST_Coordinate32 --// sValue = rAttribs.getString( XML_defTabSz ).get(); SJ: we need to be able to set the default tab size for each text object, --// this is possible at the moment only for the whole document. --// sal_Int32 nDefTabSize = ( sValue.getLength() == 0 ? 0 : GetCoordinate( sValue ) ); -- // TODO -+ if ( rAttribs.hasAttribute(XML_defTabSz)) -+ { -+ sValue = rAttribs.getStringDefaulted(XML_defTabSz); -+ if(!sValue.isEmpty()) -+ { -+ mrTextParagraphProperties.getDefaultTabSize() = GetCoordinate(sValue); -+ } -+ } - - // bool bEaLineBrk = rAttribs.getBool( XML_eaLnBrk, true ); - if ( rAttribs.hasAttribute( XML_latinLnBrk ) ) -diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx -index f39951ade707..cd94896503a9 100644 ---- a/oox/source/export/drawingml.cxx -+++ b/oox/source/export/drawingml.cxx -@@ -3233,6 +3233,10 @@ bool DrawingML::WriteParagraphProperties(const Reference& rParagra - return false; - } - -+ sal_Int32 nParaDefaultTabSize = 0; -+ if (GetProperty(rXPropSet, "ParaTabStopDefaultDistance")) -+ mAny >>= nParaDefaultTabSize; -+ - // for autofitted textboxes, scale the indents - if (GetProperty(rXShapePropSet, "TextFitToSize") && mAny.get() == TextFitToSizeType_AUTOFIT) - { -@@ -3257,6 +3261,7 @@ bool DrawingML::WriteParagraphProperties(const Reference& rParagra - XML_marL, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nParaLeftMargin)), nParaLeftMargin > 0), - XML_indent, sax_fastparser::UseIf(OString::number(!bForceZeroIndent ? oox::drawingml::convertHmmToEmu(nParaFirstLineIndent) : 0), (bForceZeroIndent || (nParaFirstLineIndent != 0))), - XML_algn, GetAlignment( nAlignment ), -+ XML_defTabSz, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nParaDefaultTabSize)), nParaDefaultTabSize > 0), - XML_rtl, sax_fastparser::UseIf(ToPsz10(bRtl), bRtl)); - else - mpFS->startElementNS( XML_a, nElement, -@@ -3264,6 +3269,7 @@ bool DrawingML::WriteParagraphProperties(const Reference& rParagra - XML_marL, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nLeftMargin)), nLeftMargin > 0), - XML_indent, sax_fastparser::UseIf(OString::number(!bForceZeroIndent ? oox::drawingml::convertHmmToEmu(nLineIndentation) : 0), (bForceZeroIndent || ( nLineIndentation != 0))), - XML_algn, GetAlignment( nAlignment ), -+ XML_defTabSz, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nParaDefaultTabSize)), nParaDefaultTabSize > 0), - XML_rtl, sax_fastparser::UseIf(ToPsz10(bRtl), bRtl)); - - -diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt -index 60b5c375c033..2394ca94300b 100644 ---- a/oox/source/token/properties.txt -+++ b/oox/source/token/properties.txt -@@ -382,6 +382,7 @@ ParaLeftMargin - ParaLineSpacing - ParaRightMargin - ParaTabStops -+ParaTabStopDefaultDistance - ParaTopMargin - Path - PercentageNumberFormat -diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx -index 5d5864a2891e..4467c5f81381 100644 ---- a/sd/qa/unit/import-tests2.cxx -+++ b/sd/qa/unit/import-tests2.cxx -@@ -1500,8 +1500,8 @@ void SdImportTest2::testTdf120028() - double fCharHeight = 0; - xPropSet->getPropertyValue("CharHeight") >>= fCharHeight; - CPPUNIT_ASSERT_DOUBLES_EQUAL(13.5, fCharHeight, 1E-12); -- // 13.5 * 87% is approx. 11.7 (the correct scaled font size) -- CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(87)), xShape->getPropertyValue("TextFitToSizeScale")); -+ // 13.5 * 90% is approx. 12.1 (the correct scaled font size) -+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(90)), xShape->getPropertyValue("TextFitToSizeScale")); - } - - void SdImportTest2::testDescriptionImport() -diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx -index be53a0c91c58..671afa9f6737 100644 ---- a/svx/source/dialog/svxruler.cxx -+++ b/svx/source/dialog/svxruler.cxx -@@ -1027,7 +1027,10 @@ void SvxRuler::UpdateTabs() - const tools::Long lPosPixel = ConvertHPosPixel(lParaIndent) + lLastTab; - const tools::Long lRightIndent = ConvertHPosPixel(nRightFrameMargin - mxParaItem->GetRight()); - -- tools::Long nDefTabDist = ConvertHPosPixel(lDefTabDist); -+ tools::Long lCurrentDefTabDist = lDefTabDist; -+ if(mxTabStopItem->GetDefaultDistance()) -+ lCurrentDefTabDist = mxTabStopItem->GetDefaultDistance(); -+ tools::Long nDefTabDist = ConvertHPosPixel(lCurrentDefTabDist); - - const sal_uInt16 nDefTabBuf = lPosPixel > lRightIndent || lLastTab > lRightIndent - ? 0 -@@ -1063,13 +1066,13 @@ void SvxRuler::UpdateTabs() - } - - // Adjust to previous-to-first default tab stop -- lLastTabOffsetLogic -= lLastTabOffsetLogic % lDefTabDist; -+ lLastTabOffsetLogic -= lLastTabOffsetLogic % lCurrentDefTabDist; - - // fill the rest with default Tabs - for (j = 0; j < nDefTabBuf; ++j) - { - //simply add the default distance to the last position -- lLastTabOffsetLogic += lDefTabDist; -+ lLastTabOffsetLogic += lCurrentDefTabDist; - if (bRTL) - { - mpTabs[nTabCount + TAB_GAP].nPos = -diff --git a/xmloff/inc/xmlprop.hxx b/xmloff/inc/xmlprop.hxx -index 868f619a7246..2326bcf2f34d 100644 ---- a/xmloff/inc/xmlprop.hxx -+++ b/xmloff/inc/xmlprop.hxx -@@ -518,6 +518,7 @@ inline constexpr OUStringLiteral PROP_ParaRightMarginRelative = u"ParaRightMargi - inline constexpr OUStringLiteral PROP_ParaShadowFormat = u"ParaShadowFormat"; - inline constexpr OUStringLiteral PROP_ParaSplit = u"ParaSplit"; - inline constexpr OUStringLiteral PROP_ParaTabStops = u"ParaTabStops"; -+inline constexpr OUStringLiteral PROP_ParaTabStopDefaultDistance = u"ParaTabStopDefaultDistance"; - inline constexpr OUStringLiteral PROP_ParaTopMargin = u"ParaTopMargin"; - inline constexpr OUStringLiteral PROP_ParaTopMarginRelative = u"ParaTopMarginRelative"; - inline constexpr OUStringLiteral PROP_ParaUserDefinedAttributes = u"ParaUserDefinedAttributes"; -diff --git a/xmloff/qa/unit/data/paragraph-tab-stop-distance.fodp b/xmloff/qa/unit/data/paragraph-tab-stop-distance.fodp -new file mode 100644 -index 000000000000..f51e75b79699 ---- /dev/null -+++ b/xmloff/qa/unit/data/paragraph-tab-stop-distance.fodp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ starttab1tab2tab4 -+ -+ -+ -+ -+ -+ -diff --git a/xmloff/qa/unit/text.cxx b/xmloff/qa/unit/text.cxx -index 9c30c2f81dee..62ffe78fa570 100644 ---- a/xmloff/qa/unit/text.cxx -+++ b/xmloff/qa/unit/text.cxx -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -892,6 +893,46 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testScaleWidthRedline) - assertXPath(pXmlDoc, "//draw:frame[@draw:name='Image45']", "width", "6.1728in"); - } - -+CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testParagraphScopedTabDistance) -+{ -+ // Given a document with paragraph scoped default tab stop distance (loext:tab-stop-distance="0.5cm") -+ loadFromURL(u"paragraph-tab-stop-distance.fodp"); -+ -+ uno::Reference xDoc(mxComponent, uno::UNO_QUERY); -+ uno::Reference xPage(xDoc->getDrawPages()->getByIndex(0), -+ uno::UNO_QUERY_THROW); -+ -+ uno::Reference xShape(xPage->getByIndex(0), uno::UNO_QUERY); -+ uno::Reference xText -+ = uno::Reference(xShape, uno::UNO_QUERY_THROW)->getText(); -+ -+ uno::Reference paraEnumAccess(xText, uno::UNO_QUERY); -+ uno::Reference paraEnum(paraEnumAccess->createEnumeration()); -+ uno::Reference xParagraph(paraEnum->nextElement(), uno::UNO_QUERY_THROW); -+ -+ uno::Reference runEnumAccess(xParagraph, uno::UNO_QUERY); -+ uno::Reference runEnum = runEnumAccess->createEnumeration(); -+ uno::Reference xRun(runEnum->nextElement(), uno::UNO_QUERY); -+ uno::Reference xPropSet(xRun, uno::UNO_QUERY_THROW); -+ -+ // Make sure the tab stop default distance is imported correctly -+ // Without the accompanying fix in place, this test would have failed with: -+ // - Expected: 10000 -+ // - Actual : 0 -+ CPPUNIT_ASSERT_EQUAL(static_cast(10000), -+ xPropSet->getPropertyValue("ParaTabStopDefaultDistance").get()); -+ -+ // Save the imported file to test the export too -+ save("impress8"); -+ -+ // Then make sure we write the tab-stop-distance -+ xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); -+ assertXPath(pXmlDoc, "//style:style[@style:name='P1']/style:paragraph-properties", -+ "tab-stop-distance", "10cm"); -+ -+ assertXPath(pXmlDoc, "//text:p[@text:style-name='P1']"); -+} -+ - CPPUNIT_PLUGIN_IMPLEMENT(); - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx -index b961a2c60944..d259bf4aa55d 100644 ---- a/xmloff/source/text/txtprmap.cxx -+++ b/xmloff/source/text/txtprmap.cxx -@@ -448,6 +448,8 @@ XMLPropertyMapEntry const aXMLParaPropMap[] = - MP_ED( PROP_ParaIsHangingPunctuation, STYLE, PUNCTUATION_WRAP, XML_TYPE_TEXT_PUNCTUATION_WRAP, 0 ), - MP_ED( PROP_ParaIsForbiddenRules, STYLE, LINE_BREAK, XML_TYPE_TEXT_LINE_BREAK, 0 ), - MP_E( PROP_TabStopDistance, STYLE, TAB_STOP_DISTANCE, XML_TYPE_MEASURE, 0 ), -+ MAP_EXT_I( PROP_ParaTabStopDefaultDistance, XML_NAMESPACE_STYLE, XML_TAB_STOP_DISTANCE, XML_TYPE_MEASURE|XML_TYPE_PROP_PARAGRAPH, 0 ), -+ MAP_EXT( PROP_ParaTabStopDefaultDistance, XML_NAMESPACE_LO_EXT, XML_TAB_STOP_DISTANCE, XML_TYPE_MEASURE|XML_TYPE_PROP_PARAGRAPH, 0 ), - - // RES_PARATR_VERTALIGN - MP_E( PROP_ParaVertAlignment, STYLE, VERTICAL_ALIGN, XML_TYPE_TEXT_VERTICAL_ALIGN, 0 ), --- -2.35.3 - diff --git a/bsc1200085.patch b/bsc1200085.patch deleted file mode 100644 index d787a43..0000000 --- a/bsc1200085.patch +++ /dev/null @@ -1,741 +0,0 @@ -From 016b7dc2d32f8165a22a07d1ff274426c3e07235 Mon Sep 17 00:00:00 2001 -From: Sarper Akdemir -Date: Tue, 21 Feb 2023 02:33:01 +0300 -Subject: [PATCH] related tdf#148966: rework sdr compatibility flags - -Rework access/set methods for sdr compatibility flags so it -is possible to address a compatibility flag without directly -interfacing with SdrModel. - -(preliminary work for exposing compatibility flags to -editeng) - -Change-Id: I2fab219f9e125151916228300be2d9d88156d8a6 -Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147407 -Tested-by: Jenkins -Reviewed-by: Miklos Vajna ---- - -Index: libreoffice-7.5.3.2/include/svx/compatflags.hxx -=================================================================== ---- /dev/null -+++ libreoffice-7.5.3.2/include/svx/compatflags.hxx -@@ -0,0 +1,18 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ -+/* -+ * This file is part of the LibreOffice project. -+ * -+ * This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. -+ */ -+ -+/// SdrCompatibilityFlags that are implemented in SdrModelImpl -+enum class SdrCompatibilityFlag -+{ -+ AnchoredTextOverflowLegacy, ///< for tdf#99729 -+ LegacySingleLineFontwork, ///< for tdf#148000 -+ IgnoreBreakAfterMultilineField, ///< for tdf#148966 -+}; -+ -+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ -Index: libreoffice-7.5.3.2/include/svx/svdmodel.hxx -=================================================================== ---- libreoffice-7.5.3.2.orig/include/svx/svdmodel.hxx -+++ libreoffice-7.5.3.2/include/svx/svdmodel.hxx -@@ -77,6 +77,7 @@ class SdrUndoFactory; - class ImageMap; - class TextChain; - enum class CharCompressType; -+enum class SdrCompatibilityFlag; - namespace comphelper - { - class IEmbeddedHelper; -@@ -571,13 +572,9 @@ public: - void SetAddExtLeading( bool bEnabled ); - bool IsAddExtLeading() const { return mbAddExtLeading; } - -- // tdf#99729 compatibility flag -- void SetAnchoredTextOverflowLegacy(bool bEnabled); -- bool IsAnchoredTextOverflowLegacy() const; -- -- // tdf#148000 compatibility flag -- void SetLegacySingleLineFontwork(bool bEnabled); -- bool IsLegacySingleLineFontwork() const; -+ void SetCompatibilityFlag(SdrCompatibilityFlag eFlag, bool bEnabled); -+ /// @returns state of the SdrCompatibilityFlag -+ bool GetCompatibilityFlag(SdrCompatibilityFlag eFlag) const; - - // tdf#149756 compatibility flag - void SetConnectorUseSnapRect(bool bEnabled); -Index: libreoffice-7.5.3.2/sc/source/ui/docshell/docsh.cxx -=================================================================== ---- libreoffice-7.5.3.2.orig/sc/source/ui/docshell/docsh.cxx -+++ libreoffice-7.5.3.2/sc/source/ui/docshell/docsh.cxx -@@ -77,6 +77,7 @@ - - #include - #include -+#include - #include - - #include -@@ -585,13 +586,16 @@ bool ScDocShell::Load( SfxMedium& rMediu - InitOptions(true); - - // If this is an ODF file being loaded, then by default, use legacy processing -- // for tdf#99729 (if required, it will be overridden in *::ReadUserDataSequence()) -+ // (if required, it will be overridden in *::ReadUserDataSequence()) - if (IsOwnStorageFormat(rMedium)) - { -- if (m_pDocument->GetDrawLayer()) -- m_pDocument->GetDrawLayer()->SetAnchoredTextOverflowLegacy(true); -- if (m_pDocument->GetDrawLayer()) -- m_pDocument->GetDrawLayer()->SetLegacySingleLineFontwork(true); //for tdf#148000 -+ if (ScDrawLayer* pDrawLayer = m_pDocument->GetDrawLayer()) -+ { -+ pDrawLayer->SetCompatibilityFlag(SdrCompatibilityFlag::AnchoredTextOverflowLegacy, -+ true); // for tdf#99729 -+ pDrawLayer->SetCompatibilityFlag(SdrCompatibilityFlag::LegacySingleLineFontwork, -+ true); // for tdf#148000 -+ } - } - - GetUndoManager()->Clear(); -Index: libreoffice-7.5.3.2/sd/source/ui/docshell/docshel4.cxx -=================================================================== ---- libreoffice-7.5.3.2.orig/sd/source/ui/docshell/docshel4.cxx -+++ libreoffice-7.5.3.2/sd/source/ui/docshell/docshel4.cxx -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -265,11 +266,11 @@ bool DrawDocShell::InitNew( const css::u - bool DrawDocShell::Load( SfxMedium& rMedium ) - { - // If this is an ODF file being loaded, then by default, use legacy processing -- // for tdf#99729 (if required, it will be overridden in *::ReadUserDataSequence()) -+ // (if required, it will be overridden in *::ReadUserDataSequence()) - if (IsOwnStorageFormat(rMedium)) - { -- mpDoc->SetAnchoredTextOverflowLegacy(true); -- mpDoc->SetLegacySingleLineFontwork(true); //for tdf#148000 -+ mpDoc->SetCompatibilityFlag(SdrCompatibilityFlag::AnchoredTextOverflowLegacy, true); // for tdf#99729 -+ mpDoc->SetCompatibilityFlag(SdrCompatibilityFlag::LegacySingleLineFontwork, true); // for tdf#148000 - } - - bool bRet = false; -@@ -410,6 +411,12 @@ bool DrawDocShell::ImportFrom(SfxMedium - mpDoc->SetConnectorUseSnapRect(true); - } - -+ if (aFilterName == "Impress MS PowerPoint 2007 XML") -+ { -+ // compatibility flag for tdf#148966 -+ mpDoc->SetCompatibilityFlag(SdrCompatibilityFlag::IgnoreBreakAfterMultilineField, true); -+ } -+ - if (aFilterName == "Impress MS PowerPoint 2007 XML" || - aFilterName == "Impress MS PowerPoint 2007 XML AutoPlay" || - aFilterName == "Impress MS PowerPoint 2007 XML VBA" || -Index: libreoffice-7.5.3.2/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx -=================================================================== ---- libreoffice-7.5.3.2.orig/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx -+++ libreoffice-7.5.3.2/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx -@@ -19,6 +19,7 @@ - - #include "EnhancedCustomShapeFontWork.hxx" - #include -+#include - #include - #include - #include -@@ -133,7 +134,8 @@ static bool InitializeFontWorkData( - do - { - // search line break. -- if (!rSdrObjCustomShape.getSdrModelFromSdrObject().IsLegacySingleLineFontwork()) -+ if (!rSdrObjCustomShape.getSdrModelFromSdrObject().GetCompatibilityFlag( -+ SdrCompatibilityFlag::LegacySingleLineFontwork)) - nPos = aParaText[nPara].indexOf(sal_Unicode(u'\1'), nPrevPos); - else - nPos = -1; // tdf#148000: ignore line breaks in legacy fontworks -Index: libreoffice-7.5.3.2/svx/source/svdraw/svdmodel.cxx -=================================================================== ---- libreoffice-7.5.3.2.orig/svx/source/svdraw/svdmodel.cxx -+++ libreoffice-7.5.3.2/svx/source/svdraw/svdmodel.cxx -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -85,6 +86,7 @@ struct SdrModelImpl - bool mbAnchoredTextOverflowLegacy; // tdf#99729 compatibility flag - bool mbLegacySingleLineFontwork; // tdf#148000 compatibility flag - bool mbConnectorUseSnapRect; // tdf#149756 compatibility flag -+ bool mbIgnoreBreakAfterMultilineField; ///< tdf#148966 compatibility flag - std::unique_ptr mpTheme; - - SdrModelImpl() -@@ -93,6 +95,7 @@ struct SdrModelImpl - , mbAnchoredTextOverflowLegacy(false) - , mbLegacySingleLineFontwork(false) - , mbConnectorUseSnapRect(false) -+ , mbIgnoreBreakAfterMultilineField(false) - {} - }; - -@@ -1715,24 +1718,35 @@ void SdrModel::SetAddExtLeading( bool bE - } - } - --void SdrModel::SetAnchoredTextOverflowLegacy(bool bEnabled) -+void SdrModel::SetCompatibilityFlag(SdrCompatibilityFlag eFlag, bool bEnabled) - { -- mpImpl->mbAnchoredTextOverflowLegacy = bEnabled; --} -- --bool SdrModel::IsAnchoredTextOverflowLegacy() const --{ -- return mpImpl->mbAnchoredTextOverflowLegacy; --} -- --void SdrModel::SetLegacySingleLineFontwork(bool bEnabled) --{ -- mpImpl->mbLegacySingleLineFontwork = bEnabled; -+ switch (eFlag) -+ { -+ case SdrCompatibilityFlag::AnchoredTextOverflowLegacy: -+ mpImpl->mbAnchoredTextOverflowLegacy = bEnabled; -+ break; -+ case SdrCompatibilityFlag::LegacySingleLineFontwork: -+ mpImpl->mbLegacySingleLineFontwork = bEnabled; -+ break; -+ case SdrCompatibilityFlag::IgnoreBreakAfterMultilineField: -+ mpImpl->mbIgnoreBreakAfterMultilineField = bEnabled; -+ break; -+ } - } - --bool SdrModel::IsLegacySingleLineFontwork() const -+bool SdrModel::GetCompatibilityFlag(SdrCompatibilityFlag eFlag) const - { -- return mpImpl->mbLegacySingleLineFontwork; -+ switch (eFlag) -+ { -+ case SdrCompatibilityFlag::AnchoredTextOverflowLegacy: -+ return mpImpl->mbAnchoredTextOverflowLegacy; -+ case SdrCompatibilityFlag::LegacySingleLineFontwork: -+ return mpImpl->mbLegacySingleLineFontwork; -+ case SdrCompatibilityFlag::IgnoreBreakAfterMultilineField: -+ return mpImpl->mbIgnoreBreakAfterMultilineField; -+ default: -+ return false; -+ } - } - - void SdrModel::SetConnectorUseSnapRect(bool bEnabled) -@@ -1822,6 +1836,14 @@ void SdrModel::ReadUserDataSequenceValue - } - } - } -+ else if (pValue->Name == "IgnoreBreakAfterMultilineField") -+ { -+ bool bBool = false; -+ if (pValue->Value >>= bBool) -+ { -+ mpImpl->mbIgnoreBreakAfterMultilineField = bBool; -+ } -+ } - } - - template -@@ -1833,8 +1855,12 @@ static void addPair(std::vector< std::pa - void SdrModel::WriteUserDataSequence(uno::Sequence & rValues) - { - std::vector< std::pair< OUString, uno::Any > > aUserData; -- addPair(aUserData, "AnchoredTextOverflowLegacy", IsAnchoredTextOverflowLegacy()); -- addPair(aUserData, "LegacySingleLineFontwork", IsLegacySingleLineFontwork()); -+ addPair(aUserData, "AnchoredTextOverflowLegacy", -+ GetCompatibilityFlag(SdrCompatibilityFlag::AnchoredTextOverflowLegacy)); -+ addPair(aUserData, "LegacySingleLineFontwork", -+ GetCompatibilityFlag(SdrCompatibilityFlag::LegacySingleLineFontwork)); -+ addPair(aUserData, "IgnoreBreakAfterMultilineField", -+ GetCompatibilityFlag(SdrCompatibilityFlag::IgnoreBreakAfterMultilineField)); - addPair(aUserData, "ConnectorUseSnapRect", IsConnectorUseSnapRect()); - - const sal_Int32 nOldLength = rValues.getLength(); -Index: libreoffice-7.5.3.2/svx/source/svdraw/svdoedge.cxx -=================================================================== ---- libreoffice-7.5.3.2.orig/svx/source/svdraw/svdoedge.cxx -+++ libreoffice-7.5.3.2/svx/source/svdraw/svdoedge.cxx -@@ -27,6 +27,7 @@ - - #include - #include -+#include - #include - #include - #include -Index: libreoffice-7.5.3.2/svx/source/svdraw/svdotextdecomposition.cxx -=================================================================== ---- libreoffice-7.5.3.2.orig/svx/source/svdraw/svdotextdecomposition.cxx -+++ libreoffice-7.5.3.2/svx/source/svdraw/svdotextdecomposition.cxx -@@ -17,7 +17,7 @@ - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -- -+#include - #include - #include - #include -@@ -1021,7 +1021,8 @@ void SdrTextObj::impDecomposeBlockTextPr - bool bAllowGrowHorizontal = bVerticalWriting; - - // Compatibility mode for tdf#99729 -- if (getSdrModelFromSdrObject().IsAnchoredTextOverflowLegacy()) -+ if (getSdrModelFromSdrObject().GetCompatibilityFlag( -+ SdrCompatibilityFlag::AnchoredTextOverflowLegacy)) - { - bAllowGrowVertical = bHorizontalIsBlock; - bAllowGrowHorizontal = bVerticalIsBlock; -Index: libreoffice-7.5.3.2/sw/source/uibase/app/docshini.cxx -=================================================================== ---- libreoffice-7.5.3.2.orig/sw/source/uibase/app/docshini.cxx -+++ libreoffice-7.5.3.2/sw/source/uibase/app/docshini.cxx -@@ -35,6 +35,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -479,8 +480,10 @@ bool SwDocShell::Load( SfxMedium& rMedi - SwDrawModel* pDrawModel = m_xDoc->getIDocumentDrawModelAccess().GetDrawModel(); - if (pDrawModel) - { -- pDrawModel->SetAnchoredTextOverflowLegacy(true); // legacy processing for tdf#99729 -- pDrawModel->SetLegacySingleLineFontwork(true); // legacy processing for tdf#148000 -+ pDrawModel->SetCompatibilityFlag(SdrCompatibilityFlag::AnchoredTextOverflowLegacy, -+ true); // legacy processing for tdf#99729 -+ pDrawModel->SetCompatibilityFlag(SdrCompatibilityFlag::LegacySingleLineFontwork, -+ true); // legacy processing for tdf#148000 - } - } - -Index: libreoffice-7.5.3.2/editeng/inc/outleeng.hxx -=================================================================== ---- /dev/null -+++ libreoffice-7.5.3.2/editeng/inc/outleeng.hxx -@@ -0,0 +1,90 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+/* -+ * This file is part of the LibreOffice project. -+ * -+ * This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. -+ * -+ * This file incorporates work covered by the following license notice: -+ * -+ * Licensed to the Apache Software Foundation (ASF) under one or more -+ * contributor license agreements. See the NOTICE file distributed -+ * with this work for additional information regarding copyright -+ * ownership. The ASF licenses this file to you under the Apache -+ * License, Version 2.0 (the "License"); you may not use this file -+ * except in compliance with the License. You may obtain a copy of -+ * the License at http://www.apache.org/licenses/LICENSE-2.0 . -+ */ -+#pragma once -+ -+#include -+#include -+ -+enum class SdrCompatibilityFlag; -+ -+typedef std::vector NotifyList; -+ -+class OutlinerEditEng : public EditEngine -+{ -+ Outliner* pOwner; -+ -+protected: -+ -+ // derived from EditEngine. Allows Outliner objects to provide -+ // bullet access to the EditEngine. -+ virtual const SvxNumberFormat* GetNumberFormat( sal_Int32 nPara ) const override; -+ -+public: -+ OutlinerEditEng( Outliner* pOwner, SfxItemPool* pPool ); -+ virtual ~OutlinerEditEng() override; -+ -+ virtual void PaintingFirstLine(sal_Int32 nPara, const Point& rStartPos, const Point& rOrigin, Degree10 nOrientation, OutputDevice& rOutDev) override; -+ -+ virtual void ParagraphInserted( sal_Int32 nNewParagraph ) override; -+ virtual void ParagraphDeleted( sal_Int32 nDeletedParagraph ) override; -+ virtual void ParagraphConnected( sal_Int32 nLeftParagraph, sal_Int32 nRightParagraph ) override; -+ -+ virtual void DrawingText( const Point& rStartPos, const OUString& rText, sal_Int32 nTextStart, -+ sal_Int32 nTextLen, o3tl::span pDXArray, -+ o3tl::span pKashidaArray, const SvxFont& rFont, -+ sal_Int32 nPara, sal_uInt8 nRightToLeft, -+ const EEngineData::WrongSpellVector* pWrongSpellVector, -+ const SvxFieldData* pFieldData, -+ bool bEndOfLine, -+ bool bEndOfParagraph, -+ const css::lang::Locale* pLocale, -+ const Color& rOverlineColor, -+ const Color& rTextLineColor) override; -+ -+ virtual void DrawingTab( -+ const Point& rStartPos, tools::Long nWidth, const OUString& rChar, -+ const SvxFont& rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft, -+ bool bEndOfLine, -+ bool bEndOfParagraph, -+ const Color& rOverlineColor, -+ const Color& rTextLineColor) override; -+ -+ virtual void StyleSheetChanged( SfxStyleSheet* pStyle ) override; -+ virtual void ParaAttribsChanged( sal_Int32 nPara ) override; -+ virtual bool SpellNextDocument() override; -+ virtual OUString GetUndoComment( sal_uInt16 nUndoId ) const override; -+ -+ // for text conversion -+ virtual bool ConvertNextDocument() override; -+ -+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional& rTxtColor, std::optional& rFldColor ) override; -+ -+ virtual tools::Rectangle GetBulletArea( sal_Int32 nPara ) override; -+ -+ /// @returns state of the SdrCompatibilityFlag -+ std::optional GetCompatFlag(SdrCompatibilityFlag eFlag) const; -+ -+ virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) override; -+ -+ // belongs into class Outliner, move there before incompatible update! -+ Link aOutlinerNotifyHdl; -+ NotifyList aNotifyCache; -+}; -+ -+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -Index: libreoffice-7.5.3.2/editeng/source/editeng/impedit3.cxx -=================================================================== ---- libreoffice-7.5.3.2.orig/editeng/source/editeng/impedit3.cxx -+++ libreoffice-7.5.3.2/editeng/source/editeng/impedit3.cxx -@@ -24,6 +24,7 @@ - #include - #include - -+#include - #include - #include - #include -@@ -44,11 +45,14 @@ - #include - #include - #include -+#include - - #include - #include - #include - -+#include -+ - #include - #include - -@@ -3606,6 +3610,22 @@ void ImpEditEngine::Paint( OutputDevice& - nTextStart = *curIt; - nTextLen = nTextLen - nTextStart; - bParsingFields = false; -+ -+ if (nLine + 1 < nLines) -+ { -+ // tdf#148966 don't paint the line break following a -+ // multiline field based on a compat flag -+ OutlinerEditEng* pOutlEditEng{ dynamic_cast(pEditEngine) }; -+ if (pOutlEditEng -+ && pOutlEditEng->GetCompatFlag(SdrCompatibilityFlag::IgnoreBreakAfterMultilineField) -+ .value_or(false)) -+ { -+ int nStartNextLine = pPortion->GetLines()[nLine + 1].GetStartPortion(); -+ const TextPortion& rNextTextPortion = pPortion->GetTextPortions()[nStartNextLine]; -+ if (rNextTextPortion.GetKind() == PortionKind::LINEBREAK) -+ ++nLine; //ignore the following linebreak -+ } -+ } - } - } - -Index: libreoffice-7.5.3.2/editeng/source/outliner/outleeng.cxx -=================================================================== ---- libreoffice-7.5.3.2.orig/editeng/source/outliner/outleeng.cxx -+++ libreoffice-7.5.3.2/editeng/source/outliner/outleeng.cxx -@@ -21,9 +21,10 @@ - #include - - #include --#include "outleeng.hxx" -+#include - #include "paralist.hxx" - #include -+#include - #include - #include - #include "outlundo.hxx" -@@ -69,6 +70,15 @@ tools::Rectangle OutlinerEditEng::GetBul - return aBulletArea; - } - -+std::optional OutlinerEditEng::GetCompatFlag(SdrCompatibilityFlag eFlag) const -+{ -+ if(pOwner) -+ { -+ return pOwner->GetCompatFlag(eFlag); -+ } -+ return {}; -+} -+ - void OutlinerEditEng::ParagraphInserted( sal_Int32 nNewParagraph ) - { - pOwner->ParagraphInserted( nNewParagraph ); -Index: libreoffice-7.5.3.2/editeng/source/outliner/outleeng.hxx -=================================================================== ---- libreoffice-7.5.3.2.orig/editeng/source/outliner/outleeng.hxx -+++ /dev/null -@@ -1,85 +0,0 @@ --/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ --/* -- * This file is part of the LibreOffice project. -- * -- * This Source Code Form is subject to the terms of the Mozilla Public -- * License, v. 2.0. If a copy of the MPL was not distributed with this -- * file, You can obtain one at http://mozilla.org/MPL/2.0/. -- * -- * This file incorporates work covered by the following license notice: -- * -- * Licensed to the Apache Software Foundation (ASF) under one or more -- * contributor license agreements. See the NOTICE file distributed -- * with this work for additional information regarding copyright -- * ownership. The ASF licenses this file to you under the Apache -- * License, Version 2.0 (the "License"); you may not use this file -- * except in compliance with the License. You may obtain a copy of -- * the License at http://www.apache.org/licenses/LICENSE-2.0 . -- */ --#pragma once -- --#include --#include -- --typedef std::vector NotifyList; -- --class OutlinerEditEng : public EditEngine --{ -- Outliner* pOwner; -- --protected: -- -- // derived from EditEngine. Allows Outliner objects to provide -- // bullet access to the EditEngine. -- virtual const SvxNumberFormat* GetNumberFormat( sal_Int32 nPara ) const override; -- --public: -- OutlinerEditEng( Outliner* pOwner, SfxItemPool* pPool ); -- virtual ~OutlinerEditEng() override; -- -- virtual void PaintingFirstLine(sal_Int32 nPara, const Point& rStartPos, const Point& rOrigin, Degree10 nOrientation, OutputDevice& rOutDev) override; -- -- virtual void ParagraphInserted( sal_Int32 nNewParagraph ) override; -- virtual void ParagraphDeleted( sal_Int32 nDeletedParagraph ) override; -- virtual void ParagraphConnected( sal_Int32 nLeftParagraph, sal_Int32 nRightParagraph ) override; -- -- virtual void DrawingText( const Point& rStartPos, const OUString& rText, sal_Int32 nTextStart, -- sal_Int32 nTextLen, o3tl::span pDXArray, -- o3tl::span pKashidaArray, const SvxFont& rFont, -- sal_Int32 nPara, sal_uInt8 nRightToLeft, -- const EEngineData::WrongSpellVector* pWrongSpellVector, -- const SvxFieldData* pFieldData, -- bool bEndOfLine, -- bool bEndOfParagraph, -- const css::lang::Locale* pLocale, -- const Color& rOverlineColor, -- const Color& rTextLineColor) override; -- -- virtual void DrawingTab( -- const Point& rStartPos, tools::Long nWidth, const OUString& rChar, -- const SvxFont& rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft, -- bool bEndOfLine, -- bool bEndOfParagraph, -- const Color& rOverlineColor, -- const Color& rTextLineColor) override; -- -- virtual void StyleSheetChanged( SfxStyleSheet* pStyle ) override; -- virtual void ParaAttribsChanged( sal_Int32 nPara ) override; -- virtual bool SpellNextDocument() override; -- virtual OUString GetUndoComment( sal_uInt16 nUndoId ) const override; -- -- // for text conversion -- virtual bool ConvertNextDocument() override; -- -- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional& rTxtColor, std::optional& rFldColor ) override; -- -- virtual tools::Rectangle GetBulletArea( sal_Int32 nPara ) override; -- -- virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) override; -- -- // belongs into class Outliner, move there before incompatible update! -- Link aOutlinerNotifyHdl; -- NotifyList aNotifyCache; --}; -- --/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -Index: libreoffice-7.5.3.2/editeng/source/outliner/outlin2.cxx -=================================================================== ---- libreoffice-7.5.3.2.orig/editeng/source/outliner/outlin2.cxx -+++ libreoffice-7.5.3.2/editeng/source/outliner/outlin2.cxx -@@ -30,7 +30,7 @@ - - #include - #include "paralist.hxx" --#include "outleeng.hxx" -+#include - #include - - -Index: libreoffice-7.5.3.2/editeng/source/outliner/outliner.cxx -=================================================================== ---- libreoffice-7.5.3.2.orig/editeng/source/outliner/outliner.cxx -+++ libreoffice-7.5.3.2/editeng/source/outliner/outliner.cxx -@@ -30,7 +30,7 @@ - #include - #include "paralist.hxx" - #include --#include "outleeng.hxx" -+#include - #include "outlundo.hxx" - #include - #include -Index: libreoffice-7.5.3.2/editeng/source/outliner/outlvw.cxx -=================================================================== ---- libreoffice-7.5.3.2.orig/editeng/source/outliner/outlvw.cxx -+++ libreoffice-7.5.3.2/editeng/source/outliner/outlvw.cxx -@@ -30,7 +30,7 @@ - #include - - #include --#include "outleeng.hxx" -+#include - #include "paralist.hxx" - #include "outlundo.hxx" - #include -Index: libreoffice-7.5.3.2/include/editeng/outliner.hxx -=================================================================== ---- libreoffice-7.5.3.2.orig/include/editeng/outliner.hxx -+++ libreoffice-7.5.3.2/include/editeng/outliner.hxx -@@ -77,6 +77,7 @@ class SvxFieldData; - enum class PointerStyle; - class SvxNumRule; - enum class TextRotation; -+enum class SdrCompatibilityFlag; - - namespace com::sun::star::linguistic2 { - class XSpellChecker1; -@@ -987,6 +988,9 @@ public: - - // convenient method to determine the bullets/numbering status for all paragraphs - sal_Int32 GetBulletsNumberingStatus() const; -+ -+ // overriden in SdrOutliner -+ virtual std::optional GetCompatFlag(SdrCompatibilityFlag /*eFlag*/) const { return {}; }; - }; - - #endif -Index: libreoffice-7.5.3.2/include/svx/svdoutl.hxx -=================================================================== ---- libreoffice-7.5.3.2.orig/include/svx/svdoutl.hxx -+++ libreoffice-7.5.3.2/include/svx/svdoutl.hxx -@@ -20,11 +20,13 @@ - #pragma once - - #include -+#include - #include - #include - - class SdrTextObj; - class SdrPage; -+enum class SdrCompatibilityFlag; - - class SVXCORE_DLLPUBLIC SdrOutliner : public Outliner - { -@@ -45,6 +47,9 @@ public: - virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional& rpTxtColor, std::optional& rpFldColor) override; - - bool hasEditViewCallbacks() const; -+ -+ /// @returns state of the SdrCompatibilityFlag -+ virtual std::optional GetCompatFlag(SdrCompatibilityFlag eFlag) const override; - }; - - -Index: libreoffice-7.5.3.2/solenv/clang-format/excludelist -=================================================================== ---- libreoffice-7.5.3.2.orig/solenv/clang-format/excludelist -+++ libreoffice-7.5.3.2/solenv/clang-format/excludelist -@@ -3397,6 +3397,7 @@ editeng/inc/editattr.hxx - editeng/inc/editdoc.hxx - editeng/inc/edtspell.hxx - editeng/inc/eerdll2.hxx -+editeng/inc/outleeng.hxx - editeng/inc/unomodel.hxx - editeng/qa/items/borderline_test.cxx - editeng/qa/lookuptree/lookuptree_test.cxx -@@ -3475,7 +3476,6 @@ editeng/source/misc/swafopt.cxx - editeng/source/misc/txtrange.cxx - editeng/source/misc/unolingu.cxx - editeng/source/outliner/outleeng.cxx --editeng/source/outliner/outleeng.hxx - editeng/source/outliner/outlin2.cxx - editeng/source/outliner/outliner.cxx - editeng/source/outliner/outlobj.cxx -Index: libreoffice-7.5.3.2/svx/source/svdraw/svdoutl.cxx -=================================================================== ---- libreoffice-7.5.3.2.orig/svx/source/svdraw/svdoutl.cxx -+++ libreoffice-7.5.3.2/svx/source/svdraw/svdoutl.cxx -@@ -17,9 +17,12 @@ - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -+#include - #include - #include -+#include - #include -+#include - #include - #include - #include -@@ -104,4 +107,13 @@ bool SdrOutliner::hasEditViewCallbacks() - return false; - } - -+std::optional SdrOutliner::GetCompatFlag(SdrCompatibilityFlag eFlag) const -+{ -+ if( mpVisualizedPage ) -+ { -+ return {mpVisualizedPage->getSdrModelFromSdrPage().GetCompatibilityFlag(eFlag)}; -+ } -+ return {}; -+} -+ - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/bsc1204040.patch b/bsc1204040.patch deleted file mode 100644 index 7c0a4f9..0000000 --- a/bsc1204040.patch +++ /dev/null @@ -1,711 +0,0 @@ -From 42573f7f27efd6153d396d6907486cda0af7d57a Mon Sep 17 00:00:00 2001 -From: Sarper Akdemir -Date: Wed, 15 Mar 2023 19:25:03 +0300 -Subject: [PATCH] tdf#150020 pptx import: handle algn for outerShdw - -Introduces RectangleAlignmentItem that holds a value of the enum -model::RectangleAlignment. - -Introduces SDRATTR_SHADOWALIGNMENT that holds alignment for a shadow. - -Implements import of algn for outerShdw. - -Makes the alignment considered while the shadow is being scaled. -Also adds a unit test that covers this. - -Cherry picks relevant model::RectangleAlignment bits of FormatScheme.hxx -from (0ffa50031eb33500a3530ece76ea32d15864f345 and 2a7ab2ab7786ab88b1bdbbe5e4b00ea8e93636f7) - -Cherry picks convertToRectangleAlignment bits from (2a7ab2ab7786ab88b1bdbbe5e4b00ea8e93636f7) - -Change-Id: I8f4eaed5f0d9428a7f405c65f19237f9e70ca151 -Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148934 -Tested-by: Jenkins -Reviewed-by: Sarper Akdemir ---- - .../source/attribute/sdrshadowattribute.cxx | 13 +++- - include/docmodel/theme/FormatScheme.hxx | 34 +++++++++ - .../attribute/sdrshadowattribute.hxx | 6 ++ - include/editeng/unoprnms.hxx | 1 + - include/oox/drawingml/drawingmltypes.hxx | 2 + - include/svx/RectangleAlignmentItem.hxx | 42 +++++++++++ - include/svx/svddef.hxx | 4 +- - include/svx/unoshprp.hxx | 3 +- - oox/source/drawingml/drawingmltypes.cxx | 19 +++++ - oox/source/drawingml/effectproperties.cxx | 5 ++ - oox/source/drawingml/effectproperties.hxx | 5 ++ - .../drawingml/effectpropertiescontext.cxx | 2 + - oox/source/token/properties.txt | 1 + - svx/Library_svxcore.mk | 1 + - .../unit/data/tdf150020-shadow-alignment.pptx | Bin 0 -> 45485 bytes - svx/qa/unit/sdr.cxx | 68 ++++++++++++++++++ - svx/source/items/RectangleAlignmentItem.cxx | 31 ++++++++ - .../sdr/primitive2d/sdrattributecreator.cxx | 5 +- - .../sdr/primitive2d/sdrdecompositiontools.cxx | 45 ++++++++---- - svx/source/svdraw/svdattr.cxx | 4 ++ - svx/source/table/viewcontactoftableobj.cxx | 54 +++++++------- - sw/qa/extras/layout/layout.cxx | 17 +++-- - 22 files changed, 318 insertions(+), 44 deletions(-) - create mode 100644 include/docmodel/theme/FormatScheme.hxx - create mode 100644 include/svx/RectangleAlignmentItem.hxx - create mode 100644 svx/qa/unit/data/tdf150020-shadow-alignment.pptx - create mode 100644 svx/source/items/RectangleAlignmentItem.cxx - -diff --git a/drawinglayer/source/attribute/sdrshadowattribute.cxx b/drawinglayer/source/attribute/sdrshadowattribute.cxx -index 6e046f1f07c7..1eb1b3ea687c 100644 ---- a/drawinglayer/source/attribute/sdrshadowattribute.cxx -+++ b/drawinglayer/source/attribute/sdrshadowattribute.cxx -@@ -20,6 +20,7 @@ - #include - #include - #include -+#include - - - namespace drawinglayer::attribute -@@ -32,6 +33,7 @@ namespace drawinglayer::attribute - basegfx::B2DVector maSize; // [0.0 .. 2.0] - double mfTransparence; // [0.0 .. 1.0], 0.0==no transp. - sal_Int32 mnBlur; // [0 .. 180], radius of the blur -+ model::RectangleAlignment meAlignment{model::RectangleAlignment::Unset}; // alignment of the shadow - basegfx::BColor maColor; // color of shadow - - ImpSdrShadowAttribute( -@@ -39,11 +41,13 @@ namespace drawinglayer::attribute - const basegfx::B2DVector& rSize, - double fTransparence, - sal_Int32 nBlur, -+ model::RectangleAlignment eAlignment, - const basegfx::BColor& rColor) - : maOffset(rOffset), - maSize(rSize), - mfTransparence(fTransparence), - mnBlur(nBlur), -+ meAlignment(eAlignment), - maColor(rColor) - { - } -@@ -67,6 +71,7 @@ namespace drawinglayer::attribute - && getSize() == rCandidate.getSize() - && getTransparence() == rCandidate.getTransparence() - && getBlur() == rCandidate.getBlur() -+ && meAlignment == rCandidate.meAlignment - && getColor() == rCandidate.getColor()); - } - }; -@@ -86,9 +91,10 @@ namespace drawinglayer::attribute - const basegfx::B2DVector& rSize, - double fTransparence, - sal_Int32 nBlur, -+ model::RectangleAlignment eAlignment, - const basegfx::BColor& rColor) - : mpSdrShadowAttribute(ImpSdrShadowAttribute( -- rOffset, rSize, fTransparence,nBlur, rColor)) -+ rOffset, rSize, fTransparence, nBlur, eAlignment, rColor)) - { - } - -@@ -141,6 +147,11 @@ namespace drawinglayer::attribute - return mpSdrShadowAttribute->getBlur(); - } - -+ model::RectangleAlignment SdrShadowAttribute::getAlignment() const -+ { -+ return mpSdrShadowAttribute->meAlignment; -+ } -+ - const basegfx::BColor& SdrShadowAttribute::getColor() const - { - return mpSdrShadowAttribute->getColor(); -diff --git a/include/docmodel/theme/FormatScheme.hxx b/include/docmodel/theme/FormatScheme.hxx -new file mode 100644 -index 000000000000..1a29eb199c0f ---- /dev/null -+++ b/include/docmodel/theme/FormatScheme.hxx -@@ -0,0 +1,34 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+/* -+ * This file is part of the LibreOffice project. -+ * -+ * This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. -+ * -+ */ -+ -+#pragma once -+ -+#include -+ -+namespace model -+{ -+enum class RectangleAlignment -+{ -+ Unset, -+ TopLeft, -+ Top, -+ TopRight, -+ Left, -+ Center, -+ Right, -+ BottomLeft, -+ Bottom, -+ BottomRight -+}; -+constexpr sal_uInt16 RECTANGLE_ALIGNMENT_COUNT -+ = static_cast(RectangleAlignment::BottomRight) + 1; -+} -+ -+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -diff --git a/include/drawinglayer/attribute/sdrshadowattribute.hxx b/include/drawinglayer/attribute/sdrshadowattribute.hxx -index ffe249498db2..ab2c045e49bb 100644 ---- a/include/drawinglayer/attribute/sdrshadowattribute.hxx -+++ b/include/drawinglayer/attribute/sdrshadowattribute.hxx -@@ -31,6 +31,10 @@ namespace basegfx { - class B2DVector; - } - -+namespace model { -+ enum class RectangleAlignment; -+} -+ - namespace drawinglayer::attribute { - class ImpSdrShadowAttribute; - } -@@ -53,6 +57,7 @@ namespace drawinglayer::attribute - const basegfx::B2DVector& rSize, - double fTransparence, - sal_Int32 nBlur, -+ model::RectangleAlignment eAlignment, - const basegfx::BColor& rColor); - SdrShadowAttribute(); - SdrShadowAttribute(const SdrShadowAttribute&); -@@ -72,6 +77,7 @@ namespace drawinglayer::attribute - const basegfx::B2DVector& getSize() const; - double getTransparence() const; - sal_Int32 getBlur() const; -+ model::RectangleAlignment getAlignment() const; - const basegfx::BColor& getColor() const; - }; - -diff --git a/include/editeng/unoprnms.hxx b/include/editeng/unoprnms.hxx -index 0df739ee5285..7a95ba989b86 100644 ---- a/include/editeng/unoprnms.hxx -+++ b/include/editeng/unoprnms.hxx -@@ -91,6 +91,7 @@ inline constexpr OUStringLiteral UNO_NAME_SHADOWSIZEX = u"ShadowSizeX"; - inline constexpr OUStringLiteral UNO_NAME_SHADOWSIZEY = u"ShadowSizeY"; - inline constexpr OUStringLiteral UNO_NAME_SHADOWTRANSPARENCE = u"ShadowTransparence"; - inline constexpr OUStringLiteral UNO_NAME_SHADOWBLUR = u"ShadowBlur"; -+inline constexpr OUStringLiteral UNO_NAME_SHADOWALIGNMENT = u"ShadowAlignment"; - - inline constexpr OUStringLiteral UNO_NAME_EDGERADIUS = u"CornerRadius"; - -diff --git a/include/oox/drawingml/drawingmltypes.hxx b/include/oox/drawingml/drawingmltypes.hxx -index 5fe86d56439e..04b7e09e10b2 100644 ---- a/include/oox/drawingml/drawingmltypes.hxx -+++ b/include/oox/drawingml/drawingmltypes.hxx -@@ -31,6 +31,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -227,6 +228,7 @@ struct EmuRectangle : public EmuPoint, public EmuSize - void setSize( const EmuSize& rSize ) { static_cast< EmuSize& >( *this ) = rSize; } - }; - -+model::RectangleAlignment convertToRectangleAlignment(sal_Int32 nToken); - - } // namespace oox::drawingml - -diff --git a/include/svx/RectangleAlignmentItem.hxx b/include/svx/RectangleAlignmentItem.hxx -new file mode 100644 -index 000000000000..91179e628a40 ---- /dev/null -+++ b/include/svx/RectangleAlignmentItem.hxx -@@ -0,0 +1,42 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ -+/* -+ * This file is part of the LibreOffice project. -+ * -+ * This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. -+ */ -+ -+#pragma once -+ -+#include -+#include -+ -+namespace model -+{ -+enum class RectangleAlignment; -+} -+ -+/** Item that holds a rectangle alignment value. -+ -+ e.g. Top Left, Top, Top Right, Center. -+ @see model::RectangleAlignment -+ */ -+class SVXCORE_DLLPUBLIC SvxRectangleAlignmentItem final -+ : public SfxEnumItem -+{ -+public: -+ SvxRectangleAlignmentItem(sal_uInt16 nWhich, model::RectangleAlignment nValue); -+ virtual ~SvxRectangleAlignmentItem() override; -+ -+ SvxRectangleAlignmentItem(SvxRectangleAlignmentItem const&) = default; -+ SvxRectangleAlignmentItem(SvxRectangleAlignmentItem&&) = default; -+ SvxRectangleAlignmentItem& operator=(SvxRectangleAlignmentItem const&) = delete; -+ SvxRectangleAlignmentItem& operator=(SvxRectangleAlignmentItem&&) = delete; -+ -+ virtual SvxRectangleAlignmentItem* Clone(SfxItemPool* pPool = nullptr) const override; -+ -+ virtual sal_uInt16 GetValueCount() const override; -+}; -+ -+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ -diff --git a/include/svx/svddef.hxx b/include/svx/svddef.hxx -index 059c461721b4..1801f2dfee7b 100644 ---- a/include/svx/svddef.hxx -+++ b/include/svx/svddef.hxx -@@ -159,6 +159,7 @@ class SvxBoxInfoItem; - class SvxBoxItem; - class SvxColorItem; - class SvxLineItem; -+class SvxRectangleAlignmentItem; - class SvxTextRotateItem; - class SvxWritingModeItem; - class XColorItem; -@@ -190,7 +191,8 @@ constexpr TypedWhichId SDRATTR_SHADOWPERSP (SDRATTR_SHADO - constexpr TypedWhichId SDRATTR_SHADOWSIZEX (SDRATTR_SHADOW_FIRST+ 7); - constexpr TypedWhichId SDRATTR_SHADOWSIZEY (SDRATTR_SHADOW_FIRST+ 8); - constexpr TypedWhichId SDRATTR_SHADOWBLUR (SDRATTR_SHADOW_FIRST+ 9); --constexpr sal_uInt16 SDRATTR_SHADOW_LAST (SDRATTR_SHADOWBLUR); /* 1078 */ /* 1078 */ /* 1061 */ /* Pool V1: 1039 */ -+constexpr TypedWhichId SDRATTR_SHADOWALIGNMENT(SDRATTR_SHADOW_FIRST + 10); -+constexpr sal_uInt16 SDRATTR_SHADOW_LAST (SDRATTR_SHADOWALIGNMENT); /* 1078 */ /* 1078 */ /* 1061 */ /* Pool V1: 1039 */ - - constexpr sal_uInt16 SDRATTR_CAPTION_FIRST (SDRATTR_SHADOW_LAST + 1); /* 1080 */ /* 1080 */ /* 1063 */ /* Pool V1: 1041 */ - constexpr TypedWhichId SDRATTR_CAPTIONTYPE (SDRATTR_CAPTION_FIRST+ 0); /* 1080 */ /* 1080 */ /* 1063 */ -diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx -index 010cbbcd4b36..6b68d7d1e790 100644 ---- a/include/svx/unoshprp.hxx -+++ b/include/svx/unoshprp.hxx -@@ -230,7 +230,8 @@ - { UNO_NAME_SHADOWYDIST, SDRATTR_SHADOWYDIST, ::cppu::UnoType::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \ - { UNO_NAME_SHADOWSIZEX, SDRATTR_SHADOWSIZEX, ::cppu::UnoType::get(), 0, 0}, \ - { UNO_NAME_SHADOWSIZEY, SDRATTR_SHADOWSIZEY, ::cppu::UnoType::get(), 0, 0}, \ -- { UNO_NAME_SHADOWBLUR, SDRATTR_SHADOWBLUR, ::cppu::UnoType::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, -+ { UNO_NAME_SHADOWBLUR, SDRATTR_SHADOWBLUR, ::cppu::UnoType::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \ -+ { UNO_NAME_SHADOWALIGNMENT, SDRATTR_SHADOWALIGNMENT, /*ENUM*/::cppu::UnoType::get(), 0, 0}, - - - #define LINE_PROPERTIES_DEFAULTS\ -diff --git a/oox/source/drawingml/drawingmltypes.cxx b/oox/source/drawingml/drawingmltypes.cxx -index fc2f28d902b7..c53e13662c37 100644 ---- a/oox/source/drawingml/drawingmltypes.cxx -+++ b/oox/source/drawingml/drawingmltypes.cxx -@@ -414,6 +414,25 @@ IndexRange GetIndexRange( const Reference< XFastAttributeList >& xAttributes ) - return range; - } - -+model::RectangleAlignment convertToRectangleAlignment(sal_Int32 nToken) -+{ -+ switch (nToken) -+ { -+ case XML_tl: return model::RectangleAlignment::TopLeft; -+ case XML_t: return model::RectangleAlignment::Top; -+ case XML_tr: return model::RectangleAlignment::TopRight; -+ case XML_l: return model::RectangleAlignment::Left; -+ case XML_ctr: return model::RectangleAlignment::Center; -+ case XML_r: return model::RectangleAlignment::Right; -+ case XML_bl: return model::RectangleAlignment::BottomLeft; -+ case XML_b: return model::RectangleAlignment::Bottom; -+ case XML_br: return model::RectangleAlignment::BottomRight; -+ default: -+ break; -+ } -+ return model::RectangleAlignment::Unset; -+} -+ - } // namespace oox::drawingml - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -diff --git a/oox/source/drawingml/effectproperties.cxx b/oox/source/drawingml/effectproperties.cxx -index 579f4e1ab0ac..8424e3436c1a 100644 ---- a/oox/source/drawingml/effectproperties.cxx -+++ b/oox/source/drawingml/effectproperties.cxx -@@ -14,6 +14,7 @@ - - #include - #include -+#include - - #include - -@@ -38,6 +39,7 @@ void EffectShadowProperties::assignUsed(const EffectShadowProperties& rSourcePro - assignIfUsed( moShadowSy, rSourceProps.moShadowSy ); - moShadowColor.assignIfUsed( rSourceProps.moShadowColor ); - assignIfUsed( moShadowBlur, rSourceProps.moShadowBlur ); -+ assignIfUsed( moShadowAlignment, rSourceProps.moShadowAlignment ); - - } - -@@ -105,6 +107,9 @@ void EffectProperties::pushToPropMap( PropertyMap& rPropMap, - rPropMap.setProperty( PROP_ShadowColor, it->moColor.getColor(rGraphicHelper ) ); - rPropMap.setProperty( PROP_ShadowTransparence, it->moColor.getTransparency()); - rPropMap.setProperty( PROP_ShadowBlur, convertEmuToHmm(nAttrBlur)); -+ rPropMap.setProperty( -+ PROP_ShadowAlignment, -+ static_cast(maShadow.moShadowAlignment.value_or(model::RectangleAlignment::Bottom))); - - } - } -diff --git a/oox/source/drawingml/effectproperties.hxx b/oox/source/drawingml/effectproperties.hxx -index 54c7068ef5c6..992e2bddf3ef 100644 ---- a/oox/source/drawingml/effectproperties.hxx -+++ b/oox/source/drawingml/effectproperties.hxx -@@ -17,6 +17,10 @@ - #include - #include - -+namespace model { -+enum class RectangleAlignment; -+} -+ - namespace oox::drawingml { - - struct EffectGlowProperties -@@ -43,6 +47,7 @@ struct EffectShadowProperties - std::optional< sal_Int64 > moShadowSy; - Color moShadowColor; - std::optional< sal_Int64 > moShadowBlur; // size of blur effect -+ std::optional< model::RectangleAlignment > moShadowAlignment; - - /** Overwrites all members that are explicitly set in rSourceProps. */ - void assignUsed( const EffectShadowProperties& rSourceProps ); -diff --git a/oox/source/drawingml/effectpropertiescontext.cxx b/oox/source/drawingml/effectpropertiescontext.cxx -index 23793cdc26dc..a386814ed4b4 100644 ---- a/oox/source/drawingml/effectpropertiescontext.cxx -+++ b/oox/source/drawingml/effectpropertiescontext.cxx -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - - using namespace ::oox::core; - using namespace ::com::sun::star::uno; -@@ -85,6 +86,7 @@ ContextHandlerRef EffectPropertiesContext::onCreateContext( sal_Int32 nElement, - mrEffectProperties.maShadow.moShadowSx = rAttribs.getInteger( XML_sx, 0 ); - mrEffectProperties.maShadow.moShadowSy = rAttribs.getInteger( XML_sy, 0 ); - mrEffectProperties.maShadow.moShadowBlur = rAttribs.getInteger( XML_blurRad, 0 ); -+ mrEffectProperties.maShadow.moShadowAlignment = convertToRectangleAlignment( rAttribs.getToken(XML_algn, XML_b) ); - return new ColorContext(*this, mrEffectProperties.m_Effects[nPos]->moColor); - } - break; -diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt -index 5df793846a50..60b5c375c033 100644 ---- a/oox/source/token/properties.txt -+++ b/oox/source/token/properties.txt -@@ -467,6 +467,7 @@ Segments - SelectedItems - SelectedPage - Shadow -+ShadowAlignment - ShadowColor - ShadowFormat - ShadowSizeX -diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk -index 6a1c0b5de352..9f35193a3645 100644 ---- a/svx/Library_svxcore.mk -+++ b/svx/Library_svxcore.mk -@@ -218,6 +218,7 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\ - svx/source/items/customshapeitem \ - svx/source/items/drawitem \ - svx/source/items/e3ditem \ -+ svx/source/items/RectangleAlignmentItem \ - svx/source/items/galleryitem \ - svx/source/items/grfitem \ - svx/source/sdr/animation/scheduler \ -diff --git a/svx/source/items/RectangleAlignmentItem.cxx b/svx/source/items/RectangleAlignmentItem.cxx -new file mode 100644 -index 000000000000..3b0b7b0f1081 ---- /dev/null -+++ b/svx/source/items/RectangleAlignmentItem.cxx -@@ -0,0 +1,31 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ -+/* -+ * This file is part of the LibreOffice project. -+ * -+ * This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. -+ */ -+ -+#include -+#include -+ -+SvxRectangleAlignmentItem::SvxRectangleAlignmentItem(sal_uInt16 nWhich, -+ model::RectangleAlignment nValue) -+ : SfxEnumItem(nWhich, nValue) -+{ -+} -+ -+SvxRectangleAlignmentItem::~SvxRectangleAlignmentItem() {} -+ -+SvxRectangleAlignmentItem* SvxRectangleAlignmentItem::Clone(SfxItemPool*) const -+{ -+ return new SvxRectangleAlignmentItem(*this); -+} -+ -+sal_uInt16 SvxRectangleAlignmentItem::GetValueCount() const -+{ -+ return model::RECTANGLE_ALIGNMENT_COUNT; -+} -+ -+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ -diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx -index bafa96f95cd8..9c3155435d4b 100644 ---- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx -+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx -@@ -53,6 +53,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -401,7 +402,9 @@ namespace drawinglayer::primitive2d - - sal_Int32 nBlur(rSet.Get(SDRATTR_SHADOWBLUR).GetValue()); - -- return attribute::SdrShadowAttribute(aOffset, aSize, static_cast(nTransparence) * 0.01,nBlur, aColor.getBColor()); -+ model::RectangleAlignment eAlignment{rSet.Get(SDRATTR_SHADOWALIGNMENT).GetValue()}; -+ -+ return attribute::SdrShadowAttribute(aOffset, aSize, static_cast(nTransparence) * 0.01, nBlur, eAlignment, aColor.getBColor()); - } - } - -diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx -index 1a5459643006..b5df830d73fe 100644 ---- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx -+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx -@@ -49,6 +49,7 @@ - #include - #include - #include -+#include - #include - - // for SlideBackgroundFillPrimitive2D -@@ -65,6 +66,35 @@ namespace drawinglayer::primitive2d - { - namespace - { -+/// @returns the offset to apply/unapply to scale according to correct origin for a given alignment. -+basegfx::B2DTuple getShadowScaleOriginOffset(const basegfx::B2DTuple& aScale, -+ model::RectangleAlignment eAlignment) -+{ -+ switch (eAlignment) -+ { -+ case model::RectangleAlignment::TopLeft: -+ return { 0, 0 }; -+ case model::RectangleAlignment::Top: -+ return { aScale.getX() / 2, 0 }; -+ case model::RectangleAlignment::TopRight: -+ return { aScale.getX(), 0 }; -+ case model::RectangleAlignment::Left: -+ return { 0, aScale.getY() / 2 }; -+ case model::RectangleAlignment::Center: -+ return { aScale.getX() / 2, aScale.getY() / 2 }; -+ case model::RectangleAlignment::Right: -+ return { aScale.getX(), aScale.getY() / 2 }; -+ case model::RectangleAlignment::BottomLeft: -+ return { 0, aScale.getY() }; -+ case model::RectangleAlignment::Bottom: -+ return { aScale.getX() / 2, aScale.getY() }; -+ case model::RectangleAlignment::BottomRight: -+ return { aScale.getX(), aScale.getY() }; -+ default: -+ return { 0, 0 }; -+ } -+}; -+ - // See also: SdrTextObj::AdjustRectToTextDistance - basegfx::B2DRange getTextAnchorRange(const attribute::SdrTextAttribute& rText, - const basegfx::B2DRange& rSnapRange) -@@ -775,19 +805,10 @@ sal_uInt32 SlideBackgroundFillPrimitive2D::getPrimitive2DID() const - double fShearX = 0; - rObjectMatrix.decompose(aScale, aTranslate, fRotate, fShearX); - // Scale the shadow -- double nTranslateX = aTranslate.getX(); -- double nTranslateY = aTranslate.getY(); -- -- // The origin for scaling is the top left corner by default. A negative -- // shadow offset changes the origin. -- if (rShadow.getOffset().getX() < 0) -- nTranslateX += aScale.getX(); -- if (rShadow.getOffset().getY() < 0) -- nTranslateY += aScale.getY(); -- -- aShadowOffset.translate(-nTranslateX, -nTranslateY); -+ aTranslate += getShadowScaleOriginOffset(aScale, rShadow.getAlignment()); -+ aShadowOffset.translate(-aTranslate); - aShadowOffset.scale(rShadow.getSize().getX() * 0.00001, rShadow.getSize().getY() * 0.00001); -- aShadowOffset.translate(nTranslateX, nTranslateY); -+ aShadowOffset.translate(aTranslate); - } - - aShadowOffset.translate(rShadow.getOffset().getX(), rShadow.getOffset().getY()); -diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx -index 86794dc92bfe..39455dd81916 100644 ---- a/svx/source/svdraw/svdattr.cxx -+++ b/svx/source/svdraw/svdattr.cxx -@@ -29,6 +29,8 @@ - #include - #include - -+#include -+ - #include - #include - #include -@@ -93,6 +95,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -133,6 +136,7 @@ SdrItemPool::SdrItemPool( - rPoolDefaults[SDRATTR_SHADOWSIZEY -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWSIZEY, 100000); - rPoolDefaults[SDRATTR_SHADOWTRANSPARENCE-SDRATTR_START]=new SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE, 0); - rPoolDefaults[SDRATTR_SHADOWBLUR -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWBLUR, 0); -+ rPoolDefaults[SDRATTR_SHADOWALIGNMENT -SDRATTR_START]=new SvxRectangleAlignmentItem(SDRATTR_SHADOWALIGNMENT, model::RectangleAlignment::Unset); - rPoolDefaults[SDRATTR_SHADOW3D -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOW3D ); - rPoolDefaults[SDRATTR_SHADOWPERSP -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOWPERSP ); - rPoolDefaults[SDRATTR_CAPTIONTYPE -SDRATTR_START]=new SdrCaptionTypeItem ; -diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx -index 3f17c5ccae21..5b9418ab06bf 100644 ---- a/svx/source/table/viewcontactoftableobj.cxx -+++ b/svx/source/table/viewcontactoftableobj.cxx -@@ -448,33 +448,39 @@ namespace sdr::contact - aRetvalForShadow.append(new drawinglayer::primitive2d::TransformPrimitive2D( - aTransform, std::move(aCellBorderPrimitives))); - } -- } -- -- if(!aRetval.empty()) -- { -- // check and create evtl. shadow for created content -- const SfxItemSet& rObjectItemSet = rTableObj.GetMergedItemSet(); -- const drawinglayer::attribute::SdrShadowAttribute aNewShadowAttribute( -- drawinglayer::primitive2d::createNewSdrShadowAttribute(rObjectItemSet)); - -- if(!aNewShadowAttribute.isDefault()) -+ if(!aRetval.empty()) - { -- bool bDirectShadow -- = rObjectItemSet.Get(SDRATTR_SHADOW, /*bSrchInParent=*/false) -- .GetValue(); -- if (bDirectShadow) -- { -- // Shadow as direct formatting: no shadow for text, to be compatible -- // with PowerPoint. -- basegfx::B2DHomMatrix aMatrix; -- aRetval = drawinglayer::primitive2d::createEmbeddedShadowPrimitive( -- std::move(aRetval), aNewShadowAttribute, aMatrix, &aRetvalForShadow); -- } -- else -+ // check and create evtl. shadow for created content -+ const SfxItemSet& rObjectItemSet = rTableObj.GetMergedItemSet(); -+ const drawinglayer::attribute::SdrShadowAttribute aNewShadowAttribute( -+ drawinglayer::primitive2d::createNewSdrShadowAttribute(rObjectItemSet)); -+ -+ if(!aNewShadowAttribute.isDefault()) - { -- // Shadow as style: shadow for text, to be backwards-compatible. -- aRetval = drawinglayer::primitive2d::createEmbeddedShadowPrimitive( -- std::move(aRetval), aNewShadowAttribute); -+ // pass in table's transform and scale matrix, to -+ // correctly scale and align shadows -+ const basegfx::B2DHomMatrix aTransformScaleMatrix -+ = basegfx::utils::createScaleTranslateB2DHomMatrix( -+ aObjectRange.getRange(), aObjectRange.getMinimum()); -+ -+ bool bDirectShadow -+ = rObjectItemSet.Get(SDRATTR_SHADOW, /*bSrchInParent=*/false) -+ .GetValue(); -+ if (bDirectShadow) -+ { -+ // Shadow as direct formatting: no shadow for text, to be compatible -+ // with PowerPoint. -+ aRetval = drawinglayer::primitive2d::createEmbeddedShadowPrimitive( -+ std::move(aRetval), aNewShadowAttribute, aTransformScaleMatrix, -+ &aRetvalForShadow); -+ } -+ else -+ { -+ // Shadow as style: shadow for text, to be backwards-compatible. -+ aRetval = drawinglayer::primitive2d::createEmbeddedShadowPrimitive( -+ std::move(aRetval), aNewShadowAttribute, aTransformScaleMatrix); -+ } - } - } - } -diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx -index 587fa4d4294e..e60fa05aab71 100644 ---- a/sw/qa/extras/layout/layout.cxx -+++ b/sw/qa/extras/layout/layout.cxx -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -1213,22 +1214,30 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestTdf137025) - // SDRATTR_TEXT_LEFTDIST - assertXPath(pXmlDoc, - "/root/page/body/txt/anchored/SwAnchoredDrawObject/SdrObject" -- "/DefaultProperties/SfxItemSet/SdrMetricItem/SfxInt32Item[@whichId='1072']", -+ "/DefaultProperties/SfxItemSet/SdrMetricItem/SfxInt32Item" -+ "[@whichId='" -+ + OString::number(SDRATTR_TEXT_LEFTDIST) + "']", - "value", "567"); - // SDRATTR_TEXT_RIGHTDIST - assertXPath(pXmlDoc, - "/root/page/body/txt/anchored/SwAnchoredDrawObject/SdrObject" -- "/DefaultProperties/SfxItemSet/SdrMetricItem/SfxInt32Item[@whichId='1073']", -+ "/DefaultProperties/SfxItemSet/SdrMetricItem/SfxInt32Item" -+ "[@whichId='" -+ + OString::number(SDRATTR_TEXT_RIGHTDIST) + "']", - "value", "1134"); - // SDRATTR_TEXT_UPPERDIST - assertXPath(pXmlDoc, - "/root/page/body/txt/anchored/SwAnchoredDrawObject/SdrObject" -- "/DefaultProperties/SfxItemSet/SdrMetricItem/SfxInt32Item[@whichId='1074']", -+ "/DefaultProperties/SfxItemSet/SdrMetricItem/SfxInt32Item" -+ "[@whichId='" -+ + OString::number(SDRATTR_TEXT_UPPERDIST) + "']", - "value", "1701"); - // SDRATTR_TEXT_LOWERDIST - assertXPath(pXmlDoc, - "/root/page/body/txt/anchored/SwAnchoredDrawObject/SdrObject" -- "/DefaultProperties/SfxItemSet/SdrMetricItem/SfxInt32Item[@whichId='1075']", -+ "/DefaultProperties/SfxItemSet/SdrMetricItem/SfxInt32Item" -+ "[@whichId='" -+ + OString::number(SDRATTR_TEXT_LOWERDIST) + "']", - "value", "2268"); - - // Check the textbox-shape import too --- -2.35.3 - diff --git a/libreoffice-7.5.4.2.tar.xz b/libreoffice-7.5.4.2.tar.xz deleted file mode 100644 index 7911a7d..0000000 --- a/libreoffice-7.5.4.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:68bbd1b79ffa4c33ed80f25520b9e6d69e3be23c9b4a0f0c9d859cc9a24865e8 -size 270237076 diff --git a/libreoffice-7.5.4.2.tar.xz.asc b/libreoffice-7.5.4.2.tar.xz.asc deleted file mode 100644 index b88f56f..0000000 --- a/libreoffice-7.5.4.2.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmR3d/4ACgkQ9DSh76/u -rqORyg//RJnPERuzsOCarqHMd/luquhq2MFSxa5eLZaSd9255Tl0k+2d21HYGr06 -82qdvhXU1KR+Jk3vBGZU1xn++hxK6rndcntJ2biBIM2q7C9mY3UzcHSQQVus96L7 -OV2tMDIwq1R7fFjG8cKnJsHouNSyRg2hQKgYVnG5FBAnZWmDaVZVzJVVS1CBPyto -VZKPW2hF7a9wSb5uDGcCbld+3Rz+YwY1e7/ilJhs0Cn3o5yK0/7cnrxCcwplK4n2 -HG71ZASHsZn70ivDI2a3dUxjdAbRcPBNCZ4HQMAr967gdn6lIhWHSa4z8tl8Tnzp -D5DfltLA6o3PlYVXfclIMdyZCMrdkF7z4xH/Dq/v7kN20Cb+j5kUntStQ0q8a9Zv -51ZCyHEhoc6FRqkR6XSLm0DqQN0M17p8bKAgWT4qKSvpB347wkhWB7pXIlNxAzIY -nUarcZRhCP1xi4glJWhQ8PKasXnFOPiBuhZGB5bMgMCKNC3Vm0Ipl4ckAnB5p3cq -7dPJ6HsMSHa4h+cYy878DUPeeJLLIpDx2QKeEZlTi8Ex4pSvz2c+H2mVy9ErNUhV -paV4jwvWiyWPGEBe88bGM7QmAbsu4z/5djdG6QyKf1Rx4o/7LsHCyeNW0BvEVFZH -yBnDsm3nXRNpq+te77QrzVR6r3Odt1/r4l7DYEV+74gaYp2g4H4= -=Uvp5 ------END PGP SIGNATURE----- diff --git a/libreoffice-7.6.0.1.tar.xz b/libreoffice-7.6.0.1.tar.xz new file mode 100644 index 0000000..4c93b67 --- /dev/null +++ b/libreoffice-7.6.0.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c2d7b942c062c22198586e5c41f8ab4b7ef8214dc8c4a67eaec979a35983630 +size 279453164 diff --git a/libreoffice-7.6.0.1.tar.xz.asc b/libreoffice-7.6.0.1.tar.xz.asc new file mode 100644 index 0000000..65c5b7b --- /dev/null +++ b/libreoffice-7.6.0.1.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmSoQ+4ACgkQ9DSh76/u +rqNDUw/6AlRcokNFLM1DYSgubB1INEHA68V4Apx673zwX5YKdCUBnEYVSLVNIAyM +XFl/N5OyyMXak6052rdjUAlAwwOlzoCv/N9trFPOO/XHerdv4AVf4EFPwsCQKfaM +tSNMHcXiC0Q9N56uVlcKe9zG0ZEghMnW3HxHdf0GZ8R4QTPmHOt3Dgre7ItAtk5d +r6xqIQnUlqJ1tVXh3mbyfa92Xs4E+1pj5wufYZEmFPrpRSeclCcHQfaAXKozcU7r +eBun4iC6ZJ5bCN5OvGOh+KsyKO7fwdRsqFIwAakYGa++fStihiI0SnC8wtUxjgZ0 +w0GK+o8xSoUjNlvfB5BhjQ5sRRNdW5/axESxXTpUg7QfUzvcE35JZVPinWtQbAxP +lsSrgFFqabk6RVYoRmTgET+er3IoOSxXqfZx6qc76aySjyCWnbFyifrRvZ831Qx3 +EvD0LefzGtm79vSdPk1A41eczfrMrlTaaIwX78kmX+Fa/OJtOtPqBvOHjuyfC7a3 +Y+uMKUupfTF6uxfdmabwdRb+RjMFZJX77zw0aIcD7Lx48gVQ4Gtd3xRhVCGzO92X +OXwyiaxJ0mpQu6XC9LsK3B9ZvgSiWw6NV+oNSdKV9RiOnTzS6fVj/iUZr5YOIdUq +nYKFgSZx4hcyV36d7YkGlgK2y3GuFm3Mt1FD7fLKO99nkbdMdng= +=qUMt +-----END PGP SIGNATURE----- diff --git a/libreoffice-help-7.5.4.2.tar.xz b/libreoffice-help-7.5.4.2.tar.xz deleted file mode 100644 index a991638..0000000 --- a/libreoffice-help-7.5.4.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a90f931dd3238eb64e6f65964ea8f90e5accd9ad10925d5a60c7af6aa585c1f1 -size 166236736 diff --git a/libreoffice-help-7.5.4.2.tar.xz.asc b/libreoffice-help-7.5.4.2.tar.xz.asc deleted file mode 100644 index 8dcdc05..0000000 --- a/libreoffice-help-7.5.4.2.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmR3eAYACgkQ9DSh76/u -rqMA5A//Rol6ELmXyEudx/oooUfc9qHp4ctZB2dENSGi4dp0I4Q3lix/OTvN58nl -EXFw0Dv3H0paH2tehDSxY7hmSPkAxwSA1N9rp1ntWoVsW6RdarBcHbRHLp+1EAKz -ZZrzPeejMyLLGoHq6+VdotxdCQFwXCAMhFVMtWyPXK7knajhIdu6TPBuxoBmDGPD -Yfh67AuMfY63DKc6lKJT9SnQZpzZqx944trGSTCdlG5MXSfxOErnsKtDsBx4h4Me -PVDlDW7vyOtO6TP9Ec5wRr3JynmPOTib2vxHtoBfjX+njsCclKQcECUX6v/hj1ac -GDAv1+eTzh6EyLxSiZO3W+EyVjd/mf26HiPjf+f4rlsRBkDe1UDddOKojh2n9hAm -/jvybzoFtiEODCjwUKToRnScJLwtR8OiwuGta7X/4wQa4Xh15hK7RL+JDWbr7d0W -TDb2L5sakYECkV7/OroR+pLSSLU8dBYM1kpfM5WfamqYFKgve9vzs660sRi7X81j -gv1fZq5PuwxcHnc/JyVp1mzeMSO3Y/YI84Sk9R2RhVILjuS/mg7YHp9ndydobDr1 -m/svErCoE8wgs89XCW9NaINFrX1Sfsw4eglJT/IV10nNfFJeadpJqVFb7Da6CPMZ -kHhAA0P8AfkwmyS0a3ww2igFmWtu+qDMh9rBmNI6uzJU0rsx4GY= -=6KWv ------END PGP SIGNATURE----- diff --git a/libreoffice-help-7.6.0.1.tar.xz b/libreoffice-help-7.6.0.1.tar.xz new file mode 100644 index 0000000..a7895b3 --- /dev/null +++ b/libreoffice-help-7.6.0.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7b85e9f0fa3a224060c01401be4eb580ecacfb2bf23a5ef16f183785a367e99 +size 166959152 diff --git a/libreoffice-help-7.6.0.1.tar.xz.asc b/libreoffice-help-7.6.0.1.tar.xz.asc new file mode 100644 index 0000000..c588964 --- /dev/null +++ b/libreoffice-help-7.6.0.1.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmSoQ/QACgkQ9DSh76/u +rqOWHA//baxlyJ+ilzTG0JFpfnKAo4IHZ2ynyZLgQ9glbei1hOIu2q8DZ2WgFpow +L6hOAbV50bxkzEmJ6R+JQYu9uOkQdQaTm12ypjyZHYm2BcyNuT80yLpU4nQSRU8h +c5rQahVevVFL8Mx6Et/Yn7CF96x/vh7DjAr8qUzByMb7WDc9qVz8f6kDT6XTlFlB +nPKlXr/VbToh80Pb3ZEnxMGjLpsAOCztVAgZfLYpIKARRn2yNiGydmb4W4vTrdYp +wGEfB49wA5DbZYxMlJN8d3ZWsvde6QqqiRGbvYygCTfeb6hz0efzJkTFHTkzHzqp +VOBnXu1XsK28tMU/izZwJ/DqJRSfJoaPI+2gNsVqByyrMkRPihCxbniSWKkBqlvQ +0/b9qyG9KeDK7SEF0MV9mPl18L84wF0AyGc7uPGOqLXWCSeld/ZDI7RWo5pcO0CP +uhMuO4/TQ7fTV4mohlo+DXrSiq7LGk3snNbPDxTxQx2vRESn6WOod5IWmyT0tf/n +nO9vs/ftJIz9AQ4nRE5wIHPMARgRbaXN5M6Y5C2MWrIJCzQT4midgRxmTGHV178Y +tCcdwMMhgW1TU21MrnR9oUiXR3ExGDEMebTf72/K3al4d81dyECwda7fr4iYwb8a +hcyvR46JZk+Wx2n9LLn6QrgYgsK191fxLCiiPFVkzcRjJBPe7DM= +=aVms +-----END PGP SIGNATURE----- diff --git a/libreoffice-translations-7.5.4.2.tar.xz b/libreoffice-translations-7.5.4.2.tar.xz deleted file mode 100644 index e581aa4..0000000 --- a/libreoffice-translations-7.5.4.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7eb264c2cd66f028831535bec0d3fcdfb687fae4deb77d200cfe4034ca3a10ad -size 204594148 diff --git a/libreoffice-translations-7.5.4.2.tar.xz.asc b/libreoffice-translations-7.5.4.2.tar.xz.asc deleted file mode 100644 index 1c5266b..0000000 --- a/libreoffice-translations-7.5.4.2.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmR3eAcACgkQ9DSh76/u -rqNFtg//V1h2Zt3Q5/sP/q9Gbrm2+Z3EEF4EDbd1BD8hWI4FyPQqDvy+Hy4vKFpV -xYxzfcXK1dgx8fI9LRLhMVHiMB/fdFotJsueFn7gSohuHGSvmKQ970OzuQkU2b2o -mtyHysELejFoi7uA3LB85/yx5Me6x8Dhj3gYx9pq7hwFWJNWUqsGYFVcI1qRnGzp -HTmnmOM2a9cVffUl8v/3v+ti8BCNSQnmbKcHi7X+sHYybC4iWhviZcZmYUx+NfyN -w5Lr4CK+RzAiZ+AcMgQU0/QQoIDrQIqIktjKh9Y6088JWOsQYFhRIOek5H2xU+Tn -fsoowxljzUbSghCk+Ls9uWZAdp1MHIy79YNDzPbKuk5CV4QUV4GUBlik5Cq2iC9S -x5lx6J1IoenEgoYunyS6C/LNOZwYjUvX/gNpr5ARHhEdumdkqnUQj19vNRm58SFM -RFVgnFw134Ff1u/pPhq0/s1P/aZ6HuaJWRCmMdbwuA90apW1SrpAH5RpbHWH/jDj -OukwBhDT1R8vQvFjDeKU7WHq4b5E9m/cC3UKJDHp+NbF6KmreUDSLdD1Ass4Z+mQ -zvjmAhHh5TOV8dxipjkAaAeLtjXNKJXM9X0v5MfD/ckj8zbxwyg+FQ6XNv2NNU51 -8+gVdnYAv8/Cl3krFYOPUH3//jnTdJiHBDkhSH7E6QZFan0XTD4= -=36uU ------END PGP SIGNATURE----- diff --git a/libreoffice-translations-7.6.0.1.tar.xz b/libreoffice-translations-7.6.0.1.tar.xz new file mode 100644 index 0000000..b5c1937 --- /dev/null +++ b/libreoffice-translations-7.6.0.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8edd2fb3c8f4f80416f52b40fdfeca775469b1660706721a07d10e5711a245b +size 216354424 diff --git a/libreoffice-translations-7.6.0.1.tar.xz.asc b/libreoffice-translations-7.6.0.1.tar.xz.asc new file mode 100644 index 0000000..625e284 --- /dev/null +++ b/libreoffice-translations-7.6.0.1.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmSoQ/QACgkQ9DSh76/u +rqMV0xAAuvFagEKJYKEqG5CccoHuSJiWSWw+1nPVW7w15GEp+8F78yTbi9LL4tt4 +A4Gh4OZFR40Rfb5OK9SBV6+7ybvCPuHthOGd/C7ltJ3ZBK1BbYAIaaAwh9Fj3hct +LIgIuS/3wWtSqjoB3/+kLFDXVnX2OUKQePYAjtugIzLC92n2KMHcmd2WbJUrQkX/ +5h+I+vVRKBmfbuGxekmIhU22Rv5GdL9VatGh9QnzXy+WDwn5s9QutpUsKPsVBkwa +iSj5C9cM+fJulrBc5JjfDhXYhj6Z8LgtnJZ+tGJYDK3ezKzoAvoycgwCRUMzLPLK +pF6HsCzRDEjmhSbG0t5/PbXGo/70AFy/oNdXppnhFjB3/FkTl0XVNoG5q6nsxjoJ +nqogQjRmdkKTTXB3L4Tm5DROo6ftkoofhhoCweYwYTcq5kunCUj8rXv6Gi7igOSL +kmWu45UKRKQH0Pf7SWBY2pbkm7oeKUg+B6a/YI73j7bIBHmy5jqPLV09NQhf6P/d +GWb7GSTL6hxwC1NaZ4V/MHa8Nh580vgSkkPbp3lWy6yOAXmfERmwg0JSOMnqqjD5 +4WPrrj45AaUARyBoiemPlp45TBpOLYudwOgjbt1LiMvxk8ZidJ8kd13vhkrBJq0P +brvz4iIEtBjnLQ23Kaejm9As1BdAR8jg93hJMzPUVQg1knnomXU= +=x9Ly +-----END PGP SIGNATURE----- diff --git a/libreoffice.changes b/libreoffice.changes index 459a00d..a228c60 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Thu Jul 13 12:37:59 UTC 2023 - Danilo Spinella + +- Update to 7.6.0.1: + https://wiki.documentfoundation.org/ReleaseNotes/7.6 + https://wiki.documentfoundation.org/Releases/7.6.0/RC1 +- Update bundled dependencies: + * pdfium-5408.tar.bz2 -> pdfium-5778.tar.bz2 + * skia-m103-b301ff025004c9cd82816c86c547588e6c24b466.tar.xz -> + skia-m111-a31e897fb3dcbc96b2b40999751611d029bf5404.tar.xz +- Removed upstreamed patches: + * bsc1200085.patch + * bsc1204040.patch + * bsc1204040.patch + ------------------------------------------------------------------- Mon Jun 5 08:47:04 UTC 2023 - Danilo Spinella diff --git a/libreoffice.spec b/libreoffice.spec index 583689a..759ad1a 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -49,7 +49,7 @@ %endif %bcond_with firebird Name: libreoffice -Version: 7.5.4.2 +Version: 7.6.0.1 Release: 0 Summary: A Free Office Suite (Framework) License: LGPL-3.0-or-later AND MPL-2.0+ @@ -90,11 +90,11 @@ Source2005: %{external_url}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zi Source2006: https://dev-www.libreoffice.org/extern/8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar Source2007: https://dev-www.libreoffice.org/extern/odfvalidator-0.9.0-RC2-SNAPSHOT-jar-with-dependencies-2726ab578664434a545f8379a01a9faffac0ae73.jar # PDFium is bundled everywhere -Source2008: %{external_url}/pdfium-5408.tar.bz2 +Source2008: %{external_url}/pdfium-5778.tar.bz2 # Single C file with patches from LO Source2009: %{external_url}/dtoa-20180411.tgz # Skia is part of chromium and bundled everywhere as by google only way is monorepo way -Source2010: %{external_url}/skia-m103-b301ff025004c9cd82816c86c547588e6c24b466.tar.xz +Source2010: %{external_url}/skia-m111-a31e897fb3dcbc96b2b40999751611d029bf5404.tar.xz Source2012: %{external_url}/libcmis-0.5.2.tar.xz # change user config dir name from ~/.libreoffice/3 to ~/.libreoffice/3-suse # to avoid BerkleyDB incompatibility with the plain build @@ -115,12 +115,6 @@ Patch14: use-fixmath-shared-library.patch Patch15: fix-sdk-idl.patch # PATCH-FIX-SUSE Allow the use of old harfbuzz versions Patch16: 0002-Revert-Require-HarfBuzz-5.1.0.patch -# LO-L3: FILEOPEN PPTX: extra paragraph after some 2-line text with link -Patch17: bsc1200085.patch -# LO-L3: PPTX: shadow effect for table offset too far to the right -Patch18: bsc1204040.patch -# LO-L3: Need to be able to set the default tab size for each text object -Patch19: bsc1198666.patch # Build with java 8 Patch101: 0001-Revert-java-9-changes.patch # try to save space by using hardlinks @@ -150,6 +144,7 @@ BuildRequires: fdupes BuildRequires: flex >= 2.6.0 BuildRequires: flute BuildRequires: fontforge +BuildRequires: frozen-devel BuildRequires: glm-devel # Needed for tests BuildRequires: google-carlito-fonts @@ -224,7 +219,7 @@ BuildRequires: pkgconfig(libmspub-0.1) >= 0.1 BuildRequires: pkgconfig(libmwaw-0.3) >= 0.3.21 BuildRequires: pkgconfig(libnumbertext) >= 1.0.6 BuildRequires: pkgconfig(libodfgen-0.1) >= 0.1.4 -BuildRequires: pkgconfig(liborcus-0.17) +BuildRequires: pkgconfig(liborcus-0.18) BuildRequires: pkgconfig(libpagemaker-0.0) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libpq) @@ -240,7 +235,7 @@ BuildRequires: pkgconfig(libwps-0.4) >= 0.4.11 BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libxslt) BuildRequires: pkgconfig(libzmf-0.0) -BuildRequires: pkgconfig(mdds-2.0) +BuildRequires: pkgconfig(mdds-2.1) BuildRequires: pkgconfig(mythes) BuildRequires: pkgconfig(nspr) >= 4.8 BuildRequires: pkgconfig(nss) >= 3.9.3 @@ -1046,9 +1041,6 @@ Provides %{langname} translations and additional resources (help files, etc.) fo %if 0%{?suse_version} < 1550 %patch16 -p1 %endif -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 %patch990 -p1 %patch991 -p1 diff --git a/pdfium-5408.tar.bz2 b/pdfium-5408.tar.bz2 deleted file mode 100644 index 6211658..0000000 --- a/pdfium-5408.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7db59b1e91f2bc0ab4c5e19d1a4f881e6a47dbb0d3b7e980a7358225b12a0f35 -size 10077997 diff --git a/pdfium-5778.tar.bz2 b/pdfium-5778.tar.bz2 new file mode 100644 index 0000000..e0851b5 --- /dev/null +++ b/pdfium-5778.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1052ff24e9ffb11af017c444bb0f6ad508d64c9a0fb88cacb0e8210245dde06 +size 9532052 diff --git a/skia-m103-b301ff025004c9cd82816c86c547588e6c24b466.tar.xz b/skia-m103-b301ff025004c9cd82816c86c547588e6c24b466.tar.xz deleted file mode 100644 index 4f0fc79..0000000 --- a/skia-m103-b301ff025004c9cd82816c86c547588e6c24b466.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c094a6247e44104beaaa0d00c825beb6baf1a8e532dc22214747495317a65bd9 -size 11079112 diff --git a/skia-m111-a31e897fb3dcbc96b2b40999751611d029bf5404.tar.xz b/skia-m111-a31e897fb3dcbc96b2b40999751611d029bf5404.tar.xz new file mode 100644 index 0000000..e371c31 --- /dev/null +++ b/skia-m111-a31e897fb3dcbc96b2b40999751611d029bf5404.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d08a99ed46cde43b5ad2672b5d8770c8eb85d0d26cb8f1f85fd9befe1e9ceb9 +size 10693272