basctl/source/basicide/baside3.cxx             |    2 
 configure.ac                                   |    2 
 connectivity/source/drivers/dbase/DTable.cxx   |    2 
 cui/uiconfig/ui/optviewpage.ui                 |    4 
 oox/inc/drawingml/table/tablecell.hxx          |    2 
 oox/source/drawingml/table/tablecell.cxx       |  106 ++++++++++++++++++++++---
 oox/source/drawingml/table/tableproperties.cxx |   16 +++
 oox/source/export/shapes.cxx                   |    6 +
 sc/inc/scmod.hxx                               |    2 
 sc/qa/unit/tiledrendering/data/validity.xlsx   |binary
 sc/qa/unit/tiledrendering/tiledrendering.cxx   |   85 ++++++++++++++++++--
 sc/source/core/data/column2.cxx                |    2 
 sc/source/ui/app/inputhdl.cxx                  |   12 ++
 sc/source/ui/app/scmod.cxx                     |    4 
 sc/source/ui/docshell/impex.cxx                |    2 
 sc/source/ui/inc/inputhdl.hxx                  |    2 
 sc/source/ui/view/tabvwsha.cxx                 |   11 ++
 sd/qa/unit/data/pptx/bnc480256-2.pptx          |binary
 sd/qa/unit/data/pptx/tdf135843_insideH.pptx    |binary
 sd/qa/unit/export-tests.cxx                    |    3 
 sd/qa/unit/layout-tests.cxx                    |   38 ++++++++
 sw/source/core/text/porfld.cxx                 |   14 ++-
 translations                                   |    2 
 vcl/inc/qt5/QtFrame.hxx                        |    3 
 vcl/inc/qt5/QtMenu.hxx                         |    1 
 vcl/inc/qt5/QtWidget.hxx                       |    2 
 vcl/qt5/QtData.cxx                             |    2 
 vcl/qt5/QtFrame.cxx                            |    8 +
 vcl/qt5/QtMenu.cxx                             |    8 +
 vcl/qt5/QtWidget.cxx                           |   19 ++++
 vcl/source/outdev/text.cxx                     |    2 
 vcl/win/window/salframe.cxx                    |    5 -
 32 files changed, 316 insertions(+), 51 deletions(-)

New commits:
commit c60b1a4f728fbde4518d01bae34b57e5d1da662a
Merge: e2c329d8d077 7fc871299080
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Apr 14 07:35:30 2022 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Apr 14 07:35:30 2022 +0200

    Merge branch 'libreoffice-7-3'
    
    into distro/lhm/libreoffice-7-3+backports
    
    Change-Id: I662bbd61af08f4d2d5a64374325f35648e816931

commit 7fc871299080427587307932c505d3ae93d6a357
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Tue Apr 12 00:29:56 2022 +0200
Commit:     Jan-Marek Glogowski <glo...@fbihome.de>
CommitDate: Wed Apr 13 22:31:30 2022 +0200

    tdf#148115 Qt handle tooltips via event loop
    
    Instead of calling QToolTip::showText directly from LO, this
    defers showing the tooltip to the QEvent processing, which takes
    the tooltip timeouts into account. So tooltips are shown with
    a slight delay, therefore they happen less fast on mouse move,
    reducing / avoiding artifacts of fast changing windows.
    
    This unfortunately comes with yet an other hack in the area of
    our fake popup windows...
    
    New handling is based on the code of the Qt Tool Tips example.
    
    Change-Id: I42634ad36dd12171c30f52f07a02a88d3c48a718
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132841
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins
    (cherry picked from commit af6dd54d53eee0d0de1164bff0a77c6b433b3935)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132864
    Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de>

diff --git a/vcl/inc/qt5/QtFrame.hxx b/vcl/inc/qt5/QtFrame.hxx
index 5ffaacf3ad94..23a4fd9887f1 100644
--- a/vcl/inc/qt5/QtFrame.hxx
+++ b/vcl/inc/qt5/QtFrame.hxx
@@ -111,6 +111,9 @@ class VCLPLUG_QT_PUBLIC QtFrame : public QObject, public 
SalFrame
 
     LanguageType m_nInputLanguage;
 
+    OUString m_aTooltipText;
+    QRect m_aTooltipArea;
+
     void SetDefaultPos();
     Size CalcDefaultSize();
     void SetDefaultSize();
diff --git a/vcl/inc/qt5/QtWidget.hxx b/vcl/inc/qt5/QtWidget.hxx
index 575cef11014f..878c8b1229ce 100644
--- a/vcl/inc/qt5/QtWidget.hxx
+++ b/vcl/inc/qt5/QtWidget.hxx
@@ -87,7 +87,7 @@ public:
     void endExtTextInput();
     void fakeResize();
 
-    static bool handleEvent(QtFrame&, const QWidget&, QEvent*);
+    static bool handleEvent(QtFrame&, QWidget&, QEvent*);
     // key events might be propagated further down => call base on false
     static inline bool handleKeyReleaseEvent(QtFrame&, const QWidget&, 
QKeyEvent*);
     // mouse events are always accepted
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index c78417b3070a..f6f4b6c2611d 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -175,7 +175,12 @@ QtFrame::QtFrame(QtFrame* pParent, SalFrameStyleFlags 
nStyle, bool bUseCairo)
         m_pTopLevel->setFocusProxy(m_pQWidget);
     }
     else
+    {
         m_pQWidget = new QtWidget(*this, aWinFlags);
+        // from Qt's POV the popup window doesn't have the input focus, so we 
must force tooltips...
+        if (isPopup())
+            m_pQWidget->setAttribute(Qt::WA_AlwaysShowToolTips);
+    }
 
     QWindow* pChildWindow = windowHandle();
     connect(pChildWindow, &QWindow::screenChanged, this, 
&QtFrame::screenChanged);
@@ -855,7 +860,8 @@ bool QtFrame::ShowTooltip(const OUString& rText, const 
tools::Rectangle& rHelpAr
     QRect aHelpArea(toQRect(rHelpArea));
     if (QGuiApplication::isRightToLeft())
         aHelpArea.moveLeft(maGeometry.nWidth - aHelpArea.width() - 
aHelpArea.left() - 1);
-    QToolTip::showText(QCursor::pos(), toQString(rText), m_pQWidget, 
aHelpArea);
+    m_aTooltipText = rText;
+    m_aTooltipArea = aHelpArea;
     return true;
 }
 
diff --git a/vcl/qt5/QtWidget.cxx b/vcl/qt5/QtWidget.cxx
index 1fe2ce9a7159..017249b05434 100644
--- a/vcl/qt5/QtWidget.cxx
+++ b/vcl/qt5/QtWidget.cxx
@@ -42,6 +42,7 @@
 #include <QtGui/QTextCharFormat>
 #include <QtGui/QWheelEvent>
 #include <QtWidgets/QMainWindow>
+#include <QtWidgets/QToolTip>
 #include <QtWidgets/QWidget>
 
 #include <cairo.h>
@@ -562,7 +563,7 @@ bool QtWidget::handleKeyEvent(QtFrame& rFrame, const 
QWidget& rWidget, QKeyEvent
     return bStopProcessingKey;
 }
 
-bool QtWidget::handleEvent(QtFrame& rFrame, const QWidget& rWidget, QEvent* 
pEvent)
+bool QtWidget::handleEvent(QtFrame& rFrame, QWidget& rWidget, QEvent* pEvent)
 {
     if (pEvent->type() == QEvent::ShortcutOverride)
     {
@@ -589,6 +590,22 @@ bool QtWidget::handleEvent(QtFrame& rFrame, const QWidget& 
rWidget, QEvent* pEve
                            ButtonKeyState::Pressed))
             return true;
     }
+    else if (pEvent->type() == QEvent::ToolTip)
+    {
+        // Qt's POV on focus is wrong for our fake popup windows, so check 
LO's state.
+        // Otherwise Qt will continue handling ToolTip events from the 
"parent" window.
+        const vcl::Window* pFocusWin = Application::GetFocusWindow();
+        if (!rFrame.m_aTooltipText.isEmpty() && pFocusWin
+            && pFocusWin->GetFrameWindow() == rFrame.GetWindow())
+            QToolTip::showText(QCursor::pos(), 
toQString(rFrame.m_aTooltipText), &rWidget,
+                               rFrame.m_aTooltipArea);
+        else
+        {
+            QToolTip::hideText();
+            pEvent->ignore();
+        }
+        return true;
+    }
     return false;
 }
 
