[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 11 commits - download.lst forms/source hwpfilter/qa hwpfilter/source jvmfwk/plugins sc/source sd/source svx/source sw/source

Markus Mohrhard markus.mohrhard at googlemail.com
Wed Mar 1 12:47:25 UTC 2017


 download.lst                                        |    4 +--
 forms/source/misc/InterfaceContainer.cxx            |   16 ++++++------
 hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp      |binary
 hwpfilter/qa/cppunit/test_hwpfilter.cxx             |   16 +++---------
 hwpfilter/source/hiodev.cxx                         |    8 ++++--
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |   10 +++++++
 sc/source/core/data/document.cxx                    |    2 -
 sc/source/ui/inc/tabview.hxx                        |    5 +++
 sc/source/ui/view/tabview.cxx                       |    1 
 sc/source/ui/view/tabview4.cxx                      |   26 ++++++++++++++++----
 sd/source/filter/eppt/pptx-epptooxml.cxx            |    7 +++++
 svx/source/sidebar/media/MediaPlaybackPanel.cxx     |   18 +++++++++----
 svx/source/stbctrls/stbctrls.src                    |    3 --
 sw/source/filter/xml/xmlimpit.cxx                   |    2 -
 14 files changed, 81 insertions(+), 37 deletions(-)

New commits:
commit 726fc14b79362553c2d2a0fb556ce39d54242e09
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Feb 28 02:25:30 2017 +0100

    mpMediaItem might be nullptr
    
    This fixes at least two crashes reported through the crashreporter:
    http://crashreport.libreoffice.org/stats/signature/avmedia::MediaItem::getTime()
    http://crashreport.libreoffice.org/stats/signature/avmedia::MediaItem::getDuration()
    
    Change-Id: I92eeca229fa46921317586d0317e9f00309e793b
    Reviewed-on: https://gerrit.libreoffice.org/34710
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit b5987a4148a10e27fe44ecf5d03e697692e07ca9)
    Reviewed-on: https://gerrit.libreoffice.org/34712
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
    (cherry picked from commit 52b89c4764b68cd560000cec68678c8234a8a3d5)

diff --git a/svx/source/sidebar/media/MediaPlaybackPanel.cxx b/svx/source/sidebar/media/MediaPlaybackPanel.cxx
index 46f7645..f1e744d 100644
--- a/svx/source/sidebar/media/MediaPlaybackPanel.cxx
+++ b/svx/source/sidebar/media/MediaPlaybackPanel.cxx
@@ -118,10 +118,13 @@ void MediaPlaybackPanel::UpdateToolBoxes(MediaItem aMediaItem)
 
 void MediaPlaybackPanel::Update()
 {
-    UpdateToolBoxes( *mpMediaItem );
-    UpdateTimeSlider( *mpMediaItem );
-    UpdateVolumeSlider( *mpMediaItem );
-    UpdateTimeField( *mpMediaItem, mpMediaItem->getTime() );
+    if (mpMediaItem)
+    {
+        UpdateToolBoxes( *mpMediaItem );
+        UpdateTimeSlider( *mpMediaItem );
+        UpdateVolumeSlider( *mpMediaItem );
+        UpdateTimeField( *mpMediaItem, mpMediaItem->getTime() );
+    }
 }
 
 IMPL_LINK_NOARG( MediaPlaybackPanel, VolumeSlideHdl, Slider*, void)
@@ -135,7 +138,10 @@ IMPL_LINK_NOARG( MediaPlaybackPanel, SeekHdl, Slider*, void)
 {
     MediaItem aItem(SID_AVMEDIA_TOOLBOX);
     aItem.setState( MediaState::Pause );
-    aItem.setTime( mpTimeSlider->GetThumbPos() * mpMediaItem->getDuration() / AVMEDIA_TIME_RANGE);
+    double nTime = 0;
+    if (mpMediaItem)
+        nTime = mpTimeSlider->GetThumbPos() * mpMediaItem->getDuration() / AVMEDIA_TIME_RANGE;
+    aItem.setTime(nTime);
     mpBindings->GetDispatcher()->ExecuteList(SID_AVMEDIA_TOOLBOX, SfxCallMode::RECORD, { &aItem });
     mpBindings->Invalidate(SID_AVMEDIA_TOOLBOX);
 }
