[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - 2 commits - sw/source

Jan Holesovsky kendy at collabora.com
Tue May 30 13:09:21 UTC 2017


 sw/source/core/crsr/crsrsh.cxx  |    1 +
 sw/source/uibase/app/apphdl.cxx |    3 +++
 2 files changed, 4 insertions(+)

New commits:
commit 85460d3d92c153f76210b82b3e5ac78f005858c6
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Tue May 30 10:19:16 2017 +0200

    tdf#107729: Disable toolbar items that are not available yet.
    
    Otherwise trying to use them crashes LibreOffice.
    
    Change-Id: I268e5b783905ec7aaaf50cbc629fd44e6341bf8d
    Reviewed-on: https://gerrit.libreoffice.org/38186
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 79e4fb4d8ceb..23b9b5bdec25 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -224,6 +224,9 @@ void SwModule::StateOther(SfxItemSet &rSet)
                 // #i51949# hide e-Mail option if e-Mail is not supported
                 // #i63267# printing might be disabled
                 if (!xConfigItem ||
+                    !xConfigItem->GetResultSet().is() ||
+                    xConfigItem->GetCurrentDBData().sDataSource.isEmpty() ||
+                    xConfigItem->GetCurrentDBData().sCommand.isEmpty() ||
                     (nWhich == FN_MAILMERGE_PRINT_DOCUMENTS && Application::GetSettings().GetMiscSettings().GetDisablePrinting()) ||
                     (nWhich == FN_MAILMERGE_EMAIL_DOCUMENTS && !xConfigItem->IsMailAvailable()))
                 {
commit c3a09bc2025c8cb3c52d45f6a65152d1aebf0536
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon May 29 22:53:16 2017 +0200

    tdf#96256 sw: fix scrolling to cursor after paste
    
    The mnStartAction hack in commit 587006cac508616f486aea45e265a170bcccdc87
    has a surprising effect on SwViewShell::SizeChgNotify(), as it causes
    PageNumNotify() to be called instead of SizeNotify() if pages are
    inserted while layouting in GetCharRect().
    
    Now SwCursorShell::UpdateCursor(SCROLLWIN) would no longer scroll to
    the cursor position, which is a problem for clipboard paste.
    
    Try to fix this by calling UISizeNotify() manually, which seems to work.
    
    Change-Id: Id08bfe2964564c02fe9d1ef0176939ab3eeb187a
    (cherry picked from commit 6f1530bfdefc8e4deabf37ab337e09a89d3841b3)
    Reviewed-on: https://gerrit.libreoffice.org/38204
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index d88d76272a56..bfc6cd1cc8ed 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1770,6 +1770,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
             pFrame->GetCursorOfst( pShellCursor->GetPoint(), rPt, &aTmpState );
         }
         --mnStartAction;
+        UISizeNotify(); // tdf#96256 update view size
 
         if( !pShellCursor->HasMark() )
             m_aCursorHeight = aTmpState.m_aRealHeight;


More information about the Libreoffice-commits mailing list