summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2020-08-28 12:00:11 +0300
committerMiklos Vajna <vmiklos@collabora.com>2020-11-19 12:31:20 +0100
commit3e4ce34fd971a1ace938a1d3bd24cbd2cdc0842a (patch)
tree40a01cee195e14266c470cbae1694c39b39ec8e6
parent051a2c1d5622629ce4c180015282ba0370d6e03b (diff)
Fix ooo38104-1.sxw crash after c123bfff501229f398a1b679fc7434b82d53685c
Unlike the c123bf commit, this commit does not cause the crash that was caught by the crash-testing system. (The crash could be reproduced by: wget -O ooo38104-1.sxw https://bz.apache.org/ooo/attachment.cgi?id=19889 ./instdir/program/soffice.bin --headless --convert-to docx ./ooo38104-1.sxw ) In this commit, I reinstate the "early return" in SwView::ReadUserDataSequence() that I dropped in the c123bf commit, but instead move the SelectShell() call earlier, so that it will be executed before the potential early return. The problem that we try to fix here is the one that the fresh CppunitTest_sw_updateall_object_replacements checks, so to reproduce that problem, revert both this commit and c123bf, and then run that unit test. (cherry picked from commit 6e0bb3fc4e89ddb85ddf40889b11a0c0bd4ab607) Conflicts: sw/source/uibase/uiview/view.cxx Change-Id: I6c728b75a2f172b75fbf2ad00c019c32aecc19f8
-rw-r--r--sw/source/uibase/uiview/view.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 89cb4d9335fa..c6cbd9319be8 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1341,10 +1341,14 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
// delegate further
GetViewImpl()->GetUNOObject_Impl()->getViewSettings()->setPropertyValue("ShowOnlineLayout", uno::Any(bBrowseMode));
}
+
+ SelectShell();
+
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 );
@@ -1401,7 +1405,6 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
// reset flag value
m_pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
}
- SelectShell();
// Set ViewLayoutSettings
const bool bSetViewLayoutSettings = bGotViewLayoutColumns && bGotViewLayoutBookMode &&