@@ -154,7 +160,7 @@ IMPL_LINK( MediaPlaybackPanel, PlayToolBoxSelectHdl, ToolBox*, pControl, void)
         {
             aItem.setState( MediaState::Play );
 
-            if( mpMediaItem->getTime() == mpMediaItem->getDuration() )
+            if( !mpMediaItem || (mpMediaItem->getTime() == mpMediaItem->getDuration() ))
                 aItem.setTime( 0.0 );
             else
                 aItem.setTime( mpMediaItem->getTime());
commit 4eaaea896d4709d4a56318b9e879e889cbc0d86f
Author: Justin Luth <justin_luth at sil.org>
Date:   Wed Jan 18 15:52:33 2017 +0300

    tdf#77111 odt import: treat PAGEDESC_PAGENUMOFFSET==0 as auto
    
    Ever since 2010 commit 7edaf190 zeroes have been saved as XML_AUTO.
    Ever since 2014 commit c2ccd20c, a numoffset of zero is no longer
    considered to be auto (for MS compatibility) but is still treated
    as auto during xml export. Thus, any older documents that had been
    saved with a zero should still xml import as auto instead of as 0.
    
    Change-Id: I1a0df32a8e2f1b30b2bedbf4c9bb07ebec239637
    Reviewed-on: https://gerrit.libreoffice.org/33267
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit e36f0860f00af139a8fa94d36302f7b0c56383fe)
    Reviewed-on: https://gerrit.libreoffice.org/34694
    (cherry picked from commit ae225329435cb49e61e3c9fc76129aa4e334598a)

diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index bb0f51e..058c951 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -786,7 +786,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
                 sal_Int32 nVal;
                 bOk = ::sax::Converter::convertNumber(
                         nVal, rValue, 0, USHRT_MAX);
-                if( bOk )
+                if( bOk && nVal > 0 )
                     rPageDesc.SetNumOffset( (sal_uInt16)nVal );
             }
         }
commit 1031f30df5bafda720d8f3aab97b1ab6dfe14eb6
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Mon Feb 27 13:11:19 2017 +0100

    tdf#106082 fix missing statusbar translations (l10ntool is picky about syntax)
    
    having the ; on a separate line made all strings following that have the
    string-ID of the next unit, altering the msgctx and thus translations
    wouldn't apply anymore
    
    Change-Id: Ia1e3c36a9d2a57725c90e6c3f33de99bed85ec41
    (cherry picked from commit 9eaa17e6bb35a2cb71ec59c96ea4a39466789667)
    (cherry picked from commit 4717dafe916d81f1c70ea0c51cb1342624116422)

diff --git a/svx/source/stbctrls/stbctrls.src b/svx/source/stbctrls/stbctrls.src
index 0801afc..6c3a739 100644
--- a/svx/source/stbctrls/stbctrls.src
+++ b/svx/source/stbctrls/stbctrls.src
@@ -119,8 +119,7 @@ String RID_SVXSTR_DOC_LOAD
 String RID_SVXSTR_FIT_SLIDE
 {
     Text [ en-US ] = "Fit slide to current window.";
-}
-;
+};
 
 String RID_SVXSTR_WARN_MISSING_SMARTART
 {
commit bd4fd4da2fa4c4092c0994cf4891cde953c282af
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Feb 24 17:00:28 2017 +0100

    Make JVM -Xrunjdwp option work on macOS
    
    I hope loading the jvm library as SAL_LOADMODULE_GLOBAL has no negative
    consequences (at least, there is prior art in the LINUX case already).
    
    Change-Id: If18b65bd96f7205fdf9fd41389e64e786c15af16
    (cherry picked from commit f21994e7a240563283b7a17dcb435ce7c5156b60)
    Reviewed-on: https://gerrit.libreoffice.org/34676
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit 90c7d328f3fca95f140affb5dd83622ae3b988c9)

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 5053fda..63791bc 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -670,6 +670,16 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
     osl::Module moduleRt;
 #if defined(LINUX)
     if (!moduleRt.load(sRuntimeLib, SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_NOW))
