sw/source/core/layout/dbg_lay.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit e63b8ae7ac645838c6ac40fa9ad8cc9a442aaa5c
Author:     Jan-Marek Glogowski <jan-marek.glogow...@extern.cib.de>
AuthorDate: Thu Mar 5 13:44:46 2020 +0100
Commit:     Jan-Marek Glogowski <glo...@fbihome.de>
CommitDate: Fri Mar 6 23:32:02 2020 +0100

    Don't assert or busy lock the layout logger
    
    The default padding of five results in a busy loop for layout
    values >= 100000. And since we read the record value from a file,
    don't assert on larger values, by simply masking it.
    
    Change-Id: I95329d03405ed5fbc749dda3f7d090a4739b0018
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90124
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de>

diff --git a/sw/source/core/layout/dbg_lay.cxx 
b/sw/source/core/layout/dbg_lay.cxx
index 2f0f5cacf229..2da3f1368809 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -368,9 +368,9 @@ void SwImplProtocol::CheckLine( OString& rLine )
                 case 3: {
                             PROT nOld = SwProtocol::Record();
                             if( bNo )
-                                nOld &= ~PROT(nVal); // remove function
+                                nOld &= ~PROT(nVal & 
o3tl::typed_flags<PROT>::mask); // remove function
                             else
-                                nOld |= PROT(nVal);  // remove function
+                                nOld |= PROT(nVal & 
o3tl::typed_flags<PROT>::mask);  // remove function
                             SwProtocol::SetRecord( nOld );
                         }
                         break;
@@ -454,6 +454,8 @@ static void lcl_Flags(OStringBuffer& rOut, const SwFrame* 
pFrame)
 
 static void lcl_Padded(OStringBuffer& rOut, const OString& s, size_t length)
 {
+    if (sal_Int32(length) < s.getLength())
+        length = s.getLength();
     rOut.append(s);
     for (size_t i = 0; i < length - s.getLength(); i++)
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to