[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - 2 commits - vcl/source writerfilter/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Nov 27 20:47:50 UTC 2019


 vcl/source/control/wizardmachine.cxx              |   18 ++++++++++++++----
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    6 +++++-
 2 files changed, 19 insertions(+), 5 deletions(-)

New commits:
commit 1134b97b3daed1b79c9ee721cdfb415359c4461c
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Nov 27 11:25:02 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Nov 27 21:45:54 2019 +0100

    tdf#129042 factor the wizard buttons into the desired min width
    
    Change-Id: Ib89e8813c6f8e5203708952215156d3d5281ad17
    Reviewed-on: https://gerrit.libreoffice.org/83914
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx
index c61b46ec24e9..2fced940867e 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -104,19 +104,26 @@ namespace vcl
 
     void RoadmapWizard::ImplCalcSize( Size& rSize )
     {
-        // calculate ButtonBar height
+        // calculate ButtonBar height and width
         long                nMaxHeight = 0;
+        long                nBarWidth = WIZARDDIALOG_BUTTON_DLGOFFSET_X * 2 + LogicalCoordinateToPixel(6);
         ImplWizButtonData*  pBtnData = mpFirstBtn;
-        while ( pBtnData )
+        while (pBtnData)
         {
-            long nBtnHeight = pBtnData->mpButton->GetSizePixel().Height();
+            auto nBtnHeight = pBtnData->mpButton->GetSizePixel().Height();
+            auto nBtnWidth = pBtnData->mpButton->GetSizePixel().Width();
+            if (pBtnData->mpButton->IsVisible())
+            {
+                nBarWidth += nBtnWidth;
+                nBarWidth += pBtnData->mnOffset;
+            }
             if ( nBtnHeight > nMaxHeight )
                 nMaxHeight = nBtnHeight;
             pBtnData = pBtnData->mpNext;
         }
         if ( nMaxHeight )
             nMaxHeight += WIZARDDIALOG_BUTTON_OFFSET_Y*2;
-        rSize.AdjustHeight(nMaxHeight );
+        rSize.AdjustHeight(nMaxHeight);
 
         // add in the view window size
         if ( mpViewWindow && mpViewWindow->IsVisible() )
@@ -131,6 +138,9 @@ namespace vcl
             else if ( meViewAlign == WindowAlign::Right )
                 rSize.AdjustWidth(aViewSize.Width() );
         }
+
+        if (nBarWidth > rSize.Width())
+            rSize.setWidth(nBarWidth);
     }
 
     void RoadmapWizard::queue_resize(StateChangedType /*eReason*/)
commit 039a66e911ce6e2b339774b438b7bd8c46e5a592
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Nov 27 15:42:10 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Nov 27 21:45:00 2019 +0100

    crashtesting: failure on import of tdf113230-1.docx
    
    which is a favorite input document for crashes and assert apparently,
    this is the third time it has triggered a different problem
    
    this one is new since...
    
    commit 9fdf8c0a5cc036ea9bd1e11dd8f2c1a6e601fae2
    Author: Mike Kaganski <mike.kaganski at collabora.com>
    Date:   Sat Nov 16 16:34:25 2019 +0300
    
        Also consider saved exceptions when terminating parse
    
    Change-Id: I394b650613e8a835fe8a9f216a48864bdbc5065b
    Reviewed-on: https://gerrit.libreoffice.org/83925
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index a77a241fb7dc..fe66d4ddadb9 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -6315,7 +6315,11 @@ void DomainMapper_Impl::SetCurrentRedlineRevertProperties( const uno::Sequence<b
 // the context is destroyed.
 void DomainMapper_Impl::RemoveTopRedline( )
 {
-    assert( m_aRedlines.top().size( ) > 0 );
+    if (m_aRedlines.top().empty())
+    {
+        SAL_WARN("writerfilter.dmapper", "RemoveTopRedline called with empty stack");
+        throw uno::Exception("RemoveTopRedline failed", nullptr);
+    }
     m_aRedlines.top().pop_back( );
     m_currentRedline.clear();
 }


More information about the Libreoffice-commits mailing list