commit c3189d9527ee6e5923bfc897428b1b1ade803a47
Author:     Mark Hung <mark...@gmail.com>
AuthorDate: Mon Apr 4 20:12:36 2022 +0800
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Wed Apr 13 16:56:45 2022 +0200

    tdf#143447 ignore IME candidate window state.
    
    Some traditional Chinese IMEs ( Input Method Editors ) under
    Windows10 send WM_IME_NOTIFY with IMN_OPENCANDIDATE but not
    IMN_CLOSECANDIDATE. The behavior is different if users configure
    the IME and enable "legacy" option.
    
    That caused the cursor been hidden, misled by mbCandidateMode.
    
    The patch ignores the candidate window mode in case the length
    of the composition string is 0, assume in that case candidate
    window is useless, and resets the candidate window mode when
    composition ended to maintain the state as much as we can.
    
    Change-Id: I91a1c23ee1a031313243e032653f50f39b0f2a3c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132512
    Tested-by: Jenkins
    Reviewed-by: Mark Hung <mark...@gmail.com>
    (cherry picked from commit 2b2d1c08c94fdc3982971c2b19ea241f05e578c9)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132858
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 6593b2fbebb6..4556c850edec 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -5079,7 +5079,7 @@ static bool ImplHandleIMECompositionInput( WinSalFrame* 
pFrame,
         if ( (nTextLen > 0) || !(lParam & GCS_RESULTSTR) )
         {
             // End the mode, if the last character is deleted
-            if ( !nTextLen && !pFrame->mbCandidateMode )
+            if ( !nTextLen )
             {
                 pFrame->CallCallback( SalEvent::ExtTextInput, &aEvt );
                 pFrame->CallCallback( SalEvent::EndExtTextInput, nullptr );
@@ -5164,7 +5164,10 @@ static bool ImplHandleIMEEndComposition( HWND hWnd )
     if ( pFrame && pFrame->mbHandleIME )
     {
         if ( pFrame->mbAtCursorIME )
+        {
+            pFrame->mbCandidateMode = false;
             bDef = false;
+        }
     }
 
     ImplSalYieldMutexRelease();
commit 3b91c4cdbca6ae02fa8c195ac8a6715ac8dcdf52
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Apr 12 12:26:54 2022 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Wed Apr 13 11:25:00 2022 +0200

    ofz#46352 assert on bad string offset
    
    Change-Id: I60123fd0460b8038f08582a0bcbf2307af321df1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132861
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 3e257bbcfbc7..5bd8052e0bec 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -2340,7 +2340,7 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm )
                     aFormats.push_back( nKey );
                 }
             }
-            else if( cTag == 'I' && *p == 'D' )
+            else if (cTag == 'I' && *p == 'D' && aLine.getLength() > 4)
             {
                 aLine = aLine.copy(4);
                 if (aLine == "CALCOOO32")
commit 6bf805ffb62a13f2f44a26f47f732f05c954ef49
Author:     Gülşah Köse <gulsah.k...@collabora.com>
AuthorDate: Mon Mar 14 14:52:59 2022 +0300
Commit:     Gülşah Köse <gulsah.k...@collabora.com>
CommitDate: Wed Apr 13 08:26:30 2022 +0200

    tdf#147766 Export empty lines as line with noFill
    
    We have a case that 0 width line but has auto color. If that case
    exported there is no line over there, LO handles normally but MSO draws
    back borders as default. To prevent this we have to export them as line
    with noFill.
    
    testTableBorderLineStyle change reverts a workaround for
    3faf005a367cbd28077403bf93810bbaf4805851
    
    testBnc480256 Cell(1,0) still invisible. We are just checking
    this with another way.
    
    Change-Id: If5f6d2dbdba5c295d58307fcfe3b37629ede8a8e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131532
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>
    Reviewed-by: Gülşah Köse <gulsah.k...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132886

diff --git a/oox/source/drawingml/table/tablecell.cxx 
b/oox/source/drawingml/table/tablecell.cxx
index 15ab06303e3b..fdf7950dcf2c 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -73,20 +73,12 @@ static void applyLineAttributes( const 
::oox::core::XmlFilterBase& rFilterBase,
         aBorderLine.LineWidth = static_cast< sal_Int16 >( GetCoordinate( 
rLineProperties.moLineWidth.get( 0 ) ) / 2 );
         aBorderLine.LineDistance = 0;
     }
-    else if ( rLineProperties.moLineWidth.get(0)!=0 )
-    {
-        aBorderLine.Color = sal_Int32( COL_AUTO );
-        aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( 
rLineProperties.moLineWidth.get( 0 ) ) / 4 );
-        aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( GetCoordinate( 
rLineProperties.moLineWidth.get( 0 ) ) / 4 );
-        aBorderLine.LineWidth = static_cast< sal_Int16 >( GetCoordinate( 
rLineProperties.moLineWidth.get( 0 ) ) / 2 );
-        aBorderLine.LineDistance = 0;
-    }
     else
     {
         aBorderLine.Color = sal_Int32( COL_AUTO );
         aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( 
rLineProperties.moLineWidth.get( 0 ) ) / 4 );
         aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( GetCoordinate( 
rLineProperties.moLineWidth.get( 0 ) ) / 4 );
-        aBorderLine.LineWidth = 12700;
+        aBorderLine.LineWidth = static_cast< sal_Int16 >( GetCoordinate( 
rLineProperties.moLineWidth.get( 0 ) ) / 2 );
         aBorderLine.LineDistance = 0;
     }
 
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 138106938ee2..97d09ca1be2e 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1975,6 +1975,12 @@ void ShapeExport::WriteBorderLine(const sal_Int32 
XML_line, const BorderLine2& r
             DrawingML::WriteSolidFill( ::Color(ColorTransparency, 
rBorderLine.Color) );
         mpFS->endElementNS( XML_a, XML_line );
     }
+    else if( nBorderWidth == 0)
+    {
+        mpFS->startElementNS(XML_a, XML_line);
+        mpFS->singleElementNS(XML_a, XML_noFill);
+        mpFS->endElementNS( XML_a, XML_line );
+    }
 }
 
 void ShapeExport::WriteTableCellBorders(const Reference< XPropertySet>& 
xCellPropSet)
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index f1d0281aab0d..729d9f154b12 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -602,9 +602,10 @@ void SdExportTest::testBnc480256()
     xCell->getPropertyValue("FillColor") >>= nColor;
     CPPUNIT_ASSERT_EQUAL(Color(0x4697e0), nColor);
 
+    // This border should be invisible.
     xCell.set(xTable->getCellByPosition(1, 0), uno::UNO_QUERY_THROW);
     xCell->getPropertyValue("BottomBorder") >>= aBorderLine;
-    CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(ColorTransparency, 
aBorderLine.Color));
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(0), sal_Int32(aBorderLine.LineWidth));
 
     xDocShRef->DoClose();
 }
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index c7b508de5dc3..e49892d3a738 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1474,7 +1474,7 @@ void SdImportTest::testTableBorderLineStyle()
         xTable.set(pTableObj->getTable(), uno::UNO_QUERY_THROW);
         xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
         xCell->getPropertyValue("TopBorder") >>= aBorderLine;
-        if (aBorderLine.Color != -1) {
+        if (aBorderLine.LineWidth > 0) {
             CPPUNIT_ASSERT_EQUAL(nObjBorderLineStyles[i], 
aBorderLine.LineStyle);
         }
     }
