extras/source/autocorr/lang/da/DocumentList.xml |    1 -
 fpicker/uiconfig/ui/explorerfiledialog.ui       |   14 ++------------
 sc/CppunitTest_sc_uicalc.mk                     |    5 ++++-
 sc/qa/unit/uicalc/data/tdf149503.xls            |binary
 sc/qa/unit/uicalc/uicalc.cxx                    |   21 +++++++++++++++++++++
 sc/source/core/data/dpoutput.cxx                |    4 ++++
 sc/source/ui/app/inputhdl.cxx                   |    4 ++--
 sc/source/ui/view/printfun.cxx                  |    4 ++++
 sw/source/uibase/misc/redlndlg.cxx              |   17 +++++++++++------
 sw/uiconfig/swriter/ui/objectdialog.ui          |    1 +
 vcl/qt5/QtFrame.cxx                             |    4 ++--
 vcl/source/helper/strhelper.cxx                 |    8 +++++++-
 12 files changed, 58 insertions(+), 25 deletions(-)

New commits:
commit 60613727b957715086c1d9bb688e4ce40e978b98
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Jun 10 10:04:15 2022 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Jun 24 13:27:20 2022 +0200

    tdf#149503: Check size of vectors
    
    Crash introduced by 41f95c4a35a6335e9edb2f51c11d136d88bd0749
    "Remove SC_DPOUT_MAXLEVELS limit in Pivot"
    
    This brings back the old behaviour and now the
    "You cannot change this part of the pivot table." message
    is displayed again
    
    Change-Id: Ibad84c0a279d7d67b709b7e311ac875739cdb210
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135578
    Tested-by: Eike Rathke <er...@redhat.com>
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135717
    Tested-by: Jenkins

diff --git a/sc/CppunitTest_sc_uicalc.mk b/sc/CppunitTest_sc_uicalc.mk
index e0df316fe3ab..e3ab3387ddd2 100644
--- a/sc/CppunitTest_sc_uicalc.mk
+++ b/sc/CppunitTest_sc_uicalc.mk
@@ -9,7 +9,10 @@
 
 $(eval $(call gb_CppunitTest_CppunitTest,sc_uicalc))
 
-$(eval $(call gb_CppunitTest_use_external,sc_uicalc,boost_headers))
+$(eval $(call gb_CppunitTest_use_externals,sc_uicalc, \
+       boost_headers \
+       mdds_headers \
+))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sc_uicalc, \
     sc/qa/unit/uicalc/uicalc \
diff --git a/sc/qa/unit/uicalc/data/tdf149503.xls 
b/sc/qa/unit/uicalc/data/tdf149503.xls
new file mode 100644
index 000000000000..88e4fb4ad651
Binary files /dev/null and b/sc/qa/unit/uicalc/data/tdf149503.xls differ
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 9965d5ac6fa9..056a34e9b4e8 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -27,6 +27,7 @@
 #include <document.hxx>
 #include <docuno.hxx>
 #include <docsh.hxx>
+#include <dpobject.hxx>
 #include <drwlayer.hxx>
 #include <inputopt.hxx>
 #include <postit.hxx>
