core.git: solenv/sanitizers

2024-06-10 Thread Caolán McNamara (via logerrit)
 solenv/sanitizers/ui/modules/swriter.suppr |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 2b68dadb846dac063421ed975abecafbd120cbac
Author: Caolán McNamara 
AuthorDate: Mon Jun 10 12:37:31 2024 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 10 17:05:14 2024 +0200

drop unused suppressions

Change-Id: Ibaf8856839e134432297b96e1d68f5ecd484335c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168631
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/solenv/sanitizers/ui/modules/swriter.suppr 
b/solenv/sanitizers/ui/modules/swriter.suppr
index 4dd174b17a55..2f1509b69833 100644
--- a/solenv/sanitizers/ui/modules/swriter.suppr
+++ b/solenv/sanitizers/ui/modules/swriter.suppr
@@ -54,7 +54,6 @@ 
sw/uiconfig/swriter/ui/footnotepage.ui://GtkLabel[@id='label17'] orphan-label
 sw/uiconfig/swriter/ui/footnotepage.ui://GtkLabel[@id='label18'] orphan-label
 sw/uiconfig/swriter/ui/footnotepage.ui://GtkRadioButton[@id='pospagecb'] 
labelled-by-and-mnemonic
 sw/uiconfig/swriter/ui/frmaddpage.ui://GtkLabel[@id='label2'] orphan-label
-sw/uiconfig/swriter/ui/gotopagedialog.ui://GtkLabel[@id='page_count'] 
orphan-label
 sw/uiconfig/swriter/ui/hfmenubutton.ui://GtkMenuItem[@id='edit'] 
button-no-label
 sw/uiconfig/swriter/ui/hfmenubutton.ui://GtkMenuItem[@id='delete'] 
button-no-label
 sw/uiconfig/swriter/ui/hfmenubutton.ui://GtkButton[@id='button'] 
button-no-label
@@ -71,7 +70,6 @@ 
sw/uiconfig/swriter/ui/labelformatpage.ui://GtkSpinButton[@id='top'] duplicate-m
 sw/uiconfig/swriter/ui/labelformatpage.ui://GtkDrawingArea[@id='preview'] 
no-labelled-by
 sw/uiconfig/swriter/ui/mergeconnectdialog.ui://GtkLabel[@id='label2'] 
orphan-label
 
sw/uiconfig/swriter/ui/numparapage.ui://GtkCheckButton[@id='checkCB_NUMBER_NEW_START']
 missing-labelled-by
-sw/uiconfig/swriter/ui/optcomparison.ui://GtkSpinButton[@id='ignorelen'] 
no-labelled-by
 sw/uiconfig/swriter/ui/opttablepage.ui://GtkLabel[@id='label10'] orphan-label
 sw/uiconfig/swriter/ui/opttablepage.ui://GtkLabel[@id='label11'] orphan-label
 sw/uiconfig/swriter/ui/opttablepage.ui://GtkLabel[@id='label12'] orphan-label


core.git: cui/uiconfig svx/uiconfig sw/uiconfig

2024-06-10 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/bulletandposition.ui|2 +-
 cui/uiconfig/ui/numberingoptionspage.ui |2 +-
 cui/uiconfig/ui/possizetabpage.ui   |2 +-
 cui/uiconfig/ui/swpossizepage.ui|2 +-
 svx/uiconfig/ui/sidebarpossize.ui   |2 +-
 sw/uiconfig/swriter/ui/frmtypepage.ui   |2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit edf7f296f11d6572c05aec58e6e576bc0811a202
Author: Caolán McNamara 
AuthorDate: Mon Jun 10 12:36:20 2024 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 10 16:55:15 2024 +0200

fix Gtk-WARNING **: Could not load image 'res/unlocked.png'

use icon-name instead of pixbuf

Change-Id: Ibb0a09047ada6ac3301ca0a40dbeb25351c41ed1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168609
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/cui/uiconfig/ui/bulletandposition.ui 
b/cui/uiconfig/ui/bulletandposition.ui
index 79deb396f93e..06be944e4743 100644
--- a/cui/uiconfig/ui/bulletandposition.ui
+++ b/cui/uiconfig/ui/bulletandposition.ui
@@ -723,7 +723,7 @@
 False
 start
 center
-res/unlocked.png
+res/unlocked.png
   
   
 1
diff --git a/cui/uiconfig/ui/numberingoptionspage.ui 
b/cui/uiconfig/ui/numberingoptionspage.ui
index 5e6a112fa484..84da7e34bdcd 100644
--- a/cui/uiconfig/ui/numberingoptionspage.ui
+++ b/cui/uiconfig/ui/numberingoptionspage.ui
@@ -677,7 +677,7 @@
 False
 start
 center
-res/unlocked.png
+res/unlocked.png
   
   
 1
diff --git a/cui/uiconfig/ui/possizetabpage.ui 
b/cui/uiconfig/ui/possizetabpage.ui
index 6aa88b6f51c2..f0f785a97a3c 100644
--- a/cui/uiconfig/ui/possizetabpage.ui
+++ b/cui/uiconfig/ui/possizetabpage.ui
@@ -278,7 +278,7 @@
 False
 start
 center
-res/unlocked.png
+res/unlocked.png
   
   
 1
diff --git a/cui/uiconfig/ui/swpossizepage.ui b/cui/uiconfig/ui/swpossizepage.ui
index df892e6a1794..e95027197e5f 100644
--- a/cui/uiconfig/ui/swpossizepage.ui
+++ b/cui/uiconfig/ui/swpossizepage.ui
@@ -92,7 +92,7 @@
 False
 start
 center
-res/unlocked.png
+res/unlocked.png
   
   
 1
diff --git a/svx/uiconfig/ui/sidebarpossize.ui 
b/svx/uiconfig/ui/sidebarpossize.ui
index cdb71270ccbc..96308b9e8b64 100644
--- a/svx/uiconfig/ui/sidebarpossize.ui
+++ b/svx/uiconfig/ui/sidebarpossize.ui
@@ -616,7 +616,7 @@
 False
 start
 center
-res/unlocked.png
+res/unlocked.png
   
   
 1
diff --git a/sw/uiconfig/swriter/ui/frmtypepage.ui 
b/sw/uiconfig/swriter/ui/frmtypepage.ui
index 04918c04a92f..2d2e85565b14 100644
--- a/sw/uiconfig/swriter/ui/frmtypepage.ui
+++ b/sw/uiconfig/swriter/ui/frmtypepage.ui
@@ -347,7 +347,7 @@
 False
 start
 center
-res/unlocked.png
+res/unlocked.png
 
   
 image


core.git: cui/uiconfig

2024-06-10 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/numberingoptionspage.ui |1 +
 1 file changed, 1 insertion(+)

New commits:
commit d52d82140e14d75487243c8d57dbb88e6a968c59
Author: Caolán McNamara 
AuthorDate: Mon Jun 10 12:40:35 2024 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 10 15:18:38 2024 +0200

fix GLib-GObject-CRITICAL **: invalid cast from 'GtkImage' to 'GtkLabel'

Change-Id: I29024237cc2d92d16433cf432f87e2b42107a487
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168630
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/cui/uiconfig/ui/numberingoptionspage.ui 
b/cui/uiconfig/ui/numberingoptionspage.ui
index e9d57e62e0e0..5e6a112fa484 100644
--- a/cui/uiconfig/ui/numberingoptionspage.ui
+++ b/cui/uiconfig/ui/numberingoptionspage.ui
@@ -359,6 +359,7 @@
 False
 0
 True
+
 
   
 


core.git: sw/qa

2024-06-10 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/crashHyphen.fodt |   31 ++
 sw/qa/extras/layout/layout3.cxx   |6 +
 2 files changed, 37 insertions(+)

New commits:
commit aa6993e35c38c8be81da326ef41afc980ccc3ef3
Author: Caolán McNamara 
AuthorDate: Mon Jun 10 08:55:10 2024 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 10 15:04:33 2024 +0200

add test for hyphenation related crash

of:

commit f050103c3324d878b310f37429ea3580a8230905
Date:   Fri Jun 7 20:14:15 2024 +0100

stale hyphenation data after skipping blanks

Change-Id: I9743d67b49db054968e9f13c5fc6a13136953733
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168606
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/qa/extras/layout/data/crashHyphen.fodt 
b/sw/qa/extras/layout/data/crashHyphen.fodt
new file mode 100644
index ..6cdd2ccc45e6
--- /dev/null
+++ b/sw/qa/extras/layout/data/crashHyphen.fodt
@@ -0,0 +1,31 @@
+
+
+http://openoffice.org/2004/office; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ 
+  
+   true
+  
+ 
+ 
+  
+ 
+ 
+  
+   
+   
+  
+ 
+ 
+  
+   
+  
+ 
+ 
+  
+ 
+ 
+  
+   He heard quiet steps behind; 
+  
+ 
+
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index af480f970164..ab4bb1d52829 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -2843,6 +2843,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf161368)
 assertXPath(pExportDump, 
"//page[1]/body/txt[3]/SwParaPortion/SwLineLayout"_ostr, 1);
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, TestCrashHyphenation)
+{
+//just care it doesn't crash/assert
+createSwDoc("crashHyphen.fodt");
+}
+
 } // end of anonymous namespace
 
 CPPUNIT_PLUGIN_IMPLEMENT();


core.git: linguistic/source

2024-06-10 Thread Caolán McNamara (via logerrit)
 linguistic/source/lngprophelp.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit d25de4a04671c2f380fc86a58259b073c49dfe19
Author: Caolán McNamara 
AuthorDate: Mon Jun 10 08:52:29 2024 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 10 12:04:17 2024 +0200

silence unknown property 'HyphNoLastWord'... etc warnings

warn: linguistic:3688232:3688232:linguistic/source/lngprophelp.cxx:636: 
unknown property 'HyphNoLastWord'
warn: linguistic:3688232:3688232:linguistic/source/lngprophelp.cxx:636: 
unknown property 'HyphKeepType'
warn: linguistic:3688232:3688232:linguistic/source/lngprophelp.cxx:636: 
unknown property 'HyphKeep'
Change-Id: I4f99961e17bd4e0f90925b8530e25729d964d42e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168600
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/linguistic/source/lngprophelp.cxx 
b/linguistic/source/lngprophelp.cxx
index e3d09665625e..ce479ee851d8 100644
--- a/linguistic/source/lngprophelp.cxx
+++ b/linguistic/source/lngprophelp.cxx
@@ -632,6 +632,13 @@ void PropertyHelper_Hyphen::SetTmpPropVals( const 
PropertyValues  )
 pnResVal = 
 else if ( rVal.Name == UPN_HYPH_NO_CAPS )
 pbResVal = 
+else if (rVal.Name == UPN_HYPH_NO_LAST_WORD ||
+ rVal.Name == UPN_HYPH_KEEP ||
+ rVal.Name == UPN_HYPH_KEEP_TYPE)
+{
+// skip these known ones without warnings
+continue;
+}
 
 SAL_WARN_IF( !(pnResVal || pbResVal), "linguistic", "unknown property 
'" << rVal.Name << "'");
 


core.git: Branch 'distro/collabora/co-24.04' - sc/source

2024-06-10 Thread Caolán McNamara (via logerrit)
 sc/source/ui/view/gridwin.cxx |   55 ++
 1 file changed, 29 insertions(+), 26 deletions(-)

New commits:
commit 65fa3d18ce28c609ead1ac81c93d0fbb38ce9658
Author: Caolán McNamara 
AuthorDate: Fri Jun 7 12:11:22 2024 +0100
Commit: Miklos Vajna 
CommitDate: Mon Jun 10 08:10:04 2024 +0200

prep AutoFill menu in kit mode only

Change-Id: Id533d78e1433b616ce661e855dad0d571d24cf8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168533
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index b5cd268e4cc4..85816c5636b9 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2369,32 +2369,35 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& 
rMEvt )
 {
 mrViewData.GetDispatcher().Execute( FID_FILL_AUTO, 
SfxCallMode::SLOT | SfxCallMode::RECORD );
 
-// prepare AutoFill menu items for "Copy Cells" and "Fill Series"
-ScTabViewShell* pViewShell = mrViewData.GetViewShell();
-boost::property_tree::ptree aMenu;
-boost::property_tree::ptree aItemTree;
-
-aItemTree.put("text", "~Copy Cells");
-aItemTree.put("type", "command");
-aItemTree.put("command", ".uno:AutoFill?Copy:bool=true");
-aItemTree.put("enabled", "true");
-aMenu.push_back(std::make_pair("", aItemTree));
-
-aItemTree.put("text", "~Fill Series");
-aItemTree.put("type", "command");
-aItemTree.put("command", ".uno:AutoFill?Copy:bool=false");
-aItemTree.put("enabled", "true");
-aMenu.push_back(std::make_pair("", aItemTree));
-aItemTree.clear();
-
-boost::property_tree::ptree aRoot;
-aRoot.add_child("menu", aMenu);
-
-std::stringstream aStream;
-boost::property_tree::write_json(aStream, aRoot, true);
-
-pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CONTEXT_MENU,
-   OString(aStream.str()));
+if (comphelper::LibreOfficeKit::isActive())
+{
+// prepare AutoFill menu items for "Copy Cells" and "Fill 
Series"
+ScTabViewShell* pViewShell = mrViewData.GetViewShell();
+boost::property_tree::ptree aMenu;
+boost::property_tree::ptree aItemTree;
+
+aItemTree.put("text", "~Copy Cells");
+aItemTree.put("type", "command");
+aItemTree.put("command", ".uno:AutoFill?Copy:bool=true");
+aItemTree.put("enabled", "true");
+aMenu.push_back(std::make_pair("", aItemTree));
+
+aItemTree.put("text", "~Fill Series");
+aItemTree.put("type", "command");
+aItemTree.put("command", ".uno:AutoFill?Copy:bool=false");
+aItemTree.put("enabled", "true");
+aMenu.push_back(std::make_pair("", aItemTree));
+aItemTree.clear();
+
+boost::property_tree::ptree aRoot;
+aRoot.add_child("menu", aMenu);
+
+std::stringstream aStream;
+boost::property_tree::write_json(aStream, aRoot, true);
+
+
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CONTEXT_MENU,
+   OString(aStream.str()));
+}
 }
 }
 else if (mrViewData.GetFillMode() == ScFillMode::MATRIX)


core.git: sc/source

2024-06-09 Thread Caolán McNamara (via logerrit)
 sc/source/core/tool/address.cxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 6cd7d9322e24ffed4dbaa4cd9b09c3c8e65d9128
Author: Caolán McNamara 
AuthorDate: Sat Jun 8 21:00:09 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun Jun 9 15:28:02 2024 +0200

ofz#69444 Integer-overflow

Change-Id: I24d93f4c61256cd0750ab01cf5a8f313e875d35b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168580
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index c419d9f3a312..ffbeb495d4ab 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -147,25 +147,25 @@ static sal_Int64 sal_Unicode_strtol ( const sal_Unicode*  
p, const sal_Unicode**
 else if( *p == '+' )
 p++;
 
-const sal_Int64 cutoff = is_neg ? -(std::numeric_limits::min() 
/ 10)
-: std::numeric_limits::max() / 
10;
-const sal_Int64 cutlim = is_neg ? -(std::numeric_limits::min() 
% 10)
-: std::numeric_limits::max() % 
10;
+const sal_Int64 cutoff = is_neg ? std::numeric_limits::min() / 
10
+: -(std::numeric_limits::max() 
/ 10);
+const int cutlim = is_neg ? -(std::numeric_limits::min() % 10)
+  : std::numeric_limits::max() % 10;
 
 while (rtl::isAsciiDigit( *p ))
 {
 int val = *p - '0';
-if (accum > cutoff || (accum == cutoff && val > cutlim))
+if (accum < cutoff || (accum == cutoff && val > cutlim))
 {
 *pEnd = nullptr;
 return 0;
 }
-accum = accum * 10 + val;
+accum = accum * 10 - val;
 p++;
 }
 
 *pEnd = p;
-return is_neg ? -accum : accum;
+return is_neg ? accum : -accum;
 }
 
 static const sal_Unicode* lcl_eatWhiteSpace( const sal_Unicode* p )


core.git: Branch 'distro/collabora/co-24.04.3' - sw/source

2024-06-09 Thread Caolán McNamara (via logerrit)
 sw/source/core/text/guess.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 3e88fa3cffe7eb5008f9fe7ff8fc9cbf15ce2b97
Author: Caolán McNamara 
AuthorDate: Fri Jun 7 20:14:15 2024 +0100
Commit: Andras Timar 
CommitDate: Sun Jun 9 14:39:39 2024 +0200

stale hyphenation data after skipping blanks

what I see is that after skipping blanks that the m_xHyphWord remains
describing the word at the original m_nBreakStart, but we have changed
that m_nBreakStart and m_nBreakStart is now at the next word, so the
contents of m_xHyphWord bear no relationship to the current break
position.

Change-Id: I07c91495f0cd7ef6d78c0f0d5cef70070ebb6ff2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168564
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index c3a94187a7ea..c199bbfcfa97 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -443,6 +443,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, 
SwTextFormatInfo ,
 {
 m_nCutPos = m_nBreakStart = AdjustCutPos(m_nCutPos, m_nBreakPos, rInf);
 nPorLen = m_nBreakPos - rInf.GetIdx();
+m_xHyphWord = nullptr;
 }
 else
 {


core.git: sc/source

2024-06-08 Thread Caolán McNamara (via logerrit)
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d2eab48f697a1e6097778158f623f11306ac7a3d
Author: Caolán McNamara 
AuthorDate: Sat Jun 8 19:56:21 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat Jun 8 22:01:04 2024 +0200

cid#1603563 Unchecked return value

Change-Id: Ie41d77d8809b28e44b2fa084f2f9e6cdfb6e167f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168579
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx 
b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 64d220619c7f..39998fa7fee6 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -685,7 +685,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, 
const SfxHint& rHint
 {
 uno::Any aOldValue;
 uno::Any aNewValue;
-
comphelper::OCommonAccessibleText::implInitTextChangedEvent(m_strCurCellValue, 
valStr, aOldValue, aNewValue);
+
(void)comphelper::OCommonAccessibleText::implInitTextChangedEvent(m_strCurCellValue,
 valStr, aOldValue, aNewValue);
 AccessibleEventObject aTextChangedEvent;
 aTextChangedEvent.EventId = 
AccessibleEventId::TEXT_CHANGED;
 aTextChangedEvent.OldValue = aOldValue;


core.git: sw/source

2024-06-08 Thread Caolán McNamara (via logerrit)
 sw/source/core/text/guess.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f050103c3324d878b310f37429ea3580a8230905
Author: Caolán McNamara 
AuthorDate: Fri Jun 7 20:14:15 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat Jun 8 20:51:33 2024 +0200

stale hyphenation data after skipping blanks

what I see is that after skipping the blanks that the m_xHyphWord
remains describing the word at the original m_nBreakStart, but we have
changed that m_nBreakStart and in the example I have the m_nBreakStart
is at the next word, so the contents of m_xHyphWord bear no relationship
to the current break position.

Change-Id: I07c91495f0cd7ef6d78c0f0d5cef70070ebb6ff2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168561
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index ad95c41fd39d..c476de7110cc 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -474,6 +474,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, 
SwTextFormatInfo ,
 {
 m_nCutPos = m_nBreakStart = AdjustCutPos(m_nCutPos, m_nBreakPos, rInf);
 nPorLen = m_nBreakPos - rInf.GetIdx();
+m_xHyphWord = nullptr;
 }
 else
 {


core.git: Branch 'distro/collabora/co-24.04' - sw/source

2024-06-08 Thread Caolán McNamara (via logerrit)
 sw/source/core/text/guess.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 12c8d404f47c6fc0c36f4319a68dee5f02d2f8e8
Author: Caolán McNamara 
AuthorDate: Fri Jun 7 20:14:15 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat Jun 8 20:51:10 2024 +0200

stale hyphenation data after skipping blanks

what I see is that after skipping blanks that the m_xHyphWord remains
describing the word at the original m_nBreakStart, but we have changed
that m_nBreakStart and m_nBreakStart is now at the next word, so the
contents of m_xHyphWord bear no relationship to the current break
position.

Change-Id: I07c91495f0cd7ef6d78c0f0d5cef70070ebb6ff2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168564
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index c3a94187a7ea..c199bbfcfa97 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -443,6 +443,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, 
SwTextFormatInfo ,
 {
 m_nCutPos = m_nBreakStart = AdjustCutPos(m_nCutPos, m_nBreakPos, rInf);
 nPorLen = m_nBreakPos - rInf.GetIdx();
+m_xHyphWord = nullptr;
 }
 else
 {


core.git: vcl/unx

2024-06-07 Thread Caolán McNamara (via logerrit)
 vcl/unx/generic/app/salinst.cxx |2 +-
 vcl/unx/gtk3/gtkinst.cxx|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3b71e059c1b3d32110152feeb0c85d51e2775ec7
Author: Caolán McNamara 
AuthorDate: Fri Jun 7 16:36:23 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jun 7 20:29:29 2024 +0200

crash on exit with std::optional created from u"FOO"_ustr

 #0  0x77edaa90 in rtl::str::release<_rtl_uString> 
(pThis=0x7fffd8fa7c00) at sal/rtl/strtmpl.hxx:745
 #1  0x77eeb385 in rtl_uString_release (pThis=0x7fffd8fa7c00) at 
sal/rtl/ustring.cxx:1151
 #2  0x7fffed56d058 in rtl::OUString::~OUString (this=0x7fffef433c28 
::get()::instance+560>) at 
include/rtl/ustring.hxx:546
 #3  0x7fffed6084e9 in 
std::_Optional_payload_base::_M_destroy (this=0x7fffef433c28 
::get()::instance+560>)
 at 
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/optional:287
 #4  0x7fffed608497 in 
std::_Optional_payload_base::_M_reset (this=0x7fffef433c28 
::get()::instance+560>)
 at 
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/optional:318
 #5  0x7fffed608459 in std::_Optional_payload::~_Optional_payload (this=0x7fffef433c28 ::get()::instance+560>)
 at 
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/optional:441
 #6  0x7fffed608435 in std::_Optional_base::~_Optional_base (this=0x7fffef433c28 ::get()::instance+560>)
 at 
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/optional:512
 #7  0x7fffed607885 in std::optional::~optional 
(this=0x7fffef433c28 ::get()::instance+560>)
 at 
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/optional:707
 #8  0x7fffee14d910 in ImplSVAppData::~ImplSVAppData 
(this=0x7fffef433b20 ::get()::instance+296>)
 at vcl/source/app/svdata.cxx:526
 #9  0x7fffee14d480 in ImplSVData::~ImplSVData (this=0x7fffef4339f8 
::get()::instance>) at 
vcl/source/app/svdata.cxx:518
 #10 0x7785ea2d in __cxa_finalize () at /lib64/libc.so.6
 #11 0x7fffed55d287 in __do_global_dtors_aux () at 
instdir/program/libvcllo.so
 #12 0x7fffd0f0 in ??? ()
 #13 0x77fca0f2 in _dl_call_fini (closure_map=0x77657580) at 
dl-call_fini.c:43

presumably since:

commit 40dde4385cd913ac08292ad3be28bf17de9d296c
Date:   Fri May 10 13:19:35 2024 +0200

loplugin:ostr in vcl

Change-Id: Ie7562a933291522a2c458bdca70ca9b0a5f4048c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168560
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index 1b4b90521cc4..a77aca26482d 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -73,7 +73,7 @@ X11SalInstance::X11SalInstance(std::unique_ptr 
pMutex)
 , mpXLib(nullptr)
 {
 ImplSVData* pSVData = ImplGetSVData();
-pSVData->maAppData.mxToolkitName = u"x11"_ustr;
+pSVData->maAppData.mxToolkitName = OUString("x11");
 m_bSupportsOpenGL = true;
 #if HAVE_FEATURE_SKIA
 X11SkiaSalGraphicsImpl::prepareSkia();
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 40da49279579..d354fd4b7bbd 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -247,7 +247,7 @@ void GtkInstance::EnsureInit()
 #ifdef GTK_TOOLKIT_NAME
 pSVData->maAppData.mxToolkitName = OUString(GTK_TOOLKIT_NAME);
 #else
-pSVData->maAppData.mxToolkitName = u"gtk3"_ustr;
+pSVData->maAppData.mxToolkitName = OUString("gtk3");
 #endif
 
 bNeedsInit = false;


core.git: 2 commits - sc/source

2024-06-07 Thread Caolán McNamara (via logerrit)
 sc/source/ui/view/gridwin.cxx |   32 
 1 file changed, 32 insertions(+)

New commits:
commit 4d599b5a9702863be8c5927ab657d4a3805570e7
Author: Caolán McNamara 
AuthorDate: Fri Jun 7 12:11:22 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jun 7 15:55:49 2024 +0200

prep AutoFill menu in kit mode only

Change-Id: Id533d78e1433b616ce661e855dad0d571d24cf8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168524
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index dcc4361a313f..5d298458cb75 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2370,32 +2370,35 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& 
rMEvt )
 {
 mrViewData.GetDispatcher().Execute( FID_FILL_AUTO, 
SfxCallMode::SLOT | SfxCallMode::RECORD );
 
-// prepare AutoFill menu items for "Copy Cells" and "Fill Series"
-ScTabViewShell* pViewShell = mrViewData.GetViewShell();
-boost::property_tree::ptree aMenu;
-boost::property_tree::ptree aItemTree;
-
-aItemTree.put("text", "~Copy Cells");
-aItemTree.put("type", "command");
-aItemTree.put("command", ".uno:AutoFill?Copy:bool=true");
-aItemTree.put("enabled", "true");
-aMenu.push_back(std::make_pair("", aItemTree));
-
-aItemTree.put("text", "~Fill Series");
-aItemTree.put("type", "command");
-aItemTree.put("command", ".uno:AutoFill?Copy:bool=false");
-aItemTree.put("enabled", "true");
-aMenu.push_back(std::make_pair("", aItemTree));
-aItemTree.clear();
-
-boost::property_tree::ptree aRoot;
-aRoot.add_child("menu", aMenu);
-
-std::stringstream aStream;
-boost::property_tree::write_json(aStream, aRoot, true);
-
-pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CONTEXT_MENU,
-   OString(aStream.str()));
+if (comphelper::LibreOfficeKit::isActive())
+{
+// prepare AutoFill menu items for "Copy Cells" and "Fill 
Series"
+ScTabViewShell* pViewShell = mrViewData.GetViewShell();
+boost::property_tree::ptree aMenu;
+boost::property_tree::ptree aItemTree;
+
+aItemTree.put("text", "~Copy Cells");
+aItemTree.put("type", "command");
+aItemTree.put("command", ".uno:AutoFill?Copy:bool=true");
+aItemTree.put("enabled", "true");
+aMenu.push_back(std::make_pair("", aItemTree));
+
+aItemTree.put("text", "~Fill Series");
+aItemTree.put("type", "command");
+aItemTree.put("command", ".uno:AutoFill?Copy:bool=false");
+aItemTree.put("enabled", "true");
+aMenu.push_back(std::make_pair("", aItemTree));
+aItemTree.clear();
+
+boost::property_tree::ptree aRoot;
+aRoot.add_child("menu", aMenu);
+
+std::stringstream aStream;
+boost::property_tree::write_json(aStream, aRoot, true);
+
+
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CONTEXT_MENU,
+   OString(aStream.str()));
+}
 }
 }
 else if (mrViewData.GetFillMode() == ScFillMode::MATRIX)
commit e2128b2ea88460bd33ec9b70974366699ef5ccae
Author: Bayram Çiçek 
AuthorDate: Mon May 27 12:14:56 2024 +0300
Commit: Caolán McNamara 
CommitDate: Fri Jun 7 15:55:42 2024 +0200

add AutoFill menu items - LOK_CALLBACK_CONTEXT_MENU

- added AutoFill menu items "Copy cells" and "Fill series"
- send information with LOK_CALLBACK_CONTEXT_MENU

Signed-off-by: Bayram Çiçek 
Change-Id: I3118f5535f74cfa4ab049e643930df83512b6850
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168086
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit a3f4d31783721f61b8436c5f8032321b4c97de1a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168531
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index d73701241e7c..dcc4361a313f 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/sou

core.git: include/fpicker sfx2/source

2024-06-07 Thread Caolán McNamara (via logerrit)
 include/fpicker/strings.hrc  |   13 +
 sfx2/source/dialog/filedlghelper.cxx |   35 ---
 2 files changed, 29 insertions(+), 19 deletions(-)

New commits:
commit ea2ecd04dd70e228f0ffdc6830b69c837eab8d67
Author: Caolán McNamara 
AuthorDate: Thu Jun 6 20:51:18 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jun 7 10:57:53 2024 +0200

replace fpicker-related Help::GetHelpText with core-side translations

Change-Id: I109554a3282c4c919cfbf859918cf0f9d75cc967
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168509
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/fpicker/strings.hrc b/include/fpicker/strings.hrc
index 5ff2a07a0c0b..004a06a53f5d 100644
--- a/include/fpicker/strings.hrc
+++ b/include/fpicker/strings.hrc
@@ -38,5 +38,18 @@
 #define STR_FILEDLG_TYPENC_("STR_FILEDLG_TYPE", 
"File ~type")
 #define STR_FILEDLG_SAVENC_("STR_FILEDLG_SAVE", 
"Save")
 
