core.git: sw/qa sw/source

2024-05-01 Thread Mike Kaganski (via logerrit)
 sw/qa/extras/uiwriter/data/table-in-table.fodt |   29 +
 sw/qa/extras/uiwriter/uiwriter9.cxx|   14 
 sw/source/core/crsr/crsrsh.cxx |   12 +++---
 3 files changed, 52 insertions(+), 3 deletions(-)

New commits:
commit 0d82ddb39e0cdbfde428eb4da7268cac4176f1bd
Author: Mike Kaganski 
AuthorDate: Thu May 2 09:11:25 2024 +0500
Commit: Mike Kaganski 
CommitDate: Thu May 2 08:56:47 2024 +0200

tdf#160898: check for nullptr

Regression after commit d81379db730a163c5ff75d4f3a3cddbd7b5eddda
(tdf#154877 sw: generalise ExtendedSelectAll(), 2023-05-09)

Change-Id: I9289171647fca8bd1b696399ff7c43a2ac7b8b30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166990
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/sw/qa/extras/uiwriter/data/table-in-table.fodt 
b/sw/qa/extras/uiwriter/data/table-in-table.fodt
new file mode 100644
index ..e055d343b847
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/table-in-table.fodt
@@ -0,0 +1,29 @@
+
+
+
+ 
+  
+   
+  
+ 
+ 
+  
+   
+   
+
+
+ 
+  
+   
+   
+
+   
+  
+  
+ 
+
+   
+   
+  
+ 
+
\ No newline at end of file
diff --git a/sw/qa/extras/uiwriter/uiwriter9.cxx 
b/sw/qa/extras/uiwriter/uiwriter9.cxx
index 93d608a69247..d8b10279a827 100644
--- a/sw/qa/extras/uiwriter/uiwriter9.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter9.cxx
@@ -593,6 +593,20 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf146190)
 CPPUNIT_ASSERT_EQUAL(OUString("Shape 1"), 
rMrkList.GetMark(0)->GetMarkedSdrObj()->GetName());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf160898)
+{
+// Given a document with a 1-cell table in another 1-cell table:
+createSwDoc("table-in-table.fodt");
+SwXTextDocument* pXTextDocument = 
dynamic_cast(mxComponent.get());
+SwDocShell* pDocShell = pXTextDocument->GetDocShell();
+SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+
+// Move to the normally hidden paragraph inside the outer table cell, 
following the inner table
+pWrtShell->Down(false, 2);
+// Without the fix, this would crash:
+pWrtShell->SelAll();
+}
+
 } // end of anonymous namespace
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 58396b6f2890..d3b39a4ae2c4 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -737,9 +737,15 @@ bool SwCursorShell::MoveStartText()
 SwTableNode const*const pTable(pStartNode->FindTableNode());
 m_pCurrentCursor->GetPoint()->Assign(*pStartNode);
 SwNodes::GoNext(m_pCurrentCursor->GetPoint());
-while (m_pCurrentCursor->GetPoint()->GetNode().FindTableNode() != pTable
-&& (!pTable || pTable->GetIndex() < 
m_pCurrentCursor->GetPoint()->GetNode().FindTableNode()->GetIndex())
-&& MoveOutOfTable());
+while (auto* pFoundTable = 
m_pCurrentCursor->GetPoint()->GetNode().FindTableNode())
+{
+if (pFoundTable == pTable)
+break;
+if (pTable && pTable->GetIndex() >= pFoundTable->GetIndex())
+break;
+if (!MoveOutOfTable())
+break;
+}
 
UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY);
 return old != *m_pCurrentCursor->GetPoint();
 }


core.git: compilerplugins/clang xmlsecurity/inc xmlsecurity/source

2024-05-01 Thread Moritz Duge (via logerrit)
 compilerplugins/clang/unusedfields.writeonly.results |2 --
 xmlsecurity/inc/certificatechooser.hxx   |1 -
 xmlsecurity/source/dialogs/certificatechooser.cxx|1 -
 3 files changed, 4 deletions(-)

New commits:
commit 687ae6ca01177a04f9ea715a1f1cd70f385a0840
Author: Moritz Duge 
AuthorDate: Wed May 1 17:09:13 2024 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu May 2 08:41:17 2024 +0200

Drop unused instance variable.

Change-Id: Iee32e4348526e54e0cc45a54e55eddb6479248e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166968
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/compilerplugins/clang/unusedfields.writeonly.results 
b/compilerplugins/clang/unusedfields.writeonly.results
index a2110d149d2c..268c7478b84f 100644
--- a/compilerplugins/clang/unusedfields.writeonly.results
+++ b/compilerplugins/clang/unusedfields.writeonly.results
@@ -1351,8 +1351,6 @@ xmloff/source/forms/officeforms.hxx:68
 xmloff/source/text/txtimp.cxx:104
 XMLTextImportHelper::Impl m_xFrameImpPrMap 
rtl::Reference
 xmlsecurity/inc/certificatechooser.hxx:57
-CertificateChooser mvUserData std::vector >
-xmlsecurity/inc/certificateviewer.hxx:51
 CertificateViewer mxGeneralPage std::unique_ptr
 xmlsecurity/inc/certificateviewer.hxx:52
 CertificateViewer mxDetailsPage std::unique_ptr
