officecfg/registry/schema/org/openoffice/Office/Common.xcs | 2 + slideshow/source/engine/activities/simplecontinuousactivitybase.cxx | 12 +++++++--- sw/qa/extras/ooxmlexport/data/tdf148494.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport17.cxx | 12 ++++++++++ sw/source/filter/ww8/ww8atr.cxx | 4 +-- 5 files changed, 25 insertions(+), 5 deletions(-)
New commits: commit 1b4a46e5f16c63d1920daf81274ab682e06e7ae9 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Apr 15 17:55:21 2022 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Tue Apr 19 13:13:49 2022 +0200 tdf#148494: export: Always add space separator Otherwise, the macro is saved as MACROBUTTONAllCaps instead of MACROBUTTON AllCaps Change-Id: Id1288e23f21ce72884bc1197f171e255ea7458f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133077 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133082 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/sw/qa/extras/ooxmlexport/data/tdf148494.docx b/sw/qa/extras/ooxmlexport/data/tdf148494.docx new file mode 100644 index 000000000000..c60c73a206fb Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf148494.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx index b658a451fa2d..9a31041d6465 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx @@ -100,6 +100,18 @@ CPPUNIT_TEST_FIXTURE(Test, testClearingBreak) assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:br", "clear", "all"); } +CPPUNIT_TEST_FIXTURE(Test, testTdf148494) +{ + loadAndSave("tdf148494.docx"); + + xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); + + // Without the fix in place, this test would have failed with + // - Expected: MACROBUTTON AllCaps Hello World + // - Actual : MACROBUTTONAllCaps Hello World + assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[3]/w:instrText", " MACROBUTTON AllCaps Hello World "); +} + DECLARE_OOXMLEXPORT_TEST(testTdf137466, "tdf137466.docx") { xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 6a0e38eb6677..1b6c22f26d00 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -3306,8 +3306,8 @@ void AttributeOutputBase::TextField( const SwFormatField& rField ) break; case SwFieldIds::Macro: { - const OUString sStr = " MACROBUTTON" - + pField->GetPar1().replaceFirst("StarOffice.Standard.Modul1.", " ") + const OUString sStr = " MACROBUTTON " + + pField->GetPar1().replaceFirst("StarOffice.Standard.Modul1.", "") + " " + lcl_GetExpandedField(*pField); GetExport().OutputField( pField, ww::eMACROBUTTON, sStr ); commit 7e4b2a2ab2d1b0a680b7e880925dd57e4aa5299f Author: Thorsten Behrens <thorsten.behr...@allotropia.de> AuthorDate: Thu Apr 14 12:01:50 2022 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Tue Apr 19 13:13:15 2022 +0200 Resolves: tdf#143615 clamp relative times to 1.0 User input permits zero-length animations, so whenever we calculate relative position within the animation time frame, the case mnMinSimpleDuration == 0.0 means: we're already at the end of the animation, i.e. set relative time to 1.0 Change-Id: I0e8c1e29f47bd9fa16f04115cf52d3a176e13fb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133005 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> (cherry picked from commit e1db8c27875eac73b1e619e4a23ecdb7a9924b61) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133038 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx b/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx index 9e23fc2c76c8..01cb3b75007b 100644 --- a/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx +++ b/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx @@ -63,9 +63,12 @@ namespace slideshow::internal // perform will be called at least mnMinNumberOfTurns // times. - // fraction of time elapsed + // fraction of time elapsed (clamp to 1.0 for zero-length + // animations) const double nFractionElapsedTime( - nCurrElapsedTime / mnMinSimpleDuration ); + mnMinSimpleDuration != 0.0 ? + nCurrElapsedTime / mnMinSimpleDuration : + 1.0 ); // fraction of minimum calls performed const double nFractionRequiredCalls( @@ -115,7 +118,10 @@ namespace slideshow::internal // =============================== const double nCurrElapsedTime( maTimer.getElapsedTime() ); - double nT( nCurrElapsedTime / mnMinSimpleDuration ); + // clamp to 1.0 for zero animation duration + double nT( mnMinSimpleDuration != 0.0 ? + nCurrElapsedTime / mnMinSimpleDuration : + 1.0 ); // one of the stop criteria reached? commit bf97c842e9455bfdea236dcafe000588e63b3336 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Apr 13 17:09:01 2022 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Tue Apr 19 13:13:15 2022 +0200 Resolves: tdf#148122 Celtic MD font appears wrong Change-Id: Ib551f073b8ea0e0662660ccf01ebf56c2fd7f340 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132868 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index 4d49ae8c8447..4f615a4ef69b 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -5581,6 +5581,8 @@ </desc> </info> <value> + <!-- tdf#148122 Celtic MD font appears wrong --> + <it>Celticmd,1571,-567,1571,-547,2126,559</it> <!-- DIN Light (ttf version) has odd metrics. The otf version works fine. --> <it>DIN Light,1509,-503,1509,-483,1997,483</it> </value>