+#define STR_FILESAVE_AUTOEXTENSION  
NC_("STR_FILESAVE_AUTOEXTENSION", "Automatically adds the file extension to the 
end of the file name that corresponds to the selected file type.")
+#define STR_FILESAVE_SAVEWITHPASSWORD   
NC_("STR_FILESAVE_SAVEWITHPASSWORD", "Protects the file with a password that 
must be entered before a user can open the file.")
+#define STR_FILESAVE_CUSTOMIZEFILTER
NC_("STR_FILESAVE_CUSTOMIZEFILTER", "Allows you to set the spreadsheet saving 
options for some types of data files.")
+#define STR_FILEOPEN_READONLY   
NC_("STR_FILEOPEN_READONLY", "Opens the file in read-only mode.")
+#define STR_FILEDLG_LINK_CB NC_("STR_FILEDLG_LINK_CB", 
"Inserts the selected graphic file as a link.")
+#define STR_FILEDLG_PREVIEW_CB  
NC_("STR_FILEDLG_PREVIEW_CB", "Displays a preview of the selected graphic 
file.")
+#define STR_FILESAVE_DOPLAY NC_("STR_FILESAVE_DOPLAY", 
"Plays the selected sound file. Click again to stop playing the sound file.")
+#define STR_FILEOPEN_VERSION
NC_("STR_FILEOPEN_VERSION", "If there are multiple versions of the selected 
file, select the version that you want to open.")
+#define STR_FILESAVE_TEMPLATE   
NC_("STR_FILESAVE_TEMPLATE", "Select the paragraph style or outline level that 
you want to use to separate the source document into sub-documents.")
+#define STR_FILEOPEN_IMAGE_TEMPLATE 
NC_("STR_FILEOPEN_IMAGE_TEMPLATE", "Select the frame style for the graphic.")
+#define STR_FILEOPEN_IMAGE_ANCHOR   
NC_("STR_FILEOPEN_IMAGE_ANCHOR", "Select the frame style for the graphic.")
+#define STR_FILESAVE_SELECTION  
NC_("STR_FILESAVE_SELECTION", "Exports only the selected graphic objects in 
%PRODUCTNAME Draw and Impress to another format. If this box is not checked, 
the entire document is exported.")
+
 #endif
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/filedlghelper.cxx 
b/sfx2/source/dialog/filedlghelper.cxx
index 8afdd2f17727..b692a84b2bbf 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -87,6 +87,8 @@
 #include 
 #include "filtergrouping.hxx"
 #include "filedlgimpl.hxx"
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -209,73 +211,68 @@ void FileDialogHelper_Impl::handleDirectoryChanged()
 
 OUString FileDialogHelper_Impl::handleHelpRequested( const FilePickerEvent& 
aEvent )
 {
-//!!! todo: cache the help strings (here or TRA)
+TranslateId aHelpId;
 
-OUString sHelpId;
 // mapping from element id -> help id
 switch ( aEvent.ElementId )
 {
 case ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION :
-sHelpId = HID_FILESAVE_AUTOEXTENSION;
+aHelpId = STR_FILESAVE_AUTOEXTENSION;
 break;
 
 case ExtendedFilePickerElementIds::CHECKBOX_PASSWORD :
-sHelpId = HID_FILESAVE_SAVEWITHPASSWORD;
+aHelpId = STR_FILESAVE_SAVEWITHPASSWORD;
 break;
 
 case ExtendedFilePickerElementIds::CHECKBOX_FILTEROPTIONS :
-sHelpId = HID_FILESAVE_CUSTOMIZEFILTER;
+aHelpId = STR_FILESAVE_CUSTOMIZEFILTER;
 break;
 
 case ExtendedFilePickerElementIds::CHECKBOX_READONLY :
-sHelpId = HID_FILEOPEN_READONLY;
+aHelpId = STR_FILEOPEN_READONLY;
 break;
 
 case ExtendedFilePickerElementIds::CHECKBOX_LINK :
-sHelpId = HID_FILEDLG_LINK_CB;
+aHelpId

core.git: Branch 'distro/collabora/co-23.05' - sc/source

2024-06-07 Thread Caolán McNamara (via logerrit)
 sc/source/ui/dbgui/PivotLayoutDialog.cxx |2 ++
 sc/source/ui/dbgui/consdlg.cxx   |1 +
 sc/source/ui/dbgui/dbnamdlg.cxx  |1 +
 sc/source/ui/dbgui/pvfundlg.cxx  |1 +
 sc/source/ui/inc/PivotLayoutDialog.hxx   |3 +++
 sc/source/ui/inc/consdlg.hxx |1 +
 sc/source/ui/inc/dbnamdlg.hxx|1 +
 sc/source/ui/inc/namedefdlg.hxx  |1 +
 sc/source/ui/inc/namedlg.hxx |2 ++
 sc/source/ui/inc/pvfundlg.hxx|1 +
 sc/source/ui/namedlg/namedefdlg.cxx  |1 +
 sc/source/ui/namedlg/namedlg.cxx |1 +
 12 files changed, 16 insertions(+)

New commits:
commit 1bb08afb7eb25032c8b999a1f014e26c4b330c7f
Author: Caolán McNamara 
AuthorDate: Fri May 31 09:44:11 2024 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jun 7 08:48:09 2024 +0200

partial revert to restore existence of Expander wrappers

partial revert of:

commit 8288d2e3061327fd91e241c0b514cd973e3fcea8
Date:   Mon Nov 21 11:04:53 2022 +0200

loplugin:unusedfields

because the existence of the welded expander wrappers matters
for some of the backends to fully work

Change-Id: Ie75e27329a47f708514466401e24eae6ddcd4c0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168206
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx 
b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index 17165eac6867..8d083cc6a280 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -110,6 +110,8 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
 , mxSourceLabel(mxSourceFrame->weld_label_widget())
 , mxDestFrame(m_xBuilder->weld_frame("frame1"))
 , mxDestLabel(mxDestFrame->weld_label_widget())
+, mxOptions(m_xBuilder->weld_expander("options"))
+, mxMore(m_xBuilder->weld_expander("more"))
 {
 // Source UI
 Link aLink2 = LINK(this, ScPivotLayoutDialog, 
ToggleSource);
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index d0921f3eb96e..1dde53c1866e 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -88,6 +88,7 @@ ScConsolidateDlg::ScConsolidateDlg(SfxBindings* pB, 
SfxChildWindow* pCW, weld::W
 , m_xLbDestArea(m_xBuilder->weld_combo_box("lbdestarea"))
 , m_xEdDestArea(new formula::RefEdit(m_xBuilder->weld_entry("eddestarea")))
 , m_xRbDestArea(new 
formula::RefButton(m_xBuilder->weld_button("rbdestarea")))
+, m_xExpander(m_xBuilder->weld_expander("more"))
 , m_xBtnByRow(m_xBuilder->weld_check_button("byrow"))
 , m_xBtnByCol(m_xBuilder->weld_check_button("bycol"))
 , m_xBtnRefs(m_xBuilder->weld_check_button("refs"))
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index 29f019b7e5db..9224baa43095 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -148,6 +148,7 @@ ScDbNameDlg::ScDbNameDlg(SfxBindings* pB, SfxChildWindow* 
pCW, weld::Window* pPa
 , m_xModifyPB(m_xBuilder->weld_button("modify"))
 , m_xInvalidFT(m_xBuilder->weld_label("invalid"))
 , m_xFrameLabel(m_xAssignFrame->weld_label_widget())
+, m_xExpander(m_xBuilder->weld_expander("more"))
 {
 m_xEdName->set_height_request_by_rows(4);
 m_xEdAssign->SetReferences(this, m_xFrameLabel.get());
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index 7f97e2576795..6b34d8051a57 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -246,6 +246,7 @@ ScDPFunctionDlg::ScDPFunctionDlg(
 , mxLbBaseItem(m_xBuilder->weld_combo_box("baseitem"))
 , mxBtnOk(m_xBuilder->weld_button("ok"))
 , mxBtnCancel(m_xBuilder->weld_button("cancel"))
+, mxExpander(m_xBuilder->weld_expander("expander"))
 , mrLabelVec(rLabelVec)
 , mbEmptyItem(false)
 {
diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx 
b/sc/source/ui/inc/PivotLayoutDialog.hxx
index c07693e3518f..c2923ce34ae2 100644
--- a/sc/source/ui/inc/PivotLayoutDialog.hxx
+++ b/sc/source/ui/inc/PivotLayoutDialog.hxx
@@ -85,6 +85,9 @@ private:
 std::unique_ptr mxDestFrame;
 std::unique_ptr mxDestLabel;
 
+std::unique_ptr mxOptions;
+std::unique_ptr mxMore;
+
 DECL_LINK(CancelClicked, weld::Button&, void);
 DECL_LINK(OKClicked, weld::Button&, void);
 DECL_LINK(GetEditFocusHandler, formula::RefEdit&, void);
diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx
index 07fb1f3ed561..140472cbbaf4 100644
--- a/sc/source/ui/inc/consdlg.hxx
+++ b/sc/source/ui/inc/consdlg.hxx
@@ -66,6 +66,7 @@ private:
 std::unique_ptr m_xEdDestArea;
 std::unique_

core.git: Branch 'distro/collabora/co-24.04' - config_host/config_features.h.in configure.ac vcl/source

2024-06-07 Thread Caolán McNamara (via logerrit)
 config_host/config_features.h.in |6 ++
 configure.ac |   12 +++-
 vcl/source/window/window.cxx |3 +++
 3 files changed, 16 insertions(+), 5 deletions(-)

New commits:
commit cd3a21a57456ffa50f88bf158c6fb2108e8d7fd5
Author: Caolán McNamara 
AuthorDate: Thu Jun 6 12:19:59 2024 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jun 7 08:47:22 2024 +0200

if we don't have local help then Help::GetHelpText will be empty

anyway, so we can skip that work on Window::GetHelpText.

It might even be that by now all the a11y/extended-tips are in the local
.ui files and the whole fallback to local help is redundant and should
be removed. But that's not done here.

Change-Id: I03b759aba6d1619aff37ded6764fbe3b6ded9555
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168447
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins CollaboraOffice 

diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index 0faa67c64dbd..e5de91de72d0 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -137,6 +137,12 @@
  */
 #define HAVE_FEATURE_XMLHELP 0
 
+/* whether we include any local help
+ *
+ * Can be turned off with --without-help or --with-help=online
+ */
+#define HAVE_FEATURE_LOCAL_HELP 0
+
 /*
  * Whether oosplash calls pagein binaries to speed up library loading.
  * Probably not useful nowadays with SSD based systems.
diff --git a/configure.ac b/configure.ac
index 3bf2b187d67b..40bd3f3fedb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5646,7 +5646,7 @@ dnl 
===
 ENABLE_HTMLHELP=
 HELP_OMINDEX_PAGE=
 HELP_ONLINE=
-WITH_HELPPACKS=
+ENABLE_LOCALHELP=
 
 AC_MSG_CHECKING([which help to build])
 if test -n "$with_help" -a "$with_help" != "no"; then
@@ -5655,7 +5655,7 @@ if test -n "$with_help" -a "$with_help" != "no"; then
 case "$with_help" in
 "html")
 ENABLE_HTMLHELP=TRUE
-WITH_HELPPACKS=TRUE
+ENABLE_LOCALHELP=TRUE
 SCPDEFS="$SCPDEFS -DWITH_HELPPACKS"
 AC_MSG_RESULT([HTML (local)])
 ;;
@@ -5665,7 +5665,7 @@ if test -n "$with_help" -a "$with_help" != "no"; then
 AC_MSG_RESULT([HTML (online)])
 ;;
 yes)
-WITH_HELPPACKS=TRUE
+ENABLE_LOCALHELP=TRUE
 SCPDEFS="$SCPDEFS -DWITH_HELPPACKS"
 AC_MSG_RESULT([XML (local)])
 ;;
@@ -5722,7 +5722,7 @@ fi
 
 dnl Test whether to integrate helppacks into the product's installer
 AC_MSG_CHECKING([for helppack integration])
-if test -z "$WITH_HELPPACKS" -o "$with_helppack_integration" = no; then
+if test -z "$ENABLE_LOCALHELP" -o "$with_helppack_integration" = no; then
 AC_MSG_RESULT([no integration])
 else
 SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION"
@@ -5732,7 +5732,9 @@ fi
 AC_SUBST([ENABLE_HTMLHELP])
 AC_SUBST([HELP_OMINDEX_PAGE])
 AC_SUBST([HELP_ONLINE])
-# WITH_HELPPACKS is used only in configure
+if test "$ENABLE_LOCALHELP" = "TRUE" ; then
+AC_DEFINE(HAVE_FEATURE_LOCAL_HELP)
+fi
 
 dnl ===
 dnl Set up a different compiler to produce tools to run on the build
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 11386eaa74c9..0db0e6dae9c0 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -76,6 +76,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -3098,6 +3099,7 @@ const OUString& Window::GetHelpText() const
 
 if ( !mpWindowImpl->maHelpText.getLength() && bStrHelpId )
 {
+#if HAVE_FEATURE_LOCAL_HELP
 if ( !IsDialog() && (mpWindowImpl->mnType != WindowType::TABPAGE) && 
(mpWindowImpl->mnType != WindowType::FLOATINGWINDOW) )
 {
 Help* pHelp = Application::GetHelp();
@@ -3107,6 +3109,7 @@ const OUString& Window::GetHelpText() const
 mpWindowImpl->mbHelpTextDynamic = false;
 }
 }
+#endif
 }
 else if( mpWindowImpl->mbHelpTextDynamic && bStrHelpId )
 {


core.git: cui/source include/sfx2 include/vcl sfx2/source svtools/source vcl/source

2024-06-06 Thread Caolán McNamara (via logerrit)
 cui/source/customize/cfgutil.cxx |2 -
 include/sfx2/sfxhelp.hxx |3 -
 include/vcl/help.hxx |3 -
 sfx2/source/appl/sfxhelp.cxx |   67 ---
 sfx2/source/dialog/filedlghelper.cxx |2 -
 svtools/source/control/tabbar.cxx|2 -
 vcl/source/app/help.cxx  |7 ---
 vcl/source/treelist/headbar.cxx  |2 -
 vcl/source/window/menu.cxx   |4 +-
 vcl/source/window/status.cxx |4 +-
 vcl/source/window/toolbox.cxx|4 +-
 11 files changed, 14 insertions(+), 86 deletions(-)

New commits:
commit 33111d134b0703f682687d144a38acdb48717f3b
Author: Caolán McNamara 
AuthorDate: Thu Jun 6 20:17:47 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jun 6 22:34:57 2024 +0200

the remaining Help::GetHelpText calls don't want their parent as fallback

so we can drop the hierarchical search

these probably do nothing in the absence of the classic help. fpicker
case might benefit from moving some a11y translations out of help into
core.

Change-Id: I01b8d0c7cc1a1b3697d3332e330c6b4654e76af1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168507
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index b6873b014396..8646e5146cc5 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -251,7 +251,7 @@ OUString CuiConfigFunctionListBox::GetCommandHelpText()
 {
 if ( pData->nKind == SfxCfgKind::FUNCTION_SLOT )
 {
-return Application::GetHelp()->GetHelpText(pData->sCommand, 
static_cast(nullptr));
+return Application::GetHelp()->GetHelpText(pData->sCommand);
 }
 else if ( pData->nKind == SfxCfgKind::FUNCTION_SCRIPT )
 {
diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx
index 212188063c53..e9b412fd4ea4 100644
--- a/include/sfx2/sfxhelp.hxx
+++ b/include/sfx2/sfxhelp.hxx
@@ -47,8 +47,7 @@ public:
 SfxHelp();
 virtual ~SfxHelp() override;
 
-virtual OUStringGetHelpText(const OUString&, const vcl::Window* 
pWindow) override;
-virtual OUStringGetHelpText(const OUString&, const weld::Widget* 
pWindow) override;
+virtual OUStringGetHelpText(const OUString&) override;
 
 static OUString CreateHelpURL( const OUString& aCommandURL, const 
OUString& rModuleName );
 static OUString GetDefaultHelpModule();
diff --git a/include/vcl/help.hxx b/include/vcl/help.hxx
index 7dc848a42e0c..b4bacc9a476f 100644
--- a/include/vcl/help.hxx
+++ b/include/vcl/help.hxx
@@ -65,10 +65,9 @@ public:
 
 virtual boolStart(const OUString& rHelpId, weld::Widget* pWidget = 
nullptr);
 virtual voidSearchKeyword( const OUString& rKeyWord );
-virtual OUStringGetHelpText(const OUString& aHelpURL, const 
weld::Widget* pWidget);
 
 virtual boolStart(const OUString& rHelpId, const vcl::Window* 
pWindow);
-virtual OUStringGetHelpText(const OUString& aHelpURL, const 
vcl::Window* pWindow);
+virtual OUStringGetHelpText(const OUString& aHelpURL);
 
 static void EnableContextHelp();
 static void DisableContextHelp();
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index a0babdee399a..f7612c6da0cd 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -580,83 +580,18 @@ static SfxHelpWindow_Impl* impl_createHelp(Reference< 
XFrame2 >& rHelpTask   ,
 return pHelpWindow;
 }
 
-OUString SfxHelp::GetHelpText( const OUString& aCommandURL, const vcl::Window* 
pWindow )
+OUString SfxHelp::GetHelpText(const OUString& aCommandURL)
 {
 OUString sModuleName = GetHelpModuleName_Impl(aCommandURL);
 auto aProperties = 
vcl::CommandInfoProvider::GetCommandProperties(aCommandURL, 
getCurrentModuleIdentifier_Impl());
 OUString sRealCommand = 
vcl::CommandInfoProvider::GetRealCommandForCommand(aProperties);
 OUString sHelpText = SfxHelp_Impl::GetHelpText( sRealCommand.isEmpty() ? 
aCommandURL : sRealCommand, sModuleName );
 
-OUString aNewHelpId;
-
-if (pWindow && sHelpText.isEmpty())
-{
-// no help text found -> try with parent help id.
-vcl::Window* pParent = pWindow->GetParent();
-while ( pParent )
-{
-aNewHelpId = pParent->GetHelpId();
-sHelpText = SfxHelp_Impl::GetHelpText( aNewHelpId, sModuleName );
-if (!sHelpText.isEmpty())
-pParent = nullptr;
-else
-pParent = pParent->GetParent();
-}
-
-if (bIsDebug && sHelpText.isEmpty())
-aNewHelpId.clear();
-}
-
-// add some debug information?
-if ( bIsDebug )
-{
-sHelp

core.git: config_host/config_features.h.in configure.ac vcl/source vcl/unx

2024-06-06 Thread Caolán McNamara (via logerrit)
 config_host/config_features.h.in |6 --
 configure.ac |   12 +---
 vcl/source/window/window.cxx |   24 
 vcl/unx/gtk3/gtkinst.cxx |   13 -
 4 files changed, 9 insertions(+), 46 deletions(-)

New commits:
commit dc346060164e800c7fed7859b17c19ddd2e027c9
Author: Caolán McNamara 
AuthorDate: Thu Jun 6 16:37:49 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jun 6 21:08:42 2024 +0200

drop searching for widget extended tips in the offline help

by now these extended tips for the widgets of the general ui appear in
the .ui file directly instead as accessibility descriptions instead.

In any case, the default build configs of

distro-configs/LibreOfficeLinux.conf
distro-configs/LibreOfficeMacOSX.conf
distro-configs/LibreOfficeWin64.conf

use --with-help=html

where these ahelps are not available. So, existing in the classic help only.

Change-Id: Ie27736e9140e445c7f8986a741c2002f2efa9ccb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168505
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index e5de91de72d0..0faa67c64dbd 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -137,12 +137,6 @@
  */
 #define HAVE_FEATURE_XMLHELP 0
 
-/* whether we include any local help
- *
- * Can be turned off with --without-help or --with-help=online
- */
-#define HAVE_FEATURE_LOCAL_HELP 0
-
 /*
  * Whether oosplash calls pagein binaries to speed up library loading.
  * Probably not useful nowadays with SSD based systems.
diff --git a/configure.ac b/configure.ac
index b221ab89a713..3f9805e4ff82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5711,7 +5711,7 @@ dnl 
===
 ENABLE_HTMLHELP=
 HELP_OMINDEX_PAGE=
 HELP_ONLINE=
-ENABLE_LOCALHELP=
+WITH_HELPPACKS=
 
 AC_MSG_CHECKING([which help to build])
 if test -n "$with_help" -a "$with_help" != "no"; then
@@ -5720,7 +5720,7 @@ if test -n "$with_help" -a "$with_help" != "no"; then
 case "$with_help" in
 "html")
 ENABLE_HTMLHELP=TRUE
-ENABLE_LOCALHELP=TRUE
+WITH_HELPPACKS=TRUE
 SCPDEFS="$SCPDEFS -DWITH_HELPPACKS"
 AC_MSG_RESULT([HTML (local)])
 ;;
@@ -5730,7 +5730,7 @@ if test -n "$with_help" -a "$with_help" != "no"; then
 AC_MSG_RESULT([HTML (online)])
 ;;
 yes)
-ENABLE_LOCALHELP=TRUE
+WITH_HELPPACKS=TRUE
 SCPDEFS="$SCPDEFS -DWITH_HELPPACKS"
 AC_MSG_RESULT([XML (local)])
 ;;
@@ -5787,7 +5787,7 @@ fi
 
 dnl Test whether to integrate helppacks into the product's installer
 AC_MSG_CHECKING([for helppack integration])
-if test -z "$ENABLE_LOCALHELP" -o "$with_helppack_integration" = no; then
+if test -z "$WITH_HELPPACKS" -o "$with_helppack_integration" = no; then
 AC_MSG_RESULT([no integration])
 else
 SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION"
@@ -5797,9 +5797,7 @@ fi
 AC_SUBST([ENABLE_HTMLHELP])
 AC_SUBST([HELP_OMINDEX_PAGE])
 AC_SUBST([HELP_ONLINE])
-if test "$ENABLE_LOCALHELP" = "TRUE" ; then
-AC_DEFINE(HAVE_FEATURE_LOCAL_HELP)
-fi
+# WITH_HELPPACKS is used only in configure
 
 dnl ===
 dnl Set up a different compiler to produce tools to run on the build
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index a58a46f45ec2..d8261ec5acf0 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -26,7 +26,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -76,7 +75,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -3106,29 +3104,15 @@ const Wallpaper& Window::GetDisplayBackground() const
 
 const OUString& Window::GetHelpText() const
 {
-OUString aStrHelpId( GetHelpId() );
-bool bStrHelpId = !aStrHelpId.isEmpty();
+const OUString& rStrHelpId(GetHelpId());
+const bool bStrHelpId = !rStrHelpId.isEmpty();
 
-if ( !mpWindowImpl->maHelpText.getLength() && bStrHelpId )
-{
-#if HAVE_FEATURE_LOCAL_HELP
-if ( !IsDialog() && (mpWindowImpl->mnType != WindowType::TABPAGE) && 
(mpWindowImpl->mnType != WindowType::FLOATINGWINDOW) )
-{
-Help* pHelp = Application::GetHelp();
-if ( pHelp )
-{
-mpWindowImpl->maHelpText = pHelp->GetHelpText(aStrHelpId, 
this);
-mpWindowImpl->mbHelpTextDynamic = false;
-}
-}
-#endif
-}
-else if( mpWindowImpl->mbH

core.git: cui/source

2024-06-06 Thread Caolán McNamara (via logerrit)
 cui/source/customize/cfg.cxx |2 +-
 cui/source/customize/cfgutil.cxx |9 +++--
 cui/source/inc/cfgutil.hxx   |2 +-
 3 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 69ebf09889c551c41aac951d2df97ff0e75d841c
Author: Caolán McNamara 
AuthorDate: Thu Jun 6 17:27:25 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jun 6 21:07:30 2024 +0200

customization entry help never wants to search for parent widget help

it's not a widget context help where help about the parent widget might
help in the case of nothing available for the child widget, but help
for the specific selected command/script

see also: https://bugs.documentfoundation.org/show_bug.cgi?id=116494

Change-Id: Ib4b5650ca00c90b4b4b2a76ef0e3d8a438023327
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168504
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index ca717c2632c7..6907a2dcaaf5 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1649,7 +1649,7 @@ IMPL_LINK_NOARG(SvxConfigPage, SelectFunctionHdl, 
weld::TreeView&, void)
 
 if (SfxHelp::IsHelpInstalled())
 {
-m_xDescriptionField->set_text(m_xFunctions->GetHelpText(false));
+m_xDescriptionField->set_text(m_xFunctions->GetCommandHelpText());
 }
 else
 {
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 1cc1895a490a..b6873b014396 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -244,17 +244,14 @@ std::vector< SfxStyleInfo_Impl > 
SfxStylesInfo_Impl::getStyles(const OUString& s
 return lStyles;
 }
 
-OUString CuiConfigFunctionListBox::GetHelpText( bool bConsiderParent )
+OUString CuiConfigFunctionListBox::GetCommandHelpText()
 {
 SfxGroupInfo_Impl *pData = 
weld::fromId(get_selected_id());
 if (pData)
 {
 if ( pData->nKind == SfxCfgKind::FUNCTION_SLOT )
 {
-if (bConsiderParent)
-return Application::GetHelp()->GetHelpText(pData->sCommand, 
m_xTreeView.get());
-else
-return Application::GetHelp()->GetHelpText(pData->sCommand, 
static_cast(nullptr));
+return Application::GetHelp()->GetHelpText(pData->sCommand, 
static_cast(nullptr));
 }
 else if ( pData->nKind == SfxCfgKind::FUNCTION_SCRIPT )
 {
@@ -1241,7 +1238,7 @@ SvxScriptSelectorDialog::UpdateUI()
 OUString url = GetScriptURL();
 if ( !url.isEmpty() )
 {
-OUString sMessage = m_xCommands->GetHelpText();
+OUString sMessage = m_xCommands->GetCommandHelpText();
 m_xDescriptionText->set_text(sMessage.isEmpty() ? m_sDefaultDesc : 
sMessage);
 m_xOKButton->set_sensitive(true);
 }
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index b1f22e4065b9..96bf9fb65067 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -172,7 +172,7 @@ public:
 
 void  ClearAll();
 OUString  GetSelectedScriptURI() const;
-OUString  GetHelpText( bool bConsiderParent = true );
+OUString  GetCommandHelpText();
 OUString  GetCurCommand() const;
 OUString  GetCurLabel() const;
 


core.git: config_host/config_features.h.in configure.ac vcl/source

2024-06-06 Thread Caolán McNamara (via logerrit)
 config_host/config_features.h.in |6 ++
 configure.ac |   12 +++-
 vcl/source/window/window.cxx |3 +++
 3 files changed, 16 insertions(+), 5 deletions(-)

New commits:
commit 84c75676bfe6f745d5bc70a74f8a7e82778227e2
Author: Caolán McNamara 
AuthorDate: Thu Jun 6 12:19:59 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jun 6 16:25:43 2024 +0200

if we don't have local help then Help::GetHelpText will be empty

anyway, so we can skip that work on Window::GetHelpText.

It might even be that by now all the a11y/extended-tips are in the local
.ui files and the whole fallback to local help is redundant and should
be removed. But that's not done here.

Change-Id: I03b759aba6d1619aff37ded6764fbe3b6ded9555
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168494
Tested-by: Caolán McNamara 
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index 0faa67c64dbd..e5de91de72d0 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -137,6 +137,12 @@
  */
 #define HAVE_FEATURE_XMLHELP 0
 
+/* whether we include any local help
+ *
+ * Can be turned off with --without-help or --with-help=online
+ */
+#define HAVE_FEATURE_LOCAL_HELP 0
+
 /*
  * Whether oosplash calls pagein binaries to speed up library loading.
  * Probably not useful nowadays with SSD based systems.
diff --git a/configure.ac b/configure.ac
index 172417596a84..788939787361 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5711,7 +5711,7 @@ dnl 
===
 ENABLE_HTMLHELP=
 HELP_OMINDEX_PAGE=
 HELP_ONLINE=
-WITH_HELPPACKS=
+ENABLE_LOCALHELP=
 
 AC_MSG_CHECKING([which help to build])
 if test -n "$with_help" -a "$with_help" != "no"; then
@@ -5720,7 +5720,7 @@ if test -n "$with_help" -a "$with_help" != "no"; then
 case "$with_help" in
 "html")
 ENABLE_HTMLHELP=TRUE
-WITH_HELPPACKS=TRUE
+ENABLE_LOCALHELP=TRUE
 SCPDEFS="$SCPDEFS -DWITH_HELPPACKS"
 AC_MSG_RESULT([HTML (local)])
 ;;
@@ -5730,7 +5730,7 @@ if test -n "$with_help" -a "$with_help" != "no"; then
 AC_MSG_RESULT([HTML (online)])
 ;;
 yes)
-WITH_HELPPACKS=TRUE
+ENABLE_LOCALHELP=TRUE
 SCPDEFS="$SCPDEFS -DWITH_HELPPACKS"
 AC_MSG_RESULT([XML (local)])
 ;;
@@ -5787,7 +5787,7 @@ fi
 
 dnl Test whether to integrate helppacks into the product's installer
 AC_MSG_CHECKING([for helppack integration])
-if test -z "$WITH_HELPPACKS" -o "$with_helppack_integration" = no; then
+if test -z "$ENABLE_LOCALHELP" -o "$with_helppack_integration" = no; then
 AC_MSG_RESULT([no integration])
 else
 SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION"
@@ -5797,7 +5797,9 @@ fi
 AC_SUBST([ENABLE_HTMLHELP])
 AC_SUBST([HELP_OMINDEX_PAGE])
 AC_SUBST([HELP_ONLINE])
-# WITH_HELPPACKS is used only in configure
+if test "$ENABLE_LOCALHELP" = "TRUE" ; then
+AC_DEFINE(HAVE_FEATURE_LOCAL_HELP)
+fi
 
 dnl ===
 dnl Set up a different compiler to produce tools to run on the build
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 8411888fe9ee..a58a46f45ec2 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -76,6 +76,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -3110,6 +3111,7 @@ const OUString& Window::GetHelpText() const
 
 if ( !mpWindowImpl->maHelpText.getLength() && bStrHelpId )
 {
+#if HAVE_FEATURE_LOCAL_HELP
 if ( !IsDialog() && (mpWindowImpl->mnType != WindowType::TABPAGE) && 
(mpWindowImpl->mnType != WindowType::FLOATINGWINDOW) )
 {
 Help* pHelp = Application::GetHelp();
@@ -3119,6 +3121,7 @@ const OUString& Window::GetHelpText() const
 mpWindowImpl->mbHelpTextDynamic = false;
 }
 }
+#endif
 }
 else if( mpWindowImpl->mbHelpTextDynamic && bStrHelpId )
 {


core.git: Branch 'libreoffice-24-2' - sd/source

2024-06-06 Thread Caolán McNamara (via logerrit)
 sd/source/ui/animations/CustomAnimationPane.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 3ca2a54eb25bb934f4e5fd5f7ad9097d582ab140
Author: Caolán McNamara 
AuthorDate: Thu Jun 6 09:54:23 2024 +0100
Commit: Xisco Fauli 
CommitDate: Thu Jun 6 15:29:12 2024 +0200

crashreporting: crash in CustomAnimationPane::UpdateAnimationLB

speculative fix

sd/source/ui/animations/CustomAnimationPane.cxx:2189
vcl/source/control/ctrl.cxx:298
sd/source/ui/animations/CustomAnimationPane.cxx:2189
vcl/source/control/listbox.cxx:907
vcl/source/window/paint.cxx:781
vcl/source/control/ctrl.cxx:485
vcl/source/control/listbox.cxx:906
vcl/source/control/listbox.cxx:189
vcl/source/control/imp_listbox.cxx:722
vcl/source/control/imp_listbox.cxx:686
vcl/source/control/imp_listbox.cxx:1133

Change-Id: I707fcbcd8a86ef7cf736b5244d9e4a78fd7b4ef0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168446
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx 
b/sd/source/ui/animations/CustomAnimationPane.cxx
index 7eb623138713..9f07b9744a2a 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -2189,8 +2189,13 @@ IMPL_LINK_NOARG(CustomAnimationPane, SelectionHandler, 
Timer*, void)
 IMPL_LINK_NOARG(CustomAnimationPane, UpdateAnimationLB, weld::ComboBox&, void)
 {
 //FIXME: first effect only? what if there is more?
-CustomAnimationEffectPtr pEffect = maListSelection.front();
-fillAnimationLB( pEffect->hasText() );
+bool bHasText = false;
+if (!maListSelection.empty())
+{
+CustomAnimationEffectPtr pEffect = maListSelection.front();
+bHasText = pEffect && pEffect->hasText();
+}
+fillAnimationLB(bHasText);
 }
 
 IMPL_LINK_NOARG(CustomAnimationPane, DurationModifiedHdl, 
weld::MetricSpinButton&, void)


core.git: sd/source

2024-06-06 Thread Caolán McNamara (via logerrit)
 sd/source/ui/animations/CustomAnimationPane.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 5f20ee5c9b50e1a4596da1eb27994556f32fe622
Author: Caolán McNamara 
AuthorDate: Thu Jun 6 09:54:23 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jun 6 13:25:39 2024 +0200

crashreporting: crash in CustomAnimationPane::UpdateAnimationLB

speculative fix

sd/source/ui/animations/CustomAnimationPane.cxx:2189
vcl/source/control/ctrl.cxx:298
sd/source/ui/animations/CustomAnimationPane.cxx:2189
vcl/source/control/listbox.cxx:907
vcl/source/window/paint.cxx:781
vcl/source/control/ctrl.cxx:485
vcl/source/control/listbox.cxx:906
vcl/source/control/listbox.cxx:189
vcl/source/control/imp_listbox.cxx:722
vcl/source/control/imp_listbox.cxx:686
vcl/source/control/imp_listbox.cxx:1133

Change-Id: I707fcbcd8a86ef7cf736b5244d9e4a78fd7b4ef0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168492
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx 
b/sd/source/ui/animations/CustomAnimationPane.cxx
index 954e7ac2e74e..a6fa4bad98dd 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -2186,8 +2186,13 @@ IMPL_LINK_NOARG(CustomAnimationPane, SelectionHandler, 
Timer*, void)
 IMPL_LINK_NOARG(CustomAnimationPane, UpdateAnimationLB, weld::ComboBox&, void)
 {
 //FIXME: first effect only? what if there is more?
-CustomAnimationEffectPtr pEffect = maListSelection.front();
-fillAnimationLB( pEffect->hasText() );
+bool bHasText = false;
+if (!maListSelection.empty())
+{
+CustomAnimationEffectPtr pEffect = maListSelection.front();
+bHasText = pEffect && pEffect->hasText();
+}
+fillAnimationLB(bHasText);
 }
 
 IMPL_LINK_NOARG(CustomAnimationPane, DurationModifiedHdl, 
weld::MetricSpinButton&, void)


core.git: Branch 'libreoffice-24-2' - include/svl svl/source

2024-06-06 Thread Caolán McNamara (via logerrit)
 include/svl/IndexedStyleSheets.hxx  |3 ++-
 include/svl/style.hxx   |2 +-
 svl/source/items/IndexedStyleSheets.cxx |   16 ++--
 svl/source/items/style.cxx  |6 +++---
 4 files changed, 16 insertions(+), 11 deletions(-)

New commits:
commit 3999f5d12b2964d440a0a193cef76d889a9a0da7
Author: Caolán McNamara 
AuthorDate: Wed Jun 5 16:33:45 2024 +0100
Commit: Noel Grandin 
CommitDate: Thu Jun 6 08:27:07 2024 +0200

Resolves: tdf#161430 reindex the correct style if there are duplicate names

Change-Id: I6d4e96faef3ec6caa038edf7595f91f20d964807
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168436
Reviewed-by: Noel Grandin 
Tested-by: Jenkins

diff --git a/include/svl/IndexedStyleSheets.hxx 
b/include/svl/IndexedStyleSheets.hxx
index c58a4b736703..4904d5346a94 100644
--- a/include/svl/IndexedStyleSheets.hxx
+++ b/include/svl/IndexedStyleSheets.hxx
@@ -144,7 +144,8 @@ public:
 void Clear(StyleSheetDisposer& cleanup);
 
 void Reindex();
-void ReindexOnNameChange(const OUString& rOldName, const OUString& 
rNewName);
+void ReindexOnNameChange(const SfxStyleSheetBase& style, const OUString& 
rOldName,
+ const OUString& rNewName);
 
 /** Warning: counting for n starts at 0, i.e., the 0th style sheet is the 
first that is found. */
 SfxStyleSheetBase* GetNthStyleSheetThatMatchesPredicate(sal_Int32 n,
diff --git a/include/svl/style.hxx b/include/svl/style.hxx
index 87c5563ed547..eeab434dc45b 100644
--- a/include/svl/style.hxx
+++ b/include/svl/style.hxx
@@ -275,7 +275,7 @@ public:
 virtual SfxStyleSheetBase*  Find( const OUString&, SfxStyleFamily eFam, 
SfxStyleSearchBits n=SfxStyleSearchBits::All );
 
 voidReindex();
-voidReindexOnNameChange(const OUString& rOldName, 
const OUString& rNewName);
+voidReindexOnNameChange(const SfxStyleSheetBase& 
style, const OUString& rOldName, const OUString& rNewName);
 /** Add a style sheet.
  * Not an actual public function. Do not call it from non-subclasses.
  */
diff --git a/svl/source/items/IndexedStyleSheets.cxx 
b/svl/source/items/IndexedStyleSheets.cxx
index 3761f0e427ef..90df6beb4fb4 100644
--- a/svl/source/items/IndexedStyleSheets.cxx
+++ b/svl/source/items/IndexedStyleSheets.cxx
@@ -83,14 +83,18 @@ sal_Int32 IndexedStyleSheets::GetNumberOfStyleSheets() const
 }
 
 void
-IndexedStyleSheets::ReindexOnNameChange(const OUString& rOldName, const 
OUString& rNewName)
+IndexedStyleSheets::ReindexOnNameChange(const SfxStyleSheetBase& style, const 
OUString& rOldName, const OUString& rNewName)
 {
-auto it = mPositionsByName.find(rOldName);
-if (it != mPositionsByName.end())
+std::pair range = 
mPositionsByName.equal_range(rOldName);
+for (MapType::const_iterator it = range.first; it != range.second; ++it)
 {
-unsigned nPos = it->second;
-mPositionsByName.erase(it);
-mPositionsByName.insert(std::make_pair(rNewName, nPos));
+if (mStyleSheets[it->second].get() == )
+{
+unsigned nPos = it->second;
+mPositionsByName.erase(it);
+mPositionsByName.insert(std::make_pair(rNewName, nPos));
+break;
+}
 }
 }
 
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index bfdbac6f3f93..916b1621b4f0 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -178,7 +178,7 @@ bool SfxStyleSheetBase::SetName(const OUString& rName, bool 
bReIndexNow)
 aFollow = rName;
 aName = rName;
 if (bReIndexNow)
-m_pPool->ReindexOnNameChange(aOldName, rName);
+m_pPool->ReindexOnNameChange(*this, aOldName, rName);
 
 m_pPool->Broadcast( SfxStyleSheetModifiedHint( aOldName, *this ) );
 return true;
@@ -891,9 +891,9 @@ SfxStyleSheetBasePool::Reindex()
 }
 
 void
-SfxStyleSheetBasePool::ReindexOnNameChange(const OUString& rOldName, const 
OUString& rNewName)
+SfxStyleSheetBasePool::ReindexOnNameChange(const SfxStyleSheetBase& style, 
const OUString& rOldName, const OUString& rNewName)
 {
-pImpl->mxIndexedStyleSheets->ReindexOnNameChange(rOldName, rNewName);
+pImpl->mxIndexedStyleSheets->ReindexOnNameChange(style, rOldName, 
rNewName);
 }
 
 const svl::IndexedStyleSheets&


core.git: include/svl svl/source

2024-06-06 Thread Caolán McNamara (via logerrit)
 include/svl/IndexedStyleSheets.hxx  |3 ++-
 include/svl/style.hxx   |2 +-
 svl/source/items/IndexedStyleSheets.cxx |   16 ++--
 svl/source/items/style.cxx  |6 +++---
 4 files changed, 16 insertions(+), 11 deletions(-)

New commits:
commit 9fa0b6977ba8292bfcc313caf080733090974c3f
Author: Caolán McNamara 
AuthorDate: Wed Jun 5 16:33:45 2024 +0100
Commit: Noel Grandin 
CommitDate: Thu Jun 6 08:26:42 2024 +0200

Resolves: tdf#161430 reindex the correct style if there are duplicate names

Change-Id: I6d4e96faef3ec6caa038edf7595f91f20d964807
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168479
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/svl/IndexedStyleSheets.hxx 
b/include/svl/IndexedStyleSheets.hxx
index 685b958fa632..1934bc10af89 100644
--- a/include/svl/IndexedStyleSheets.hxx
+++ b/include/svl/IndexedStyleSheets.hxx
@@ -145,7 +145,8 @@ public:
 void Clear(StyleSheetDisposer& cleanup);
 
 void Reindex();
-void ReindexOnNameChange(const OUString& rOldName, const OUString& 
rNewName);
+void ReindexOnNameChange(const SfxStyleSheetBase& style, const OUString& 
rOldName,
+ const OUString& rNewName);
 
 /** Warning: counting for n starts at 0, i.e., the 0th style sheet is the 
first that is found. */
 SfxStyleSheetBase* GetNthStyleSheetThatMatchesPredicate(sal_Int32 n,
diff --git a/include/svl/style.hxx b/include/svl/style.hxx
index 018da0a04e67..522ef2437c60 100644
--- a/include/svl/style.hxx
+++ b/include/svl/style.hxx
@@ -275,7 +275,7 @@ public:
 virtual SfxStyleSheetBase*  Find( const OUString&, SfxStyleFamily eFam, 
SfxStyleSearchBits n=SfxStyleSearchBits::All );
 
 voidReindex();
-voidReindexOnNameChange(const OUString& rOldName, 
const OUString& rNewName);
+voidReindexOnNameChange(const SfxStyleSheetBase& 
style, const OUString& rOldName, const OUString& rNewName);
 /** Add a style sheet.
  * Not an actual public function. Do not call it from non-subclasses.
  */
diff --git a/svl/source/items/IndexedStyleSheets.cxx 
b/svl/source/items/IndexedStyleSheets.cxx
index adce9bf1dca2..0db2f201f35f 100644
--- a/svl/source/items/IndexedStyleSheets.cxx
+++ b/svl/source/items/IndexedStyleSheets.cxx
@@ -69,14 +69,18 @@ IndexedStyleSheets::Reindex()
 }
 
 void
-IndexedStyleSheets::ReindexOnNameChange(const OUString& rOldName, const 
OUString& rNewName)
+IndexedStyleSheets::ReindexOnNameChange(const SfxStyleSheetBase& style, const 
OUString& rOldName, const OUString& rNewName)
 {
-auto it = mPositionsByName.find(rOldName);
-if (it != mPositionsByName.end())
+std::pair range = 
mPositionsByName.equal_range(rOldName);
+for (MapType::const_iterator it = range.first; it != range.second; ++it)
 {
-unsigned nPos = it->second;
-mPositionsByName.erase(it);
-mPositionsByName.insert(std::make_pair(rNewName, nPos));
+if (mStyleSheets[it->second].get() == )
+{
+unsigned nPos = it->second;
+mPositionsByName.erase(it);
+mPositionsByName.insert(std::make_pair(rNewName, nPos));
+break;
+}
 }
 }
 
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index a43e326ad877..3827b7cb0e7d 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -178,7 +178,7 @@ bool SfxStyleSheetBase::SetName(const OUString& rName, bool 
bReIndexNow)
 aFollow = rName;
 aName = rName;
 if (bReIndexNow)
-m_pPool->ReindexOnNameChange(aOldName, rName);
+m_pPool->ReindexOnNameChange(*this, aOldName, rName);
 
 m_pPool->Broadcast( SfxStyleSheetModifiedHint( aOldName, *this ) );
 return true;
@@ -890,9 +890,9 @@ SfxStyleSheetBasePool::Reindex()
 }
 
 void
-SfxStyleSheetBasePool::ReindexOnNameChange(const OUString& rOldName, const 
OUString& rNewName)
+SfxStyleSheetBasePool::ReindexOnNameChange(const SfxStyleSheetBase& style, 
const OUString& rOldName, const OUString& rNewName)
 {
-pImpl->mxIndexedStyleSheets->ReindexOnNameChange(rOldName, rNewName);
+pImpl->mxIndexedStyleSheets->ReindexOnNameChange(style, rOldName, 
rNewName);
 }
 
 const svl::IndexedStyleSheets&


core.git: include/svx svl/source svx/source

2024-06-05 Thread Caolán McNamara (via logerrit)
 include/svx/xflboxy.hxx   |8 
 svl/source/items/poolitem.cxx |4 ++--
 svx/source/xoutdev/xattr2.cxx |   10 --
 3 files changed, 10 insertions(+), 12 deletions(-)

New commits:
commit 367ba88092fbc0ba06a7f77157cd012ff0fe3caf
Author: Caolán McNamara 
AuthorDate: Tue Jun 4 09:48:57 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 5 16:56:55 2024 +0200

Related: tdf#153008 bump XFillBmpPosOffsetXItem to sal_Int32

and XFillBmpPosOffsetYItem. To avoid sal_uInt16 overflows on large input
values.

Lets use sal_Int32 instead of sal_uInt32 given the amount of existing
casting to sal_Int32 of XFillBmpPosOffset[X|Y]Item::GetValue()

Change-Id: I8329c11b75c9ad01011e10130257963737ffe553
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168398
Reviewed-by: Caolán McNamara 
Reviewed-by: Attila Szűcs 
Tested-by: Jenkins

diff --git a/include/svx/xflboxy.hxx b/include/svx/xflboxy.hxx
index 54d354b52268..acc8fb7fdea7 100644
--- a/include/svx/xflboxy.hxx
+++ b/include/svx/xflboxy.hxx
@@ -23,10 +23,10 @@
 #include 
 #include 
 
-class SVXCORE_DLLPUBLIC XFillBmpPosOffsetXItem final : public SfxUInt16Item
+class SVXCORE_DLLPUBLIC XFillBmpPosOffsetXItem final : public SfxInt32Item
 {
 public:
-XFillBmpPosOffsetXItem( sal_uInt16 nOffPosX = 0 );
+XFillBmpPosOffsetXItem( sal_Int32 nOffPosX = 0 );
 
 SVX_DLLPRIVATE virtual XFillBmpPosOffsetXItem* Clone( SfxItemPool* pPool = 
nullptr ) const override;
 
@@ -36,10 +36,10 @@ public:
  OUString , const 
IntlWrapper& ) const override;
 };
 
-class SVXCORE_DLLPUBLIC XFillBmpPosOffsetYItem final : public SfxUInt16Item
+class SVXCORE_DLLPUBLIC XFillBmpPosOffsetYItem final : public SfxInt32Item
 {
 public:
-XFillBmpPosOffsetYItem( sal_uInt16 nOffPosY = 0 );
+XFillBmpPosOffsetYItem( sal_Int32 nOffPosY = 0 );
 
 SVX_DLLPRIVATE virtual XFillBmpPosOffsetYItem* Clone( SfxItemPool* pPool = 
nullptr ) const override;
 
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index de207ef9db25..bd4b62cb1419 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -161,8 +161,8 @@
 //class Svx3DShadeModeItem : public SfxUInt16Item
 //class SdrEdgeLineDeltaCountItem: public SfxUInt16Item
 //class SvxViewLayoutItem: public SfxUInt16Item
-//class XFillBmpPosOffsetXItem : public SfxUInt16Item
-//class XFillBmpPosOffsetYItem : public SfxUInt16Item
+//class XFillBmpPosOffsetXItem : public SfxInt32Item
+//class XFillBmpPosOffsetYItem : public SfxInt32Item
 //class XFillBmpTileOffsetXItem : public SfxUInt16Item
 //class XFillBmpTileOffsetYItem : public SfxUInt16Item
 //class XFillTransparenceItem: public SfxUInt16Item
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index ad1b3b2959e5..7e82a1f0b950 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -631,9 +631,8 @@ void XFillBmpStretchItem::dumpAsXml(xmlTextWriterPtr 
pWriter) const
 (void)xmlTextWriterEndElement(pWriter);
 }
 
-
-XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem( sal_uInt16 nOffPosX ) :
-SfxUInt16Item( XATTR_FILLBMP_POSOFFSETX, nOffPosX )
+XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem(sal_Int32 nOffPosX)
+: SfxInt32Item(XATTR_FILLBMP_POSOFFSETX, nOffPosX)
 {
 }
 
@@ -654,9 +653,8 @@ bool XFillBmpPosOffsetXItem::GetPresentation
 return true;
 }
 
-
-XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem( sal_uInt16 nOffPosY ) :
-SfxUInt16Item( XATTR_FILLBMP_POSOFFSETY, nOffPosY )
+XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem(sal_Int32 nOffPosY)
+: SfxInt32Item(XATTR_FILLBMP_POSOFFSETY, nOffPosY)
 {
 }
 


core.git: sc/source

2024-06-05 Thread Caolán McNamara (via logerrit)
 sc/source/filter/excel/xeformula.cxx |   39 --
 sc/source/filter/excel/xelink.cxx|   60 ++-
 2 files changed, 47 insertions(+), 52 deletions(-)

New commits:
commit 243e811abc441ec7f55e1395f23343dfa6f7c812
Author: Caolán McNamara 
AuthorDate: Wed Jun 5 10:14:49 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 5 13:40:42 2024 +0200

cid#1603200 Uninitialized scalar variable

cid#1603199 Uninitialized scalar variable

and other fixups for:

commit fbe8071e4f6be57d3e372d69a4c7cc4d37a83eb9
Date:   Sat Oct 15 14:20:31 2022 +0200

refactor functions: return optional instead of bool

Change-Id: I192017d0fc710ada7686e4c6dd313727b02f3889
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168453
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/filter/excel/xeformula.cxx 
b/sc/source/filter/excel/xeformula.cxx
index 688a9f147217..16bd88715d54 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -452,6 +452,13 @@ private:
 voidAppendExt( double fData );
 voidAppendExt( const OUString& rString );
 
+std::optional> InsertDde(const OUString& 
rApplic, const OUString& rTopic, const OUString& rItem)
+{
+if (!mxData->mpLinkMgr)
+return {};
+return mxData->mpLinkMgr->InsertDde(rApplic, rTopic, rItem);
+}
+
 private:
 typedef std::map< XclFormulaType, XclExpCompConfig >  XclExpCompConfigMap;
 typedef std::shared_ptr< XclExpCompData > XclExpCompDataRef;
@@ -1292,16 +1299,13 @@ void XclExpFmlaCompImpl::ProcessDdeLink( const 
XclExpScToken& rTokData )
 if( mxData->mbOk ) mxData->mbOk = !aApplic.isEmpty() && !aTopic.isEmpty() 
&& !aItem.isEmpty();
 if( mxData->mbOk )
 {
-if ( mxData->mpLinkMgr )
-{
-const auto oResult = mxData->mpLinkMgr->InsertDde( aApplic, 
aTopic, aItem);
+const auto oResult = InsertDde(aApplic, aTopic, aItem);
 
-if ( oResult ) {
-AppendNameXToken( oResult->first, oResult->second, 
rTokData.mnSpaces );
-}
-else {
-AppendErrorToken( EXC_ERR_NA, rTokData.mnSpaces );
-}
+if ( oResult ) {
+AppendNameXToken( oResult->first, oResult->second, 
rTokData.mnSpaces );
+}
+else {
+AppendErrorToken( EXC_ERR_NA, rTokData.mnSpaces );
 }
 }
 }
@@ -2438,9 +2442,11 @@ void XclExpFmlaCompImpl::AppendAddInCallToken( const 
XclExpExtFuncData& rExtFunc
 if( mxData->mpLinkMgr && ScGlobal::GetAddInCollection()->GetExcelName( 
rExtFuncData.maFuncName, GetUILanguage(), aXclFuncName ) )
 {
 const auto oResult = mxData->mpLinkMgr->InsertAddIn( aXclFuncName );
-AppendNameXToken(oResult->first, oResult->second);
-return;
-
+if (oResult)
+{
+AppendNameXToken(oResult->first, oResult->second);
+return;
+}
 }
 AppendMacroCallToken( rExtFuncData );
 }
@@ -2450,14 +2456,13 @@ void XclExpFmlaCompImpl::AppendEuroToolCallToken( const 
XclExpExtFuncData& rExtF
 if ( mxData->mpLinkMgr )
 {
 const auto oResult = mxData->mpLinkMgr->InsertEuroTool( 
rExtFuncData.maFuncName );
-
-if ( oResult ) {
+if ( oResult )
+{
 AppendNameXToken( oResult->first, oResult->second );
-}
-else {
-AppendMacroCallToken( rExtFuncData );
+return;
 }
 }
+AppendMacroCallToken( rExtFuncData );
 }
 
 void XclExpFmlaCompImpl::AppendOperatorTokenId( sal_uInt8 nTokenId, const 
XclExpOperandListRef& rxOperands, sal_uInt8 nSpaces )
diff --git a/sc/source/filter/excel/xelink.cxx 
b/sc/source/filter/excel/xelink.cxx
index dff69ed799ab..47217e2d775c 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1989,18 +1989,17 @@ std::optional> 
XclExpSupbookBuffer::InsertEuro
 {
 XclExpSupbookRef xSupbook;
 OUString aUrl( u"EUROTOOL.XLA"_ustr );
-const auto& nSupbookId = GetSupbookUrl(xSupbook, aUrl);
-sal_uInt16 nSupbook;
-if( !nSupbookId )
+auto nSupbookId = GetSupbookUrl(xSupbook, aUrl);
+if (!nSupbookId)
 {
 xSupbook = new XclExpSupbook( GetRoot(), aUrl, 
XclSupbookType::Eurotool );
-nSupbook = Append( xSupbook );
+nSupbookId = Append(xSupbook);
 }
 
 auto nExtName = xSupbook->InsertEuroTool( rName );
 if( nExtName > 0)
 {
-return std::make_pair(nSupbook, nExtName);
+return std::make_pair(*nSupbookId, nExtName);
 }
 return {};
 }
@@ -2010,16 +2009,15 @@ std::optional> 
XclExpS

core.git: Branch 'distro/collabora/co-24.04' - sc/source

2024-06-04 Thread Caolán McNamara (via logerrit)
 sc/source/ui/dbgui/PivotLayoutDialog.cxx |2 ++
 sc/source/ui/dbgui/consdlg.cxx   |1 +
 sc/source/ui/dbgui/dbnamdlg.cxx  |1 +
 sc/source/ui/dbgui/pvfundlg.cxx  |1 +
 sc/source/ui/inc/PivotLayoutDialog.hxx   |3 +++
 sc/source/ui/inc/consdlg.hxx |1 +
 sc/source/ui/inc/dbnamdlg.hxx|1 +
 sc/source/ui/inc/namedefdlg.hxx  |1 +
 sc/source/ui/inc/namedlg.hxx |2 ++
 sc/source/ui/inc/pvfundlg.hxx|1 +
 sc/source/ui/namedlg/namedefdlg.cxx  |1 +
 sc/source/ui/namedlg/namedlg.cxx |1 +
 12 files changed, 16 insertions(+)

New commits:
commit 71c8a9bc54fc4af52d1cae532fd5c29eea2f009e
Author: Caolán McNamara 
AuthorDate: Fri May 31 09:44:11 2024 +0100
Commit: Miklos Vajna 
CommitDate: Tue Jun 4 09:39:32 2024 +0200

partial revert to restore existence of Expander wrappers

partial revert of:

commit 8288d2e3061327fd91e241c0b514cd973e3fcea8
Date:   Mon Nov 21 11:04:53 2022 +0200

loplugin:unusedfields

because the existence of the welded expander wrappers matters
for some of the backends to fully work

Change-Id: Ie75e27329a47f708514466401e24eae6ddcd4c0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168284
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx 
b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index de1f6b3b6f8e..c39db03bea89 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -110,6 +110,8 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
 , mxSourceLabel(mxSourceFrame->weld_label_widget())
 , mxDestFrame(m_xBuilder->weld_frame("frame1"))
 , mxDestLabel(mxDestFrame->weld_label_widget())
+, mxOptions(m_xBuilder->weld_expander("options"))
+, mxMore(m_xBuilder->weld_expander("more"))
 {
 // Source UI
 Link aLink2 = LINK(this, ScPivotLayoutDialog, 
ToggleSource);
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index d0921f3eb96e..1dde53c1866e 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -88,6 +88,7 @@ ScConsolidateDlg::ScConsolidateDlg(SfxBindings* pB, 
SfxChildWindow* pCW, weld::W
 , m_xLbDestArea(m_xBuilder->weld_combo_box("lbdestarea"))
 , m_xEdDestArea(new formula::RefEdit(m_xBuilder->weld_entry("eddestarea")))
 , m_xRbDestArea(new 
formula::RefButton(m_xBuilder->weld_button("rbdestarea")))
+, m_xExpander(m_xBuilder->weld_expander("more"))
 , m_xBtnByRow(m_xBuilder->weld_check_button("byrow"))
 , m_xBtnByCol(m_xBuilder->weld_check_button("bycol"))
 , m_xBtnRefs(m_xBuilder->weld_check_button("refs"))
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index 68543eb6ce44..89767bad7f9a 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -148,6 +148,7 @@ ScDbNameDlg::ScDbNameDlg(SfxBindings* pB, SfxChildWindow* 
pCW, weld::Window* pPa
 , m_xModifyPB(m_xBuilder->weld_button("modify"))
 , m_xInvalidFT(m_xBuilder->weld_label("invalid"))
 , m_xFrameLabel(m_xAssignFrame->weld_label_widget())
+, m_xExpander(m_xBuilder->weld_expander("more"))
 {
 m_xEdName->set_height_request_by_rows(4);
 m_xEdAssign->SetReferences(this, m_xFrameLabel.get());
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index 7f97e2576795..6b34d8051a57 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -246,6 +246,7 @@ ScDPFunctionDlg::ScDPFunctionDlg(
 , mxLbBaseItem(m_xBuilder->weld_combo_box("baseitem"))
 , mxBtnOk(m_xBuilder->weld_button("ok"))
 , mxBtnCancel(m_xBuilder->weld_button("cancel"))
+, mxExpander(m_xBuilder->weld_expander("expander"))
 , mrLabelVec(rLabelVec)
 , mbEmptyItem(false)
 {
diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx 
b/sc/source/ui/inc/PivotLayoutDialog.hxx
index c07693e3518f..c2923ce34ae2 100644
--- a/sc/source/ui/inc/PivotLayoutDialog.hxx
+++ b/sc/source/ui/inc/PivotLayoutDialog.hxx
@@ -85,6 +85,9 @@ private:
 std::unique_ptr mxDestFrame;
 std::unique_ptr mxDestLabel;
 
+std::unique_ptr mxOptions;
+std::unique_ptr mxMore;
+
 DECL_LINK(CancelClicked, weld::Button&, void);
 DECL_LINK(OKClicked, weld::Button&, void);
 DECL_LINK(GetEditFocusHandler, formula::RefEdit&, void);
diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx
index 07fb1f3ed561..140472cbbaf4 100644
--- a/sc/source/ui/inc/consdlg.hxx
+++ b/sc/source/ui/inc/consdlg.hxx
@@ -66,6 +66,7 @@ private:
 std::unique_ptr m_xEdDestArea;
 std::unique_

core.git: Branch 'libreoffice-24-2' - svtools/source

2024-06-04 Thread Caolán McNamara (via logerrit)
 svtools/source/control/scrolladaptor.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 8ab82a987cbc508f515806a56956024c7bdf38b4
Author: Caolán McNamara 
AuthorDate: Mon Jun 3 21:30:52 2024 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jun 4 09:36:57 2024 +0200

tdf#160844 we don't want scrollbars to be a target for Ctrl+F6, etc

Change-Id: Ie24c10fa16889a70717cbee15aef38a20308934d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168321
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/svtools/source/control/scrolladaptor.cxx 
b/svtools/source/control/scrolladaptor.cxx
index 8c2725c1715d..56628df17070 100644
--- a/svtools/source/control/scrolladaptor.cxx
+++ b/svtools/source/control/scrolladaptor.cxx
@@ -25,6 +25,8 @@ ScrollAdaptor::ScrollAdaptor(vcl::Window* pWin, bool bHoriz)
   m_xBuilder->weld_scrollbar(bHoriz ? OUString("horizontal") : 
OUString("vertical")))
 , m_bHori(bHoriz)
 {
+// tdf#160844 we don't want scrollbars to be a default target for Ctrl+F6, 
etc
+SetStyle(GetStyle() & ~WB_TABSTOP);
 m_xScrollBar->show();
 SetSizePixel(GetOptimalSize());
 }


core.git: svtools/source

2024-06-03 Thread Caolán McNamara (via logerrit)
 svtools/source/control/scrolladaptor.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 8501cb20627e5bc36d760b53b0990f4105c4ff65
Author: Caolán McNamara 
AuthorDate: Mon Jun 3 21:30:52 2024 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jun 4 00:43:18 2024 +0200

tdf#160844 we don't want scrollbars to be a target for Ctrl+F6, etc

Change-Id: Ie24c10fa16889a70717cbee15aef38a20308934d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168390
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/svtools/source/control/scrolladaptor.cxx 
b/svtools/source/control/scrolladaptor.cxx
index 98c4fe7d672c..290468254149 100644
--- a/svtools/source/control/scrolladaptor.cxx
+++ b/svtools/source/control/scrolladaptor.cxx
@@ -24,6 +24,8 @@ ScrollAdaptor::ScrollAdaptor(vcl::Window* pWin, bool bHoriz)
 , m_xScrollBar(m_xBuilder->weld_scrollbar(bHoriz ? u"horizontal"_ustr : 
u"vertical"_ustr))
 , m_bHori(bHoriz)
 {
+// tdf#160844 we don't want scrollbars to be a default target for Ctrl+F6, 
etc
+SetStyle(GetStyle() & ~WB_TABSTOP);
 m_xScrollBar->show();
 SetSizePixel(GetOptimalSize());
 }


core.git: 2 commits - sc/source sw/source

2024-06-03 Thread Caolán McNamara (via logerrit)
 sc/source/ui/navipi/content.cxx |2 +-
 sw/source/core/doc/docsort.cxx  |   21 +++--
 2 files changed, 12 insertions(+), 11 deletions(-)

New commits:
commit 2c0157fbe9b9338f98e66d300664fe3c710eb415
Author: Caolán McNamara 
AuthorDate: Mon Jun 3 20:09:16 2024 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 3 22:44:16 2024 +0200

cid#1602449 Resource leak

Change-Id: Ide5575adb3346a0ad36a484078dc02ef46a4c043
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168389
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index df5aaf6e5c89..8f5e70d5110d 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -313,7 +313,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const 
SwSortOptions& rOpt)
 }
 
 std::optional pRedlPam;
-SwUndoRedlineSort* pRedlUndo = nullptr;
+std::unique_ptr xRedlUndo;
 SwUndoSort* pUndoSort = nullptr;
 
 // To-Do - add 'SwExtraRedlineTable' also ?
@@ -328,7 +328,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const 
SwSortOptions& rOpt)
 {
 if( bUndo )
 {
-pRedlUndo = new SwUndoRedlineSort( *pRedlPam,rOpt );
+xRedlUndo.reset(new SwUndoRedlineSort(*pRedlPam, rOpt));
 GetIDocumentUndoRedo().DoUndo(false);
 }
 // First copy the range
@@ -356,8 +356,8 @@ bool SwDoc::SortText(const SwPaM& rPaM, const 
SwSortOptions& rOpt)
 if (pCNd)
 pRedlPam->GetPoint()->SetContent( nCLen );
 
-if( pRedlUndo )
-pRedlUndo->SetValues( rPaM );
+if (xRedlUndo)
+xRedlUndo->SetValues(rPaM);
 }
 else
 {
@@ -380,7 +380,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const 
SwSortOptions& rOpt)
 SwNodeOffset nBeg = pStart->GetNodeIndex();
 SwNodeRange aRg( aStart, aStart );
 
-if( bUndo && !pRedlUndo )
+if (bUndo && !xRedlUndo)
 {
 pUndoSort = new SwUndoSort(rPaM, rOpt);
 GetIDocumentUndoRedo().AppendUndo(std::unique_ptr(pUndoSort));
@@ -412,12 +412,13 @@ bool SwDoc::SortText(const SwPaM& rPaM, const 
SwSortOptions& rOpt)
 
 if( pRedlPam )
 {
-if( pRedlUndo )
+SwUndoRedlineSort* pRedlUndo = xRedlUndo.get();
+if (pRedlUndo)
 {
-pRedlUndo->SetSaveRange( *pRedlPam );
+xRedlUndo->SetSaveRange(*pRedlPam);
 // UGLY: temp. enable Undo
 GetIDocumentUndoRedo().DoUndo(true);
-GetIDocumentUndoRedo().AppendUndo( 
std::unique_ptr(pRedlUndo) );
+GetIDocumentUndoRedo().AppendUndo(std::move(xRedlUndo));
 GetIDocumentUndoRedo().DoUndo(false);
 }
 
@@ -437,13 +438,13 @@ bool SwDoc::SortText(const SwPaM& rPaM, const 
SwSortOptions& rOpt)
 // the sorted range is inserted
 getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( 
RedlineType::Insert, *pRedlPam ), true);
 
-if( pRedlUndo )
+if (pRedlUndo)
 {
 SwNodeIndex aInsEndIdx( pRedlPam->GetMark()->GetNode(), -1 );
 SwContentNode *const pContentNode = 
aInsEndIdx.GetNode().GetContentNode();
 pRedlPam->GetMark()->Assign( *pContentNode, pContentNode->Len() );
 
-pRedlUndo->SetValues( *pRedlPam );
+pRedlUndo->SetValues(*pRedlPam);
 }
 
 pRedlPam.reset();
commit 16b0ad3cf76d9932ebbd169af64b7ad292e68426
Author: Caolán McNamara 
AuthorDate: Mon Jun 3 20:03:07 2024 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 3 22:44:08 2024 +0200

cid#1459023 Dereference null return value

Change-Id: I3ff5f121a76a30d07a80b46d469b669010318701
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168388
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 0ae1b45de7ee..c0e06a0f2b01 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -386,7 +386,7 @@ IMPL_LINK_NOARG(ScContentTree, ContentDoubleClickHdl, 
weld::TreeView&, bool)
 pParentWindow->SetCurrentCell( aPos.Col(), aPos.Row() );
 // Check whether the comment is currently visible and toggle 
its visibility
 ScDocument* pSrcDoc = GetSourceDocument();
-if (ScPostIt* pNote = pSrcDoc->GetNote(aPos.Col(), aPos.Row(), 
aPos.Tab()))
+if (ScPostIt* pNote = pSrcDoc ? pSrcDoc->GetNote(aPos.Col(), 
aPos.Row(), aPos.Tab()) : nullptr)
 {
 bool bVisible = pNote->IsCaptionShown();
 // Effectivelly set the visibility of the comment


core.git: svx/source

2024-06-03 Thread Caolán McNamara (via logerrit)
 svx/source/fmcomp/gridctrl.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 6f2b5043613bea755f01b413fd86ece0b3a29e5d
Author: Caolán McNamara 
AuthorDate: Mon Jun 3 17:22:21 2024 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 3 22:43:45 2024 +0200

crashtesting: BrowseBox::GetControlArea crash

see with forums/ods/forum-en-11050.ods

Change-Id: I2b1dadf51ab8efa1b66f5b7463b05ad4dc52f91d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168386
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index faedec67aa66..b6fb24d05df7 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -817,11 +817,15 @@ void DbGridControl::dispose()
 
 m_aBar.disposeAndClear();
 
+m_aRearrangeIdle.Stop();
+
 EditBrowseBox::dispose();
 }
 
 void DbGridControl::RearrangeAtIdle()
 {
+if (isDisposed())
+return;
 m_aRearrangeIdle.Start();
 }
 
@@ -2642,6 +2646,9 @@ IMPL_LINK_NOARG(DbGridControl, OnDelete, void*, void)
 
 IMPL_LINK_NOARG(DbGridControl, RearrangeHdl, Timer*, void)
 {
+if (isDisposed())
+return;
+
 // and give it a chance to rearrange
 Point aPoint = GetControlArea().TopLeft();
 sal_uInt16 nX = static_cast(aPoint.X());


core.git: sw/source

2024-06-03 Thread Caolán McNamara (via logerrit)
 sw/source/filter/html/htmlgrin.cxx |4 ++--
 sw/source/filter/html/htmlplug.cxx |8 
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 24b06580577425681e22472ee68ab00e9c509a83
Author: Caolán McNamara 
AuthorDate: Sun Jun 2 12:19:41 2024 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 3 11:21:01 2024 +0200

cid#1602448 Unchecked return value

and

cid#1602447 Unchecked return value
cid#1602444 Unchecked return value

Change-Id: I8c6b8788b42e1abe171f5ab24aa4601a8fea7084
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168346
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/filter/html/htmlgrin.cxx 
b/sw/source/filter/html/htmlgrin.cxx
index 4b5a0d5e4bd5..c8c15997ab78 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -563,7 +563,7 @@ IMAGE_SETEVENT:
 SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
 SvxCSS1PropertyInfo aPropInfo;
 if( HasStyleOptions( aStyle, aId, aClass ) )
-ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
+(void)ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
 
 SfxItemSetFixed aFrameSet( 
m_xDoc->GetAttrPool() );
 if( !IsNewDoc() )
@@ -1093,7 +1093,7 @@ void SwHTMLParser::InsertBodyOptions()
 SfxItemSet aItemSet( m_xDoc->GetAttrPool(), 
m_pCSS1Parser->GetWhichMap() );
 SvxCSS1PropertyInfo aPropInfo;
 OUString aDummy;
-ParseStyleOptions( aStyle, aDummy, aDummy, aItemSet, aPropInfo, 
nullptr,  );
+(void)ParseStyleOptions( aStyle, aDummy, aDummy, aItemSet, aPropInfo, 
nullptr,  );
 
 // Some attributes have to set on the page style, in fact the ones
 // which aren't inherited
diff --git a/sw/source/filter/html/htmlplug.cxx 
b/sw/source/filter/html/htmlplug.cxx
index 80453237045d..720a9a929647 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -453,7 +453,7 @@ bool SwHTMLParser::InsertEmbed()
 SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
 SvxCSS1PropertyInfo aPropInfo;
 if( HasStyleOptions( aStyle, aId, aClass ) )
-ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
+(void)ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
 
 // Convert the default values (except height/width, which is done by 
SetFrameSize())
 if( eVertOri==text::VertOrientation::NONE && 
eHoriOri==text::HoriOrientation::NONE )
@@ -834,7 +834,7 @@ void SwHTMLParser::NewObject()
 SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
 SvxCSS1PropertyInfo aPropInfo;
 if( HasStyleOptions( aStyle, aId, aClass ) )
-ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
+(void)ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
 
 SfxItemSet& rFrameSet = m_pAppletImpl->GetItemSet();
 if( !IsNewDoc() )
@@ -964,7 +964,7 @@ void SwHTMLParser::InsertApplet()
 SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
 SvxCSS1PropertyInfo aPropInfo;
 if( HasStyleOptions( aStyle, aId, aClass ) )
-ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
+(void)ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
 
 SfxItemSet& rFrameSet = m_pAppletImpl->GetItemSet();
 if( !IsNewDoc() )
@@ -1148,7 +1148,7 @@ void SwHTMLParser::InsertFloatingFrame()
 SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
 SvxCSS1PropertyInfo aPropInfo;
 if( HasStyleOptions( aStyle, aId, aClass ) )
-ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
+(void)ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
 
 // fetch the ItemSet
 SfxItemSetFixed aFrameSet( 
m_xDoc->GetAttrPool() );


core.git: 2 commits - sc/source sd/source

2024-06-02 Thread Caolán McNamara (via logerrit)
 sc/source/core/tool/dbdata.cxx   |2 +-
 sd/source/ui/view/ToolBarManager.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1f15d097cace14ca6e44e7652f460aa3fa7bd150
Author: Caolán McNamara 
AuthorDate: Sun Jun 2 12:17:21 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun Jun 2 22:46:51 2024 +0200

cid#1602446 silence Unchecked return value

Change-Id: Idddff2f08dda1d43a197824fca82b69f7c212648
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168345
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index c2096b39c4d1..596f50f756a5 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -1598,7 +1598,7 @@ void ScDBCollection::CopyToTable(SCTAB nOldPos, SCTAB 
nNewPos)
 std::unique_ptr pDataCopy = 
std::make_unique(newName, *rxNamedDB);
 pDataCopy->UpdateMoveTab(nOldPos, nNewPos);
 pDataCopy->SetIndex(0);
-maNamedDBs.insert(std::move(pDataCopy));
+(void)maNamedDBs.insert(std::move(pDataCopy));
 }
 }
 
commit 68060a0213abbb9a6e16358f8deea4980dd22565
Author: Caolán McNamara 
AuthorDate: Sun Jun 2 12:11:43 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun Jun 2 22:46:39 2024 +0200

cid#1602445 silence Uncaught exception

Change-Id: I3427f747859d9c1f144932b5966dc44c699b0ec9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168344
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/ui/view/ToolBarManager.cxx 
b/sd/source/ui/view/ToolBarManager.cxx
index 545b3b748685..c8f40b99a0ef 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -287,7 +287,7 @@ public:
 public:
 explicit UpdateLockImplementation (Implementation& rImplementation)
 : mrImplementation(rImplementation) { 
mrImplementation.LockUpdate();  }
-~UpdateLockImplementation() { mrImplementation.UnlockUpdate(); }
+~UpdateLockImplementation() { 
suppress_fun_call_w_exception(mrImplementation.UnlockUpdate()); }
 private:
 Implementation& mrImplementation;
 };


core.git: 2 commits - sw/source vcl/source

2024-06-02 Thread Caolán McNamara (via logerrit)
 sw/source/filter/ww8/wrtww8.hxx   |2 +-
 sw/source/filter/ww8/wrtww8gr.cxx |   10 --
 vcl/source/filter/jpeg/jpegc.cxx  |3 ++-
 3 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit 0d32c94b7ec01e8e1bb4b6d0d1f4f092260a6b00
Author: Caolán McNamara 
AuthorDate: Sun Jun 2 12:10:27 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun Jun 2 22:46:15 2024 +0200

cid#1602450 Dereference after null check

Change-Id: I1953e75066d008f2d4f905e4419752278f73c908
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168343
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index e69d35e07c7a..000ea3580b20 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1090,7 +1090,7 @@ public:
 void OutGrf(const ww8::Frame );
 bool TestOleNeedsGraphic(const SwAttrSet& rSet, rtl::Reference 
const& xOleStg,
  const rtl::Reference& xObjStg, 
OUString const& rStorageName,
- SwOLENode* pOLENd);
+ SwOLENode& rOLENd);
 
 virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 
nCurrentPos, sal_Int32 nLen, const SwRedlineData* pRedlineData = nullptr ) 
override;
 virtual void AppendBookmark( const OUString& rName ) override;
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx 
b/sw/source/filter/ww8/wrtww8gr.cxx
index 08790a50b372..ae2b51f40b24 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -85,7 +85,7 @@ void WW8Export::OutputGrfNode( const SwGrfNode& /*rNode*/ )
 
 bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet, 
rtl::Reference const& xOleStg,
 const rtl::Reference& xObjStg,
-OUString const& rStorageName, SwOLENode* 
pOLENd)
+OUString const& rStorageName, SwOLENode& 
rOLENd)
 {
 bool bGraphicNeeded = false;
 SfxItemIter aIter( rSet );
@@ -127,9 +127,7 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet, 
rtl::ReferenceGetAspect();
+sal_Int64 nAspect = rOLENd.GetAspect();
 rtl::Reference pRet = 
SvxMSDffManager::CreateSdrOLEFromStorage(
 *m_rDoc.getIDocumentDrawModelAccess().GetOrCreateDrawModel(),
 rStorageName,
@@ -146,7 +144,7 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet, 
rtl::Reference xObj = 
pOLENd->GetOLEObj().GetOleRef();
+uno::Reference< embed::XEmbeddedObject > xObj = 
rOLENd.GetOLEObj().GetOleRef();
 if ( xObj.is() )
 {
 std::unique_ptr pGraphicStream;
@@ -288,7 +286,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
 m_pParentFrame->GetFrameFormat().GetAttrSet();
 bEndCR = false;
 bGraphicNeeded = TestOleNeedsGraphic(rSet,
-xOleStg, xObjStg, sStorageName, 
const_cast());
+xOleStg, xObjStg, sStorageName, 
const_cast(rOLENode));
     }
 }
 
commit 17992bf328ffe68a8573e638f7c94beb991c5fdc
Author:     Caolán McNamara 
AuthorDate: Sun Jun 2 12:07:11 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun Jun 2 22:46:07 2024 +0200

cid#1602442 Uninitialized pointer field

Change-Id: I3586685ba132fd09b00d778fc3fe8e479d1a8aab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168342
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index bc8a656c890f..5b50bd3d394e 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -54,7 +54,8 @@ struct ErrorManagerStruct
 
 ErrorManagerStruct()
 {
-pub.msg_parm = {};
+pub = {};
+memset(_buffer, 0, sizeof(setjmp_buffer));
 }
 };
 


core.git: sw/source

2024-06-01 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/uiview/view.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1071db05c2b5a5a9974ec9ece12f60217ab86db6
Author: Caolán McNamara 
AuthorDate: Sat Jun 1 20:16:17 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun Jun 2 00:42:16 2024 +0200

ofz#69356 Integer-overflow

Change-Id: I5ce3b5858306dbc0f7bd8258dc306dc1195a8ce2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168335
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 6578944aa4a8..29fa3f3281ef 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1430,23 +1430,23 @@ void SwView::ReadUserDataSequence ( const uno::Sequence 
< beans::PropertyValue >
 if ( rValue.Name == "ViewLeft" )
 {
rValue.Value >>= nX;
-   nX = o3tl::toTwips(nX, o3tl::Length::mm100);
+   nX = o3tl::convertSaturate(nX, o3tl::Length::mm100, 
o3tl::Length::twip);
 }
 else if ( rValue.Name == "ViewTop" )
 {
rValue.Value >>= nY;
-   nY = o3tl::toTwips(nY, o3tl::Length::mm100);
+   nY = o3tl::convertSaturate(nY, o3tl::Length::mm100, 
o3tl::Length::twip);
 }
 else if ( rValue.Name == "VisibleLeft" )
 {
rValue.Value >>= nLeft;
-   nLeft = o3tl::toTwips(nLeft, o3tl::Length::mm100);
+   nLeft = o3tl::convertSaturate(nLeft, o3tl::Length::mm100, 
o3tl::Length::twip);
bGotVisibleLeft = true;
 }
 else if ( rValue.Name == "VisibleTop" )
 {
rValue.Value >>= nTop;
-   nTop = o3tl::toTwips(nTop, o3tl::Length::mm100);
+   nTop = o3tl::convertSaturate(nTop, o3tl::Length::mm100, 
o3tl::Length::twip);
bGotVisibleTop = true;
 }
 else if ( rValue.Name == "ZoomType" )


core.git: sc/source

2024-05-31 Thread Caolán McNamara (via logerrit)
 sc/source/ui/dbgui/PivotLayoutDialog.cxx |2 ++
 sc/source/ui/dbgui/consdlg.cxx   |1 +
 sc/source/ui/dbgui/dbnamdlg.cxx  |1 +
 sc/source/ui/dbgui/pvfundlg.cxx  |1 +
 sc/source/ui/inc/PivotLayoutDialog.hxx   |3 +++
 sc/source/ui/inc/consdlg.hxx |1 +
 sc/source/ui/inc/dbnamdlg.hxx|1 +
 sc/source/ui/inc/namedefdlg.hxx  |1 +
 sc/source/ui/inc/namedlg.hxx |2 ++
 sc/source/ui/inc/pvfundlg.hxx|1 +
 sc/source/ui/namedlg/namedefdlg.cxx  |1 +
 sc/source/ui/namedlg/namedlg.cxx |1 +
 12 files changed, 16 insertions(+)

New commits:
commit ebb50b6d89dcbd04073830ec05c9df368a235786
Author: Caolán McNamara 
AuthorDate: Fri May 31 09:44:11 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 31 17:52:44 2024 +0200

partial revert to restore existence of Expander wrappers

partial revert of:

commit 8288d2e3061327fd91e241c0b514cd973e3fcea8
Date:   Mon Nov 21 11:04:53 2022 +0200

loplugin:unusedfields

because the existence of the welded expander wrappers matters
for some of the backends to fully work

Change-Id: Ie75e27329a47f708514466401e24eae6ddcd4c0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168208
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx 
b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index db93d6c5cee2..8da65589ffb3 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -110,6 +110,8 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
 , mxSourceLabel(mxSourceFrame->weld_label_widget())
 , mxDestFrame(m_xBuilder->weld_frame(u"frame1"_ustr))
 , mxDestLabel(mxDestFrame->weld_label_widget())
+, mxOptions(m_xBuilder->weld_expander("options"))
+, mxMore(m_xBuilder->weld_expander("more"))
 {
 // Source UI
 Link aLink2 = LINK(this, ScPivotLayoutDialog, 
ToggleSource);
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index 90da5447b1bd..22911ed16f6f 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -88,6 +88,7 @@ ScConsolidateDlg::ScConsolidateDlg(SfxBindings* pB, 
SfxChildWindow* pCW, weld::W
 , m_xLbDestArea(m_xBuilder->weld_combo_box(u"lbdestarea"_ustr))
 , m_xEdDestArea(new 
formula::RefEdit(m_xBuilder->weld_entry(u"eddestarea"_ustr)))
 , m_xRbDestArea(new 
formula::RefButton(m_xBuilder->weld_button(u"rbdestarea"_ustr)))
+, m_xExpander(m_xBuilder->weld_expander(u"more"_ustr))
 , m_xBtnByRow(m_xBuilder->weld_check_button(u"byrow"_ustr))
 , m_xBtnByCol(m_xBuilder->weld_check_button(u"bycol"_ustr))
 , m_xBtnRefs(m_xBuilder->weld_check_button(u"refs"_ustr))
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index 473fbc715215..e8a582da45f7 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -148,6 +148,7 @@ ScDbNameDlg::ScDbNameDlg(SfxBindings* pB, SfxChildWindow* 
pCW, weld::Window* pPa
 , m_xModifyPB(m_xBuilder->weld_button(u"modify"_ustr))
 , m_xInvalidFT(m_xBuilder->weld_label(u"invalid"_ustr))
 , m_xFrameLabel(m_xAssignFrame->weld_label_widget())
+, m_xExpander(m_xBuilder->weld_expander("more"))
 {
 m_xEdName->set_height_request_by_rows(4);
 m_xEdAssign->SetReferences(this, m_xFrameLabel.get());
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index 8a605fd6d9fe..7c19279945ab 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -246,6 +246,7 @@ ScDPFunctionDlg::ScDPFunctionDlg(
 , mxLbBaseItem(m_xBuilder->weld_combo_box(u"baseitem"_ustr))
 , mxBtnOk(m_xBuilder->weld_button(u"ok"_ustr))
 , mxBtnCancel(m_xBuilder->weld_button(u"cancel"_ustr))
+, mxExpander(m_xBuilder->weld_expander(u"expander"_ustr))
 , mrLabelVec(rLabelVec)
 , mbEmptyItem(false)
 {
diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx 
b/sc/source/ui/inc/PivotLayoutDialog.hxx
index c07693e3518f..c2923ce34ae2 100644
--- a/sc/source/ui/inc/PivotLayoutDialog.hxx
+++ b/sc/source/ui/inc/PivotLayoutDialog.hxx
@@ -85,6 +85,9 @@ private:
 std::unique_ptr mxDestFrame;
 std::unique_ptr mxDestLabel;
 
+std::unique_ptr mxOptions;
+std::unique_ptr mxMore;
+
 DECL_LINK(CancelClicked, weld::Button&, void);
 DECL_LINK(OKClicked, weld::Button&, void);
 DECL_LINK(GetEditFocusHandler, formula::RefEdit&, void);
diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx
index 07fb1f3ed561..140472cbbaf4 100644
--- a/sc/source/ui/inc/consdlg.hxx
+++ b/sc/source/ui/inc/consdlg.hxx
@@ -

core.git: Branch 'distro/collabora/co-24.04' - sw/source

2024-05-31 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/docvw/AnnotationWin.cxx  |9 ++---
 sw/source/uibase/docvw/AnnotationWin2.cxx |   10 --
 2 files changed, 10 insertions(+), 9 deletions(-)

New commits:
commit 946ca1b3f7617e9c6bb81d58096b03c50318b88f
Author: Caolán McNamara 
AuthorDate: Thu May 30 08:47:09 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 31 09:28:14 2024 +0200

ubsan: runtime error: reference binding to null pointer of type 'const 
SwFrame'

since:

commit 124a988ea99096ea5080060c0d1a801528bd7a5c
Date:   Wed May 22 11:57:57 2024 +0100

create comment reply synchronously

Change-Id: I62a6499c4dda7155e95bf8ffb344bfa81750844f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168200
Reviewed-by: Pranam Lashkari 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx 
b/sw/source/uibase/docvw/AnnotationWin.cxx
index 714c1419d2ed..426c097e9e58 100644
--- a/sw/source/uibase/docvw/AnnotationWin.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin.cxx
@@ -120,9 +120,12 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin,
 }
 
 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
-mrMgr.ConnectSidebarWinToFrame( 
*(mrSidebarItem.maLayoutInfo.mpAnchorFrame),
-  mrSidebarItem.GetFormatField(),
-  *this );
+if (rSidebarItem.maLayoutInfo.mpAnchorFrame)
+{
+mrMgr.ConnectSidebarWinToFrame( 
*(rSidebarItem.maLayoutInfo.mpAnchorFrame),
+  mrSidebarItem.GetFormatField(),
+  *this );
+}
 #endif
 
 if (SupportsDoubleBuffering())
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index a1f6e5794f1a..73c035abdaf7 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -1063,16 +1063,13 @@ void SwAnnotationWin::ExecuteCommand(sal_uInt16 nSlot)
 
 SwDocShell* pShell = mrView.GetDocShell();
 if (bReply)
-
pShell->GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::START, nullptr);
+
pShell->GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT, nullptr);
 
 // synchronous dispatch
 mrView.GetViewFrame().GetDispatcher()->Execute(FN_POSTIT);
 
 if (bReply)
 {
-SwUndoId nUndoId(SwUndoId::END);
-mrView.GetWrtShell().GetLastUndoInfo(nullptr, );
-
 // Get newly created SwPostItField and set its paraIdParent
 auto pPostItField = mrMgr.GetLatestPostItField();
 pPostItField->SetParentId(GetTopReplyNote()->GetParaId());
@@ -1088,7 +1085,7 @@ void SwAnnotationWin::ExecuteCommand(sal_uInt16 nSlot)
 
 SwRewriter aRewriter;
 aRewriter.AddRule(UndoArg1, pPostItField->GetDescription());
-pShell->GetDoc()->GetIDocumentUndoRedo().EndUndo(nUndoId, 
);
+
pShell->GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT, );
 }
 break;
 }
@@ -1416,7 +1413,7 @@ void SwAnnotationWin::ChangeSidebarItem( SwSidebarItem 
const & rSidebarItem )
 {
 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
 const bool bAnchorChanged = mpAnchorFrame != 
rSidebarItem.maLayoutInfo.mpAnchorFrame;
-if ( bAnchorChanged )
+if (bAnchorChanged && mpAnchorFrame)
 {
 mrMgr.DisconnectSidebarWinFromFrame( *mpAnchorFrame, *this );
 }
@@ -1424,6 +1421,7 @@ void SwAnnotationWin::ChangeSidebarItem( SwSidebarItem 
const & rSidebarItem )
 
 mrSidebarItem = rSidebarItem;
 mpAnchorFrame = mrSidebarItem.maLayoutInfo.mpAnchorFrame;
+assert(mpAnchorFrame);
 
 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
 if (mxSidebarWinAccessible)


core.git: Branch 'libreoffice-24-2' - sc/source

2024-05-30 Thread Caolán McNamara (via logerrit)
 sc/source/core/tool/interpr4.cxx | 1026 +++
 1 file changed, 515 insertions(+), 511 deletions(-)

New commits:
commit 75a6ac7428ca93d4e3a6dfc0b14f321bca243d85
Author: Caolán McNamara 
AuthorDate: Sat Apr 13 16:43:14 2024 +0100
Commit: Eike Rathke 
CommitDate: Thu May 30 18:24:19 2024 +0200

Related: tdf#160056 call FormulaCompiler::IsOpCodeJumpCommand just once

Change-Id: Ib2bb12b868a591edca17333ff83d00ab7e9b4371
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168159
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 959b04a70e10..85c890d3bc82 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -4036,535 +4036,539 @@ StackVar ScInterpreter::Interpret()
 PushWithoutError( *pCur );
 nCurFmtType = SvNumFormatType::UNDEFINED;
 }
-else if (!FormulaCompiler::IsOpCodeJumpCommand( eOp ) &&
-((aTokenMatrixMapIter = maTokenMatrixMap.find( pCur)) !=
- maTokenMatrixMap.end()) &&
-(*aTokenMatrixMapIter).second->GetType() != svJumpMatrix)
-{
-// Path already calculated, reuse result.
-const sal_uInt8 nParamCount = pCur->GetParamCount();
-if (sp >= nParamCount)
-nStackBase = sp - nParamCount;
-else
-{
-SAL_WARN("sc.core", "Stack anomaly with calculated path at "
-<< aPos.Tab() << "," << aPos.Col() << "," << aPos.Row()
-<< "  " << aPos.Format(
-ScRefFlags::VALID | ScRefFlags::FORCE_DOC | 
ScRefFlags::TAB_3D, )
-<< "  eOp: " << static_cast(eOp)
-<< "  params: " << static_cast(nParamCount)
-<< "  nStackBase: " << nStackBase << "  sp: " << sp);
-nStackBase = sp;
-assert(!"underflow");
-}
-sp = nStackBase;
-PushTokenRef( (*aTokenMatrixMapIter).second);
-}
 else
 {
-// previous expression determines the current number format
-nCurFmtType = nRetTypeExpr;
-nCurFmtIndex = nRetIndexExpr;
-// default function's format, others are set if needed
-nFuncFmtType = SvNumFormatType::NUMBER;
-nFuncFmtIndex = 0;
-
-if (FormulaCompiler::IsOpCodeJumpCommand( eOp ))
-nStackBase = sp;// don't mess around with the jumps
-else
+const bool bIsOpCodeJumpCommand = 
FormulaCompiler::IsOpCodeJumpCommand(eOp);
+if (!bIsOpCodeJumpCommand &&
+   ((aTokenMatrixMapIter = maTokenMatrixMap.find( pCur)) !=
+maTokenMatrixMap.end()) &&
+   (*aTokenMatrixMapIter).second->GetType() != svJumpMatrix)
 {
-// Convert parameters to matrix if in array/matrix formula and
-// parameters of function indicate doing so. Create JumpMatrix
-// if necessary.
-if ( MatrixParameterConversion() )
+// Path already calculated, reuse result.
+const sal_uInt8 nParamCount = pCur->GetParamCount();
+if (sp >= nParamCount)
+nStackBase = sp - nParamCount;
+else
 {
-eOp = ocNone;   // JumpMatrix created
+SAL_WARN("sc.core", "Stack anomaly with calculated path at 
"
+<< aPos.Tab() << "," << aPos.Col() << "," << 
aPos.Row()
+<< "  " << aPos.Format(
+ScRefFlags::VALID | ScRefFlags::FORCE_DOC | 
ScRefFlags::TAB_3D, )
+<< "  eOp: " << static_cast(eOp)
+<< "  params: " << static_cast(nParamCount)
+<< "  nStackBase: " << nStackBase << "  sp: " << 
sp);
 nStackBase = sp;
+assert(!"underflow");
 }
+sp = nStackBase;
+PushTokenRef( (*aTokenMatrixMapIter).second);
+}
+else
+{
+// previous expression determines the current number format
+nCurFmtType = nRetTypeExpr;
+nCurFmtIndex = nRetIndexExpr;
+/

core.git: sw/source

2024-05-30 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/docvw/AnnotationWin.cxx  |9 ++---
 sw/source/uibase/docvw/AnnotationWin2.cxx |   10 --
 2 files changed, 10 insertions(+), 9 deletions(-)

New commits:
commit c497cd602d543b4212f79ba1ecf378e415fc
Author: Caolán McNamara 
AuthorDate: Thu May 30 08:47:09 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 30 17:47:37 2024 +0200

ubsan: runtime error: reference binding to null pointer of type 'const 
SwFrame'

since:

commit 124a988ea99096ea5080060c0d1a801528bd7a5c
Date:   Wed May 22 11:57:57 2024 +0100

create comment reply synchronously

Change-Id: I62a6499c4dda7155e95bf8ffb344bfa81750844f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168247
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx 
b/sw/source/uibase/docvw/AnnotationWin.cxx
index 409b8be9a7a7..db54099486af 100644
--- a/sw/source/uibase/docvw/AnnotationWin.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin.cxx
@@ -120,9 +120,12 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin,
 }
 
 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
-mrMgr.ConnectSidebarWinToFrame( 
*(mrSidebarItem.maLayoutInfo.mpAnchorFrame),
-  mrSidebarItem.GetFormatField(),
-  *this );
+if (rSidebarItem.maLayoutInfo.mpAnchorFrame)
+{
+mrMgr.ConnectSidebarWinToFrame( 
*(rSidebarItem.maLayoutInfo.mpAnchorFrame),
+  mrSidebarItem.GetFormatField(),
+  *this );
+}
 #endif
 
 if (SupportsDoubleBuffering())
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index a20255f1c37b..378d35b174d4 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -1067,16 +1067,13 @@ void SwAnnotationWin::ExecuteCommand(sal_uInt16 nSlot)
 
 SwDocShell* pShell = mrView.GetDocShell();
 if (bReply)
-
pShell->GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::START, nullptr);
+
pShell->GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT, nullptr);
 
 // synchronous dispatch
 mrView.GetViewFrame().GetDispatcher()->Execute(FN_POSTIT);
 
 if (bReply)
 {
-SwUndoId nUndoId(SwUndoId::END);
-mrView.GetWrtShell().GetLastUndoInfo(nullptr, );
-
 // Get newly created SwPostItField and set its paraIdParent
 auto pPostItField = mrMgr.GetLatestPostItField();
 pPostItField->SetParentId(GetTopReplyNote()->GetParaId());
@@ -1092,7 +1089,7 @@ void SwAnnotationWin::ExecuteCommand(sal_uInt16 nSlot)
 
 SwRewriter aRewriter;
 aRewriter.AddRule(UndoArg1, pPostItField->GetDescription());
-pShell->GetDoc()->GetIDocumentUndoRedo().EndUndo(nUndoId, 
);
+
pShell->GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT, );
 }
 break;
 }
@@ -1420,7 +1417,7 @@ void SwAnnotationWin::ChangeSidebarItem( SwSidebarItem 
const & rSidebarItem )
 {
 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
 const bool bAnchorChanged = mpAnchorFrame != 
rSidebarItem.maLayoutInfo.mpAnchorFrame;
-if ( bAnchorChanged )
+if (bAnchorChanged && mpAnchorFrame)
 {
 mrMgr.DisconnectSidebarWinFromFrame( *mpAnchorFrame, *this );
 }
@@ -1428,6 +1425,7 @@ void SwAnnotationWin::ChangeSidebarItem( SwSidebarItem 
const & rSidebarItem )
 
 mrSidebarItem = rSidebarItem;
 mpAnchorFrame = mrSidebarItem.maLayoutInfo.mpAnchorFrame;
+assert(mpAnchorFrame);
 
 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
 if (mxSidebarWinAccessible)


core.git: Branch 'distro/collabora/co-22.05' - sc/source

2024-05-30 Thread Caolán McNamara (via logerrit)
 sc/source/filter/html/htmlpars.cxx |   25 ++---
 1 file changed, 14 insertions(+), 11 deletions(-)

New commits:
commit 0c11979e2bccd3723a292fe83bef1f10aebde16c
Author: Caolán McNamara 
AuthorDate: Sat Mar 23 15:40:26 2024 +
Commit: Miklos Vajna 
CommitDate: Thu May 30 11:22:23 2024 +0200

ofz#67540 negative offset

Change-Id: I498985962feb7d77c1a71af7002a85aa02aa3e65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165232
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/source/filter/html/htmlpars.cxx 
b/sc/source/filter/html/htmlpars.cxx
index ebccbf860f49..6b154ddbc4fd 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -740,19 +740,22 @@ void ScHTMLLayoutParser::SetWidths()
 for ( size_t i = nFirstTableCell, nListSize = maList.size(); i < 
nListSize; ++i )
 {
 auto& pE = maList[ i ];
-if ( pE->nTab == nTable )
+if (pE->nTab != nTable)
+continue;
+nCol = pE->nCol - nColCntStart;
+OSL_ENSURE( nCol < nColsPerRow, 
"ScHTMLLayoutParser::SetWidths: column overflow" );
+if (nCol >= nColsPerRow)
+continue;
+pE->nOffset = pOffsets[nCol];
+nCol = nCol + pE->nColOverlap;
+if ( nCol > nColsPerRow )
+nCol = nColsPerRow;
+if (nCol < 0)
 {
-nCol = pE->nCol - nColCntStart;
-OSL_ENSURE( nCol < nColsPerRow, 
"ScHTMLLayoutParser::SetWidths: column overflow" );
-if ( nCol < nColsPerRow )
-{
-pE->nOffset = pOffsets[nCol];
-nCol = nCol + pE->nColOverlap;
-if ( nCol > nColsPerRow )
-nCol = nColsPerRow;
-pE->nWidth = pOffsets[nCol] - pE->nOffset;
-}
+SAL_WARN("sc", "negative offset: " << nCol);
+continue;
 }
+pE->nWidth = pOffsets[nCol] - pE->nOffset;
 }
 }
 }


core.git: Branch 'distro/collabora/co-23.05' - sw/inc sw/source

2024-05-30 Thread Caolán McNamara (via logerrit)
 sw/inc/PostItMgr.hxx |2 +
 sw/source/uibase/docvw/PostItMgr.cxx |   40 +--
 2 files changed, 26 insertions(+), 16 deletions(-)

New commits:
commit 43ca3e129bb7b7603e8a7bbb10015a7b01e595db
Author: Caolán McNamara 
AuthorDate: Wed May 22 11:13:12 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 30 10:25:44 2024 +0200

split a piece of code out as a standalone GetOrCreateAnnotationWindow

Change-Id: I674d96976f265eeac719ed06a657af07aaae2325
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167954
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Pranam Lashkari 
(cherry picked from commit 3d071fcde498e7c89ddef163f153400da0470199)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168197
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 98d9f4f2ef30..f66e38748a64 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -172,6 +172,8 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr final : public 
SfxListener
 SwSidebarItem*  InsertItem( SfxBroadcaster* pItem, bool 
bCheckExistence, bool bFocus);
 voidRemoveItem( SfxBroadcaster* pBroadcast );
 
+VclPtr 
GetOrCreateAnnotationWindow(SwSidebarItem& rItem);
+
 public:
 SwPostItMgr(SwView* aDoc);
 virtual ~SwPostItMgr() override;
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index ee7cb16685f2..501e3fa449d2 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -710,6 +710,28 @@ void SwPostItMgr::PreparePageContainer()
 }
 }
 
+VclPtr 
SwPostItMgr::GetOrCreateAnnotationWindow(SwSidebarItem& rItem)
+{
+VclPtr pPostIt = rItem.mpPostIt;
+if (!pPostIt)
+{
+pPostIt = rItem.GetSidebarWindow( mpView->GetEditWin(),
+  *this );
+pPostIt->InitControls();
+pPostIt->SetReadonly(mbReadOnly);
+rItem.mpPostIt = pPostIt;
+if (mpAnswer)
+{
+if (pPostIt->GetPostItField()->GetParentPostItId() != 0) //do we 
really have another note in front of this one
+{
+pPostIt->InitAnswer(*mpAnswer);
+}
+mpAnswer.reset();
+}
+}
+return rItem.mpPostIt;
+}
+
 void SwPostItMgr::LayoutPostIts()
 {
 const bool bLoKitActive = comphelper::LibreOfficeKit::isActive();
@@ -739,24 +761,9 @@ void SwPostItMgr::LayoutPostIts()
 
 for (auto const& pItem : pPage->mvSidebarItems)
 {
-VclPtr pPostIt = pItem->mpPostIt;
-
 if (pItem->mbShow)
 {
-if (!pPostIt)
-{
-pPostIt = pItem->GetSidebarWindow( 
mpView->GetEditWin(),
-  *this );
-pPostIt->InitControls();
-pPostIt->SetReadonly(mbReadOnly);
-pItem->mpPostIt = pPostIt;
-if (mpAnswer)
-{
-if 
(pPostIt->GetPostItField()->GetParentPostItId() != 0) //do we really have 
another note in front of this one
-pPostIt->InitAnswer(*mpAnswer);
-mpAnswer.reset();
-}
-}
+VclPtr pPostIt = 
GetOrCreateAnnotationWindow(*pItem);
 
 pPostIt->SetChangeTracking(
 pItem->mLayoutStatus,
@@ -823,6 +830,7 @@ void SwPostItMgr::LayoutPostIts()
 }
 else // we don't want to see it
 {
+VclPtr pPostIt = pItem->mpPostIt;
 if (pPostIt)
 pPostIt->HideNote();
 }


core.git: sc/source vcl/inc vcl/source

2024-05-30 Thread Caolán McNamara (via logerrit)
 sc/source/ui/view/output2.cxx |8 
 vcl/inc/pdf/pdfwriter_impl.hxx|8 
 vcl/source/gdi/pdfwriter_impl.cxx |   11 ---
 3 files changed, 16 insertions(+), 11 deletions(-)

New commits:
commit cc94f402853bbdce40165a00fe317910d6270562
Author: Caolán McNamara 
AuthorDate: Wed May 29 16:59:04 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 30 09:48:46 2024 +0200

'tagged' pdf export of spreadsheets doesn't perform well

m_aStructure is appended to for every row and cell, so a spreadsheet
with 20 cols and 100,000 rows is many seconds slower to export in 24.8
than 24.4

since:

commit b3c93b16d62e80955edc749af4b8ad10162c
Date:   Wed Jan 3 11:18:19 2024 +0100

tdf#123870 sc: fix tagged content for accessible PDF export

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161581

shave a sliver of work off.

Change-Id: Ibeb817083fef3c9499326abe381527a31917303b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168226
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 1e9bb41a2716..8ddb8722f6ea 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1486,7 +1486,7 @@ void ScOutputData::LayoutStrings(bool bPixelToLogic)
 if (!bReopenTag)
 {
 sal_Int32 nId = pPDF->EnsureStructureElement(nullptr);
-pPDF->InitStructureElement(nId, vcl::PDFWriter::Table, "Table");
+pPDF->InitStructureElement(nId, vcl::PDFWriter::Table, 
u"Table"_ustr);
 pPDF->BeginStructureElement(nId);
 pPDF->GetScPDFState()->m_TableId = nId;
 }
@@ -1565,7 +1565,7 @@ void ScOutputData::LayoutStrings(bool bPixelToLogic)
 if (!bReopenTag)
 {
 sal_Int32 nId = pPDF->EnsureStructureElement(nullptr);
-pPDF->InitStructureElement(nId, vcl::PDFWriter::TableRow, 
"TR");
+pPDF->InitStructureElement(nId, vcl::PDFWriter::TableRow, 
u"TR"_ustr);
 pPDF->BeginStructureElement(nId);
 pPDF->GetScPDFState()->m_TableRowMap.emplace(nY, nId);
 }
@@ -1577,7 +1577,7 @@ void ScOutputData::LayoutStrings(bool bPixelToLogic)
 for (SCCOL nX=nLoopStartX; nX<=nX2; nX++)
 {
 if (bTaggedPDF)
-pPDF->WrapBeginStructureElement(vcl::PDFWriter::TableData, 
"TD");
+pPDF->WrapBeginStructureElement(vcl::PDFWriter::TableData, 
u"TD"_ustr);
 
 bool bMergeEmpty = false;
 const ScCellInfo* pInfo = >cellInfo(nX);
@@ -2123,7 +2123,7 @@ void ScOutputData::LayoutStrings(bool bPixelToLogic)
 if (!aString.isEmpty())
 {
 if (bTaggedPDF)
-
pPDF->WrapBeginStructureElement(vcl::PDFWriter::Paragraph, "P");
+
pPDF->WrapBeginStructureElement(vcl::PDFWriter::Paragraph, u"P"_ustr);
 
 // If the string is clipped, make it shorter for
 // better performance since drawing by HarfBuzz is
diff --git a/vcl/inc/pdf/pdfwriter_impl.hxx b/vcl/inc/pdf/pdfwriter_impl.hxx
index b0388ecd27a1..2afab075dbe6 100644
--- a/vcl/inc/pdf/pdfwriter_impl.hxx
+++ b/vcl/inc/pdf/pdfwriter_impl.hxx
@@ -603,6 +603,14 @@ struct PDFStructureElement
 {
 }
 
+PDFStructureElement(sal_Int32 nOwnElement, sal_Int32 nParentElement, 
sal_Int32 nFirstPageObject)
+: m_nObject(0)
+, m_nOwnElement(nOwnElement)
+, m_nParentElement(nParentElement)
+, m_nFirstPageObject(nFirstPageObject)
+, m_bOpenMCSeq(false )
+{
+}
 };
 
 // helper structure for drawLayout and friends
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 17e7c2744a23..ba786d7bb34b 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -10813,13 +10813,10 @@ sal_Int32 PDFWriterImpl::ensureStructureElement()
 return -1;
 
 sal_Int32 nNewId = sal_Int32(m_aStructure.size());
-m_aStructure.emplace_back();
-PDFStructureElement& rEle = m_aStructure.back();
-// leave rEle.m_oType uninitialised
-rEle.m_nOwnElement  = nNewId;
-// temporary parent
-rEle.m_nParentElement   = m_nCurrentStructElement;
-rEle.m_nFirstPageObject = m_aPages[ m_nCurrentPage ].m_nPageObject;
+
+// use m_nCurrentStructElement as temporary parent
+m_aStructure.emplace_back(nNewId, m_nCurrentStructElement, 
m_aPages[m_nCurrentPage].m_nPageObject);
+
 m_aStructure[ m_nCurrentStructElement ].m_aChildren.push_back( nNewId );
 return nNewId;
 }


core.git: Branch 'feature/cib_contract138e' - 2 commits - configure.ac xmloff/source

2024-05-29 Thread Caolán McNamara (via logerrit)
 configure.ac|2 +-
 xmloff/source/draw/eventimp.cxx |3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 28843c81a20ba5b64a47eedafaa6302fdb9a7bdd
Author: Caolán McNamara 
AuthorDate: Wed Mar 27 17:07:20 2024 +
Commit: Thorsten Behrens 
CommitDate: Thu May 30 00:03:29 2024 +0200

add notify for script use

Change-Id: I84af197cec7755f6803a578e1e21c03966ad5f3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165411
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx
index 41f9cf69a2e6..6bedb961191f 100644
--- a/xmloff/source/draw/eventimp.cxx
+++ b/xmloff/source/draw/eventimp.cxx
@@ -210,6 +210,9 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp,
 
 if( maData.mbValid )
 maData.mbValid = !sEventName.isEmpty();
+
+if (!maData.msMacroName.isEmpty())
+rImp.NotifyMacroEventRead();
 }
 
 css::uno::Reference< css::xml::sax::XFastContextHandler > 
SdXMLEventContext::createFastChildContext(
commit 09907b3f0f8f4e932ee2c196fa166e9d8926bb22
Author: Thorsten Behrens 
AuthorDate: Wed May 29 22:40:14 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Wed May 29 22:40:14 2024 +0200

Release version 7.3.7.7

Change-Id: Id537e2ec85c07079b3e32ed9ffc76aaba6c0689f

diff --git a/configure.ac b/configure.ac
index 8c14d2d183c7..f23d4fab0d2c 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.7.6],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[7.3.7.7],[],[],[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


core.git: Branch 'libreoffice-24-2' - sc/source

2024-05-29 Thread Caolán McNamara (via logerrit)
 sc/source/ui/undo/undotab.cxx |   21 ++---
 1 file changed, 10 insertions(+), 11 deletions(-)

New commits:
commit b26918017337717f1ba9b651773aefa2e644e542
Author: Caolán McNamara 
AuthorDate: Fri May 24 19:28:25 2024 +0100
Commit: Xisco Fauli 
CommitDate: Wed May 29 23:07:48 2024 +0200

cid#1598442 Dereference null return value

Change-Id: Id44fb940ba17549068c5be554d5738ce81ced79a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168028
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 50c718557da8d3141377a10a4a944736111a1494)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168193
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 0eacb70d1c9c..d18579c59ec1 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -391,6 +391,9 @@ void ScUndoDeleteTab::Undo()
 void ScUndoDeleteTab::Redo()
 {
 ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
+if (!pViewShell)
+return;
+
 pViewShell->SetTabNo( lcl_GetVisibleTabBefore( pDocShell->GetDocument(), 
theTabs.front() ) );
 
 RedoSdrUndoAction( pDrawUndo.get() );   // Draw Redo first
@@ -903,16 +906,13 @@ void ScUndoImportTab::DoChange() const
 
 ScDocument& rDoc = pDocShell->GetDocument();
 SCTAB nTabCount = rDoc.GetTableCount();
-if (pViewShell)
+if(nTabSetTabNo(nTab,true);
-}
-else
-{
-pViewShell->SetTabNo(nTab-1,true);
-}
+pViewShell->SetTabNo(nTab,true);
+}
+else
+{
+pViewShell->SetTabNo(nTab-1,true);
 }
 
 SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );// 
Navigator
@@ -1131,8 +1131,7 @@ void ScUndoShowHideTab::DoChange( bool bShowP ) const
 for(const SCTAB& nTab : undoTabs)
 {
 rDoc.SetVisible( nTab, bShowP );
-if (pViewShell)
-pViewShell->SetTabNo(nTab,true);
+pViewShell->SetTabNo(nTab,true);
 }
 
 SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );


core.git: vcl/source

2024-05-28 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/jpeg/jpegc.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit f3fc5bfaf902052b9e0a1b6e162f9ed836efd090
Author: Caolán McNamara 
AuthorDate: Mon May 27 21:32:32 2024 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 28 20:46:13 2024 +0200

ofz: Use-of-uninitialized-value

Change-Id: Ib5220d2f44344455e6333f24b0dc2a20e5f9b0ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168126
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index d225d135d5c7..bc8a656c890f 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -51,6 +51,11 @@ struct ErrorManagerStruct
 {
 jpeg_error_mgr pub;
 jmp_buf setjmp_buffer;
+
+ErrorManagerStruct()
+{
+pub.msg_parm = {};
+}
 };
 
 }