commit d2a2d16b4836bf62db7c32faffa0c5b6d0d30a5e
Author:     Gülşah Köse <gulsah.k...@collabora.com>
AuthorDate: Mon Apr 11 18:33:30 2022 +0300
Commit:     Gülşah Köse <gulsah.k...@collabora.com>
CommitDate: Wed Apr 13 08:25:46 2022 +0200

    Revert "Revert "tdf#135843 Implement inside horizontal vertical borders.""
    
    This reverts commit ea5a3e0247b1230c1fe7e2cb0afc597e56d0b4c2.
    
    Change-Id: Ibd333c1e7b1530a2b6d9b8c5efbf4d9c822fa058
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132885
    Tested-by: Jenkins
    Reviewed-by: Gülşah Köse <gulsah.k...@collabora.com>

diff --git a/oox/inc/drawingml/table/tablecell.hxx 
b/oox/inc/drawingml/table/tablecell.hxx
index d6e91da042f7..988b0d057a13 100644
--- a/oox/inc/drawingml/table/tablecell.hxx
+++ b/oox/inc/drawingml/table/tablecell.hxx
@@ -82,6 +82,8 @@ private:
     oox::drawingml::LineProperties  maLinePropertiesRight;
     oox::drawingml::LineProperties  maLinePropertiesTop;
     oox::drawingml::LineProperties  maLinePropertiesBottom;
+    oox::drawingml::LineProperties  maLinePropertiesInsideH;
+    oox::drawingml::LineProperties  maLinePropertiesInsideV;
     oox::drawingml::LineProperties  maLinePropertiesTopLeftToBottomRight;
     oox::drawingml::LineProperties  maLinePropertiesBottomLeftToTopRight;
 
diff --git a/oox/source/drawingml/table/tablecell.cxx 
b/oox/source/drawingml/table/tablecell.cxx
index e5ab3372d42e..15ab06303e3b 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -81,6 +81,14 @@ static void applyLineAttributes( const 
::oox::core::XmlFilterBase& rFilterBase,
         aBorderLine.LineWidth = static_cast< sal_Int16 >( GetCoordinate( 
rLineProperties.moLineWidth.get( 0 ) ) / 2 );
         aBorderLine.LineDistance = 0;
     }
+    else
+    {
+        aBorderLine.Color = sal_Int32( COL_AUTO );
+        aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( 
rLineProperties.moLineWidth.get( 0 ) ) / 4 );
+        aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( GetCoordinate( 
rLineProperties.moLineWidth.get( 0 ) ) / 4 );
+        aBorderLine.LineWidth = 12700;
+        aBorderLine.LineDistance = 0;
+    }
 
     if ( rLineProperties.moPresetDash.has() )
     {
@@ -150,9 +158,16 @@ static void applyTableStylePart( const 
::oox::core::XmlFilterBase& rFilterBase,
                           oox::drawingml::LineProperties& rRightBorder,
                           oox::drawingml::LineProperties& rTopBorder,
                           oox::drawingml::LineProperties& rBottomBorder,
+                          oox::drawingml::LineProperties& rInsideHBorder,
+                          oox::drawingml::LineProperties& rInsideVBorder,
                           oox::drawingml::LineProperties& 
rTopLeftToBottomRightBorder,
                           oox::drawingml::LineProperties& 
rBottomLeftToTopRightBorder,
-                          TableStylePart& rTableStylePart )
+                          TableStylePart& rTableStylePart,
+                          bool bIsWholeTable = false,
+                          sal_Int32 nCol = 0,
+                          sal_Int32 nMaxCol = 0,
+                          sal_Int32 nRow = 0,
+                          sal_Int32 nMaxRow = 0)
 {
     ::oox::drawingml::FillPropertiesPtr& rPartFillPropertiesPtr( 
rTableStylePart.getFillProperties() );
     if ( rPartFillPropertiesPtr )
@@ -169,12 +184,35 @@ static void applyTableStylePart( const 
::oox::core::XmlFilterBase& rFilterBase,
         }
     }
 
-    applyBorder( rFilterBase, rTableStylePart, XML_left, rLeftBorder );
-    applyBorder( rFilterBase, rTableStylePart, XML_right, rRightBorder );
-    applyBorder( rFilterBase, rTableStylePart, XML_top, rTopBorder );
-    applyBorder( rFilterBase, rTableStylePart, XML_bottom, rBottomBorder );
-    applyBorder( rFilterBase, rTableStylePart, XML_tl2br, 
rTopLeftToBottomRightBorder );
-    applyBorder( rFilterBase, rTableStylePart, XML_tr2bl, 
rBottomLeftToTopRightBorder );
+    // Left, right, top and bottom side of the whole table should be mean 
outer frame of the whole table.
+    // Without this check it means left top right and bottom of whole cells of 
whole table.
+    if (bIsWholeTable)
+    {
+        if (nCol == 0)
+            applyBorder( rFilterBase, rTableStylePart, XML_left, rLeftBorder );
+        if (nCol == nMaxCol)
+            applyBorder( rFilterBase, rTableStylePart, XML_right, rRightBorder 
);
+        if (nRow == 0)
+            applyBorder( rFilterBase, rTableStylePart, XML_top, rTopBorder );
+        if (nRow == nMaxRow)
+            applyBorder( rFilterBase, rTableStylePart, XML_bottom, 
rBottomBorder );
+
+        applyBorder( rFilterBase, rTableStylePart, XML_insideH, rInsideHBorder 
);
+        applyBorder( rFilterBase, rTableStylePart, XML_insideV, rInsideVBorder 
);
+        applyBorder( rFilterBase, rTableStylePart, XML_tl2br, 
rTopLeftToBottomRightBorder );
+        applyBorder( rFilterBase, rTableStylePart, XML_tr2bl, 
rBottomLeftToTopRightBorder );
+    }
+    else
+    {
+        applyBorder( rFilterBase, rTableStylePart, XML_left, rLeftBorder );
+        applyBorder( rFilterBase, rTableStylePart, XML_right, rRightBorder );
+        applyBorder( rFilterBase, rTableStylePart, XML_top, rTopBorder );
+        applyBorder( rFilterBase, rTableStylePart, XML_bottom, rBottomBorder );
+        applyBorder( rFilterBase, rTableStylePart, XML_tl2br, 
rTopLeftToBottomRightBorder );
+        applyBorder( rFilterBase, rTableStylePart, XML_tr2bl, 
rBottomLeftToTopRightBorder );
+        applyBorder( rFilterBase, rTableStylePart, XML_insideH, rInsideHBorder 
);
+        applyBorder( rFilterBase, rTableStylePart, XML_insideV, rInsideVBorder 
);
+    }
 
     aTextCharProps.maLatinFont = rTableStylePart.getLatinFont();
     aTextCharProps.maAsianFont = rTableStylePart.getAsianFont();
@@ -233,6 +271,8 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
     oox::drawingml::LineProperties aLinePropertiesRight;
     oox::drawingml::LineProperties aLinePropertiesTop;
     oox::drawingml::LineProperties aLinePropertiesBottom;
+    oox::drawingml::LineProperties aLinePropertiesInsideH;
+    oox::drawingml::LineProperties aLinePropertiesInsideV;
     oox::drawingml::LineProperties aLinePropertiesTopLeftToBottomRight;
     oox::drawingml::LineProperties aLinePropertiesBottomLeftToTopRight;
 
@@ -241,9 +281,16 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
         aLinePropertiesRight,
         aLinePropertiesTop,
         aLinePropertiesBottom,
+        aLinePropertiesInsideH,
+        aLinePropertiesInsideV,
         aLinePropertiesTopLeftToBottomRight,
         aLinePropertiesBottomLeftToTopRight,
-        rTable.getWholeTbl() );
+        rTable.getWholeTbl(),
+        true,
+        nColumn,
+        nMaxColumn,
+        nRow,
+        nMaxRow );
 
     if ( rProperties.isFirstRow() && ( nRow == 0 ) )
     {
@@ -252,6 +299,8 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
             aLinePropertiesRight,
             aLinePropertiesTop,
             aLinePropertiesBottom,
+            aLinePropertiesInsideH,
+            aLinePropertiesInsideV,
             aLinePropertiesTopLeftToBottomRight,
             aLinePropertiesBottomLeftToTopRight,
             rTable.getFirstRow() );
@@ -263,6 +312,8 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
             aLinePropertiesRight,
             aLinePropertiesTop,
             aLinePropertiesBottom,