@@ -645,6 +646,26 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf117706)
     CPPUNIT_ASSERT_EQUAL(OUString(""), pDoc->GetString(ScAddress(0, 2, 0)));
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf149503)
+{
+    ScModelObj* pModelObj = createDoc("tdf149503.xls");
+    ScDocument* pDoc = pModelObj->GetDocument();
+    CPPUNIT_ASSERT(pDoc);
+
+    dispatchCommand(mxComponent, ".uno:SelectAll", {});
+    Scheduler::ProcessEventsToIdle();
+
+    dispatchCommand(mxComponent, ".uno:Cut", {});
+    Scheduler::ProcessEventsToIdle();
+
+    // Without the fix in place, this test would have crashed here
+    dispatchCommand(mxComponent, ".uno:Paste", {});
+    Scheduler::ProcessEventsToIdle();
+
+    ScDPCollection* pDPs = pDoc->GetDPCollection();
+    CPPUNIT_ASSERT_EQUAL(size_t(1), pDPs->GetCount());
+}
+
 // Inspired from testTdf117706, test columns instead of rows
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testMultiRangeCol)
 {
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index c15f9b6e848f..06081991050a 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -1331,6 +1331,8 @@ void ScDPOutput::GetPositionData(const ScAddress& rPos, 
DataPilotTablePositionDa
             if (nField < 0)
                 break;
 
+            if (pColFields.size() < o3tl::make_unsigned(nField) + 1 )
+                break;
             const uno::Sequence<sheet::MemberResult> rSequence = 
pColFields[nField].maResult;
             if (!rSequence.hasElements())
                 break;
@@ -1360,6 +1362,8 @@ void ScDPOutput::GetPositionData(const ScAddress& rPos, 
DataPilotTablePositionDa
             if (nField < 0)
                 break;
 
+            if (pRowFields.size() < o3tl::make_unsigned(nField) + 1 )
+                break;
             const uno::Sequence<sheet::MemberResult> rSequence = 
pRowFields[nField].maResult;
             if (!rSequence.hasElements())
                 break;
commit 72d518c67fe6d24295ab3bbaf7593bd26905598e
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Tue May 10 10:54:15 2022 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Jun 24 13:27:12 2022 +0200

    autocorr for da: fx can appear at end of sentence
    
    as in e.g. "Vi kunne jo tage bussen, fx." so remove the "fx." entry from
    the autocorrect list
    
    Change-Id: I5c03f46bd1e35fcf8fa731983c7459f2ba99b174
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134107
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    (cherry picked from commit 3a688ca467cebd65ef30ab80d4211715b1665348)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135706
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/extras/source/autocorr/lang/da/DocumentList.xml 
b/extras/source/autocorr/lang/da/DocumentList.xml
index 258cce958513..6a0e62218edb 100644
--- a/extras/source/autocorr/lang/da/DocumentList.xml
+++ b/extras/source/autocorr/lang/da/DocumentList.xml
@@ -223,7 +223,6 @@
   <block-list:block block-list:abbreviated-name="fungere gerne" 
block-list:name="fungerer gerne"/>
   <block-list:block block-list:abbreviated-name="fungere ikke" 
block-list:name="fungerer ikke"/>
   <block-list:block block-list:abbreviated-name="fungere ofte" 
block-list:name="fungerer ofte"/>
-  <block-list:block block-list:abbreviated-name="fx." block-list:name="fx"/>
   <block-list:block block-list:abbreviated-name="gallionsfigur" 
block-list:name="galionsfigur"/>
   <block-list:block block-list:abbreviated-name="gemmen" 
block-list:name="gennem"/>
   <block-list:block block-list:abbreviated-name="genenm" 
block-list:name="gennem"/>
commit 9036243c6196e89600340c092a3df965a5f1332d
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Jun 11 16:13:45 2022 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Jun 24 13:27:04 2022 +0200

    Related: tdf#149490 OLE Object dialog should be modal
    
    Change-Id: I909f2afbf149c4d92c97e04c2d8f93648e1e3162
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135636
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sw/uiconfig/swriter/ui/objectdialog.ui 
b/sw/uiconfig/swriter/ui/objectdialog.ui
index 5ccda94a41af..203e83fbe65c 100644
--- a/sw/uiconfig/swriter/ui/objectdialog.ui
+++ b/sw/uiconfig/swriter/ui/objectdialog.ui
@@ -8,6 +8,7 @@
     <property name="title" translatable="yes" 
context="objectdialog|ObjectDialog">Object</property>
     <property name="resizable">False</property>
     <property name="type_hint">dialog</property>
+    <property name="modal">True</property>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
         <property name="can_focus">False</property>
commit a5fc80cf2c39226d08f237c5ac02269dba8679b4
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Fri Jun 10 00:33:09 2022 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Jun 24 13:26:52 2022 +0200

    tdf#135346 clear page row map to avoid invalid "hidden" flags
    
    With the print range cache surviving a longer time, we can get to
    a state where we reuse the page row map (m_xPageRows) that had
    older "hidden rows" flags still set, but they aren't valid for
    our new recalculated ranges. The result for this is that in the
    bug document, the print preview is empty (as hidden flags for the
    rows was kept but not valid anymore).
    
    We don't really benefit from keeping this map, so we can just
    clear it when we need to recalculate the print ranges.
    
    Change-Id: I1f8de889d6f006e700c6f21ef5bfa52a36bcdfc9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135567
    Tested-by: Tomaž Vajngerl <qui...@gmail.com>
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    (cherry picked from commit 317dc8569723d434fe4175a2b665b84fd15f6f99)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135540
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 94e674a8fe56..3021bbbd5715 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -3094,6 +3094,10 @@ void PrintPageRanges::calculate(ScDocument& rDoc,
 
     rDoc.SetPageSize(nPrintTab, rDocSize);
 
+    // Clear the map to prevent any outdated values to "survive" when
+    // we have to recalculate the new values anyway
+    m_xPageRows->clear();
+
     // #i123672# use dynamic mem to react on size changes
     if (m_xPageEndX->size() < static_cast<size_t>(rDoc.MaxCol()) + 1)
     {
commit a9c5a92e7832ec0313efce464361402db8355232
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Jun 9 12:46:49 2022 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Jun 24 13:26:46 2022 +0200

    Resolves: tdf#142368 drop popover on ControlLoseFocus
    
    which is what appears when the Control derived inputbar loses focus
    while the main window losing focus gives WindowLoseFocus
    
    Change-Id: Iae9a2874c3dd513a1a092a18846858f819542370
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135534
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index b9401530180c..d1a2fea3d482 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1080,14 +1080,14 @@ void ScInputHandler::GetFormulaData()
 IMPL_LINK( ScInputHandler, ShowHideTipVisibleParentListener, VclWindowEvent&, 
rEvent, void )
 {
     if (rEvent.GetId() == VclEventId::ObjectDying || rEvent.GetId() == 
VclEventId::WindowHide
-        || rEvent.GetId() == VclEventId::WindowLoseFocus)
+        || rEvent.GetId() == VclEventId::WindowLoseFocus || rEvent.GetId() == 
VclEventId::ControlLoseFocus)
         HideTip();
 }
 
 IMPL_LINK( ScInputHandler, ShowHideTipVisibleSecParentListener, 
VclWindowEvent&, rEvent, void )
 {
     if (rEvent.GetId() == VclEventId::ObjectDying || rEvent.GetId() == 
VclEventId::WindowHide
-        || rEvent.GetId() == VclEventId::WindowLoseFocus)
+        || rEvent.GetId() == VclEventId::WindowLoseFocus || rEvent.GetId() == 
VclEventId::ControlLoseFocus)
         HideTipBelow();
 }
 
commit 6389e59794ee681ee4154250b3a0eda48a15c296
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Jun 8 19:44:05 2022 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Jun 24 13:26:41 2022 +0200

    GtkIconView uses a different way to link model and view
    
    Change-Id: I1ad2734c9f28568433de8b9532cf20da8a27f7cb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135391
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/fpicker/uiconfig/ui/explorerfiledialog.ui 
b/fpicker/uiconfig/ui/explorerfiledialog.ui
index 1817d785c814..13fb66fe010f 100644
--- a/fpicker/uiconfig/ui/explorerfiledialog.ui
+++ b/fpicker/uiconfig/ui/explorerfiledialog.ui
@@ -442,18 +442,8 @@
                                     <property name="hexpand">True</property>
                                     <property name="vexpand">True</property>
                                     <property 
name="model">liststore2</property>
-                                    <child>
-                                      <object class="GtkCellRendererPixbuf" 
id="icon"/>
-                                      <attributes>
-                                        <attribute name="pixbuf">0</attribute>
-                                      </attributes>
-                                    </child>
-                                    <child>
-                                      <object class="GtkCellRendererText" 
id="text"/>
-                                      <attributes>
-                                        <attribute name="text">1</attribute>
-                                      </attributes>
-                                    </child>
+                                    <property name="pixbuf-column">0</property>
+                                    <property name="text-column">1</property>
                                   </object>
                                 </child>
                               </object>
commit f19b356bf436dcf33aae415a6b42161e77af56f2
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Sun May 22 12:51:35 2022 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Jun 24 13:26:34 2022 +0200

    vcl: WhitespaceToSpace() spurious -Werror=maybe-uninitialized
    
    vcl/source/helper/strhelper.cxx:366:9: error: ‘pBuffer[-1]’ may be used 
uninitialized [-Werror=maybe-uninitialized]
    
    Change-Id: I37250b0790bd9c33eb01c552c8267251bc0026f0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134738
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    (cherry picked from commit cd4976646dc2e5b28c3328a7fa96361e147b23b9)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134631
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx
index 782c9ce123e1..81648d9a7a43 100644
--- a/vcl/source/helper/strhelper.cxx
+++ b/vcl/source/helper/strhelper.cxx
@@ -360,9 +360,15 @@ OString WhitespaceToSpace(const OString& rLine)
 
     // there might be a space at beginning or end
     pLeap--;
+#if defined(__GNUC__) && __GNUC__ == 12
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
     if( *pLeap == ' ' )
         *pLeap = 0;
-
+#if defined(__GNUC__) && __GNUC__ == 12
+#pragma GCC diagnostic pop
+#endif
     return *pBuffer == ' ' ? pBuffer+1 : pBuffer;
 }
 
commit c643d9913b84bcef13cc4174ada2241b73a54b1f
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Sun Jun 5 08:55:43 2022 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Jun 24 13:26:28 2022 +0200

    tdf#137471 Qt return frame pos + client area size
    
    My code comment about "drawable area" and Michaels bug comment
    12 about the "frameGeometry()" usage were both half right. LO
    expects the window's frame position and the drawable client area
    size almost everywhere when "geometry" is involved. The frame's
    border is stored in the decorations members of SalFrameGeometry.
    
    Change-Id: Ic00ad1f1d74d7afadcaca0c01e1a41ea7f2833de
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135434
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de>
    (cherry picked from commit 3f8d3fd4649ef09e86c735617383a4bda0425540)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135375
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index 8af59966dcd7..6c5f3b7f0002 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -725,8 +725,8 @@ bool QtFrame::GetWindowState(SalFrameState* pState)
     }
     else
     {
-        // geometry() is the drawable area, which is wanted here
-        QRect rect = scaledQRect(asChild()->geometry(), devicePixelRatioF());
+        // we want the frame position and the client area size
+        QRect rect = scaledQRect({ asChild()->pos(), asChild()->size() }, 
devicePixelRatioF());
         pState->mnX = rect.x();
         pState->mnY = rect.y();
         pState->mnWidth = rect.width();
commit 16df0d7f234cafaf1e8fd74d30e78b307ea3dbba
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Jun 1 11:58:32 2022 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Jun 24 13:25:45 2022 +0200

    Related: tdf#149408 various crashes seen in redline panel
    
    with this writer in calc ole case
    
    Change-Id: I1ecd7725703674cc1bcfc9b3d411ec890bfe4bcc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135238
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/source/uibase/misc/redlndlg.cxx 
b/sw/source/uibase/misc/redlndlg.cxx
index b3ca574b492d..e78460dcf410 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -206,7 +206,8 @@ SwRedlineAcceptDlg::~SwRedlineAcceptDlg()
 
 void SwRedlineAcceptDlg::Init(SwRedlineTable::size_type nStart)
 {
-    SwWait aWait( *::GetActiveView()->GetDocShell(), false );
+    SwView *pView = ::GetActiveView();
+    std::unique_ptr<SwWait> xWait(pView ? new SwWait(*pView->GetDocShell(), 
false) : nullptr);
     weld::TreeView& rTreeView = m_pTable->GetWidget();
     m_aUsedSeqNo.clear();
 
@@ -234,18 +235,19 @@ void SwRedlineAcceptDlg::Init(SwRedlineTable::size_type 
nStart)
 
 void SwRedlineAcceptDlg::InitAuthors()
 {
-    SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
-
     if (!m_xTabPagesCTRL)
         return;
 
+    SwView *pView = ::GetActiveView();
+    SwWrtShell* pSh = pView ? pView->GetWrtShellPtr() : nullptr;
+
     SvxTPFilter *pFilterPage = m_xTabPagesCTRL->GetFilterPage();
 
     std::vector<OUString> aStrings;
     OUString sOldAuthor(pFilterPage->GetSelectedAuthor());
     pFilterPage->ClearAuthors();
 
-    SwRedlineTable::size_type nCount = pSh->GetRedlineCount();
+    SwRedlineTable::size_type nCount = pSh ? pSh->GetRedlineCount() : 0;
 
     m_bOnlyFormatedRedlines = true;
     bool bIsNotFormated = false;
@@ -276,7 +278,7 @@ void SwRedlineAcceptDlg::InitAuthors()
         pFilterPage->SelectAuthor(aStrings[0]);
 
     weld::TreeView& rTreeView = m_pTable->GetWidget();
-    bool bEnable = rTreeView.n_children() != 0 && 
!pSh->getIDocumentRedlineAccess().GetRedlinePassword().hasElements();
+    bool bEnable = rTreeView.n_children() != 0 && pSh && 
!pSh->getIDocumentRedlineAccess().GetRedlinePassword().hasElements();
     bool bSel = rTreeView.get_selected(nullptr);
 
     rTreeView.selected_foreach([this, pSh, &bIsNotFormated](weld::TreeIter& 
rEntry){
@@ -705,7 +707,10 @@ void 
SwRedlineAcceptDlg::RemoveParents(SwRedlineTable::size_type nStart, SwRedli
 
 void SwRedlineAcceptDlg::InsertParents(SwRedlineTable::size_type nStart, 
SwRedlineTable::size_type nEnd)
 {
-    SwView *pView   = ::GetActiveView();
+    SwView *pView = ::GetActiveView();
+    if (!pView)
+        return;
+
     SwWrtShell* pSh = pView->GetWrtShellPtr();
     bool bHasRedlineAutoFormat = HasRedlineAutoFormat();
 

Reply via email to