+#elif defined MACOSX
+    // Must be SAL_LOADMODULE_GLOBAL when e.g. specifying a
+    // -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 option to
+    // JDK 1.8.0_121 at least, as JNI_CreateJavaVM -> Threads::create_vm ->
+    // JvmtiExport::post_vm_initialized -> cbEarlyVMInit -> initialize ->
+    // util_initialize -> sun.misc.VMSupport.getAgentProperties ->
+    // Java_sun_misc_VMSupport_initAgentProperties ->
+    // JDK_FindJvmEntry("JVM_INitAgentProperties") ->
+    // dlsym(RTLD_DEFAULT, "JVM_INitAgentProperties"):
+    if (!moduleRt.load(sRuntimeLib, SAL_LOADMODULE_GLOBAL))
 #else
 #if defined(_WIN32)
     do_msvcr_magic(sRuntimeLib.pData);
commit f92bbd767d17e3c322a551ffd221e0810b69c311
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Sat Feb 11 16:24:37 2017 +0100

    tdf#104222: Put expensive debug code behind #if again
    
    dump_pset calls very expensive SdGenericDrawPage::getPropertyValue
    doing something with GDIMetaFiles.
    
    (regression from 5c7ce42dfc35d9cceef5f05a96e813b4e3913d38)
    
    (cherry picked from commit 9cbe69f1950115e47af693bd78fc78f96f9b508e)
    
    Change-Id: If39e9a451c87754343d77c8a1f840153c6b9de80
    Reviewed-on: https://gerrit.libreoffice.org/34643
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit bc3b23f9c07aa2916c648abf1ca8c2af297250d4)

diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 8069c7a..03ddcd0 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -93,7 +93,10 @@ using ::com::sun::star::container::XIndexAccess;
 using ::sax_fastparser::FSHelperPtr;
 
 
+#if OSL_DEBUG_LEVEL > 1
 void dump_pset(Reference< XPropertySet > const & rXPropSet);