+            aLinePropertiesInsideH,
+            aLinePropertiesInsideV,
             aLinePropertiesTopLeftToBottomRight,
             aLinePropertiesBottomLeftToTopRight,
             rTable.getLastRow() );
@@ -274,6 +325,8 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
             aLinePropertiesRight,
             aLinePropertiesTop,
             aLinePropertiesBottom,
+            aLinePropertiesInsideH,
+            aLinePropertiesInsideV,
             aLinePropertiesTopLeftToBottomRight,
             aLinePropertiesBottomLeftToTopRight,
             rTable.getFirstCol() );
@@ -285,6 +338,8 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
             aLinePropertiesRight,
             aLinePropertiesTop,
             aLinePropertiesBottom,
+            aLinePropertiesInsideH,
+            aLinePropertiesInsideV,
             aLinePropertiesTopLeftToBottomRight,
             aLinePropertiesBottomLeftToTopRight,
             rTable.getLastCol() );
@@ -306,6 +361,8 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
                     aLinePropertiesRight,
                     aLinePropertiesTop,
                     aLinePropertiesBottom,
+                    aLinePropertiesInsideH,
+                    aLinePropertiesInsideV,
                     aLinePropertiesTopLeftToBottomRight,
                     aLinePropertiesBottomLeftToTopRight,
                     rTable.getBand2H() );
@@ -317,6 +374,8 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
                     aLinePropertiesRight,
                     aLinePropertiesTop,
                     aLinePropertiesBottom,
+                    aLinePropertiesInsideH,
+                    aLinePropertiesInsideV,
                     aLinePropertiesTopLeftToBottomRight,
                     aLinePropertiesBottomLeftToTopRight,
                     rTable.getBand1H() );
@@ -330,6 +389,8 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
             aLinePropertiesRight,
             aLinePropertiesTop,
             aLinePropertiesBottom,
+            aLinePropertiesInsideH,
+            aLinePropertiesInsideV,
             aLinePropertiesTopLeftToBottomRight,
             aLinePropertiesBottomLeftToTopRight,
             rTable.getNwCell() );
@@ -341,6 +402,8 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
             aLinePropertiesRight,
             aLinePropertiesTop,
             aLinePropertiesBottom,
+            aLinePropertiesInsideH,
+            aLinePropertiesInsideV,
             aLinePropertiesTopLeftToBottomRight,
             aLinePropertiesBottomLeftToTopRight,
             rTable.getSwCell() );
@@ -352,6 +415,8 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
             aLinePropertiesRight,
             aLinePropertiesTop,
             aLinePropertiesBottom,
+            aLinePropertiesInsideH,
+            aLinePropertiesInsideV,
             aLinePropertiesTopLeftToBottomRight,
             aLinePropertiesBottomLeftToTopRight,
             rTable.getNeCell() );
@@ -363,6 +428,8 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
             aLinePropertiesRight,
             aLinePropertiesTop,
             aLinePropertiesBottom,
+            aLinePropertiesInsideH,
+            aLinePropertiesInsideV,
             aLinePropertiesTopLeftToBottomRight,
             aLinePropertiesBottomLeftToTopRight,
             rTable.getSeCell() );
@@ -384,6 +451,8 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
                     aLinePropertiesRight,
                     aLinePropertiesTop,
                     aLinePropertiesBottom,
+                    aLinePropertiesInsideH,
+                    aLinePropertiesInsideV,
                     aLinePropertiesTopLeftToBottomRight,
                     aLinePropertiesBottomLeftToTopRight,
                     rTable.getBand2V() );
@@ -395,6 +464,8 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
                     aLinePropertiesRight,
                     aLinePropertiesTop,
                     aLinePropertiesBottom,
+                    aLinePropertiesInsideH,
+                    aLinePropertiesInsideV,
                     aLinePropertiesTopLeftToBottomRight,
                     aLinePropertiesBottomLeftToTopRight,
                     rTable.getBand1V() );
@@ -405,8 +476,11 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
     aLinePropertiesRight.assignUsed( maLinePropertiesRight );
     aLinePropertiesTop.assignUsed( maLinePropertiesTop );
     aLinePropertiesBottom.assignUsed( maLinePropertiesBottom );
+    aLinePropertiesInsideH.assignUsed( maLinePropertiesInsideH );
+    aLinePropertiesInsideV.assignUsed( maLinePropertiesInsideV );
     aLinePropertiesTopLeftToBottomRight.assignUsed( 
maLinePropertiesTopLeftToBottomRight );
     aLinePropertiesBottomLeftToTopRight.assignUsed( 
maLinePropertiesBottomLeftToTopRight );
+
     applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesLeft, 
PROP_LeftBorder );
     applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesRight, 
PROP_RightBorder );
     applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesTop, 
PROP_TopBorder );
@@ -414,6 +488,28 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
     applyLineAttributes( rFilterBase, xPropSet, 
aLinePropertiesTopLeftToBottomRight, PROP_DiagonalTLBR );
     applyLineAttributes( rFilterBase, xPropSet, 
aLinePropertiesBottomLeftToTopRight, PROP_DiagonalBLTR );
 
+    // Convert insideH to Top and Bottom, InsideV to Left and Right. Exclude 
the outer borders.
+    if(nRow != 0)
+    {
+        aLinePropertiesInsideH.assignUsed( aLinePropertiesTop );
+        applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesInsideH, 
PROP_TopBorder );
+    }
+    if(nRow != nMaxRow)
+    {
+        aLinePropertiesInsideH.assignUsed( aLinePropertiesBottom );
+        applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesInsideH, 
PROP_BottomBorder );
+    }
+    if(nColumn != 0)
+    {
+        aLinePropertiesInsideV.assignUsed( aLinePropertiesLeft );
+        applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesInsideV, 
PROP_LeftBorder );
+    }
+    if(nColumn != nMaxColumn)
+    {
+        aLinePropertiesInsideV.assignUsed( aLinePropertiesRight );
+        applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesInsideV, 
PROP_RightBorder );
+    }
+
     if (rProperties.getBgColor().isUsed() && 
!maFillProperties.maFillColor.isUsed() && maFillProperties.moFillType.get() == 
XML_noFill)
     {
         maFillProperties.moFillType = XML_solidFill;
diff --git a/oox/source/drawingml/table/tableproperties.cxx 
b/oox/source/drawingml/table/tableproperties.cxx
index 1622b8fc22ca..2c45004b3357 100644
--- a/oox/source/drawingml/table/tableproperties.cxx
+++ b/oox/source/drawingml/table/tableproperties.cxx
@@ -143,7 +143,8 @@ void TableProperties::pushToPropSet(const 
::oox::core::XmlFilterBase& rFilterBas
     {
         sal_Int32 nColumn = 0;
         sal_Int32 nColumnSize = tableRow.getTableCells().size();
-        sal_Int32 nRemovedColumn = 0; //
+        sal_Int32 nRemovedColumn = 0;
+        sal_Int32 nRemovedRow = 0;
 
         for (sal_Int32 nColIndex = 0; nColIndex < nColumnSize; nColIndex++)
         {
@@ -169,6 +170,9 @@ void TableProperties::pushToPropSet(const 
::oox::core::XmlFilterBase& rFilterBas
                         // props with pushToXCell.
                         bMerged = true;
                     }
+
+                    if (rTableCell.getRowSpan() > 1)
+                        nRemovedRow = (rTableCell.getRowSpan() - 1);
                 }
 
                 Reference<XCellRange> xCellRange(xTable, UNO_QUERY_THROW);
@@ -190,11 +194,17 @@ void TableProperties::pushToPropSet(const 
::oox::core::XmlFilterBase& rFilterBas
                 else
                     xCell = xCellRange->getCellByPosition(nColumn, nRow);
 
+
+                sal_Int32 nMaxCol = tableRow.getTableCells().size() - 
nRemovedColumn - 1;
+                sal_Int32 nMaxRow =  mvTableRows.size() - nRemovedRow - 1;
+
                 rTableCell.pushToXCell(rFilterBase, pMasterTextListStyle, 
xCell, *this, rTableStyle,
-                                       nColumn, 
tableRow.getTableCells().size() - 1, nRow,
-                                       mvTableRows.size() - 1);
+                                       nColumn, nMaxCol, nRow, nMaxRow);
+
                 if (bMerged)
                     nColumn += nRemovedColumn;
+
+                nRemovedRow = 0;
             }
             ++nColumn;
         }
diff --git a/sd/qa/unit/data/pptx/bnc480256-2.pptx 
b/sd/qa/unit/data/pptx/bnc480256-2.pptx
new file mode 100644
index 000000000000..a622d77acef0
Binary files /dev/null and b/sd/qa/unit/data/pptx/bnc480256-2.pptx differ
diff --git a/sd/qa/unit/data/pptx/tdf135843_insideH.pptx 
b/sd/qa/unit/data/pptx/tdf135843_insideH.pptx
new file mode 100644
index 000000000000..9b7864adb325
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf135843_insideH.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index e49892d3a738..c7b508de5dc3 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1474,7 +1474,7 @@ void SdImportTest::testTableBorderLineStyle()
         xTable.set(pTableObj->getTable(), uno::UNO_QUERY_THROW);
         xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
         xCell->getPropertyValue("TopBorder") >>= aBorderLine;
-        if (aBorderLine.LineWidth > 0) {
+        if (aBorderLine.Color != -1) {
             CPPUNIT_ASSERT_EQUAL(nObjBorderLineStyles[i], 
aBorderLine.LineStyle);
         }
     }
diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx
index e4dfe0e3d47c..f34e2fb136f2 100644
--- a/sd/qa/unit/layout-tests.cxx
+++ b/sd/qa/unit/layout-tests.cxx
@@ -253,6 +253,44 @@ void SdLayoutTest::tdf143258_testTbRlLayout()
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SdLayoutTest);
 
+CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf135843_InsideHBorders)
+{
+    sd::DrawDocShellRef xDocShRef = loadURL(
+        
m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf135843_insideH.pptx"), 
PPTX);
+
+    std::shared_ptr<GDIMetaFile> xMetaFile = xDocShRef->GetPreviewMetaFile();
+    MetafileXmlDump dumper;
+
+    xmlDocUniquePtr pXmlDoc = XmlTestTools::dumpAndParse(dumper, *xMetaFile);
+    CPPUNIT_ASSERT(pXmlDoc);
+    // Without the fix, the test fails with:
+    //- Expected: 34
+    //- Actual  : 36
+    // We shouldn't see two vertical borders inside the table on ui.
+
+    assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push", 34);
+    xDocShRef->DoClose();
+}
+
+CPPUNIT_TEST_FIXTURE(SdLayoutTest, testBnc480256)
+{
+    sd::DrawDocShellRef xDocShRef
+        = 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc480256-2.pptx"), 
PPTX);
+
+    std::shared_ptr<GDIMetaFile> xMetaFile = xDocShRef->GetPreviewMetaFile();
+    MetafileXmlDump dumper;
+
+    xmlDocUniquePtr pXmlDoc = XmlTestTools::dumpAndParse(dumper, *xMetaFile);
+    CPPUNIT_ASSERT(pXmlDoc);
+    // Without the fix, the test fails with:
+    //- Expected: #ff0000
+    //- Actual  : #ffffff
+    // We should see the red vertical border inside the table.
+
+    assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[8]/linecolor[1]", 
"color", "#ff0000");
+    xDocShRef->DoClose();
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 36024e89023fe7be1510867790d5976459483330
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Tue Apr 12 21:16:37 2022 +0200
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Tue Apr 12 21:16:37 2022 +0200

    bump product version to 7.3.4.0.0+
    
    Change-Id: Iea02bb7e76ef5f6b0c7df0e2340785e48698a122

diff --git a/configure.ac b/configure.ac
index a1fe4c65b291..dab4326616b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[7.3.3.0.0+],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[7.3.4.0.0+],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard
commit 161d51704e2c76034b5cc1413ca99df45df81ea4
Author:     Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
AuthorDate: Fri Apr 8 15:59:11 2022 +0200
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Tue Apr 12 20:46:21 2022 +0200

    tdf#147876 Fix crash when cancelling Dialog import dlg
    
    Regression from 9a55b97e980bbf2a0ce12841f6168f1f7545ac96
    
    Change-Id: I3fc35981a0cb81e5b59236ec3b07450aec10541a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132737
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
    (cherry picked from commit 618d40799d25474c48d984ce1d52b0f08f220958)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132855
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index 920e82da3d0a..7b7e5db43b89 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -851,7 +851,7 @@ bool implImportDialog(weld::Window* pWin, const 
ScriptDocument& rDocument, const
     xFP->appendFilter( IDEResId(RID_STR_FILTER_ALLFILES), FilterMask_All );
     xFP->setCurrentFilter( aDialogStr );
 
-    if( aDlg.Execute() != ERRCODE_NONE )
+    if( aDlg.Execute() == ERRCODE_NONE )
     {
         Sequence< OUString > aPaths = xFP->getSelectedFiles();
 
commit 233bef275374f9c7f20710ab4ac0996e11535936
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Tue Apr 12 20:38:38 2022 +0200
Commit:     Gerrit Code Review <ger...@gerrit.libreoffice.org>
CommitDate: Tue Apr 12 20:38:38 2022 +0200

    Update git submodules
    
    * Update translations from branch 'libreoffice-7-3'
      to d843f8419c9d76baeeeed4700c70ed225ca3f8ce
      - update translations for 7.3.3 rc1
    
        and force-fix errors using pocheck
    
        Change-Id: I6f710c70cb05b213a474cc705541d2558c2304dd

diff --git a/translations b/translations
index 6e640300395f..d843f8419c9d 160000
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 6e640300395f31da22a9b1a3d44c9cfa2fc91222
+Subproject commit d843f8419c9d76baeeeed4700c70ed225ca3f8ce
commit cc1013e2c6b806226c888d980f56d13767998546
Author:     Dennis Francis <dennis.fran...@collabora.com>
AuthorDate: Tue Apr 12 10:43:00 2022 +0530
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Tue Apr 12 20:31:03 2022 +0200

    unit test: use temp copy in testInvalidEntrySave()
    
    Use a temporary copy of the source file to run this test otherwise it
    will execute a .uno:Save on the original document in the git tree!
    
    Change-Id: I673aad64453e72a9140efcad2b0ff9c0ceabc038

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index dbad2535fb1d..699e0c687130 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -37,6 +37,8 @@
 #include <tools/json_writer.hxx>
 #include <docoptio.hxx>
 #include <test/lokcallback.hxx>
+#include <osl/file.hxx>
+#include <unotools/tempfile.hxx>
 
 #include <chrono>
 #include <cstddef>
@@ -182,10 +184,11 @@ public:
     CPPUNIT_TEST_SUITE_END();
 
 private:
-    ScModelObj* createDoc(const char* pName);
+    ScModelObj* createDoc(const char* pName, bool bMakeTempCopy = false);
     void setupLibreOfficeKitViewCallback(SfxViewShell* pViewShell);
     static void callback(int nType, const char* pPayload, void* pData);
     void callbackImpl(int nType, const char* pPayload);
+    void makeTempCopy(const OUString& rOrigURL);
 
     /// document size changed callback.
     osl::Condition m_aDocSizeCondition;
@@ -193,6 +196,7 @@ private:
 
     uno::Reference<lang::XComponent> mxComponent;
     TestLokCallbackWrapper m_callbackWrapper;
+    std::unique_ptr<utl::TempFile> mpTempFile;
 };
 
 ScTiledRenderingTest::ScTiledRenderingTest()
@@ -231,11 +235,29 @@ void ScTiledRenderingTest::tearDown()
     test::BootstrapFixture::tearDown();
 }
 
