[Libreoffice-commits] core.git: Branch 'distro/vector/vector-5.4' - sw/source

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 25 08:06:45 UTC 2020


 sw/source/uibase/uiview/view.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit f061447e8ddac378bcb009a7f5f43c2674ad80ac
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Aug 21 16:45:00 2020 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Aug 24 10:11:43 2020 +0300

    Bin overly eager bypass of code section that stops replacement image creation
    
    The skipping causes a customer's Java code that handles some .odt
    document to unexpectedly not create object replacement images in the
    document.
    
    The problem is that in the bad case, the SwTextShell is created later
    than .uno:UpdateAll is dispatched, so the dispatch does nothing.
    SwBaseShell::Execute() for FN_UPDATE_ALL is not called. And this is
    required, becase that calls setUserAllowsLinkUpdate(true), so that on
    save, when EmbeddedObjectContainer::StoreAsChildren() in comphelper/
    hits the 'if ( !xStream.is() && getUserAllowsLinkUpdate() )'
    condition, then we create a replacement image.
    
    This is a Basic script that demonstrates the same issue:
    
    desktop = CreateUnoService("com.sun.star.frame.Desktop")
    Dim props(0) as new com.sun.star.beans.PropertyValue
    props(0).Name = "Hidden"
    props(0).Value = true
    component = desktop.loadComponentFromURL("file:///.../test.odt", "_default", 0, props)
    dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
    frame = component.CurrentController.Frame
    dispatcher.executeDispatch(frame, ".uno:UpdateAll", "", 0, Array())
    component.storeSelf(Array())
    component.dispose()
    
    Change-Id: I4a5f78a2118a387f062c2d5213a0012a7df2dd9f

diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index a9edfaf86e00..89cb4d9335fa 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1344,8 +1344,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
         if (bGotVisibleBottom)
         {
             Point aCursorPos( nX, nY );
-            const long nAdd = m_pWrtShell->GetViewOptions()->getBrowseMode() ? DOCUMENTBORDER : DOCUMENTBORDER*2;
-            if (nBottom <= (m_pWrtShell->GetDocSize().Height()+nAdd) )
+
             {
                 m_pWrtShell->EnableSmooth( false );
                 const tools::Rectangle aVis( nLeft, nTop, nRight, nBottom );


More information about the Libreoffice-commits mailing list