diff --git a/xmlsecurity/inc/certificatechooser.hxx 
b/xmlsecurity/inc/certificatechooser.hxx
index 494ea40de1e4..33458c27cd04 100644
--- a/xmlsecurity/inc/certificatechooser.hxx
+++ b/xmlsecurity/inc/certificatechooser.hxx
@@ -51,7 +51,6 @@ class CertificateChooser final : public 
weld::GenericDialogController
 {
 private:
 std::vector< css::uno::Reference< css::xml::crypto::XXMLSecurityContext > 
> mxSecurityContexts;
-std::vector> mvUserData;
 
 boolmbInitialized;
 CertificateChooserUserAction const meAction;
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx 
b/xmlsecurity/source/dialogs/certificatechooser.cxx
index 32e75f91f211..2bae90cd7d70 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -216,7 +216,6 @@ void CertificateChooser::ImplInitialize(bool mbSearch)
 userData->xCertificate = xCert;
 userData->xSecurityContext = secContext;
 userData->xSecurityEnvironment = secEnvironment;
-mvUserData.push_back(userData);
 
 OUString sIssuer = xmlsec::GetContentPart( xCert->getIssuerName(), 
xCert->getCertificateKind());
 OUString sExpDate = utl::GetDateString(xCert->getNotValidAfter());


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

2024-05-01 Thread Samuel Mehrbrodt (via logerrit)
 sc/uiconfig/scalc/ui/formatcellsdialog.ui |  287 ++--
 sd/uiconfig/simpress/ui/templatedialog.ui |  533 --
 2 files changed, 119 insertions(+), 701 deletions(-)

New commits:
commit 7e553a56c6a5aa7f4b1f01df52ed9607d3397cfc
Author: Samuel Mehrbrodt 
AuthorDate: Fri Apr 26 15:09:59 2024 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu May 2 08:30:53 2024 +0200

Save with newer Glade version

Change-Id: Ib1380e4771bbeeaebece1bb5bae0617e588ec378
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166747
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sc/uiconfig/scalc/ui/formatcellsdialog.ui 
b/sc/uiconfig/scalc/ui/formatcellsdialog.ui
index b18ec5c62814..ea0daf8e9fd5 100644
--- a/sc/uiconfig/scalc/ui/formatcellsdialog.ui
+++ b/sc/uiconfig/scalc/ui/formatcellsdialog.ui
@@ -1,33 +1,30 @@
 
-
+
 
   
   
-False
-6
+False
+6
 Format Cells
 True
-0
-0
-dialog
-
-  
-
+0
+0
+dialog
 
   
-False
+False
 vertical
 12
 
   
-False
-end
+False
+end
 
   
 _Reset
 True
-True
-True
+True
+True
 True
   
   
@@ -40,10 +37,10 @@
   
 _OK
 True
-True
-True
-True
-True
+True
+True
+True
+True
 True
   
   
@@ -56,8 +53,8 @@
   
 _Cancel
 True
-True
-True
+True
+True
 True
   
   
@@ -70,8 +67,8 @@
   
 _Help
 True
-True
-True
+True
+True
 True
   
   
@@ -85,47 +82,23 @@
   
 False
 True
-end
+end
 0
   
 
 
   
 True
-True
+True
 True
 True
 True
-True
+True
 
   
   
 True
-False
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
+False
 
   
 
@@ -134,42 +107,18 @@
 
   
 True
-False
+False
 Numbers
   
   
-False
+False
   
 
 
   
   
 True
-False
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
+False
 
   
 
@@ -181,43 +130,19 @@
 
   
 True
-False
+False
 Font
   
   
 1
-False
+False
   
 
 
   
   
 True
-False
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
+False
 
   
 
@@ -229,43 +154,19 @@
 
   
 True
-False
+False
 Font E

core.git: sc/uiconfig sw/uiconfig

2024-05-01 Thread Samuel Mehrbrodt (via logerrit)
 sc/uiconfig/scalc/ui/drawtemplatedialog.ui |  503 -
 sc/uiconfig/scalc/ui/pagetemplatedialog.ui |  265 ++-
 sc/uiconfig/scalc/ui/paratemplatedialog.ui |  325 +++---
 sw/uiconfig/swriter/ui/templatedialog1.ui  |  273 ++-
 sw/uiconfig/swriter/ui/templatedialog16.ui |  287 +++-
 sw/uiconfig/swriter/ui/templatedialog4.ui  |  333 +++
 6 files changed, 336 insertions(+), 1650 deletions(-)

New commits:
commit 9ec6bfb598f39ebdb3e6698b5411ace951a53a8d
Author: Samuel Mehrbrodt 
AuthorDate: Sat Apr 27 10:15:25 2024 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu May 2 08:30:22 2024 +0200

Save with newer Glade version

Change-Id: I0b3c4d263cef98ae9b28b863e25def3819ca9186
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166772
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Jenkins

diff --git a/sc/uiconfig/scalc/ui/drawtemplatedialog.ui 
b/sc/uiconfig/scalc/ui/drawtemplatedialog.ui
index 2a2ca1f3e632..b20a03b54dae 100644
--- a/sc/uiconfig/scalc/ui/drawtemplatedialog.ui
+++ b/sc/uiconfig/scalc/ui/drawtemplatedialog.ui
@@ -1,33 +1,30 @@
 
-
+
 
   
   
-False
-6
+False
+6
 Drawing Style
 True
-0
-0
-dialog
-
-  
-
+0
+0
+dialog
 
   
-False
+False
 vertical
 12
 
   
-False
-end
+False
+end
 
   
 _Reset
 True
-True
-True
+True
+True
 True
   
   
@@ -40,9 +37,9 @@
   
 _Standard
 True
-True
-True
-True
+True
+True
+True
   
   
 False
@@ -54,10 +51,10 @@
   
 _OK
 True
-True
-True
-True
-True
+True
+True
+True
+True
 True
   
   
@@ -70,8 +67,8 @@
   
 _Cancel
 True
-True
-True
+True
+True
 True
   
   
@@ -84,8 +81,8 @@
   
 _Help
 True
-True
-True
+True
+True
 True
   
   
@@ -99,47 +96,23 @@
   
 False
 True
-end
+end
 0
   
 
 
   
 True
-True
+True
 True
 True
 True
-True
+True
 
   
   
 True
-False
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
+False
 
   
 
@@ -148,42 +121,18 @@
 
   
 True
-False
+False
 Organizer
   
   
-False
+False
   
 
 
   
   
 True
-False
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
+False
 
   
 
@@ -195,43 +144,19 @@
 
   
 True
-True
+True
 Line
   
   
 1
-False
+False
   
 
 
   
   
 True
-False
-
-  
-
-
-  
-
- 

core.git: svx/source

2024-05-01 Thread Noel Grandin (via logerrit)
 svx/source/xoutdev/xtable.cxx |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 764f944d55cd21cb9ace6b51e8e173b7a4acd21d
Author: Noel Grandin 
AuthorDate: Wed May 1 20:35:27 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 2 08:20:46 2024 +0200

use more OUString in XPropertyList

Change-Id: I775f75c2e56bff36d6de8ddb298d30ffd93a7da4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166976
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index e640c18b64e9..e842e5e854cc 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -369,15 +369,15 @@ XPropertyList::CreatePropertyListFromURL( 
XPropertyListType t,
 
 struct {
 XPropertyListType t;
-const char *pExt;
-} const pExtnMap[] = {
-{ XPropertyListType::Color,"soc" },
-{ XPropertyListType::LineEnd, "soe" },
-{ XPropertyListType::Dash, "sod" },
-{ XPropertyListType::Hatch,"soh" },
-{ XPropertyListType::Gradient, "sog" },
-{ XPropertyListType::Bitmap,   "sob" },
-{ XPropertyListType::Pattern,  "sop"}
+OUString aExt;
+} constexpr pExtnMap[] = {
+{ XPropertyListType::Color,u"soc"_ustr },
+{ XPropertyListType::LineEnd, u"soe"_ustr },
+{ XPropertyListType::Dash, u"sod"_ustr },
+{ XPropertyListType::Hatch,u"soh"_ustr },
+{ XPropertyListType::Gradient, u"sog"_ustr },
+{ XPropertyListType::Bitmap,   u"sob"_ustr },
+{ XPropertyListType::Pattern,  u"sop"_ustr}
 };
 
 OUString XPropertyList::GetDefaultExt( XPropertyListType t )
@@ -385,7 +385,7 @@ OUString XPropertyList::GetDefaultExt( XPropertyListType t )
 for (const auto & i : pExtnMap)
 {
 if( i.t == t )
-return OUString::createFromAscii( i.pExt );
+return i.aExt;
 }
 return OUString();
 }


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

2024-05-01 Thread Noel Grandin (via logerrit)
 include/xmloff/xmlexp.hxx  |3 --
 svx/source/xml/xmlxtexp.cxx|   14 +--
 xmloff/source/core/xmlexp.cxx  |   14 ---
 xmloff/source/forms/controlelement.cxx |   42 -
 xmloff/source/forms/controlelement.hxx |3 +-
 xmloff/source/forms/elementexport.cxx  |   22 -
 xmloff/source/forms/elementexport.hxx  |   14 +--
 7 files changed, 48 insertions(+), 64 deletions(-)

New commits:
commit df22951b34010e47074bab24ba9ac27c2773d204
Author: Noel Grandin 
AuthorDate: Wed May 1 20:27:36 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 2 08:20:23 2024 +0200

use more OUString compile time literals in xmloff

Change-Id: Iddf9d40ca63f2f3ce7d48aaf881a3abb10f88bbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166975
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx
index f6a6e8748054..24db3601b3c3 100644
--- a/include/xmloff/xmlexp.hxx
+++ b/include/xmloff/xmlexp.hxx
@@ -648,9 +648,6 @@ public:
 
 // The constructor prints a start tag that has the common attributes
 // of the XMLExport instance attached.
-SvXMLElementExport( SvXMLExport& rExp, sal_uInt16 nPrefix,
-const char *pName,
-bool bIgnWSOutside, bool bIgnWSInside );
 SvXMLElementExport( SvXMLExport& rExp, sal_uInt16 nPrefix,
 const OUString& rName,
 bool bIgnWSOutside, bool bIgnWSInside );
diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx
index 214d976b7d71..622bbb2d830b 100644
--- a/svx/source/xml/xmlxtexp.cxx
+++ b/svx/source/xml/xmlxtexp.cxx
@@ -339,39 +339,39 @@ bool SvxXMLXTableExportComponent::exportTable() noexcept
 if( !mxTable.is() )
 break;
 
-char const* pEleName;
+OUString pEleName;
 Type aExportType = mxTable->getElementType();
 std::unique_ptr pExporter;
 
 if( aExportType == cppu::UnoType::get() )
 {
 pExporter.reset(new SvxXMLColorEntryExporter(*this));
-pEleName = "color-table";
+pEleName = u"color-table"_ustr;
 }
 else if( aExportType == cppu::UnoType< 
drawing::PolyPolygonBezierCoords >::get() )
 {
 pExporter.reset(new SvxXMLLineEndEntryExporter(*this));
-pEleName = "marker-table";
+pEleName = u"marker-table"_ustr;
 }
 else if( aExportType == cppu::UnoType< drawing::LineDash >::get() )
 {
 pExporter.reset(new SvxXMLDashEntryExporter(*this));
-pEleName = "dash-table";
+pEleName = u"dash-table"_ustr;
 }
 else if( aExportType == cppu::UnoType< drawing::Hatch >::get() )
 {
 pExporter.reset(new SvxXMLHatchEntryExporter(*this));
-pEleName = "hatch-table";
+pEleName = u"hatch-table"_ustr;
 }
 else if( aExportType == cppu::UnoType< awt::Gradient >::get() )
 {
 pExporter.reset(new SvxXMLGradientEntryExporter(*this));
-pEleName = "gradient-table";
+pEleName = u"gradient-table"_ustr;
 }
 else if( aExportType == cppu::UnoType::get())
 {
 pExporter.reset(new SvxXMLBitmapEntryExporter(*this));
-pEleName = "bitmap-table";
+pEleName = u"bitmap-table"_ustr;
 }
 else
 {
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 140b264f6d41..a07e759d61ee 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -2448,20 +2448,6 @@ void SvXMLElementExport::StartElement(
 mrExport.StartElement(maElementName, bIgnoreWhitespaceOutside);
 }
 
-SvXMLElementExport::SvXMLElementExport(
-SvXMLExport& rExp,
-sal_uInt16 nPrefixKey,
-const char *pLName,
-bool bIWSOutside,
-bool bIWSInside )
-: mrExport( rExp )
-, mbIgnoreWhitespaceInside( bIWSInside )
-, mbDoSomething( true )
-{
-const OUString sLName( OUString::createFromAscii( pLName ) );
-StartElement( nPrefixKey, sLName, bIWSOutside );
-}
-
 SvXMLElementExport::SvXMLElementExport(
 SvXMLExport& rExp,
 sal_uInt16 nPrefixKey,
diff --git a/xmloff/source/forms/controlelement.cxx 
b/xmloff/source/forms/controlelement.cxx
index af752ae4bdc5..328db17e3580 100644
--- a/xmloff/source/forms/controlelement.cxx
+++ b/xmloff/source/forms/controlelement.cxx
@@ -26,31 +26,31 @@ namespace xmloff
 {
 
 //= OControlElement
-const char* OControlElement::getElementName(ElementType _eType)
+OUString OControlElement::getElementName(ElementType _eType)
 {
 switch (_eType)
 {

core.git: unotools/source

2024-05-01 Thread Noel Grandin (via logerrit)
 unotools/source/misc/fontcvt.cxx |   13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 656f66b4bdefdcbeee05cba6f1fffb4fadc9319d
Author: Noel Grandin 
AuthorDate: Wed May 1 20:39:06 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 2 08:19:24 2024 +0200

use more OUString in StarSymbolToMSMultiFontImpl

Change-Id: I995e74653196d0715559127341fdf91a0d68c253
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166977
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx
index 5abda6fdf9b2..60d2edb7788b 100644
--- a/unotools/source/misc/fontcvt.cxx
+++ b/unotools/source/misc/fontcvt.cxx
@@ -1018,10 +1018,10 @@ enum SymbolFont
 
 }
 
-const char * const aSymbolNames[] =
+constexpr OUString aSymbolNames[] =
 {
-"Symbol", "Wingdings", "Monotype Sorts", "Webdings", "Wingdings 2",
-"Wingdings 3", "MT Extra", "Times New Roman"
+u"Symbol"_ustr, u"Wingdings"_ustr, u"Monotype Sorts"_ustr, 
u"Webdings"_ustr, u"Wingdings 2"_ustr,
+u"Wingdings 3"_ustr, u"MT Extra"_ustr, u"Times New Roman"_ustr
 };
 
 namespace {
@@ -1199,9 +1199,9 @@ StarSymbolToMSMultiFontImpl::StarSymbolToMSMultiFontImpl()
 }
 }
 
-static const char *SymbolFontToString(int nResult)
+static const OUString & SymbolFontToString(int nResult)
 {
-const char * const *ppName = aSymbolNames;
+const OUString *ppName = aSymbolNames;
 int nI = Symbol;
 while (nI <= nResult)
 {
@@ -1224,8 +1224,7 @@ OUString 
StarSymbolToMSMultiFontImpl::ConvertChar(sal_Unicode &rChar)
 if (aResult != maMagicMap.end())
 {
 const SymbolEntry &rEntry = (*aResult).second;
-const char* pc = SymbolFontToString(rEntry.eFont);
-sRet = OUString(pc, strlen(pc), RTL_TEXTENCODING_ASCII_US);
+sRet = SymbolFontToString(rEntry.eFont);
 rChar = rEntry.cIndex;
 }
 


core.git: basic/source

2024-05-01 Thread Noel Grandin (via logerrit)
 basic/source/runtime/methods.cxx |   82 +++
 1 file changed, 41 insertions(+), 41 deletions(-)

New commits:
commit 6c4760f89cf28688497414946457c04253a845be
Author: Noel Grandin 
AuthorDate: Wed May 1 20:45:43 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 2 08:18:59 2024 +0200

use more OUString literal in getBasicTypeName

Change-Id: I6e307e4387cbecac6391000b9ca7e632b2152b24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166979
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 4dfcdc210ea3..dd8aabfde6d5 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -3564,46 +3564,46 @@ void SbRtl_VarType(StarBASIC *, SbxArray & rPar, bool)
 // Exported function
 OUString getBasicTypeName( SbxDataType eType )
 {
-static const char* pTypeNames[] =
-{
-"Empty",// SbxEMPTY
-"Null", // SbxNULL
-"Integer",  // SbxINTEGER
-"Long", // SbxLONG
-"Single",   // SbxSINGLE
-"Double",   // SbxDOUBLE
-"Currency", // SbxCURRENCY
-"Date", // SbxDATE
-"String",   // SbxSTRING
-"Object",   // SbxOBJECT
-"Error",// SbxERROR
-"Boolean",  // SbxBOOL
-"Variant",  // SbxVARIANT
-"DataObject",   // SbxDATAOBJECT
-"Unknown Type",
-"Unknown Type",
-"Char", // SbxCHAR
-"Byte", // SbxBYTE
-"UShort",   // SbxUSHORT
-"ULong",// SbxULONG
-"Long64",   // SbxLONG64
-"ULong64",  // SbxULONG64
-"Int",  // SbxINT
-"UInt", // SbxUINT
-"Void", // SbxVOID
-"HResult",  // SbxHRESULT
-"Pointer",  // SbxPOINTER
-"DimArray", // SbxDIMARRAY
-"CArray",   // SbxCARRAY
-"Userdef",  // SbxUSERDEF
-"Lpstr",// SbxLPSTR
-"Lpwstr",   // SbxLPWSTR
-"Unknown Type", // SbxCoreSTRING
-"WString",  // SbxWSTRING
-"WChar",// SbxWCHAR
-"Int64",// SbxSALINT64
-"UInt64",   // SbxSALUINT64
-"Decimal",  // SbxDECIMAL
+static constexpr OUString pTypeNames[] =
+{
+u"Empty"_ustr,// SbxEMPTY
+u"Null"_ustr, // SbxNULL
+u"Integer"_ustr,  // SbxINTEGER
+u"Long"_ustr, // SbxLONG
+u"Single"_ustr,   // SbxSINGLE
+u"Double"_ustr,   // SbxDOUBLE
+u"Currency"_ustr, // SbxCURRENCY
+u"Date"_ustr, // SbxDATE
+u"String"_ustr,   // SbxSTRING
+u"Object"_ustr,   // SbxOBJECT
+u"Error"_ustr,// SbxERROR
+u"Boolean"_ustr,  // SbxBOOL
+u"Variant"_ustr,  // SbxVARIANT
+u"DataObject"_ustr,   // SbxDATAOBJECT
+u"Unknown Type"_ustr,
+u"Unknown Type"_ustr,
+u"Char"_ustr, // SbxCHAR
+u"Byte"_ustr, // SbxBYTE
+u"UShort"_ustr,   // SbxUSHORT
+u"ULong"_ustr,// SbxULONG
+u"Long64"_ustr,   // SbxLONG64
+u"ULong64"_ustr,  // SbxULONG64
+u"Int"_ustr,  // SbxINT
+u"UInt"_ustr, // SbxUINT
+u"Void"_ustr, // SbxVOID
+u"HResult"_ustr,  // SbxHRESULT
+u"Pointer"_ustr,  // SbxPOINTER
+u"DimArray"_ustr, // SbxDIMARRAY
+u"CArray"_ustr,   // SbxCARRAY
+u"Userdef"_ustr,  // SbxUSERDEF
+u"Lpstr"_ustr,// SbxLPSTR
+u"Lpwstr"_ustr,   // SbxLPWSTR
+u"Unknown Type"_ustr, // SbxCoreSTRING
+u"WString"_ustr,  // SbxWSTRING
+u"WChar"_ustr,// SbxWCHAR
+u"Int64"_ustr,// SbxSALINT64
+u"UInt64"_ustr,   // SbxSALUINT64
+u"Decimal"_ustr,  // SbxDECIMAL
 };
 
 size_t nPos = static_cast(eType) & 0x0FFF;
@@ -3612,7 +3612,7 @@ OUString getBasicTypeName( SbxDataType eType )
 {
 nPos = nTypeNameCount - 1;
 }
-return OUString::createFromAscii(pTypeNames[nPos]);
+return pTypeNames[nPos];
 }
 
 static OUString getObjectTypeName( SbxVariable* pVar )


core.git: sc/qa

2024-05-01 Thread Noel Grandin (via logerrit)
 sc/qa/unit/PivotTableFormatsImportExport.cxx |  181 ++-
 1 file changed, 41 insertions(+), 140 deletions(-)

New commits:
commit 7b7f1c3880c05eb9c2ee941b70025bac0a6decda
Author: Noel Grandin 
AuthorDate: Wed May 1 21:48:27 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 2 08:18:25 2024 +0200

workaround compiler crash on macos

affects x86 and clang-13, crash looks like

1   llvm::APInt::APInt(unsigned int, llvm::ArrayRef) + 
112
2   (anonymous 
namespace)::StmtPrinter::VisitUserDefinedLiteral(clang::UserDefinedLiteral*) + 
1019
3   (anonymous 
namespace)::StmtPrinter::VisitInitListExpr(clang::InitListExpr*) + 189
4   clang::Stmt::printPretty(llvm::raw_ostream&, clang::PrinterHelper*, 
clang::PrintingPolicy const&, unsigned int, llvm::StringRef, clang::ASTContext 
const*) const + 165
5   clang::APValue::printPretty(llvm::raw_ostream&, clang::PrintingPolicy 
const&, clang::QualType, clang::ASTContext const*) const + 3357
6   (anonymous namespace)::CallStackFrame::describe(llvm::raw_ostream&) + 
569
7   clang::interp::State::addCallStack(unsigned int) + 388
8   clang::interp::State::diag(clang::SourceLocation, unsigned int, 
unsigned int, bool) + 277
9   CheckConstexprFunction((anonymous namespace)::EvalInfo&, 
clang::SourceLocation, clang::FunctionDe
cl const*, clang::FunctionDecl const*, clang::Stmt const*) + 282

Change-Id: I24a111f064fc17e289a4a6c8e7a40c776fa71e43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166986
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/sc/qa/unit/PivotTableFormatsImportExport.cxx 
b/sc/qa/unit/PivotTableFormatsImportExport.cxx
index 3477d574918c..33d0adc8f6f5 100644
--- a/sc/qa/unit/PivotTableFormatsImportExport.cxx
+++ b/sc/qa/unit/PivotTableFormatsImportExport.cxx
@@ -82,21 +82,10 @@ static void assertDataFieldInRow_RowLabelColor(ScDocument& 
rDoc)
 CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, getFontColor(rDoc, u"G7"_ustr));
 
 // Make sure the other cells have the font color or background set to 
default
-auto aEmptyAddresses = std::to_array({
-u"G5"_ustr,
-u"H5"_ustr,
-u"I5"_ustr,
-u"J5"_ustr,
-u"K5"_ustr,
-u"H6"_ustr,
-u"I6"_ustr,
-u"J6"_ustr,
-u"K6"_ustr,
-u"H7"_ustr,
-u"I7"_ustr,
-u"J7"_ustr,
-u"K7"_ustr,
-});
+std::vector aEmptyAddresses{
+u"G5"_ustr, u"H5"_ustr, u"I5"_ustr, u"J5"_ustr, u"K5"_ustr, 
u"H6"_ustr, u"I6"_ustr,
+u"J6"_ustr, u"K6"_ustr, u"H7"_ustr, u"I7"_ustr, u"J7"_ustr, u"K7"_ustr,
+};
 CPPUNIT_ASSERT_EQUAL(OUString(), checkNonEmptyAddresses(rDoc, 
aEmptyAddresses));
 }
 
@@ -114,22 +103,10 @@ static void 
assertDataFieldInRow_ColumnLabelColor(ScDocument& rDoc)
 CPPUNIT_ASSERT_EQUAL(Color(0x00B050), getBackgroundColor(rDoc, 
u"H5"_ustr));
 
 // Make sure the other cells have the font color or background set to 
default
-auto aEmptyAddresses = std::to_array({
-u"G5"_ustr,
-u"I5"_ustr,
-u"J5"_ustr,
-u"K5"_ustr,
-u"G6"_ustr,
-u"H6"_ustr,
-u"I6"_ustr,
-u"J6"_ustr,
-u"K6"_ustr,
-u"G7"_ustr,
-u"H7"_ustr,
-u"I7"_ustr,
-u"J7"_ustr,
-u"K7"_ustr,
-});
+std::vector aEmptyAddresses{
+u"G5"_ustr, u"I5"_ustr, u"J5"_ustr, u"K5"_ustr, u"G6"_ustr, 
u"H6"_ustr, u"I6"_ustr,
+u"J6"_ustr, u"K6"_ustr, u"G7"_ustr, u"H7"_ustr, u"I7"_ustr, 
u"J7"_ustr, u"K7"_ustr,
+};
 CPPUNIT_ASSERT_EQUAL(OUString(), checkNonEmptyAddresses(rDoc, 
aEmptyAddresses));
 }
 
@@ -149,21 +126,10 @@ static void 
assertDataFieldInColumn_ColumnLabelColor(ScDocument& rDoc)
 CPPUNIT_ASSERT_EQUAL(Color(0x92D050), getBackgroundColor(rDoc, 
u"I5"_ustr));
 
 // Make sure the other cells have the font color or background set to 
default
-auto aEmptyAddresses = std::to_array({
-u"G5"_ustr,
-u"G6"_ustr,
-u"H6"_ustr,
-u"I6"_ustr,
-u"G7"_ustr,
-u"H7"_ustr,
-u"I7"_ustr,
-u"G8"_ustr,
-u"H8"_ustr,
-u"I8"_ustr,
-u"G9"_ustr,
-u"H9"_ustr,
-u"I9"_ustr,
-});
+std::vector aEmptyAddresses{
+u"G5"_ustr, u"G6"_ustr, u"H6"_ustr, u"I6"_ustr, u"G7"_ustr, 
u"H7"_ustr, u"I7"_ustr,
+u"G8"_ustr, u"H8"_ustr, u"I8"_ustr, u"G9"_ustr, u"H9"_ustr, u"I9"_ustr,
+};
 CPPUNIT_ASSERT_EQUAL(OUString(), checkNonEmptyAddresses(rDoc, 
aEmptyAddresses));
 }
 
@@ -182,21 +148,10 @@ static void assertDataFieldInColumn_DataColor(ScDocument& 
rDoc)
 CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, getFontColor(rDoc, u"H7"_ustr));
 CPPUNIT_ASSERT_EQUAL(Color(0x92D050), getBackgroundColor(rDoc, 
u"I9"_ustr));
 
-auto aEmptyAddresses = std::to_array({
-u"G5"_ustr,
-u"H5"_ustr,
-u"I5"_ustr,
-u"G6"_ustr,
-u"H6"_ustr,
-u"I6"_ustr,
-

core.git: comphelper/source

2024-05-01 Thread Noel Grandin (via logerrit)
 comphelper/source/misc/xmlsechelper.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit df8dd90f143e650cff12e775f46a32eb3cf8806c
Author: Noel Grandin 
AuthorDate: Wed May 1 20:48:52 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 2 08:17:47 2024 +0200

elide some OUString creation in GetContentPart

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

diff --git a/comphelper/source/misc/xmlsechelper.cxx 
b/comphelper/source/misc/xmlsechelper.cxx
index e1bb828ba631..2a0a4d2e3198 100644
--- a/comphelper/source/misc/xmlsechelper.cxx
+++ b/comphelper/source/misc/xmlsechelper.cxx
@@ -260,18 +260,16 @@ std::vector< std::pair< OUString, OUString> > 
parseDN(std::u16string_view rRawSt
 
 OUString GetContentPart( const OUString& _rRawString, const 
css::security::CertificateKind &rKind )
 {
-char const * aIDs[] = { "CN", "OU", "O", "E", nullptr };
+static constexpr OUString aIDs[] { u"CN"_ustr, u"OU"_ustr, u"O"_ustr, 
u"E"_ustr };
 
 // tdf#131733 Don't process OpenPGP certs, only X509
 if (rKind == css::security::CertificateKind_OPENPGP )
 return _rRawString;
 
 OUString retVal;
-int i = 0;
 std::vector< std::pair< OUString, OUString > > vecAttrValueOfDN = 
parseDN(_rRawString);
-while ( aIDs[i] )
+for ( const auto & sPartId : aIDs )
 {
-OUString sPartId = OUString::createFromAscii( aIDs[i++] );
 auto idn = std::find_if(vecAttrValueOfDN.cbegin(), 
vecAttrValueOfDN.cend(),
 [&sPartId](const std::pair< OUString, OUString >& dn) { return 
dn.first == sPartId; });
 if (idn != vecAttrValueOfDN.cend())


core.git: drawinglayer/CppunitTest_drawinglayer_processors.mk solenv/gbuild writerperfect/CppunitTest_writerperfect_epubexport.mk

2024-05-01 Thread Stephan Bergmann (via logerrit)
 drawinglayer/CppunitTest_drawinglayer_processors.mk   |2 +-
 solenv/gbuild/extensions/post_SpeedUpTargets.mk   |3 +++
 solenv/gbuild/gbuild.mk   |8 
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk|2 --
 writerperfect/CppunitTest_writerperfect_epubexport.mk |2 +-
 5 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit a3d758d528d3408fcccd7d3673439b5d68347e30
Author: Stephan Bergmann 
AuthorDate: Tue Apr 30 16:51:21 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu May 2 07:52:03 2024 +0200

Prepare to run (select) tests during Emscripten build

...by e.g. executing generated Wasm code with node.  This requires check 
targets
to not be skipped unconditionally, unlike for other CROSS_COMPILING builds, 
so
introduce gb_CAN_EXECUTE_HOST_CODE to distinguish these cases.

Which revealed that some CppunitTest targets unconditionally used artefacts 
that
are covered by some ENABLE_WASM_STRIP_*, so made those uses conditional
accordingly (even though the resulting binaries might actually be 
dysfunctional,
lacking relevant parts; we'll fix that if and when we actually build and run
them).

Change-Id: I7144eeb908ede25358a3c8186198ac532de4d9f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166931
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/drawinglayer/CppunitTest_drawinglayer_processors.mk 
b/drawinglayer/CppunitTest_drawinglayer_processors.mk
index fcbbf247f10a..627809b814a8 100644
--- a/drawinglayer/CppunitTest_drawinglayer_processors.mk
+++ b/drawinglayer/CppunitTest_drawinglayer_processors.mk
@@ -16,7 +16,7 @@ $(eval $(call gb_CppunitTest_use_api,drawinglayer_processors,\
 
 $(eval $(call gb_CppunitTest_use_libraries,drawinglayer_processors, \
basegfx \
-   cppcanvas \
+   $(if $(ENABLE_WASM_STRIP_CANVAS),,cppcanvas) \
cppu \
cppuhelper \
sal \
diff --git a/solenv/gbuild/extensions/post_SpeedUpTargets.mk 
b/solenv/gbuild/extensions/post_SpeedUpTargets.mk
index 44539cc5576d..18f1277a8039 100644
--- a/solenv/gbuild/extensions/post_SpeedUpTargets.mk
+++ b/solenv/gbuild/extensions/post_SpeedUpTargets.mk
@@ -9,6 +9,9 @@
 
 ifneq ($(CROSS_COMPILING),)
 gb_Module_add_targets_for_build :=
+endif
+
+ifeq ($(gb_CAN_EXECUTE_HOST_CODE),$(false))
 gb_Module_SKIPTARGETS := check coverage slowcheck screenshot subsequentcheck 
uicheck
 endif
 
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 2f5704896d42..ab6132e3b5d2 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -166,6 +166,14 @@ ifneq ($(strip $(ENVCFLAGSCXX)),)
 gb__ENV_CXXFLAGS := $(ENVCFLAGSCXX)
 endif
 
+ifeq ($(CROSS_COMPILING),)
+gb_CAN_EXECUTE_HOST_CODE := $(true)
+else ifeq ($(OS),EMSCRIPTEN)
+gb_CAN_EXECUTE_HOST_CODE := $(true)
+else
+gb_CAN_EXECUTE_HOST_CODE := $(false)
+endif
+
 include $(GBUILDDIR)/ExternalExecutable.mk
 include $(GBUILDDIR)/TargetLocations.mk
 
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index e660c20cc650..7cd4d3c6fa02 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -92,8 +92,6 @@ $(call gb_LinkTarget_add_auxtargets,$(2),\
 
 endef
 
-gb_SUPPRESS_TESTS := $(true)
-
 define gb_Library_get_rpath
 endef
 
diff --git a/writerperfect/CppunitTest_writerperfect_epubexport.mk 
b/writerperfect/CppunitTest_writerperfect_epubexport.mk
index 298a045b32e3..ff8410b345be 100644
--- a/writerperfect/CppunitTest_writerperfect_epubexport.mk
+++ b/writerperfect/CppunitTest_writerperfect_epubexport.mk
@@ -30,7 +30,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,writerperfect_epubexport, \
 ))
 
 $(eval $(call gb_CppunitTest_use_externals,writerperfect_epubexport,\
-epubgen \
+$(if $(ENABLE_WASM_STRIP_EPUB),,epubgen) \
 libxml2 \
 revenge \
 ))


core.git: vcl/inc vcl/jsdialog

2024-05-01 Thread Tomaž Vajngerl (via logerrit)
 vcl/inc/jsdialog/jsdialogbuilder.hxx |2 ++
 vcl/jsdialog/jsdialogbuilder.cxx |8 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 79b1a61303af8dc8716c03151b28bfce13162eb0
Author: Tomaž Vajngerl 
AuthorDate: Wed May 1 18:52:03 2024 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu May 2 07:47:49 2024 +0200

jsdialog: fix updating on container "reorder_child" or "move"

The accessibility checker sidebar did not update properly when
new issues were added or were removed. The accessiblity checker
is adding and removing new widget parts (one for each new issues)
to the grids, which is using "reorder_child" and "move" methods.
If we call "reorder_child" with update, it fails in online as it
doesn't find the parent "box" ("box_document" for example) because
the id is not set properly. Doing a full update on "reorder_child"
fixes the updating problem.

Change-Id: Ia3032516a7cee0271f8b05b22e13dde2b7430e66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166962
Reviewed-by: Tomaž Vajngerl 
Tested-by: Jenkins

diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 2c544146dfad..7491582e1550 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -544,6 +544,8 @@ class JSContainer final : public 
JSWidget
 public:
 JSContainer(JSDialogSender* pSender, vcl::Window* pContainer, 
SalInstanceBuilder* pBuilder,
 bool bTakeOwnership);
+
+void move(weld::Widget* pWidget, weld::Container* pNewParent) override;
 };
 
 class JSScrolledWindow final : public JSWidget
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index fa574088c7c6..cb9378f471f8 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1475,6 +1475,12 @@ JSContainer::JSContainer(JSDialogSender* pSender, 
vcl::Window* pContainer,
 {
 }
 
+void JSContainer::move(weld::Widget* pWidget, weld::Container* pNewParent)
+{
+SalInstanceContainer::move(pWidget, pNewParent);
+sendFullUpdate();
+}
+
 JSScrolledWindow::JSScrolledWindow(JSDialogSender* pSender, 
::VclScrolledWindow* pContainer,
SalInstanceBuilder* pBuilder, bool 
bTakeOwnership,
bool bUserManagedScrolling)
@@ -2340,7 +2346,7 @@ JSBox::JSBox(JSDialogSender* pSender, VclBox* pBox, 
SalInstanceBuilder* pBuilder
 void JSBox::reorder_child(weld::Widget* pWidget, int nNewPosition)
 {
 SalInstanceBox::reorder_child(pWidget, nNewPosition);
-sendUpdate();
+sendFullUpdate();
 }
 
 JSImage::JSImage(JSDialogSender* pSender, FixedImage* pImage, 
SalInstanceBuilder* pBuilder,


core.git: oox/inc oox/source

2024-05-01 Thread Aron Budea (via logerrit)
 oox/inc/drawingml/customshapeproperties.hxx|   33 ++--
 oox/source/drawingml/customshapegeometry.cxx   |   30 +++
 oox/source/drawingml/customshapeproperties.cxx |   99 -
 oox/source/drawingml/shape.cxx |2 
 oox/source/drawingml/transform2dcontext.cxx|   12 +--
 5 files changed, 113 insertions(+), 63 deletions(-)

New commits:
commit 2a5fc2a414517bfcef164f527ef7ab1658fcef5d
Author: Aron Budea 
AuthorDate: Tue Apr 30 03:39:15 2024 +0200
Commit: Aron Budea 
CommitDate: Thu May 2 06:32:02 2024 +0200

tdf#148616 Speed up finding custom shape guide value

Use a lookup hash map instead of linear search

Change-Id: I54c9509740d90ca3f7479dfc16a6aeffd82a405d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166879
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Reviewed-by: Aron Budea 

diff --git a/oox/inc/drawingml/customshapeproperties.hxx 
b/oox/inc/drawingml/customshapeproperties.hxx
index 4b9ee40503cd..1c627ec7448f 100644
--- a/oox/inc/drawingml/customshapeproperties.hxx
+++ b/oox/inc/drawingml/customshapeproperties.hxx
@@ -42,6 +42,28 @@ struct CustomShapeGuide
 OUString   maFormula;
 };
 
+class CustomShapeGuideContainer
+{
+public:
+sal_Int32 GetCustomShapeGuideValue( const OUString& rFormulaName ) const;
+sal_Int32 SetCustomShapeGuideValue( const CustomShapeGuide& rGuide );
+
+void push_back( const CustomShapeGuide& rGuide );
+size_t size() const { return maGuideList.size(); };
+bool empty() const { return maGuideList.empty(); };
+std::vector< CustomShapeGuide >::const_iterator begin() const { return 
maGuideList.begin(); };
+std::vector< CustomShapeGuide >::const_iterator end() const { return 
maGuideList.end(); };
+const CustomShapeGuide& operator[](size_t nIndex) const { return 
maGuideList[ nIndex ]; };
+
+private:
+std::vector< CustomShapeGuide > maGuideList;
+mutable std::unordered_map< OUString, sal_Int32 > maGuideListLookupMap;
+mutable bool mbLookupMapStale = false;
+mutable sal_Int32 mnPreviousActSize = 0;
+
+void ActualizeLookupMap() const;
+};
+
 struct AdjustHandle
 {
 boolpolar;
@@ -106,8 +128,8 @@ public:
 boolgetShapeTypeOverride() const { return 
mbShapeTypeOverride; };
 voidsetShapeTypeOverride( bool 
bShapeTypeOverride ) { mbShapeTypeOverride = bShapeTypeOverride; };
 
-std::vector< CustomShapeGuide >&getAdjustmentGuideList(){ return 
maAdjustmentGuideList; };
-std::vector< CustomShapeGuide >&getGuideList(){ return maGuideList; };
+CustomShapeGuideContainer&  getAdjustmentGuideList(){ return 
maAdjustmentGuideList; };
+CustomShapeGuideContainer&  getGuideList(){ return maGuideList; };
 std::vector< AdjustHandle >&getAdjustHandleList(){ return 
maAdjustHandleList; };
 std::vector< ConnectionSite >&  getConnectionSiteList(){ return 
maConnectionSiteList; };
 std::optional< GeomRect >&  getTextRect(){ return maTextRect; };
@@ -119,9 +141,6 @@ public:
 voidsetTextCameraZRotateAngle( sal_Int32 
nAngle ) { mnTextCameraZRotateAngle = nAngle; };
 voidsetTextAreaRotateAngle(sal_Int32 
nAngle) { moTextAreaRotateAngle = nAngle; };
 
-static sal_Int32 SetCustomShapeGuideValue( std::vector< CustomShapeGuide 
>& rGuideList, const CustomShapeGuide& rGuide );
-static sal_Int32 GetCustomShapeGuideValue( const std::vector< 
CustomShapeGuide >& rGuideList, std::u16string_view rFormulaName );
-
 sal_Int32 getArcNum() { return mnArcNum++; }
 sal_Int32 countArcTo() { return mnArcNum; }
 PropertyMap& getExtrusionPropertyMap() { return maExtrusionPropertyMap; }
@@ -136,8 +155,8 @@ private:
 
 sal_Int32   mnShapePresetType;
 boolmbShapeTypeOverride;
-std::vector< CustomShapeGuide > maAdjustmentGuideList;
-std::vector< CustomShapeGuide > maGuideList;
+CustomShapeGuideContainer   maAdjustmentGuideList;
+CustomShapeGuideContainer   maGuideList;
 std::vector< AdjustHandle > maAdjustHandleList;
 std::vector< ConnectionSite >   maConnectionSiteList;
 std::optional< GeomRect >   maTextRect;
diff --git a/oox/source/drawingml/customshapegeometry.cxx 
b/oox/source/drawingml/customshapegeometry.cxx
index 01b86b4eea1b..b029957959d8 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -224,7 +224,7 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( 
CustomShapeProperties& rCu
 aGuide.maName = rValue;
 aGuide.maFormula = "logheight" ;
 
-aRet.Value <<= 
CustomShapeProperties::SetCustomShapeGuideValue( 
rCustomShapeProperties.getGuideList(), aGuide );
+aRe

core.git: Branch 'libreoffice-24-2' - cui/uiconfig

2024-05-01 Thread Heiko Tietze (via logerrit)
 cui/uiconfig/ui/optviewpage.ui |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 77be21b5bd0bd339b2e629f5ec5ee00887033781
Author: Heiko Tietze 
AuthorDate: Tue Apr 30 09:33:22 2024 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu May 2 05:25:26 2024 +0200

Resolves tdf#141778 - Size issues on view options UI

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

diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index ce89f11d4d2c..6ad847830136 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -27,7 +27,6 @@
   
 True
 False
-True
 12
 
   


core.git: sw/source

2024-05-01 Thread Tomaž Vajngerl (via logerrit)
 sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx |  210 +++---
 sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx |   56 ++---
 2 files changed, 97 insertions(+), 169 deletions(-)

New commits:
commit 9b41d33a00763bebd5fc7078705d35a98a52
Author: Tomaž Vajngerl 
AuthorDate: Tue Apr 30 23:28:10 2024 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu May 2 04:12:40 2024 +0200

sw: simplify widgets in A11yCheckIssuesPanel

Change-Id: Iee8db2953c5836f7dee667dadab9441f73706d52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166961
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx 
b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
index a1907c9b6306..7bbbf130678c 100644
--- a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
+++ b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "A11yCheckIssuesPanel.hxx"
 
@@ -80,13 +81,15 @@ AccessibilityCheckEntry::AccessibilityCheckEntry(
 
 IMPL_LINK_NOARG(AccessibilityCheckEntry, GotoButtonClicked, weld::LinkButton&, 
bool)
 {
-m_pAccessibilityIssue->gotoIssue();
+if (m_pAccessibilityIssue)
+m_pAccessibilityIssue->gotoIssue();
 return true;
 }
 
 IMPL_LINK_NOARG(AccessibilityCheckEntry, FixButtonClicked, weld::Button&, void)
 {
-m_pAccessibilityIssue->quickFixIssue();
+if (m_pAccessibilityIssue)
+m_pAccessibilityIssue->quickFixIssue();
 }
 
 std::unique_ptr A11yCheckIssuesPanel::Create(weld::Widget* 
pParent,
@@ -100,32 +103,34 @@ std::unique_ptr 
A11yCheckIssuesPanel::Create(weld::Widget* pParent,
 
 A11yCheckIssuesPanel::A11yCheckIssuesPanel(weld::Widget* pParent, SfxBindings* 
pBindings)
 : PanelLayout(pParent, "A11yCheckIssuesPanel", 
"modules/swriter/ui/a11ycheckissuespanel.ui")
-, m_xExpanderDocument(m_xBuilder->weld_expander("expand_document"))
-, m_xExpanderStyles(m_xBuilder->weld_expander("expand_styles"))
-, m_xExpanderLinked(m_xBuilder->weld_expander("expand_linked"))
-, m_xExpanderNoAlt(m_xBuilder->weld_expander("expand_no_alt"))
-, m_xExpanderTable(m_xBuilder->weld_expander("expand_table"))
-, m_xExpanderFormatting(m_xBuilder->weld_expander("expand_formatting"))
-, m_xExpanderHyperlink(m_xBuilder->weld_expander("expand_hyperlink"))
-, m_xExpanderFakes(m_xBuilder->weld_expander("expand_fakes"))
-, m_xExpanderNumbering(m_xBuilder->weld_expander("expand_numbering"))
-, m_xExpanderOther(m_xBuilder->weld_expander("expand_other"))
-, m_xBoxDocument(m_xBuilder->weld_box("box_document"))
-, m_xBoxStyles(m_xBuilder->weld_box("box_styles"))
-, m_xBoxLinked(m_xBuilder->weld_box("box_linked"))
-, m_xBoxNoAlt(m_xBuilder->weld_box("box_no_alt"))
-, m_xBoxTable(m_xBuilder->weld_box("box_table"))
-, m_xBoxFormatting(m_xBuilder->weld_box("box_formatting"))
-, m_xBoxHyperlink(m_xBuilder->weld_box("box_hyperlink"))
-, m_xBoxFakes(m_xBuilder->weld_box("box_fakes"))
-, m_xBoxNumbering(m_xBuilder->weld_box("box_numbering"))
-, m_xBoxOther(m_xBuilder->weld_box("box_other"))
 , mpBindings(pBindings)
 , mpDoc(nullptr)
 , maA11yCheckController(FN_STAT_ACCESSIBILITY_CHECK, *pBindings, *this)
 , mnIssueCount(0)
 , mbAutomaticCheckEnabled(false)
 {
+m_xExpanders[0] = m_xBuilder->weld_expander("expand_document");
+m_xExpanders[1] = m_xBuilder->weld_expander("expand_styles");
+m_xExpanders[2] = m_xBuilder->weld_expander("expand_linked");
+m_xExpanders[3] = m_xBuilder->weld_expander("expand_no_alt");
+m_xExpanders[4] = m_xBuilder->weld_expander("expand_table");
+m_xExpanders[5] = m_xBuilder->weld_expander("expand_formatting");
+m_xExpanders[6] = m_xBuilder->weld_expander("expand_hyperlink");
+m_xExpanders[7] = m_xBuilder->weld_expander("expand_fakes");
+m_xExpanders[8] = m_xBuilder->weld_expander("expand_numbering");
+m_xExpanders[9] = m_xBuilder->weld_expander("expand_other");
+
+m_xBoxes[0] = m_xBuilder->weld_box("box_document");
+m_xBoxes[1] = m_xBuilder->weld_box("box_styles");
+m_xBoxes[2] = m_xBuilder->weld_box("box_linked");
+m_xBoxes[3] = m_xBuilder->weld_box("box_no_alt");
+m_xBoxes[4] = m_xBuilder->weld_box("box_table");
+m_xBoxes[5] = m_xBuilder->weld_box("box_formatting");
+m_xBoxes[6] = m_xBuilder->weld_box("box_hyperlink");
+m_xBoxes[7] = m_xBuilder->weld_box("box_fakes");
+m_xBoxes[8] = m_xBuilder->weld_box("box_numbering");
+m_xBoxes[9] = m_xBuilder->weld_box("box_other");
+
 SwDocShell* pDocSh = dynamic_cast(SfxObjectShell::Current());
 if (!pDocSh)
 return;
@@ -158,93 +163,49 @@ void A11yCheckIssuesPanel::ImplDestroy()
 batch->commit();
 mpBindings->Invalidate(SID_ACCESSIBILITY_CHECK_ONLINE);
 }
-m_xExpanderDocument.reset();
-m_xExpanderStyles.reset();
-m_xExpanderLinked.reset();
-m_xExpanderNoAlt.reset();
-m_xExpa

core.git: cppuhelper/source cppu/source filter/source

2024-05-01 Thread Noel Grandin (via logerrit)
 cppu/source/typelib/static_types.cxx |   12 ++--
 cppuhelper/source/servicemanager.cxx |   17 ++---
 filter/source/xsltdialog/xmlfiltercommon.hxx |2 
 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx |   56 +--
 4 files changed, 42 insertions(+), 45 deletions(-)

New commits:
commit e8fdc8a4ff60a392f51326e90212fc73d515e270
Author: Noel Grandin 
AuthorDate: Wed May 1 20:07:21 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 2 02:51:23 2024 +0200

elide some OUString temporaries

Change-Id: I8364489639c8c02e9670ee597f48d61007244f5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166973
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/cppu/source/typelib/static_types.cxx 
b/cppu/source/typelib/static_types.cxx
index 67b63550e1cd..f91dbed71ddb 100644
--- a/cppu/source/typelib/static_types.cxx
+++ b/cppu/source/typelib/static_types.cxx
@@ -118,11 +118,11 @@ typelib_TypeDescriptionReference ** SAL_CALL 
typelib_static_type_getByTypeClass(
 MutexGuard aGuard( typelib_StaticInitMutex() );
 if (! s_aTypes[eTypeClass])
 {
-static const char * s_aTypeNames[] = {
-"void", "char", "boolean", "byte",
-"short", "unsigned short", "long", "unsigned long",
-"hyper", "unsigned hyper", "float", "double",
-"string", "type", "any" };
+static constexpr OUString s_aTypeNames[] = {
+u"void"_ustr, u"char"_ustr, u"boolean"_ustr, u"byte"_ustr,
+u"short"_ustr, u"unsigned short"_ustr, u"long"_ustr, 
u"unsigned long"_ustr,
+u"hyper"_ustr, u"unsigned hyper"_ustr, u"float"_ustr, 
u"double"_ustr,
+u"string"_ustr, u"type"_ustr, u"any"_ustr };
 
 switch (eTypeClass)
 {
@@ -258,7 +258,7 @@ typelib_TypeDescriptionReference ** SAL_CALL 
typelib_static_type_getByTypeClass(
 }
 default:
 {
-OUString aTypeName( OUString::createFromAscii( 
s_aTypeNames[eTypeClass] ) );
+OUString aTypeName( s_aTypeNames[eTypeClass] );
 ::typelib_typedescriptionreference_new( &s_aTypes[eTypeClass], 
eTypeClass, aTypeName.pData );
 // another static ref:
 ++s_aTypes[eTypeClass]->nStaticRefCount;
diff --git a/cppuhelper/source/servicemanager.cxx 
b/cppuhelper/source/servicemanager.cxx
index 790a776392c4..415d0edb0e3c 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -2007,21 +2007,18 @@ void 
cppuhelper::ServiceManager::preloadImplementations() {
 
 // Various rather important uno mappings.
 static struct {
-const char *mpFrom;
-const char *mpTo;
-const char *mpPurpose;
-} const aMappingLoad[] = {
-{ "gcc3", "uno",  "" },
-{ "uno",  "gcc3", "" },
+OUString maFrom;
+OUString maTo;
+OUString maPurpose;
+} constexpr aMappingLoad[] = {
+{ u"gcc3"_ustr, u"uno"_ustr,  u""_ustr },
+{ u"uno"_ustr,  u"gcc3"_ustr, u""_ustr },
 };
 
 static std::vector maMaps;
 for (auto &it : aMappingLoad)
 {
-maMaps.push_back(css::uno::Mapping(
- OUString::createFromAscii(it.mpFrom),
- OUString::createFromAscii(it.mpTo),
- OUString::createFromAscii(it.mpPurpose)));
+maMaps.push_back(css::uno::Mapping(it.maFrom, it.maTo, it.maPurpose));
 }
 #endif
 }
diff --git a/filter/source/xsltdialog/xmlfiltercommon.hxx 
b/filter/source/xsltdialog/xmlfiltercommon.hxx
index 9482fb0b2b63..34bf5a04d807 100644
--- a/filter/source/xsltdialog/xmlfiltercommon.hxx
+++ b/filter/source/xsltdialog/xmlfiltercommon.hxx
@@ -70,7 +70,7 @@ struct application_info_impl
 OUString   maXMLImporter;
 OUString   maXMLExporter;
 
-application_info_impl(const char * pDocumentService, const OUString& 
rUINameRes, const char * mpXMLImporter, const char * mpXMLExporter);
+application_info_impl(const OUString& rDocumentService, const OUString& 
rUINameRes, const OUString& rXMLImporter, const OUString& rXMLExporter);
 };
 
 
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx 
b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index ce06b716e20b..0248ae75c9c3 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -,11 +,11 @@ void XMLFilterSettingsDialog::initFilterList()
 }
 }
 
-application_info_impl::application_info_impl( const char * pDocumentService, 
const OUString& rUINameRes, const char * mpXMLImporter, const char * 
mpXMLExporter )
-:   maDocumentService( pDocumentService, strlen( pDocumentService ), 
RTL_TEXTENCODING_ASCII_US ),
+application_info_impl::application_info_impl( const OUString& 
rDocumentService, const OUStri

core.git: include/xmloff xmloff/source

2024-05-01 Thread Noel Grandin (via logerrit)
 include/xmloff/xmlevent.hxx   |   12 --
 xmloff/source/forms/formevents.cxx|   70 +++---
 xmloff/source/script/XMLEventExport.cxx   |  128 +-
 xmloff/source/script/XMLEventImportHelper.cxx |5 -
 4 files changed, 105 insertions(+), 110 deletions(-)

New commits:
commit e8d1eec3e5cf08ca7de692f7d212b831db66ab96
Author: Noel Grandin 
AuthorDate: Wed May 1 20:18:19 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 2 02:45:34 2024 +0200

use more OUString literals in XMLEvent

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

diff --git a/include/xmloff/xmlevent.hxx b/include/xmloff/xmlevent.hxx
index 163437f51af0..86601c415bb9 100644
--- a/include/xmloff/xmlevent.hxx
+++ b/include/xmloff/xmlevent.hxx
@@ -50,14 +50,10 @@ struct XMLEventName
 OUString m_aName;
 
 XMLEventName() : m_nPrefix( 0 ) {}
-XMLEventName( sal_uInt16 n, const char *p ) :
-m_nPrefix( n ),
-m_aName( OUString::createFromAscii(p) )
-   {}
 
-XMLEventName( sal_uInt16 n, OUString s ) :
+XMLEventName( sal_uInt16 n, const OUString& s ) :
 m_nPrefix( n ),
-m_aName(std::move( s ))
+m_aName( s )
{}
 
 bool operator<( const XMLEventName& r ) const
@@ -75,9 +71,9 @@ struct XMLEventName
  */
 struct XMLEventNameTranslation
 {
-const char* sAPIName;
+OUString sAPIName;
 sal_uInt16 nPrefix;// namespace prefix
-const char* sXMLName;
+OUString sXMLName;
 };
 
 /// a translation table for the events defined in the XEventsSupplier service
diff --git a/xmloff/source/forms/formevents.cxx 
b/xmloff/source/forms/formevents.cxx
index 85e3137cbae5..800553d9458c 100644
--- a/xmloff/source/forms/formevents.cxx
+++ b/xmloff/source/forms/formevents.cxx
@@ -25,42 +25,42 @@ namespace xmloff
 {
 
 //= event translation table
-const XMLEventNameTranslation aEventTranslations[] =
+constexpr XMLEventNameTranslation aEventTranslations[] =
 {
-{ "XApproveActionListener::approveAction",  XML_NAMESPACE_FORM, 
"approveaction" }, // "on-approveaction"
-{ "XActionListener::actionPerformed",   XML_NAMESPACE_FORM, 
"performaction" }, // "on-performaction"
-{ "XChangeListener::changed",   XML_NAMESPACE_DOM, 
"change" }, // "on-change"
-{ "XTextListener::textChanged", XML_NAMESPACE_FORM, 
"textchange" }, // "on-textchange"
-{ "XItemListener::itemStateChanged",XML_NAMESPACE_FORM, 
"itemstatechange" }, // "on-itemstatechange"
-{ "XFocusListener::focusGained",XML_NAMESPACE_DOM, 
"DOMFocusIn" }, // "on-focus"
-{ "XFocusListener::focusLost",  XML_NAMESPACE_DOM, 
"DOMFocusOut" }, // "on-blur"
-{ "XKeyListener::keyPressed",   XML_NAMESPACE_DOM, 
"keydown" }, // "on-keydown"
-{ "XKeyListener::keyReleased",  XML_NAMESPACE_DOM, 
"keyup" }, // "on-keyup"
-{ "XMouseListener::mouseEntered",   XML_NAMESPACE_DOM, 
"mouseover" }, // "on-mouseover"
-{ "XMouseMotionListener::mouseDragged", XML_NAMESPACE_FORM, 
"mousedrag" }, // "on-mousedrag"
-{ "XMouseMotionListener::mouseMoved",   XML_NAMESPACE_DOM, 
"mousemove" }, // "on-mousemove"
-{ "XMouseListener::mousePressed",   XML_NAMESPACE_DOM, 
"mousedown" }, // "on-mousedown"
-{ "XMouseListener::mouseReleased",  XML_NAMESPACE_DOM, 
"mouseup" }, // "on-mouseup"
-{ "XMouseListener::mouseExited",XML_NAMESPACE_DOM, 
"mouseout" }, // "on-mouseout"
-{ "XResetListener::approveReset",   XML_NAMESPACE_FORM, 
"approvereset" }, // "on-approvereset"
-{ "XResetListener::resetted",   XML_NAMESPACE_DOM, 
"reset" }, // "on-reset"
-{ "XSubmitListener::approveSubmit", XML_NAMESPACE_DOM, 
"submit" }, // "on-submit"
-{ "XUpdateListener::approveUpdate", XML_NAMESPACE_FORM, 
"approveupdate" }, // "on-approveupdate"
-{ "XUpdateListener::updated",   XML_NAMESPACE_FORM, 
"update" }, // "on-update"
-{ "XLoadListener::loaded",  XML_NAMESPACE_DOM, 
"load" }, // "on-load"
-{ "XLoadListener::reloading",   XML_NAMESPACE_FORM, 
"startreload" }, // "on-startreload"
-{ "XLoadListener::reloaded",XML_NAMESPACE_FORM, 
"reload" }, // "on-reload"
-{ "XLoadListener::unloading",   XML_NAMESPACE_FORM, 
"startunload" }, // "on-startunload"
-{ "XLoadListener::unloaded",XML_NAMESPACE_DOM, 
"unload" }, // "on-unload"
-{ "XConfirmDeleteListener::confirmDelete",  XML_NAMESPACE_FORM, 
"confirmdelete" }, // "on-confirmdelete"
-  

core.git: Branch 'feature/cib_contract49c' - 4 commits - sw/qa sw/source xmloff/source

2024-05-01 Thread Michael Stahl (via logerrit)
 sw/qa/core/text/data/Broken indent demo.odt|binary
 sw/qa/core/text/data/tdf156146.fodt|  281 +
 sw/qa/core/text/text.cxx   |   62 +
 sw/qa/extras/odfexport/odfexport2.cxx  |6 
 sw/source/core/text/inftxt.hxx |6 
 sw/source/core/text/itratr.hxx |2 
 sw/source/core/text/itrtxt.hxx |2 
 sw/source/filter/html/htmlctxt.cxx |3 
 xmloff/source/text/XMLTextListBlockContext.hxx |1 
 xmloff/source/text/txtimp.cxx  |   64 -
 10 files changed, 355 insertions(+), 72 deletions(-)

New commits:
commit f0e6d005ab94e536461a4396f265f8850393c3c4
Author: Michael Stahl 
AuthorDate: Fri Apr 19 18:04:47 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Thu May 2 01:20:06 2024 +0200

tdf#114287 tdf#159366 xmloff: ODF import: revert text:list override

This reverts commit ade0a153f453500f15343380ac937252992733e0 "tdf#114287
xmloff: ODF import: fix text:list override of list style" and subsequent
commits 7cf5faec6fdbc27dd77d2d36fb2ff205322cba0d and
1b2a6b98291cf8b7022951be19b915fe2a9e18e6.

It turns out that there is actually a paragraph in ODF 1.2 and later
that gives paragraph's indent priority over the list style's, which i
unfortunately missed when investigating the above issues:

  17.20  
  ...

  The fo:text-indent and fo:margin-left attributes are evaluated only
  for paragraphs inside list items whose paragraph styles do not specify
  them. If one of the two properties, or both, are specified by the
  paragraph style, the text indent and/or left margin are taken from the
  paragraph style. In this case the paragraph style's properties are
  used to determine the indent and margin for the text lines and thus
  also the alignment position.

This is usually interpreted as "on the same level", so applying a
list-style at a paragraph style overrides the indents inherited from a
parent paragraph style, but if the style then specifies its own indents
that overrides the list style's indents.

Furthermore it turns out that Google Docs now imports this bugdoc the
same way as LO 7.5 does; unclear if that changed recently (it shows
it like Word does in the preview, but like LO 7.5 does after opening it).

This means the way MS Word imports the bugdoc, which remains unchanged,
now looks like a bug and we should not change LO to be compatible with
it (when the same structure is created in Word, storing to ODF and
loading again, it looks different too).

Change-Id: I0c65bde38de9e6fcbccec55899c60c3245adb5ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166309
Reviewed-by: Michael Stahl 
Tested-by: Jenkins
(cherry picked from commit 546741148863ae0b2a25cc994a7323c8113cb573)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166716
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/extras/odfexport/odfexport2.cxx 
b/sw/qa/extras/odfexport/odfexport2.cxx
index 8654a494b4b3..53c32bdf4045 100644
--- a/sw/qa/extras/odfexport/odfexport2.cxx
+++ b/sw/qa/extras/odfexport/odfexport2.cxx
@@ -941,9 +941,9 @@ DECLARE_ODFEXPORT_TEST(testTdf114287, "tdf114287.odt")
 xmlDocUniquePtr pXmlDoc = parseLayoutDump();
 assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/infos/prtBounds"_ostr, 
"left"_ostr, "2268");
 assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/infos/prtBounds"_ostr, 
"right"_ostr, "11339");
-// the problem was that the list style name of the list must override the
-// paragraph style even though it's the same list style
-assertXPath(pXmlDoc, "/root/page[1]/body/txt[9]/infos/prtBounds"_ostr, 
"left"_ostr, "357");
+// the list style name of the list is the same as the list style name of 
the
+// paragraph, but in any case the margins of the paragraph take precedence
+assertXPath(pXmlDoc, "/root/page[1]/body/txt[9]/infos/prtBounds"_ostr, 
"left"_ostr, "2268");
 assertXPath(pXmlDoc, "/root/page[1]/body/txt[9]/infos/prtBounds"_ostr, 
"right"_ostr, "11339");
 assertXPath(pXmlDoc, "/root/page[1]/body/txt[16]/infos/prtBounds"_ostr, 
"left"_ostr, "357");
 assertXPath(pXmlDoc, "/root/page[1]/body/txt[16]/infos/prtBounds"_ostr, 
"right"_ostr, "11339");
diff --git a/xmloff/source/text/XMLTextListBlockContext.hxx 
b/xmloff/source/text/XMLTextListBlockContext.hxx
index 4b18d625cc36..a529afd1e476 100644
--- a/xmloff/source/text/XMLTextListBlockContext.hxx
+++ b/xmloff/source/text/XMLTextListBlockContext.hxx
@@ -66,7 +66,6 @@ public:
 void ResetRestartNumbering() { mbRestartNumbering = false; }
 
 /// does this list have (possibly inherited from parent) list-style-name?
-bool HasListStyleName() { return !msListStyleName.isEmpty(); }
 const css::uno::Reference < css::container::XIndexReplace >& GetNumRules() 
const
 { return mxNumRules; 

core.git: 2 commits - basegfx/source tools/source

2024-05-01 Thread Caolán McNamara (via logerrit)
 basegfx/source/polygon/b2dpolygontools.cxx |5 ++---
 tools/source/fsys/urlobj.cxx   |3 ++-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 792a4768e1765b6d1f78d8bd5ca9b2a5abfd0a13
Author: Caolán McNamara 
AuthorDate: Wed May 1 20:22:06 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 2 00:13:41 2024 +0200

cid#1596705 Unused value

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

diff --git a/basegfx/source/polygon/b2dpolygontools.cxx 
b/basegfx/source/polygon/b2dpolygontools.cxx
index 92beaa21fd0a..89c8eea90111 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -3328,12 +3328,11 @@ namespace basegfx::utils
 
 // get first point and flag
 B2DPoint aNewCoordinatePair(rPointSequenceSource[0].X, 
rPointSequenceSource[0].Y);
-css::drawing::PolygonFlags 
ePolygonFlag(rFlagSequenceSource[0]);
 B2DPoint aControlA;
 B2DPoint aControlB;
 
 // first point is not allowed to be a control point
-OSL_ENSURE(ePolygonFlag != css::drawing::PolygonFlags_CONTROL,
+OSL_ENSURE(rFlagSequenceSource[0] != 
css::drawing::PolygonFlags_CONTROL,
 "UnoPolygonBezierCoordsToB2DPolygon: Start point is a 
control point, illegal input polygon (!)");
 
 // add first point as start point
@@ -3347,7 +3346,7 @@ namespace basegfx::utils
 
 // get next point and flag
 aNewCoordinatePair = B2DPoint(rPointSequenceSource[b].X, 
rPointSequenceSource[b].Y);
-ePolygonFlag = rFlagSequenceSource[b];
+css::drawing::PolygonFlags ePolygonFlag = 
rFlagSequenceSource[b];
 b++;
 
 if(b < nCount && ePolygonFlag == 
css::drawing::PolygonFlags_CONTROL)
commit bea8576e8218cc8fee7966877d7412377e70e204
Author: Caolán McNamara 
AuthorDate: Wed May 1 20:19:24 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 2 00:13:32 2024 +0200

cid#1596706 Dereference after null check

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

diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index aeb85c1c9f1d..611a14145dde 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -2274,7 +2274,8 @@ INetURLObject::PrefixInfo const * 
INetURLObject::getPrefix(sal_Unicode const *&
 sal_Int32 i = 0;
 for (; pFirst < pLast; ++i)
 {
-if (pFirst->m_pPrefix && pFirst->m_pPrefix[i] == '
+assert(pFirst->m_pPrefix && "we start search after the dummy entry");
+if (pFirst->m_pPrefix[i] == '
 {
 pMatch = pFirst++;
 pMatched = p;


core.git: sd/source

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

New commits:
commit ff79a22fd04f9bbb5f4f67f21862db3a531de833
Author: Caolán McNamara 
AuthorDate: Wed May 1 20:17:51 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 2 00:13:16 2024 +0200

cid#1596707 Unchecked dynamic_cast

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

diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 88ae6825738b..1fa0c4eba45d 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -282,8 +282,9 @@ void FrameView::Update(SdOptions const * pOptions)
 return;
 
 SdDrawDocument* pDrawDocument = dynamic_cast(&GetModel());
+const bool bImpress = pDrawDocument && pDrawDocument->GetDocumentType() == 
DocumentType::Impress;
 
-if (pDrawDocument->GetDocumentType() == DocumentType::Impress)
+if (bImpress)
 {
 mbRuler = officecfg::Office::Impress::Layout::Display::Ruler::get();
 SetDragStripes( 
officecfg::Office::Impress::Layout::Display::Guide::get() );


New Defects reported by Coverity Scan for LibreOffice

2024-05-01 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

5 new defect(s) introduced to LibreOffice found with Coverity Scan.
11 defect(s), reported by Coverity Scan earlier, were marked fixed in the 
recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 5 of 5 defect(s)


** CID 1596707:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1596707:  Null pointer dereferences  (FORWARD_NULL)
/sd/source/ui/view/frmview.cxx: 286 in sd::FrameView::Update(const SdOptions 
*)()
280 {
281 if (!pOptions)
282 return;
283 
284 SdDrawDocument* pDrawDocument = 
dynamic_cast(&GetModel());
285 
>>> CID 1596707:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pDrawDocument" to "GetDocumentType", which 
>>> dereferences it.
286 if (pDrawDocument->GetDocumentType() == DocumentType::Impress)
287 {
288 mbRuler = 
officecfg::Office::Impress::Layout::Display::Ruler::get();
289 SetDragStripes( 
officecfg::Office::Impress::Layout::Display::Guide::get() );
290 SetNoDragXorPolys ( 
!officecfg::Office::Impress::Layout::Display::Contour::get() );
291 }

** CID 1596706:  Null pointer dereferences  (FORWARD_NULL)
/tools/source/fsys/urlobj.cxx: 2285 in INetURLObject::getPrefix(const char16_t 
*&, const char16_t *)()



*** CID 1596706:  Null pointer dereferences  (FORWARD_NULL)
/tools/source/fsys/urlobj.cxx: 2285 in INetURLObject::getPrefix(const char16_t 
*&, const char16_t *)()
2279 pMatch = pFirst++;
2280 pMatched = p;
2281 }
2282 if (p >= pEnd)
2283 break;
2284 sal_uInt32 nChar = rtl::toAsciiLowerCase(*p++);
>>> CID 1596706:  Null pointer dereferences  (FORWARD_NULL)
>>> Dereferencing null pointer "pFirst->m_pPrefix".
2285 while (pFirst <= pLast && static_cast(pFirst->m_pPrefix[i]) < nChar)
2286 ++pFirst;
2287 while (pFirst <= pLast && static_cast(pLast->m_pPrefix[i]) > nChar)
2288 --pLast;
2289 }
2290 if (pFirst == pLast)

** CID 1596705:  Code maintainability issues  (UNUSED_VALUE)
/basegfx/source/polygon/b2dpolygontools.cxx: 3371 in 
basegfx::utils::UnoPolygonBezierCoordsToB2DPolygon(const 
com::sun::star::uno::Sequence &, const 
com::sun::star::uno::Sequence &)()



*** CID 1596705:  Code maintainability issues  (UNUSED_VALUE)
/basegfx/source/polygon/b2dpolygontools.cxx: 3371 in 
basegfx::utils::UnoPolygonBezierCoordsToB2DPolygon(const 
com::sun::star::uno::Sequence &, const 
com::sun::star::uno::Sequence &)()
3365 {
3366 aControlB = aNewCoordinatePair;
3367 bControlB = true;
3368 
3369 // get next point and flag
3370 aNewCoordinatePair = 
B2DPoint(rPointSequenceSource[b].X, rPointSequenceSource[b].Y);
>>> CID 1596705:  Code maintainability issues  (UNUSED_VALUE)
>>> Assigning value from "rFlagSequenceSource[b]" to "ePolygonFlag" here, 
>>> but that stored value is overwritten before it can be used.
3371 ePolygonFlag = rFlagSequenceSource[b];
3372 b++;
3373 }
3374 
3375 // two or no control points are consumed, another 
one would be an error.
3376 // It's also an error if only one control point 
was read

** CID 1596704:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/xmlsecurity/source/gpg/CertificateImpl.cxx: 226 in 
CertificateImpl::setCertificate(std::shared_ptr, const 
GpgME::Key &)()



*** CID 1596704:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/xmlsecurity/source/gpg/CertificateImpl.cxx: 226 in 
CertificateImpl::setCertificate(std::shared_ptr, const 
GpgME::Key &)()
220 return KeyUsage::DIGITAL_SIGNATURE | KeyUsage::NON_REPUDIATION  | 
KeyUsage::KEY_ENCIPHERMENT | KeyUsage::DATA_ENCIPHERMENT;
221 }
222 
223 void CertificateImpl::setCertificate(std::shared_ptr 
ctx, const GpgME::Key& key)
224 {
225 m_pKey = key;
>>> CID 1596704:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "ctx" is copied in a call to copy assignment "operator =", when it 
>>> could be moved instead.
226 m_pContext = ctx;
227 }
228 
229 const GpgME::Key* CertificateImpl::getCertificate() const
230 {
231 r

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

2024-05-01 Thread Balazs Varga (via logerrit)
 sc/inc/queryiter.hxx|   32 
 sc/inc/rangecache.hxx   |   19 
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods |  607 ++--
 sc/source/core/data/queryiter.cxx   |  428 ---
 sc/source/core/tool/interpr1.cxx|   41 -
 sc/source/core/tool/rangecache.cxx  |  171 ++--
 6 files changed, 913 insertions(+), 385 deletions(-)

New commits:
commit 85f733a9242339d8e92f992ff1ad6d1b99d3f383
Author: Balazs Varga 
AuthorDate: Fri Apr 26 16:27:43 2024 +0200
Commit: Balazs Varga 
CommitDate: Wed May 1 20:32:17 2024 +0200

Related: tdf#160725 - Add horizontal binary search mode for SortedCache

and ScSortedRangeCache classes to support binary search mode in case of
different columns. Which is used by the new XLOOKUP function from now on
in case of binary search mode.

Change-Id: Ibb2ae33670cbe9b47110de57afb6376cd829b465
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166758
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sc/inc/queryiter.hxx b/sc/inc/queryiter.hxx
index c6cd1906a4fb..9d0ab1cc6aea 100644
--- a/sc/inc/queryiter.hxx
+++ b/sc/inc/queryiter.hxx
@@ -86,9 +86,9 @@ protected:
 SCROW   nRow;
 
 class NonEmptyCellIndexer;
-typedef std::pair BinarySearchCellType;
-static NonEmptyCellIndexer MakeBinarySearchIndexer(const 
sc::CellStoreType& rCells,
-SCROW nStartRow, SCROW nEndRow);
+typedef std::pair BinarySearchCellType;
+static NonEmptyCellIndexer MakeBinarySearchIndexer(const 
sc::CellStoreType* pCells,
+SCCOLROW nStartRow, SCCOLROW nEndRow);
 };
 
 // The implementation using ScSortedRangeCache, which allows sorted iteration
@@ -105,6 +105,7 @@ protected:
 const ScQueryParam& rParam, bool bReverseSearch );
 void InitPosStart(sal_uInt8 nSortedBinarySearch = 0x00);
 void InitPosFinish( SCROW beforeRow, SCROW lastRow, bool bFirstMatch );
+void InitPosColFinish( SCCOL beforeCol, SCCOL lastCol, bool bFirstMatch );
 void IncPos() { IncPosImpl(); }
 bool IncPosFast() { return IncPosImpl(); }
 void IncBlock() { IncPos(); } // Cannot skip entire block, not linear.
@@ -130,9 +131,9 @@ protected:
 size_t sortedCachePosLast;
 
 class SortedCacheIndexer;
-typedef std::pair BinarySearchCellType;
-SortedCacheIndexer MakeBinarySearchIndexer(const sc::CellStoreType& rCells,
-SCROW nStartRow, SCROW nEndRow);
+typedef std::pair BinarySearchCellType;
+SortedCacheIndexer MakeBinarySearchIndexer(const sc::CellStoreType* pCells,
+SCCOLROW nStartRow, SCCOLROW nEndRow);
 };
 
 // Data and functionality for specific types of query.
@@ -207,16 +208,16 @@ protected:
 // and return if HandleItemFound() returns true.
 void PerformQuery();
 
-/* Only works if no regular expression is involved, only searches for rows 
in one column,
-   and only the first query entry is considered with simple conditions 
SC_LESS,SC_LESS_EQUAL,
-   SC_EQUAL (sorted ascending) or SC_GREATER,SC_GREATER_EQUAL (sorted 
descending). It
-   delivers a starting point set to nRow, i.e. the last row that either 
matches the searched
-   for value, or the last row that matches the condition. Continue with 
e.g. GetThis() and
-   GetNext() afterwards. Returns false if the searched for value is not in 
the search range
-   or if the range is not properly sorted, with nRow in that case set to 
the first row or after
-   the last row. In that case use GetFirst().
+/* Only works if no regular expression is involved, only searches for rows 
in one column or
+   only searches for cols in one row, and only the first query entry is 
considered with simple
+   conditions SC_LESS,SC_LESS_EQUAL, SC_EQUAL (sorted ascending) or 
SC_GREATER,SC_GREATER_EQUAL
+   (sorted descending). It delivers a starting point set to nRow/nCol, 
i.e. the last row/col that
+   either matches the searched for value, or the last row/col that matches 
the condition.
+   Continue with e.g. GetThis() and GetNext() afterwards. Returns false if 
the searched for value
+   is not in the search range or if the range is not properly sorted, with 
nRow/nCol in that case
+   set to the first row or after the last row. In that case use GetFirst().
 */
-bool BinarySearch( SCCOL col, bool forEqual = false );
+bool BinarySearch( SCCOLROW col_row, bool forEqual = false );
 
 /** If set, iterator stops on first non-matching cell
 content. May be used in SC_LESS_EQUAL queries where a
@@ -266,6 +267,7 @@ public:
 voidSetAdvanceQueryParamEntryField( bool bVal )
 { bAdvanceQuery = bVal; }
 voidAdvanceQueryParamEntryField();
+voidAdvanceQueryParamEntryFieldForBinarySearch();
 
 void   

core.git: idl/source include/sfx2 sfx2/source

2024-05-01 Thread Noel Grandin (via logerrit)
 idl/source/objects/object.cxx|4 +--
 idl/source/objects/slot.cxx  |6 ++---
 idl/source/objects/types.cxx |4 +--
 include/sfx2/msg.hxx |   33 
 sfx2/source/appl/appuno.cxx  |   40 ++-
 sfx2/source/control/bindings.cxx |2 -
 sfx2/source/control/msg.cxx  |6 ++---
 sfx2/source/control/request.cxx  |4 +--
 sfx2/source/control/shell.cxx|4 +--
 sfx2/source/control/statcach.cxx |2 -
 sfx2/source/control/unoctitm.cxx |4 +--
 11 files changed, 42 insertions(+), 67 deletions(-)

New commits:
commit b265b547b9e09893187aab0aa1085ba51c43563b
Author: Noel Grandin 
AuthorDate: Tue Apr 30 22:03:51 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 1 19:29:37 2024 +0200

use more OUString in sfx slots

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

diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 908ef3d16548..0b2fadec2d77 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -292,7 +292,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream 
& rOutStm )
 {
 // at least one dummy
 WriteTab( rOutStm, 1 );
-rOutStm.WriteOString("{ (const SfxType*) &aSfxVoidItem_Impl, 0, 0 }" ) 
<< endl;
+rOutStm.WriteOString("{ (const SfxType*) &aSfxVoidItem_Impl, 
u\"\"_ustr, 0 }" ) << endl;
 }
 rOutStm << endl;
 rOutStm.WriteOString( "};" ) << endl << endl;
@@ -319,7 +319,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream 
& rOutStm )
.WriteOString( ", 0, SfxGroupId::NONE, " )
.WriteOString( "SFX_STUB_PTR_EXEC_NONE," )
.WriteOString( "SFX_STUB_PTR_STATE_NONE," )
-   .WriteOString( "SfxSlotMode::NONE, SfxVoidItem, 0, 0, \"\", 
SfxSlotMode::NONE )" ) << endl;
+   .WriteOString( "SfxSlotMode::NONE, SfxVoidItem, 0, 0, 
u\"\"_ustr, SfxSlotMode::NONE )" ) << endl;
 }
 rOutStm << endl;
 rOutStm.WriteOString( "};" ) << endl;
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 58b3faa522b4..8edff3a63efd 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -559,9 +559,9 @@ void SvMetaSlot::WriteSlot( std::string_view rShellName, 
sal_uInt16 nCount,
 }
 
 {
-rOutStm.WriteOString( ",\"" );
+rOutStm.WriteOString( ",u\"" );
 rOutStm.WriteOString( GetName() );
-rOutStm.WriteOString( "\"" );
+rOutStm.WriteOString( "\"_ustr" );
 }
 
 rOutStm.WriteOString( " )," ) << endl;
@@ -588,7 +588,7 @@ sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & 
rBase, SvStream & rO
 // item type
.WriteOString(pPType->GetName()).WriteOString("_Impl, ")
 // parameter name
-   .WriteOString("\"").WriteOString(pPar->GetName()).WriteOString("\", 
")
+   
.WriteOString("u\"").WriteOString(pPar->GetName()).WriteOString("\"_ustr, ")
 // slot id
.WriteOString(pPar->GetSlotId().getString()).WriteOString(" },") << 
endl;
 if( !SvIdlDataBase::FindType( pPType, rBase.aUsedTypes ) )
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index f6a77e77e07a..b98d90c93d85 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -108,9 +108,9 @@ size_t SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray 
) const
 {
 rAttrArray.append('{');
 rAttrArray.append(GetSlotId().getString());
-rAttrArray.append(",\"");
+rAttrArray.append(",u\"");
 rAttrArray.append(GetName());
-rAttrArray.append("\"}");
+rAttrArray.append("\"_ustr}");
 return 1;
 }
 }
diff --git a/include/sfx2/msg.hxx b/include/sfx2/msg.hxx
index 86ecfd423644..8023f0846f60 100644
--- a/include/sfx2/msg.hxx
+++ b/include/sfx2/msg.hxx
@@ -90,8 +90,8 @@ enum class SfxSlotKind
 
 struct SfxTypeAttrib
 {
-sal_uInt16  nAID;
-const char* pName;
+sal_uInt16 nAID;
+OUString aName;
 };
 
 template SfxPoolItem* createSfxPoolItem()
@@ -171,7 +171,7 @@ SFX_DECL_TYPE(23); // for SvxSearchItem
 struct SfxFormalArgument
 {
 const SfxType*  pType;// Type of the parameter (SfxPoolItem subclass)
-const char* pName;// Name of the sParameters
+OUStringaName;// Name of the sParameters
 sal_uInt16  nSlotId;  // Slot-Id for identification of the Parameters
 
 std::unique_ptr CreateItem() const
@@ -201,30 +201,7 @@ public:
 SfxDisableFlags   nDisableFlags; // DisableFlags that need to be
  // present, so that the Slot
  // can be enabled
-OUString pUnoName;  // UnoName fo

core.git: toolkit/source

2024-05-01 Thread Noel Grandin (via logerrit)
 toolkit/source/controls/unocontrol.cxx |   41 ++---
 1 file changed, 13 insertions(+), 28 deletions(-)

New commits:
commit 82bf36179ba8369ca026ef3cf400e216255941f1
Author: Noel Grandin 
AuthorDate: Tue Apr 30 21:56:47 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 1 19:29:19 2024 +0200

simplify and reduce OUString allocation in UnoControl

Change-Id: I276d0b8b1d3fde8aab6be15cb2477ce0c6d175c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166957
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/toolkit/source/controls/unocontrol.cxx 
b/toolkit/source/controls/unocontrol.cxx
index 0880455581ea..101e5f75a706 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -55,25 +55,14 @@ using namespace ::com::sun::star::util;
 using ::com::sun::star::accessibility::XAccessibleContext;
 using ::com::sun::star::accessibility::XAccessible;
 
-namespace {
-
-struct LanguageDependentProp
-{
-const char* pPropName;
-sal_Int32   nPropNameLength;
-};
-
-}
-
-const LanguageDependentProp aLanguageDependentProp[] =
-{
-{ "Text",4 },
-{ "Label",   5 },
-{ "Title",   5 },
-{ "HelpText",8 },
-{ "CurrencySymbol", 14 },
-{ "StringItemList", 14 },
-{ nullptr, 0 }
+constexpr OUString aLanguageDependentProp[] =
+{
+u"Text"_ustr,
+u"Label"_ustr,
+u"Title"_ustr,
+u"HelpText"_ustr,
+u"CurrencySymbol"_ustr,
+u"StringItemList"_ustr,
 };
 
 static Sequence< OUString> lcl_ImplGetPropertyNames( const Reference< 
XMultiPropertySet > & rxModel )
@@ -579,14 +568,13 @@ void UnoControl::ImplModelPropertiesChanged( const 
Sequence< PropertyChangeEvent
 // Add language dependent properties into the peer property set.
 // Our resource resolver has been changed and we must be sure
 // that language dependent props use the new resolver.
-const LanguageDependentProp* pLangDepProp = aLanguageDependentProp;
-while ( pLangDepProp->pPropName != nullptr )
+
+for (const auto & rLangDepProp : aLanguageDependentProp)
 {
 bool bMustBeInserted( true );
 for (const PropertyValue & i : aPeerPropertiesToSet)
 {
-if ( i.Name.equalsAsciiL(
-pLangDepProp->pPropName, pLangDepProp->nPropNameLength 
))
+if ( i.Name == rLangDepProp )
 {
 bMustBeInserted = false;
 break;
@@ -596,14 +584,11 @@ void UnoControl::ImplModelPropertiesChanged( const 
Sequence< PropertyChangeEvent
 if ( bMustBeInserted )
 {
 // Add language dependent props at the end
-OUString aPropName( OUString::createFromAscii( 
pLangDepProp->pPropName ));
-if ( xPSI.is() && xPSI->hasPropertyByName( aPropName ) )
+if ( xPSI.is() && xPSI->hasPropertyByName( rLangDepProp ) )
 {
-aPeerPropertiesToSet.emplace_back( aPropName, 0, 
xPS->getPropertyValue( aPropName ), PropertyState_DIRECT_VALUE );
+aPeerPropertiesToSet.emplace_back( rLangDepProp, 0, 
xPS->getPropertyValue( rLangDepProp ), PropertyState_DIRECT_VALUE );
 }
 }
-
-++pLangDepProp;
 }
 }
 aGuard.clear();


core.git: sw/source

2024-05-01 Thread Julien Nabet (via logerrit)
 sw/source/core/doc/doc.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a835b40e05462e9be58cb501aa6b938f3dc998b8
Author: Julien Nabet 
AuthorDate: Wed May 1 15:50:50 2024 +0200
Commit: Julien Nabet 
CommitDate: Wed May 1 18:41:10 2024 +0200

Silence some bogus -Werror=array-bounds etc. also with GCC 13 and -std=c++20

See 1c3c27bc2e42f70e588ef5dbc769a8a346042e04
Silence some bogus -Werror=array-bounds etc. with GCC 12 and -std=c++20

Change-Id: I65675d1f18415ae82afb98c7d388dac3cdc18ab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166966
Reviewed-by: Julien Nabet 
Tested-by: Jenkins

diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 62add1d5bae5..c6641fd4580a 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -992,13 +992,13 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
 // just one page is special ...
 if ( 1 == aVec.size() )
 {
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 12 && __cplusplus == 
202002L
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ <= 13 && __cplusplus == 
202002L
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Warray-bounds"
 #pragma GCC diagnostic ignored "-Wstringop-overflow"
 #endif
 aVec.insert( aVec.begin() + 1, nullptr ); // insert a second empty page
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 12 && __cplusplus == 
202002L
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ <= 13 && __cplusplus == 
202002L
 #pragma GCC diagnostic pop
 #endif
 }


core.git: Changes to 'refs/tags/cp-23.05.11-1'

2024-05-01 Thread Aron Budea (via logerrit)
Tag 'cp-23.05.11-1' created by Aron Budea  at 
2024-05-01 15:50 +

cp-23.05.11-1

Changes since co-23.05.10-1-25:
---
 0 files changed
---


core.git: desktop/qa desktop/source

2024-05-01 Thread Caolán McNamara (via logerrit)
 desktop/qa/desktop_app/test_desktop_app.cxx |5 ++---
 desktop/source/app/cmdlineargs.cxx  |   21 ++---
 desktop/source/app/cmdlineargs.hxx  |2 +-
 desktop/source/app/officeipcthread.cxx  |   11 +--
 4 files changed, 18 insertions(+), 21 deletions(-)

New commits:
commit 59fb18bf279446ba8d26faf7bfb03e375e0aac62
Author: Caolán McNamara 
AuthorDate: Wed May 1 14:38:24 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 1 17:11:10 2024 +0200

next is never passed a null pointer, use a reference

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

diff --git a/desktop/qa/desktop_app/test_desktop_app.cxx 
b/desktop/qa/desktop_app/test_desktop_app.cxx
index 0e86368e6378..2c9c7ba7121b 100644
--- a/desktop/qa/desktop_app/test_desktop_app.cxx
+++ b/desktop/qa/desktop_app/test_desktop_app.cxx
@@ -48,10 +48,9 @@ public:
 explicit TestSupplier(const std::initializer_list& args) : 
m_args(args) {}
 
 virtual std::optional< OUString > getCwdUrl() override { return 
std::optional< OUString >(); }
-virtual bool next(OUString * argument) override {
-CPPUNIT_ASSERT(argument != nullptr);
+virtual bool next(OUString& argument) override {
 if (m_index < m_args.size()) {
-*argument = m_args[m_index++];
+argument = m_args[m_index++];
 return true;
 }
 else {
diff --git a/desktop/source/app/cmdlineargs.cxx 
b/desktop/source/app/cmdlineargs.cxx
index f96814e8e7ff..ba5a3da5a6c3 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -83,10 +83,9 @@ public:
 
 virtual std::optional< OUString > getCwdUrl() override { return m_cwdUrl; }
 
-virtual bool next(OUString * argument) override {
-OSL_ASSERT(argument != nullptr);
+virtual bool next(OUString& argument) override {
 if (m_index < m_count) {
-rtl_getAppCommandArg(m_index++, &argument->pData);
+rtl_getAppCommandArg(m_index++, &argument.pData);
 return true;
 } else {
 return false;
@@ -285,7 +284,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& 
supplier )
 for (;;)
 {
 OUString aArg;
-if ( !supplier.next( &aArg ) )
+if ( !supplier.next(aArg) )
 {
 break;
 }
@@ -410,7 +409,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& 
supplier )
 
 // We specifically need to consume the following 2 arguments
 // for --protector
-if ((!supplier.next(&aArg) || !supplier.next(&aArg)) && 
m_unknown.isEmpty())
+if ((!supplier.next(aArg) || !supplier.next(aArg)) && 
m_unknown.isEmpty())
 m_unknown = "--protector must be followed by two 
arguments";
 }
 else if ( oArg == "version" )
@@ -523,7 +522,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& 
supplier )
 // Print to special printer
 eCurrentEvent = CommandLineEvent::PrintTo;
 // first argument after "-pt" must be the printer name
-if (supplier.next(&aArg))
+if (supplier.next(aArg))
 m_printername = aArg;
 else if (m_unknown.isEmpty())
 m_unknown = "--pt must be followed by printername";
@@ -550,13 +549,13 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& 
supplier )
 // --display and its argument are handled "out of line"
 // in Unix-only desktop/unx/source/splashx.c and vcl/unx/*,
 // and just ignored here
-(void)supplier.next(&aArg);
+(void)supplier.next(aArg);
 }
 else if ( oArg == "convert-to" )
 {
 eCurrentEvent = CommandLineEvent::Conversion;
 // first argument must be the params
-if (supplier.next(&aArg))
+if (supplier.next(aArg))
 {
 m_conversionparams = aArg;
 // It doesn't make sense to use convert-to without 
headless.
@@ -574,7 +573,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& 
supplier )
 if (eCurrentEvent == CommandLineEvent::BatchPrint)
 {
 // first argument is the printer name
-if (supplier.next(&aArg))
+if (supplier.next(aArg))
 m_printername = aArg;
 else if (m_unknown.isEmpty())
 m_unknown = "--printer-name must be followed by 
printername";
@@ -589,7 +588,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& 
supplier )
 if (eCurrentEvent == CommandLineEvent::Conversio

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

2024-05-01 Thread Szymon Kłos (via logerrit)
 sc/qa/unit/tiledrendering/data/numlocale.xlsx |binary
 sc/qa/unit/tiledrendering/tiledrendering.cxx  |   73 ++
 2 files changed, 73 insertions(+)

New commits:
commit f957dfbde79238d0f49f31763baad9d0c8f93bd3
Author: Szymon Kłos 
AuthorDate: Tue Apr 30 09:51:18 2024 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed May 1 16:40:45 2024 +0200

lok: test number formats with different locale

This is followup for the fix in commit 
7836cb7e90d0214cac08228f5e527322ed6f955c
lok: save correct number format in multi-lang session

Change-Id: I6016425d37b1ee1707ed8920811e8741c9267ee7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166912
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/qa/unit/tiledrendering/data/numlocale.xlsx 
b/sc/qa/unit/tiledrendering/data/numlocale.xlsx
new file mode 100644
index ..c69f74e32301
Binary files /dev/null and b/sc/qa/unit/tiledrendering/data/numlocale.xlsx 
differ
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 1c183521b605..17048a4ca8df 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -26,6 +26,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -45,6 +47,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -3934,6 +3937,76 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testCopyMultiSelection)
 CPPUNIT_ASSERT(!xTransferable2->isComplex());
 }
 
+CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testNumberFormatLocaleMultiUser)
+{
+{
+// setup core language to FR as it will be the first session
+SvtSysLocaleOptions aLocalOptions;
+aLocalOptions.SetLocaleConfigString("fr-FR");
+aLocalOptions.SetUILocaleConfigString("fr-FR");
+aLocalOptions.Commit();
+
+loadFromFile(u"numlocale.xlsx");
+
+ScModelObj* pModelObj = 
comphelper::getFromUnoTunnel(mxComponent);
+CPPUNIT_ASSERT(pModelObj);
+
+
pModelObj->initializeForTiledRendering(uno::Sequence());
+ScDocument* pDoc = pModelObj->GetDocument();
+
+int nViewFR = SfxLokHelper::getView();
+ViewCallback aView1;
+SfxViewShell* pViewFR = SfxViewShell::Current();
+pViewFR->SetLOKLocale("fr-FR");
+
+// modify G12 with FR and use French keywords in the format
+SfxLokHelper::setView(nViewFR);
+
+sal_Int32 nCheckPos;
+SvNumFormatType nType;
+sal_uInt32 nFormat;
+OUString aNumberFormat("JJ/MM/");
+SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
+pFormatter->PutEntry(aNumberFormat, nCheckPos, nType, nFormat);
+ScAddress aCellPos1(/*nColP=*/6, /*nRowP=*/11, /*nTabP=*/0);
+pDoc->SetNumberFormat(aCellPos1, nFormat);
+
+Scheduler::ProcessEventsToIdle();
+}
+
+{
+// now setup DE language in core
+SvtSysLocaleOptions aLocalOptions;
+aLocalOptions.SetLocaleConfigString("de-DE");
+aLocalOptions.SetUILocaleConfigString("de-DE");
+aLocalOptions.Commit();
+
+// save and reopen
+// .uno:Save modifies the original file, make a copy first
+saveAndReload("Calc MS Excel 2007 VBA XML");
+
+ScModelObj* pModelObj = 
comphelper::getFromUnoTunnel(mxComponent);
+CPPUNIT_ASSERT(pModelObj);
+
+ScTabViewShell* pView = 
dynamic_cast(SfxViewShell::Current());
+CPPUNIT_ASSERT(pView);
+
+Scheduler::ProcessEventsToIdle();
+
+uno::Sequence aArgs;
+dispatchCommand(mxComponent, ".uno:Save", aArgs);
+
+Scheduler::ProcessEventsToIdle();
+
+ScDocument* pDoc = pModelObj->GetDocument();
+
+// verify that format is correct (German), doesn't have any "string" 
inside
+sal_uInt32 nNumberFormat = pDoc->GetNumberFormat(/*col=*/6, 
/*row=*/11, /*tab=*/0);
+const SvNumberformat* pNumberFormat = 
pDoc->GetFormatTable()->GetEntry(nNumberFormat);
+CPPUNIT_ASSERT_EQUAL(OUString("TT.MM.JJ"), 
pNumberFormat->GetFormatstring());
+}
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


core.git: desktop/source include/sfx2 sfx2/source

2024-05-01 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx|   10 --
 include/sfx2/lokhelper.hxx |4 
 sfx2/source/view/lokhelper.cxx |   30 ++
 3 files changed, 38 insertions(+), 6 deletions(-)

New commits:
commit 1ac07d2c9d45cc5db3f689d287ad9be939ef1124
Author: Gökay Şatır 
AuthorDate: Tue Apr 23 14:40:14 2024 +0300
Commit: Gökay ŞATIR 
CommitDate: Wed May 1 16:16:52 2024 +0200

Use a for loop for setting view properties.

Since there may be no view with the given id, checking the list first is 
safer.

Signed-off-by: Gökay Şatır 
Change-Id: I4c305e0a0f6ce7cccdfea9889c414a6054ed3a88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166531
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 
(cherry picked from commit 4d8c4a60105488be84ea80775dc04a24582752fb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166720
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 22a0abd3a6e3..a857dec6f3f5 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7232,26 +7232,24 @@ static void doc_setViewTimezone(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* /*p
 }
 }
 
-static void doc_setViewReadOnly(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* 
pThis, int nId, const bool readOnly)
+static void doc_setViewReadOnly(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* 
/*pThis*/, int nId, const bool readOnly)
 {
 comphelper::ProfileZone aZone("doc_setViewReadOnly");
 
 SolarMutexGuard aGuard;
 SetLastExceptionMsg();
 
-doc_setView(pThis, nId);
-SfxViewShell::Current()->SetLokReadOnlyView(readOnly);
+SfxLokHelper::setViewReadOnly(nId, readOnly);
 }
 
-static void doc_setAllowChangeComments(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* pThis, int nId, const bool allow)
+static void doc_setAllowChangeComments(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* /*pThis*/, int nId, const bool allow)
 {
 comphelper::ProfileZone aZone("doc_setAllowChangeComments");
 
 SolarMutexGuard aGuard;
 SetLastExceptionMsg();
 
-doc_setView(pThis, nId);
-SfxViewShell::Current()->SetAllowChangeComments(allow);
+SfxLokHelper::setAllowChangeComments(nId, allow);
 }
 
 static void doc_setAccessibilityState(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* pThis, int nId, bool nEnabled)
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index c4e88035fd96..3820558d6500 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -119,6 +119,10 @@ public:
 static void setDefaultLanguage(const OUString& rBcp47LanguageTag);
 /// Enable/Disable AT support for the given view.
 static void setAccessibilityState(int nId, bool nEnabled);
+// Set the readonly state of the view.
+static void setViewReadOnly(int nId, bool readOnly);
+// In readonly view, can user add / modify comments or not.
+static void setAllowChangeComments(int nId, bool allow);
 /// Get the language used by the loading view (used for all save 
operations).
 static const LanguageTag & getLoadLanguage();
 /// Set the language used by the loading view (used for all save 
operations).
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index ff9f1a8175bf..145484fce9e7 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -342,6 +342,36 @@ void SfxLokHelper::setViewLanguage(int nId, const 
OUString& rBcp47LanguageTag)
 }
 }
 
+void SfxLokHelper::setViewReadOnly(int nId, bool readOnly)
+{
+std::vector& rViewArr = SfxGetpApp()->GetViewShells_Impl();
+
+for (SfxViewShell* pViewShell : rViewArr)
+{
+if (pViewShell && pViewShell->GetViewShellId() == ViewShellId(nId))
+{
+LOK_INFO("lok.readonlyview", "SfxLokHelper::setViewReadOnly: view 
id: " << nId << ", readOnly: " << readOnly);
+pViewShell->SetLokReadOnlyView(readOnly);
+return;
+}
+}
+}
+
+void SfxLokHelper::setAllowChangeComments(int nId, bool allow)
+{
+std::vector& rViewArr = SfxGetpApp()->GetViewShells_Impl();
+
+for (SfxViewShell* pViewShell : rViewArr)
+{
+if (pViewShell && pViewShell->GetViewShellId() == ViewShellId(nId))
+{
+LOK_INFO("lok.readonlyview", 
"SfxLokHelper::setAllowChangeComments: view id: " << nId << ", allow: " << 
allow);
+pViewShell->SetAllowChangeComments(allow);
+return;
+}
+}
+}
+
 void SfxLokHelper::setAccessibilityState(int nId, bool nEnabled)
 {
 std::vector& rViewArr = SfxGetpApp()->GetViewShells_Impl();


core.git: Branch 'feature/cib_contract49c' - 9 commits - include/svx officecfg/registry sd/inc sd/Library_sd.mk sd/sdi sd/source sd/uiconfig sd/UIConfig_simpress.mk

2024-05-01 Thread Sarper Akdemir (via logerrit)
 include/svx/svdedxv.hxx  |
8 
 officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu |
8 
 sd/Library_sd.mk |
2 
 sd/UIConfig_simpress.mk  |
2 
 sd/inc/app.hrc   |
3 
 sd/inc/glob.hxx  |
2 
 sd/inc/strings.hrc   |
1 
 sd/sdi/NotesPanelView.sdi|  
514 +++
 sd/sdi/ViewShellBase.sdi |
2 
 sd/sdi/sdraw.sdi |   
10 
 sd/sdi/sdslots.sdi   |
1 
 sd/source/ui/app/sddll.cxx   |
1 
 sd/source/ui/dlg/PaneChildWindows.cxx|   
28 
 sd/source/ui/dlg/PaneShells.cxx  |   
17 
 sd/source/ui/framework/factories/BasicPaneFactory.cxx|   
12 
 sd/source/ui/framework/factories/BasicViewFactory.cxx|
7 
 sd/source/ui/framework/tools/FrameworkHelper.cxx |
4 
 sd/source/ui/func/fuoltext.cxx   |  
141 
 sd/source/ui/inc/NotesPanelView.hxx  |  
103 
 sd/source/ui/inc/NotesPanelViewShell.hxx |  
103 
 sd/source/ui/inc/OutlineView.hxx |   
18 
 sd/source/ui/inc/PaneChildWindows.hxx|   
13 
 sd/source/ui/inc/PaneShells.hxx  |   
17 
 sd/source/ui/inc/TextObjectBar.hxx   |
3 
 sd/source/ui/inc/ViewShell.hxx   |   
17 
 sd/source/ui/inc/framework/FrameworkHelper.hxx   |
2 
 sd/source/ui/inc/fuoltext.hxx|   
51 
 sd/source/ui/view/GraphicViewShellBase.cxx   |
2 
 sd/source/ui/view/NotesPanelView.cxx |  
354 ++
 sd/source/ui/view/NotesPanelViewShell.cxx| 
1452 ++
 sd/source/ui/view/ToolBarManager.cxx |
1 
 sd/source/ui/view/ViewShellBase.cxx  |   
13 
 sd/source/ui/view/ViewShellImplementation.cxx|
1 
 sd/source/ui/view/drtxtob.cxx|   
34 
 sd/source/ui/view/drtxtob1.cxx   |   
48 
 sd/source/ui/view/drvwshrg.cxx   |
2 
 sd/source/ui/view/outlview.cxx   |
2 
 sd/source/ui/view/sdwindow.cxx   |
4 
 sd/uiconfig/simpress/menubar/menubar.xml |
1 
 sd/uiconfig/simpress/ui/noteschildwindow.ui  |   
41 
 sd/uiconfig/simpress/ui/notespanelcontextmenu.ui |
9 
 41 files changed, 2933 insertions(+), 121 deletions(-)

New commits:
commit 57084baf1dfb150700fcf385003d989b08e2104a
Author: Sarper Akdemir 
AuthorDate: Fri Apr 19 00:40:28 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Wed May 1 15:00:33 2024 +0200

related tdf#33603: sd: do not assume there's always a viewshell

Change-Id: I171639150a84372e7e25b5246d4882c467edd58b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166271
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir 

diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index 5c64e4d1dda4..753e6921e461 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -738,7 +738,8 @@ void Window::LoseFocus()
 {
 mnTicks = 0;
 vcl::Window::LoseFocus ();
-GetViewShell()->onLoseFocus();
+if (mpViewShell)
+mpViewShell->onLoseFocus();
 }
 
 /**
@@ -748,7 +749,8 @@ void Window::GrabFocus()
 {
 mnTicks  = 0;
 vcl::Window::GrabFocus ();
-GetViewShell()->onGrabFocus();
+if (mpViewShell)
+mpViewShell->onGrabFocus();
 }
 
 void Window::DataChanged( const DataChangedEvent& rDCEvt )
commit ca42eb73d360471b4259fd200aa86e547d237f0a
Author: Sarper Akdemir 
AuthorDate: Tue Apr 16 17:09:28 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Wed May 1 15:00:33 2024 +0200

tdf#33603: make the notes pane handle placeholder text on focus

Change-Id: Id2bca2b8a8bafa9da44a5f97a8e763b512078ef7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166152
Tested-by: Jenkins
  

core.git: basctl/source fpicker/source

2024-05-01 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/basidesh.cxx |4 ++--
 basctl/source/basicide/basobj2.cxx  |2 +-
 basctl/source/basicide/basobj3.cxx  |1 +
 basctl/source/dlged/dlged.cxx   |   20 ++--
 basctl/source/dlged/propbrw.cxx |   10 +-
 fpicker/source/office/fileview.cxx  |2 +-
 fpicker/source/office/iodlgimp.cxx  |2 +-
 7 files changed, 21 insertions(+), 20 deletions(-)

New commits:
commit d7790878e315f795f5d9965dd9997ba3a5004c60
Author: Caolán McNamara 
AuthorDate: Wed May 1 12:47:26 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 1 15:29:44 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

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

diff --git a/basctl/source/basicide/basidesh.cxx 
b/basctl/source/basicide/basidesh.cxx
index bdf68e11a7dc..9f08b9b00a8b 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -421,7 +421,7 @@ void Shell::StoreAllWindowData( bool bPersistent )
 for (auto const& window : aWindowTable)
 {
 BaseWindow* pWin = window.second;
-DBG_ASSERT( pWin, "PrepareClose: NULL-Pointer in Table?" );
+assert(pWin && "PrepareClose: NULL-Pointer in Table?");
 if ( !pWin->IsSuspended() )
 pWin->StoreData();
 }
@@ -782,7 +782,7 @@ void Shell::RemoveWindow( BaseWindow* pWindow_, bool 
bDestroy, bool bAllowChange
 {
 VclPtr pWindowTmp( pWindow_ );
 
-DBG_ASSERT( pWindow_, "Cannot delete NULL-Pointer!" );
+assert(pWindow_ && "Cannot delete NULL-Pointer!");
 sal_uInt16 nKey = GetWindowId( pWindow_ );
 pTabBar->RemovePage( nKey );
 aWindowTable.erase( nKey );
diff --git a/basctl/source/basicide/basobj2.cxx 
b/basctl/source/basicide/basobj2.cxx
index 708b1ce035d2..0aa3b8b37bf5 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -391,7 +391,7 @@ Sequence< OUString > GetMethodNames( const ScriptDocument& 
rDocument, const OUSt
 SbMethod* pMethod = 
static_cast(pMod->GetMethods()->Get(i));
 if( pMethod->IsHidden() )
 continue;
-SAL_WARN_IF( !pMethod, "basctl.basicide","Method not found! 
(NULL)" );
+assert(pMethod && "Method not found! (NULL)");
 aSeqMethods.getArray()[ iTarget++ ] = pMethod->GetName();
 }
 }
diff --git a/basctl/source/basicide/basobj3.cxx 
b/basctl/source/basicide/basobj3.cxx
index 1e51cbbb2ed8..f8af9e037b60 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -116,6 +116,7 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& 
rMacroName )
 
 if (aDocument.isValid())
 {
+assert(pBasic && "isValid cannot be false with !pBasic");
 const OUString& aLibName = pBasic->GetName();
 const OUString& aModName = pModule->GetName();
 OSL_VERIFY( aDocument.updateModule( aLibName, aModName, aOUSource ) );
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 40a7b5c75850..b8f3901eb34b 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -526,28 +526,20 @@ void DlgEditor::Paint(vcl::RenderContext& rRenderContext, 
const tools::Rectangle
 SdrPageView* pPgView = pDlgEdView->GetSdrPageView();
 const vcl::Region aPaintRectRegion(aPaintRect);
 
-// #i74769#
-SdrPaintWindow* pTargetPaintWindow = nullptr;
-
 // mark repaint start
 if (pPgView)
 {
-pTargetPaintWindow = 
pPgView->GetView().BeginDrawLayers(&rRenderContext, aPaintRectRegion);
-OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no SdrPaintWindow 
(!)");
-}
+// #i74769#
+SdrPaintWindow* 
pTargetPaintWindow(pPgView->GetView().BeginDrawLayers(&rRenderContext, 
aPaintRectRegion));
+assert(pTargetPaintWindow && "BeginDrawLayers: Got no SdrPaintWindow 
(!)");
 
-// draw background self using wallpaper
-// #i79128# ...and use correct OutDev for that
-if (pTargetPaintWindow)
-{
+// draw background self using wallpaper
+// #i79128# ...and use correct OutDev for that
 Color maBackColor = 
rRenderContext.GetSettings().GetStyleSettings().GetLightColor();
 OutputDevice& rTargetOutDev = 
pTargetPaintWindow->GetTargetOutputDevice();
 rTargetOutDev.DrawWallpaper(aPaintRect, Wallpaper(maBackColor));
-}
 
-// do paint (unbuffered) and mark repaint end
-if (pPgView)
-{
+// do paint (unbuffered) and mark repaint end
 // paint of control layer is done in EndDrawLayers anyway...
 pPgView->GetView().EndDrawLayers(*pTargetPaintWindow, true);
 }
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index bb45d5f13e8d..04fa2b3d3b86 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/d

core.git: 2 commits - desktop/source drawinglayer/source editeng/source sfx2/source

2024-05-01 Thread Caolán McNamara (via logerrit)
 desktop/source/deployment/registry/component/dp_component.cxx |2 +-
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx   |3 +--
 drawinglayer/source/processor3d/zbufferprocessor3d.cxx|2 +-
 editeng/source/editeng/editdbg.cxx|2 +-
 editeng/source/editeng/editundo.cxx   |4 +++-
 editeng/source/editeng/eertfpar.cxx   |2 +-
 editeng/source/editeng/impedit3.cxx   |7 ---
 editeng/source/editeng/impedit4.cxx   |8 +---
 editeng/source/outliner/outliner.cxx  |7 ---
 editeng/source/outliner/outlundo.cxx  |4 +---
 editeng/source/outliner/outlvw.cxx|2 +-
 editeng/source/uno/unoedprx.cxx   |8 
 editeng/source/uno/unofored.cxx   |2 +-
 editeng/source/uno/unotext.cxx|4 ++--
 sfx2/source/appl/module.cxx   |4 +---
 sfx2/source/appl/newhelp.cxx  |9 +
 sfx2/source/control/bindings.cxx  |2 +-
 sfx2/source/control/shell.cxx |2 +-
 sfx2/source/dialog/mgetempl.cxx   |2 +-
 sfx2/source/dialog/templdlg.cxx   |4 ++--
 sfx2/source/doc/docinsert.cxx |2 +-
 sfx2/source/sidebar/SidebarDockingWindow.cxx  |2 +-
 22 files changed, 43 insertions(+), 41 deletions(-)

New commits:
commit ead19f4c62c8d74292a7ba589df2ca118cea3240
Author: Caolán McNamara 
AuthorDate: Wed May 1 10:27:25 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 1 13:25:04 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

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

diff --git a/desktop/source/deployment/registry/component/dp_component.cxx 
b/desktop/source/deployment/registry/component/dp_component.cxx
index 7efa1ba854e6..f374a88c04a9 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -1106,7 +1106,7 @@ void extractComponentData(
 componentLoader,
 OUString const & componentUrl)
 {
-OSL_ASSERT(
+assert(
 context.is() && registry.is() && data != nullptr && 
componentLoader.is());
 OUString registryName(registry->getKeyName());
 sal_Int32 prefix = registryName.getLength();
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 754b8cef2592..4882847bcc2c 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -586,8 +586,7 @@ void 
VclPixelProcessor2D::processUnifiedTransparencePrimitive2D(
 const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor
 = static_cast(
 pBasePrimitive);
-SAL_WARN_IF(!pPoPoColor, "drawinglayer",
-"OOps, PrimitiveID and PrimitiveType do not 
match (!)");
+assert(pPoPoColor && "OOps, PrimitiveID and PrimitiveType 
do not match (!)");
 bDrawTransparentUsed = true;
 tryDrawPolyPolygonColorPrimitive2DDirect(
 *pPoPoColor, 
rUniTransparenceCandidate.getTransparence());
diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx 
b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
index b9cb8ffb7a1d..7f8f24f3b872 100644
--- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
@@ -103,7 +103,7 @@ private:
 double decideColorAndOpacity(basegfx::BColor& rColor) const
 {
 // init values with full opacity and material color
-OSL_ENSURE(nullptr != mpCurrentMaterial, "CurrentMaterial not set 
(!)");
+assert(nullptr != mpCurrentMaterial && "CurrentMaterial not set (!)");
 double fOpacity(1.0);
 rColor = mpCurrentMaterial->getColor();
 
diff --git a/editeng/source/editeng/editdbg.cxx 
b/editeng/source/editeng/editdbg.cxx
index f94bc2c7ea14..e9d74e779212 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -473,7 +473,7 @@ void EditEngine::DumpData(const EditEngine* pEE, bool 
bInfoBox)
 for ( size_t nView = 0; nView < pEE->GetViewCount(); nView++ )
 {
 EditView* pV = pEE->GetView( nView );
-DBG_ASSERT( pV, "View not found!" );
+assert(pV && "View not found!");
 fprintf( fp

core.git: external/dtoa

2024-05-01 Thread Caolán McNamara (via logerrit)
 external/dtoa/C6011.patch.0   |   10 ++
 external/dtoa/UnpackedTarball_dtoa.mk |1 +
 2 files changed, 11 insertions(+)

New commits:
commit 867eee280bd968b9d6ca7d6a7b0d88ab1dc0d73a
Author: Caolán McNamara 
AuthorDate: Wed May 1 10:14:27 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 1 13:24:20 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

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

diff --git a/external/dtoa/C6011.patch.0 b/external/dtoa/C6011.patch.0
new file mode 100644
index ..a5e55e34f179
--- /dev/null
+++ b/external/dtoa/C6011.patch.0
@@ -0,0 +1,10 @@
+--- src/dtoa.c 2024-05-01 10:10:49.702762020 +0100
 src/dtoa.c 2024-05-01 10:11:45.308831303 +0100
+@@ -1606,6 +1606,7 @@
+   else
+   rv = (Bigint*)MALLOC(len*sizeof(double));
+ #endif
++  assert(rv && "Don't handle OOM conditions");
+   rv->k = k;
+   rv->maxwds = x;
+   }
diff --git a/external/dtoa/UnpackedTarball_dtoa.mk 
b/external/dtoa/UnpackedTarball_dtoa.mk
index bc4fe55b5a7e..d1702085cd6f 100644
--- a/external/dtoa/UnpackedTarball_dtoa.mk
+++ b/external/dtoa/UnpackedTarball_dtoa.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,dtoa, \
 external/dtoa/include_header.patch \
 external/dtoa/coverity.patch \
 external/dtoa/ubsan.patch.0 \
+external/dtoa/C6011.patch.0 \
 ))
 
 # vim: set noet sw=4 ts=4:


core.git: sc/qa

2024-05-01 Thread Szymon Kłos (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

New commits:
commit ced78dc7abf534edd2eacee4af01c35c4360b9f0
Author: Szymon Kłos 
AuthorDate: Wed May 1 08:44:38 2024 +0200
Commit: Szymon Kłos 
CommitDate: Wed May 1 13:17:03 2024 +0200

Remove commented code

Added it by mistake in commit c1c32bbbe24ebd4be00c9c3bb38de1dc748bd2b6
lok: test number formats with different locale

Signed-off-by: Szymon Kłos 
Change-Id: I0f7b456d5f41c1faf1f5051aaf0756c90553cf3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166947
Tested-by: Jenkins

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 6236307016f2..4c28c9f8874a 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -142,21 +142,13 @@ void ScTiledRenderingTest::tearDown()
 UnoApiXmlTest::tearDown();
 }
 
-ScModelObj* ScTiledRenderingTest::createDoc(const char* pName)//, const char* 
pLang = nullptr)
+ScModelObj* ScTiledRenderingTest::createDoc(const char* pName)
 {
 loadFromFile(OUString::createFromAscii(pName));
 
 ScModelObj* pModelObj = 
comphelper::getFromUnoTunnel(mxComponent);
 CPPUNIT_ASSERT(pModelObj);
-
-auto aProperties = uno::Sequence();//pLang ? 1 : 0);
-// if (pLang)
-// {
-// aProperties[0] = beans::PropertyValue(
-// "Language", -1, OUString::createFromAscii(pLang), 
beans::PropertyState_DIRECT_VALUE);
-// }
-
-pModelObj->initializeForTiledRendering(aProperties);
+
pModelObj->initializeForTiledRendering(uno::Sequence());
 return pModelObj;
 }
 


core.git: Branch 'distro/vector/vector-7.5.9' - 4 commits - svtools/source sw/qa sw/source

2024-05-01 Thread Mike Kaganski (via logerrit)
 svtools/source/svhtml/htmlout.cxx   |4 -
 sw/qa/extras/htmlexport/data/tdf160867_image_with_link.fodt |   25 +++
 sw/qa/extras/htmlexport/htmlexport.cxx  |   41 
 sw/source/core/inc/noteurl.hxx  |   36 ++
 sw/source/core/inc/swfont.hxx   |3 
 sw/source/core/layout/paintfrm.cxx  |5 -
 sw/source/core/text/atrhndl.hxx |2 
 sw/source/core/text/atrstck.cxx |   15 
 sw/source/core/text/inftxt.cxx  |   37 ++
 sw/source/core/text/inftxt.hxx  |7 ++
 sw/source/core/text/itrform2.cxx|2 
 sw/source/core/text/itrpaint.cxx|   20 +
 sw/source/core/text/noteurl.cxx |   37 ++
 sw/source/core/text/porfly.hxx  |1 
 sw/source/core/text/pormulti.cxx|3 
 sw/source/core/txtnode/swfont.cxx   |2 
 sw/source/filter/html/htmlflywriter.cxx |   31 ++---
 17 files changed, 256 insertions(+), 15 deletions(-)

New commits:
commit a2cb4a27f2e56d042b1f0dd1eaead49228b98197
Author: Mike Kaganski 
AuthorDate: Wed May 1 12:10:23 2024 +0500
Commit: Mike Kaganski 
CommitDate: Wed May 1 16:13:46 2024 +0500

tdf#160867: only output first element of the map in ReqIF case

It should be investigated, how the whole image map can be output in
that case - something to be done separately.

Change-Id: I6543c0d238205fabdb0a688e32a2d08423d7a5d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166948
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 148285680043..f1e32f9d110e 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -3078,6 +3078,23 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testHTML_160867)
 assertXPath(pDoc, "/html/body/p[2]/img", "usemap", "#" + mapName);
 }
 
+CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIF_160867)
+{
+// Given a document with an image with hyperlink, and text with hyperlink, 
both in a frame:
+createSwDoc("tdf160867_image_with_link.fodt");
+// When exporting to reqif:
+ExportToReqif();
+// For now, we don't (yet) output the whole map in ReqIF case.
+// Make sure that the first hyperlink from the objects in the frame is 
output as an  element
+// around the whole image of the frame.
+SvMemoryStream aStream;
+WrapReqifFromTempFile(aStream);
+xmlDocUniquePtr pXmlDoc = parseXmlStream(&aStream);
+assertXPath(pXmlDoc, 
"//reqif-xhtml:p[2]/reqif-xhtml:a/reqif-xhtml:object");
+CPPUNIT_ASSERT(
+getXPath(pXmlDoc, "//reqif-xhtml:p[2]/reqif-xhtml:a", 
"href").endsWith("foo/bar"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlflywriter.cxx 
b/sw/source/filter/html/htmlflywriter.cxx
index 624d992fb273..32b97fe16bdc 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -1117,17 +1117,17 @@ OUString lclWriteOutImap(SwHTMLWriter& rHTMLWrt, const 
SfxItemSet& rItemSet, con
 OUString aIMapName;
 
 // Only consider the URL attribute if no ImageMap was supplied
-if (!pAltImgMap)
-pURLItem = rItemSet.GetItemIfSet( RES_URL );
 
 // write ImageMap
 const ImageMap* pIMap = pAltImgMap;
-if( !pIMap && pURLItem )
+if( !pIMap  )
 {
-pIMap = pURLItem->GetMap();
+pURLItem = rItemSet.GetItemIfSet(RES_URL);
+if (pURLItem)
+pIMap = pURLItem->GetMap();
 }
 
-if (pIMap)
+if (pIMap && !rHTMLWrt.mbReqIF)
 {
 // make the name unique
 aIMapName = pIMap->GetName();
@@ -1135,10 +1135,10 @@ OUString lclWriteOutImap(SwHTMLWriter& rHTMLWrt, const 
SfxItemSet& rItemSet, con
 if (!aIMapName.isEmpty())
 aNameBase = aIMapName;
 else
+{
 aNameBase = OOO_STRING_SVTOOLS_HTML_map;
-
-if (aIMapName.isEmpty())
 aIMapName = aNameBase + OUString::number(rHTMLWrt.m_nImgMapCnt);
+}
 
 bool bFound;
 do
@@ -1309,7 +1309,7 @@ Writer& OutHTML_ImageStart( HtmlWriter& rHtml, Writer& 
rWrt, const SwFrameFormat
 // URL -> ..
 const SvxMacroItem *pMacItem = rItemSet.GetItemIfSet(RES_FRMMACRO);
 
-if (pURLItem || pMacItem)
+if (pURLItem || pMacItem || (rHTMLWrt.mbReqIF && pAltImgMap))
 {
 OUString aMapURL;
 OUString aName;
@@ -1321,6 +1321,21 @@ Writer& OutHTML_ImageStart( HtmlWriter& rHtml, Writer& 
rWrt, const SwFrameFormat
 aName = pURLItem->GetName();
   

core.git: sw/qa sw/source

2024-05-01 Thread Mike Kaganski (via logerrit)
 sw/qa/extras/htmlexport/htmlexport.cxx  |   15 +++
 sw/source/filter/html/htmlflywriter.cxx |   31 +++
 2 files changed, 38 insertions(+), 8 deletions(-)

New commits:
commit 96eabc69e9c3c6e9c944a4e83adddea44d48c621
Author: Mike Kaganski 
AuthorDate: Wed May 1 12:10:23 2024 +0500
Commit: Mike Kaganski 
CommitDate: Wed May 1 12:12:59 2024 +0200

tdf#160867: only output first element of the map in ReqIF case

It should be investigated, how the whole image map can be output in
that case - something to be done separately.

Change-Id: I6543c0d238205fabdb0a688e32a2d08423d7a5d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166948
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 1fc731b8b21d..282ce035b3a6 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -3107,6 +3107,21 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testHTML_160867)
 assertXPath(pDoc, "/html/body/p[2]/img"_ostr, "usemap"_ostr, "#" + 
mapName);
 }
 
+CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIF_160867)
+{
+// Given a document with an image with hyperlink, and text with hyperlink, 
both in a frame:
+createSwDoc("tdf160867_image_with_link.fodt");
+// When exporting to reqif:
+ExportToReqif();
+// For now, we don't (yet) output the whole map in ReqIF case.
+// Make sure that the first hyperlink from the objects in the frame is 
output as an  element
+// around the whole image of the frame.
+xmlDocUniquePtr pXmlDoc = WrapReqifFromTempFile();
+assertXPath(pXmlDoc, 
"//reqif-xhtml:p[2]/reqif-xhtml:a/reqif-xhtml:object"_ostr);
+CPPUNIT_ASSERT(getXPath(pXmlDoc, "//reqif-xhtml:p[2]/reqif-xhtml:a"_ostr, 
"href"_ostr)
+   .endsWith("foo/bar"));
+}
+
 } // end of anonymous namespace
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/filter/html/htmlflywriter.cxx 
b/sw/source/filter/html/htmlflywriter.cxx
index ea421f3cbc72..80b4abf5eade 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -1080,17 +1080,17 @@ OUString lclWriteOutImap(SwHTMLWriter& rWrt, const 
SfxItemSet& rItemSet, const S
 OUString aIMapName;
 
 // Only consider the URL attribute if no ImageMap was supplied
-if (!pAltImgMap)
-pURLItem = rItemSet.GetItemIfSet( RES_URL );
 
 // write ImageMap
 const ImageMap* pIMap = pAltImgMap;
-if( !pIMap && pURLItem )
+if( !pIMap  )
 {
-pIMap = pURLItem->GetMap();
+pURLItem = rItemSet.GetItemIfSet(RES_URL);
+if (pURLItem)
+pIMap = pURLItem->GetMap();
 }
 
-if (pIMap)
+if (pIMap && !rWrt.mbReqIF)
 {
 // make the name unique
 aIMapName = pIMap->GetName();
@@ -1098,10 +1098,10 @@ OUString lclWriteOutImap(SwHTMLWriter& rWrt, const 
SfxItemSet& rItemSet, const S
 if (!aIMapName.isEmpty())
 aNameBase = aIMapName;
 else
+{
 aNameBase = OOO_STRING_SVTOOLS_HTML_map;
-
-if (aIMapName.isEmpty())
 aIMapName = aNameBase + OUString::number(rWrt.m_nImgMapCnt);
+}
 
 bool bFound;
 do
@@ -1271,7 +1271,7 @@ SwHTMLWriter& OutHTML_ImageStart( HtmlWriter& rHtml, 
SwHTMLWriter& rWrt, const S
 // URL -> ..
 const SvxMacroItem *pMacItem = rItemSet.GetItemIfSet(RES_FRMMACRO);
 
-if (pURLItem || pMacItem)
+if (pURLItem || pMacItem || (rWrt.mbReqIF && pAltImgMap))
 {
 OUString aMapURL;
 OUString aName;
@@ -1283,6 +1283,21 @@ SwHTMLWriter& OutHTML_ImageStart( HtmlWriter& rHtml, 
SwHTMLWriter& rWrt, const S
 aName = pURLItem->GetName();
 aTarget = pURLItem->GetTargetFrameName();
 }
+else if (rWrt.mbReqIF && pAltImgMap)
+{
+// Get first non-empty map element
+for (size_t i = 0; i < pAltImgMap->GetIMapObjectCount(); ++i)
+{
+if (auto* pIMapObject = pAltImgMap->GetIMapObject(i))
+{
+aMapURL = pIMapObject->GetURL();
+aName = pIMapObject->GetName();
+aTarget = pIMapObject->GetTarget();
+if (!aMapURL.isEmpty() || !aName.isEmpty() || 
!aTarget.isEmpty())
+break;
+}
+}
+}
 
 bool bEvents = pMacItem && !pMacItem->GetMacroTable().empty();
 


core.git: translations

2024-05-01 Thread Mike Kaganski (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e8e5ffe638ad36ca0bb444006c86479b190d6de3
Author: Mike Kaganski 
AuthorDate: Wed May 1 10:57:12 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Wed May 1 11:57:12 2024 +0200

Update git submodules

* Update translations from branch 'master'
  to b824b552da5c054dd35568e86266afd1cf539441
  - tdf#151830: Fix RID_SVXSTR_TEXTENCODING_TABLE nb translations

Change-Id: I54cf1c7b471724ece13b2789d31b187b5e080446
Reviewed-on: https://gerrit.libreoffice.org/c/translations/+/164882
Tested-by: Christian Lohmaier 
Reviewed-by: Christian Lohmaier 

diff --git a/translations b/translations
index 7e1ef25c4f7b..b824b552da5c 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 7e1ef25c4f7bb14013f6e68e04c1205785967dad
+Subproject commit b824b552da5c054dd35568e86266afd1cf539441


translations.git: source/nb

2024-05-01 Thread Mike Kaganski (via logerrit)
 source/nb/svx/messages.po |  104 +++---
 1 file changed, 52 insertions(+), 52 deletions(-)

New commits:
commit b824b552da5c054dd35568e86266afd1cf539441
Author: Mike Kaganski 
AuthorDate: Mon Mar 18 12:42:48 2024 +0100
Commit: Christian Lohmaier 
CommitDate: Wed May 1 11:57:12 2024 +0200

tdf#151830: Fix RID_SVXSTR_TEXTENCODING_TABLE nb translations

Change-Id: I54cf1c7b471724ece13b2789d31b187b5e080446
Reviewed-on: https://gerrit.libreoffice.org/c/translations/+/164882
Tested-by: Christian Lohmaier 
Reviewed-by: Christian Lohmaier 

diff --git a/source/nb/svx/messages.po b/source/nb/svx/messages.po
index dcac5993bcd..223d6f6ab21 100644
--- a/source/nb/svx/messages.po
+++ b/source/nb/svx/messages.po
@@ -12176,133 +12176,133 @@ msgstr "Kyrillisk (ISO-8859-5)"
 #: svx/inc/txenctab.hrc:47
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Arabic (ISO-8859-6)"
-msgstr "Gresk (ISO-8859-7)"
+msgstr "Arabisk (ISO-8859-6)"
 
 #. qTzCE
 #: svx/inc/txenctab.hrc:48
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Greek (ISO-8859-7)"
-msgstr "Tyrkisk (ISO-8859-9)"
+msgstr "Gresk (ISO-8859-7)"
 
 #. MmChj
 #: svx/inc/txenctab.hrc:49
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Hebrew (ISO-8859-8)"
-msgstr "Vest-Europa (ISO-8859-14)"
+msgstr "Hebraisk (ISO-8859-8)"
 
 #. 3bHAV
 #: svx/inc/txenctab.hrc:50
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Turkish (ISO-8859-9)"
-msgstr "Vest-Europa (ISO-8859-15/euro)"
+msgstr "Tyrkisk (ISO-8859-9)"
 
 #. phdte
 #: svx/inc/txenctab.hrc:51
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Western Europe (ISO-8859-14)"
-msgstr "Gresk (DOS/OS2-737)"
+msgstr "Vest-Europa (ISO-8859-14)"
 
 #. MpHUZ
 #: svx/inc/txenctab.hrc:52
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Western Europe (ISO-8859-15/EURO)"
-msgstr "Baltisk (DOS/OS2-775)"
+msgstr "Vest-Europa (ISO-8859-15/Euro)"
 
 #. JgVnj
 #: svx/inc/txenctab.hrc:53
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Greek (DOS/OS2-737)"
-msgstr "Øst-Europa (DOS/OS2-852)"
+msgstr "Gresk (DOS/OS2-737)"
 
 #. EQi6s
 #: svx/inc/txenctab.hrc:54
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Baltic (DOS/OS2-775)"
-msgstr "Kyrillisk (DOS/OS2-855)"
+msgstr "Baltisk (DOS/OS2-775)"
 
 #. SDvMf
 #: svx/inc/txenctab.hrc:55
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Eastern Europe (DOS/OS2-852)"
-msgstr "Tyrkisk (DOS/OS2-857)"
+msgstr "Øst-Europa (DOS/OS2-852)"
 
 #. 3FrUC
 #: svx/inc/txenctab.hrc:56
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Cyrillic (DOS/OS2-855)"
-msgstr "Kyrillisk (DOS/OS2-866/russisk)"
+msgstr "Kyrillisk (DOS/OS2-855)"
 
 #. G8q5c
 #: svx/inc/txenctab.hrc:57
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Turkish (DOS/OS2-857)"
-msgstr "Gresk (DOS/OS2-869/moderne)"
+msgstr "Tyrkisk (DOS/OS2-857)"
 
 #. kBvdY
 #: svx/inc/txenctab.hrc:58
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Hebrew (DOS/OS2-862)"
-msgstr "Øst-Europa (Windows-1250/WinLatin 2)"
+msgstr "Hebraisk (DOS/OS2-862)"
 
 #. to6H6
 #: svx/inc/txenctab.hrc:59
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Arabic (DOS/OS2-864)"
-msgstr "Kyrillisk (Windows-1251)"
+msgstr "Arabisk (DOS/OS2-864)"
 
 #. BH6K4
 #: svx/inc/txenctab.hrc:60
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Cyrillic (DOS/OS2-866/Russian)"
-msgstr "Gresk (Windows-1253)"
+msgstr "Kyrillisk (DOS/OS2-866/Russisk)"
 
 #. ms8Dk
 #: svx/inc/txenctab.hrc:61
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Greek (DOS/OS2-869/Modern)"
-msgstr "Tyrkisk (Windows-1254)"
+msgstr "Gresk (DOS/OS2-869/Moderne)"
 
 #. U9RbL
 #: svx/inc/txenctab.hrc:62
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Eastern Europe (Windows-1250/WinLatin 2)"
-msgstr "Baltisk (Windows-1257)"
+msgstr "Øst-Europa (Windows-1250/WinLatin 2)"
 
 #. fRRMB
 #: svx/inc/txenctab.hrc:63
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Cyrillic (Windows-1251)"
-msgstr "Øst-Europa (Apple Macintosh)"
+msgstr "Kyrillisk (Windows-1251)"
 
 #. 7D9eT
 #: svx/inc/txenctab.hrc:64
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Greek (Windows-1253)"
-msgstr "Øst-Europa (Apple Macintosh/kroatisk)"
+msgstr "Gresk (Windows-1253)"
 
 #. sa8W8
 #: svx/inc/txenctab.hrc:65
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Turkish (Windows-1254)"
-msgstr "Kyrillisk (Apple Macintosh)"
+msgstr "Tyrkisk (Windows-1254)"
 
 #. ZxMJy
 #: svx/inc/txenctab.hrc:66
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Hebrew (Windows-1255)"
-msgstr "Gresk (Apple Macintosh)"
+msgstr "Hebraisk (Windows-1255)"
 
 #. 4GLZX
 #: svx/inc/txenctab.hrc:67
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Arabic (Windows-1256)"
-msgstr "Vest-Europa (Apple Macintosh/islandsk)"
+msgstr "Arabisk (Windows-1256)"
 
 #. errzy
 #: svx/inc/txenctab.hrc:68
 msgctxt "RID_SVXSTR_TEXTENCODING_TABLE"
 msgid "Baltic (Windows-1257)"
-msgstr "Øst-Europa (Apple Macintosh/rumensk)"
+msgstr "Baltisk (Windows-1257)"
 
 #. SSo9X
 #: svx/inc/txenctab.hrc:69
@@ -12314,31 +12314,31 @@ msgstr "Vietnamesisk (W

core.git: sd/inc sd/source

2024-05-01 Thread Tomaž Vajngerl (via logerrit)
 sd/inc/textapi.hxx  |6 +++---
 sd/source/core/text/textapi.cxx |   39 +--
 2 files changed, 24 insertions(+), 21 deletions(-)

New commits:
commit a377a7c5aa7f1ad9aae7d7bc8da4cbf5ba6b6478
Author: Tomaž Vajngerl 
AuthorDate: Fri Apr 19 17:12:15 2024 +0900
Commit: Tomaž Vajngerl 
CommitDate: Wed May 1 11:18:40 2024 +0200

annot: make TextApi use SdrModel instead of SdDrawDocument

Also it uses SdrOutliner instead of SdOutliner. This change is
important for moving the implementation to svx, where we don't
have sd specifics available and it seems in this case they are
not even needed.

Change-Id: I6c63ba4953bb5281aa951a0048a08fdd2813c530
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166495
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sd/inc/textapi.hxx b/sd/inc/textapi.hxx
index 70110349053a..5491382e0564 100644
--- a/sd/inc/textapi.hxx
+++ b/sd/inc/textapi.hxx
@@ -23,7 +23,7 @@
 #include 
 #include 
 
-class SdDrawDocument;
+class SdrModel;
 
 namespace sd {
 
@@ -32,9 +32,9 @@ class TextAPIEditSource;
 class TextApiObject final : public SvxUnoText
 {
 public:
-static rtl::Reference< TextApiObject > create( SdDrawDocument* pDoc );
+static rtl::Reference create(SdrModel* pModel);
 
-virtual ~TextApiObject() noexcept override;
+virtual ~TextApiObject() noexcept override;
 
 /// @throws css::uno::RuntimeException
 void dispose();
diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx
index e35b051d25f5..afb3c80714e5 100644
--- a/sd/source/core/text/textapi.cxx
+++ b/sd/source/core/text/textapi.cxx
@@ -87,9 +87,9 @@ namespace {
 
 struct TextAPIEditSource_Impl
 {
-SdDrawDocument* mpDoc;
-Outliner*   mpOutliner;
-SvxOutlinerForwarder*   mpTextForwarder;
+SdrModel* mpModel;
+Outliner* mpOutliner;
+SvxOutlinerForwarder* mpTextForwarder;
 };
 
 }
@@ -105,13 +105,14 @@ class TextAPIEditSource : public SvxEditSource
 explicitTextAPIEditSource( const TextAPIEditSource& rSource );
 
 public:
-explicitTextAPIEditSource(SdDrawDocument* pDoc);
+explicitTextAPIEditSource(SdrModel* pModel);
 
 voidDispose();
 voidSetText( OutlinerParaObject const & rText );
 std::optional CreateText();
 OUStringGetText() const;
-SdDrawDocument* GetDoc() { return m_xImpl->mpDoc; }
+
+SdrModel* getModel() { return m_xImpl->mpModel; }
 };
 
 static const SvxItemPropertySet* ImplGetSdTextPortionPropertyMap()
@@ -143,9 +144,9 @@ TextApiObject::~TextApiObject() noexcept
 dispose();
 }
 
-rtl::Reference< TextApiObject > TextApiObject::create( SdDrawDocument* pDoc )
+rtl::Reference TextApiObject::create(SdrModel* pModel)
 {
-rtl::Reference< TextApiObject > xRet( new TextApiObject( 
std::make_unique( pDoc ) ) );
+rtl::Reference xRet(new 
TextApiObject(std::make_unique(pModel)));
 return xRet;
 }
 
@@ -166,7 +167,7 @@ std::optional 
TextApiObject::CreateText()
 
 void TextApiObject::SetText( OutlinerParaObject const & rText )
 {
-SdrModel* pModel = mpSource->GetDoc();
+SdrModel* pModel = mpSource->getModel();
 if( pModel && pModel->IsUndoEnabled() )
 pModel->AddUndo( std::make_unique( *pModel, this ) 
);
 
@@ -205,17 +206,17 @@ void TextAPIEditSource::UpdateData()
 // data is kept in outliner all the time
 }
 
-TextAPIEditSource::TextAPIEditSource(SdDrawDocument* pDoc)
+TextAPIEditSource::TextAPIEditSource(SdrModel* pModel)
 : m_xImpl(std::make_shared())
 {
-m_xImpl->mpDoc = pDoc;
+m_xImpl->mpModel = pModel;
 m_xImpl->mpOutliner = nullptr;
 m_xImpl->mpTextForwarder = nullptr;
 }
 
 void TextAPIEditSource::Dispose()
 {
-m_xImpl->mpDoc=nullptr;
+m_xImpl->mpModel = nullptr;
 delete m_xImpl->mpTextForwarder;
 m_xImpl->mpTextForwarder = nullptr;
 
@@ -225,13 +226,14 @@ void TextAPIEditSource::Dispose()
 
 SvxTextForwarder* TextAPIEditSource::GetTextForwarder()
 {
-if(!m_xImpl->mpDoc)
-return nullptr; // mpDoc == 0 can be used to flag this as disposed
+if(!m_xImpl->mpModel)
+return nullptr; // mpModel == 0 can be used to flag this as disposed
 
 if (!m_xImpl->mpOutliner)
 {
 //init draw model first
-m_xImpl->mpOutliner = new SdOutliner(m_xImpl->mpDoc, 
OutlinerMode::TextObject);
+SfxItemPool* pPool = &m_xImpl->mpModel->GetItemPool();
+m_xImpl->mpOutliner = new SdrOutliner(pPool, OutlinerMode::TextObject);
 SdDrawDocument::SetCalcFieldValueHdl(m_xImpl->mpOutliner);
 }
 
@@ -243,12 +245,13 @@ SvxTextForwarder* TextAPIEditSource::GetTextForwarder()
 
 void TextAPIEditSource::SetText( OutlinerParaObject const & rText )
 {
-if (m_xImpl->mpDoc)
+if (m_xImpl->mpModel)
 {
 if (!m_xImpl->mpOutliner)
 {
 //init dr

core.git: sc/qa

2024-05-01 Thread Caolán McNamara (via logerrit)
 sc/qa/unit/PivotTableFormatsImportExport.cxx |  620 +--
 1 file changed, 316 insertions(+), 304 deletions(-)

New commits:
commit 9d59980dfdad0e1425f6a49507b5f97995481930
Author: Caolán McNamara 
AuthorDate: Wed May 1 08:44:47 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 1 11:05:45 2024 +0200

rearrange PivotTableFormatsImportExport to avoid clang crash

apparently related to lambdas

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

diff --git a/sc/qa/unit/PivotTableFormatsImportExport.cxx 
b/sc/qa/unit/PivotTableFormatsImportExport.cxx
index 0ea867a1..3477d574918c 100644
--- a/sc/qa/unit/PivotTableFormatsImportExport.cxx
+++ b/sc/qa/unit/PivotTableFormatsImportExport.cxx
@@ -76,241 +76,249 @@ template  OUString 
checkNonEmptyAddresses(ScDocument& rDoc, T const&
 
 } // end anonymous namespace
 
+static void assertDataFieldInRow_RowLabelColor(ScDocument& rDoc)
+{
+CPPUNIT_ASSERT_EQUAL(COL_YELLOW, getBackgroundColor(rDoc, u"G6"_ustr));
+CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, getFontColor(rDoc, u"G7"_ustr));
+
+// Make sure the other cells have the font color or background set to 
default
+auto aEmptyAddresses = std::to_array({
+u"G5"_ustr,
+u"H5"_ustr,
+u"I5"_ustr,
+u"J5"_ustr,
+u"K5"_ustr,
+u"H6"_ustr,
+u"I6"_ustr,
+u"J6"_ustr,
+u"K6"_ustr,
+u"H7"_ustr,
+u"I7"_ustr,
+u"J7"_ustr,
+u"K7"_ustr,
+});
+CPPUNIT_ASSERT_EQUAL(OUString(), checkNonEmptyAddresses(rDoc, 
aEmptyAddresses));
+}
+
 CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
  testPivotTableCellFormat_1_DataFieldInRow_RowLabelColor)
 {
-auto assertDocument = [](ScDocument& rDoc) {
-CPPUNIT_ASSERT_EQUAL(COL_YELLOW, getBackgroundColor(rDoc, u"G6"_ustr));
-CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, getFontColor(rDoc, u"G7"_ustr));
-
-// Make sure the other cells have the font color or background set to 
default
-auto aEmptyAddresses = std::to_array({
-u"G5"_ustr,
-u"H5"_ustr,
-u"I5"_ustr,
-u"J5"_ustr,
-u"K5"_ustr,
-u"H6"_ustr,
-u"I6"_ustr,
-u"J6"_ustr,
-u"K6"_ustr,
-u"H7"_ustr,
-u"I7"_ustr,
-u"J7"_ustr,
-u"K7"_ustr,
-});
-CPPUNIT_ASSERT_EQUAL(OUString(), checkNonEmptyAddresses(rDoc, 
aEmptyAddresses));
-};
-
 
createScDoc("xlsx/pivot-table/PivotTableCellFormatsTest_1_DataFieldInRow_RowLabelColor.xlsx");
-assertDocument(*getScDoc());
+assertDataFieldInRow_RowLabelColor(*getScDoc());
 saveAndReload("Calc Office Open XML");
-assertDocument(*getScDoc());
+assertDataFieldInRow_RowLabelColor(*getScDoc());
+}
+
+static void assertDataFieldInRow_ColumnLabelColor(ScDocument& rDoc)
+{
+CPPUNIT_ASSERT_EQUAL(Color(0x00B050), getBackgroundColor(rDoc, 
u"H5"_ustr));
+
+// Make sure the other cells have the font color or background set to 
default
+auto aEmptyAddresses = std::to_array({
+u"G5"_ustr,
+u"I5"_ustr,
+u"J5"_ustr,
+u"K5"_ustr,
+u"G6"_ustr,
+u"H6"_ustr,
+u"I6"_ustr,
+u"J6"_ustr,
+u"K6"_ustr,
+u"G7"_ustr,
+u"H7"_ustr,
+u"I7"_ustr,
+u"J7"_ustr,
+u"K7"_ustr,
+});
+CPPUNIT_ASSERT_EQUAL(OUString(), checkNonEmptyAddresses(rDoc, 
aEmptyAddresses));
 }
 
 CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport,
  
PivotTableCellFormatsTest_2_DataFieldInRow_ColumnLabelColor)
 {
-auto assertDocument = [](ScDocument& rDoc) {
-CPPUNIT_ASSERT_EQUAL(Color(0x00B050), getBackgroundColor(rDoc, 
u"H5"_ustr));
-
-// Make sure the other cells have the font color or background set to 
default
-auto aEmptyAddresses = std::to_array({
-u"G5"_ustr,
-u"I5"_ustr,
-u"J5"_ustr,
-u"K5"_ustr,
-u"G6"_ustr,
-u"H6"_ustr,
-u"I6"_ustr,
-u"J6"_ustr,
-u"K6"_ustr,
-u"G7"_ustr,
-u"H7"_ustr,
-u"I7"_ustr,
-u"J7"_ustr,
-u"K7"_ustr,
-});
-CPPUNIT_ASSERT_EQUAL(OUString(), checkNonEmptyAddresses(rDoc, 
aEmptyAddresses));
-};
-
 createScDoc(
 
"xlsx/pivot-table/PivotTableCellFormatsTest_2_DataFieldInRow_ColumnLabelColor.xlsx");
-assertDocument(*getScDoc());
+assertDataFieldInRow_ColumnLabelColor(*getScDoc());
 saveAndReload("Calc Office Open XML");
-assertDocument(*getScDoc());
+assertDataFieldInRow_ColumnLabelColor(*getScDoc());
+}
+
+static void assertDataFieldInColumn_ColumnLabelColor(ScDocument& rDoc)
+{
+CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, getFon

core.git: sc/source

2024-05-01 Thread Pranam Lashkari (via logerrit)
 sc/source/ui/dbgui/scuiasciiopt.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 312740f1ef96ef6fe7e83d5fb1f5d2d4b2d2471c
Author: Pranam Lashkari 
AuthorDate: Fri Apr 26 23:51:14 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 1 11:03:48 2024 +0200

LOK: hide cancel button in csv import dialog

it did not make any sense to have cancel button in this dialog
because it would not load file at all.
user can still use close button in title bar to close dialog

Change-Id: Id3ba3e4030553db18bdbd068d92b3395f4fb8c3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166764
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 290d70a476bab7d100baa3568ec547633109033e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166835
(cherry picked from commit 7171c9e8f6fecedac29e89deaeb2afa4d67a2a17)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166844
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx 
b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 6cb73c803c39..22f2867c3545 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -628,6 +628,9 @@ ScImportAsciiDlg::ScImportAsciiDlg(weld::Window* pParent, 
std::u16string_view aD
 mxCkbSkipEmptyCells->set_active(false);
 mxCkbSkipEmptyCells->hide();
 }
+
+if (comphelper::LibreOfficeKit::isActive())
+m_xBuilder->weld_button("cancel")->hide();
 m_xDialog->SetInstallLOKNotifierHdl(LINK(this, ScImportAsciiDlg, 
InstallLOKNotifierHdl));
 }
 


core.git: connectivity/source i18npool/source scripting/source ucb/source

2024-05-01 Thread Caolán McNamara (via logerrit)
 connectivity/source/commontools/TColumnsHelper.cxx|4 --
 connectivity/source/parse/internalnode.cxx|   11 ++---
 connectivity/source/parse/sqliterator.cxx |   26 +++---
 connectivity/source/parse/sqlnode.cxx |   12 +++---
 i18npool/source/indexentry/indexentrysupplier_default.cxx |1 
 scripting/source/stringresource/stringresource.cxx|6 ++-
 ucb/source/ucp/file/filtask.cxx   |2 -
 7 files changed, 30 insertions(+), 32 deletions(-)

New commits:
commit e6981b99ac5447f917287f5102a0a18b4972871e
Author: Caolán McNamara 
AuthorDate: Wed May 1 08:33:07 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 1 10:50:11 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

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

diff --git a/connectivity/source/commontools/TColumnsHelper.cxx 
b/connectivity/source/commontools/TColumnsHelper.cxx
index aeb8b48a649a..b346b5a23236 100644
--- a/connectivity/source/commontools/TColumnsHelper.cxx
+++ b/connectivity/source/commontools/TColumnsHelper.cxx
@@ -64,10 +64,9 @@ OColumnsHelper::~OColumnsHelper()
 {
 }
 
-
 sdbcx::ObjectType OColumnsHelper::createObject(const OUString& _rName)
 {
-OSL_ENSURE(m_pTable,"NO Table set. Error!");
+assert(m_pTable && "NO Table set. Error!");
 Reference xConnection = m_pTable->getConnection();
 
 if ( !m_pImpl )
@@ -142,7 +141,6 @@ sdbcx::ObjectType OColumnsHelper::createObject(const 
OUString& _rName)
 return xRet;
 }
 
-
 void OColumnsHelper::impl_refresh()
 {
 if ( m_pTable )
diff --git a/connectivity/source/parse/internalnode.cxx 
b/connectivity/source/parse/internalnode.cxx
index 1906ad3d4625..9b7849345556 100644
--- a/connectivity/source/parse/internalnode.cxx
+++ b/connectivity/source/parse/internalnode.cxx
@@ -28,7 +28,7 @@ OSQLInternalNode::OSQLInternalNode(const char* pNewValue,
sal_uInt32 nNodeID)
  : OSQLParseNode(pNewValue,eNodeType,nNodeID)
 {
-OSL_ENSURE(OSQLParser::s_pGarbageCollector, "Collector not initialized");
+assert(OSQLParser::s_pGarbageCollector && "Collector not initialized");
 (*OSQLParser::s_pGarbageCollector)->push_back(this);
 }
 
@@ -38,26 +38,23 @@ OSQLInternalNode::OSQLInternalNode(std::string_view 
NewValue,
  sal_uInt32 nNodeID)
 :OSQLParseNode(NewValue,eNodeType,nNodeID)
 {
-OSL_ENSURE(OSQLParser::s_pGarbageCollector, "Collector not initialized");
+assert(OSQLParser::s_pGarbageCollector && "Collector not initialized");
 (*OSQLParser::s_pGarbageCollector)->push_back(this);
 }
 
-
 OSQLInternalNode::OSQLInternalNode(const OUString &NewValue,
  SQLNodeType eNodeType,
  sal_uInt32 nNodeID)
 :OSQLParseNode(NewValue,eNodeType,nNodeID)
 {
-OSL_ENSURE(OSQLParser::s_pGarbageCollector, "Collector not initialized");
+assert(OSQLParser::s_pGarbageCollector && "Collector not initialized");
 (*OSQLParser::s_pGarbageCollector)->push_back(this);
 }
 
-
 OSQLInternalNode::~OSQLInternalNode()
 {
 // remove the node from the garbage list
-
-OSL_ENSURE(OSQLParser::s_pGarbageCollector, "Collector not initialized");
+assert(OSQLParser::s_pGarbageCollector && "Collector not initialized");
 (*OSQLParser::s_pGarbageCollector)->erase(this);
 }
 
diff --git a/connectivity/source/parse/sqliterator.cxx 
b/connectivity/source/parse/sqliterator.cxx
index f190d5dbfc97..3171507bcc67 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -610,7 +610,7 @@ void OSQLParseTreeIterator::getSelect_statement(OSQLTables& 
_rTables,const OSQLP
 }
 OSQLParseNode * pTableRefCommalist = 
pSelect->getChild(3)->getChild(0)->getChild(1);
 
-OSL_ENSURE(pTableRefCommalist != nullptr,"OSQLParseTreeIterator: error in 
parse tree!");
+assert(pTableRefCommalist != nullptr && "OSQLParseTreeIterator: error in 
parse tree!");
 
OSL_ENSURE(SQL_ISRULE(pTableRefCommalist,table_ref_commalist),"OSQLParseTreeIterator:
 error in parse tree!");
 
 const OSQLParseNode* pTableName = nullptr;
@@ -965,21 +965,21 @@ void OSQLParseTreeIterator::traverseByColumnNames(const 
OSQLParseNode* pSelectNo
 OSL_ENSURE(pSelectNode->count() >= 4,"OSQLParseTreeIterator: error in 
parse tree!");
 
 OSQLParseNode * pTableExp = pSelectNode->getChild(3);
-OSL_ENSURE(pTableExp != nullptr,"OSQLParseTreeIterator: error in parse 
tree!");
+assert(pTableExp != nullptr && "OSQLParseTreeIterator: error in parse 
tree!");
 
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator:table_exp 
error in parse tree!");
 OSL_ENSURE(pTableExp->count() == 
TABLE_EXPRESSION_CHILD_COUNT,"OSQL

core.git: cui/uiconfig

2024-05-01 Thread Heiko Tietze (via logerrit)
 cui/uiconfig/ui/optviewpage.ui |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 358b281a39c6599aa2054a9cf60aa6712e832150
Author: Heiko Tietze 
AuthorDate: Tue Apr 30 09:33:22 2024 +0200
Commit: Heiko Tietze 
CommitDate: Wed May 1 09:26:29 2024 +0200

Resolves tdf#141778 - Size issues on view options UI

Change-Id: I08ab47d8f88a0bda16e15377921909f64219c4a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166885
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index ce89f11d4d2c..6ad847830136 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -27,7 +27,6 @@
   
 True
 False
-True
 12
 
   


core.git: cli_ure/source helpcompiler/source idl/source ucb/source

2024-05-01 Thread Caolán McNamara (via logerrit)
 cli_ure/source/climaker/climaker_app.cxx |2 +-
 helpcompiler/source/HelpLinker.cxx   |4 +++-
 idl/source/objects/types.cxx |4 ++--
 ucb/source/ucp/tdoc/tdoc_storage.cxx |5 +
 4 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit ed3ce7bfeb2a22c17071fd02f61fa2c819a35c89
Author: Caolán McNamara 
AuthorDate: Tue Apr 30 20:41:27 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 1 09:17:34 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

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

diff --git a/cli_ure/source/climaker/climaker_app.cxx 
b/cli_ure/source/climaker/climaker_app.cxx
index d551659fec4b..c389da198af5 100644
--- a/cli_ure/source/climaker/climaker_app.cxx
+++ b/cli_ure/source/climaker/climaker_app.cxx
@@ -146,7 +146,7 @@ static OptionInfo const * get_option_info(
 static bool is_option(
 OptionInfo const * option_info, sal_uInt32 * pIndex )
 {
-OSL_ASSERT( option_info != 0 );
+assert(option_info != 0);
 if (osl_getCommandArgCount() <= *pIndex)
 return false;
 
diff --git a/helpcompiler/source/HelpLinker.cxx 
b/helpcompiler/source/HelpLinker.cxx
index b99061d0dd7f..70b9af1fe4b4 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -709,7 +709,9 @@ void HelpLinker::main( std::vector &args,
 }
 }
 else
-{ //called from extension manager
+{
+assert(pExtensionPath);
+//called from extension manager
 extensionPath = *pExtensionPath;
 sourceRoot = fs::path(extensionPath);
 extensionDestination = *pDestination;
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 1089e929043c..f6a77e77e07a 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -99,9 +99,9 @@ bool SvMetaAttribute::ReadSvIdl( SvIdlDataBase & rBase,
 size_t SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray ) const
 {
 SvMetaType * pType = GetType();
-DBG_ASSERT( pType, "no type for attribute" );
+assert(pType && "no type for attribute");
 SvMetaType * pBaseType = pType->GetBaseType();
-DBG_ASSERT( pBaseType, "no base type for attribute" );
+assert(pBaseType && "no base type for attribute");
 if( pBaseType->GetMetaTypeType() == MetaTypeType::Struct )
 return pBaseType->MakeSfx( rAttrArray );
 else
diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx 
b/ucb/source/ucp/tdoc/tdoc_storage.cxx
index fe307a5bfa2d..858b05784dcc 100644
--- a/ucb/source/ucp/tdoc/tdoc_storage.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx
@@ -319,19 +319,16 @@ StorageElementFactory::createStream( const OUString & 
rUri,
 new Stream( m_xContext, m_xDocsMgr, rUri, xParentStorage, xStream ) );
 }
 
-
 void StorageElementFactory::releaseElement( Storage const * pElement )
 {
-OSL_ASSERT( pElement );
+assert(pElement);
 osl::MutexGuard aGuard( m_aMutex );
 if ( pElement->m_aContainerIt != m_aMap.end() )
 m_aMap.erase( pElement->m_aContainerIt );
 }
 
-
 // Non-UNO interface
 
-
 uno::Reference< embed::XStorage > StorageElementFactory::queryParentStorage(
 const OUString & rUri, StorageAccessMode eMode )
 {


core.git: 2 commits - include/sot sot/source svl/source

2024-05-01 Thread Caolán McNamara (via logerrit)
 include/sot/stg.hxx|6 +++---
 sot/source/sdstor/stg.cxx  |   18 +-
 sot/source/sdstor/stgavl.cxx   |5 +++--
 sot/source/sdstor/storage.cxx  |2 +-
 sot/source/sdstor/ucbstorage.cxx   |   24 
 sot/source/unoolestorage/xolesimplestorage.cxx |2 +-
 svl/source/items/style.cxx |2 +-
 svl/source/misc/strmadpt.cxx   |1 +
 svl/source/misc/urihelper.cxx  |2 +-
 9 files changed, 32 insertions(+), 30 deletions(-)

New commits:
commit fdbc8d1374e2a9fde6c99acbe6923a277695a0a3
Author: Caolán McNamara 
AuthorDate: Tue Apr 30 20:08:04 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 1 09:17:27 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

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

diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index 2b3e9a146908..86658536cb07 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -440,7 +440,7 @@ void Storage::Init( bool bCreate )
 bool bHdrLoaded = false;
 bIsRoot = true;
 
-OSL_ENSURE( pIo, "The pointer may not be empty at this point!" );
+assert(pIo && "The pointer may not be empty at this point!");
 if( pIo->Good() && pIo->GetStrm() )
 {
 sal_uInt64 nSize = pIo->GetStrm()->TellEnd();
diff --git a/sot/source/sdstor/stgavl.cxx b/sot/source/sdstor/stgavl.cxx
index 98a86f3edb96..ac0c5f468024 100644
--- a/sot/source/sdstor/stgavl.cxx
+++ b/sot/source/sdstor/stgavl.cxx
@@ -59,7 +59,7 @@ sal_Int32 StgAvlNode::Locate
 sal_Int32 nRes = 0;
 StgAvlNode* pCur = this;
 
-OSL_ENSURE( pPivot && pParent && pPrev, "The pointers may not be NULL!" );
+assert(pPivot && pParent && pPrev && "The pointers may not be NULL!");
 *pParent = *pPrev = nullptr;
 *pPivot = this;
 
@@ -94,10 +94,11 @@ short StgAvlNode::Adjust( StgAvlNode** pHeavy, StgAvlNode 
const * pNew )
 StgAvlNode* pCur = this;
 short nDelta;
 // no traversing
-OSL_ENSURE( pHeavy && pNew, "The pointers is not allowed to be NULL!" );
 if( pCur == pNew || !pNew )
 return m_nBalance;
 
+assert(pHeavy && pNew && "The pointers is not allowed to be NULL!");
+
 sal_Int32 nRes = Compare( pNew );
 if( nRes > 0 )
 {
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 8a2da70793e6..a43e326ad877 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -724,7 +724,7 @@ void SfxStyleSheetBasePool::Remove( SfxStyleSheetBase* p )
 void SfxStyleSheetBasePool::Insert( SfxStyleSheetBase* p )
 {
 #if OSL_DEBUG_LEVEL > 0
-OSL_ENSURE( p, "svl::SfxStyleSheetBasePool::Insert(), no stylesheet?" );
+assert(p && "svl::SfxStyleSheetBasePool::Insert(), no stylesheet?");
 
 SfxStyleSheetIterator aIter(this, p->GetFamily(), p->GetMask());
 SfxStyleSheetBase* pOld = aIter.Find( p->GetName() );
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index 7a755d924986..919cb4ab3a45 100644
--- a/svl/source/misc/strmadpt.cxx
+++ b/svl/source/misc/strmadpt.cxx
@@ -591,6 +591,7 @@ void SvDataPipe_Impl::write(sal_Int8 const * pBuffer, 
sal_uInt32 nSize)
 = static_cast< Page * >(std::malloc(
 sizeof (Page) + m_nPageSize
 - 1));
+assert(pNew && "Don't handle OOM conditions");
 pNew->m_pPrev = m_pWritePage;
 pNew->m_pNext = m_pWritePage->m_pNext;
 
diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index 71ab02491f55..d31a9e8cbe0c 100644
--- a/svl/source/misc/urihelper.cxx
+++ b/svl/source/misc/urihelper.cxx
@@ -136,7 +136,7 @@ enum Result { Success, GeneralFailure, SpecificFailure };
 Result normalizePrefix( css::uno::Reference< css::ucb::XUniversalContentBroker 
> const & broker,
 OUString const & uri, OUString * normalized)
 {
-OSL_ASSERT(broker.is() && normalized != nullptr);
+assert(broker.is() && normalized != nullptr);
 css::uno::Reference< css::ucb::XContent > content;
 try {
 content = broker->queryContent(broker->createContentIdentifier(uri));
commit fe72e20f865baca9387e5d14327c56b2773d760f
Author: Caolán McNamara 
AuthorDate: Tue Apr 30 20:07:06 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 1 09:17:14 2024 +0200

CopyTo is never passed a null argument

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

diff --git a/include/sot/stg.hxx b/include/sot/stg.hxx
index 519b7f701309..66b9c9ac613b 100644
--- a/include/sot/s

core.git: tools/source

2024-05-01 Thread Caolán McNamara (via logerrit)
 tools/source/fsys/urlobj.cxx   |2 +-
 tools/source/inet/inetmime.cxx |   16 ++--
 2 files changed, 7 insertions(+), 11 deletions(-)

New commits:
commit 4742808bf277cd33ef95029b987aac904149afd9
Author: Caolán McNamara 
AuthorDate: Tue Apr 30 19:47:06 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 1 09:16:57 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

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

diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index b1e3073f39b4..aeb85c1c9f1d 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -2274,7 +2274,7 @@ INetURLObject::PrefixInfo const * 
INetURLObject::getPrefix(sal_Unicode const *&
 sal_Int32 i = 0;
 for (; pFirst < pLast; ++i)
 {
-if (pFirst->m_pPrefix[i] == '
+if (pFirst->m_pPrefix && pFirst->m_pPrefix[i] == '
 {
 pMatch = pFirst++;
 pMatched = p;
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index 6694dc398669..28572483951f 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -70,8 +70,7 @@ int getBase64Weight(sal_uInt32 nChar)
 bool startsWithLineFolding(const sal_Unicode * pBegin,
 const sal_Unicode * pEnd)
 {
-DBG_ASSERT(pBegin && pBegin <= pEnd,
-   "startsWithLineFolding(): Bad sequence");
+assert(pBegin && pBegin <= pEnd && "startsWithLineFolding(): Bad 
sequence");
 
 return pEnd - pBegin >= 3 && pBegin[0] == 0x0D && pBegin[1] == 0x0A
&& isWhiteSpace(pBegin[2]); // CR, LF
@@ -395,8 +394,7 @@ bool isTokenChar(sal_uInt32 nChar)
 const sal_Unicode * skipComment(const sal_Unicode * pBegin,
   const sal_Unicode * pEnd)
 {
-DBG_ASSERT(pBegin && pBegin <= pEnd,
-   "skipComment(): Bad sequence");
+assert(pBegin && pBegin <= pEnd && "skipComment(): Bad sequence");
 
 if (pBegin != pEnd && *pBegin == '(')
 {
@@ -427,8 +425,7 @@ const sal_Unicode * skipLinearWhiteSpaceComment(const 
sal_Unicode *
   const sal_Unicode *
   pEnd)
 {
-DBG_ASSERT(pBegin && pBegin <= pEnd,
-   "skipLinearWhiteSpaceComment(): Bad sequence");
+assert(pBegin && pBegin <= pEnd && "skipLinearWhiteSpaceComment(): Bad 
sequence");
 
 while (pBegin != pEnd)
 switch (*pBegin)
@@ -463,8 +460,7 @@ const sal_Unicode * skipLinearWhiteSpaceComment(const 
sal_Unicode *
 const sal_Unicode * skipQuotedString(const sal_Unicode * pBegin,
const sal_Unicode * pEnd)
 {
-DBG_ASSERT(pBegin && pBegin <= pEnd,
-   "skipQuotedString(): Bad sequence");
+assert(pBegin && pBegin <= pEnd && "skipQuotedString(): Bad sequence");
 
 if (pBegin != pEnd && *pBegin == '"')
 for (const sal_Unicode * p = pBegin + 1; p != pEnd;)
@@ -707,7 +703,7 @@ bool equalIgnoreCase(const char * pBegin1,
const char * pEnd1,
const char * pString2)
 {
-DBG_ASSERT(pBegin1 && pBegin1 <= pEnd1 && pString2,
+assert(pBegin1 && pBegin1 <= pEnd1 && pString2 &&
"equalIgnoreCase(): Bad sequences");
 
 while (*pString2 != 0)
@@ -971,7 +967,7 @@ bool INetMIME::equalIgnoreCase(const sal_Unicode * pBegin1,
const sal_Unicode * pEnd1,
const char * pString2)
 {
-DBG_ASSERT(pBegin1 && pBegin1 <= pEnd1 && pString2,
+assert(pBegin1 && pBegin1 <= pEnd1 && pString2 &&
"INetMIME::equalIgnoreCase(): Bad sequences");
 
 while (*pString2 != 0)


core.git: sc/qa sc/source

2024-05-01 Thread Regina Henschel (via logerrit)
 sc/qa/unit/data/ods/tdf160329_sortWithHiddenRows.ods |binary
 sc/qa/unit/scshapetest.cxx   |   37 +
 sc/source/core/data/table3.cxx   |   78 +--
 3 files changed, 109 insertions(+), 6 deletions(-)

New commits:
commit f0a2969d15e3101d7f96a7fe77bca06a5d70f57a
Author: Regina Henschel 
AuthorDate: Sat Apr 27 19:25:32 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 1 09:12:59 2024 +0200

tdf#160329 update objects after row sort is finished

The problem was that when the object position was updated to the anchor
values by recalcPos() method, the document did not yet have the new
state of the hidden rows. As a result, incorrect positions were
calculated. Therefore, the update of the position is moved to a place
after the update of the visibility of the rows.

Sorting rows must not change the visibility of objects. However, updating
the visibility of rows sets all objects to visible. Now the visibility
state of an object is saved and restored later so that the recalcPos()
method receives the correct state for the object.

Change-Id: Ia32698c1d45cd81702e6d00c5dfc100f6f6f399c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166799
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/sc/qa/unit/data/ods/tdf160329_sortWithHiddenRows.ods 
b/sc/qa/unit/data/ods/tdf160329_sortWithHiddenRows.ods
new file mode 100644
index ..5ba746ad7baa
Binary files /dev/null and 
b/sc/qa/unit/data/ods/tdf160329_sortWithHiddenRows.ods differ
diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx
index 5aa24ede6ea6..d434084519f3 100644
--- a/sc/qa/unit/scshapetest.cxx
+++ b/sc/qa/unit/scshapetest.cxx
@@ -62,6 +62,14 @@ static SdrObject* lcl_getSdrObjectWithAssert(ScDocument& 
rDoc, sal_uInt16 nObjNu
 return pObj;
 }
 
+static SdrObject* lcl_getSdrObjectbyName(ScDocument& rDoc, std::u16string_view 
rName)
+{
+ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
+const SdrPage* pPage = pDrawLayer->GetPage(0);
+SdrObject* pObj = pPage->GetObjByName(rName);
+return pObj;
+}
+
 CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf144242_OpenBezier_noSwapWH)
 {
 // Shapes, which have rotation incorporated in their points, got 
erroneously width-height
@@ -1295,6 +1303,35 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, 
testTdf160369_groupshape)
 CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aOrigRect, aAfterRect, 1);
 }
 
+CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf160329_sortWithHiddenRows)
+{
+// Load a document, which has images anchored to cell and rows hidden
+createScDoc("ods/tdf160329_sortWithHiddenRows.ods");
+ScDocument* pDoc = getScDoc();
+
+// Sort the rows
+uno::Sequence aArgs1
+= { comphelper::makePropertyValue("DbName", u"myRange"_ustr) };
+dispatchCommand(mxComponent, ".uno:SelectDB", aArgs1);
+uno::Sequence aArgs2
+= { comphelper::makePropertyValue("ByRows", true),
+comphelper::makePropertyValue("HasHeader", true),
+comphelper::makePropertyValue("Col1", sal_Int32(1)),
+comphelper::makePropertyValue("Ascending1", false),
+comphelper::makePropertyValue("IncludeImages", true) };
+dispatchCommand(mxComponent, ".uno:DataSort", aArgs2);
+
+// Make sure objects are on correct position
+SdrObject* pObj = lcl_getSdrObjectbyName(*pDoc, 
std::u16string_view(u"ImageD"));
+Point aPos = pObj->GetSnapRect().TopLeft();
+// The position was (3000|2899) without fix.
+CPPUNIT_ASSERT_POINT_EQUAL_WITH_TOLERANCE(Point(3000, 5898), aPos, 1);
+pObj = lcl_getSdrObjectbyName(*pDoc, std::u16string_view(u"ImageE"));
+aPos = pObj->GetSnapRect().TopLeft();
+// The position was (2600|2499) without fix.
+CPPUNIT_ASSERT_POINT_EQUAL_WITH_TOLERANCE(Point(2600, 4399), aPos, 1);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 4e06aca8231a..ee00f2d58161 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -911,6 +911,50 @@ void ScTable::SortReorderByColumn(
 }
 }
 
+static void backupObjectsVisibility(const 
std::vector>& rSortedCols,
+
std::vector>>& rBackup)
+{
+size_t nSortedCols = rSortedCols.size();
+for (size_t iCol = 0; iCol < nSortedCols; ++iCol)
+{
+std::vector>& rSingleColCellDrawObjects
+= rSortedCols[iCol]->maCellDrawObjects;
+size_t nSingleColCellDrawObjects = rSingleColCellDrawObjects.size();
+std::vector> aColBackup;
+for (size_t jRow = 0; jRow < nSingleColCellDrawObjects; ++jRow)
+{
+std::vector& rCellDrawObjects = 
rSingleColCellDrawObjects[jRow];
+std::vector aCellBackup;
+for (auto& pObject : rCellDrawObjects)
+{
+

core.git: sw/inc sw/source

2024-05-01 Thread Noel Grandin (via logerrit)
 sw/inc/unotxdoc.hxx|2 ++
 sw/source/uibase/uno/unotxdoc.cxx  |   14 ++
 sw/source/writerfilter/dmapper/StyleSheetTable.cxx |   20 ++--
 3 files changed, 26 insertions(+), 10 deletions(-)

New commits:
commit ed015246b9b27e1ea1f87bc125262850d7128c0f
Author: Noel Grandin 
AuthorDate: Thu Apr 25 16:26:59 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 1 09:09:07 2024 +0200

use more concrete UNO classes in writerfilter (SwXStyle)

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

diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index b690a290b7b9..4bc4296633c2 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -531,6 +531,8 @@ public:
 SW_DLLPUBLIC rtl::Reference createTextFrame();
 SW_DLLPUBLIC rtl::Reference 
createTextGraphicObject();
 SW_DLLPUBLIC rtl::Reference createNumberingStyle();
+SW_DLLPUBLIC rtl::Reference createCharacterStyle();
+SW_DLLPUBLIC rtl::Reference createParagraphStyle();
 SW_DLLPUBLIC rtl::Reference createPageStyle();
 SW_DLLPUBLIC rtl::Reference createContentControl();
 SW_DLLPUBLIC rtl::Reference createFootnote();
diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index d9debd315fab..156f9aabad1f 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -1729,6 +1729,20 @@ rtl::Reference< SwXStyle > 
SwXTextDocument::createNumberingStyle()
 return 
SwXStyleFamilies::CreateStyleCharOrParaOrPseudo(SfxStyleFamily::Pseudo, 
GetDocOrThrow());
 }
 
+rtl::Reference< SwXStyle > SwXTextDocument::createCharacterStyle()
+{
+SolarMutexGuard aGuard;
+ThrowIfInvalid();
+return 
SwXStyleFamilies::CreateStyleCharOrParaOrPseudo(SfxStyleFamily::Char, 
GetDocOrThrow());
+}
+
+rtl::Reference< SwXStyle > SwXTextDocument::createParagraphStyle()
+{
+SolarMutexGuard aGuard;
+ThrowIfInvalid();
+return 
SwXStyleFamilies::CreateStyleCharOrParaOrPseudo(SfxStyleFamily::Para, 
GetDocOrThrow());
+}
+
 rtl::Reference< SwXPageStyle > SwXTextDocument::createPageStyle()
 {
 SolarMutexGuard aGuard;
diff --git a/sw/source/writerfilter/dmapper/StyleSheetTable.cxx 
b/sw/source/writerfilter/dmapper/StyleSheetTable.cxx
index 6fb1b60c6d91..51bb40ddbc8c 100644
--- a/sw/source/writerfilter/dmapper/StyleSheetTable.cxx
+++ b/sw/source/writerfilter/dmapper/StyleSheetTable.cxx
@@ -53,6 +53,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 using namespace ::com::sun::star;
@@ -1153,11 +1154,12 @@ void StyleSheetTable::ApplyStyleSheetsImpl(const 
FontTablePtr& rFontTable, std::
 else
 {
 bInsert = true;
-xStyle.set(m_pImpl->m_xTextDocument->createInstance(
- bParaStyle ?
-getPropertyName( 
PROP_SERVICE_PARA_STYLE ) :
-(bListStyle ? 
OUString("com.sun.star.style.NumberingStyle") : getPropertyName( 
PROP_SERVICE_CHAR_STYLE ))),
-   uno::UNO_QUERY_THROW);
+if (bParaStyle)
+xStyle = 
m_pImpl->m_xTextDocument->createParagraphStyle();
+else if (bListStyle)
+xStyle = 
m_pImpl->m_xTextDocument->createNumberingStyle();
+else
+xStyle = 
m_pImpl->m_xTextDocument->createCharacterStyle();
 
 // Numbering styles have to be inserted early, as e.g. 
the NumberingRules property is only available after insertion.
 if (bListStyle)
@@ -1799,21 +1801,19 @@ OUString StyleSheetTable::getOrCreateCharStyle( 
PropertyValueVector_t& rCharProp
 throw uno::RuntimeException();
 try
 {
-uno::Reference< style::XStyle > xStyle( 
m_pImpl->m_xTextDocument->createInstance(
-getPropertyName( PROP_SERVICE_CHAR_STYLE )), uno::UNO_QUERY_THROW);
-uno::Reference< beans::XPropertySet > xStyleProps(xStyle, 
uno::UNO_QUERY_THROW );
+rtl::Reference< SwXStyle > xStyle = 
m_pImpl->m_xTextDocument->createCharacterStyle();
 for( const auto& rCharProp : rCharProperties)
 {
 try
 {
-xStyleProps->setPropertyValue( rCharProp.Name, rCharProp.Value 
);
+xStyle->setPropertyValue( rCharProp.Name, rCharProp.Value );
 }
 catch( const uno::Exception& )
 {
 TOOLS_WARN_EXCEPTION( "writerfilter", 
"StyleSheetTable::getOrCreateCharStyle - Style::setPropertyValue");
 }
 }
-xCharStyles->insertByName( sListLabel, uno::Any( xStyle) );
+xCharStyles->insertByName( sListLabel, uno::Any