-ScModelObj* ScTiledRenderingTest::createDoc(const char* pName)
+void ScTiledRenderingTest::makeTempCopy(const OUString& rOrigURL)
+{
+    mpTempFile.reset(new utl::TempFile());
+    mpTempFile->EnableKillingFile();
+    auto const aError = osl::File::copy(rOrigURL, mpTempFile->GetURL());
+    CPPUNIT_ASSERT_EQUAL_MESSAGE(
+        OUString("<" + rOrigURL + "> -> <" + mpTempFile->GetURL() + 
">").toUtf8().getStr(),
+        osl::FileBase::E_None, aError);
+}
+
+ScModelObj* ScTiledRenderingTest::createDoc(const char* pName, bool 
bMakeTempCopy)
 {
     if (mxComponent.is())
         mxComponent->dispose();
-    mxComponent = loadFromDesktop(m_directories.getURLFromSrc(DATA_DIRECTORY) 
+ OUString::createFromAscii(pName), "com.sun.star.sheet.SpreadsheetDocument");
+
+    OUString aOriginalSrc = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
OUString::createFromAscii(pName);
+    if (bMakeTempCopy)
+        makeTempCopy(aOriginalSrc);
+
+    mxComponent = loadFromDesktop(
+        bMakeTempCopy ? mpTempFile->GetURL() : aOriginalSrc,
+        "com.sun.star.sheet.SpreadsheetDocument");
+
     ScModelObj* pModelObj = dynamic_cast<ScModelObj*>(mxComponent.get());
     CPPUNIT_ASSERT(pModelObj);
     
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
@@ -2911,7 +2933,7 @@ void ScTiledRenderingTest::testInvalidEntrySave()
     // Load a document
     comphelper::LibreOfficeKit::setActive();
 
-    ScModelObj* pModelObj = createDoc("validity.xlsx");
+    ScModelObj* pModelObj = createDoc("validity.xlsx", true /* bMakeTempCopy 
*/);
     const ScDocument* pDoc = pModelObj->GetDocument();
     ViewCallback aView;
     int nView = SfxLokHelper::getView();
commit 31167c542b6b9b6482dffee1a253a388ff3c0e2c
Author:     Dennis Francis <dennis.fran...@collabora.com>
AuthorDate: Thu Apr 7 13:14:59 2022 +0530
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Tue Apr 12 20:28:44 2022 +0200

    lok: unit test for invalid entry save
    
    Unit test related to the fix
    
    lok: avoid validation-dialog yield when saving
    e0175ee821eaff56c4b8e0a1b7afa1cabe0ab593
    
    The test ensures that the document is marked unmodified after save has
    been executed in the middle of entering partial data to a validation
    cell.
    
    Conflicts:
            sc/qa/unit/tiledrendering/tiledrendering.cxx
    
    Change-Id: Idffd6d647034e128d0d800fe8e29efc333c03db6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132657
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/sc/qa/unit/tiledrendering/data/validity.xlsx 
b/sc/qa/unit/tiledrendering/data/validity.xlsx
new file mode 100644
index 000000000000..54a92acd5979
Binary files /dev/null and b/sc/qa/unit/tiledrendering/data/validity.xlsx differ
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 6c6cd5990c3c..dbad2535fb1d 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -122,6 +122,7 @@ public:
     void testTextSelectionBounds();
     void testSheetViewDataCrash();
     void testTextBoxInsert();
+    void testInvalidEntrySave();
 
     CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
     CPPUNIT_TEST(testRowColumnHeaders);
@@ -177,6 +178,7 @@ public:
     CPPUNIT_TEST(testTextSelectionBounds);
     CPPUNIT_TEST(testSheetViewDataCrash);
     CPPUNIT_TEST(testTextBoxInsert);
+    CPPUNIT_TEST(testInvalidEntrySave);
     CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -2643,18 +2645,25 @@ void ScTiledRenderingTest::testSortAscendingDescending()
     CPPUNIT_ASSERT_EQUAL(OString("rows"), aView.m_sInvalidateSheetGeometry);
 }
 
-void lcl_typeCharsInCell(const std::string& aStr, SCCOL nCol, SCROW nRow, 
ScTabViewShell* pView, ScModelObj* pModelObj)
+void lcl_typeCharsInCell(const std::string& aStr, SCCOL nCol, SCROW nRow, 
ScTabViewShell* pView,
+    ScModelObj* pModelObj, bool bInEdit = false, bool bCommit = true)
 {
-    pView->SetCursor(nCol, nRow);
+    if (!bInEdit)
+        pView->SetCursor(nCol, nRow);
+
     for (const char& cChar : aStr)
     {
         pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, cChar, 0);
         pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, cChar, 0);
         Scheduler::ProcessEventsToIdle();
     }
-    pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::RETURN);
-    pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::RETURN);
-    Scheduler::ProcessEventsToIdle();
+
+    if (bCommit)
+    {
+        pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::RETURN);
+        pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::RETURN);
+        Scheduler::ProcessEventsToIdle();
+    }
 }
 
 void ScTiledRenderingTest::testAutoInputStringBlock()
@@ -2897,6 +2906,44 @@ void ScTiledRenderingTest::testTextBoxInsert()
     Scheduler::ProcessEventsToIdle();
 }
 
+void ScTiledRenderingTest::testInvalidEntrySave()
+{
+    // Load a document
+    comphelper::LibreOfficeKit::setActive();
+
+    ScModelObj* pModelObj = createDoc("validity.xlsx");
+    const ScDocument* pDoc = pModelObj->GetDocument();
+    ViewCallback aView;
+    int nView = SfxLokHelper::getView();
+
+    SfxLokHelper::setView(nView);
+
+    ScDocShell* pDocSh = dynamic_cast< ScDocShell* >( 
pModelObj->GetEmbeddedObject() );
+    ScTabViewShell* pTabViewShell = 
dynamic_cast<ScTabViewShell*>(SfxViewShell::Current());
+    CPPUNIT_ASSERT(pTabViewShell);
+
+    // Type partial date "7/8" of "7/8/2013" that
+    // the validation cell at A8 can accept
+    lcl_typeCharsInCell("7/8", 0, 7, pTabViewShell, pModelObj,
+        false /* bInEdit */, false /* bCommit */); // Type "7/8" in A8
+
+    uno::Sequence<beans::PropertyValue> aArgs;
+    comphelper::dispatchCommand(".uno:Save", aArgs);
+    Scheduler::ProcessEventsToIdle();
+
+    CPPUNIT_ASSERT_MESSAGE("Should not be marked modified after save", 
!pDocSh->IsModified());
+
+    // Complete the date in A8 by appending "/2013" and commit.
+    lcl_typeCharsInCell("/2013", 0, 7, pTabViewShell, pModelObj,
+        true /* bInEdit */, true /* bCommit */);
+
+    // This would hang if the date entered "7/8/2013" is not acceptable.
+    Scheduler::ProcessEventsToIdle();
+
+    // Ensure that the correct date is recorded in the document.
+    CPPUNIT_ASSERT_EQUAL(double(41463), pDoc->GetValue(ScAddress(0, 7, 0)));
+}
+
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(ScTiledRenderingTest);
commit c45ab05455486323763851d6c3b6a168ae1abba6
Author:     Dennis Francis <dennis.fran...@collabora.com>
AuthorDate: Fri Apr 1 14:50:42 2022 +0530
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Tue Apr 12 20:28:25 2022 +0200

    lok: avoid validation-dialog yield when saving
    
    Disable error dialog box when about to save in lok mode as this
    ultimately invokes SvpSalInstance::DoYield() when we want to save
    immediately without committing any erroneous input in possibly a cell
    with validation rules. After save is complete the user can continue
    editing.
    
    Conflicts:
            sc/source/ui/app/inputhdl.cxx
    
    Change-Id: Iffa0766ad594db75f57158986c4e1d2646f71da4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132410
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    (cherry picked from commit e0175ee821eaff56c4b8e0a1b7afa1cabe0ab593)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132656
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index 4a89fd3424cd..70170984d0dc 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -198,7 +198,7 @@ public:
     bool                IsInputMode();  // also for SC_INPUT_TYPE
     void                SetInputMode( ScInputMode eMode, const OUString* 
pInitText = nullptr );
     bool                InputKeyEvent( const KeyEvent& rKEvt, bool bStartEdit 
= false );
-    SC_DLLPUBLIC void   InputEnterHandler( ScEnterMode nBlockMode = 
ScEnterMode::NORMAL );
+    SC_DLLPUBLIC void   InputEnterHandler( ScEnterMode nBlockMode = 
ScEnterMode::NORMAL, bool bBeforeSavingInLOK = false );
     void                InputCancelHandler();
     void                InputSelection( const EditView* pView );
     void                InputChanged( const EditView* pView );
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index d844401a8807..30f18a075c7c 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3002,7 +3002,7 @@ static void lcl_SelectionToEnd( EditView* pView )
     }
 }
 