+#endif
+
 #define IDS(x) OString(OStringLiteral(#x " ") + OString::number( mnShapeIdMax++ )).getStr()
 
 namespace oox {
@@ -1788,7 +1791,9 @@ void PowerPointExport::ImplWritePPTXLayout( sal_Int32 nOffset, sal_uInt32 nMaste
 
     Reference< beans::XPropertySet > xPropSet( xSlide, uno::UNO_QUERY );
     xPropSet->setPropertyValue( "Layout", makeAny( short( aLayoutInfo[ nOffset ].nType ) ) );
+#if OSL_DEBUG_LEVEL > 1
     dump_pset(xPropSet);
+#endif
     mXPagePropSet.set( xSlide, UNO_QUERY );
     mXShapes.set( xSlide, UNO_QUERY );
 
@@ -2329,6 +2334,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL sdfilt_component_getFactory( const sal_Char*
 
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void dump_pset(Reference< XPropertySet > const & rXPropSet)
 {
     Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo ();
@@ -2356,5 +2362,6 @@ void dump_pset(Reference< XPropertySet > const & rXPropSet)
             SAL_INFO("sd.eppt", "???          <unhandled type>");
     }
 }
+#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 1460da4985fa9036ee298c4974da97d0e6f2b75a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Feb 24 15:16:27 2017 +0000

    hwpfilter needs a new filter for each document
    
    setUp is called just once at the start of the sequence of loads
    so we're reusing the previous import state which isn't what this
    filter expects
    
    This reverts commit 0af436083e12516eb9251d4cc6f594f80ed06d3d.
    
    Change-Id: Iae355ed6099086fd3cc1c79203786017507d4ed4
    (cherry picked from commit 3cc3dc176e00062d8395d9f3d83b49ab24542a61)
    Reviewed-on: https://gerrit.libreoffice.org/34619
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit bc873190b708ae2f403be11f337fa0facaec557d)

diff --git a/hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp b/hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp
new file mode 100644
index 0000000..8fd8e7a
Binary files /dev/null and b/hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp differ
diff --git a/hwpfilter/qa/cppunit/test_hwpfilter.cxx b/hwpfilter/qa/cppunit/test_hwpfilter.cxx
index f497d12..040c98e 100644
--- a/hwpfilter/qa/cppunit/test_hwpfilter.cxx
+++ b/hwpfilter/qa/cppunit/test_hwpfilter.cxx
@@ -24,7 +24,6 @@ namespace
         , public test::BootstrapFixture
     {
     public:
-        virtual void setUp() override;
 
         virtual bool load(const OUString &,
             const OUString &rURL, const OUString &,
@@ -35,26 +34,19 @@ namespace
         CPPUNIT_TEST_SUITE(HwpFilterTest);
         CPPUNIT_TEST(test);
         CPPUNIT_TEST_SUITE_END();
-    private:
-        uno::Reference<document::XFilter> m_xFilter;
     };
 
-    void HwpFilterTest::setUp()
-    {
-        test::BootstrapFixture::setUp();
-
-        m_xFilter.set(m_xSFactory->createInstance("com.sun.comp.hwpimport.HwpImportFilter"),
-                      uno::UNO_QUERY_THROW);
-    }
-
     bool HwpFilterTest::load(const OUString &,
         const OUString &rURL, const OUString &,
         SfxFilterFlags, SotClipboardFormatId, unsigned int)
     {
+        uno::Reference<document::XFilter> xFilter(m_xSFactory->createInstance("com.sun.comp.hwpimport.HwpImportFilter"),
+                                                  uno::UNO_QUERY_THROW);
+
         uno::Sequence< beans::PropertyValue > aDescriptor(1);
         aDescriptor[0].Name = "URL";
         aDescriptor[0].Value <<= rURL;
-        return m_xFilter->filter(aDescriptor);
+        return xFilter->filter(aDescriptor);
     }
 
     void HwpFilterTest::test()
commit 4aa87a5ebf1fb19b0dc24441305a833a2bdf3d8b
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Feb 24 20:58:36 2017 +0100

    update to language-subtag-registry-2017-01-20
    
    (cherry picked from commit 49e6d5e49673011149c94788a86cf899a54a8085)
    
    Change-Id: Ia62815e19b3414b6ba78c70ccb2520a0836b22c4
    Reviewed-on: https://gerrit.libreoffice.org/34632
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit abd00b9229e01e67cbe071e87089fc6e29ddbbb6)

diff --git a/download.lst b/download.lst
index 096d482..c178e84 100644
--- a/download.lst
+++ b/download.lst
@@ -81,8 +81,8 @@ export JPEG_MD5SUM := 3353992aecaee1805ef4109aadd433e7
 export JPEG_TARBALL := jpegsrc.v9a.tar.gz
 export JPEG_TURBO_MD5SUM := 86b0d5f7507c2e6c21c00219162c3c44
 export JPEG_TURBO_TARBALL := libjpeg-turbo-1.4.2.tar.gz
-export LANGTAGREG_MD5SUM := 8a037dc60b16bf8c5fe871b33390a4a2
-export LANGTAGREG_TARBALL := language-subtag-registry-2016-07-19.tar.bz2
+export LANGTAGREG_MD5SUM := 36b8266c1ec4a5049c3e0637a671fbd9
+export LANGTAGREG_TARBALL := language-subtag-registry-2017-01-20.tar.bz2
 export LANGUAGETOOL_TARBALL := b63e6340a02ff1cacfeadb2c42286161-JLanguageTool-1.7.0.tar.bz2
 export LCMS2_MD5SUM := f4c08d38ceade4a664ebff7228910a33
 export LCMS2_TARBALL := lcms2-2.6.tar.gz
commit cb67f24497d104c9986290d7a980f4025dc98532
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri Feb 24 23:10:57 2017 +0100

    xPoolHelper is empty in a clipboard doc
    
    Found by the crashreporter:
    http://crashreport.libreoffice.org/stats/signature/ScDocument::IsClipboardSource()
    
    Change-Id: I3fb030921b653396deb46a9e98d30d5df9c9ce15
    (cherry picked from commit c63ff2a769f4601f67ffd13cb36df63c70fdd601)
    Reviewed-on: https://gerrit.libreoffice.org/34641
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit 96b7d1d5d6e97078508f9366b340c65ab0a0cc75)

diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 27456da..80fb075 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2516,7 +2516,7 @@ void ScDocument::SetClipParam(const ScClipParam& rParam)
 bool ScDocument::IsClipboardSource() const
 {
     ScDocument* pClipDoc = ScModule::GetClipDoc();
-    return pClipDoc && pClipDoc->xPoolHelper.is() &&
+    return xPoolHelper.is() && pClipDoc && pClipDoc->xPoolHelper.is() &&
             xPoolHelper->GetDocPool() == pClipDoc->xPoolHelper->GetDocPool();
 }
 
commit 5d371f581b09c9c59779243c92d55347a0787aa6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 23 12:17:33 2017 +0000

    ofz: don't loop endlessly on failed skip
    
    (cherry picked from commit a438651d2b94f14a2a0e54024f69280917df37b5)
    
    Change-Id: Ibc105d8156e1b1ddf22948fb02165f8d03b4cfd5
    Reviewed-on: https://gerrit.libreoffice.org/34576
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit fddffda26287dec1f42a04bd40b8b2782982a7e0)

diff --git a/hwpfilter/source/hiodev.cxx b/hwpfilter/source/hiodev.cxx
index 98001e9..48d105f 100644
--- a/hwpfilter/source/hiodev.cxx
+++ b/hwpfilter/source/hiodev.cxx
@@ -242,8 +242,12 @@ int HStreamIODev::skipBlock(int size)
           else{
                 int remain = size;
                 while(remain){
-                     if( remain > BUFSIZE )
-                          remain -= GZREAD(rBuf, BUFSIZE);
+                     if( remain > BUFSIZE ) {
+                          int read = GZREAD(rBuf, BUFSIZE);
+                          remain -= read;
+                          if (read != BUFSIZE)
+                              break;
+                     }
                      else{
                           remain -= GZREAD(rBuf, remain);
                           break;
commit 4d3b4630dd039d942fcef7ab7a3a6d664381f525
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Feb 20 15:40:31 2017 +0000

    Resolves: tdf#105854 retain popover if it has the same pos, size and settings
    
    Change-Id: I102874867020a3c471567cbdc97162c564351635
    Reviewed-on: https://gerrit.libreoffice.org/34485
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 0acb7b80667b83ad05782dafa23721d0030c3b16)

diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 5afc3d3..76643e1 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -20,6 +20,7 @@
 #define INCLUDED_SC_SOURCE_UI_INC_TABVIEW_HXX
 
 #include <vcl/scrbar.hxx>
+#include <vcl/help.hxx>
 
 #include <sfx2/ipclient.hxx>
 
@@ -169,6 +170,10 @@ private:
     ScExtraEditViewManager aExtraEditViewManager;
 
     sal_uLong               nTipVisible;
+    Rectangle               aTipRectangle;
+    QuickHelpFlags          nTipAlign;
+    OUString                sTipString;
+    VclPtr<vcl::Window>     sTopParent;
 
     long                nPrevDragPos;
 
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 080d12b..6e32e84 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -213,6 +213,7 @@ ScTabView::ScTabView( vcl::Window* pParent, ScDocShell& rDocSh, ScTabViewShell*
     pTimerWindow( nullptr ),
     aExtraEditViewManager( pViewShell, pGridWin ),
     nTipVisible( 0 ),
+    nTipAlign( QuickHelpFlags::NONE ),
     nPrevDragPos( 0 ),
     meBlockMode(None),
     nBlockStartX( 0 ),
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index fdc633d..fe2e82d 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -41,6 +41,10 @@ void ScTabView::HideTip()
         vcl::Window* pWin = pGridWin[eWhich];
         Help::HidePopover(pWin, nTipVisible);
         nTipVisible = 0;
+        aTipRectangle = Rectangle();
+        nTipAlign = QuickHelpFlags::NONE;
+        sTipString.clear();
+        sTopParent.clear();
     }
 }
 
@@ -91,8 +95,15 @@ void ScTabView::ShowRefTip()
 
                 //! Test, ob geaendert ??
 
-                HideTip();
-                nTipVisible = Help::ShowPopover(pWin, aRect, aHelp, nFlags);
+                if (!nTipVisible || nFlags != nTipAlign || aRect != aTipRectangle || sTipString != aHelp || sTopParent != pWin)
+                {
+                    HideTip();
+                    nTipVisible = Help::ShowPopover(pWin, aRect, aHelp, nFlags);
+                    aTipRectangle = aRect;
+                    nTipAlign = nFlags;
+                    sTipString = aHelp;
+                    sTopParent = pWin;
+                }
                 bDone = true;
             }
         }