core.git: tools/source

2024-05-28 Thread Caolán McNamara (via logerrit)
 tools/source/generic/poly.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 550e50c529f8be00320cfd7ab1c305d9e6912dea
Author: Caolán McNamara 
AuthorDate: Mon May 27 20:42:10 2024 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 28 13:10:34 2024 +0200

ofz#69290 Integer-overflow

Change-Id: I20b49bf5e3a507979332cd854205f290a3b3971c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168118
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 81419f7e70c3..b6b00bc2ca34 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -179,8 +179,7 @@ ImplPolygon::ImplPolygon( const Point& rCenter, tools::Long 
nRadX, tools::Long n
 if (!bOverflow)
 {
 nPoints = std::clamp(
-( M_PI * ( 1.5 * ( nRadX + nRadY ) -
-   sqrt( static_cast(std::abs(nRadXY)) ) ) ),
+( M_PI * ( 1.5 * ( nRadX + nRadY ) - sqrt( std::fabs(nRadXY) ) 
) ),
 32.0, 256.0 );
 }
 else
@@ -245,8 +244,7 @@ ImplPolygon::ImplPolygon(const tools::Rectangle& rBound, 
const Point& rStart, co
 if (!bOverflow)
 {
 nPoints = std::clamp(
-( M_PI * ( 1.5 * ( nRadX + nRadY ) -
-   sqrt( static_cast(std::abs(nRadXY)) ) ) ),
+( M_PI * ( 1.5 * ( nRadX + nRadY ) - sqrt( std::fabs(nRadXY) ) 
) ),
 32.0, 256.0 );
 }
 else


core.git: Branch 'distro/collabora/co-24.04' - sd/source

2024-05-27 Thread Caolán McNamara (via logerrit)
 sd/source/ui/view/drviewsk.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit f29be6b680dd8ce5d15283ec5d18dba0bc0dc504
Author: Caolán McNamara 
AuthorDate: Fri May 17 22:00:07 2024 +0100
Commit: Miklos Vajna 
CommitDate: Mon May 27 14:42:55 2024 +0200

Resolves: tdf#161057 draw/impress auto font color not updated on theme 
change

Change-Id: Id3d02c38e3bbda34f65f5623fff1a5f39238e46a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167812
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sd/source/ui/view/drviewsk.cxx b/sd/source/ui/view/drviewsk.cxx
index 92a00d5d2ded..bdbb821e96b3 100644
--- a/sd/source/ui/view/drviewsk.cxx
+++ b/sd/source/ui/view/drviewsk.cxx
@@ -23,7 +23,9 @@ void DrawViewShell::ConfigurationChanged( 
utl::ConfigurationBroadcaster* pCb, Co
 {
 svtools::ColorConfig *pColorConfig = 
dynamic_cast(pCb);
 ConfigureAppBackgroundColor(pColorConfig);
-if (comphelper::LibreOfficeKit::isActive())
+if (!comphelper::LibreOfficeKit::isActive())
+maViewOptions.mnDocBackgroundColor = 
pColorConfig->GetColorValue(svtools::DOCCOLOR).nColor;
+else
 {
 SfxViewShell* pCurrentShell = SfxViewShell::Current();
 ViewShellBase* pShellBase = 
dynamic_cast(pCurrentShell);


core.git: sal/textenc

2024-05-27 Thread Caolán McNamara (via logerrit)
 sal/textenc/tcvtutf8.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit b1a6bd87b803f760f5bf0e2b7bc519b3b2fbfa4e
Author: Caolán McNamara 
AuthorDate: Sun May 26 21:35:23 2024 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 27 09:26:30 2024 +0200

ofz: Use-of-uninitialized-value in ImplConvertUtf8ToUnicode

probably since:

commit 08e78607ec6bc820c52ab3df1a5d3738e049b90d
Date:   Wed Sep 13 08:28:32 2017 +0200

Make reading UTF-8 strict

Change-Id: I4754e8c1314d37c7a863db4a1d9823d53fb343f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168079
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sal/textenc/tcvtutf8.cxx b/sal/textenc/tcvtutf8.cxx
index 456d77e2f51c..05290cc204fd 100644
--- a/sal/textenc/tcvtutf8.cxx
+++ b/sal/textenc/tcvtutf8.cxx
@@ -56,6 +56,7 @@ void ImplResetUtf8ToUnicodeContext(void * pContext)
 {
 if (pContext != nullptr)
 {
+static_cast< ImplUtf8ToUnicodeContext * >(pContext)->nBytes = int();
 static_cast< ImplUtf8ToUnicodeContext * >(pContext)->nShift = -1;
 static_cast< ImplUtf8ToUnicodeContext * >(pContext)->bCheckBom = true;
 }


core.git: include/svx svx/source

2024-05-26 Thread Caolán McNamara (via logerrit)
 include/svx/gridctrl.hxx   |   15 -
 svx/source/fmcomp/gridctrl.cxx |  112 +++--
 2 files changed, 100 insertions(+), 27 deletions(-)

New commits:
commit f0960e05c2f540c99062867236419c2a70c1160b
Author: Caolán McNamara 
AuthorDate: Sun May 19 20:29:26 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun May 26 20:21:10 2024 +0200

Resolves: tdf#155364 resize buttons and change widget font sizes on zoom

Change-Id: Ied951e6c96881bd56a40ae01077cd7f76f9b7853
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168071
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
index 27d7f25c7cf2..09c2a609a483 100644
--- a/include/svx/gridctrl.hxx
+++ b/include/svx/gridctrl.hxx
@@ -161,6 +161,7 @@ enum class DbGridControlNavigationBarState
 
 class FmXGridSourcePropListener;
 class DisposeListenerGridBridge;
+class DbGridControl;
 
 // NavigationBar
 class NavigationBar final : public InterimItemWindow
@@ -195,21 +196,26 @@ class NavigationBar final : public InterimItemWindow
 std::shared_ptr m_xPrevRepeater;
 std::shared_ptr m_xNextRepeater;
 
+Size m_aLastAllocSize;
+
 sal_Int32m_nCurrentPos;
 
 bool m_bPositioning; // protect PositionDataSource 
against recursion
 
 public:
-NavigationBar(vcl::Window* pParent);
+NavigationBar(DbGridControl* pParent);
 virtual ~NavigationBar() override;
 virtual void dispose() override;
 
+DECL_LINK(SizeAllocHdl, const Size&, void);
+
 // Status methods for Controls
 void InvalidateAll(sal_Int32 nCurrentPos, bool bAll = false);
 void InvalidateState(DbGridControlNavigationBarState nWhich) 
{SetState(nWhich);}
 void SetState(DbGridControlNavigationBarState nWhich);
 bool GetState(DbGridControlNavigationBarState nWhich) const;
-sal_uInt16 ArrangeControls();
+void SetPointFontAndZoom(const vcl::Font& rFont, const Fraction& rZoom);
+sal_uInt16 GetPreferredWidth() const;
 
 private:
 
@@ -278,6 +284,8 @@ private:
 osl::Mutex  m_aDestructionSafety;
 osl::Mutex  m_aAdjustSafety;
 
+Idlem_aRearrangeIdle;
+
 css::util::Date
 m_aNullDate;// NullDate of the Numberformatter;
 
@@ -552,6 +560,8 @@ public:
 css::accessibility::XAccessible >
 CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId ) override;
 
+void RearrangeAtIdle();
+
 protected:
 void RecalcRows(sal_Int32 nNewTopRow, sal_uInt16 nLinesOnScreen, bool 
bUpdateCursor);
 bool SeekCursor(sal_Int32 nRow, bool bAbsolute = false);
@@ -588,6 +598,7 @@ protected:
 protected:
 void ImplInitWindow( const InitWindowFacet _eInitWhat );
 DECL_DLLPRIVATE_LINK(OnDelete, void*, void);
+DECL_DLLPRIVATE_LINK(RearrangeHdl, Timer*, void);
 
 DECL_DLLPRIVATE_LINK(OnAsyncAdjust, void*, void);
 // if the param is != NULL, AdjustRows will be called, else 
AdjustDataSource
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index e6e3f8b40bc2..faedec67aa66 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -302,7 +303,7 @@ void NavigationBar::PositionDataSource(sal_Int32 nRecord)
 m_bPositioning = false;
 }
 
-NavigationBar::NavigationBar(vcl::Window* pParent)
+NavigationBar::NavigationBar(DbGridControl* pParent)
 : InterimItemWindow(pParent, u"svx/ui/navigationbar.ui"_ustr, 
u"NavigationBar"_ustr)
 , m_xRecordText(m_xBuilder->weld_label(u"recordtext"_ustr))
 , m_xAbsolute(new 
NavigationBar::AbsolutePos(m_xBuilder->weld_entry(u"entry-noframe"_ustr), this))
@@ -318,13 +319,6 @@ NavigationBar::NavigationBar(vcl::Window* pParent)
 , m_nCurrentPos(-1)
 , m_bPositioning(false)
 {
-vcl::Font 
aApplFont(Application::GetSettings().GetStyleSettings().GetToolFont());
-m_xAbsolute->set_font(aApplFont);
-aApplFont.SetTransparent(true);
-m_xRecordText->set_font(aApplFont);
-m_xRecordOf->set_font(aApplFont);
-m_xRecordCount->set_font(aApplFont);
-
 m_xFirstBtn->set_help_id(HID_GRID_TRAVEL_FIRST);
 m_xPrevBtn->set_help_id(HID_GRID_TRAVEL_PREV);
 m_xNextBtn->set_help_id(HID_GRID_TRAVEL_NEXT);
@@ -342,9 +336,18 @@ NavigationBar::NavigationBar(vcl::Window* pParent)
 m_xRecordOf->set_label(SvxResId(RID_STR_REC_FROM_TEXT));
 m_xRecordCount->set_label(OUString('?'));
 
-auto nReserveWidth = m_xRecordCount->get_approximate_digit_width() * 
nReserveNumDigits;
-m_xAbsolute->GetWidget()->set_size_request(nReserveWidth, -1);
-m_xRecordCount->set_size_request(nReserveWidth, -1);
+vcl::Font 
aApplFont(Application::GetSettings().GetStyleSettings().GetToolFont());

core.git: sc/source

2024-05-26 Thread Caolán McNamara (via logerrit)
 sc/source/filter/lotus/lotform.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f292fd3ac15109ad9ced85f2141922f403460618
Author: Caolán McNamara 
AuthorDate: Sun May 26 15:10:28 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun May 26 20:19:17 2024 +0200

ofz: Use-of-uninitialized-value

Change-Id: I8e43bdea51b7ab4943a2243e4d2ddb9d714f1895
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168049
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/filter/lotus/lotform.cxx 
b/sc/source/filter/lotus/lotform.cxx
index 88ddfcfe251c..b5f9ee055a7a 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -479,7 +479,7 @@ void LotusToSc::Convert( std::unique_ptr& 
rpErg, sal_Int32& rRest
 }
 case FT_ConstFloat:
 {
-double  fDouble;
+double fDouble(0.0);
 Read( fDouble );
 aStack << aPool.Store( fDouble );
 break;
@@ -638,7 +638,7 @@ void LotusToSc::Convert( std::unique_ptr& 
rpErg, sal_Int32& rRest
 }
 case FT_Const10Float:
 {
-double fValue;
+double fValue(0.0);
 if (bWK123)
 Read(fValue);
 else


core.git: 2 commits - sc/source

2024-05-26 Thread Caolán McNamara (via logerrit)
 sc/source/filter/ftools/ftools.cxx |   13 -
 1 file changed, 13 deletions(-)

New commits:
commit 07a372592cea4bded282b2ad9a67ca9e7b08c3cd
Author: Caolán McNamara 
AuthorDate: Sun May 26 15:06:56 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun May 26 20:18:43 2024 +0200

drop unused __SIMPLE_FUNC

presumably unused since:

commit a3ce60eb3c8bb5c69ab41556398efa8316286477
Date:   Tue Nov 27 14:41:16 2012 +0200

We only support MSVC 2008 (_MSC_VER 1500) or later

Change-Id: Ica1c319ac485a1bd539ccd7df604df5786608698
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168048
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sc/source/filter/ftools/ftools.cxx 
b/sc/source/filter/ftools/ftools.cxx
index 2f52cb183e99..d3145e537429 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -40,20 +40,6 @@
 // ScFilterTools::ReadLongDouble()
 
 void ScfTools::ReadLongDouble(SvStream& rStrm, double& fResult)
-
-#ifdef __SIMPLE_FUNC// for <=VC 1.5
-
-#error PRESUMABLY_NEVER_USED
-{
-long double fRet;
-bool bOk = 10 == rStrm.Read(, 10);
-if (!bOk)
-return;
-fResult = static_cast(fRet);
-}
-#undef __SIMPLE_FUNC
-
-#else   // detailed for all others
 {
 
 /*
@@ -111,7 +97,6 @@ SEEE  IMMM    
  
 
 fResult = static_cast(lfDouble);
 }
-#endif
 
 // *** common methods *** -
 
commit 3a647dd08e29dfb18382ede5506e913e8bd3bc04
Author: Caolán McNamara 
AuthorDate: Sun May 26 15:04:50 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun May 26 20:18:36 2024 +0200

presumably __SIMPLE_FUNC is unused

Change-Id: I49cb3f981d913082bcf37b9142139c6831c79e87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168047
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/filter/ftools/ftools.cxx 
b/sc/source/filter/ftools/ftools.cxx
index bf2b784a994b..2f52cb183e99 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -42,6 +42,8 @@
 void ScfTools::ReadLongDouble(SvStream& rStrm, double& fResult)
 
 #ifdef __SIMPLE_FUNC// for <=VC 1.5
+
+#error PRESUMABLY_NEVER_USED
 {
 long double fRet;
 bool bOk = 10 == rStrm.Read(, 10);


core.git: 2 commits - hwpfilter/source vcl/source

2024-05-26 Thread Caolán McNamara (via logerrit)
 hwpfilter/source/hwpreader.cxx |   20 ++--
 vcl/source/gdi/metaact.cxx |3 +++
 2 files changed, 13 insertions(+), 10 deletions(-)

New commits:
commit 560f0f10a137f98ed2204bf8e00f892333d2dae8
Author: Caolán McNamara 
AuthorDate: Sun May 26 12:39:51 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun May 26 15:41:55 2024 +0200

ofz#69256 Integer-overflow

Change-Id: I564635a52282ee632a0c028199ec86dd4bff99a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168044
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 19ab84ff6c23..944a1e114128 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -372,6 +372,9 @@ MetaArcAction::MetaArcAction( const tools::Rectangle& rRect,
 
 void MetaArcAction::Execute( OutputDevice* pOut )
 {
+if (!AllowRect(pOut->LogicToPixel(maRect)))
+return;
+
 pOut->DrawArc( maRect, maStartPt, maEndPt );
 }
 
commit fda349ab8e834578fbefe9e9407d006eec47c7cd
Author:     Caolán McNamara 
AuthorDate: Sun May 26 12:35:19 2024 +0100
Commit:     Caolán McNamara 
CommitDate: Sun May 26 15:41:47 2024 +0200

ofz#69246 Integer-overflow

WTMM takes/returns a double anyway, so just promote earlier

Change-Id: I055fa7e7b155abfd15ef51335b34c2e6cfa8a209
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168043
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 63b5571b6fe2..2921ef5ff2f0 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -2013,19 +2013,19 @@ void HwpReader::makeDrawStyle( HWPDrawingObject * hdo, 
FBoxStyle * fstyle)
 
OUString::createFromAscii(ArrowShape[hdo->property.line_tstyle].name) );
 if( hdo->property.line_width > 100 )
  mxList->addAttribute(u"draw:marker-start-width"_ustr, 
sXML_CDATA,
-  OUString::number( WTMM(hdo->property.line_width 
* 3)) + "mm");
+  OUString::number( WTMM(hdo->property.line_width 
* 3.0)) + "mm");
 else if( hdo->property.line_width > 80 )
  mxList->addAttribute(u"draw:marker-start-width"_ustr, 
sXML_CDATA,
-  OUString::number( WTMM(hdo->property.line_width 
* 4)) + "mm");
+  OUString::number( WTMM(hdo->property.line_width 
* 4.0)) + "mm");
 else if( hdo->property.line_width > 60 )
  mxList->addAttribute(u"draw:marker-start-width"_ustr, 
sXML_CDATA,
-  OUString::number( WTMM(hdo->property.line_width 
* 5)) + "mm");
+  OUString::number( WTMM(hdo->property.line_width 
* 5.0)) + "mm");
 else if( hdo->property.line_width > 40 )
  mxList->addAttribute(u"draw:marker-start-width"_ustr, 
sXML_CDATA,
-  OUString::number( WTMM(hdo->property.line_width 
* 6)) + "mm");
+  OUString::number( WTMM(hdo->property.line_width 
* 6.0)) + "mm");
 else
  mxList->addAttribute(u"draw:marker-start-width"_ustr, 
sXML_CDATA,
-  OUString::number( WTMM(hdo->property.line_width 
* 7)) + "mm");
+  OUString::number( WTMM(hdo->property.line_width 
* 7.0)) + "mm");
 }
 
 if( hdo->property.line_hstyle > 0 &&
@@ -2035,19 +2035,19 @@ void HwpReader::makeDrawStyle( HWPDrawingObject * hdo, 
FBoxStyle * fstyle)
 
OUString::createFromAscii(ArrowShape[hdo->property.line_hstyle].name) );
 if( hdo->property.line_width > 100 )
  mxList->addAttribute(u"draw:marker-end-width"_ustr, 
sXML_CDATA,
-  OUString::number( WTMM(hdo->property.line_width 
* 3)) + "mm");
+  OUString::number( WTMM(hdo->property.line_width 
* 3.0)) + "mm");
 else if( hdo->property.line_width > 80 )
  mxList->addAttribute(u"draw:marker-end-width"_ustr, 
sXML_CDATA,
-  OUString::number( WTMM(hdo->property.line_width 
* 4)) + "mm");
+  OUString::number( WTMM(hdo->property.line_width 
* 4.0)) + "mm");
 else if( hdo->property.line_width > 60 )
  mxList->addAttribute(u"draw:marker-end-width"_

core.git: sc/source

2024-05-25 Thread Caolán McNamara (via logerrit)
 sc/source/filter/excel/xistyle.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d1e065ea7ac98c31997f1af9be82c5da18c38369
Author: Caolán McNamara 
AuthorDate: Sat May 25 20:15:41 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun May 26 00:51:48 2024 +0200

ofz#69215 Heap-use-after-free

maybe since?
commit 397d7af2cbb1f2786ba857d350fb4641525e3bb2
Date:   Wed May 22 15:03:40 2024 +0200

tdf#161210 speedup loading large XLS

==344604== Invalid read of size 4
==344604==at 0x1D74DEC5: XclImpXFRange::XclImpXFRange(int, int, 
XclImpXFIndex const&) (xistyle.hxx:555)
==344604==by 0x1D746AFB: XclImpXFRangeColumn::SetXF(int, XclImpXFIndex 
const&) (xistyle.cxx:1777)
==344604==by 0x1D747483: XclImpXFRangeBuffer::SetXF(ScAddress const&, 
unsigned short, XclImpXFRangeBuffer::XclImpXFInsertMode) (xistyle.cxx:1908)
==344604==by 0x1D747629: XclImpXFRangeBuffer::SetXF(ScAddress const&, 
unsigned short) (xistyle.cxx:1929)
==344604==by 0x1D2C0334: ImportExcel8::Labelsst() (excimp8.cxx:250)
==344604==by 0x1D32AB78: ImportExcel8::Read() (read.cxx:1196)
==344604==by 0x1D29FC2A: 
ScFormatFilterPluginImpl::ScImportExcel(SfxMedium&, ScDocument*, EXCIMPFORMAT) 
(excel.cxx:256)
==344604==by 0x1D2A28BC: TestImportXLS (excel.cxx:483)
==344604==by 0x405D76: sal_main_with_args(int, char**) 
(fftester.cxx:393)
==344604==by 0x40363D: main (fftester.cxx:100)
==344604==  Address 0x2ab5fc08 is 8 bytes inside a block of size 12 free'd
==344604==at 0x48463F3: operator delete(void*) 
(vg_replace_malloc.c:1051)
==344604==by 0x1D761DDC: 
std::__new_allocator::deallocate(XclImpXFRange*, unsigned long) 
(new_allocator.h:172)
==344604==by 0x1D761B27: std::__cxx1998::_Vector_base >::_M_deallocate(XclImpXFRange*, unsigned long) 
(allocator.h:210)
==344604==by 0x1D76170E: void std::__cxx1998::vector 
>::_M_realloc_insert(__gnu_cxx::__normal_iterator > >, 
XclImpXFRange&&) (vector.tcc:519)
==344604==by 0x1D763576: std::__cxx1998::vector 
>::_M_insert_rval(__gnu_cxx::__normal_iterator > >, 
XclImpXFRange&&) (vector.tcc:372)
==344604==by 0x1D763409: std::__cxx1998::vector 
>::_M_emplace_aux(__gnu_cxx::__normal_iterator > >, 
XclImpXFRange&&) (stl_vector.h:1887)
==344604==by 0x1D762F29: __gnu_cxx::__normal_iterator > > 
std::__cxx1998::vector 
>::emplace(__gnu_cxx::__normal_iterator > >, 
XclImpXFRange&&) (stl_vector.h:1344)
==344604==by 0x1D762CCB: 
__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator > >, 
std::__debug::vector >, 
std::random_access_iterator_tag> std::__debug::vector 
>::emplace(__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator > 
>, std::__debug::vector >, 
std::random_access_iterator_tag>, XclImpXFRange&&) (vector:545)
==344604==by 0x1D74E0FD: 
__gnu_cxx::__enable_if::__value, 
__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator > >, 
std::__debug::vector >, 
std::random_access_iterator_tag> >::__type std::__debug::vector 
>::insert(__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator > 
>, std::__debug::vector >, 
std::random_access_iterator_tag>, XclImpXFRange&&) (vector:580)
==344604==by 0x1D74712E: XclImpXFRangeColumn::Insert(XclImpXFRange, 
unsigned long) (xistyle.cxx:1798)
==344604==by 0x1D746AD8: XclImpXFRangeColumn::SetXF(int, XclImpXFIndex 
const&) (xistyle.cxx:1776)
==344604==by 0x1D747483: XclImpXFRangeBuffer::SetXF(ScAddress const&, 
unsigned short, XclImpXFRangeBuffer::XclImpXFInsertMode) (xistyle.cxx:1908)
==344604==  Block was alloc'd at
==344604==at 0x4842F95: operator new(unsigned long) 
(vg_replace_malloc.c:483)
==344604==by 0x1D761C4A: 
std::__new_allocator::allocate(unsigned long, void const*) 
(new_allocator.h:151)
==344604==by 0x1D761A33: std::__cxx1998::_Vector_base >::_M_allocate(unsigned long) (allocator.h:198)
==344604==by 0x1D7615F1: void std::__cxx1998::vector 
>::_M_realloc_insert(__gnu_cxx::__normal_iterator > >, 
XclImpXFRange&&) (vector.tcc:459)
==344604==by 0x1D76148D: XclImpXFRange& 
std::__cxx1998::vector 
>::emplace_back(XclImpXFRange&&) (vector.tcc:123)
==344604==by 0x1D761371: XclImpXFRange& 
std::__debug::vector 
>::emplace_back(XclImpXFRange&&) (vector:519)
==344604==by 0x1D74DE8C: 
__gnu_cxx::__enable_if::__value, 
void>::__type std::__debug::vector 
>::push_back(XclImpXFRange&&) (vector:508)
==344604==by 0x1D7467AD: 
XclImpXFRangeColumn::SetDefaultXF(XclImpXFIndex const&, XclImpRoot const&) 
(xistyle.cxx:1727)
==344604==by 0x1D7478A7: XclImpXFRangeBuffer::SetColumnDefXF(sh

Re: Make failed due to multiple definitions in zxing

2024-05-25 Thread Caolán McNamara
On Sat, 2024-05-25 at 16:12 +0200, Laurent Balland wrote:
> After "./g pull -r" and "make distclean && ./autogen.sh && make", I
> get the following errors (see attached file).

Did you always build with
--enable-pch=full
before without error? I happen to not typically use it on Linux so I
wonder if that's the difference.


core.git: external/libtiff

2024-05-25 Thread Caolán McNamara (via logerrit)
 external/libtiff/UnpackedTarball_libtiff.mk |1 +
 external/libtiff/ofz68840.patch |   17 +
 2 files changed, 18 insertions(+)

New commits:
commit 034b68eb3a015553254c7238b13db8f94514080d
Author: Caolán McNamara 
AuthorDate: Fri May 24 20:43:42 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 25 21:04:17 2024 +0200

ofz#68840 another putcontig8bitYCbCr22tile issue

Change-Id: I6e119cf1b3bec609f94784eb0c439835875d6112
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168031
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/external/libtiff/UnpackedTarball_libtiff.mk 
b/external/libtiff/UnpackedTarball_libtiff.mk
index 7f27c8d3fee7..dbd4c2c54d7c 100644
--- a/external/libtiff/UnpackedTarball_libtiff.mk
+++ b/external/libtiff/UnpackedTarball_libtiff.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libtiff,\
 external/libtiff/libtiff.linknolibs.patch \
 external/libtiff/0001-ofz-54685-Timeout.patch \
 external/libtiff/ofz65182.patch \
+external/libtiff/ofz68840.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libtiff/ofz68840.patch b/external/libtiff/ofz68840.patch
new file mode 100644
index ..0a8721ebe012
--- /dev/null
+++ b/external/libtiff/ofz68840.patch
@@ -0,0 +1,17 @@
+--- a/libtiff/tif_tile.c
 b/libtiff/tif_tile.c
+@@ -233,7 +233,13 @@
+ _TIFFMultiply64(tif, samplingrow_size, samplingblocks_ver, 
module));
+ }
+ else
+-return (_TIFFMultiply64(tif, nrows, TIFFTileRowSize64(tif), module));
++{
++uint64_t row_size = TIFFTileRowSize64(tif);
++/* I think the way this works the expectation is there are always 
even num of samples */
++if (td->td_photometric == PHOTOMETRIC_YCBCR)
++row_size = TIFFroundup_64(row_size, 2);
++return (_TIFFMultiply64(tif, nrows, row_size, module));
++}
+ }
+ tmsize_t TIFFVTileSize(TIFF *tif, uint32_t nrows)
+ {


core.git: 2 commits - sc/source

2024-05-24 Thread Caolán McNamara (via logerrit)
 sc/source/ui/undo/undotab.cxx |   51 --
 1 file changed, 25 insertions(+), 26 deletions(-)

New commits:
commit b227481b63000b556e648ad607ffeb86681482a0
Author: Caolán McNamara 
AuthorDate: Fri May 24 19:30:51 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 24 22:34:25 2024 +0200

pViewShell arg is never null, just use a reference here

Change-Id: I29b5e9084da5b5f0817ffad37e3e5496577372fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168029
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 3cdeaeed1f76..43f647debbd9 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -63,16 +63,16 @@ using ::std::vector;
 
 namespace
 {
-void lcl_OnTabsChanged(const ScTabViewShell* pViewShell, const ScDocument& 
rDoc, SCTAB nTab, bool bInvalidateTiles = false)
+void lcl_OnTabsChanged(const ScTabViewShell& rViewShell, const ScDocument& 
rDoc, SCTAB nTab, bool bInvalidateTiles = false)
 {
 for (SCTAB nTabIndex = nTab; nTabIndex < rDoc.GetTableCount(); ++nTabIndex)
 {
 if (!rDoc.IsVisible(nTabIndex))
 continue;
 if (bInvalidateTiles)
-pViewShell->libreOfficeKitViewInvalidateTilesCallback(nullptr, 
nTabIndex, 0);
+rViewShell.libreOfficeKitViewInvalidateTilesCallback(nullptr, 
nTabIndex, 0);
 ScTabViewShell::notifyAllViewsSheetGeomInvalidation(
-pViewShell,
+,
 true /* bColsAffected */, true /* bRowsAffected */,
 true /* bSizes*/, true /* bHidden */, true /* bFiltered */,
 true /* bGroups */, nTabIndex);
@@ -99,7 +99,7 @@ void lcl_MakeJsonArray(tools::JsonWriter& rJson, const 
std::vector& v, const
 }
 }
 
-void lcl_UndoCommandResult(const ScTabViewShell* pViewShell,
+void lcl_UndoCommandResult(const ScTabViewShell& rViewShell,
const char *pCmdName, const char *pCmdType,
const std::vector* pNewTabs,
const std::vector* pOldTabs = nullptr)
@@ -116,7 +116,7 @@ void lcl_UndoCommandResult(const ScTabViewShell* pViewShell,
 lcl_MakeJsonArray(aJson, *pOldTabs, "oldTabs");
 }
 
-pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_UNO_COMMAND_RESULT, 
aJson.finishAndGetAsOString());
+rViewShell.libreOfficeKitViewCallback(LOK_CALLBACK_UNO_COMMAND_RESULT, 
aJson.finishAndGetAsOString());
 }
 }
 
@@ -183,9 +183,9 @@ void ScUndoInsertTab::Undo()
 if (comphelper::LibreOfficeKit::isActive())
 {
 ScDocument& rDoc = pDocShell->GetDocument();
-lcl_OnTabsChanged(pViewShell, rDoc, nTab);
+lcl_OnTabsChanged(*pViewShell, rDoc, nTab);
 std::vector aTabs{nTab};
-lcl_UndoCommandResult(pViewShell, ".uno:Undo", "ScUndoInsertTab", 
);
+lcl_UndoCommandResult(*pViewShell, ".uno:Undo", "ScUndoInsertTab", 
);
 
 }
 
@@ -218,9 +218,9 @@ void ScUndoInsertTab::Redo()
 if (comphelper::LibreOfficeKit::isActive())
 {
 ScDocument& rDoc = pDocShell->GetDocument();
-lcl_OnTabsChanged(pViewShell, rDoc, nTab);
+lcl_OnTabsChanged(*pViewShell, rDoc, nTab);
 std::vector aTabs{nTab};
-lcl_UndoCommandResult(pViewShell, ".uno:Redo", "ScUndoInsertTab", 
);
+lcl_UndoCommandResult(*pViewShell, ".uno:Redo", "ScUndoInsertTab", 
);
 }
 }
 
@@ -450,8 +450,8 @@ void ScUndoDeleteTab::Undo()
 {
 if (pViewShell)
 {
-lcl_OnTabsChanged(pViewShell, rDoc, theTabs[0]);
-lcl_UndoCommandResult(pViewShell, ".uno:Undo", "ScUndoDeleteTab", 
);
+lcl_OnTabsChanged(*pViewShell, rDoc, theTabs[0]);
+lcl_UndoCommandResult(*pViewShell, ".uno:Undo", "ScUndoDeleteTab", 
);
 }
 }
 
@@ -493,8 +493,8 @@ void ScUndoDeleteTab::Redo()
 if (comphelper::LibreOfficeKit::isActive() && !theTabs.empty())
 {
 ScDocument& rDoc = pDocShell->GetDocument();
-lcl_OnTabsChanged(pViewShell, rDoc, theTabs[0]);
-lcl_UndoCommandResult(pViewShell, ".uno:Redo", "ScUndoDeleteTab", 
);
+lcl_OnTabsChanged(*pViewShell, rDoc, theTabs[0]);
+lcl_UndoCommandResult(*pViewShell, ".uno:Redo", "ScUndoDeleteTab", 
);
 }
 
 //  SetTabNo(...,sal_True) for all views to sync with drawing layer pages
@@ -653,8 +653,8 @@ void ScUndoMoveTab::DoChange( bool bUndo ) const
 const auto newTabsMinIt = std::min_element(mpNewTabs->begin(), 
mpNewTabs->end());
 const auto oldTabsMinIt = std::min_element(mpOldTabs->begin(), 
mpOldTabs->end());
 SCTAB nTab = std::min(*newTabsMinIt, *oldTabsMinIt);
-lcl

core.git: vcl/win

2024-05-24 Thread Caolán McNamara (via logerrit)
 vcl/win/gdi/salprn.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit da15cb3d111f65356726ee5ed15bd82c73d5ccce
Author: Caolán McNamara 
AuthorDate: Sat May 18 19:55:06 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 24 22:11:13 2024 +0200

use same pattern as elsewhere for consistency

Change-Id: I126fbbee916fd515a7057e3793f239e6f69748fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167835
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index 6edcc9ac2938..b43c59e27473 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -164,9 +164,9 @@ void WinSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* 
pList )
 if ( nBytes )
 {
 PRINTER_INFO_4W* pWinInfo4 = 
static_cast(std::malloc( nBytes ));
+assert(pWinInfo4 && "Don't handle OOM conditions");
 if ( EnumPrintersW( PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, 
nullptr, 4, reinterpret_cast(pWinInfo4), nBytes, ,  ) )
 {
-assert(pWinInfo4);
 for ( i = 0; i < nInfoPrn4; i++ )
 {
 std::unique_ptr pInfo(new 
SalPrinterQueueInfo);


core.git: vcl/win

2024-05-24 Thread Caolán McNamara (via logerrit)
 vcl/win/dtrans/APNDataObject.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c88ce0eb999f86ecde956c9444d9970b73e70551
Author: Caolán McNamara 
AuthorDate: Fri May 24 13:57:13 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 24 17:14:13 2024 +0200

fix up assert

Change-Id: Ib7276af8adc1e8e8957486b6e95db4005ce45b08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168020
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/vcl/win/dtrans/APNDataObject.cxx b/vcl/win/dtrans/APNDataObject.cxx
index e13561a87bc3..47dd481080b9 100644
--- a/vcl/win/dtrans/APNDataObject.cxx
+++ b/vcl/win/dtrans/APNDataObject.cxx
@@ -296,7 +296,7 @@ STDMETHODIMP CAPNDataObject::EnumDAdvise( IEnumSTATDATA ** 
ppenumAdvise )
 
 HRESULT CAPNDataObject::MarshalIDataObjectIntoCurrentApartment( IDataObject** 
ppIDataObj )
 {
-assert(nullptr && ppIDataObj);
+assert(ppIDataObj);
 
 *ppIDataObj = nullptr;
 HRESULT hr = E_FAIL;


core.git: Changes to 'refs/tags/cib-6.4-24-hotfix1'

2024-05-23 Thread Caolán McNamara (via logerrit)
Tag 'cib-6.4-24-hotfix1' created by Thorsten Behrens 
 at 2024-05-23 13:03 +

Release CIB Office cib-6.4-24-hotfix1
-BEGIN PGP SIGNATURE-

iNUEABYKAH0WIQRV78SO268/dhkw1IIeB5amgXyR5gUCZk8+j18UgAAuAChp
c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0NTVF
RkM0OEVEQkFGM0Y3NjE5MzBENDgyMUUwNzk2QTY4MTdDOTFFNgAKCRAeB5amgXyR
5lYcAP0WSq9/18qm2q7rx4n6fNplWjCIQqA491RhqgWgNVb8AQD/XlV4OzrA0eg2
ZISk9mB22fc3YeVs6CuEm2wJVEr2pws=
=Ugj4
-END PGP SIGNATURE-

Changes since cib-6.4-24:
Caolán McNamara (1):
  add notify for script use

---
 configure.ac|2 +-
 xmloff/source/draw/eventimp.cxx |3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
---


core.git: Branch 'distro/collabora/co-24.04' - sw/inc sw/source

2024-05-23 Thread Caolán McNamara (via logerrit)
 sw/inc/PostItMgr.hxx |2 +
 sw/source/uibase/docvw/PostItMgr.cxx |   40 +--
 2 files changed, 26 insertions(+), 16 deletions(-)

New commits:
commit 3d071fcde498e7c89ddef163f153400da0470199
Author: Caolán McNamara 
AuthorDate: Wed May 22 11:13:12 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 23 09:16:07 2024 +0200

split a piece of code out as a standalone GetOrCreateAnnotationWindow

Change-Id: I674d96976f265eeac719ed06a657af07aaae2325
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167954
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Pranam Lashkari 

diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 98d9f4f2ef30..f66e38748a64 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -172,6 +172,8 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr final : public 
SfxListener
 SwSidebarItem*  InsertItem( SfxBroadcaster* pItem, bool 
bCheckExistence, bool bFocus);
 voidRemoveItem( SfxBroadcaster* pBroadcast );
 
+VclPtr 
GetOrCreateAnnotationWindow(SwSidebarItem& rItem);
+
 public:
 SwPostItMgr(SwView* aDoc);
 virtual ~SwPostItMgr() override;
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index d9eaa7fa324a..0b74e9902f0b 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -698,6 +698,28 @@ void SwPostItMgr::PreparePageContainer()
 }
 }
 
+VclPtr 
SwPostItMgr::GetOrCreateAnnotationWindow(SwSidebarItem& rItem)
+{
+VclPtr pPostIt = rItem.mpPostIt;
+if (!pPostIt)
+{
+pPostIt = rItem.GetSidebarWindow( mpView->GetEditWin(),
+  *this );
+pPostIt->InitControls();
+pPostIt->SetReadonly(mbReadOnly);
+rItem.mpPostIt = pPostIt;
+if (mpAnswer)
+{
+if (pPostIt->GetPostItField()->GetParentPostItId() != 0) //do we 
really have another note in front of this one
+{
+pPostIt->InitAnswer(*mpAnswer);
+}
+mpAnswer.reset();
+}
+}
+return rItem.mpPostIt;
+}
+
 void SwPostItMgr::LayoutPostIts()
 {
 const bool bLoKitActive = comphelper::LibreOfficeKit::isActive();
@@ -727,24 +749,9 @@ void SwPostItMgr::LayoutPostIts()
 
 for (auto const& pItem : pPage->mvSidebarItems)
 {
-VclPtr pPostIt = pItem->mpPostIt;
-
 if (pItem->mbShow)
 {
-if (!pPostIt)
-{
-pPostIt = pItem->GetSidebarWindow( 
mpView->GetEditWin(),
-  *this );
-pPostIt->InitControls();
-pPostIt->SetReadonly(mbReadOnly);
-pItem->mpPostIt = pPostIt;
-if (mpAnswer)
-{
-if 
(pPostIt->GetPostItField()->GetParentPostItId() != 0) //do we really have 
another note in front of this one
-pPostIt->InitAnswer(*mpAnswer);
-mpAnswer.reset();
-}
-}
+VclPtr pPostIt = 
GetOrCreateAnnotationWindow(*pItem);
 
 pPostIt->SetChangeTracking(
 pItem->mLayoutStatus,
@@ -811,6 +818,7 @@ void SwPostItMgr::LayoutPostIts()
 }
 else // we don't want to see it
 {
+VclPtr pPostIt = pItem->mpPostIt;
 if (pPostIt)
 pPostIt->HideNote();
 }


core.git: sw/inc sw/source

2024-05-22 Thread Caolán McNamara (via logerrit)
 sw/inc/PostItMgr.hxx |2 +
 sw/source/uibase/docvw/PostItMgr.cxx |   40 +--
 2 files changed, 26 insertions(+), 16 deletions(-)

New commits:
commit 80f7f3e8099e05632201d7b18de0112153ebc1ba
Author: Caolán McNamara 
AuthorDate: Wed May 22 11:13:12 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 22 22:24:41 2024 +0200

split a piece of code out as a standalone GetOrCreateAnnotationWindow

Change-Id: I674d96976f265eeac719ed06a657af07aaae2325
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167931
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 2278ae05ea6f..1a6dac4a8f62 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -132,6 +132,8 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr final : public 
SfxListener
 SwSidebarItem*  InsertItem( SfxBroadcaster* pItem, bool 
bCheckExistence, bool bFocus);
 voidRemoveItem( SfxBroadcaster* pBroadcast );
 
+VclPtr 
GetOrCreateAnnotationWindow(SwSidebarItem& rItem);
+
 public:
 SwPostItMgr(SwView* aDoc);
 virtual ~SwPostItMgr() override;
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 32d0f938e71c..95eaea2a5557 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -695,6 +695,28 @@ void SwPostItMgr::PreparePageContainer()
 }
 }
 
+VclPtr 
SwPostItMgr::GetOrCreateAnnotationWindow(SwSidebarItem& rItem)
+{
+VclPtr pPostIt = rItem.mpPostIt;
+if (!pPostIt)
+{
+pPostIt = rItem.GetSidebarWindow( mpView->GetEditWin(),
+  *this );
+pPostIt->InitControls();
+pPostIt->SetReadonly(mbReadOnly);
+rItem.mpPostIt = pPostIt;
+if (mpAnswer)
+{
+if (pPostIt->GetPostItField()->GetParentPostItId() != 0) //do we 
really have another note in front of this one
+{
+pPostIt->InitAnswer(*mpAnswer);
+}
+mpAnswer.reset();
+}
+}
+return rItem.mpPostIt;
+}
+
 void SwPostItMgr::LayoutPostIts()
 {
 const bool bLoKitActive = comphelper::LibreOfficeKit::isActive();
@@ -724,24 +746,9 @@ void SwPostItMgr::LayoutPostIts()
 
 for (auto const& pItem : pPage->mvSidebarItems)
 {
-VclPtr pPostIt = pItem->mpPostIt;
-
 if (pItem->mbShow)
 {
-if (!pPostIt)
-{
-pPostIt = pItem->GetSidebarWindow( 
mpView->GetEditWin(),
-  *this );
-pPostIt->InitControls();
-pPostIt->SetReadonly(mbReadOnly);
-pItem->mpPostIt = pPostIt;
-if (mpAnswer)
-{
-if 
(pPostIt->GetPostItField()->GetParentPostItId() != 0) //do we really have 
another note in front of this one
-pPostIt->InitAnswer(*mpAnswer);
-mpAnswer.reset();
-}
-}
+VclPtr pPostIt = 
GetOrCreateAnnotationWindow(*pItem);
 
 pPostIt->SetChangeTracking(
 pItem->mLayoutStatus,
@@ -808,6 +815,7 @@ void SwPostItMgr::LayoutPostIts()
 }
 else // we don't want to see it
 {
+VclPtr pPostIt = pItem->mpPostIt;
 if (pPostIt)
 pPostIt->HideNote();
 }


core.git: Branch 'distro/collabora/co-24.04' - sw/source

2024-05-21 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 922581328e181292d9219dc775e2bb39af71
Author: Caolán McNamara 
AuthorDate: Tue May 21 12:51:20 2024 +0100
Commit: Aron Budea 
CommitDate: Tue May 21 13:54:26 2024 +0200

fix build break wrt ‘Wait’ is not a member of ‘PointerStyle’

Change-Id: Id5845e55a879fafbb5dc269b4179d87f7f94285b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167896
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx 
b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
index fab35b1b04b2..129b37713fe8 100644
--- a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
+++ b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 


core.git: Branch 'distro/collabora/co-24.04' - ucb/source

2024-05-21 Thread Caolán McNamara (via logerrit)
 ucb/source/ucp/webdav-curl/SerfLockStore.hxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 3f90d8ac41c6aa69047b13f264a5018996285e4d
Author: Caolán McNamara 
AuthorDate: Mon May 20 16:48:54 2024 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 21 11:56:27 2024 +0200

remove stray lines

Change-Id: I63aaa95921f79eea682ab82194b15083a9fa8fd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167873
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
Reviewed-by: Michael Meeks 

diff --git a/ucb/source/ucp/webdav-curl/SerfLockStore.hxx 
b/ucb/source/ucp/webdav-curl/SerfLockStore.hxx
index 08a88746b0d0..30c7fe1d407e 100644
--- a/ucb/source/ucp/webdav-curl/SerfLockStore.hxx
+++ b/ucb/source/ucp/webdav-curl/SerfLockStore.hxx
@@ -82,9 +82,6 @@ public:
 
 void refreshLocks();
 
-void joinThread();
-void restartThread();
-
 // comphelper::LibreOfficeKit::ThreadJoinable
 virtual bool joinThreads() override;
 virtual void startThreads() override;


core.git: forms/Library_frm.mk

2024-05-20 Thread Caolán McNamara (via logerrit)
 forms/Library_frm.mk |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 8b0b0164939e0350f4dced5a6f136b1cec9f4482
Author: Caolán McNamara 
AuthorDate: Sun May 19 20:28:53 2024 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 20 12:13:38 2024 +0200

don't need -I ... YaccTarget/connectivity/source/parse in forms

since:

commit f0c8312bc6630ed64f174acc6f65bb5172765951
Date:   Sat Feb 1 22:47:11 2020 +0100

tdf#42949 Fix IWYU warnings in forms/

Change-Id: I77835488ef0b19d4c271ad39018138cc371a352d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167849
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/forms/Library_frm.mk b/forms/Library_frm.mk
index 8fc09fc700d7..7b850fce1214 100644
--- a/forms/Library_frm.mk
+++ b/forms/Library_frm.mk
@@ -14,7 +14,6 @@ $(eval $(call gb_Library_set_include,frm,\
 -I$(SRCDIR)/forms/inc \
 -I$(SRCDIR)/forms/source/inc \
 -I$(SRCDIR)/forms/source/solar/inc \
-   -I$(WORKDIR)/YaccTarget/connectivity/source/parse \
 ))
 
 $(eval $(call 
gb_Library_set_precompiled_header,frm,forms/inc/pch/precompiled_frm))


Re: Compiling nearly every file now compiles sqlbison.cxx and/or sqlflex.cxx

2024-05-20 Thread Caolán McNamara
On Sun, 2024-05-19 at 20:26 -0400, Patrick Luby wrote:
> Any ideas? I’d like to just wrap a push/pop —implicit-fallthrough
> around whatever code compiles these sql* files.

Are you using ccache? Does blowing away that cache with ccache -C 
resolve it?

otherwise touch some file in vcl and what's the output of
make verbose=TRUE vcl.build?


Re: Compiling nearly every file now compiles sqlbison.cxx and/or sqlflex.cxx

2024-05-19 Thread Caolán McNamara
On Sun, 2024-05-19 at 16:30 -0400, Patrick Luby wrote:
> cd vcl && touch skia/gdiimpl.cxx && make

maybe adding -d to the end of the make might give a hint as to what
could be going on


Re: Compiling nearly every file now compiles sqlbison.cxx and/or sqlflex.cxx

2024-05-19 Thread Caolán McNamara
On Sun, 2024-05-19 at 13:22 -0400, Patrick Luby wrote:
> A couple of weeks ago I started seeing my builds slow down and my
> build log filled with compiler warnings in sqlbison.cxx and
> sqlflex.cxx on macOS.
> 
> Is anyone else seeing this? I see these warnings even when compiling
> files in vcl. Seems to me that something in the build is not working
> right since I see one of these files is recompiled for each and every
> other C++ file that is compiled.

That seems very odd. Checking a gerrit macos build log like
https://ci.libreoffice.org/job/gerrit_mac/167726/consoleFull
I just see the expected handful of sqlbison and sqlflex warnings as
those individual files are compiled once.

I can't see any reason why compiling vcl would have any connection to
something in connectivity.

What is your configure line? wondering if there is some
--enable-mergelibs or --enable-pch thing that could be a trigger.


core.git: Branch 'libreoffice-24-2' - sw/source

2024-05-19 Thread Caolán McNamara (via logerrit)
 sw/source/ui/frmdlg/frmpage.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit bf877f3e10c3a2ce7267335a0c9c7cd828c373ca
Author: Caolán McNamara 
AuthorDate: Sun May 19 15:08:14 2024 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun May 19 21:05:55 2024 +0200

Resolves: tdf#151382 we want to save the FN_KEEP_ASPECT_RATIO state

and not if it is implied to be toggled on by SwFormatFrameSize::SYNCED
in which case on "ok" FN_KEEP_ASPECT_RATIO is set from the ui state

so both tdf#151382 and tdf132591 work

Change-Id: I039de0e8f0f9adcc3c02f0e07c12d83cd807887b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167816
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index b3e2a873ad18..8a7ec8d4ffe0 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2306,6 +2306,8 @@ void SwFramePage::Init(const SfxItemSet& rSet)
 
 if (SfxItemState::SET == rSet.GetItemState(FN_KEEP_ASPECT_RATIO))
 m_xFixedRatioCB->set_active(rSet.Get(FN_KEEP_ASPECT_RATIO).GetValue());
+// see tdf#132591 and tdf#151382 for some examples of FN_KEEP_ASPECT_RATIO 
cases
+m_xFixedRatioCB->save_state();
 
 // columns
 SwFormatCol aCol( rSet.Get(RES_COL) );
@@ -2364,7 +2366,6 @@ void SwFramePage::Init(const SfxItemSet& rSet)
 
 if (rSize.GetWidthPercent() == SwFormatFrameSize::SYNCED || 
rSize.GetHeightPercent() == SwFormatFrameSize::SYNCED)
 m_xFixedRatioCB->set_active(true);
-m_xFixedRatioCB->save_state();
 if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 
SwFormatFrameSize::SYNCED &&
 !m_xRelWidthCB->get_active())
 {


core.git: Branch 'libreoffice-24-2' - include/svtools svtools/source

2024-05-19 Thread Caolán McNamara (via logerrit)
 include/svtools/editbrowsebox.hxx |2 ++
 svtools/source/brwbox/ebbcontrols.cxx |6 ++
 2 files changed, 8 insertions(+)

New commits:
commit 7472bf01dee87a45aa3345397ae6f072f5d57058
Author: Caolán McNamara 
AuthorDate: Fri May 17 21:36:40 2024 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun May 19 20:33:43 2024 +0200

Resolves: tdf#161133 read-only widget should have deactivated calendar

a problem since:

commit 6e7e19d9c300dbdd279789b09f94781e946fad52
Date:   Wed Jul 15 12:10:32 2020 +0100

weld DateControl

Change-Id: I367c4237903655ad02c0c4af70ae0383b8a89f25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167811
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/include/svtools/editbrowsebox.hxx 
b/include/svtools/editbrowsebox.hxx
index c89a396a9dc7..6a581d4e7305 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -829,6 +829,8 @@ namespace svt
 
 void SetDate(const Date& rDate);
 
+virtual void SetEditableReadOnly(bool bReadOnly) override;
+
 virtual void dispose() override;
 private:
 std::unique_ptr m_xMenuButton;
diff --git a/svtools/source/brwbox/ebbcontrols.cxx 
b/svtools/source/brwbox/ebbcontrols.cxx
index 45b1a3766e76..761fd32b3fa7 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -586,6 +586,12 @@ namespace svt
 m_xCalendar->set_date(rDate);
 }
 
+void DateControl::SetEditableReadOnly(bool bReadOnly)
+{
+FormattedControlBase::SetEditableReadOnly(bReadOnly);
+m_xMenuButton->set_sensitive(!bReadOnly);
+}
+
 void DateControl::dispose()
 {
 m_xTodayBtn.reset();


core.git: Branch 'libreoffice-24-2' - include/vcl svx/source vcl/inc vcl/source vcl/unx

2024-05-19 Thread Caolán McNamara (via logerrit)
 include/vcl/weld.hxx   |4 
 svx/source/fmcomp/gridcell.cxx |   11 +--
 vcl/inc/salvtables.hxx |2 ++
 vcl/source/app/salvtables.cxx  |2 ++
 vcl/unx/gtk3/gtkinst.cxx   |   16 +++-
 5 files changed, 32 insertions(+), 3 deletions(-)

New commits:
commit 07e6ed881032d1df3ec96c93f5e6c502e021eeb6
Author: Caolán McNamara 
AuthorDate: Sat May 18 21:17:01 2024 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun May 19 20:33:05 2024 +0200

Resolves: tdf#157453 support FM_PROP_LINECOUNT for combobox dropdow rows

Change-Id: I3d18ed505c2eea7305903f9a476c332db0148113
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167814
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index fc585bdb1071..2a4e1ef084b6 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -889,6 +889,10 @@ public:
 virtual void set_max_mru_count(int nCount) = 0;
 virtual OUString get_mru_entries() const = 0;
 virtual void set_mru_entries(const OUString& rEntries) = 0;
+
+// Backwards compatibility, should be avoided to allow
+// UI consistency.
+virtual void set_max_drop_down_rows(int nRows) = 0;
 };
 
 enum class ColumnToggleType
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index e8c56fb0ac38..2f17f7f3a490 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2629,9 +2629,16 @@ void DbListBox::Init(BrowserDataWin& rParent, const 
Reference< XRowSet >& xCurso
 DbCellControl::Init( rParent, xCursor );
 }
 
-void DbListBox::implAdjustGenericFieldSetting( const Reference< XPropertySet 
>& /*rxModel*/ )
+void DbListBox::implAdjustGenericFieldSetting(const Reference& 
_rxModel)
 {
-// ignore FM_PROP_LINECOUNT
+DBG_ASSERT( m_pWindow, "DbListBox::implAdjustGenericFieldSetting: not to 
be called without window!" );
+DBG_ASSERT( _rxModel.is(), "DbListBox::implAdjustGenericFieldSetting: 
invalid model!" );
+if ( m_pWindow && _rxModel.is() )
+{
+sal_Int16  nLines   = getINT16( _rxModel->getPropertyValue( 
FM_PROP_LINECOUNT ) );
+weld::ComboBox& rComboBox = 
static_cast(m_pWindow.get())->get_widget();
+rComboBox.set_max_drop_down_rows(nLines);
+}
 }
 
 CellControllerRef DbListBox::CreateController() const
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 4074e097a4f4..d6d3a90ce2e4 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -922,6 +922,8 @@ public:
 return 20 * (pDefault ? pDefault->GetDPIScaleFactor() : 1.0);
 }
 
+void set_max_drop_down_rows(int nRows) override { 
m_xComboBox->SetDropDownLineCount(nRows); }
+
 void CallHandleEventListener(VclWindowEvent& rEvent)
 {
 if (rEvent.GetId() == VclEventId::DropdownPreOpen
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index faf645fc7943..8dc0edf814fd 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -6927,6 +6927,8 @@ public:
 
 virtual void set_mru_entries(const OUString&) override { assert(false && 
"not implemented"); }
 
+virtual void set_max_drop_down_rows(int) override { assert(false && "not 
implemented"); }
+
 virtual void set_item_menu(const OUString&, weld::Menu*) override
 {
 assert(false && "not implemented");
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index a899fc16c606..6a06947d4cd2 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -21034,6 +21034,11 @@ public:
 #endif
 }
 
+virtual void set_max_drop_down_rows(int) override
+{
+SAL_WARN( "vcl.gtk", "set_max_drop_down_rows unimplemented");
+}
+
 virtual ~GtkInstanceComboBox() override
 {
 //m_xCustomMenuButtonHelper.reset();
@@ -21114,6 +21119,7 @@ private:
 gint m_nPrePopupCursorPos;
 int m_nMRUCount;
 int m_nMaxMRUCount;
+int m_nMaxDropdownRows;
 
 static gboolean idleAutoComplete(gpointer widget)
 {
@@ -21236,7 +21242,7 @@ private:
 {
 const StyleSettings& rSettings = 
Application::GetSettings().GetStyleSettings();
 
-int nMaxRows = rSettings.GetListBoxMaximumLineCount();
+int nMaxRows = m_nMaxDropdownRows == -1 ? 
rSettings.GetListBoxMaximumLineCount() : m_nMaxDropdownRows;
 bool bAddScrollWidth = false;
 int nRows = get_count_including_mru();
 if (nMaxRows < nRows)
@@ -22154,6 +22160,7 @@ public:
 , m_nPrePopupCursorPos(-1)
 , m_nMRUCount(0)
 , m_nMaxMRUCount(0)
+, m_nMaxDropdownRows(-1)
 {
 int nActive = gtk_combo_box_get_active(m_pComboBox);
 
@@ -22838,6 +22845,11 @@ public:
 return nWidth;

core.git: sw/source

2024-05-19 Thread Caolán McNamara (via logerrit)
 sw/source/ui/frmdlg/frmpage.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d0702a3f17c1fbd1b8ffb9ca0b275943e1a1f442
Author: Caolán McNamara 
AuthorDate: Sun May 19 15:08:14 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun May 19 20:08:15 2024 +0200

Resolves: tdf#151382 we want to save the FN_KEEP_ASPECT_RATIO state

and not if it is implied to be toggled on by SwFormatFrameSize::SYNCED
in which case on "ok" FN_KEEP_ASPECT_RATIO is set from the ui state

so both tdf#151382 and tdf132591 work

Change-Id: I039de0e8f0f9adcc3c02f0e07c12d83cd807887b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167845
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 6d6a1fefd49a..589af7dbb0a0 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2321,6 +2321,8 @@ void SwFramePage::Init(const SfxItemSet& rSet)
 
 if (SfxItemState::SET == rSet.GetItemState(FN_KEEP_ASPECT_RATIO))
 m_xFixedRatioCB->set_active(rSet.Get(FN_KEEP_ASPECT_RATIO).GetValue());
+// see tdf#132591 and tdf#151382 for some examples of FN_KEEP_ASPECT_RATIO 
cases
+m_xFixedRatioCB->save_state();
 
 // columns
 SwFormatCol aCol( rSet.Get(RES_COL) );
@@ -2379,7 +2381,6 @@ void SwFramePage::Init(const SfxItemSet& rSet)
 
 if (rSize.GetWidthPercent() == SwFormatFrameSize::SYNCED || 
rSize.GetHeightPercent() == SwFormatFrameSize::SYNCED)
 m_xFixedRatioCB->set_active(true);
-m_xFixedRatioCB->save_state();
 if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 
SwFormatFrameSize::SYNCED &&
 !m_xRelWidthCB->get_active())
 {


core.git: include/vcl svx/source vcl/inc vcl/source vcl/unx

2024-05-19 Thread Caolán McNamara (via logerrit)
 include/vcl/weld.hxx   |4 
 svx/source/fmcomp/gridcell.cxx |   11 +--
 vcl/inc/salvtables.hxx |2 ++
 vcl/source/app/salvtables.cxx  |2 ++
 vcl/unx/gtk3/gtkinst.cxx   |   16 +++-
 5 files changed, 32 insertions(+), 3 deletions(-)

New commits:
commit c5fb86f91c3d799cb3817706a5c9a344939a4f1e
Author: Caolán McNamara 
AuthorDate: Sat May 18 21:17:01 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun May 19 16:44:09 2024 +0200

Resolves: tdf#157453 support FM_PROP_LINECOUNT for combobox dropdow rows

Change-Id: I3d18ed505c2eea7305903f9a476c332db0148113
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167837
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index bd394dc5d3bc..c3a688d84be0 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -889,6 +889,10 @@ public:
 virtual void set_max_mru_count(int nCount) = 0;
 virtual OUString get_mru_entries() const = 0;
 virtual void set_mru_entries(const OUString& rEntries) = 0;
+
+// Backwards compatibility, should be avoided to allow
+// UI consistency.
+virtual void set_max_drop_down_rows(int nRows) = 0;
 };
 
 enum class ColumnToggleType
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 31128317f9cc..8d728384cd5c 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2629,9 +2629,16 @@ void DbListBox::Init(BrowserDataWin& rParent, const 
Reference< XRowSet >& xCurso
 DbCellControl::Init( rParent, xCursor );
 }
 
-void DbListBox::implAdjustGenericFieldSetting( const Reference< XPropertySet 
>& /*rxModel*/ )
+void DbListBox::implAdjustGenericFieldSetting(const Reference& 
_rxModel)
 {
-// ignore FM_PROP_LINECOUNT
+DBG_ASSERT( m_pWindow, "DbListBox::implAdjustGenericFieldSetting: not to 
be called without window!" );
+DBG_ASSERT( _rxModel.is(), "DbListBox::implAdjustGenericFieldSetting: 
invalid model!" );
+if ( m_pWindow && _rxModel.is() )
+{
+sal_Int16  nLines   = getINT16( _rxModel->getPropertyValue( 
FM_PROP_LINECOUNT ) );
+weld::ComboBox& rComboBox = 
static_cast(m_pWindow.get())->get_widget();
+rComboBox.set_max_drop_down_rows(nLines);
+}
 }
 
 CellControllerRef DbListBox::CreateController() const
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 54abb89ffa21..984baf4e61b8 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -923,6 +923,8 @@ public:
 return 20 * (pDefault ? pDefault->GetDPIScaleFactor() : 1.0);
 }
 
+void set_max_drop_down_rows(int nRows) override { 
m_xComboBox->SetDropDownLineCount(nRows); }
+
 void CallHandleEventListener(VclWindowEvent& rEvent)
 {
 if (rEvent.GetId() == VclEventId::DropdownPreOpen
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 4df7d6ad38fa..e086def8434c 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -6910,6 +6910,8 @@ public:
 
 virtual void set_mru_entries(const OUString&) override { assert(false && 
"not implemented"); }
 
+virtual void set_max_drop_down_rows(int) override { assert(false && "not 
implemented"); }
+
 virtual void set_item_menu(const OUString&, weld::Menu*) override
 {
 assert(false && "not implemented");
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index cb71fabe81af..f9b087e25f4e 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -21032,6 +21032,11 @@ public:
 #endif
 }
 
+virtual void set_max_drop_down_rows(int) override
+{
+SAL_WARN( "vcl.gtk", "set_max_drop_down_rows unimplemented");
+}
+
 virtual ~GtkInstanceComboBox() override
 {
 //m_xCustomMenuButtonHelper.reset();
@@ -21112,6 +21117,7 @@ private:
 gint m_nPrePopupCursorPos;
 int m_nMRUCount;
 int m_nMaxMRUCount;
+int m_nMaxDropdownRows;
 
 static gboolean idleAutoComplete(gpointer widget)
 {
@@ -21234,7 +21240,7 @@ private:
 {
 const StyleSettings& rSettings = 
Application::GetSettings().GetStyleSettings();
 
-int nMaxRows = rSettings.GetListBoxMaximumLineCount();
+int nMaxRows = m_nMaxDropdownRows == -1 ? 
rSettings.GetListBoxMaximumLineCount() : m_nMaxDropdownRows;
 bool bAddScrollWidth = false;
 int nRows = get_count_including_mru();
 if (nMaxRows < nRows)
@@ -22152,6 +22158,7 @@ public:
 , m_nPrePopupCursorPos(-1)
 , m_nMRUCount(0)
 , m_nMaxMRUCount(0)
+, m_nMaxDropdownRows(-1)
 {
 int nActive = gtk_combo_box_get_active(m_pComboBox);
 
@@ -22863,6 +22870,11 @@ public:
 return nWidth;

core.git: sw/source

2024-05-19 Thread Caolán McNamara (via logerrit)
 sw/source/core/unocore/unosect.cxx |2 +-
 sw/source/core/unocore/unotbl.cxx  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 445ee505b63686161962abfe7a2aaafe8a03b4be
Author: Caolán McNamara 
AuthorDate: Sun May 19 12:15:24 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun May 19 16:34:30 2024 +0200

cid#1598293 silence Unchecked return value

and

cid#1598292 Unchecked return value

Change-Id: I9880932b8fb2340ec122c907aea0374881238283
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167843
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/core/unocore/unosect.cxx 
b/sw/source/core/unocore/unosect.cxx
index 5f48f9580bc4..d85a90736866 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -1607,7 +1607,7 @@ SwXTextSection::getPropertyDefault(const OUString& 
rPropertyName)
 case  FN_UNO_ANCHOR_TYPES:
 case  FN_UNO_TEXT_WRAP:
 case  FN_UNO_ANCHOR_TYPE:
-::sw::GetDefaultTextContentValue(aRet, u"", pEntry->nWID);
+(void)::sw::GetDefaultTextContentValue(aRet, u"", pEntry->nWID);
 break;
 default:
 if(pFormat && SfxItemPool::IsWhich(pEntry->nWID))
diff --git a/sw/source/core/unocore/unotbl.cxx 
b/sw/source/core/unocore/unotbl.cxx
index 1ecefa2eb2a9..f9ce9aa23b6e 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2713,7 +2713,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& 
rPropertyName)
 case  FN_UNO_ANCHOR_TYPES:
 case  FN_UNO_TEXT_WRAP:
 case  FN_UNO_ANCHOR_TYPE:
-::sw::GetDefaultTextContentValue(
+(void)::sw::GetDefaultTextContentValue(
 aRet, u"", pEntry->nWID);
 break;
 


core.git: sw/source

2024-05-19 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/app/apphdl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7e36bbd142ea80969c15f384759102d8175dedc3
Author: Caolán McNamara 
AuthorDate: Sun May 19 12:13:15 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun May 19 15:25:18 2024 +0200

cid#1598236 silence Unchecked return value

Change-Id: Id5dfed646336847607df0bd2fd10d345ac8ed64e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167842
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 03657db5447f..28c766b3d3b1 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -414,7 +414,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( 
const SfxItemSet * pArgs
 const css::uno::Sequence< OUString > vPackages{ 
"libreoffice-base" };
 xSyncDbusSessionHelper->InstallPackageNames(vPackages, 
OUString());
 SolarMutexGuard aGuard;
-executeRestartDialog(comphelper::getProcessComponentContext(), 
nullptr, RESTART_REASON_MAILMERGE_INSTALL);
+
(void)executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, 
RESTART_REASON_MAILMERGE_INSTALL);
 }
 catch (const css::uno::Exception &)
 {


core.git: sd/source

2024-05-18 Thread Caolán McNamara (via logerrit)
 sd/source/ui/view/drviewsk.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 5e23cac5767c164b93491d46deef039409ea286c
Author: Caolán McNamara 
AuthorDate: Fri May 17 22:00:07 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 18 22:00:20 2024 +0200

Resolves: tdf#161057 draw/impress auto font color not updated on theme 
change

Change-Id: Id3d02c38e3bbda34f65f5623fff1a5f39238e46a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167803
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sd/source/ui/view/drviewsk.cxx b/sd/source/ui/view/drviewsk.cxx
index 92a00d5d2ded..bdbb821e96b3 100644
--- a/sd/source/ui/view/drviewsk.cxx
+++ b/sd/source/ui/view/drviewsk.cxx
@@ -23,7 +23,9 @@ void DrawViewShell::ConfigurationChanged( 
utl::ConfigurationBroadcaster* pCb, Co
 {
 svtools::ColorConfig *pColorConfig = 
dynamic_cast(pCb);
 ConfigureAppBackgroundColor(pColorConfig);
-if (comphelper::LibreOfficeKit::isActive())
+if (!comphelper::LibreOfficeKit::isActive())
+maViewOptions.mnDocBackgroundColor = 
pColorConfig->GetColorValue(svtools::DOCCOLOR).nColor;
+else
 {
 SfxViewShell* pCurrentShell = SfxViewShell::Current();
 ViewShellBase* pShellBase = 
dynamic_cast(pCurrentShell);


core.git: sd/source

2024-05-18 Thread Caolán McNamara (via logerrit)
 sd/source/ui/framework/module/NotesPaneModule.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 64557ef9fa57507455f196dd3c96e8a25be64c53
Author: Caolán McNamara 
AuthorDate: Fri May 17 19:36:45 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 18 21:23:41 2024 +0200

cid#1598235 Uninitialized pointer field

Change-Id: I8c403a0bcfa56e58fdf12cb045c98b2087889235
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167794
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sd/source/ui/framework/module/NotesPaneModule.hxx 
b/sd/source/ui/framework/module/NotesPaneModule.hxx
index 69a74acbdf0c..229b61e71a89 100644
--- a/sd/source/ui/framework/module/NotesPaneModule.hxx
+++ b/sd/source/ui/framework/module/NotesPaneModule.hxx
@@ -73,7 +73,7 @@ private:
 
 std::set maActiveMainViewContainer;
 OUString msCurrentMainViewURL;
-ViewShellBase* mpViewShellBase;
+ViewShellBase* mpViewShellBase = nullptr;
 bool mbListeningEventMultiplexer = false;
 bool mbInMasterEditMode = false;
 


core.git: include/svtools svtools/source

2024-05-18 Thread Caolán McNamara (via logerrit)
 include/svtools/editbrowsebox.hxx |2 ++
 svtools/source/brwbox/ebbcontrols.cxx |6 ++
 2 files changed, 8 insertions(+)

New commits:
commit 29ec8099d078182ea461e278c13d4ab869ae3cd9
Author: Caolán McNamara 
AuthorDate: Fri May 17 21:36:40 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 18 16:34:57 2024 +0200

Resolves: tdf#161133 read-only widget should have deactivated calendar

a problem since:

commit 6e7e19d9c300dbdd279789b09f94781e946fad52
Date:   Wed Jul 15 12:10:32 2020 +0100

weld DateControl

Change-Id: I367c4237903655ad02c0c4af70ae0383b8a89f25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167802
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/svtools/editbrowsebox.hxx 
b/include/svtools/editbrowsebox.hxx
index 9dcc6440bb81..8acd3fd760c9 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -829,6 +829,8 @@ namespace svt
 
 void SetDate(const Date& rDate);
 
+virtual void SetEditableReadOnly(bool bReadOnly) override;
+
 virtual void dispose() override;
 private:
 std::unique_ptr m_xMenuButton;
diff --git a/svtools/source/brwbox/ebbcontrols.cxx 
b/svtools/source/brwbox/ebbcontrols.cxx
index 06500b48e0d2..71fc13dde91f 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -586,6 +586,12 @@ namespace svt
 m_xCalendar->set_date(rDate);
 }
 
+void DateControl::SetEditableReadOnly(bool bReadOnly)
+{
+FormattedControlBase::SetEditableReadOnly(bReadOnly);
+m_xMenuButton->set_sensitive(!bReadOnly);
+}
+
 void DateControl::dispose()
 {
 m_xTodayBtn.reset();


core.git: canvas/workben

2024-05-18 Thread Caolán McNamara (via logerrit)
 canvas/workben/canvasdemo.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f0902472462334d76fb3773de7e769590603c0d3
Author: Caolán McNamara 
AuthorDate: Fri May 17 19:38:48 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 18 16:27:04 2024 +0200

cid#1598237 Uncaught exception

Change-Id: Iab0a585048d028fda27a8b3edaad666edd0f55b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167796
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx
index 175a11222b2b..e910353dd5f4 100644
--- a/canvas/workben/canvasdemo.cxx
+++ b/canvas/workben/canvasdemo.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -624,7 +625,7 @@ int DemoApp::Main()
 }
 
 ScopedVclPtr aWindow = VclPtr::Create();
-aWindow->Show();
+suppress_fun_call_w_exception(aWindow->Show());
 
 Application::Execute();
 return 0;


core.git: sc/source

2024-05-18 Thread Caolán McNamara (via logerrit)
 sc/source/ui/cctrl/checklistmenu.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit b2dc515e2a3c8420c7f39c0b4396632c2086126a
Author: Caolán McNamara 
AuthorDate: Fri May 17 21:05:56 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 18 14:02:35 2024 +0200

Related: tdf#146326 restore correct focus when on submenu launched

we still "cancel" a submenu if it never gets around to getting launched
so at least set the restore focus wiget to where we initially grab focus.

Change-Id: Ida157823a282d08ca908c20f0135db61881adb7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167798
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 1d720cb3b0dd..45202de94fb4 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -686,11 +686,15 @@ 
ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScViewData
 void ScCheckListMenuControl::GrabFocus()
 {
 if (mxEdSearch->get_visible())
+{
 mxEdSearch->grab_focus();
+meRestoreFocus = RestoreFocus::EdSearch;
+}
 else
 {
 mxMenu->set_cursor(0);
 mxMenu->grab_focus();
+meRestoreFocus = RestoreFocus::Menu;
 }
 }
 


core.git: sfx2/source

2024-05-18 Thread Caolán McNamara (via logerrit)
 sfx2/source/doc/objxtor.cxx  |6 +++---
 sfx2/source/view/viewfrm.cxx |8 
 sfx2/source/view/viewsh.cxx  |8 
 3 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit fe599b2e081aa671d19ccbcea922c201f66eb955
Author: Caolán McNamara 
AuthorDate: Fri May 17 17:01:47 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 18 11:34:09 2024 +0200

drop SAL_RET_MAYBENULL from bodies

looks like we can get away without it and its tidier for us
if we don't need to do it

Change-Id: I29a68724a0cd2f33367c700b11c0d40397f607cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167788
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index deb64e6186ac..592b1e7468a5 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -458,7 +458,7 @@ OUString SfxObjectShell::CreateShellID( const 
SfxObjectShell* pShell )
 
 // returns a pointer the first SfxDocument of specified type
 
-SAL_RET_MAYBENULL SfxObjectShell* SfxObjectShell::GetFirst
+SfxObjectShell* SfxObjectShell::GetFirst
 (
 const std::function& isObjectShell,
 bool  bOnlyVisible
@@ -483,7 +483,7 @@ SAL_RET_MAYBENULL SfxObjectShell* SfxObjectShell::GetFirst
 
 // returns a pointer to the next SfxDocument of specified type behind *pDoc
 
-SAL_RET_MAYBENULL SfxObjectShell* SfxObjectShell::GetNext
+SfxObjectShell* SfxObjectShell::GetNext
 (
 const SfxObjectShell&   rPrev,
 const std::function& isObjectShell,
@@ -512,7 +512,7 @@ SAL_RET_MAYBENULL SfxObjectShell* SfxObjectShell::GetNext
 return nullptr;
 }
 
-SAL_RET_MAYBENULL SfxObjectShell* SfxObjectShell::Current()
+SfxObjectShell* SfxObjectShell::Current()
 {
 SfxViewFrame *pFrame = SfxViewFrame::Current();
 return pFrame ? pFrame->GetObjectShell() : nullptr;
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 1838700e9cb1..c77de75697fc 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -2067,14 +2067,14 @@ void SfxViewFrame::KillDispatcher_Impl()
 }
 }
 
-SAL_RET_MAYBENULL SfxViewFrame* SfxViewFrame::Current()
+SfxViewFrame* SfxViewFrame::Current()
 {
 SfxApplication* pApp = SfxApplication::Get();
 return pApp ? pApp->Get_Impl()->pViewFrame : nullptr;
 }
 
 // returns the first window of spec. type viewing the specified doc.
-SAL_RET_MAYBENULL SfxViewFrame* SfxViewFrame::GetFirst
+SfxViewFrame* SfxViewFrame::GetFirst
 (
 const SfxObjectShell*   pDoc,
 boolbOnlyIfVisible
@@ -2097,7 +2097,7 @@ SAL_RET_MAYBENULL SfxViewFrame* SfxViewFrame::GetFirst
 }
 
 // returns the next window of spec. type viewing the specified doc.
-SAL_RET_MAYBENULL SfxViewFrame* SfxViewFrame::GetNext
+SfxViewFrame* SfxViewFrame::GetNext
 (
 const SfxViewFrame& rPrev,
 const SfxObjectShell*   pDoc,
@@ -2448,7 +2448,7 @@ SfxViewFrame* SfxViewFrame::DisplayNewDocument( 
SfxObjectShell const & i_rDoc, c
 );
 }
 
-SAL_RET_MAYBENULL SfxViewFrame* SfxViewFrame::Get( const Reference< 
XController>& i_rController, const SfxObjectShell* i_pDoc )
+SfxViewFrame* SfxViewFrame::Get( const Reference< XController>& i_rController, 
const SfxObjectShell* i_pDoc )
 {
 if ( !i_rController.is() )
 return nullptr;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 5204f8306c67..df122f41054f 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -2835,7 +2835,7 @@ bool SfxViewShell::PrepareClose
 return true;
 }
 
-SAL_RET_MAYBENULL SfxViewShell* SfxViewShell::Current()
+SfxViewShell* SfxViewShell::Current()
 {
 SfxViewFrame *pCurrent = SfxViewFrame::Current();
 return pCurrent ? pCurrent->GetViewShell() : nullptr;
@@ -2849,7 +2849,7 @@ bool SfxViewShell::IsCurrentLokViewReadOnly()
 return pCurrent && pCurrent->IsLokReadOnlyView();
 }
 
-SAL_RET_MAYBENULL SfxViewShell* SfxViewShell::Get( const Reference< 
XController>& i_rController )
+SfxViewShell* SfxViewShell::Get( const Reference< XController>& i_rController )
 {
 if ( !i_rController.is() )
 return nullptr;
@@ -3009,7 +3009,7 @@ void SfxViewShell::WriteUserDataSequence ( uno::Sequence 
< beans::PropertyValue
 
 
 // returns the first shell of spec. type viewing the specified doc.
-SAL_RET_MAYBENULL SfxViewShell* SfxViewShell::GetFirst
+SfxViewShell* SfxViewShell::GetFirst
 (
 bool  bOnlyVisible,
 const std::function< bool ( const SfxViewShell& ) >& isViewShell
@@ -3038,7 +3038,7 @@ SAL_RET_MAYBENULL SfxViewShell* SfxViewShell::GetFirst
 }
 
 // returns the next shell of spec. type viewing the specified doc.
-SAL_RET_MAYBENULL SfxViewShell* SfxViewShell::GetNext
+SfxViewShell* SfxViewShell::GetNext
 (
 const SfxViewShell& rPrev,
 boolbOnlyVisible,


core.git: Branch 'feature/cib_contract57d' - 31 commits - avmedia/source configure.ac dbaccess/source download.lst drawinglayer/source embeddedobj/source external/curl external/liblangtag external/lib

2024-05-17 Thread Caolán McNamara (via logerrit)
Rebased ref, commits from common ancestor:
commit 7e50a30160bbe8df1d03c03d6a0cd8c837f16269
Author: Caolán McNamara 
AuthorDate: Thu Jan 4 17:00:06 2024 +
Commit: Thorsten Behrens 
CommitDate: Fri May 17 21:50:26 2024 +0200

std::size/SAL_N_ELEMENTS also counts the null terminator

which libxml2 2.12 will fail on with error:

'Extra content at the end of the document'

Change-Id: I9d5da9fdd826cce8462ede8c510eaea7281b760f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161627
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit cbb17a548b5cc6a99b6ed7735479bb4f2bc40f26)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161643
Reviewed-by: Xisco Fauli 

diff --git a/unoxml/qa/unit/domtest.cxx b/unoxml/qa/unit/domtest.cxx
index 15e337772314..0129c85cfe4b 100644
--- a/unoxml/qa/unit/domtest.cxx
+++ b/unoxml/qa/unit/domtest.cxx
@@ -207,9 +207,9 @@ struct BasicTest : public test::BootstrapFixture
 mxErrHandler.set( new ErrorHandler() );
 uno::Reference xDB( 
getMultiServiceFactory()->createInstance("com.sun.star.xml.dom.DocumentBuilder"),
 uno::UNO_QUERY_THROW );
 mxDomBuilder.set( xDB );
-mxValidInStream.set( new 
SequenceInputStream(css::uno::Sequence(reinterpret_cast(validTestFile), SAL_N_ELEMENTS(validTestFile))) );
-mxWarningInStream.set( new 
SequenceInputStream(css::uno::Sequence(reinterpret_cast(warningTestFile), SAL_N_ELEMENTS(warningTestFile))) );
-mxErrorInStream.set( new 
SequenceInputStream(css::uno::Sequence(reinterpret_cast(errorTestFile), SAL_N_ELEMENTS(errorTestFile))) );
+mxValidInStream.set( new 
SequenceInputStream(css::uno::Sequence(reinterpret_cast(validTestFile), SAL_N_ELEMENTS(validTestFile)-1)) );
+mxWarningInStream.set( new 
SequenceInputStream(css::uno::Sequence(reinterpret_cast(warningTestFile), SAL_N_ELEMENTS(warningTestFile)-1)) );
+mxErrorInStream.set( new 
SequenceInputStream(css::uno::Sequence(reinterpret_cast(errorTestFile), SAL_N_ELEMENTS(errorTestFile)-1)) );
 mxDomBuilder->setErrorHandler(mxErrHandler.get());
 }
 
@@ -293,7 +293,7 @@ struct SerializerTest : public test::BootstrapFixture
 mxErrHandler.set( new ErrorHandler() );
 uno::Reference xDB( 
getMultiServiceFactory()->createInstance("com.sun.star.xml.dom.DocumentBuilder"),
 uno::UNO_QUERY_THROW );
 mxDomBuilder.set( xDB );
-mxInStream.set( new 
SequenceInputStream(css::uno::Sequence(reinterpret_cast(validTestFile), SAL_N_ELEMENTS(validTestFile))) );
+mxInStream.set( new 
SequenceInputStream(css::uno::Sequence(reinterpret_cast(validTestFile), SAL_N_ELEMENTS(validTestFile)-1)) );
 mxDomBuilder->setErrorHandler(mxErrHandler.get());
 mxHandler.set( new DocumentHandler );
 mxTokHandler.set( new TokenHandler );
commit 231b80960c322389963a7e1d85f29b868ac7e4c2
Author: Michael Stahl 
AuthorDate: Fri Mar 8 13:40:44 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Fri May 17 21:31:06 2024 +0200

sal: the old MSVC doesn't know _Pragma, only __pragma

Change-Id: I139922d9cfabb3772782589f097234fd33e41809

diff --git a/include/sal/types.h b/include/sal/types.h
index f702708cff9c..d9aef75c1df8 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -497,10 +497,10 @@ template< typename T1, typename T2 > inline T1 
static_int_cast(T2 n) {
 _Pragma(SAL_STRINGIFY_ARG(GCC diagnostic pop))
 #elif defined LIBO_INTERNAL_ONLY && defined _MSC_VER
 #define SAL_WNODEPRECATED_DECLARATIONS_PUSH \
-_Pragma(SAL_STRINGIFY_ARG(warning(push))) \
-_Pragma(SAL_STRINGIFY_ARG(warning(disable : 4996)))
+__pragma(warning(push)) \
+__pragma(warning(disable : 4996))
 #define SAL_WNODEPRECATED_DECLARATIONS_POP \
-_Pragma(SAL_STRINGIFY_ARG(warning(pop)))
+__pragma(warning(pop))
 #else
 #   define SAL_WNODEPRECATED_DECLARATIONS_PUSH
 #   define SAL_WNODEPRECATED_DECLARATIONS_POP
commit 293854f22b42ea35c9610101f5db7dce8a0ae949
Author: Mike Kaganski 
AuthorDate: Wed Feb 21 22:27:37 2024 +0600
Commit: Thorsten Behrens 
CommitDate: Fri May 17 21:30:36 2024 +0200

Implement SAL_WNODEPRECATED_DECLARATIONS_[PUSH/POP] on MSVC

Required for --disable-nss build on Windows, which needs the same fix as in
commit 71d4abc51b556e147ab53a9a52b15be36fc710a3 
(-Werror,-Wdeprecated-declarations
(Emscripten), 2024-01-18).

Change-Id: I4206cbc0cb80be7ddee1c3f21de50d853828300e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163704
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 6329a56f601748f5a8dd6da9f0a90d3e57efcaf2)

diff --git a/include/sal/types.h b/include/sal/types.h
index e2442ea6c998..f702708cff9c 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -495,6 +495,12 @@ template< typename T1, typename T2 > inline T1 
static_int_cast(T2 n) {
 

core.git: sd/source

2024-05-17 Thread Caolán McNamara (via logerrit)
 sd/source/ui/dlg/tpoption.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1b0686234cc72f562ec5ec695c4594894838a46e
Author: Caolán McNamara 
AuthorDate: Fri May 17 19:41:32 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 17 20:42:29 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

Change-Id: I92ff04181d3c4ec4f0e1cd9f63ce5a1dc869ffc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167797
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index fdd199f6a7d5..823baef412c8 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -416,7 +416,7 @@ SdTpOptionsMisc::SdTpOptionsMisc(weld::Container* pPage, 
weld::DialogController*
 
 // determine PoolUnit
 SfxItemPool* pPool = rInAttrs.GetPool();
-DBG_ASSERT( pPool, "Where is the Pool?" );
+assert(pPool &&  "Where is the Pool?");
 ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH );
 
 // Fill the CB


core.git: sw/source

2024-05-17 Thread Caolán McNamara (via logerrit)
 sw/source/filter/ww8/ww8atr.cxx |   24 ++--
 1 file changed, 14 insertions(+), 10 deletions(-)

New commits:
commit 3ddd11d18a24ebd8cbc3e5ac8d460b4888cade07
Author: Caolán McNamara 
AuthorDate: Fri May 17 14:15:23 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 17 17:43:03 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

Change-Id: I18b18f5d430e626dea9163aec0bf99ab09c5c71b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167780
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 30fbebc4fbc3..e1787614f732 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -5521,17 +5521,21 @@ static void ParaTabStopDelAdd( WW8Export& rWrt,
 aTab.Add(*pTN, nLParaMgn);  // must be inserted
 nN++;
 }
-else if (lcl_IsEqual(nOP, *pTO, nNP, *pTN)) // tabs are equal
-{
-nO++;   // nothing to do
-nN++;
-}
-else// tabs same position, 
different type
+else
 {
-aTab.Del(*pTO, nLStypeMgn); // delete old one
-aTab.Add(*pTN, nLParaMgn);  // insert new one
-nO++;
-nN++;
+assert(pTO && pTN);
+if (lcl_IsEqual(nOP, *pTO, nNP, *pTN)) // tabs are equal
+{
+nO++;   // nothing to do
+nN++;
+}
+else// tabs same position, 
different type
+{
+aTab.Del(*pTO, nLStypeMgn); // delete old one
+aTab.Add(*pTN, nLParaMgn);  // insert new one
+nO++;
+nN++;
+}
 }
 } while( true );
 


core.git: cli_ure/Executable_climaker.mk include/sal include/sfx2 sfx2/source solenv/gbuild solenv/vs

2024-05-17 Thread Caolán McNamara (via logerrit)
 cli_ure/Executable_climaker.mk  |2 ++
 include/sal/types.h |   17 +++--
 include/sfx2/objsh.hxx  |   12 ++--
 include/sfx2/viewfrm.hxx|8 
 include/sfx2/viewsh.hxx |   12 ++--
 sfx2/source/doc/objxtor.cxx |8 +++-
 sfx2/source/view/viewfrm.cxx|8 
 sfx2/source/view/viewsh.cxx |   11 ---
 solenv/gbuild/platform/com_MSC_class.mk |   14 +++---
 solenv/gbuild/platform/com_MSC_defs.mk  |5 +
 solenv/vs/LibreOffice.ruleset   |6 ++
 11 files changed, 66 insertions(+), 37 deletions(-)

New commits:
commit 1148d6ad13b444c179aacdb693bd82e37d0ed32d
Author: Caolán McNamara 
AuthorDate: Mon Apr 29 20:45:05 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 17 17:37:58 2024 +0200

introduce SAL_RET_MAYBENULL

which for debug builds and MSVC uses _Ret_maybenull_ and -analyze to
enforce null checking

Change-Id: Id7f0ad854be7841819fdbdcd56c862d1a2df86c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166734
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/cli_ure/Executable_climaker.mk b/cli_ure/Executable_climaker.mk
index f0769b627cb2..2c2aaaf8a33e 100644
--- a/cli_ure/Executable_climaker.mk
+++ b/cli_ure/Executable_climaker.mk
@@ -13,9 +13,11 @@ $(eval $(call gb_Executable_use_package,climaker,\
cli_basetypes_copy \
 ))
 
+# -analyze- to turn that off due to internal compiler error
 $(eval $(call gb_Executable_add_cxxclrflags,climaker,\
-LN \
-wd4715 \
+   -analyze- \
 ))
 
 $(eval $(call gb_Executable_add_ldflags,climaker,\
diff --git a/include/sal/types.h b/include/sal/types.h
index a2ef256239e1..61e12c8eb4d5 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -273,10 +273,10 @@ typedef void *   sal_Handle;
 #endif
 
 /** Use this as markup for functions and methods whose return value must be
-checked.
+used.
 
 Compilers that support a construct of this nature will emit a compile
-time warning on unchecked return value.
+time warning on unused return value.
 */
 #if defined LIBO_INTERNAL_ONLY && defined __cplusplus
 #define SAL_WARN_UNUSED_RESULT [[nodiscard]]
@@ -288,6 +288,19 @@ typedef void *   sal_Handle;
 #   define SAL_WARN_UNUSED_RESULT
 #endif
 
+/** Use this as markup for functions and methods whose return value may be
+null and should not be derefenced unconditionally.
+
+Compilers that support a construct of this nature will emit a compile
+time warning on unconditional dereference of returned pointer.
+*/
+#ifdef _MSC_VER
+#   define SAL_RET_MAYBENULL _Ret_maybenull_
+#else
+#   define SAL_RET_MAYBENULL
+#endif
+
+
 /** Use this for pure virtual classes, e.g. class SAL_NO_VTABLE Foo { ...
 This hinders the compiler from setting a generic vtable stating that
 a pure virtual function was called and thus slightly reduces code size.
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index e0b0d3f411a3..eececb850bd9 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -249,12 +249,12 @@ public:
 static OUString CreateShellID( const SfxObjectShell* pShell );
 
 // Document-Shell Iterator
-SAL_WARN_UNUSED_RESULT static SfxObjectShell* GetFirst( const 
std::function& isObjectShell = nullptr,
-  bool bOnlyVisible = true );
-SAL_WARN_UNUSED_RESULT static SfxObjectShell* GetNext( const 
SfxObjectShell& rPrev,
- const std::function& isObjectShell = nullptr,
- bool bOnlyVisible = true );
-SAL_WARN_UNUSED_RESULT static SfxObjectShell* Current();
+SAL_RET_MAYBENULL static SfxObjectShell* GetFirst( const 
std::function& isObjectShell = nullptr,
+  bool bOnlyVisible = true );
+SAL_RET_MAYBENULL static SfxObjectShell* GetNext( const SfxObjectShell& 
rPrev,
+  const std::function& 
isObjectShell = nullptr,
+  bool bOnlyVisible = true );
+SAL_RET_MAYBENULL static SfxObjectShell* Current();
 static css::uno::Reference< css::uno::XInterface >
 GetCurrentComponent();
 static void SetCurrentComponent( const 
css::uno::Reference< css::uno::XInterface >& _rxComponent );
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 3d0bf2fcc08a..4622ff167fcf 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -96,11 +96,11 @@ public:
 static SfxViewFrame*LoadDocumentIntoFrame( SfxObjectShell const & 
i_rDoc, const css::uno::Reference< css::frame::XFrame >& i_rFrameItem );
 static SfxViewFrame*DisplayNewDocument( SfxObjectShell const & i_rDoc, 
const SfxRe

core.git: desktop/source

2024-05-17 Thread Caolán McNamara (via logerrit)
 desktop/source/lib/init.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7c25b9c2a0770a66c18b4cd2f5d09d47fa7e057e
Author: Caolán McNamara 
AuthorDate: Fri May 17 11:57:19 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 17 14:55:04 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

Change-Id: Ic67e88417620acb6d43bafc28e8291720913
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167770
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 549319a7946c..2ab701cae3d2 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5113,8 +5113,8 @@ void LibLibreOffice_Impl::dumpState(rtl::OStringBuffer 
)
 rState.append("
CallbackData:   0x");
 rState.append(reinterpret_cast(mpCallback), 16);
 rState.append("
IsModified: ");
-if (SfxObjectShell::Current())
-rState.append(SfxObjectShell::Current()->IsModified() ? "modified" : 
"unmodified");
+if (const SfxObjectShell* pObjSh = SfxObjectShell::Current())
+rState.append(pObjSh->IsModified() ? "modified" : "unmodified");
 else
 rState.append("noshell");
 // TODO: dump mInteractionMap


core.git: dbaccess/source svx/source

2024-05-17 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/ConnectionPage.cxx |4 ++--
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx |4 ++--
 dbaccess/source/ui/dlg/detailpages.cxx|2 +-
 svx/source/svdraw/svdmrkv1.cxx|1 +
 4 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit b5a37d8239dd2c7f31d8a107add1f84b69b68422
Author: Caolán McNamara 
AuthorDate: Thu May 16 23:03:42 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 17 12:57:37 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

Change-Id: I4bb077ea634d9ca3e238981cfcc307a1b6caf7c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167757
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx 
b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index 003e16671ac8..46f577703891 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -231,7 +231,7 @@ namespace dbaui
 }
 IMPL_LINK_NOARG(OConnectionTabPage, OnTestJavaClickHdl, weld::Button&, 
void)
 {
-OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
+assert(m_pAdminDialog && "No Admin dialog set! ->GPF");
 bool bSuccess = false;
 #if HAVE_FEATURE_JAVA
 try
@@ -255,7 +255,7 @@ namespace dbaui
 }
 bool OConnectionTabPage::checkTestConnection()
 {
-OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
+assert(m_pAdminDialog && "No Admin dialog set! ->GPF");
 bool bEnableTestConnection = !m_xConnectionURL->get_visible() || 
!m_xConnectionURL->GetTextNoPrefix().isEmpty();
 if ( m_pCollection->determineType(m_eType) ==  ::dbaccess::DST_JDBC )
 bEnableTestConnection = bEnableTestConnection && 
(!o3tl::trim(m_xJavaDriver->get_text()).empty());
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx 
b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index 8665a0d9ef2d..2a3824bec6a4 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -468,7 +468,7 @@ using namespace ::com::sun::star;
 
 IMPL_LINK_NOARG(OGeneralSpecialJDBCConnectionPageSetup, 
OnTestJavaClickHdl, weld::Button&, void)
 {
-OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
+assert(m_pAdminDialog && "No Admin dialog set! ->GPF");
 
 bool bSuccess = false;
 #if HAVE_FEATURE_JAVA
@@ -704,7 +704,7 @@ using namespace ::com::sun::star;
 
 IMPL_LINK_NOARG(OJDBCConnectionPageSetup, OnTestJavaClickHdl, 
weld::Button&, void)
 {
-OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
+assert(m_pAdminDialog && "No Admin dialog set! ->GPF");
 bool bSuccess = false;
 #if HAVE_FEATURE_JAVA
 try
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx 
b/dbaccess/source/ui/dlg/detailpages.cxx
index 79413a62c6d9..65af148913ba 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -445,7 +445,7 @@ namespace dbaui
 }
 IMPL_LINK_NOARG(OGeneralSpecialJDBCDetailsPage, OnTestJavaClickHdl, 
weld::Button&, void)
 {
-OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
+assert(m_pAdminDialog && "No Admin dialog set! ->GPF");
 OSL_ENSURE(m_bUseClass,"Who called me?");
 
 bool bSuccess = false;
diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx
index 9c732262bcc9..f8e039468231 100644
--- a/svx/source/svdraw/svdmrkv1.cxx
+++ b/svx/source/svdraw/svdmrkv1.cxx
@@ -207,6 +207,7 @@ bool SdrMarkView::MarkPoints(const tools::Rectangle* pRect, 
bool bUnmark)
 pPV0=pPV;
 } else {
 #ifdef DBG_UTIL
+assert(pObj);
 if (pObj->IsInserted()) {
 OSL_FAIL("SdrMarkView::MarkPoints(const Rectangle* 
pRect): Selected object not found.");
 }


core.git: oox/qa vcl/qa xmlsecurity/qa

2024-05-16 Thread Caolán McNamara (via logerrit)
 oox/qa/unit/testscene3d.cxx |1 +
 vcl/qa/cppunit/filter/ipdf/ipdf.cxx |4 +++-
 xmlsecurity/qa/unit/signing/signing.cxx |4 +++-
 3 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit b4e42bce5581e6c1956607a5cb49837ad85b862b
Author: Caolán McNamara 
AuthorDate: Thu May 16 16:36:14 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 16 20:31:57 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

Change-Id: I710ff75d387b2d452cb80911c9f0092948453ef8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167751
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/oox/qa/unit/testscene3d.cxx b/oox/qa/unit/testscene3d.cxx
index d43209a0a2c4..08d24ded2afc 100644
--- a/oox/qa/unit/testscene3d.cxx
+++ b/oox/qa/unit/testscene3d.cxx
@@ -63,6 +63,7 @@ uno::Reference 
TestScene3d::getShape(sal_uInt8 nShapeIndex, sal
 void TestScene3d::getShapeAsBitmap(BitmapEx& rBMP, sal_uInt8 nShapeIndex)
 {
 SfxViewShell* pViewShell = SfxViewShell::Current();
+CPPUNIT_ASSERT(pViewShell);
 SdrView* pSdrView = pViewShell->GetDrawView();
 
 // Mark object and convert it to bitmap
diff --git a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx 
b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx
index 1c0b0625ce68..92c024bd34fa 100644
--- a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx
+++ b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx
@@ -100,7 +100,9 @@ CPPUNIT_TEST_FIXTURE(VclFilterIpdfTest, 
testPDFAddVisibleSignatureLastPage)
 {
 return;
 }
-SdrView* pView = SfxViewShell::Current()->GetDrawView();
+SfxViewShell* pCurrent = SfxViewShell::Current();
+CPPUNIT_ASSERT(pCurrent);
+SdrView* pView = pCurrent->GetDrawView();
 svx::SignatureLineHelper::setShapeCertificate(pView, xCert);
 
 // the document is modified now, but Sign function can't show SaveAs dialog
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx 
b/xmlsecurity/qa/unit/signing/signing.cxx
index 11bd8627c4d0..5c91c17ffb1c 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -755,7 +755,9 @@ CPPUNIT_TEST_FIXTURE(SigningTest, 
testPDFAddVisibleSignature)
 {
 return;
 }
-SdrView* pView = SfxViewShell::Current()->GetDrawView();
+SfxViewShell* pCurrent = SfxViewShell::Current();
+CPPUNIT_ASSERT(pCurrent);
+SdrView* pView = pCurrent->GetDrawView();
 svx::SignatureLineHelper::setShapeCertificate(pView, aCertificates[0]);
 
 // the document is modified now, but Sign function can't show SaveAs dialog


core.git: sfx2/source

2024-05-16 Thread Caolán McNamara (via logerrit)
 sfx2/source/doc/objstor.cxx |   19 +--
 1 file changed, 13 insertions(+), 6 deletions(-)

New commits:
commit a2007364e77aebbbc45fa8fab2c58f95a821dd18
Author: Caolán McNamara 
AuthorDate: Thu May 16 14:37:52 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 16 17:36:55 2024 +0200

always restore existing interaction handler after save

In an error case we end up removing any existing interaction handler.
So in all cases leave with the same interaction handler that
existed before the save attempt.

See also:

commit 3b294f6139028014e72379ebe8eda24a2bd32195
Date:   Thu Jun 8 20:53:16 2023 +0100

restore, not clear, existing interaction handler after save

where the same problem can be reproduced of every change is a
full-document invalidation once someone else joins a document which has
had a save-fail.

Change-Id: I211183c551b1d64898cfe4aaf11dd9ef23f8ca15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167678
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index b3a7f8847e2e..cee4847022ed 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3046,17 +3046,21 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* 
pArgs )
 if (pImpl->bPreserveVersions)
 pMediumTmp->TransferVersionList_Impl( *pRetrMedium );
 
+// Save the original interaction handler
+Any aOriginalInteract;
+if (const SfxUnoAnyItem *pItem = 
pRetrMedium->GetItemSet().GetItemIfSet(SID_INTERACTIONHANDLER, false))
+{
+aOriginalInteract = pItem->GetValue();
+// The original pRetrMedium and potential replacement pMediumTmp have 
the same interaction handler at this point
+assert(pMediumTmp->GetItemSet().GetItemIfSet(SID_INTERACTIONHANDLER, 
false)->GetValue() == aOriginalInteract);
+}
+
 // an interaction handler here can acquire only in case of GUI Saving
 // and should be removed after the saving is done
-Any aOriginalInteract;
 css::uno::Reference< XInteractionHandler > xInteract;
 const SfxUnoAnyItem* pxInteractionItem = 
SfxItemSet::GetItem(pArgs, SID_INTERACTIONHANDLER, false);
 if ( pxInteractionItem && ( pxInteractionItem->GetValue() >>= xInteract ) 
&& xInteract.is() )
-{
-if (const SfxUnoAnyItem *pItem = 
pMediumTmp->GetItemSet().GetItemIfSet(SID_INTERACTIONHANDLER, false))
-aOriginalInteract = pItem->GetValue();
 pMediumTmp->GetItemSet().Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, 
Any( xInteract ) ) );
-}
 
 const SfxBoolItem* pNoFileSync = 
pArgs->GetItem(SID_NO_FILE_SYNC, false);
 if (pNoFileSync && pNoFileSync->GetValue())
@@ -3096,7 +3100,10 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* 
pArgs )
 // reconnect to object storage
 DoSaveCompleted();
 
-pRetrMedium->GetItemSet().ClearItem( SID_INTERACTIONHANDLER );
+if (aOriginalInteract.hasValue())
+
pRetrMedium->GetItemSet().Put(SfxUnoAnyItem(SID_INTERACTIONHANDLER, 
aOriginalInteract));
+else
+pRetrMedium->GetItemSet().ClearItem(SID_INTERACTIONHANDLER);
 pRetrMedium->GetItemSet().ClearItem( SID_PROGRESS_STATUSBAR_CONTROL );
 
 delete pMediumTmp;


core.git: Branch 'distro/collabora/co-24.04' - sfx2/source

2024-05-16 Thread Caolán McNamara (via logerrit)
 sfx2/source/doc/objstor.cxx |   19 +--
 1 file changed, 13 insertions(+), 6 deletions(-)

New commits:
commit 19ac02dbae7474a1c88a545e6cab6fda678fdb95
Author: Caolán McNamara 
AuthorDate: Thu May 16 14:37:52 2024 +0100
Commit: Michael Meeks 
CommitDate: Thu May 16 16:14:14 2024 +0200

always restore existing interaction handler after save

In an error case we end up removing any existing interaction handler.
So in all cases leave with the same interaction handler that
existed before the save attempt.

See also:

commit 3b294f6139028014e72379ebe8eda24a2bd32195
Date:   Thu Jun 8 20:53:16 2023 +0100

restore, not clear, existing interaction handler after save

where the same problem can be reproduced of every change is a
full-document invalidation once someone else joins a document which has
had a save-fail.

Change-Id: I211183c551b1d64898cfe4aaf11dd9ef23f8ca15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167747
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index f4826b93ad7d..ce548a81ea6a 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2734,17 +2734,21 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* 
pArgs )
 if (pImpl->bPreserveVersions)
 pMediumTmp->TransferVersionList_Impl( *pRetrMedium );
 
+// Save the original interaction handler
+Any aOriginalInteract;
+if (const SfxUnoAnyItem *pItem = 
pRetrMedium->GetItemSet().GetItemIfSet(SID_INTERACTIONHANDLER, false))
+{
+aOriginalInteract = pItem->GetValue();
+// The original pRetrMedium and potential replacement pMediumTmp have 
the same interaction handler at this point
+assert(pMediumTmp->GetItemSet().GetItemIfSet(SID_INTERACTIONHANDLER, 
false)->GetValue() == aOriginalInteract);
+}
+
 // an interaction handler here can acquire only in case of GUI Saving
 // and should be removed after the saving is done
-Any aOriginalInteract;
 css::uno::Reference< XInteractionHandler > xInteract;
 const SfxUnoAnyItem* pxInteractionItem = 
SfxItemSet::GetItem(pArgs, SID_INTERACTIONHANDLER, false);
 if ( pxInteractionItem && ( pxInteractionItem->GetValue() >>= xInteract ) 
&& xInteract.is() )
-{
-if (const SfxUnoAnyItem *pItem = 
pMediumTmp->GetItemSet().GetItemIfSet(SID_INTERACTIONHANDLER, false))
-aOriginalInteract = pItem->GetValue();
 pMediumTmp->GetItemSet().Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, 
Any( xInteract ) ) );
-}
 
 const SfxBoolItem* pNoFileSync = 
pArgs->GetItem(SID_NO_FILE_SYNC, false);
 if (pNoFileSync && pNoFileSync->GetValue())
@@ -2784,7 +2788,10 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* 
pArgs )
 // reconnect to object storage
 DoSaveCompleted();
 
-pRetrMedium->GetItemSet().ClearItem( SID_INTERACTIONHANDLER );
+if (aOriginalInteract.hasValue())
+
pRetrMedium->GetItemSet().Put(SfxUnoAnyItem(SID_INTERACTIONHANDLER, 
aOriginalInteract));
+else
+pRetrMedium->GetItemSet().ClearItem(SID_INTERACTIONHANDLER);
 pRetrMedium->GetItemSet().ClearItem( SID_PROGRESS_STATUSBAR_CONTROL );
 
 delete pMediumTmp;


core.git: svx/qa sw/qa

2024-05-16 Thread Caolán McNamara (via logerrit)
 svx/qa/unit/customshapes.cxx   |8 +++-
 svx/qa/unit/svdraw.cxx |1 +
 svx/qa/unit/table.cxx  |1 +
 sw/qa/extras/htmlexport/htmlexport.cxx |1 +
 sw/qa/extras/uiwriter/uiwriter6.cxx|1 +
 sw/qa/unit/swmodeltestbase.cxx |1 +
 6 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 601ae6910288c7f3abdbb11de644c17b3b2d0cb5
Author: Caolán McNamara 
AuthorDate: Wed May 15 21:08:50 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 16 09:34:49 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

Change-Id: If4ca47bc4d8203ed7d20e1bbf1c3ebe2587c403f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167709
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 304ae64f23b2..47ab375e6037 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -122,6 +122,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf150302)
 
 // Mark Object
 SfxViewShell* pViewShell = SfxViewShell::Current();
+CPPUNIT_ASSERT(pViewShell);
 SdrView* pSdrView = pViewShell->GetDrawView();
 pSdrView->MarkObj(pSdrCustomShape, pSdrView->GetSdrPageView());
 
@@ -157,6 +158,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, 
testTdf147409_GeomItemHash)
 
 // Mark Object
 SfxViewShell* pViewShell = SfxViewShell::Current();
+CPPUNIT_ASSERT(pViewShell);
 SdrView* pSdrView = pViewShell->GetDrawView();
 pSdrView->MarkObj(pSdrCustomShape, pSdrView->GetSdrPageView());
 
@@ -174,6 +176,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, 
testTdf146866_GeomItemHash)
 
 // Mark Object
 SfxViewShell* pViewShell = SfxViewShell::Current();
+CPPUNIT_ASSERT(pViewShell);
 SdrView* pSdrView = pViewShell->GetDrawView();
 pSdrView->MarkObj(pSdrCustomShape, pSdrView->GetSdrPageView());
 
@@ -502,6 +505,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, 
testTdf141021ExtrusionNorth)
 
 // Mark Object
 SfxViewShell* pViewShell = SfxViewShell::Current();
+CPPUNIT_ASSERT(pViewShell);
 SdrView* pSdrView = pViewShell->GetDrawView();
 pSdrView->MarkObj(, pSdrView->GetSdrPageView());
 
@@ -509,7 +513,9 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, 
testTdf141021ExtrusionNorth)
 SfxRequest aReq(pViewShell->GetViewFrame(), SID_EXTRUSION_DIRECTION);
 SfxInt32Item aItem(SID_EXTRUSION_DIRECTION, 90);
 aReq.AppendItem(aItem);
-svx::ExtrusionBar::execute(pSdrView, aReq, 
SfxViewFrame::Current()->GetBindings());
+SfxViewFrame* pFrame = SfxViewFrame::Current();
+CPPUNIT_ASSERT(pFrame);
+svx::ExtrusionBar::execute(pSdrView, aReq, pFrame->GetBindings());
 
 // Verify height. Without the fix in place the height would 4001.
 tools::Rectangle aBoundRect(rSdrCustomShape.GetCurrentBoundRect());
diff --git a/svx/qa/unit/svdraw.cxx b/svx/qa/unit/svdraw.cxx
index 0c01bf4dfce2..83293c52ee3f 100644
--- a/svx/qa/unit/svdraw.cxx
+++ b/svx/qa/unit/svdraw.cxx
@@ -237,6 +237,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testTextEditEmptyGrabBag)
 
 // When editing the shape text of the 2nd rectangle (insert a char at the 
start).
 SfxViewShell* pViewShell = SfxViewShell::Current();
+CPPUNIT_ASSERT(pViewShell);
 SdrView* pSdrView = pViewShell->GetDrawView();
 SdrObject* pObject = SdrObject::getSdrObjectFromXShape(xRect2);
 pSdrView->SdrBeginTextEdit(pObject);
diff --git a/svx/qa/unit/table.cxx b/svx/qa/unit/table.cxx
index 6331a23cbe98..ce48f216026a 100644
--- a/svx/qa/unit/table.cxx
+++ b/svx/qa/unit/table.cxx
@@ -120,6 +120,7 @@ CPPUNIT_TEST_FIXTURE(Test, 
testSvxTableControllerSetAttrToSelectedShape)
 auto pSdrObject
 = 
dynamic_cast(pSdrPage->GetObj(pSdrPage->GetObjCount() 
- 1));
 SfxViewShell* pViewShell = SfxViewShell::Current();
+CPPUNIT_ASSERT(pViewShell);
 SdrView* pSdrView = pViewShell->GetDrawView();
 pSdrView->SdrBeginTextEdit(pSdrObject);
 CPPUNIT_ASSERT(pSdrView->IsTextEdit());
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 282ce035b3a6..b3297ad815fe 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -2866,6 +2866,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testHTML_NoPreserveSpaces)
   xmlXPathObjectPtr pXmlObj = getXPathNode(pDoc, rXPath);
   xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
   CPPUNIT_ASSERT_EQUAL_MESSAGE(rXPath.getStr(), 1, 
xmlXPathNodeSetGetLength(pXmlNodes));
+  CPPUNIT_ASSERT(pXmlNodes);
   xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0];
   if (xmlChar* prop = xmlGetProp(pXmlNode, BAD_CAST("style")))
   {
diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx 
b/sw/qa/extras/uiwriter/uiwriter6.cxx
index ce525954ace9..43c74906e10d 100644
-

core.git: Branch 'libreoffice-24-2' - vcl/unx

2024-05-15 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/hudawareness.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e16c06e4d069216d65bf43bcb9e12c85d5505ba0
Author: Caolán McNamara 
AuthorDate: Wed May 15 08:55:06 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 15 23:59:36 2024 +0200

tdf#161073 handle is supposed to be freed automatically on failure

and is since:

https://gitlab.gnome.org/GNOME/glib/-/commit/747e3af9987b37847d7d5acbf882d1ee4a6bd91b

Change-Id: Ibb648ccf69ff892fc1e2a3c3dc4da1fffd577c92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167468
Reviewed-by: Michael Stahl 
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/hudawareness.cxx b/vcl/unx/gtk3/hudawareness.cxx
index ebcbaf747fca..749e3d5c0d0a 100644
--- a/vcl/unx/gtk3/hudawareness.cxx
+++ b/vcl/unx/gtk3/hudawareness.cxx
@@ -88,7 +88,7 @@ hud_awareness_register (GDBusConnection   *connection,
 
   if (object_id == 0)
   {
-  g_free (handle);
+  // note: tdf#161073 handle is expected to be freed by 
g_dbus_connection_register_object on failure
   return 0;
   }
 


core.git: 2 commits - sc/source sfx2/qa

2024-05-15 Thread Caolán McNamara (via logerrit)
 sc/source/ui/docshell/docsh6.cxx |2 +-
 sfx2/qa/cppunit/view.cxx |4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit b5835c23cdf533be015e64d61ce1df250180f1fb
Author: Caolán McNamara 
AuthorDate: Wed May 15 11:32:57 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 15 20:46:29 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

Change-Id: I1d603f804bada2a6cd9fd8784da4de125a2b87fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167663
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/qa/cppunit/view.cxx b/sfx2/qa/cppunit/view.cxx
index e0e8c69b2a36..9141e4fba36b 100644
--- a/sfx2/qa/cppunit/view.cxx
+++ b/sfx2/qa/cppunit/view.cxx
@@ -43,7 +43,9 @@ CPPUNIT_TEST_FIXTURE(Sfx2ViewTest, testReloadPage)
 aSet.Put(SfxInt32Item(SID_PAGE_NUMBER, 1));
 SfxRequest aReq(SID_RELOAD, SfxCallMode::SLOT, aSet);
 pFrame->ExecReload_Impl(aReq);
-uno::Reference xModel = 
SfxObjectShell::Current()->GetBaseModel();
+SfxObjectShell* pDocSh = SfxObjectShell::Current();
+CPPUNIT_ASSERT(pDocSh);
+uno::Reference xModel = pDocSh->GetBaseModel();
 mxComponent = xModel;
 
 // Check the current page after reload.
commit d5ff0410e7df5ca95ec3076386881e49eb46ddca
Author: Szymon Kłos 
AuthorDate: Tue May 7 15:33:21 2024 +0200
Commit:     Caolán McNamara 
CommitDate: Wed May 15 20:46:16 2024 +0200

lok: don't show separator conversion dialog

in online it is more likely that you run file not
created with your user locale. Don't show annoying
dialog about separator conversion in LOK as we didn't
show it before. Recently we enabled it and it become visible.

Change-Id: I5a37865dbe63bca0c55205b59be3a64ceb824b17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167281
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Gökay ŞATIR 
(cherry picked from commit 83269aa84a0af8b9a32424af6b01815aaad4f42a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167672
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 34092f13feed..f82b9da9fa82 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -496,7 +496,7 @@ void ScDocShell::CheckConfigOptions()
 pScMod->SetFormulaOptions(aNew);
 
 // Launch a nice warning dialog to let the users know of this change.
-ScTabViewShell* pViewShell = GetBestViewShell();
+ScTabViewShell* pViewShell = comphelper::LibreOfficeKit::isActive() ? 
nullptr : GetBestViewShell();
 if (pViewShell)
 {
 std::shared_ptr 
xInfoBox(Application::CreateMessageDialog(pViewShell->GetFrameWeld(),


core.git: vcl/unx

2024-05-15 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/hudawareness.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 436f823c7c5497f2b22762cec5849a0ff84c220b
Author: Caolán McNamara 
AuthorDate: Wed May 15 08:55:06 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 15 12:22:43 2024 +0200

tdf#161073 handle is supposed to be freed automatically on failure

and is since:

https://gitlab.gnome.org/GNOME/glib/-/commit/747e3af9987b37847d7d5acbf882d1ee4a6bd91b

Change-Id: Ibb648ccf69ff892fc1e2a3c3dc4da1fffd577c92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167657
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/vcl/unx/gtk3/hudawareness.cxx b/vcl/unx/gtk3/hudawareness.cxx
index ebcbaf747fca..749e3d5c0d0a 100644
--- a/vcl/unx/gtk3/hudawareness.cxx
+++ b/vcl/unx/gtk3/hudawareness.cxx
@@ -88,7 +88,7 @@ hud_awareness_register (GDBusConnection   *connection,
 
   if (object_id == 0)
   {
-  g_free (handle);
+  // note: tdf#161073 handle is expected to be freed by 
g_dbus_connection_register_object on failure
   return 0;
   }
 


core.git: Branch 'distro/collabora/co-24.04' - sdext/Executable_xpdfimport.mk

2024-05-15 Thread Caolán McNamara (via logerrit)
 sdext/Executable_xpdfimport.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 348d36dc80ccd5d911e1ff97aedb5a188d0177f7
Author: Caolán McNamara 
AuthorDate: Wed May 15 08:39:18 2024 +0100
Commit: Miklos Vajna 
CommitDate: Wed May 15 11:50:14 2024 +0200

add explicit png build dependency to xpdfimport

src/sfnt/pngshim.c:298: error: undefined reference to 
'png_create_read_struct'

Change-Id: Iafb7b685f09347f711b9221362f999b3d48c9bda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167467
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sdext/Executable_xpdfimport.mk b/sdext/Executable_xpdfimport.mk
index 8c2543cf0cd7..ffd5d79197bb 100644
--- a/sdext/Executable_xpdfimport.mk
+++ b/sdext/Executable_xpdfimport.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_Executable_use_externals,xpdfimport,\
 boost_headers \
 expat \
 freetype \
+libpng \
 poppler \
 $(if $(filter-out WNT MACOSX,$(OS)),fontconfig) \
 zlib \


core.git: sdext/Executable_xpdfimport.mk

2024-05-15 Thread Caolán McNamara (via logerrit)
 sdext/Executable_xpdfimport.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 56f7ebbc0988a64cdc9ea41dcca37c4290497c2b
Author: Caolán McNamara 
AuthorDate: Wed May 15 08:39:18 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 15 11:42:14 2024 +0200

add explicit png build dependency to xpdfimport

src/sfnt/pngshim.c:298: error: undefined reference to 
'png_create_read_struct'

Change-Id: Iafb7b685f09347f711b9221362f999b3d48c9bda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167656
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sdext/Executable_xpdfimport.mk b/sdext/Executable_xpdfimport.mk
index 8c2543cf0cd7..ffd5d79197bb 100644
--- a/sdext/Executable_xpdfimport.mk
+++ b/sdext/Executable_xpdfimport.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_Executable_use_externals,xpdfimport,\
 boost_headers \
 expat \
 freetype \
+libpng \
 poppler \
 $(if $(filter-out WNT MACOSX,$(OS)),fontconfig) \
 zlib \


core.git: connectivity/source

2024-05-15 Thread Caolán McNamara (via logerrit)
 connectivity/source/drivers/jdbc/ResultSet.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9f4dd488e76e20ec29169afdd608144ad8625a4f
Author: Caolán McNamara 
AuthorDate: Tue May 14 21:04:43 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 15 09:25:14 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

Change-Id: I613c77b9aa34433fab9cfaee83d7468cbf5971d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167644
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx 
b/connectivity/source/drivers/jdbc/ResultSet.cxx
index f37c0dbbeba4..0473ed598d2e 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -104,7 +104,8 @@ void java_sql_ResultSet::disposing()
 ::osl::MutexGuard aGuard(m_aMutex);
 if( object )
 {
-SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java environment has been 
deleted!");
+SDBThreadAttach t;
+assert(t.pEnv && "Java environment has been deleted!");
 static jmethodID mID(nullptr);
 callVoidMethod_ThrowSQL("close", mID);
 clearObject(*t.pEnv);


core.git: solenv/sanitizers

2024-05-14 Thread Caolán McNamara (via logerrit)
 solenv/sanitizers/ui/modules/scalc.suppr |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 0a6a1f9c161a676df7f7eb96a346e73266bef3b6
Author: Caolán McNamara 
AuthorDate: Mon May 13 20:27:38 2024 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 14 22:20:15 2024 +0200

drop some unused suppressions

Change-Id: I09c0f9740fea3e42ab0bfd00ce839bc5849241ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167611
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/solenv/sanitizers/ui/modules/scalc.suppr 
b/solenv/sanitizers/ui/modules/scalc.suppr
index 976cff832567..bdc95e795200 100644
--- a/solenv/sanitizers/ui/modules/scalc.suppr
+++ b/solenv/sanitizers/ui/modules/scalc.suppr
@@ -154,8 +154,6 @@ 
sc/uiconfig/scalc/ui/xmlsourcedialog.ui://GtkLabel[@id='sourcefile'] orphan-labe
 sc/uiconfig/scalc/ui/xmlsourcedialog.ui://GtkTreeView[@id='tree'] 
no-labelled-by
 sc/uiconfig/scalc/ui/xmlsourcedialog.ui://GtkLabel[@id='label5'] orphan-label
 sc/uiconfig/scalc/ui/xmlsourcedialog.ui://GtkEntry[@id='edit'] no-labelled-by
-sc/uiconfig/scalc/ui/sparklinedialog.ui://GtkSpinButton[@id='seMinAxis'] 
no-labelled-by
-sc/uiconfig/scalc/ui/sparklinedialog.ui://GtkSpinButton[@id='seMaxAxis'] 
no-labelled-by
 sc/uiconfig/scalc/ui/passfragment.ui://GtkLabel[@id='name'] orphan-label
 sc/uiconfig/scalc/ui/passfragment.ui://GtkLabel[@id='status'] orphan-label
 
sc/uiconfig/scalc/ui/headerfootercontent.ui://GtkComboBoxText[@id='comboLB_DEFINED']
 duplicate-mnemonic


core.git: connectivity/source

2024-05-14 Thread Caolán McNamara (via logerrit)
 connectivity/source/commontools/FValue.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 23fbbea60768626b033f3c597d24193bb0d2dd79
Author: Caolán McNamara 
AuthorDate: Tue May 14 14:40:25 2024 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 14 20:56:14 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

Change-Id: I02eb573814e851fcb042f4a4018a3e41c24a68b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167634
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/connectivity/source/commontools/FValue.cxx 
b/connectivity/source/commontools/FValue.cxx
index a21cdb336413..799074d4207b 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -860,21 +860,21 @@ Any ORowSetValue::makeAny() const
 rValue <<= m_aValue.m_nDouble;
 break;
 case DataType::DATE:
-OSL_ENSURE(m_aValue.m_pValue,"Value is null!");
+assert(m_aValue.m_pValue && "Value is null!");
 rValue <<= *static_cast(m_aValue.m_pValue);
 break;
 case DataType::TIME:
-OSL_ENSURE(m_aValue.m_pValue,"Value is null!");
+assert(m_aValue.m_pValue && "Value is null!");
 rValue <<= *static_cast(m_aValue.m_pValue);
 break;
 case DataType::TIMESTAMP:
-OSL_ENSURE(m_aValue.m_pValue,"Value is null!");
+assert(m_aValue.m_pValue && "Value is null!");
 rValue <<= *static_cast(m_aValue.m_pValue);
 break;
 case DataType::BINARY:
 case DataType::VARBINARY:
 case DataType::LONGVARBINARY:
-OSL_ENSURE(m_aValue.m_pValue,"Value is null!");
+assert(m_aValue.m_pValue && "Value is null!");
 rValue <<= 
*static_cast*>(m_aValue.m_pValue);
 break;
 case DataType::BLOB:


core.git: sc/source

2024-05-14 Thread Caolán McNamara (via logerrit)
 sc/source/ui/cctrl/checklistmenu.cxx |   63 +--
 sc/source/ui/inc/checklistmenu.hxx   |   22 
 2 files changed, 83 insertions(+), 2 deletions(-)

New commits:
commit a525895a5f820350dc307969b1e8fd5d218a1ddd
Author: Caolán McNamara 
AuthorDate: Mon May 13 10:43:20 2024 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 14 17:34:23 2024 +0200

Resolves: tdf#146326 restore focus on autofilter submenu popdown

to where it was before the submenu popup, unless the keyboard was used
in the submenu, in which case restore focus to the menu instead.

Change-Id: Iaa24b4eadf206b877a093529678667927488de8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167580
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 60078c335437..1d720cb3b0dd 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -77,6 +77,10 @@ IMPL_LINK_NOARG(ScCheckListMenuControl, RowActivatedHdl, 
weld::TreeView&, bool)
 
 IMPL_LINK(ScCheckListMenuControl, MenuKeyInputHdl, const KeyEvent&, rKEvt, 
bool)
 {
+// Assume that once the keyboard is used that focus should restore to this 
menu
+// on dismissing a submenu
+SetRestoreFocus(ScCheckListMenuControl::RestoreFocus::Menu);
+
 const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode();
 
 switch (rKeyCode.GetCode())
@@ -328,17 +332,65 @@ void ScCheckListMenuControl::launchSubMenu()
 if (!mxMenu->get_selected(mxScratchIter.get()))
 return;
 
+meRestoreFocus = DetermineRestoreFocus();
+
 tools::Rectangle aRect = GetSubMenuParentRect();
 pSubMenu->StartPopupMode(mxMenu.get(), aRect);
 
 mxMenu->select(*mxScratchIter);
+
 pSubMenu->GrabFocus();
 }
 
+ScCheckListMenuControl::RestoreFocus 
ScCheckListMenuControl::DetermineRestoreFocus() const
+{
+if (mxEdSearch->has_focus())
+return RestoreFocus::EdSearch;
+if (mpChecks->has_focus())
+return RestoreFocus::Checks;
+if (mxChkToggleAll->has_focus())
+return RestoreFocus::ChkToggleAll;
+if (mxChkLockChecked->has_focus())
+return RestoreFocus::ChkLockChecked;
+if (mxBtnSelectSingle->has_focus())
+return RestoreFocus::BtnSelectSingle;
+if (mxBtnUnselectSingle->has_focus())
+return RestoreFocus::BtnUnselectSingle;
+return RestoreFocus::Menu;
+}
+
+void ScCheckListMenuControl::RestorePreviousFocus()
+{
+switch (meRestoreFocus)
+{
+case RestoreFocus::EdSearch:
+mxEdSearch->grab_focus();
+break;
+case RestoreFocus::Checks:
+mpChecks->grab_focus();
+break;
+case RestoreFocus::ChkToggleAll:
+mxChkToggleAll->grab_focus();
+break;
+case RestoreFocus::ChkLockChecked:
+mxChkLockChecked->grab_focus();
+break;
+case RestoreFocus::BtnSelectSingle:
+mxBtnSelectSingle->grab_focus();
+break;
+case RestoreFocus::BtnUnselectSingle:
+mxBtnUnselectSingle->grab_focus();
+break;
+default:
+mxMenu->grab_focus();
+break;
+}
+}
+
 IMPL_LINK_NOARG(ScCheckListMenuControl, PostPopdownHdl, void*, void)
 {
 mnAsyncPostPopdownId = nullptr;
-mxMenu->grab_focus();
+RestorePreviousFocus();
 }
 
 IMPL_LINK(ScCheckListMenuControl, MouseEnterHdl, const MouseEvent&, rMEvt, 
bool)
@@ -522,6 +574,7 @@ 
ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScViewData
 , mrViewData(rViewData)
 , mnAsyncPostPopdownId(nullptr)
 , mnAsyncSetDropdownPosId(nullptr)
+, meRestoreFocus(RestoreFocus::Menu)
 , mbHasDates(bHasDates)
 , mbIsPoppedUp(false)
 , maOpenTimer(this)
@@ -1815,8 +1868,14 @@ IMPL_LINK(ScListSubMenuControl, MenuKeyInputHdl, const 
KeyEvent&, rKEvt, bool)
 {
 bool bConsumed = false;
 const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode();
+const sal_uInt16 eKeyCode = rKeyCode.GetCode();
 
-switch (rKeyCode.GetCode())
+// Assume that once the keyboard is used that focus should restore to the
+// parent menu
+if (eKeyCode != KEY_ESCAPE)
+
mrParentControl.SetRestoreFocus(ScCheckListMenuControl::RestoreFocus::Menu);
+
+switch (eKeyCode)
 {
 case KEY_ESCAPE:
 case KEY_LEFT:
diff --git a/sc/source/ui/inc/checklistmenu.hxx 
b/sc/source/ui/inc/checklistmenu.hxx
index 8e24baef433b..558ef9f47e37 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -96,6 +96,18 @@ public:
 };
 typedef std::set ResultType;
 
+
+enum RestoreFocus
+{
+Menu,
+EdSearch,
+Checks,
+ChkToggleAll,
+ChkLockChecked,
+BtnSelectSingle,
+BtnUnselectSingle
+};
+
  

core.git: vcl/win

2024-05-14 Thread Caolán McNamara (via logerrit)
 vcl/win/dtrans/MtaOleClipb.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 07234f2b7ccc1ffa1e253344193982bad04104f1
Author: Caolán McNamara 
AuthorDate: Mon May 13 21:16:31 2024 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 14 13:05:35 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

Change-Id: I3a65485cc890d6bb6bf1197a3f296634ebffa02c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167612
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/win/dtrans/MtaOleClipb.cxx b/vcl/win/dtrans/MtaOleClipb.cxx
index 3fb2051472b7..151c08ef9754 100644
--- a/vcl/win/dtrans/MtaOleClipb.cxx
+++ b/vcl/win/dtrans/MtaOleClipb.cxx
@@ -689,7 +689,7 @@ unsigned __stdcall 
CMtaOleClipboard::clipboardChangedNotifierThreadProc(void* pP
 {
 
osl_setThreadName("CMtaOleClipboard::clipboardChangedNotifierThreadProc()");
 CMtaOleClipboard* pInst = static_cast< CMtaOleClipboard* >( pParam );
-OSL_ASSERT( nullptr != pInst );
+assert(pInst);
 
 sal::systools::CoInitializeGuard aGuard(COINIT_APARTMENTTHREADED, false,
 
sal::systools::CoInitializeGuard::WhenFailed::NoThrow);


  1   2   3   4   5   6   7   8   9   10   >