-void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
+void ScInputHandler::EnterHandler( ScEnterMode nBlockMode, bool 
bBeforeSavingInLOK )
 {
     if (!mbDocumentDisposing && comphelper::LibreOfficeKit::isActive()
         && pActiveViewSh != SfxViewShell::Current())
@@ -3082,6 +3082,16 @@ void ScInputHandler::EnterHandler( ScEnterMode 
nBlockMode )
                         pSelEngine->ReleaseMouse();
                 }
 
+                if (bBeforeSavingInLOK)
+                {
+                    // Invalid entry but not applied to the document model.
+                    // Exit to complete the "save", leaving the edit view as 
it is
+                    // for the user to continue after save.
+                    bInOwnChange = false;
+                    bInEnterHandler = false;
+                    return;
+                }
+
                 if (pData->DoError(pActiveViewSh->GetFrameWeld(), aString, 
aCursorPos))
                     bForget = true;                 // Do not take over input
             }
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index dee33b48a509..3534ecdb69e3 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1356,13 +1356,13 @@ bool ScModule::InputKeyEvent( const KeyEvent& rKEvt, 
bool bStartEdit )
     return pHdl && pHdl->KeyInput( rKEvt, bStartEdit );
 }
 
-void ScModule::InputEnterHandler( ScEnterMode nBlockMode )
+void ScModule::InputEnterHandler( ScEnterMode nBlockMode, bool 
bBeforeSavingInLOK )
 {
     if ( !SfxGetpApp()->IsDowning() ) // Not when quitting the program
     {
         ScInputHandler* pHdl = GetInputHdl();
         if (pHdl)
-            pHdl->EnterHandler( nBlockMode );
+            pHdl->EnterHandler( nBlockMode, bBeforeSavingInLOK );
     }
 }
 
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index fb3880e97a69..f66688a257ca 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -198,7 +198,7 @@ public:
     void            MergeLanguageAttributes( ScEditEngineDefaulter& 
rDestEngine ) const;
 
     bool            KeyInput( const KeyEvent& rKEvt, bool bStartEdit );
-    void            EnterHandler( ScEnterMode nBlockMode = ScEnterMode::NORMAL 
);
+    void            EnterHandler( ScEnterMode nBlockMode = 
ScEnterMode::NORMAL, bool bBeforeSavingInLOK = false );
     void            CancelHandler();
     void            SetReference( const ScRange& rRef, const ScDocument& rDoc 
);
     void            AddRefEntry();
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 414a293d854d..209f935a729f 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -757,9 +757,16 @@ void ScTabViewShell::ExecuteSave( SfxRequest& rReq )
     // Finish entering unless 'DontTerminateEdit' is specified, even if a 
formula is being processed
     if (bCommitChanges)
     {
-        SC_MOD()->InputEnterHandler();
+        bool bLOKActive = comphelper::LibreOfficeKit::isActive();
 
-        if (comphelper::LibreOfficeKit::isActive())
+        // Disable error dialog box when about to save in lok mode as
+        // this ultimately invokes SvpSalInstance::DoYield() when we want
+        // to save immediately without committing any erroneous input in 
possibly
+        // a cell with validation rules. After save is complete the user
+        // can continue editing.
+        SC_MOD()->InputEnterHandler(ScEnterMode::NORMAL, bLOKActive /* 
bBeforeSavingInLOK */);
+
+        if (bLOKActive)
         {
             // Normally this isn't needed, but in Calc when editing a cell 
formula
             // and manually saving (without changing cells or hitting enter), 
while
commit d19c99d10764531279e59959aa84f832afee14a6
Author:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
AuthorDate: Thu Mar 24 01:02:52 2022 -0600
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Tue Apr 12 20:25:53 2022 +0200

    Clean up unused translatable strings
    
    These icon themes no longer exist, and these items are ignored anyway
    since the list was made dynamic in tdf#63962, back in 2014.
    
    Change-Id: I5a4dd5001b449f94775447f22b726b99a4fe63ec
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132025
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
    (cherry picked from commit 19c215e948678c5c8809df6ce8052122b32c97d8)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132037
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index fb330f2aa048..fdb2fde0d23d 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -416,10 +416,6 @@
                     <property name="hexpand">True</property>
                     <items>
                       <item translatable="yes" 
context="optviewpage|iconstyle">Automatic</item>
-                      <item translatable="yes" 
context="optviewpage|iconstyle">Galaxy</item>
-                      <item translatable="yes" 
context="optviewpage|iconstyle">High Contrast</item>
-                      <item translatable="yes" 
context="optviewpage|iconstyle">Oxygen</item>
-                      <item translatable="yes" 
context="optviewpage|iconstyle">Classic</item>
                       <item translatable="yes" 
context="optviewpage|iconstyle">Sifr</item>
                       <item translatable="yes" 
context="optviewpage|iconstyle">Breeze</item>
                     </items>
commit 664ea7545a62e1329eb1761caea25b7f31cafa7a
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Wed Apr 6 16:42:24 2022 +0200
Commit:     Jan-Marek Glogowski <glo...@fbihome.de>
CommitDate: Tue Apr 12 20:18:41 2022 +0200

    tdf#148491 Qt reconnect the QMenuBar close button
    
    When the QMenuBar of a QMainWindow is replaced, an existing
    corner widget is preserved / transferred, but its connections
    are still severed; a bit unexpected...
    
    The documentation for QMenuBar::setCornerWidget is not really
    clear what is happening, but the code has this nice comment:
    "// Reparent corner widgets before we delete the old menu".
    At least there is no need to explicitly delete the button.
    
    Still we must reconnect an existing button on each SetFrame.
    
    Regression from commit 9c4ef8ce3183e27ca174475cf4a8d15cc0368f60
    ("tdf#145954 Qt unshare QMenubar usage").
    
    This includes commit 4a537cf77affc4f1f2e2e5be9ff0b1ff11724509
    ("Qt drop unused QtMenu::mpCloseButton").
    
    Change-Id: I13c31734e665b78231a08cd76ca6305122e08879
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132836
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    (cherry picked from commit f751417b77e6573a0c639778e76ec943449f4573)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132894
    Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de>

diff --git a/vcl/inc/qt5/QtMenu.hxx b/vcl/inc/qt5/QtMenu.hxx
index f39be7e8d506..11f3f00c5aa6 100644
--- a/vcl/inc/qt5/QtMenu.hxx
+++ b/vcl/inc/qt5/QtMenu.hxx
@@ -49,7 +49,6 @@ private:
     std::unique_ptr<QMenu> mpOwnedQMenu;
     // pointer to QMenu owned by the corresponding QtMenuItem or self (-> 
mpOwnedQMenu)
     QMenu* mpQMenu;
-    QPushButton* mpCloseButton;
 
     void DoFullMenuUpdate(Menu* pMenuBar);
     static void NativeItemText(OUString& rItemText);
diff --git a/vcl/qt5/QtMenu.cxx b/vcl/qt5/QtMenu.cxx
index 44873ce3384d..9400f5e129bf 100644
--- a/vcl/qt5/QtMenu.cxx
+++ b/vcl/qt5/QtMenu.cxx
@@ -40,7 +40,6 @@ QtMenu::QtMenu(bool bMenuBar)
     , mbMenuBar(bMenuBar)
     , mpQMenuBar(nullptr)
     , mpQMenu(nullptr)
-    , mpCloseButton(nullptr)
 {
 }
 
@@ -431,7 +430,9 @@ void QtMenu::SetFrame(const SalFrame* pFrame)
     mpQMenuBar = new QMenuBar();
     pMainWindow->setMenuBar(mpQMenuBar);
 
-    mpCloseButton = nullptr;
+    QPushButton* pButton = 
static_cast<QPushButton*>(mpQMenuBar->cornerWidget(Qt::TopRightCorner));
+    if (pButton)
+        connect(pButton, &QPushButton::clicked, this, 
&QtMenu::slotCloseDocument);
     mpQMenu = nullptr;
 
     DoFullMenuUpdate(mpVCLMenu);
@@ -650,6 +651,8 @@ void QtMenu::ShowCloseButton(bool bShow)
         return;
 
     QPushButton* pButton = 
static_cast<QPushButton*>(mpQMenuBar->cornerWidget(Qt::TopRightCorner));
+    if (!pButton && !bShow)
+        return;
     if (!pButton)
     {
         QIcon aIcon;
@@ -665,7 +668,6 @@ void QtMenu::ShowCloseButton(bool bShow)
         pButton->setToolTip(toQString(VclResId(SV_HELPTEXT_CLOSEDOCUMENT)));
         mpQMenuBar->setCornerWidget(pButton, Qt::TopRightCorner);
         connect(pButton, &QPushButton::clicked, this, 
&QtMenu::slotCloseDocument);
-        mpCloseButton = pButton;
     }
 
     if (bShow)
commit 712f54a7047aeb27bc6de96b56cae84e24a01302
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Mar 11 21:47:43 2022 +0000
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Tue Apr 12 12:48:26 2022 +0200

    an inconsistent SwTextFormatInfo index, len, text length case
    
    seen on loading sw/qa/python/testdocuments/TESTMETA.odt
    
    maybe since:
    
    commit 2f3684b2289a8c46dc6144064a452cc529400f28
    Date:   Tue Jul 31 16:00:02 2018 +0200
    
        [API CHANGE] add some more asserts to the string functions
    
    but probably an underlying issue since conversion from UniString
    to OUString
    
    Change-Id: If731163fbc5e05b813ccd21df65164fe476cba9a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131361
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index c366401c9153..6ef492c1b9d5 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -175,10 +175,18 @@ SwFieldSlot::SwFieldSlot( const SwTextFormatInfo* pNew, 
const SwFieldPortion *pP
         pInf->SetFakeLineStart( nIdx > pInf->GetLineStart() );
         pInf->SetIdx(TextFrameIndex(0));
     }
-    else if (nIdx < TextFrameIndex(pOldText->getLength()))
+    else
     {
-        sal_Int32 const nFieldLen(pPor->GetFieldLen());
-        aText = (*pOldText).replaceAt(sal_Int32(nIdx), nFieldLen, aText);
+        TextFrameIndex nEnd(pOldText->getLength());
+        if (nIdx < nEnd)
+        {
+            sal_Int32 const nFieldLen(pPor->GetFieldLen());
+            aText = (*pOldText).replaceAt(sal_Int32(nIdx), nFieldLen, aText);
+        }
+        else if (nIdx == nEnd)
+            aText = *pOldText + aText;
+        else
+            SAL_WARN("sw.core", "SwFieldSlot bad SwFieldPortion index.");
     }
     pInf->SetText( aText );
 }
