download.lst                              |    4 ++--
 sc/source/ui/view/tabvwsha.cxx            |   12 ++++++++++++
 svx/source/tbxctrls/grafctrl.cxx          |   10 +++-------
 sw/qa/extras/ww8export/data/tdf142840.odt |binary
 sw/qa/extras/ww8export/ww8export3.cxx     |   17 +++++++++++++++++
 sw/source/filter/ww8/wrtw8nds.cxx         |    7 +++++--
 6 files changed, 39 insertions(+), 11 deletions(-)

New commits:
commit ebd760cffb9bf607b58f1eead796830a89e3cbba
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed May 11 15:18:20 2022 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri May 13 16:53:52 2022 +0200

    tdf#149023 set property immediately on change
    
    and not in an idle which may be triggered on losing focus and
    arrive when a new shape is selected
    
    Change-Id: I7cec8f1c9bf864cdb30516dece1ef9d6b689a94e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134175
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 87da298aed9d..810e1c83efb3 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -71,7 +71,6 @@ namespace {
 class ImplGrafControl final : public InterimItemWindow
 {
 private:
-    Idle maIdle;
     OUString maCommand;
     Reference<XFrame> mxFrame;
     std::unique_ptr<weld::Image> mxImage;
@@ -79,7 +78,7 @@ private:
 
     DECL_LINK(ValueChangedHdl, weld::MetricSpinButton&, void);
     DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
-    DECL_LINK(ImplModifyHdl, Timer*, void);
+    void ImplModify();
 
 public:
     ImplGrafControl( vcl::Window* pParent, const OUString& rCmd, const 
Reference< XFrame >& rFrame );
@@ -100,10 +99,10 @@ public:
 
 IMPL_LINK_NOARG(ImplGrafControl, ValueChangedHdl, weld::MetricSpinButton&, 
void)
 {
-    maIdle.Start();
+    ImplModify();
 }
 
-IMPL_LINK_NOARG(ImplGrafControl, ImplModifyHdl, Timer*, void)
+void ImplGrafControl::ImplModify()
 {
     const sal_Int64 nVal = mxField->get_value(FieldUnit::NONE);
 
@@ -196,7 +195,6 @@ ImplGrafControl::ImplGrafControl(
     const OUString& rCmd,
     const Reference< XFrame >& rFrame)
     : InterimItemWindow(pParent, "svx/ui/grafctrlbox.ui", "GrafCtrlBox")
-    , maIdle("svx ImplGrafControl maIdle")
     , maCommand(rCmd)
     , mxFrame(rFrame)
     , mxImage(m_xBuilder->weld_image("image"))
@@ -232,8 +230,6 @@ ImplGrafControl::ImplGrafControl(
         mxField->set_increments(1, 10, FieldUnit::PERCENT);
     }
 
-    maIdle.SetInvokeHandler( LINK( this, ImplGrafControl, ImplModifyHdl ) );
-
     SetSizePixel(m_xContainer->get_preferred_size());
 }
 
commit adfd1ead0c3db5dc118761d250614bf666f55921
Author:     Vasily Melenchuk <vasily.melenc...@cib.de>
AuthorDate: Fri Apr 29 11:10:48 2022 +0300
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri May 13 16:53:51 2022 +0200

    tdf#142840: doc export: use BookmarkToWord() for hyperlinks
    
    Inernal hyperlinks to bookmarks should not contain spaces. This
    is not required for RTF or DOC: MS Word is okay with spaces there
    (unlike in DOCX). But since we are replacing spaces in bookmark
    names we should do this also in links to these bookmarks.
    
    Change-Id: I7a3e530817572ed53032c2be1ad96f8e8498bac3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133590
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>
    (cherry picked from commit d45315c8eb91862958b29ead09cec58e03a80096)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134177
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/qa/extras/ww8export/data/tdf142840.odt 
b/sw/qa/extras/ww8export/data/tdf142840.odt
new file mode 100644
index 000000000000..27af4cdb5e6a
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf142840.odt differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx 
b/sw/qa/extras/ww8export/ww8export3.cxx
index 0ed99f7e64dc..e08ac118b464 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -1039,6 +1039,23 @@ CPPUNIT_TEST_FIXTURE(Test, testClearingBreak)
     verify();
 }
 
+DECLARE_WW8EXPORT_TEST(testTdf142840, "tdf142840.odt")
+{
+    CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+    uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, 
uno::UNO_QUERY);
+    uno::Reference<container::XIndexAccess> 
xBookmarksByIdx(xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY);
+    uno::Reference<container::XNameAccess> xBookmarksByName = 
xBookmarksSupplier->getBookmarks();
+
+    // Ensure space are replaced by underscore in bookmark name (it was 
working before, but ensure this)
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), 
xBookmarksByIdx->getCount());
+    CPPUNIT_ASSERT(xBookmarksByName->hasByName("Chapter_1"));
+    CPPUNIT_ASSERT(!xBookmarksByName->hasByName("Chapter 1"));
+
+    // And hyperlink is referring bookmark with underscore also (this was 
broken)
+    CPPUNIT_ASSERT_EQUAL(OUString("#Chapter_1"), 
getProperty<OUString>(getRun(getParagraph(1), 1), "HyperLinkURL"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index 7695942265b0..805ab17a7464 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1029,8 +1029,11 @@ bool WW8AttributeOutput::AnalyzeURL( const OUString& 
rUrl, const OUString& rTarg
     if ( !sURL.isEmpty() )
         sURL = URIHelper::simpleNormalizedMakeRelative( 
m_rWW8Export.GetWriter().GetBaseURL(), sURL );
 
-    if ( bBookMarkOnly )
-        sURL = FieldString( ww::eHYPERLINK );
+    if (bBookMarkOnly)
+    {
+        sURL = FieldString(ww::eHYPERLINK);
+        *pMark = BookmarkToWord(*pMark);
+    }
     else
         sURL = FieldString( ww::eHYPERLINK ) + "\"" + sURL + "\"";
 
commit 576b53da740928931731ae3ec81c581e4f73cf7e
Author:     Kohei Yoshida <ko...@libreoffice.org>
AuthorDate: Tue May 10 22:07:16 2022 -0400
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri May 13 16:53:51 2022 +0200

    Update mdds to 2.0.3.
    
    This release includes a revised block position search implementation
    that shouldn't touch the internal STL iterators so that even if you
    pass an invalid position hint, it should not trigger process
    termination.
    
    Change-Id: I8c76eb012ba7ce304ff10b38de468b7c9c6cce2b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134140
    Tested-by: Jenkins
    Reviewed-by: Kohei Yoshida <ko...@libreoffice.org>
    Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134152
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/download.lst b/download.lst
index 0dd91182bdab..fee9630f0db5 100644
--- a/download.lst
+++ b/download.lst
@@ -202,8 +202,8 @@ export LXML_SHA256SUM := 
940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a
 export LXML_TARBALL := lxml-4.1.1.tgz
 export MARIADB_CONNECTOR_C_SHA256SUM := 
431434d3926f4bcce2e5c97240609983f60d7ff50df5a72083934759bb863f7b
 export MARIADB_CONNECTOR_C_TARBALL := mariadb-connector-c-3.1.8-src.tar.gz
-export MDDS_SHA256SUM := 
3ab33fce58e6acf9540cc1a52264be6863ef80f55ac287194cc98cda48e71fe6
-export MDDS_TARBALL := mdds-2.0.1.tar.bz2
+export MDDS_SHA256SUM := 
9771fe42e133443c13ca187253763e17c8bc96a1a02aec9e1e8893367ffa9ce5
+export MDDS_TARBALL := mdds-2.0.3.tar.bz2
 export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
commit c7c104997f3b362689665a0d433a934463eb634a
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Tue May 10 18:39:27 2022 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri May 13 16:53:51 2022 +0200

    Resolves: tdf#132582 Display duration for calculated time values selection
    
    Change-Id: I634cd0fb059ed9c35849b435bcbd178cd84ac2ae
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134132
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit 23689e492feb41a391738586cef04ab82cc21f80)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134069
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 209f935a729f..39910e32cc39 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -29,6 +29,7 @@
 #include <sfx2/viewfrm.hxx>
 #include <svl/ilstitem.hxx>
 #include <svl/numformat.hxx>
+#include <svl/zformat.hxx>
 #include <svl/int64item.hxx>
 #include <svl/srchitem.hxx>
 #include <svl/srchdefs.hxx>
@@ -127,6 +128,17 @@ bool ScTabViewShell::GetFunction( OUString& rFuncStr, 
FormulaError nErrCode )
                     {
                         // number format from attributes or formula
                         nNumFmt = rDoc.GetNumberFormat( nPosX, nPosY, nTab );
+                        // If the number format is time (without date) and the
+                        // result is not within 24 hours, use a duration
+                        // format. Summing date+time doesn't make much sense
+                        // otherwise but we also don't want to display duration
+                        // for a single date+time value.
+                        if (nVal < 0.0 || nVal >= 1.0)
+                        {
+                            const SvNumberformat* pFormat = 
pFormatter->GetEntry(nNumFmt);
+                            if (pFormat && (pFormat->GetType() == 
SvNumFormatType::TIME))
+                                nNumFmt = pFormatter->GetTimeFormat( nVal, 
pFormat->GetLanguage(), true);
+                        }
                     }
 
                     OUString aValStr;

Reply via email to