@@ -278,8 +289,15 @@ void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ )
                 aPos = pWin->OutputToScreenPixel( aPos );
                 Rectangle aRect( aPos, aPos );
                 QuickHelpFlags nAlign = QuickHelpFlags::Left|QuickHelpFlags::Top;
-                HideTip();
-                nTipVisible = Help::ShowPopover(pWin, aRect, aHelpStr, nAlign);
+                if (!nTipVisible || nAlign != nTipAlign || aRect != aTipRectangle || sTipString != aHelpStr || sTopParent != pWin)
+                {
+                    HideTip();
+                    nTipVisible = Help::ShowPopover(pWin, aRect, aHelpStr, nAlign);
+                    aTipRectangle = aRect;
+                    nTipAlign = nAlign;
+                    sTipString = aHelpStr;
+                    sTopParent = pWin;
+                }
             }
         }
     }
commit 20448ead5b297d5bb527d64d4c9fd34ebfb67c40
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Feb 24 11:24:46 2017 +0200

    better fix for tdf#103830
    
    the first fix in commit 3a404ea870f1eed86f9765447ce0a364d39ae8f8
    did not take into account that this a multimap, not a map.
    
    Thanks to Aron Budea for spotting that.
    
    Change-Id: I86d2d2a9d6cb08fd3cee3965a5b787d5691f0352
    Reviewed-on: https://gerrit.libreoffice.org/34604
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit e146741ec96292ef092c6eebfd7fe18fa5ca3cc0)
    Reviewed-on: https://gerrit.libreoffice.org/34606
    (cherry picked from commit 46885644fe87a6e9f86a79b7fd1eafbe3ea0e5a6)

diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index cf64c97..e90880f 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -660,13 +660,15 @@ throw (css::uno::RuntimeException, std::exception) {
     if (evt.PropertyName == PROPERTY_NAME)
     {
         ::osl::MutexGuard aGuard( m_rMutex );
-        OInterfaceMap::iterator i = m_aMap.find(::comphelper::getString(evt.OldValue));
-        if (i != m_aMap.end() && i->second == evt.Source)
-        {
-            css::uno::Reference<css::uno::XInterface>  xCorrectType(i->second);
-            m_aMap.erase(i);
-            m_aMap.insert(::std::pair<const OUString, css::uno::Reference<css::uno::XInterface> >(::comphelper::getString(evt.NewValue),xCorrectType));
-        }
+        auto range = m_aMap.equal_range(::comphelper::getString(evt.OldValue));
+        for (auto it = range.first; it != range.second; ++it)
+            if (it->second == evt.Source)
+            {
+                css::uno::Reference<css::uno::XInterface>  xCorrectType(it->second);
+                m_aMap.erase(it);
+                m_aMap.insert(::std::pair<const OUString, css::uno::Reference<css::uno::XInterface> >(::comphelper::getString(evt.NewValue),xCorrectType));
+                break;
+            }
     }
 }
 


More information about the Libreoffice-commits mailing list