commit 583d162b54320244f0ce250876e196ccca8983ee
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Apr 12 08:45:23 2022 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Tue Apr 12 11:57:09 2022 +0200

    ofz: Use-of-uninitialized-value
    
    Change-Id: I87cfad2da9b90bc4487dc4deb2fda5bb31a6b763
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132856
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index a28dc49e5ebd..4b5e209b7680 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1738,7 +1738,7 @@ void OutputDevice::ImplDrawText( OutputDevice& 
rTargetDevice, const tools::Recta
         tools::Long nMnemonicX = 0;
         tools::Long nMnemonicY = 0;
         DeviceCoordinate nMnemonicWidth = 0;
-        if ( nMnemonicPos != -1 )
+        if (nMnemonicPos != -1 && nMnemonicPos < aStr.getLength())
         {
             std::unique_ptr<sal_Int32[]> const pCaretXArray(new sal_Int32[2 * 
aStr.getLength()]);
             /*sal_Bool bRet =*/ _rLayout.GetCaretPositions( aStr, 
pCaretXArray.get(), 0, aStr.getLength() );
commit d4f46f0968c30d525c9a5274c6ffeac2f8358262
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Fri Apr 8 15:05:50 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Apr 12 11:40:06 2022 +0200

    tdf#148423: Half a hack
    
    "Regression" introduced with de4d296619b978ec303f1d7b1e2c78e13fa7a512 "Avoid
    overflow in ScColumn::GetOptimalColWidth", which, for this bug document's
    nWidth/nPPTX = 6004/0.0647708 = 92696.1, changed the calculation of nTwips 
from
    the undefined-behavior 92696 % 65536 = 27161 to the clamped 65535, but 
which is
    apparently a value large enough to cause "silent" issues (i.e., not causing
    further undefined behavior) down the road, leading to a super-narrow column.
    
    That commit already wondered whether sal_uInt16 is a useful choice here, but
    lets keep that question unanswered and just clamp at half the previous 
value,
    which happens to cause presumably more pleasing results.
    
    Change-Id: I1df642b2b9d6818c8be0f8d8f4567a00c399c154
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132734
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    (cherry picked from commit 126b1826c465002dccc7c354a584731fa70ec5fd)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132708
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 92f57bc765a5..d584f11df806 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -822,7 +822,7 @@ sal_uInt16 ScColumn::GetOptimalColWidth(
     {
         nWidth += 2;
         sal_uInt16 nTwips = static_cast<sal_uInt16>(
-            std::min(nWidth / nPPTX, 
double(std::numeric_limits<sal_uInt16>::max())));
+            std::min(nWidth / nPPTX, 
double(std::numeric_limits<sal_uInt16>::max() / 2)));
         return nTwips;
     }
     else
commit 8a62db9759696cd3e5ba980f687c9be91490b4a5
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Mon Apr 11 17:07:36 2022 +0200
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Tue Apr 12 07:48:54 2022 +0200

    tdf#148481 Map RefHand cursor to Qt::PointingHand
    
    Change-Id: I79c7008655f22737f92a4a6430f1380e81c1c386
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132833
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de>
    (cherry picked from commit 9ae398054833120df36bf51738cc4cfd7efb3fdc)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132713
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/vcl/qt5/QtData.cxx b/vcl/qt5/QtData.cxx
index e67abdd76224..a4b9141e43db 100644
--- a/vcl/qt5/QtData.cxx
+++ b/vcl/qt5/QtData.cxx
@@ -228,7 +228,7 @@ QCursor& QtData::getCursor(PointerStyle ePointerStyle)
             MAP_BUILTIN(PointerStyle::HSizeBar, Qt::SizeHorCursor);
             MAP_BUILTIN(PointerStyle::VSizeBar, Qt::SizeVerCursor);
 
-            MAP_BUILTIN(PointerStyle::RefHand, Qt::OpenHandCursor);
+            MAP_BUILTIN(PointerStyle::RefHand, Qt::PointingHandCursor);
             MAP_BUILTIN(PointerStyle::Hand, Qt::OpenHandCursor);
 #if 0
             MAP_BUILTIN( PointerStyle::Pen, GDK_PENCIL );
commit 73ee783b6cacceffe79c1772ab861019652ddb98
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Apr 9 09:56:23 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Apr 11 17:15:19 2022 +0200

    ofz#46526 Abrt
    
    Change-Id: Iaec536b0989c4ec11b39b1534c7798e46715d7a0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132704
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    Tested-by: Jenkins

diff --git a/connectivity/source/drivers/dbase/DTable.cxx 
b/connectivity/source/drivers/dbase/DTable.cxx
index c5da1d6b2477..2665469076d9 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -946,7 +946,7 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const 
OSQLColumns & _rCols, bool
             {
                 case DataType::DATE:
                 {
-                    if (aStr.getLength() != nLen)
+                    if (nLen < 8 || aStr.getLength() != nLen)
                     {
                         (*_rRow)[i]->setNull();
                         break;

Reply via email to