core.git: sw/source

2024-06-10 Thread Noel Grandin (via logerrit)
 sw/source/core/doc/docbm.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 5fe53e6b2e951f2f8f834386827bf96610d6acb6
Author: Noel Grandin 
AuthorDate: Mon Jun 10 15:19:49 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon Jun 10 18:39:41 2024 +0200

tdf#144208 speedup doc with lots of redline(4)

exit early in DelBookmarks if the redlines are not in the range we need
to fix

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

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 6f8a091f6741..aef420965ec7 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -2100,6 +2100,8 @@ void DelBookmarks(
 pREnd->AssignEndIndex( *pCNd );
 }
 }
+if( lcl_Lower( *pREnd, rStt, oStartContentIdx ) )
+break;
 }
 }
 


core.git: sw/source

2024-06-10 Thread Noel Grandin (via logerrit)
 sw/source/uibase/app/apphdl.cxx|8 
 sw/source/uibase/app/applab.cxx|4 
 sw/source/uibase/app/docsh.cxx |6 
 sw/source/uibase/app/docsh2.cxx|   34 +-
 sw/source/uibase/app/docshini.cxx  |2 
 sw/source/uibase/app/docst.cxx |   34 +-
 sw/source/uibase/app/swdll.cxx |6 
 sw/source/uibase/app/swmodul1.cxx  |4 
 sw/source/uibase/app/swmodule.cxx  |4 
 sw/source/uibase/config/StoredChapterNumbering.cxx |   10 
 sw/source/uibase/config/barcfg.cxx |2 
 sw/source/uibase/config/caption.cxx|4 
 sw/source/uibase/config/dbconfig.cxx   |   14 
 sw/source/uibase/config/fontcfg.cxx|   62 +--
 sw/source/uibase/config/modcfg.cxx |  268 -
 sw/source/uibase/config/prtopt.cxx |2 
 sw/source/uibase/config/usrpref.cxx|   12 
 sw/source/uibase/config/viewopt.cxx|8 
 sw/source/uibase/dbui/dbmgr.cxx|   80 ++---
 sw/source/uibase/dbui/dbui.cxx |   26 -
 sw/source/uibase/dbui/mailmergehelper.cxx  |4 
 sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx |   20 -
 sw/source/uibase/dbui/mmconfigitem.cxx |  104 +++---
 sw/source/uibase/dialog/watermarkdialog.cxx|   22 -
 sw/source/uibase/dochdl/gloshdl.cxx|2 
 sw/source/uibase/dochdl/swdtflvr.cxx   |   18 -
 sw/source/uibase/docvw/AnnotationMenuButton.cxx|   36 +-
 sw/source/uibase/docvw/AnnotationWin.cxx   |   10 
 sw/source/uibase/docvw/AnnotationWin2.cxx  |   24 -
 sw/source/uibase/docvw/HeaderFooterWin.cxx |   16 -
 sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx |7 
 sw/source/uibase/docvw/PageBreakWin.cxx|   10 
 sw/source/uibase/docvw/UnfloatTableButton.cxx  |8 
 sw/source/uibase/docvw/contentcontrolaliasbutton.cxx   |7 
 sw/source/uibase/docvw/edtwin.cxx  |4 
 sw/source/uibase/docvw/edtwin2.cxx |4 
 sw/source/uibase/docvw/romenu.cxx  |2 
 sw/source/uibase/docvw/srcedtw.cxx |2 
 sw/source/uibase/envelp/envimg.cxx |2 
 sw/source/uibase/envelp/labelcfg.cxx   |8 
 sw/source/uibase/envelp/labimg.cxx |2 
 sw/source/uibase/envelp/syncbtn.cxx|4 
 sw/source/uibase/fldui/xfldui.cxx  |2 
 sw/source/uibase/globdoc/globdoc.cxx   |2 
 sw/source/uibase/inc/inputwin.hxx  |8 
 sw/source/uibase/lingu/olmenu.cxx  |   66 ++--
 sw/source/uibase/misc/glosdoc.cxx  |4 
 sw/source/uibase/misc/redlndlg.cxx |   16 -
 sw/source/uibase/ribbar/inputwin.cxx   |4 
 sw/source/uibase/ribbar/workctrl.cxx   |   28 -
 sw/source/uibase/table/chartins.cxx|6 
 sw/source/uibase/table/tablemgr.cxx|8 
 sw/source/uibase/uitest/uiobject.cxx   |   70 ++--
 sw/source/uibase/web/wdocsh.cxx|2 
 sw/source/uibase/web/wformsh.cxx   |2 
 sw/source/uibase/web/wfrmsh.cxx|2 
 sw/source/uibase/web/wgrfsh.cxx|4 
 sw/source/uibase/web/wlistsh.cxx   |2 
 sw/source/uibase/web/wolesh.cxx|4 
 sw/source/uibase/web/wtabsh.cxx|4 
 sw/source/uibase/web/wtextsh.cxx   |2 
 sw/source/uibase/wrtsh/select.cxx  |8 
 sw/source/uibase/wrtsh/wrtsh1.cxx  |   24 -
 sw/source/uibase/wrtsh/wrtsh2.cxx  |   92 ++---
 sw/source/uibase/wrtsh/wrtsh3.cxx  |8 
 65 files changed, 638 insertions(+), 636 deletions(-)

New commits:
commit 18ef391582e1f8db5838dfc1aaff36f78ce51447
Author: Noel Grandin 
AuthorDate: Mon Jun 10 10:36:45 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon Jun 10 12:15:17 2024 +0200

loplugin:ostr in sw/../uibase

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

diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 28c766b3d3b1..9e5ada1b0101 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -309,7 +309,7 @@ SwView* lcl_LoadDoc(SwView* pView, const OUString& rURL)
 if(!rURL.isE

core.git: sw/qa

2024-06-10 Thread Noel Grandin (via logerrit)
/ww8export/ww8export2.cxx  |  516 +++---
 sw/qa/extras/ww8export/ww8export3.cxx  |  510 ++---
 sw/qa/extras/ww8export/ww8export4.cxx  |   64 
 sw/qa/extras/ww8import/ww8import.cxx   |   14 
 77 files changed, 15145 insertions(+), 14804 deletions(-)

New commits:
commit 3c41e714497fdb13cdcbc4d6ba31887d4aaa4b61
Author: Noel Grandin 
AuthorDate: Mon Jun 10 08:57:37 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon Jun 10 10:35:00 2024 +0200

loplugin:ostr in sw/qa/extras

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

diff --git a/sw/qa/extras/accessibility/accessible_relation_set.cxx 
b/sw/qa/extras/accessibility/accessible_relation_set.cxx
index d23b5432af10..020c9256b92a 100644
--- a/sw/qa/extras/accessibility/accessible_relation_set.cxx
+++ b/sw/qa/extras/accessibility/accessible_relation_set.cxx
@@ -44,7 +44,7 @@ class AccessibleRelationSet : public UnoApiTest
 {
 public:
 AccessibleRelationSet()
-: UnoApiTest("")
+: UnoApiTest(u""_ustr)
 {
 }
 
@@ -62,7 +62,8 @@ void 
AccessibleRelationSet::init(uno::Reference
  
uno::Reference& para2,
  
uno::Reference& para3)
 {
-mxComponent = loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
+mxComponent
+= loadFromDesktop(u"private:factory/swriter"_ustr, 
u"com.sun.star.text.TextDocument"_ustr);
 uno::Reference xTextDoc(mxComponent, uno::UNO_QUERY);
 
 css::uno::Reference oText(xTextDoc->getText(), 
uno::UNO_SET_THROW);
diff --git a/sw/qa/extras/accessibility/basics.cxx 
b/sw/qa/extras/accessibility/basics.cxx
index 6bdd992c22d0..a6006480c84e 100644
--- a/sw/qa/extras/accessibility/basics.cxx
+++ b/sw/qa/extras/accessibility/basics.cxx
@@ -24,15 +24,15 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, 
TestBasicStructure)
 
 dumpA11YTree(xContext);
 CPPUNIT_ASSERT_EQUAL(
-
rtl::OUString("String1"
-  ""
-  ""
-  "String2"
-  ""
-  ""
-  ""
-  "Frame1"
-  "Frame2"),
+u"String1"
+""
+""
+"String2"
+""
+""
+""
+"Frame1"
+"Frame2"_ustr,
 collectText(xContext));
 }
 
@@ -49,7 +49,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, 
TestTypeSimple)
 documentPostKeyEvent(LOK_KEYEVENT_KEYINPUT, 'o', 0);
 Scheduler::ProcessEventsToIdle();
 
-CPPUNIT_ASSERT_EQUAL(rtl::OUString("hello"), 
collectText(xContext));
+CPPUNIT_ASSERT_EQUAL(u"hello"_ustr, 
collectText(xContext));
 }
 
 CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, TestTypeMultiPara)
@@ -66,7 +66,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, 
TestTypeMultiPara)
 Scheduler::ProcessEventsToIdle();
 
 CPPUNIT_ASSERT_EQUAL(
-
rtl::OUString("ABC"),
+
u"ABC"_ustr,
 collectText(xContext));
 }
 
@@ -74,7 +74,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, 
TestMenuInsertPageNumber)
 {
 load(u"private:factory/swriter"_ustr);
 CPPUNIT_ASSERT(activateMenuItem(u"Insert", u"Field", u"Page Number"));
-CPPUNIT_ASSERT_EQUAL(rtl::OUString("1"), 
collectText());
+CPPUNIT_ASSERT_EQUAL(u"1"_ustr, collectText());
 }
 
 CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, TestMenuInsertPageBreak)
@@ -87,8 +87,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, 
TestMenuInsertPageBreak)
 documentPostKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::DOWN);
 CPPUNIT_ASSERT(activateMenuItem(u"Insert", u"Field", u"Page Number"));
 
-
CPPUNIT_ASSERT_EQUAL(rtl::OUString("12"),
- collectText());
+
CPPUNIT_ASSERT_EQUAL(u"12"_ustr, 
collectText());
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/extras/accessibility/dialogs.cxx 
b/sw/qa/extras/accessibility/dialogs.cxx
index 2e047fdf9d72..451b90ce1206 100644
--- a/sw/qa/extras/accessibility/dialogs.cxx
+++ b/sw/qa/extras/accessibility/dialogs.cxx
@@ -109,8 +109,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, 
BasicTestHyperlinkDialog)
 CPPUNIT_ASSERT(activateMenuItem(u"Insert", u"Hyperlink..."));
 CPPUNIT_ASSERT(dialogWaiter->waitEndDialog());
 
-
CPPUNIT_ASSERT_EQUAL(rtl::OUString("https://libreoffice.org/"),
- collectTex

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

2024-06-06 Thread Noel Grandin (via logerrit)
 sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx |   32 
 sw/qa/core/attr/attr.cxx |8 
 sw/qa/core/crsr/crsr.cxx |   32 
 sw/qa/core/doc/doc.cxx   |   80 -
 sw/qa/core/docnode/docnode.cxx   |   14 
 sw/qa/core/draw/draw.cxx |8 
 sw/qa/core/edit/edit.cxx |2 
 sw/qa/core/fields/fields.cxx |  134 +--
 sw/qa/core/filters-test.cxx  |   30 
 sw/qa/core/frmedt/frmedt.cxx |   28 
 sw/qa/core/header_footer/HeaderFooterTest.cxx|  629 +++
 sw/qa/core/layout/calcmove.cxx   |2 
 sw/qa/core/layout/fly.cxx|2 
 sw/qa/core/layout/flycnt.cxx |   40 
 sw/qa/core/layout/frmtool.cxx|2 
 sw/qa/core/layout/ftnfrm.cxx |2 
 sw/qa/core/layout/layact.cxx |8 
 sw/qa/core/layout/layout.cxx |  109 +-
 sw/qa/core/layout/paintfrm.cxx   |2 
 sw/qa/core/layout/sortedobjs.cxx |2 
 sw/qa/core/layout/tabfrm.cxx |2 
 sw/qa/core/layout/trvlfrm.cxx|2 
 sw/qa/core/macros-test.cxx   |  152 +--
 sw/qa/core/objectpositioning/objectpositioning.cxx   |   77 +
 sw/qa/core/test_ToxMiscTest.cxx  |   14 
 sw/qa/core/test_ToxTextGenerator.cxx |   14 
 sw/qa/core/test_ToxWhitespaceStripper.cxx|   12 
 sw/qa/core/text/frmform.cxx  |6 
 sw/qa/core/text/itratr.cxx   |2 
 sw/qa/core/text/itrform2.cxx |8 
 sw/qa/core/text/porlay.cxx   |2 
 sw/qa/core/text/porrst.cxx   |2 
 sw/qa/core/text/text.cxx |  339 
 sw/qa/core/text/widorp.cxx   |2 
 sw/qa/core/theme/ThemeTest.cxx   |   10 
 sw/qa/core/tox/tox.cxx   |   94 +-
 sw/qa/core/txtnode/txtnode.cxx   |   26 
 sw/qa/core/undo/undo.cxx |   19 
 sw/qa/core/unocore/unocore.cxx   |  391 -
 sw/qa/core/uwriter.cxx   |  160 +--
 sw/qa/core/view/view.cxx |2 
 sw/source/uibase/utlui/bookctrl.cxx  |4 
 sw/source/uibase/utlui/content.cxx   |  122 +-
 sw/source/uibase/utlui/glbltree.cxx  |   50 -
 sw/source/uibase/utlui/gloslst.cxx   |6 
 sw/source/uibase/utlui/navicfg.cxx   |   48 -
 sw/source/uibase/utlui/navipi.cxx|   78 -
 sw/source/uibase/utlui/numfmtlb.cxx  |4 
 sw/source/uibase/utlui/tmplctrl.cxx  |4 
 sw/source/uibase/utlui/uitool.cxx|   18 
 sw/source/uibase/utlui/unotools.cxx  |   16 
 sw/source/uibase/utlui/viewlayoutctrl.cxx|2 
 52 files changed, 1440 insertions(+), 1414 deletions(-)

New commits:
commit e7a7df094ebe8c1a1205c64a410df893c3acf652
Author: Noel Grandin 
AuthorDate: Thu Jun 6 09:26:17 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 6 19:14:55 2024 +0200

loplugin:ostr in sw/../utlui

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

diff --git a/sw/source/uibase/utlui/bookctrl.cxx 
b/sw/source/uibase/utlui/bookctrl.cxx
index e79821022abc..04c16b105f24 100644
--- a/sw/source/uibase/utlui/bookctrl.cxx
+++ b/sw/source/uibase/utlui/bookctrl.cxx
@@ -79,8 +79,8 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt )
 if (!pViewFrm)
 return;
 
-std::unique_ptr 
xBuilder(Application::CreateBuilder(nullptr, 
"modules/swriter/ui/bookmarkmenu.ui"));
-std::unique_ptr xPopup(xBuilder->weld_menu("menu"));
+std::unique_ptr 
xBuilder(Application::CreateBuilder(nullptr, 
u"modules/swriter/ui/bookmarkmenu.ui"_ustr));
+std::unique_ptr xPopup(xBuilder->weld_menu(u"menu"_ustr));
 
 IDocumentMarkAccess* const pMarkAccess = 
pWrtShell->getIDocumentMarkAccess();
 IDocumentMarkAccess::const_iterator_t ppBookmarkStart = 
pMarkAccess->getBookmarksBegin();
diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 5be9e50e753b..a43b75de6477 100644

core.git: i18nlangtag/source

2024-06-06 Thread Noel Grandin (via logerrit)
 i18nlangtag/source/isolang/mslangid.cxx |  134 +++-
 1 file changed, 65 insertions(+), 69 deletions(-)

New commits:
commit d6b9ce4b5bd839868642086dc86262204312ac2d
Author: Noel Grandin 
AuthorDate: Fri May 17 09:01:36 2024 +0200
Commit: Caolán McNamara 
CommitDate: Thu Jun 6 13:05:46 2024 +0200

cool#8570 try to reduce CPU spent in MsLangId::getScriptType

for some reason the optimiser does not like the o3tl::anyOf template
method and does not inline it nicely.

Change-Id: Iab504989185c05caaefae3df34e85b8898c6f0c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167761
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168491
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/i18nlangtag/source/isolang/mslangid.cxx 
b/i18nlangtag/source/isolang/mslangid.cxx
index a989fbed75f4..4e0a5584a28d 100644
--- a/i18nlangtag/source/isolang/mslangid.cxx
+++ b/i18nlangtag/source/isolang/mslangid.cxx
@@ -374,87 +374,83 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang )
 sal_Int16 nScript;
 
 // CTL
-if( nLang.anyOf(
- LANGUAGE_MONGOLIAN_MONGOLIAN_MONGOLIA,
- LANGUAGE_MONGOLIAN_MONGOLIAN_CHINA,
- LANGUAGE_MONGOLIAN_MONGOLIAN_LSO,
- LANGUAGE_USER_KURDISH_IRAN,
- LANGUAGE_OBSOLETE_USER_KURDISH_IRAQ,
- LANGUAGE_KURDISH_ARABIC_IRAQ,
- LANGUAGE_KURDISH_ARABIC_LSO,
- LANGUAGE_USER_KURDISH_SOUTHERN_IRAN,
- LANGUAGE_USER_KURDISH_SOUTHERN_IRAQ,
- LANGUAGE_USER_KYRGYZ_CHINA,
- LANGUAGE_USER_HUNGARIAN_ROVAS,
- LANGUAGE_USER_MANCHU,
- LANGUAGE_USER_XIBE,
- LANGUAGE_USER_MALAY_ARABIC_MALAYSIA,
- LANGUAGE_USER_MALAY_ARABIC_BRUNEI,
- LANGUAGE_USER_ROHINGYA_HANIFI,
- LANGUAGE_USER_PALI_THAI))
+if( nLang == LANGUAGE_MONGOLIAN_MONGOLIAN_MONGOLIA
+|| nLang == LANGUAGE_MONGOLIAN_MONGOLIAN_CHINA
+|| nLang == LANGUAGE_MONGOLIAN_MONGOLIAN_LSO
+|| nLang == LANGUAGE_USER_KURDISH_IRAN
+|| nLang == LANGUAGE_OBSOLETE_USER_KURDISH_IRAQ
+|| nLang == LANGUAGE_KURDISH_ARABIC_IRAQ
+|| nLang == LANGUAGE_KURDISH_ARABIC_LSO
+|| nLang == LANGUAGE_USER_KURDISH_SOUTHERN_IRAN
+|| nLang == LANGUAGE_USER_KURDISH_SOUTHERN_IRAQ
+|| nLang == LANGUAGE_USER_KYRGYZ_CHINA
+|| nLang == LANGUAGE_USER_HUNGARIAN_ROVAS
+|| nLang == LANGUAGE_USER_MANCHU
+|| nLang == LANGUAGE_USER_XIBE
+|| nLang == LANGUAGE_USER_MALAY_ARABIC_MALAYSIA
+|| nLang == LANGUAGE_USER_MALAY_ARABIC_BRUNEI
+|| nLang == LANGUAGE_USER_ROHINGYA_HANIFI
+|| nLang == LANGUAGE_USER_PALI_THAI)
 {
 nScript = css::i18n::ScriptType::COMPLEX;
 }
 // "Western"
-else if (nLang.anyOf(
-LANGUAGE_MONGOLIAN_CYRILLIC_MONGOLIA,
-LANGUAGE_MONGOLIAN_CYRILLIC_LSO,
-LANGUAGE_USER_KURDISH_SYRIA,
-LANGUAGE_USER_KURDISH_TURKEY))
+else if ( nLang == LANGUAGE_MONGOLIAN_CYRILLIC_MONGOLIA
+|| nLang == LANGUAGE_MONGOLIAN_CYRILLIC_LSO
+|| nLang == LANGUAGE_USER_KURDISH_SYRIA
+|| nLang == LANGUAGE_USER_KURDISH_TURKEY)
 {
 nScript = css::i18n::ScriptType::LATIN;
 }
 // CJK catcher
-else if ( primary(nLang).anyOf(
-primary(LANGUAGE_CHINESE  ),
-primary(LANGUAGE_YUE_CHINESE_HONGKONG ),
-primary(LANGUAGE_JAPANESE ),
-primary(LANGUAGE_KOREAN   )
-))
+else if ( primary(nLang) == primary(LANGUAGE_CHINESE  )
+|| primary(nLang) == primary(LANGUAGE_YUE_CHINESE_HONGKONG )
+|| primary(nLang) == primary(LANGUAGE_JAPANESE )
+|| primary(nLang) == primary(LANGUAGE_KOREAN   )
+)
 {
 nScript = css::i18n::ScriptType::ASIAN;
 }
 // CTL catcher
-else if (primary(nLang).anyOf(
-primary(LANGUAGE_AMHARIC_ETHIOPIA),
-primary(LANGUAGE_ARABIC_SAUDI_ARABIA ),
-primary(LANGUAGE_ASSAMESE),
-primary(LANGUAGE_BENGALI ),
-primary(LANGUAGE_BURMESE ),
-primary(LANGUAGE_DHIVEHI ),
-primary(LANGUAGE_FARSI   ),
-primary(LANGUAGE_GUJARATI),
-primary(LANGUAGE_HEBREW  ),
-primary(LANGUAGE_HINDI   ),
-primary(LANGUAGE_KANNADA ),
-primary(LANGUAGE_KASHMIRI),
-primary(LANGUAGE_KHMER   ),
-primary(LANGUAGE_KONKANI ),
-primary(LANGUAGE_LAO ),
-primary(LANGUAGE_MALAYALAM   ),
-primary(LANGUAGE_MANIPURI),
-primary(LANGUAGE_MARATHI ),
-primary(LANGU

core.git: tools/source

2024-06-06 Thread Noel Grandin (via logerrit)
 tools/source/generic/poly.cxx |   31 +--
 1 file changed, 5 insertions(+), 26 deletions(-)

New commits:
commit 039a18ff147be304966caf529e6f14ad4996a3e0
Author: Noel Grandin 
AuthorDate: Wed Jun 5 14:23:02 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 6 08:26:10 2024 +0200

compute these using floating point

which means we can avoid the checked_multiply complexity

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

diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index b6b00bc2ca34..fc09038bca7e 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -172,20 +172,10 @@ ImplPolygon::ImplPolygon( const Point& rCenter, 
tools::Long nRadX, tools::Long n
 {
 if( nRadX && nRadY )
 {
-sal_uInt16 nPoints;
 // Compute default (depends on size)
-tools::Long nRadXY;
-const bool bOverflow = o3tl::checked_multiply(nRadX, nRadY, nRadXY);
-if (!bOverflow)
-{
-nPoints = std::clamp(
-( M_PI * ( 1.5 * ( nRadX + nRadY ) - sqrt( std::fabs(nRadXY) ) 
) ),
-32.0, 256.0 );
-}
-else
-{
-   nPoints = 256;
-}
+sal_uInt16 nPoints = std::clamp(
+( M_PI * ( 1.5 * ( nRadX + nRadY ) - sqrt( std::fabs(double(nRadX) 
* nRadY) ) ) ),
+32.0, 256.0 );
 
 if( ( nRadX > 32 ) && ( nRadY > 32 ) && ( nRadX + nRadY ) < 8192 )
 nPoints >>= 1;
@@ -237,20 +227,9 @@ ImplPolygon::ImplPolygon(const tools::Rectangle& rBound, 
const Point& rStart, co
 const auto aBoundTop = rBound.Top() < aCenter.Y() ? rBound.Top() : 
rBound.Bottom();
 const auto nRadX = o3tl::saturating_sub(aCenter.X(), aBoundLeft);
 const auto nRadY = o3tl::saturating_sub(aCenter.Y(), aBoundTop);
-sal_uInt16 nPoints;
-
-tools::Long nRadXY;
-const bool bOverflow = o3tl::checked_multiply(nRadX, nRadY, nRadXY);
-if (!bOverflow)
-{
-nPoints = std::clamp(
-( M_PI * ( 1.5 * ( nRadX + nRadY ) - sqrt( std::fabs(nRadXY) ) 
) ),
+sal_uInt16 nPoints = std::clamp(
+( M_PI * ( 1.5 * ( nRadX + nRadY ) - sqrt( 
std::fabs(double(nRadX) * nRadY) ) ) ),
 32.0, 256.0 );
-}
-else
-{
-nPoints = 256;
-}
 
 
 if (nRadX > 32 && nRadY > 32 && o3tl::saturating_add(nRadX, nRadY) < 
8192)


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

2024-06-05 Thread Noel Grandin (via logerrit)
 sw/source/uibase/uiview/pview.cxx|   10 
 sw/source/uibase/uiview/srcview.cxx  |   24 ++--
 sw/source/uibase/uiview/view.cxx |   42 +--
 sw/source/uibase/uiview/view0.cxx|4 +--
 sw/source/uibase/uiview/view2.cxx|   34 ++--
 sw/source/uibase/uiview/viewdlg2.cxx |2 -
 sw/source/uibase/uiview/viewling.cxx |   18 +++
 sw/source/uibase/uiview/viewprt.cxx  |4 +--
 sw/source/uibase/uiview/viewstat.cxx |2 -
 xmloff/source/text/txtparai.cxx  |3 ++
 10 files changed, 73 insertions(+), 70 deletions(-)

New commits:
commit 78eb0a3c67ba2285f3737a584a133536beee3b17
Author: Noel Grandin 
AuthorDate: Wed Jun 5 10:19:03 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 5 19:35:11 2024 +0200

loplugin:ostr in sw/.../uiview

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

diff --git a/sw/source/uibase/uiview/pview.cxx 
b/sw/source/uibase/uiview/pview.cxx
index 833d2de7e6c0..60d536bec43a 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -84,7 +84,7 @@ SFX_IMPL_INTERFACE(SwPagePreview, SfxViewShell)
 
 void SwPagePreview::InitInterface_Impl()
 {
-GetStaticInterface()->RegisterPopupMenu("preview");
+GetStaticInterface()->RegisterPopupMenu(u"preview"_ustr);
 GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
 
SfxVisibilityFlags::Standard|SfxVisibilityFlags::Client|SfxVisibilityFlags::FullScreen|SfxVisibilityFlags::ReadonlyDoc,
 ToolbarId::PView_Toolbox);
@@ -143,10 +143,10 @@ class SwPreviewZoomDlg : public 
weld::GenericDialogController
 
 public:
 SwPreviewZoomDlg(SwPagePreviewWin& rParent)
-: GenericDialogController(rParent.GetFrameWeld(), 
"modules/swriter/ui/previewzoomdialog.ui", "PreviewZoomDialog")
+: GenericDialogController(rParent.GetFrameWeld(), 
u"modules/swriter/ui/previewzoomdialog.ui"_ustr, u"PreviewZoomDialog"_ustr)
 , m_rParent(rParent)
-, m_xRowEdit(m_xBuilder->weld_spin_button("rows"))
-, m_xColEdit(m_xBuilder->weld_spin_button("cols"))
+, m_xRowEdit(m_xBuilder->weld_spin_button(u"rows"_ustr))
+, m_xColEdit(m_xBuilder->weld_spin_button(u"cols"_ustr))
 {
 m_xRowEdit->set_value(rParent.GetRow());
 m_xColEdit->set_value(rParent.GetCol());
@@ -1152,7 +1152,7 @@ SwPagePreview::SwPagePreview(SfxViewFrame& rViewFrame, 
SfxViewShell* pOldSh):
 mbResetFormDesignMode( false ),
 mbFormDesignModeToReset( false )
 {
-SetName("PageView");
+SetName(u"PageView"_ustr);
 SetWindow( m_pViewWin );
 CreateScrollbar( true );
 CreateScrollbar( false );
diff --git a/sw/source/uibase/uiview/srcview.cxx 
b/sw/source/uibase/uiview/srcview.cxx
index 713e13b5791a..173689bc3bd9 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -96,7 +96,7 @@ SFX_IMPL_SUPERCLASS_INTERFACE(SwSrcView, SfxViewShell)
 
 void SwSrcView::InitInterface_Impl()
 {
-GetStaticInterface()->RegisterPopupMenu("source");
+GetStaticInterface()->RegisterPopupMenu(u"source"_ustr);
 
 GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS,
 
SfxVisibilityFlags::Standard|SfxVisibilityFlags::Server,
@@ -226,7 +226,7 @@ void SwSrcView::SaveContentTo(SfxMedium& rMed)
 
 void SwSrcView::Init()
 {
-SetName("Source");
+SetName(u"Source"_ustr);
 SetWindow( m_aEditWin.get() );
 SwDocShell* pDocShell = GetDocShell();
 // If the doc is still loading, then the DocShell must fire up
@@ -274,7 +274,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
 // search for an html filter for export
 SfxFilterContainer* pFilterCont = 
GetObjectShell()->GetFactory().GetFilterContainer();
 std::shared_ptr pFilter =
-pFilterCont->GetFilter4Extension( "html", 
SfxFilterFlags::EXPORT );
+pFilterCont->GetFilter4Extension( u"html"_ustr, 
SfxFilterFlags::EXPORT );
 if ( pFilter )
 {
 // filter found -> use its uiname and wildcard
@@ -286,8 +286,8 @@ void SwSrcView::Execute(SfxRequest& rReq)
 else
 {
 // filter not found
-OUString sHtml("HTML");
-xFP->appendFilter( sHtml, "*.html;*.htm" );
+OUString sHtml(u"HTML"_ustr);
+xFP->appendFilter( sHtml, u"*.html;*.htm"_

core.git: sw/source

2024-06-05 Thread Noel Grandin (via logerrit)
 sw/source/uibase/uno/SwXDocumentSettings.cxx |   82 +++
 sw/source/uibase/uno/SwXFilterOptions.cxx|8 -
 sw/source/uibase/uno/loktxdoc.cxx|   24 ++--
 sw/source/uibase/uno/unoatxt.cxx |   20 +--
 sw/source/uibase/uno/unodispatch.cxx |2 
 sw/source/uibase/uno/unomailmerge.cxx|   42 +++
 sw/source/uibase/uno/unomod.cxx  |  146 +--
 sw/source/uibase/uno/unomodule.cxx   |4 
 sw/source/uibase/uno/unotxdoc.cxx|  102 +-
 sw/source/uibase/uno/unotxvw.cxx |   58 +-
 10 files changed, 244 insertions(+), 244 deletions(-)

New commits:
commit 309768c2f54ce0ff5fa4b3409996733afa96bc02
Author: Noel Grandin 
AuthorDate: Wed Jun 5 10:19:27 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 5 13:19:40 2024 +0200

loplugin:ostr in sw/.../uno

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

diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx 
b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index b46c9c4316ed..e932610066c7 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -170,45 +170,45 @@ static rtl::Reference 
lcl_createSettingsInfo()
 {
 static PropertyInfo const aWriterSettingsInfoMap[] =
 {
-{ OUString("ForbiddenCharacters"),HANDLE_FORBIDDEN_CHARS,  
   cppu::UnoType::get(),  0},
-{ OUString("LinkUpdateMode"), HANDLE_LINK_UPDATE_MODE, 
   cppu::UnoType::get(), 0},
-{ OUString("FieldAutoUpdate"),HANDLE_FIELD_AUTO_UPDATE,
   cppu::UnoType::get(),   0},
-{ OUString("ChartAutoUpdate"),HANDLE_CHART_AUTO_UPDATE,
   cppu::UnoType::get(),   0},
-{ OUString("AddParaTableSpacing"),
HANDLE_ADD_PARA_TABLE_SPACING,  cppu::UnoType::get(),   
0},
-{ OUString("AddParaTableSpacingAtStart"), 
HANDLE_ADD_PARA_TABLE_SPACING_AT_START, cppu::UnoType::get(),   
0},
-{ OUString("AlignTabStopPosition"),   
HANDLE_ALIGN_TAB_STOP_POSITION, cppu::UnoType::get(),   
0},
-{ OUString("PrinterName"),HANDLE_PRINTER_NAME, 
   cppu::UnoType::get(),  0},
-{ OUString("PrinterSetup"),   HANDLE_PRINTER_SETUP,
   cppu::UnoType< cppu::UnoSequenceType >::get(),   
0},
-{ OUString("PrinterPaperFromSetup"),  HANDLE_PRINTER_PAPER,
   cppu::UnoType::get(),   0},
-{ OUString("IsKernAsianPunctuation"), 
HANDLE_IS_KERN_ASIAN_PUNCTUATION,   cppu::UnoType::get(),   
0},
-{ OUString("CharacterCompressionType"),   
HANDLE_CHARACTER_COMPRESSION_TYPE,  cppu::UnoType::get(),
 0},
-{ OUString("ApplyUserData"),  HANDLE_APPLY_USER_DATA,  
   cppu::UnoType::get(),   0 },
-{ OUString("SaveThumbnail"),  HANDLE_SAVE_THUMBNAIL,   
   cppu::UnoType::get(),   0 },
-{ OUString("SaveGlobalDocumentLinks"),
HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS,  cppu::UnoType::get(),   
0},
-{ OUString("CurrentDatabaseDataSource"),  
HANDLE_CURRENT_DATABASE_DATA_SOURCE,cppu::UnoType::get(), 
 0},
-{ OUString("CurrentDatabaseCommand"), 
HANDLE_CURRENT_DATABASE_COMMAND,cppu::UnoType::get(), 
 0},
-{ OUString("CurrentDatabaseCommandType"), 
HANDLE_CURRENT_DATABASE_COMMAND_TYPE,   cppu::UnoType::get(),
 0},
-{ OUString("EmbeddedDatabaseName"),   
HANDLE_EMBEDDED_DATABASE_NAME,  cppu::UnoType::get(), 
 0},
-{ OUString("SaveVersionOnClose"), 
HANDLE_SAVE_VERSION_ON_CLOSE,   cppu::UnoType::get(),   
0},
-{ OUString("UpdateFromTemplate"), HANDLE_UPDATE_FROM_TEMPLATE, 
   cppu::UnoType::get(),   0},
+{ u"ForbiddenCharacters"_ustr,HANDLE_FORBIDDEN_CHARS,  
   cppu::UnoType::get(),  0},
+{ u"LinkUpdateMode"_ustr, HANDLE_LINK_UPDATE_MODE, 
   cppu::UnoType::get(), 0},
+{ u"FieldAutoUpdate"_ustr,HANDLE_FIELD_AUTO_UPDATE,
   cppu::UnoType::get(),   0},
+{ u"ChartAutoUpdate"_ustr,HANDLE_CHART_AUTO_UPDATE,
   cppu::UnoType::get(),   0},
+{ u"AddParaTableSp

core.git: sw/source

2024-06-05 Thread Noel Grandin (via logerrit)
 sw/source/ui/misc/bookmark.cxx  |   31 ++-
 sw/source/ui/misc/contentcontroldlg.cxx |   47 +
 sw/source/ui/misc/contentcontrollistitemdlg.cxx |   10 +--
 sw/source/ui/misc/docfnote.cxx  |   42 +++
 sw/source/ui/misc/glosbib.cxx   |   16 +++---
 sw/source/ui/misc/glossary.cxx  |   62 +++
 sw/source/ui/misc/insfnote.cxx  |   22 
 sw/source/ui/misc/linenum.cxx   |   38 +++---
 sw/source/ui/misc/num.cxx   |   64 
 sw/source/ui/misc/outline.cxx   |   40 +++
 sw/source/ui/misc/pagenumberdlg.cxx |   21 ---
 sw/source/ui/misc/pgfnote.cxx   |2 
 sw/source/ui/misc/pggrid.cxx|   44 
 sw/source/ui/misc/srtdlg.cxx|   50 +-
 sw/source/ui/misc/swmodalredlineacceptdlg.cxx   |8 +--
 sw/source/ui/misc/titlepage.cxx |   30 +--
 sw/source/ui/misc/translatelangselect.cxx   |   10 +--
 17 files changed, 270 insertions(+), 267 deletions(-)

New commits:
commit a2b7dca2eb1da105fe139b3f14bb9dfaae11d549
Author: Noel Grandin 
AuthorDate: Wed Jun 5 10:18:31 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 5 13:19:05 2024 +0200

loplugin:ostr in sw/.../misc

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

diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 40cebea7ead7..6f882bad5d15 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -312,7 +312,7 @@ bool SwInsertBookmarkDlg::ValidateBookmarks()
 if (HaveBookmarksChanged())
 {
 PopulateTable();
-m_xEditBox->set_text("");
+m_xEditBox->set_text(u""_ustr);
 return false;
 }
 return true;
@@ -363,21 +363,22 @@ void SwInsertBookmarkDlg::PopulateTable()
 
 SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rS,
  OUString const* const pSelected)
-: SfxDialogController(pParent, "modules/swriter/ui/insertbookmark.ui", 
"InsertBookmarkDialog")
+: SfxDialogController(pParent, 
u"modules/swriter/ui/insertbookmark.ui"_ustr,
+  u"InsertBookmarkDialog"_ustr)
 , m_rSh(rS)
 , m_nLastBookmarksCount(0)
 , m_bSorted(false)
-, m_xEditBox(m_xBuilder->weld_entry("name"))
-, m_xInsertBtn(m_xBuilder->weld_button("insert"))
-, m_xDeleteBtn(m_xBuilder->weld_button("delete"))
-, m_xGotoBtn(m_xBuilder->weld_button("goto"))
-, m_xEditTextBtn(m_xBuilder->weld_button("edittext"))
-, m_xRenameBtn(m_xBuilder->weld_button("rename"))
-, m_xHideCB(m_xBuilder->weld_check_button("hide"))
-, m_xConditionFT(m_xBuilder->weld_label("condlabel"))
-, m_xConditionED(new ConditionEdit(m_xBuilder->weld_entry("withcond")))
-, m_xBookmarksBox(new 
BookmarkTable(m_xBuilder->weld_tree_view("bookmarks")))
-, m_xForbiddenChars(m_xBuilder->weld_label("lbForbiddenChars"))
+, m_xEditBox(m_xBuilder->weld_entry(u"name"_ustr))
+, m_xInsertBtn(m_xBuilder->weld_button(u"insert"_ustr))
+, m_xDeleteBtn(m_xBuilder->weld_button(u"delete"_ustr))
+, m_xGotoBtn(m_xBuilder->weld_button(u"goto"_ustr))
+, m_xEditTextBtn(m_xBuilder->weld_button(u"edittext"_ustr))
+, m_xRenameBtn(m_xBuilder->weld_button(u"rename"_ustr))
+, m_xHideCB(m_xBuilder->weld_check_button(u"hide"_ustr))
+, m_xConditionFT(m_xBuilder->weld_label(u"condlabel"_ustr))
+, m_xConditionED(new 
ConditionEdit(m_xBuilder->weld_entry(u"withcond"_ustr)))
+, m_xBookmarksBox(new 
BookmarkTable(m_xBuilder->weld_tree_view(u"bookmarks"_ustr)))
+, m_xForbiddenChars(m_xBuilder->weld_label(u"lbForbiddenChars"_ustr))
 {
 m_xBookmarksBox->connect_changed(LINK(this, SwInsertBookmarkDlg, 
SelectionChangedHdl));
 m_xBookmarksBox->connect_row_activated(LINK(this, SwInsertBookmarkDlg, 
DoubleClickHdl));
@@ -423,7 +424,7 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* 
pParent, SwWrtShell& rS,
 m_xConditionFT->set_sensitive(false);
 
 // restore dialog size
-SvtViewOptions aDlgOpt(EViewType::Dialog, "BookmarkDialog");
+SvtViewOptions aDlgOpt(EViewType::Dialog, u"BookmarkDialog"_ustr);
 if (aDlgOpt.Exists())
 m_xDialog->set_window_state(aDlgOpt.GetWindow

core.git: sw/source

2024-06-04 Thread Noel Grandin (via logerrit)
 sw/source/uibase/shells/annotsh.cxx|   14 +--
 sw/source/uibase/shells/basesh.cxx |   10 +++
 sw/source/uibase/shells/beziersh.cxx   |4 +--
 sw/source/uibase/shells/drawsh.cxx |6 ++--
 sw/source/uibase/shells/drformsh.cxx   |   28 +++---
 sw/source/uibase/shells/drwbassh.cxx   |2 -
 sw/source/uibase/shells/drwtxtex.cxx   |6 ++--
 sw/source/uibase/shells/drwtxtsh.cxx   |   12 -
 sw/source/uibase/shells/frmsh.cxx  |   20 +++
 sw/source/uibase/shells/grfsh.cxx  |8 +++---
 sw/source/uibase/shells/grfshex.cxx|4 +--
 sw/source/uibase/shells/langhelper.cxx |2 -
 sw/source/uibase/shells/listsh.cxx |2 -
 sw/source/uibase/shells/mediash.cxx|4 +--
 sw/source/uibase/shells/navsh.cxx  |2 -
 sw/source/uibase/shells/olesh.cxx  |4 +--
 sw/source/uibase/shells/tabsh.cxx  |4 +--
 sw/source/uibase/shells/textdrw.cxx|   12 -
 sw/source/uibase/shells/textfld.cxx|   12 -
 sw/source/uibase/shells/textsh.cxx |   20 +++
 sw/source/uibase/shells/textsh1.cxx|   42 -
 sw/source/uibase/shells/txtnum.cxx |2 -
 22 files changed, 110 insertions(+), 110 deletions(-)

New commits:
commit 87e8e79da0769fbc37a274049d31da07359713f4
Author: Noel Grandin 
AuthorDate: Tue Jun 4 09:52:34 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue Jun 4 14:34:45 2024 +0200

loplugin:ostr in sw/.../shells

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

diff --git a/sw/source/uibase/shells/annotsh.cxx 
b/sw/source/uibase/shells/annotsh.cxx
index d6f018e98ac6..a7e3afe845a0 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -117,7 +117,7 @@ void SwAnnotationShell::InitInterface_Impl()
 {
 GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, 
SfxVisibilityFlags::Invisible, ToolbarId::Text_Toolbox_Sw);
 
-GetStaticInterface()->RegisterPopupMenu("annotation");
+GetStaticInterface()->RegisterPopupMenu(u"annotation"_ustr);
 }
 
 
@@ -476,11 +476,11 @@ void SwAnnotationShell::Exec( SfxRequest  )
 VclPtr 
pDlg(pFact->CreateSwCharDlg(m_rView.GetFrameWeld(), m_rView, aDlgAttr, 
SwCharDlgMode::Ann));
 if (nSlot == SID_CHAR_DLG_EFFECT)
 {
-pDlg->SetCurPageId("fonteffects");
+pDlg->SetCurPageId(u"fonteffects"_ustr);
 }
 if (nSlot == SID_CHAR_DLG_POSITION)
 {
-pDlg->SetCurPageId("position");
+pDlg->SetCurPageId(u"position"_ustr);
 }
 else if (pItem)
 {
@@ -1327,7 +1327,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest )
 {
 Reference< ui::dialogs::XExecutableDialog > xDialog(
 xMCF->createInstanceWithContext(
-
"com.sun.star.linguistic2.ChineseTranslationDialog", xContext),
+
u"com.sun.star.linguistic2.ChineseTranslationDialog"_ustr, xContext),
 UNO_QUERY);
 Reference< lang::XInitialization > xInit( xDialog, 
UNO_QUERY );
 if( xInit.is() )
@@ -1352,9 +1352,9 @@ void SwAnnotationShell::ExecLingu(SfxRequest )
 {
 try
 {
-xProp->getPropertyValue( 
"IsDirectionToSimplified" ) >>= bToSimplified;
-xProp->getPropertyValue( 
"IsUseCharacterVariants" ) >>= bUseVariants;
-xProp->getPropertyValue( 
"IsTranslateCommonTerms" ) >>= bCommonTerms;
+xProp->getPropertyValue( 
u"IsDirectionToSimplified"_ustr ) >>= bToSimplified;
+xProp->getPropertyValue( 
u"IsUseCharacterVariants"_ustr ) >>= bUseVariants;
+xProp->getPropertyValue( 
u"IsTranslateCommonTerms"_ustr ) >>= bCommonTerms;
 }
 catch (const Exception&)
 {
diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index cf36bcd7e076..3b7e66f6c465 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -834,10 +834,10 @@ bool Updat

core.git: sw/source

2024-06-03 Thread Noel Grandin (via logerrit)
 sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx |   57 +-
 sw/source/uibase/sidebar/PageColumnControl.cxx|   24 +++
 sw/source/uibase/sidebar/PageColumnPopup.cxx  |4 -
 sw/source/uibase/sidebar/PageFooterPanel.cxx  |   14 ++--
 sw/source/uibase/sidebar/PageFormatPanel.cxx  |   16 ++---
 sw/source/uibase/sidebar/PageHeaderPanel.cxx  |   16 ++---
 sw/source/uibase/sidebar/PageMarginControl.cxx|   44 ++---
 sw/source/uibase/sidebar/PageMarginPopup.cxx  |4 -
 sw/source/uibase/sidebar/PageOrientationControl.cxx   |8 +-
 sw/source/uibase/sidebar/PageOrientationPopup.cxx |4 -
 sw/source/uibase/sidebar/PageSizeControl.cxx  |8 +-
 sw/source/uibase/sidebar/PageSizePopup.cxx|4 -
 sw/source/uibase/sidebar/PageStylesPanel.cxx  |   24 +++
 sw/source/uibase/sidebar/QuickFindPanel.cxx   |   10 +--
 sw/source/uibase/sidebar/StylePresetsPanel.cxx|6 -
 sw/source/uibase/sidebar/SwPanelFactory.cxx   |   16 ++---
 sw/source/uibase/sidebar/TableEditPanel.cxx   |   36 +--
 sw/source/uibase/sidebar/ThemePanel.cxx   |8 +-
 sw/source/uibase/sidebar/WrapPropertyPanel.cxx|   12 +--
 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx |   33 +-
 20 files changed, 175 insertions(+), 173 deletions(-)

New commits:
commit 782f7c23af25187b9205e7ca036cb819834be2df
Author: Noel Grandin 
AuthorDate: Mon Jun 3 14:37:41 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon Jun 3 19:35:46 2024 +0200

loplugin:ostr in sw/.../sidebar

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

diff --git a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx 
b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
index 8a41db78f0ac..bf5333ac6456 100644
--- a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
+++ b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
@@ -32,11 +32,11 @@ namespace sw::sidebar
 {
 AccessibilityCheckEntry::AccessibilityCheckEntry(
 weld::Container* pParent, std::shared_ptr const& 
rAccessibilityIssue)
-: m_xBuilder(Application::CreateBuilder(pParent, 
"svx/ui/accessibilitycheckentry.ui"))
-, m_xContainer(m_xBuilder->weld_container("accessibilityCheckEntryBox"))
-, m_xLabel(m_xBuilder->weld_label("accessibilityCheckEntryLabel"))
-, 
m_xGotoButton(m_xBuilder->weld_link_button("accessibilityCheckEntryLinkButton"))
-, m_xFixButton(m_xBuilder->weld_button("accessibilityCheckEntryFixButton"))
+: m_xBuilder(Application::CreateBuilder(pParent, 
u"svx/ui/accessibilitycheckentry.ui"_ustr))
+, 
m_xContainer(m_xBuilder->weld_container(u"accessibilityCheckEntryBox"_ustr))
+, m_xLabel(m_xBuilder->weld_label(u"accessibilityCheckEntryLabel"_ustr))
+, 
m_xGotoButton(m_xBuilder->weld_link_button(u"accessibilityCheckEntryLinkButton"_ustr))
+, 
m_xFixButton(m_xBuilder->weld_button(u"accessibilityCheckEntryFixButton"_ustr))
 , m_pAccessibilityIssue(rAccessibilityIssue)
 {
 // lock in the height as including the button so all rows are the same 
height
@@ -97,39 +97,40 @@ std::unique_ptr 
A11yCheckIssuesPanel::Create(weld::Widget* pParent,
 {
 if (pParent == nullptr)
 throw ::com::sun::star::lang::IllegalArgumentException(
-"no parent window given to A11yCheckIssuesPanel::Create", nullptr, 
0);
+u"no parent window given to A11yCheckIssuesPanel::Create"_ustr, 
nullptr, 0);
 return std::make_unique(pParent, pBindings);
 }
 
 A11yCheckIssuesPanel::A11yCheckIssuesPanel(weld::Widget* pParent, SfxBindings* 
pBindings)
-: PanelLayout(pParent, "A11yCheckIssuesPanel", 
"modules/swriter/ui/a11ycheckissuespanel.ui")
+: PanelLayout(pParent, u"A11yCheckIssuesPanel"_ustr,
+  u"modules/swriter/ui/a11ycheckissuespanel.ui"_ustr)
 , 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

core.git: sw/source

2024-06-03 Thread Noel Grandin (via logerrit)
 sw/source/ui/fldui/DateFormFieldDialog.cxx |7 ++-
 sw/source/ui/fldui/DropDownFieldDialog.cxx |   12 +++---
 sw/source/ui/fldui/DropDownFormFieldDialog.cxx |   16 
 sw/source/ui/fldui/changedb.cxx|   14 +++
 sw/source/ui/fldui/flddb.cxx   |   28 +++
 sw/source/ui/fldui/flddinf.cxx |   24 ++---
 sw/source/ui/fldui/flddok.cxx  |   32 -
 sw/source/ui/fldui/fldedt.cxx  |8 ++--
 sw/source/ui/fldui/fldfunc.cxx |   46 -
 sw/source/ui/fldui/fldpage.cxx |4 +-
 sw/source/ui/fldui/fldref.cxx  |   28 +++
 sw/source/ui/fldui/fldtdlg.cxx |   40 ++---
 sw/source/ui/fldui/fldvar.cxx  |   38 ++--
 sw/source/ui/fldui/inpdlg.cxx  |   12 +++---
 sw/source/ui/fldui/javaedit.cxx|   22 +--
 15 files changed, 166 insertions(+), 165 deletions(-)

New commits:
commit d620821608a4b89d10ce4b93aa03e6e6d5d04fa8
Author: Noel Grandin 
AuthorDate: Mon Jun 3 12:08:21 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon Jun 3 14:36:20 2024 +0200

loplugin:ostr in sw/.../fldui

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

diff --git a/sw/source/ui/fldui/DateFormFieldDialog.cxx 
b/sw/source/ui/fldui/DateFormFieldDialog.cxx
index 24461c47d6b2..85baf0ed62f5 100644
--- a/sw/source/ui/fldui/DateFormFieldDialog.cxx
+++ b/sw/source/ui/fldui/DateFormFieldDialog.cxx
@@ -19,11 +19,12 @@ namespace sw
 {
 DateFormFieldDialog::DateFormFieldDialog(weld::Widget* pParent,
  sw::mark::IDateFieldmark* pDateField, 
SwDoc& rDoc)
-: GenericDialogController(pParent, 
"modules/swriter/ui/dateformfielddialog.ui",
-  "DateFormFieldDialog")
+: GenericDialogController(pParent, 
u"modules/swriter/ui/dateformfielddialog.ui"_ustr,
+  u"DateFormFieldDialog"_ustr)
 , m_pDateField(pDateField)
 , m_pNumberFormatter(rDoc.GetNumberFormatter())
-, m_xFormatLB(new 
SwNumFormatTreeView(m_xBuilder->weld_tree_view("date_formats_treeview")))
+, m_xFormatLB(
+  new 
SwNumFormatTreeView(m_xBuilder->weld_tree_view(u"date_formats_treeview"_ustr)))
 {
 m_xFormatLB->SetFormatType(SvNumFormatType::DATE);
 m_xFormatLB->SetAutomaticLanguage(true);
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx 
b/sw/source/ui/fldui/DropDownFieldDialog.cxx
index d85bc5365bee..b5dc3e36ebea 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx
@@ -29,15 +29,15 @@ using namespace ::com::sun::star;
 // edit insert-field
 sw::DropDownFieldDialog::DropDownFieldDialog(weld::Widget *pParent, SwWrtShell 
,
   SwField* pField, bool bPrevButton, bool 
bNextButton)
-: GenericDialogController(pParent, 
"modules/swriter/ui/dropdownfielddialog.ui", "DropdownFieldDialog")
+: GenericDialogController(pParent, 
u"modules/swriter/ui/dropdownfielddialog.ui"_ustr, u"DropdownFieldDialog"_ustr)
 , m_rSh( rS )
 , m_pDropField(nullptr)
 , m_pPressedButton(nullptr)
-, m_xListItemsLB(m_xBuilder->weld_tree_view("list"))
-, m_xOKPB(m_xBuilder->weld_button("ok"))
-, m_xPrevPB(m_xBuilder->weld_button("prev"))
-, m_xNextPB(m_xBuilder->weld_button("next"))
-, m_xEditPB(m_xBuilder->weld_button("edit"))
+, m_xListItemsLB(m_xBuilder->weld_tree_view(u"list"_ustr))
+, m_xOKPB(m_xBuilder->weld_button(u"ok"_ustr))
+, m_xPrevPB(m_xBuilder->weld_button(u"prev"_ustr))
+, m_xNextPB(m_xBuilder->weld_button(u"next"_ustr))
+, m_xEditPB(m_xBuilder->weld_button(u"edit"_ustr))
 {
 
m_xListItemsLB->set_size_request(m_xListItemsLB->get_approximate_digit_width() 
* 24,
  m_xListItemsLB->get_height_rows(12));
diff --git a/sw/source/ui/fldui/DropDownFormFieldDialog.cxx 
b/sw/source/ui/fldui/DropDownFormFieldDialog.cxx
index a28d9f1f5fab..dab673c45da5 100644
--- a/sw/source/ui/fldui/DropDownFormFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFormFieldDialog.cxx
@@ -19,16 +19,16 @@ namespace sw
 {
 DropDownFormFieldDialog::DropDownFormFieldDialog(weld::Widget* pParent,
  mark::IFieldmark* 
pDropDownField)
-: GenericDialogController(pParent, 
"modules/swriter/ui/dropdownformfielddialog.ui",
-  "DropDownFormFieldDialog")
+  

core.git: sc/inc sc/source

2024-06-03 Thread Noel Grandin (via logerrit)
 sc/inc/SolverSettings.hxx|   56 
 sc/inc/appluno.hxx   |   72 +-
 sc/source/ui/app/drwtrans.cxx|8 -
 sc/source/ui/app/inputhdl.cxx|   12 -
 sc/source/ui/app/inputwin.cxx|   30 ++--
 sc/source/ui/app/msgpool.cxx |2 
 sc/source/ui/app/scdll.cxx   |2 
 sc/source/ui/app/scmod.cxx   |6 
 sc/source/ui/app/seltrans.cxx|2 
 sc/source/ui/attrdlg/attrdlg.cxx |   22 +--
 sc/source/ui/attrdlg/scuiexp.cxx |4 
 sc/source/ui/attrdlg/tabpages.cxx|   10 -
 sc/source/ui/cctrl/cbnumberformat.cxx|4 
 sc/source/ui/cctrl/checklistmenu.cxx |   54 
 sc/source/ui/cctrl/tbzoomsliderctrl.cxx  |   16 +-
 sc/source/ui/condformat/colorformat.cxx  |   30 ++--
 sc/source/ui/condformat/condformatdlg.cxx|   26 +--
 sc/source/ui/condformat/condformatdlgentry.cxx   |  126 +--
 sc/source/ui/condformat/condformateasydlg.cxx|   25 +--
 sc/source/ui/condformat/condformathelper.cxx |   12 -
 sc/source/ui/condformat/condformatmgr.cxx|   14 +-
 sc/source/ui/dataprovider/datatransformation.cxx |2 
 sc/source/ui/dialogs/SparklineDataRangeDialog.cxx|   12 -
 sc/source/ui/dialogs/SparklineDialog.cxx |   74 +--
 sc/source/ui/dialogs/searchresults.cxx   |8 -
 sc/source/ui/formdlg/dwfunctr.cxx|   26 +--
 sc/source/ui/formdlg/formula.cxx |2 
 sc/source/ui/inc/corodlg.hxx |8 -
 sc/source/ui/inc/docsh.hxx   |6 
 sc/source/ui/inc/dwfunctr.hxx|2 
 sc/source/ui/namedlg/namedefdlg.cxx  |2 
 sc/source/ui/namedlg/namedlg.cxx |6 
 sc/source/ui/namedlg/namepast.cxx|   11 -
 sc/source/ui/navipi/content.cxx  |   18 +-
 sc/source/ui/navipi/navipi.cxx   |   48 +++
 sc/source/ui/navipi/scenwnd.cxx  |8 -
 sc/source/ui/pagedlg/areasdlg.cxx|   36 ++---
 sc/source/ui/pagedlg/hfedtdlg.cxx|  116 -
 sc/source/ui/pagedlg/scuitphfedit.cxx|   46 +++---
 sc/source/ui/pagedlg/tphf.cxx|2 
 sc/source/ui/pagedlg/tptable.cxx |   48 +++
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx  |   38 ++---
 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx |   16 +-
 sc/source/ui/sidebar/CellBorderStyleControl.cxx  |   10 -
 sc/source/ui/sidebar/CellLineStyleControl.cxx|6 
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx   |   34 ++---
 sc/source/ui/sidebar/ScPanelFactory.cxx  |   18 +-
 sc/source/ui/styleui/styledlg.cxx|   70 +-
 sc/source/ui/uitest/uiobject.cxx |   78 +--
 sc/source/ui/undo/undoblk3.cxx   |4 
 sc/source/ui/undo/undocell.cxx   |8 -
 sc/source/ui/undo/undotab.cxx|2 
 sc/source/ui/xmlsource/xmlsourcedlg.cxx  |   18 +-
 53 files changed, 660 insertions(+), 656 deletions(-)

New commits:
commit 83d0b6bd8da7495bc962b83a6638e2aaab90a5ae
Author: Noel Grandin 
AuthorDate: Mon Jun 3 09:11:36 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon Jun 3 12:07:20 2024 +0200

loplugin:ostr in sc

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

diff --git a/sc/inc/SolverSettings.hxx b/sc/inc/SolverSettings.hxx
index 9d9b96ef975f..7f328ed89eed 100644
--- a/sc/inc/SolverSettings.hxx
+++ b/sc/inc/SolverSettings.hxx
@@ -248,39 +248,41 @@ private:
 // NonNegative: for MS compatibility, use 1 for selected and 2 for not 
selected
 typedef std::vector> TParamInfo;
 std::map SolverParamNames
-= { { "Integer", { SP_INTEGER, "solver_int", "bool" } },
-{ "NonNegative", { SP_NON_NEGATIVE, "solver_neg", "bool" } },
-{ "EpsilonLevel", { SP_EPSILON_LEVEL, "solver_eps", "int" } },
-{ "LimitBBDepth", { SP_LIMIT_BBDEPTH, "solver_bbd", "bool" } },
-{ "Timeout", { SP_TIMEOUT, "solver_tim", "int" } },
-{ "Algorithm", { SP_ALGORITHM, "solver_alg", "int" } },
+= { { u"Integer"_ustr, { SP_INTEGER, "solver_int", "bool" } },
+ 

core.git: editeng/source include/editeng

2024-06-02 Thread Noel Grandin (via logerrit)
 editeng/source/items/textitem.cxx |  169 +-
 include/editeng/rsiditem.hxx  |3 
 2 files changed, 170 insertions(+), 2 deletions(-)

New commits:
commit bcc30f482b0833460e38a48c07295a8e86b23478
Author: Noel Grandin 
AuthorDate: Fri May 31 15:41:34 2024 +0200
Commit: Noel Grandin 
CommitDate: Sun Jun 2 17:41:44 2024 +0200

tdf#144208 speedup doc with lots of redline(3)

Shave 5% off load time by using ItemInstanceManager subclasses for some
the more heavily used pool items

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

diff --git a/editeng/source/items/textitem.cxx 
b/editeng/source/items/textitem.cxx
index b4fa77d59d6f..914ca28a051d 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -445,9 +445,61 @@ void SvxFontItem::dumpAsXml(xmlTextWriterPtr pWriter) const
 
 // class SvxPostureItem --
 
+typedef std::unordered_map SvxPostureItemMap;
+
+namespace
+{
+class SvxPostureItemInstanceManager : public ItemInstanceManager
+{
+SvxPostureItemMap  maRegistered;
+
+public:
+SvxPostureItemInstanceManager()
+: ItemInstanceManager(typeid(SvxPostureItem).hash_code())
+{
+}
+
+private:
+static size_t hashCode(const SfxPoolItem&);
+
+// standard interface, accessed exclusively
+// by implCreateItemEntry/implCleanupItemEntry
+virtual const SfxPoolItem* find(const SfxPoolItem&) const override;
+virtual void add(const SfxPoolItem&) override;
+virtual void remove(const SfxPoolItem&) override;
+};
+
+size_t SvxPostureItemInstanceManager::hashCode(const SfxPoolItem& rItem)
+{
+auto const & rPostureItem = static_cast(rItem);
+std::size_t seed(0);
+o3tl::hash_combine(seed, rPostureItem.Which());
+o3tl::hash_combine(seed, rPostureItem. GetEnumValue());
+return seed;
+}
+
+const SfxPoolItem* SvxPostureItemInstanceManager::find(const SfxPoolItem& 
rItem) const
+{
+auto aHit(maRegistered.find(hashCode(rItem)));
+if (aHit != maRegistered.end())
+return aHit->second;
+return nullptr;
+}
+
+void SvxPostureItemInstanceManager::add(const SfxPoolItem& rItem)
+{
+maRegistered.insert({hashCode(rItem), });
+}
+
+void SvxPostureItemInstanceManager::remove(const SfxPoolItem& rItem)
+{
+maRegistered.erase(hashCode(rItem));
+}
+}
+
 ItemInstanceManager* SvxPostureItem::getItemInstanceManager() const
 {
-static DefaultItemInstanceManager 
aInstanceManager(typeid(SvxPostureItem).hash_code());
+static SvxPostureItemInstanceManager aInstanceManager;
 return 
 }
 
@@ -697,9 +749,63 @@ void SvxWeightItem::dumpAsXml(xmlTextWriterPtr pWriter) 
const
 
 // class SvxFontHeightItem ---
 
+typedef std::unordered_map SvxFontHeightItemMap;
+
+namespace
+{
+class SvxFontHeightItemInstanceManager : public ItemInstanceManager
+{
+SvxFontHeightItemMap  maRegistered;
+
+public:
+SvxFontHeightItemInstanceManager()
+: ItemInstanceManager(typeid(SvxFontHeightItem).hash_code())
+{
+}
+
+private:
+static size_t hashCode(const SfxPoolItem&);
+
+// standard interface, accessed exclusively
+// by implCreateItemEntry/implCleanupItemEntry
+virtual const SfxPoolItem* find(const SfxPoolItem&) const override;
+virtual void add(const SfxPoolItem&) override;
+virtual void remove(const SfxPoolItem&) override;
+};
+
+size_t SvxFontHeightItemInstanceManager::hashCode(const SfxPoolItem& rItem)
+{
+auto const & rFontHeightItem = static_cast(rItem);
+std::size_t seed(0);
+o3tl::hash_combine(seed, rFontHeightItem.Which());
+o3tl::hash_combine(seed, rFontHeightItem.GetHeight());
+o3tl::hash_combine(seed, rFontHeightItem.GetProp());
+o3tl::hash_combine(seed, rFontHeightItem.GetPropUnit());
+return seed;
+}
+
+const SfxPoolItem* SvxFontHeightItemInstanceManager::find(const 
SfxPoolItem& rItem) const
+{
+auto aHit(maRegistered.find(hashCode(rItem)));
+if (aHit != maRegistered.end())
+return aHit->second;
+return nullptr;
+}
+
+void SvxFontHeightItemInstanceManager::add(const SfxPoolItem& rItem)
+{
+maRegistered.insert({hashCode(rItem), });
+}
+
+void SvxFontHeightItemInstanceManager::remove(const SfxPoolItem& rItem)
+{
+maRegistered.erase(hashCode(rItem));
+}
+}
+
 ItemInstanceManager* SvxFontHeightItem::getItemInstanceManager() const
 {
-static DefaultItemInstanc

core.git: sc/source

2024-06-01 Thread Noel Grandin (via logerrit)
 sc/source/ui/view/SparklineShell.cxx |7 +--
 sc/source/ui/view/auditsh.cxx|4 ++--
 sc/source/ui/view/cellsh.cxx |8 
 sc/source/ui/view/cellsh1.cxx|   18 +-
 sc/source/ui/view/cellsh2.cxx|6 +++---
 sc/source/ui/view/cellsh3.cxx|   18 +-
 sc/source/ui/view/drawvie4.cxx   |4 ++--
 sc/source/ui/view/editsh.cxx |8 
 sc/source/ui/view/formatsh.cxx   |4 ++--
 sc/source/ui/view/gridwin.cxx|   18 +-
 sc/source/ui/view/gridwin4.cxx   |2 +-
 sc/source/ui/view/hdrcont.cxx|6 +++---
 sc/source/ui/view/output2.cxx|   12 ++--
 sc/source/ui/view/pgbrksh.cxx|4 ++--
 sc/source/ui/view/pivotsh.cxx|4 ++--
 sc/source/ui/view/prevwsh.cxx|6 +++---
 sc/source/ui/view/printfun.cxx   |6 +++---
 sc/source/ui/view/tabcont.cxx|6 +++---
 sc/source/ui/view/tabvwsh4.cxx   |6 +++---
 sc/source/ui/view/tabvwsha.cxx   |2 +-
 sc/source/ui/view/tabvwshb.cxx   |4 ++--
 sc/source/ui/view/tabvwshg.cxx   |   12 ++--
 sc/source/ui/view/viewdata.cxx   |2 +-
 sc/source/ui/view/viewfun2.cxx   |   10 +-
 sc/source/ui/view/viewfun3.cxx   |   24 
 sc/source/ui/view/viewfun4.cxx   |6 +++---
 sc/source/ui/view/viewfun5.cxx   |2 +-
 sc/source/ui/view/viewfun6.cxx   |2 +-
 sc/source/ui/view/viewfun7.cxx   |4 ++--
 sc/source/ui/view/viewfunc.cxx   |   32 
 30 files changed, 125 insertions(+), 122 deletions(-)

New commits:
commit f9ffaeaf7b2dce382474dbbb61819a2c039c0bf6
Author: Noel Grandin 
AuthorDate: Sat Jun 1 10:27:57 2024 +0200
Commit: Noel Grandin 
CommitDate: Sat Jun 1 20:00:59 2024 +0200

loplugin:ostr in sc/../view

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

diff --git a/sc/source/ui/view/SparklineShell.cxx 
b/sc/source/ui/view/SparklineShell.cxx
index 9de6c6af1e02..1cf505df8a37 100644
--- a/sc/source/ui/view/SparklineShell.cxx
+++ b/sc/source/ui/view/SparklineShell.cxx
@@ -23,7 +23,10 @@ namespace sc
 {
 SFX_IMPL_INTERFACE(SparklineShell, SfxShell)
 
-void SparklineShell::InitInterface_Impl() { 
GetStaticInterface()->RegisterPopupMenu("sparkline"); }
+void SparklineShell::InitInterface_Impl()
+{
+GetStaticInterface()->RegisterPopupMenu(u"sparkline"_ustr);
+}
 
 SparklineShell::SparklineShell(ScTabViewShell* pViewShell)
 : SfxShell(pViewShell)
@@ -37,7 +40,7 @@ SparklineShell::SparklineShell(ScTabViewShell* pViewShell)
 {
 pUndoManager->SetMaxUndoActionCount(0);
 }
-SetName("Sparkline");
+SetName(u"Sparkline"_ustr);
 SfxShell::SetContextName(
 
vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Sparkline));
 }
diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx
index 2ea903f59e75..d1dcff0aa65f 100644
--- a/sc/source/ui/view/auditsh.cxx
+++ b/sc/source/ui/view/auditsh.cxx
@@ -36,7 +36,7 @@ SFX_IMPL_INTERFACE(ScAuditingShell, SfxShell)
 
 void ScAuditingShell::InitInterface_Impl()
 {
-GetStaticInterface()->RegisterPopupMenu("audit");
+GetStaticInterface()->RegisterPopupMenu(u"audit"_ustr);
 }
 
 ScAuditingShell::ScAuditingShell(ScViewData& rData) :
@@ -51,7 +51,7 @@ ScAuditingShell::ScAuditingShell(ScViewData& rData) :
 {
 pMgr->SetMaxUndoActionCount( 0 );
 }
-SetName("Auditing");
+SetName(u"Auditing"_ustr);
 
SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Auditing));
 }
 
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index d907daf51ac2..b61a5618 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -67,7 +67,7 @@ void ScCellShell::InitInterface_Impl()
 SfxVisibilityFlags::Standard | 
SfxVisibilityFlags::Server,
 ToolbarId::Objectbar_Format);
 
-GetStaticInterface()->RegisterPopupMenu("cell");
+GetStaticInterface()->RegisterPopupMenu(u"cell"_ustr);
 }
 
 ScCellShell::ScCellShell(ScViewData& rData, const VclPtr& 
frameWin) :
@@ -76,7 +76,7 @@ ScCellShell::ScCellShell(ScViewData& rData, const 
VclPtr& frameWin)
 bPastePossible(false),
 pFrameWin(frameWin)
 {
-SetName("Cell");
+SetName(u"Cell"_ustr);
 
SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Cell));
 }
 
@@ -883,7 +883,7 @@ void ScCellShell::GetState(SfxItemSet )
 
 // In interpreter may happen vi

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

2024-06-01 Thread Noel Grandin (via logerrit)
 sc/source/ui/docshell/datastream.cxx  |2 
 sc/source/ui/docshell/dbdocimp.cxx|2 
 sc/source/ui/docshell/docfunc.cxx |8 -
 sc/source/ui/docshell/docsh.cxx   |   62 
 sc/source/ui/docshell/docsh2.cxx  |2 
 sc/source/ui/docshell/docsh3.cxx  |4 
 sc/source/ui/docshell/docsh4.cxx  |   14 -
 sc/source/ui/docshell/docsh5.cxx  |2 
 sc/source/ui/docshell/docsh8.cxx  |4 
 sc/source/ui/docshell/externalrefmgr.cxx  |2 
 sc/source/ui/docshell/impex.cxx   |6 
 sc/source/ui/docshell/macromgr.cxx|2 
 sc/source/ui/docshell/tablink.cxx |4 
 sc/source/ui/docshell/tpstat.cxx  |   12 -
 sw/source/filter/basflt/fltini.cxx|6 
 sw/source/filter/basflt/iodetect.cxx  |   12 -
 sw/source/filter/docx/swdocxreader.cxx|4 
 sw/source/filter/html/SwAppletImpl.cxx|   14 -
 sw/source/filter/html/htmlatr.cxx |2 
 sw/source/filter/html/htmlcss1.cxx|   10 -
 sw/source/filter/html/htmlflywriter.cxx   |8 -
 sw/source/filter/html/htmlform.cxx|  126 -
 sw/source/filter/html/htmlforw.cxx|  102 ++---
 sw/source/filter/html/htmlplug.cxx|   60 
 sw/source/filter/html/htmlreqifreader.cxx |   12 -
 sw/source/filter/html/swhtml.cxx  |8 -
 sw/source/filter/html/wrthtml.cxx |   40 ++---
 sw/source/filter/inc/IndexingExportFilter.hxx |4 
 sw/source/filter/rtf/swparrtf.cxx |4 
 sw/source/filter/xml/swxml.cxx|   70 -
 sw/source/filter/xml/wrtxml.cxx   |   68 -
 sw/source/filter/xml/xmlexp.cxx   |   26 +--
 sw/source/filter/xml/xmlfmt.cxx   |6 
 sw/source/filter/xml/xmlimp.cxx   |  190 +-
 sw/source/filter/xml/xmltble.cxx  |8 -
 sw/source/filter/xml/xmltbli.cxx  |   10 -
 sw/source/filter/xml/xmltexte.cxx |   34 ++--
 sw/source/filter/xml/xmltexti.cxx |   32 ++--
 sw/source/filter/xml/zorder.hxx   |6 
 39 files changed, 494 insertions(+), 494 deletions(-)

New commits:
commit 832211d7c5803d38997dddff55632ae0e582f5fc
Author: Noel Grandin 
AuthorDate: Sat Jun 1 10:27:38 2024 +0200
Commit: Noel Grandin 
CommitDate: Sat Jun 1 17:38:39 2024 +0200

loplugin:ostr in sc/../docshell

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

diff --git a/sc/source/ui/docshell/datastream.cxx 
b/sc/source/ui/docshell/datastream.cxx
index 998985bb78ff..6d28fff40fdc 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -249,7 +249,7 @@ void DataStream::MakeToolbarVisible()
 return;
 
 css::uno::Reference< css::frame::XLayoutManager > xLayoutManager;
-xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager;
+xPropSet->getPropertyValue(u"LayoutManager"_ustr) >>= xLayoutManager;
 if (!xLayoutManager.is())
 return;
 
diff --git a/sc/source/ui/docshell/dbdocimp.cxx 
b/sc/source/ui/docshell/dbdocimp.cxx
index 92f5d55376a8..70616d9382b5 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -79,7 +79,7 @@ void ScDBDocFunc::ShowInBeamer( const ScImportParam& rParam, 
const SfxViewFrame*
 uno::Reference xFrame = 
pFrame->GetFrame().GetFrameInterface();
 
 uno::Reference xBeamerFrame = xFrame->findFrame(
-"_beamer",
+u"_beamer"_ustr,
 frame::FrameSearchFlag::CHILDREN);
 if (!xBeamerFrame.is())
 return;
diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index 6e3e050b8366..61dc9d5603ae 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -3201,7 +3201,7 @@ static uno::Reference< uno::XInterface > 
GetDocModuleObject( const SfxObjectShel
 uno::Reference< uno::XInterface > xDocModuleApiObject;
 if ( xSF.is() )
 {
-xVBACodeNamedObjectAccess.set( 
xSF->createInstance("ooo.vba.VBAObjectModuleObjectProvider"), uno::UNO_QUERY );
+xVBACodeNamedObjectAccess.set( 
xSF->createInstance(u"ooo.vba.VBAObjectModuleObjectProvider"_ustr), 
uno::UNO_QUERY );
 xDocModuleApiObject.set( xVBACodeNamedObjectAccess->getByName( 
sCodeName ), uno::UNO_QUERY );
 }
 return xDocModuleApiObject;
@@ -3225,7 +3225,7 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, 
const OUString& sSource )
 u

core.git: sw/source

2024-06-01 Thread Noel Grandin (via logerrit)
 sw/source/core/doc/DocumentRedlineManager.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 1291edd7ed369ee97177cab2910f2396302ebacf
Author: Noel Grandin 
AuthorDate: Fri May 31 15:04:27 2024 +0200
Commit: Noel Grandin 
CommitDate: Sat Jun 1 12:55:53 2024 +0200

tdf#144208 speedup doc with lots of redline(2)

use iterators to avoid indexing and cost of repeatedly calling size(),
shaves 1-2% off load time

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

diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx 
b/sw/source/core/doc/DocumentRedlineManager.cxx
index 6e287c6fb91f..9ae003980701 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -2823,9 +2823,9 @@ SwRedlineTable::size_type 
DocumentRedlineManager::GetRedlinePos( const SwNode& r
 }
 else
 {
-for( SwRedlineTable::size_type n = 0; n < maRedlineTable.size() ; ++n )
+for( auto it = maRedlineTable.begin(), itEnd = maRedlineTable.end(); 
it != itEnd; ++it )
 {
-const SwRangeRedline* pTmp = maRedlineTable[ n ];
+const SwRangeRedline* pTmp = *it;
 SwNodeOffset nPt = pTmp->GetPoint()->GetNodeIndex(),
   nMk = pTmp->GetMark()->GetNodeIndex();
 if( nPt < nMk )
@@ -2833,7 +2833,7 @@ SwRedlineTable::size_type 
DocumentRedlineManager::GetRedlinePos( const SwNode& r
 
 if( ( RedlineType::Any == nType || nType == pTmp->GetType()) &&
 nMk <= nNdIdx && nNdIdx <= nPt )
-return n;
+return std::distance(maRedlineTable.begin(), it);
 
 if( nMk > nNdIdx )
 break;


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

2024-06-01 Thread Noel Grandin (via logerrit)
 sc/source/ui/drawfunc/chartsh.cxx |4 +--
 sc/source/ui/drawfunc/drawsh.cxx  |2 -
 sc/source/ui/drawfunc/drawsh2.cxx |   14 ++---
 sc/source/ui/drawfunc/drawsh5.cxx |   16 +++
 sc/source/ui/drawfunc/drformsh.cxx|4 +--
 sc/source/ui/drawfunc/drtxtob.cxx |4 +--
 sc/source/ui/drawfunc/drtxtob1.cxx|2 -
 sc/source/ui/drawfunc/fudraw.cxx  |2 -
 sc/source/ui/drawfunc/fuins1.cxx  |4 +--
 sc/source/ui/drawfunc/fuins2.cxx  |   16 +++
 sc/source/ui/drawfunc/fusel.cxx   |2 -
 sc/source/ui/drawfunc/graphsh.cxx |8 +++
 sc/source/ui/drawfunc/mediash.cxx |2 -
 sc/source/ui/drawfunc/oleobjsh.cxx|4 +--
 sw/inc/docary.hxx |6 +++--
 sw/source/core/doc/DocumentRedlineManager.cxx |7 +-
 sw/source/core/doc/docredln.cxx   |   27 ++
 17 files changed, 79 insertions(+), 45 deletions(-)

New commits:
commit ec49191e58df2f5cb37e2608f3262e9604385fb0
Author: Noel Grandin 
AuthorDate: Fri May 31 09:57:45 2024 +0200
Commit: Noel Grandin 
CommitDate: Sat Jun 1 10:23:29 2024 +0200

loplugin:ostr in sc/../drawfunc

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

diff --git a/sc/source/ui/drawfunc/chartsh.cxx 
b/sc/source/ui/drawfunc/chartsh.cxx
index e6378a5fa9cb..7a0a63b76195 100644
--- a/sc/source/ui/drawfunc/chartsh.cxx
+++ b/sc/source/ui/drawfunc/chartsh.cxx
@@ -61,7 +61,7 @@ void ScChartShell::InitInterface_Impl()
 SfxVisibilityFlags::Standard | 
SfxVisibilityFlags::Server,
 ToolbarId::Draw_Objectbar);
 
-GetStaticInterface()->RegisterPopupMenu("oleobject");
+GetStaticInterface()->RegisterPopupMenu(u"oleobject"_ustr);
 }
 
 void ScChartShell::Activate(bool bMDI)
@@ -97,7 +97,7 @@ void ScChartShell::Deactivate(bool bMDI)
 ScChartShell::ScChartShell(ScViewData& rData) :
 ScDrawShell(rData)
 {
-SetName( "ChartObject" );
+SetName( u"ChartObject"_ustr );
 
SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Chart));
 }
 
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 2e11d3817ee5..53ca99000933 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -92,7 +92,7 @@ void ScDrawShell::InitInterface_Impl()
 SfxVisibilityFlags::Standard | 
SfxVisibilityFlags::Server,
 ToolbarId::Draw_Objectbar);
 
-GetStaticInterface()->RegisterPopupMenu("draw");
+GetStaticInterface()->RegisterPopupMenu(u"draw"_ustr);
 
 
GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
 }
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx 
b/sc/source/ui/drawfunc/drawsh2.cxx
index fddc50fe5c13..418d92d00f32 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -72,7 +72,7 @@ ScDrawShell::ScDrawShell( ScViewData& rData ) :
 {
 pMgr->SetMaxUndoActionCount( 0 );
 }
-SetName("Drawing");
+SetName(u"Drawing"_ustr);
 
 mpSelectionChangeHandler->Connect();
 }
@@ -341,12 +341,12 @@ static void setupFillColorForChart(const SfxViewShell* 
pShell, SfxItemSet& rSet)
 if (!xInfo.is())
 return;
 
-if (xInfo->hasPropertyByName("FillColor"))
+if (xInfo->hasPropertyByName(u"FillColor"_ustr))
 {
 sal_uInt32 nFillColor = 0;
-xPropSet->getPropertyValue("FillColor") >>= nFillColor;
+xPropSet->getPropertyValue(u"FillColor"_ustr) >>= nFillColor;
 
-XFillColorItem aFillColorItem("", Color(ColorTransparency, 
nFillColor));
+XFillColorItem aFillColorItem(u""_ustr, Color(ColorTransparency, 
nFillColor));
 rSet.Put(aFillColorItem);
 
 if (comphelper::LibreOfficeKit::isActive())
@@ -354,11 +354,11 @@ static void setupFillColorForChart(const SfxViewShell* 
pShell, SfxItemSet& rSet)
 (".uno:FillColor=" + OString::number(nFillColor)));
 }
 
-if (!(comphelper::LibreOfficeKit::isActive() && 
xInfo->hasPropertyByName("FillGradientName")))
+if (!(comphelper::LibreOfficeKit::isActive() && 
xInfo->hasPropertyByName(u"FillGradientName"_ustr)))
 return;
 
 OUString aGradientName;
-xPropSet->getPropertyValue("FillGradientName") >>= aGradientName;
+xPro

core.git: svx/source

2024-06-01 Thread Noel Grandin (via logerrit)
 svx/source/sdr/overlay/overlayselection.cxx |  233 +++-
 1 file changed, 60 insertions(+), 173 deletions(-)

New commits:
commit 302a221856809e2b046cb9fb1675bfff4d86a37d
Author: Noel Grandin 
AuthorDate: Thu May 30 13:31:28 2024 +0200
Commit: Noel Grandin 
CommitDate: Sat Jun 1 10:22:55 2024 +0200

tdf#161198 tdf#161322 fix selection overlays

revert
commit 7b1405689d4246e0e37e8759f03e1962af964cec
Author: Noel Grandin 
Date:   Fri Apr 19 22:56:04 2024 +0200
reduce the number of drawing primitives we create in
OverlaySelection

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

diff --git a/svx/source/sdr/overlay/overlayselection.cxx 
b/svx/source/sdr/overlay/overlayselection.cxx
index a5598c1d2125..49418ae906e9 100644
--- a/svx/source/sdr/overlay/overlayselection.cxx
+++ b/svx/source/sdr/overlay/overlayselection.cxx
@@ -34,137 +34,31 @@
 #include 
 #include 
 
-namespace
-{
-struct B2DPointCompare
-{
-bool operator()(const basegfx::B2DPoint& lhs, const basegfx::B2DPoint& 
rhs) const
-{
-return std::make_pair(lhs.getX(), lhs.getY()) < 
std::make_pair(rhs.getX(), rhs.getY());
-}
-};
-
-struct B2DPointCompareYThenX
-{
-bool operator()(const basegfx::B2DPoint& lhs, const basegfx::B2DPoint& 
rhs) const
-{
-return std::make_pair(lhs.getY(), lhs.getX()) < 
std::make_pair(rhs.getY(), rhs.getX());
-}
-};
-
-}
-
 namespace sdr::overlay
 {
 
-// Combine rectangles geometrically to a single OR'ed polygon.
-// Algorithm is from
-// "Uniqueness of orthogonal connect-the-dots" Joseph O'Rourke 1988
-// The basic algorithm is:
-//   Sort points by lowest x, lowest y
-//   Go through each column and create edges between the vertices 2i and 
2i + 1 in that column
-//   Sort points by lowest y, lowest x
-//   Go through each row and create edges between the vertices 2i and 2i + 
1 in that row.
-//
-static basegfx::B2DPolyPolygon impCombineRectanglesToPolyPolygon(const 
std::vector< basegfx::B2DRange >& rRectangles)
-{
-o3tl::sorted_vector sort_x;
-for (auto const & rRect : rRectangles)
+// combine rages geometrically to a single, ORed polygon
+static basegfx::B2DPolyPolygon impCombineRangesToPolyPolygon(const 
std::vector< basegfx::B2DRange >& rRanges)
 {
-auto checkPoint = [_x](double x, double y)
-{
-basegfx::B2DPoint pt(x, y);
-auto it = sort_x.find(pt);
-if (it != sort_x.end()) // Shared vertice, remove it.
-sort_x.erase(it);
-else
-sort_x.insert(pt);
-};
-checkPoint(rRect.getMinX(), rRect.getMinY());
-checkPoint(rRect.getMinX(), rRect.getMaxY());
-checkPoint(rRect.getMaxX(), rRect.getMinY());
-checkPoint(rRect.getMaxX(), rRect.getMaxY());
-}
-
-
-o3tl::sorted_vector sort_y;
-for (auto const & i : sort_x)
-sort_y.insert(i);
-
-std::map 
edges_h;
-std::map 
edges_v;
+const sal_uInt32 nCount(rRanges.size());
+basegfx::B2DPolyPolygon aRetval;
 
-size_t i = 0;
-while (i < sort_x.size())
-{
-auto curr_y = sort_y[i].getY();
-while (i < sort_x.size() && sort_y[i].getY() == curr_y)
-{
-edges_h[sort_y[i]] = sort_y[i + 1];
-edges_h[sort_y[i + 1]] = sort_y[i];
-i += 2;
-}
-}
-i = 0;
-while (i < sort_x.size())
-{
-auto curr_x = sort_x[i].getX();
-while (i < sort_x.size() && sort_x[i].getX() == curr_x)
+for(sal_uInt32 a(0); a < nCount; a++)
 {
-edges_v[sort_x[i]] = sort_x[i + 1];
-edges_v[sort_x[i + 1]] = sort_x[i];
-i += 2;
-}
-}
+const basegfx::B2DPolygon 
aDiscretePolygon(basegfx::utils::createPolygonFromRect(rRanges[a]));
 
-// Get all the polygons.
-basegfx::B2DPolyPolygon aPolyPolygon;
-std::vector> tmpPolygon;
-while (!edges_h.empty())
-{
-tmpPolygon.clear();
-// We can start with any point.
-basegfx::B2DPoint pt = edges_h.begin()->first;
-edges_h.erase(edges_h.begin());
-tmpPolygon.push_back({pt, false});
-for (;;)
-{
-auto [curr, e] = tmpPolygon.back();
-if (!e)
+if(0 == a)
 {
-auto it = edges_v.find(curr);
-auto next_verte

core.git: sc/source

2024-05-31 Thread Noel Grandin (via logerrit)
 sc/source/ui/miscdlgs/acredlin.cxx |   12 +-
 sc/source/ui/miscdlgs/conflictsdlg.cxx |   12 +-
 sc/source/ui/miscdlgs/crdlg.cxx|9 +-
 sc/source/ui/miscdlgs/crnrdlg.cxx  |   30 +++---
 sc/source/ui/miscdlgs/datafdlg.cxx |   26 ++---
 sc/source/ui/miscdlgs/dataproviderdlg.cxx  |  128 ++---
 sc/source/ui/miscdlgs/datastreamdlg.cxx|   33 +++
 sc/source/ui/miscdlgs/delcldlg.cxx |   11 +-
 sc/source/ui/miscdlgs/delcodlg.cxx |   18 ++--
 sc/source/ui/miscdlgs/filldlg.cxx  |   42 -
 sc/source/ui/miscdlgs/gototabdlg.cxx   |   11 +-
 sc/source/ui/miscdlgs/groupdlg.cxx |   12 +-
 sc/source/ui/miscdlgs/highred.cxx  |   16 +--
 sc/source/ui/miscdlgs/inscldlg.cxx |   15 +--
 sc/source/ui/miscdlgs/inscodlg.cxx |   52 +--
 sc/source/ui/miscdlgs/instbdlg.cxx |   26 ++---
 sc/source/ui/miscdlgs/lbseldlg.cxx |4 
 sc/source/ui/miscdlgs/linkarea.cxx |   18 ++--
 sc/source/ui/miscdlgs/mergecellsdialog.cxx |9 +-
 sc/source/ui/miscdlgs/mtrindlg.cxx |4 
 sc/source/ui/miscdlgs/mvtabdlg.cxx |   25 ++---
 sc/source/ui/miscdlgs/namecrea.cxx |   11 +-
 sc/source/ui/miscdlgs/optsolver.cxx|  110 
 sc/source/ui/miscdlgs/protectiondlg.cxx|   30 +++---
 sc/source/ui/miscdlgs/retypepassdlg.cxx|   41 -
 sc/source/ui/miscdlgs/scuiautofmt.cxx  |   28 +++---
 sc/source/ui/miscdlgs/sharedocdlg.cxx  |   10 +-
 sc/source/ui/miscdlgs/shtabdlg.cxx |7 -
 sc/source/ui/miscdlgs/simpref.cxx  |   12 +-
 sc/source/ui/miscdlgs/solveroptions.cxx|   20 ++--
 sc/source/ui/miscdlgs/solvrdlg.cxx |   20 ++--
 sc/source/ui/miscdlgs/strindlg.cxx |8 -
 sc/source/ui/miscdlgs/tabbgcolordlg.cxx|   10 +-
 sc/source/ui/miscdlgs/tabopdlg.cxx |   26 ++---
 sc/source/ui/miscdlgs/textdlgs.cxx |   24 ++---
 sc/source/ui/miscdlgs/warnbox.cxx  |6 -
 36 files changed, 443 insertions(+), 433 deletions(-)

New commits:
commit efe386b01668c9a67224857773849916d44d56cd
Author: Noel Grandin 
AuthorDate: Fri May 31 09:58:06 2024 +0200
Commit: Noel Grandin 
CommitDate: Fri May 31 16:29:42 2024 +0200

loplugin:ostr in sc/../miscdlgs

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

diff --git a/sc/source/ui/miscdlgs/acredlin.cxx 
b/sc/source/ui/miscdlgs/acredlin.cxx
index 957661186906..782b08b87d47 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -70,7 +70,7 @@ ScRedlinData::~ScRedlinData()
 ScAcceptChgDlg::ScAcceptChgDlg(SfxBindings* pB, SfxChildWindow* pCW, 
weld::Window* pParent,
 ScViewData* ptrViewData)
 : SfxModelessDialogController(pB, pCW, pParent,
-"svx/ui/acceptrejectchangesdialog.ui", "AcceptRejectChangesDialog")
+u"svx/ui/acceptrejectchangesdialog.ui"_ustr, 
u"AcceptRejectChangesDialog"_ustr)
 , aSelectionIdle( "ScAcceptChgDlg  aSelectionIdle" )
 , aReOpenIdle("ScAcceptChgDlg ReOpenIdle")
 , pViewData( ptrViewData )
@@ -91,14 +91,14 @@ ScAcceptChgDlg::ScAcceptChgDlg(SfxBindings* pB, 
SfxChildWindow* pCW, weld::Windo
 , aStrChildContent(ScResId(STR_CHG_CHILD_CONTENT))
 , aStrChildOrgContent(ScResId(STR_CHG_CHILD_ORGCONTENT))
 , aStrEmpty(ScResId(STR_CHG_EMPTY))
-, aUnknown("Unknown")
+, aUnknown(u"Unknown"_ustr)
 , bIgnoreMsg(false)
 , bNoSelection(false)
 , bHasFilterEntry(false)
 , bUseColor(false)
 , m_xContentArea(m_xDialog->weld_content_area())
-, m_xPopup(m_xBuilder->weld_menu("calcmenu"))
-, m_xSortMenu(m_xBuilder->weld_menu("calcsortmenu"))
+, m_xPopup(m_xBuilder->weld_menu(u"calcmenu"_ustr))
+, m_xSortMenu(m_xBuilder->weld_menu(u"calcsortmenu"_ustr))
 {
 m_xAcceptChgCtr.reset(new SvxAcceptChgCtr(m_xContentArea.get()));
 nAcceptCount=0;
@@ -1602,7 +1602,7 @@ IMPL_LINK(ScAcceptChgDlg, CommandHdl, const 
CommandEvent&, rCEvt, bool)
 for (sal_Int32 i = 0; i < 5; ++i)
 m_xSortMenu->set_active("calcsort" + OUString::number(i), i == 
nSortedCol);
 
-m_xPopup->set_sensitive("calcedit", false);
+m_xPopup->set_sensitive(u"calcedit"_ustr, false);
 
 if (pDoc->IsDocEditable() && bEntry)
 {
@@ -1611,7 +1611,7 @@ IMPL_LINK(ScAcceptChgDlg, CommandHdl, const 
CommandEvent&, rCEvt, bool)
 {
 ScChangeAction* pScChangeAction = 
static_cast(pEntryData->pData);
 if (pScChangeAction && !rTreeView.get_iter_depth(*xEntry))
-m_xPopup->set_sensitive("calcedit", true);
+  

core.git: sw/source

2024-05-31 Thread Noel Grandin (via logerrit)
 sw/source/core/edit/edlingu.cxx |  183 
 1 file changed, 74 insertions(+), 109 deletions(-)

New commits:
commit c22ad4f8cbefa68a675cc4eec3045bd9519b5342
Author: Noel Grandin 
AuthorDate: Thu May 30 13:58:24 2024 +0200
Commit: Noel Grandin 
CommitDate: Fri May 31 09:54:02 2024 +0200

unique_ptr->optional in SwLinguIter

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

diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index e1bcd3f23520..41123a009e63 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -67,29 +67,17 @@ namespace {
 class SwLinguIter
 {
 SwEditShell* m_pSh;
-std::unique_ptr m_pStart;
-std::unique_ptr m_pEnd;
-std::unique_ptr m_pCurr;
-std::unique_ptr m_pCurrX;
+public:
+std::optional m_oStart;
+std::optional m_oEnd;
+std::optional m_oCurr;
+std::optional m_oCurrX;
 sal_uInt16 m_nCursorCount;
 
-public:
 SwLinguIter();
 
 SwEditShell* GetSh() { return m_pSh; }
 
-const SwPosition *GetEnd() const { return m_pEnd.get(); }
-void SetEnd(SwPosition* pNew) { m_pEnd.reset(pNew); }
-
-const SwPosition *GetStart() const { return m_pStart.get(); }
-void SetStart(SwPosition* pNew) { m_pStart.reset(pNew); }
-
-const SwPosition *GetCurr() const { return m_pCurr.get(); }
-void SetCurr(SwPosition* pNew) { m_pCurr.reset(pNew); }
-
-const SwPosition *GetCurrX() const { return m_pCurrX.get(); }
-void SetCurrX(SwPosition* pNew) { m_pCurrX.reset(pNew); }
-
 sal_uInt16& GetCursorCnt() { return m_nCursorCount; }
 
 // for the UI:
@@ -215,13 +203,13 @@ void SwLinguIter::Start_( SwEditShell *pShell, 
SwDocPositions eStart,
 
 CurrShell aCurr(m_pSh);
 
-OSL_ENSURE(!m_pEnd, "SwLinguIter::Start_ without End?");
+OSL_ENSURE(!m_oEnd, "SwLinguIter::Start_ without End?");
 
 SwPaM* pCursor = m_pSh->GetCursor();
 
 if( pShell->HasSelection() || pCursor != pCursor->GetNext() )
 {
-bSetCurr = nullptr != GetCurr();
+bSetCurr = m_oCurr.has_value();
 m_nCursorCount = m_pSh->GetCursorCnt();
 if (m_pSh->IsTableMode())
 m_pSh->TableCursorToCursor();
@@ -247,14 +235,12 @@ void SwLinguIter::Start_( SwEditShell *pShell, 
SwDocPositions eStart,
 if ( *pCursor->GetPoint() > *pCursor->GetMark() )
 pCursor->Exchange();
 
-m_pStart.reset(new SwPosition(*pCursor->GetPoint()));
-m_pEnd.reset(new SwPosition(*pCursor->GetMark()));
+m_oStart.emplace(*pCursor->GetPoint());
+m_oEnd.emplace(*pCursor->GetMark());
 if( bSetCurr )
 {
-SwPosition* pNew = new SwPosition( *GetStart() );
-SetCurr( pNew );
-pNew = new SwPosition( *pNew );
-SetCurrX( pNew );
+m_oCurr.emplace( *m_oStart );
+m_oCurrX.emplace( *m_oCurr );
 }
 
 pCursor->SetMark();
@@ -265,7 +251,7 @@ void SwLinguIter::End_(bool bRestoreSelection)
 if (!m_pSh)
 return;
 
-OSL_ENSURE(m_pEnd, "SwLinguIter::End_ without end?");
+OSL_ENSURE(m_oEnd, "SwLinguIter::End_ without end?");
 if(bRestoreSelection)
 {
 while (m_nCursorCount--)
@@ -274,10 +260,10 @@ void SwLinguIter::End_(bool bRestoreSelection)
 m_pSh->KillPams();
 m_pSh->ClearMark();
 }
-m_pStart.reset();
-m_pEnd.reset();
-m_pCurr.reset();
-m_pCurrX.reset();
+m_oStart.reset();
+m_oEnd.reset();
+m_oCurr.reset();
+m_oCurrX.reset();
 
 m_pSh = nullptr;
 }
@@ -307,7 +293,7 @@ uno::Any SwSpellIter::Continue( sal_uInt16* pPageCnt, 
sal_uInt16* pPageSt )
 if( !pMySh )
 return aSpellRet;
 
-OSL_ENSURE( GetEnd(), "SwSpellIter::Continue without start?");
+OSL_ENSURE( m_oEnd, "SwSpellIter::Continue without start?");
 
 uno::Reference< uno::XInterface >  xSpellRet;
 bool bGoOn = true;
@@ -316,8 +302,8 @@ uno::Any SwSpellIter::Continue( sal_uInt16* pPageCnt, 
sal_uInt16* pPageSt )
 if ( !pCursor->HasMark() )
 pCursor->SetMark();
 
-*pMySh->GetCursor()->GetPoint() = *GetCurr();
-*pMySh->GetCursor()->GetMark() = *GetEnd();
+*pMySh->GetCursor()->GetPoint() = *m_oCurr;
+*pMySh->GetCursor()->GetMark() = *m_oEnd;
 pMySh->GetDoc()->Spell(*pMySh->GetCursor(), m_xSpeller, pPageCnt, 
pPageSt, false,
pMySh->GetLayout())
 >>= xSpellRet;
@@ -325,10 +311,8 @@ uno::Any SwSpellIter::Continue( sal_uInt16* pPageCnt, 
sal_uInt16* pPageSt )
 if( xSpellRet.is() )
 {
 bGoOn = false;
-SwPosition* pNewPoint = new SwPosition( *pCursor->GetPoint() );
-   

core.git: sd/inc sd/qa

2024-05-30 Thread Noel Grandin (via logerrit)
 sd/inc/viewopt.hxx |2 
 sd/qa/filter/eppt/eppt.cxx |   34 -
 sd/qa/unit/HtmlExportTest.cxx  |   21 
 sd/qa/unit/PNGExportTests.cxx  |  184 +++---
 sd/qa/unit/SVGExportTests.cxx  |  100 +--
 sd/qa/unit/SdrPdfImportTest.cxx|   12 
 sd/qa/unit/ShapeImportExportTest.cxx   |   48 -
 sd/qa/unit/TextFittingTest.cxx |2 
 sd/qa/unit/ThemeTest.cxx   |   14 
 sd/qa/unit/a11y/layout.cxx |  133 ++--
 sd/qa/unit/activex-controls-tests.cxx  |  494 +-
 sd/qa/unit/dialogs-test.cxx|4 
 sd/qa/unit/export-tests-ooxml1.cxx |  654 
 sd/qa/unit/export-tests-ooxml2.cxx |  675 -
 sd/qa/unit/export-tests-ooxml3.cxx |  406 +++
 sd/qa/unit/export-tests-ooxml4.cxx |  372 ++---
 sd/qa/unit/export-tests.cxx|  658 +---
 sd/qa/unit/filters-test.cxx|   22 
 sd/qa/unit/import-tests-smartart.cxx   |  370 ++---
 sd/qa/unit/import-tests.cxx|  313 +--
 sd/qa/unit/import-tests2.cxx   |  276 +-
 sd/qa/unit/import-tests_skia.cxx   |2 
 sd/qa/unit/layout-tests.cxx|   81 +--
 sd/qa/unit/misc-tests.cxx  |  160 +++--
 sd/qa/unit/sdmodeltestbase.hxx |   10 
 sd/qa/unit/tiledrendering/LOKitSearchTest.cxx  |  176 +++---
 sd/qa/unit/tiledrendering/tiledrendering.cxx   |  202 +++
 sd/qa/unit/tiledrendering2/tiledrendering2.cxx |4 
 sd/qa/unit/uiimpress.cxx   |  210 +++
 29 files changed, 2874 insertions(+), 2765 deletions(-)

New commits:
commit 782eda5992585a2a67f28d4453c7994f01b41ad9
Author: Noel Grandin 
AuthorDate: Thu May 30 12:38:07 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 30 21:03:47 2024 +0200

loplugin:ostr in sd

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

diff --git a/sd/inc/viewopt.hxx b/sd/inc/viewopt.hxx
index 03ebd2ada659..eb9f16513624 100644
--- a/sd/inc/viewopt.hxx
+++ b/sd/inc/viewopt.hxx
@@ -28,7 +28,7 @@ struct SdViewOptions
 // The color of the document background
 Color mnDocBackgroundColor;
 // The name of the color scheme
-OUString msColorSchemeName = "Default";
+OUString msColorSchemeName = u"Default"_ustr;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/qa/filter/eppt/eppt.cxx b/sd/qa/filter/eppt/eppt.cxx
index b84630c971fe..198f2816b534 100644
--- a/sd/qa/filter/eppt/eppt.cxx
+++ b/sd/qa/filter/eppt/eppt.cxx
@@ -31,7 +31,7 @@ public:
 };
 
 Test::Test()
-: UnoApiXmlTest("/sd/qa/filter/eppt/data/")
+: UnoApiXmlTest(u"/sd/qa/filter/eppt/data/"_ustr)
 {
 }
 
@@ -39,7 +39,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOOXMLCustomShapeBitmapFill)
 {
 // Save the bugdoc to PPT.
 loadFromFile(u"custom-shape-bitmap-fill.pptx");
-saveAndReload("MS PowerPoint 97");
+saveAndReload(u"MS PowerPoint 97"_ustr);
 
 // Check if the bitmap shape was lost.
 uno::Reference 
xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
@@ -50,14 +50,13 @@ CPPUNIT_TEST_FIXTURE(Test, testOOXMLCustomShapeBitmapFill)
 // - Expected: com.sun.star.drawing.GraphicObjectShape
 // - Actual  : com.sun.star.drawing.CustomShape
 // i.e. the custom shape geometry was kept, but the actual bitmap was lost.
-CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.GraphicObjectShape"),
- xShape->getShapeType());
+CPPUNIT_ASSERT_EQUAL(u"com.sun.star.drawing.GraphicObjectShape"_ustr, 
xShape->getShapeType());
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testThemeExport)
 {
 // Given a document with a master slide and a theme, lt1 is set to 
0x02:
-mxComponent = loadFromDesktop("private:factory/simpress");
+mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr);
 {
 uno::Reference 
xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
 uno::Reference xDrawPage(
@@ -80,16 +79,16 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeExport)
 pColorSet->add(model::ThemeColorType::FollowedHyperlink, 0xcc);
 pTheme->setColorSet(pColorSet);
 
-xMasterPage->setPropertyValue("Theme", 
uno::Any(model::theme::createXTheme(pTheme)));
+xMasterPage->setPropertyValue(u"Theme"_ustr, 
uno::Any(model::theme::createXTheme(pTheme)));
 }
 
 // Export to PPTX and load again:
-saveAndReload("Impress Office Open XML");
+saveAndReload(u"Impress Off

core.git: sc/source

2024-05-30 Thread Noel Grandin (via logerrit)
 sc/source/ui/optdlg/calcoptionsdlg.cxx  |   10 -
 sc/source/ui/optdlg/opredlin.cxx|   20 +--
 sc/source/ui/optdlg/tpcalc.cxx  |   74 ++---
 sc/source/ui/optdlg/tpcompatibility.cxx |   12 +-
 sc/source/ui/optdlg/tpdefaults.cxx  |   16 +-
 sc/source/ui/optdlg/tpformula.cxx   |   40 +++
 sc/source/ui/optdlg/tpprint.cxx |   18 +--
 sc/source/ui/optdlg/tpusrlst.cxx|   30 ++---
 sc/source/ui/optdlg/tpview.cxx  |  176 
 9 files changed, 198 insertions(+), 198 deletions(-)

New commits:
commit 0ba6f0678eb8749decc5e31aa4dff9f4858e3ab1
Author: Noel Grandin 
AuthorDate: Thu May 30 10:06:57 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 30 17:21:46 2024 +0200

loplugin:ostr in sc/../optdlg

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

diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx 
b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index ec65fb9d8014..794c850c229e 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -57,14 +57,14 @@ sal_Int32 toSelectedItem( 
formula::FormulaGrammar::AddressConvention eConv )
 }
 
 ScCalcOptionsDialog::ScCalcOptionsDialog(weld::Window* pParent, const 
ScCalcConfig& rConfig, bool bWriteConfig)
-: GenericDialogController(pParent, 
"modules/scalc/ui/formulacalculationoptions.ui", "FormulaCalculationOptions")
+: GenericDialogController(pParent, 
u"modules/scalc/ui/formulacalculationoptions.ui"_ustr, 
u"FormulaCalculationOptions"_ustr)
 , maConfig(rConfig)
 , mbSelectedEmptyStringAsZero(rConfig.mbEmptyStringAsZero)
 , mbWriteConfig(bWriteConfig)
-, mxEmptyAsZero(m_xBuilder->weld_check_button("checkEmptyAsZero"))
-, mxConversion(m_xBuilder->weld_combo_box("comboConversion"))
-, mxCurrentDocOnly(m_xBuilder->weld_check_button("current_doc"))
-, mxSyntax(m_xBuilder->weld_combo_box("comboSyntaxRef"))
+, mxEmptyAsZero(m_xBuilder->weld_check_button(u"checkEmptyAsZero"_ustr))
+, mxConversion(m_xBuilder->weld_combo_box(u"comboConversion"_ustr))
+, mxCurrentDocOnly(m_xBuilder->weld_check_button(u"current_doc"_ustr))
+, mxSyntax(m_xBuilder->weld_combo_box(u"comboSyntaxRef"_ustr))
 {
 mxConversion->set_active(static_cast(rConfig.meStringConversion));
 mxConversion->connect_changed(LINK(this, ScCalcOptionsDialog, 
ConversionModifiedHdl));
diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx
index 9d3c1835dfc3..a5613649ddc0 100644
--- a/sc/source/ui/optdlg/opredlin.cxx
+++ b/sc/source/ui/optdlg/opredlin.cxx
@@ -30,19 +30,19 @@
 #include 
 
 ScRedlineOptionsTabPage::ScRedlineOptionsTabPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rSet)
-: SfxTabPage(pPage, pController, "modules/scalc/ui/optchangespage.ui", 
"OptChangesPage", )
-, m_xContentColorLB(new 
ColorListBox(m_xBuilder->weld_menu_button("changes"),
+: SfxTabPage(pPage, pController, 
u"modules/scalc/ui/optchangespage.ui"_ustr, u"OptChangesPage"_ustr, )
+, m_xContentColorLB(new 
ColorListBox(m_xBuilder->weld_menu_button(u"changes"_ustr),
 [this]{ return GetDialogController()->getDialog(); }))
-, m_xContentColorImg(m_xBuilder->weld_widget("lockchanges"))
-, m_xRemoveColorLB(new 
ColorListBox(m_xBuilder->weld_menu_button("deletions"),
+, m_xContentColorImg(m_xBuilder->weld_widget(u"lockchanges"_ustr))
+, m_xRemoveColorLB(new 
ColorListBox(m_xBuilder->weld_menu_button(u"deletions"_ustr),
 [this]{ return GetDialogController()->getDialog(); }))
-, m_xRemoveColorImg(m_xBuilder->weld_widget("lockdeletions"))
-, m_xInsertColorLB(new 
ColorListBox(m_xBuilder->weld_menu_button("entries"),
+, m_xRemoveColorImg(m_xBuilder->weld_widget(u"lockdeletions"_ustr))
+, m_xInsertColorLB(new 
ColorListBox(m_xBuilder->weld_menu_button(u"entries"_ustr),
 [this]{ return GetDialogController()->getDialog(); }))
-, m_xInsertColorImg(m_xBuilder->weld_widget("lockentries"))
-, m_xMoveColorLB(new 
ColorListBox(m_xBuilder->weld_menu_button("insertions"),
+, m_xInsertColorImg(m_xBuilder->weld_widget(u"lockentries"_ustr))
+, m_xMoveColorLB(new 
ColorListBox(m_xBuilder->weld_menu_button(u"insertions"_ustr),
 [this]{ return GetDialogController()->getDialog(); }))
-, m_xMoveColorImg(m_xBuilder->weld_widget("lockinsertions"))
+, m_xMoveColo

core.git: Changes to 'feature/gsoc24-lua'

2024-05-30 Thread Noel Grandin (via logerrit)
New branch 'feature/gsoc24-lua' available with the following commits:


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

2024-05-30 Thread Noel Grandin (via logerrit)
 sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx|   56 ++--
 sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx |   10 
 sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx   |4 
 sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx|4 
 sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx |4 
 sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx  |6 
 sc/source/ui/StatisticsDialogs/FTestDialog.cxx |   26 +-
 sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx   |   18 -
 sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx |   10 
 sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx |   34 +-
 sc/source/ui/StatisticsDialogs/RegressionDialog.cxx|  130 
+-
 sc/source/ui/StatisticsDialogs/SamplingDialog.cxx  |   30 +-
 sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx |   20 -
 sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx |   26 +-
 sc/source/ui/StatisticsDialogs/TTestDialog.cxx |   18 -
 sc/source/ui/StatisticsDialogs/ZTestDialog.cxx |   26 +-
 sw/source/core/edit/edattr.cxx |   10 
 17 files changed, 214 insertions(+), 218 deletions(-)

New commits:
commit be568bf78939942153294727556a466e235e04d3
Author: Noel Grandin 
AuthorDate: Thu May 30 10:06:22 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 30 17:21:38 2024 +0200

loplugin:ostr in sc/../StatisticsDialogs

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

diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx 
b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index 6f1fccd9cb0d..acfab698b601 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -90,13 +90,13 @@ ScAnalysisOfVarianceDialog::ScAnalysisOfVarianceDialog(
 weld::Window* pParent, ScViewData& rViewData )
 : ScStatisticsInputOutputDialog(
 pSfxBindings, pChildWindow, pParent, rViewData,
-"modules/scalc/ui/analysisofvariancedialog.ui",
-"AnalysisOfVarianceDialog")
+u"modules/scalc/ui/analysisofvariancedialog.ui"_ustr,
+u"AnalysisOfVarianceDialog"_ustr)
 , meFactor(SINGLE_FACTOR)
-, mxAlphaField(m_xBuilder->weld_spin_button("alpha-spin"))
-, mxSingleFactorRadio(m_xBuilder->weld_radio_button("radio-single-factor"))
-, mxTwoFactorRadio(m_xBuilder->weld_radio_button("radio-two-factor"))
-, 
mxRowsPerSampleField(m_xBuilder->weld_spin_button("rows-per-sample-spin"))
+, mxAlphaField(m_xBuilder->weld_spin_button(u"alpha-spin"_ustr))
+, 
mxSingleFactorRadio(m_xBuilder->weld_radio_button(u"radio-single-factor"_ustr))
+, mxTwoFactorRadio(m_xBuilder->weld_radio_button(u"radio-two-factor"_ustr))
+, 
mxRowsPerSampleField(m_xBuilder->weld_spin_button(u"rows-per-sample-spin"_ustr))
 {
 mxSingleFactorRadio->connect_toggled( LINK( this, 
ScAnalysisOfVarianceDialog, FactorChanged ) );
 mxTwoFactorRadio->connect_toggled( LINK( this, ScAnalysisOfVarianceDialog, 
FactorChanged ) );
@@ -188,7 +188,7 @@ void 
ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output,
 output.writeString(ScResId(STR_LABEL_ALPHA));
 output.nextColumn();
 output.writeValue(aAlphaValue);
-aTemplate.autoReplaceAddress("%ALPHA%", output.current());
+aTemplate.autoReplaceAddress(u"%ALPHA%"_ustr, output.current());
 output.newLine();
 output.newLine();
 
@@ -232,7 +232,7 @@ void 
ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output,
 }
 output.nextRow();
 
-aTemplate.autoReplaceRange("%FIRST_COLUMN%", aRangeList[0]);
+aTemplate.autoReplaceRange(u"%FIRST_COLUMN%"_ustr, aRangeList[0]);
 
 // Between Groups
 {
@@ -243,26 +243,26 @@ void 
ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output,
 
 // Sum of Squares
 
aTemplate.setTemplate("=SUMPRODUCT(%SUM_RANGE%;%MEAN_RANGE%)-SUM(%SUM_RANGE%)^2/SUM(%COUNT_RANGE%)");
-aTemplate.autoReplaceAddress("%BETWEEN_SS%", output.current());
+aTemplate.autoReplaceAddress(u"%BETWEEN_SS%"_ustr, output.current());
 output.writeFormula(aTemplate.getTemplate());
 output.nextColumn();
 
 // Degree of freedom
 aTemplate.setTemplate("=COUNT(%SUM_RANGE%)-1");
-aTemplate.autoReplaceAddress("%BETWEEN_DF%", output.current());
+aTemplate.autoRep

core.git: include/svl sw/inc sw/source

2024-05-30 Thread Noel Grandin (via logerrit)
 include/svl/hint.hxx   |6 ++
 sw/inc/hints.hxx   |7 ---
 sw/source/core/attr/hints.cxx  |   15 ---
 sw/source/core/text/txtfrm.cxx |   12 ++--
 4 files changed, 16 insertions(+), 24 deletions(-)

New commits:
commit 91dbd5ca9fa2e689dcdbc5be4a60c8b65cbefc9f
Author: Noel Grandin 
AuthorDate: Wed May 29 19:26:44 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 30 09:18:33 2024 +0200

avoid some dynamic_cast in SwTextFrame

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

diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index b802f786312b..3dd3db1763ea 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -163,6 +163,9 @@ enum class SfxHintId {
 SwModifyChanged,
 SwAttr,
 SwDocumentDying,
+SwRedlineDelText,
+SwRedlineUnDelText,
+SwMoveText,
 
 ThisIsAnSdrHint,
 ThisIsAnSfxEventHint
@@ -257,6 +260,9 @@ inline std::basic_ostream & operator <<(
 case SfxHintId::SwModifyChanged: return stream << "SwModifyChanged";
 case SfxHintId::SwAttr: return stream << "SwAttr";
 case SfxHintId::SwDocumentDying: return stream << "SwDocumentDying";
+case SfxHintId::SwRedlineDelText: return stream << "SwRedlineDelText";
+case SfxHintId::SwRedlineUnDelText: return stream << "SwRedlineUnDelText";
+case SfxHintId::SwMoveText: return stream << "SwMoveText";
 case SfxHintId::ThisIsAnSdrHint: return stream << "SdrHint";
 default: return stream << "unk(" << std::to_string(int(id)) << ")";
 }
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index 15836add1988..a05d63dfe135 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -92,7 +92,8 @@ public:
 sal_Int32 nSourceStart;
 sal_Int32 nLen;
 
-MoveText(SwTextNode *pD, sal_Int32 nD, sal_Int32 nS, sal_Int32 nL);
+MoveText(SwTextNode *pD, sal_Int32 nD, sal_Int32 nS, sal_Int32 nL)
+: SfxHint(SfxHintId::SwMoveText), pDestNode(pD), nDestStart(nD), 
nSourceStart(nS), nLen(nL) {}
 };
 
 class InsertText final : public SfxHint
@@ -130,7 +131,7 @@ public:
 sal_Int32 nStart;
 sal_Int32 nLen;
 
-RedlineDelText(sal_Int32 nS, sal_Int32 nL);
+RedlineDelText(sal_Int32 nS, sal_Int32 nL) : 
SfxHint(SfxHintId::SwRedlineDelText), nStart(nS), nLen(nL) {}
 };
 
 /// delete redline is removed
@@ -140,7 +141,7 @@ public:
 sal_Int32 nStart;
 sal_Int32 nLen;
 
-RedlineUnDelText(sal_Int32 nS, sal_Int32 nL);
+RedlineUnDelText(sal_Int32 nS, sal_Int32 nL) : 
SfxHint(SfxHintId::SwRedlineUnDelText), nStart(nS), nLen(nL) {}
 };
 
 /** DocPosUpdate is sent to signal that only the frames from or to a specified 
document-global position
diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx
index 0190d415daff..b1036be3b2e8 100644
--- a/sw/source/core/attr/hints.cxx
+++ b/sw/source/core/attr/hints.cxx
@@ -37,11 +37,6 @@ SwFormatChg::SwFormatChg( SwFormat* pFormat )
 
 namespace sw {
 
-MoveText::MoveText(SwTextNode *const pD, sal_Int32 const nD, sal_Int32 const 
nS, sal_Int32 const nL)
-: pDestNode(pD), nDestStart(nD), nSourceStart(nS), nLen(nL)
-{
-}
-
 InsertText::InsertText(const sal_Int32 nP, const sal_Int32 nL, const bool 
isInFMCommand, const bool isInFMResult)
 : SfxHint( SfxHintId::SwInsertText )
 , nPos( nP ), nLen( nL )
@@ -60,16 +55,6 @@ DeleteChar::DeleteChar( const sal_Int32 nPos )
 {
 }
 
-RedlineDelText::RedlineDelText(sal_Int32 const nS, sal_Int32 const nL)
-: nStart(nS), nLen(nL)
-{
-}
-
-RedlineUnDelText::RedlineUnDelText(sal_Int32 const nS, sal_Int32 const nL)
-: nStart(nS), nLen(nL)
-{
-}
-
 VirtPageNumHint::VirtPageNumHint(const SwPageFrame* pPg):
 SfxHint(SfxHintId::SwVirtPageNumHint),
 m_pPage(nullptr),
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 8e5a1a904b80..179099eda623 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -2159,17 +2159,17 @@ void SwTextFrame::SwClientNotify(SwModify const& 
rModify, SfxHint const& rHint)
 pPage->UpdateVirtPageNumInfo(rVirtPageNumHint, this);
 return;
 }
-else if (auto const pHt = dynamic_cast())
+else if (rHint.GetId() == SfxHintId::SwMoveText)
 {
-pMoveText = pHt;
+pMoveText = static_cast();
 }
-else if (auto const pHynt = dynamic_cast())
+else if (rHint.GetId() == SfxHintId::SwRedlineDelText)
 {
-pRedlineDelText = pHynt;
+pRedlineDelText = static_cast();
 }
-else if (auto const pHnt = dynamic_cast())
+else if (rHint.GetId() == SfxHintId::SwRedlineUnDelText)
 {
-pRedlineUnDelText = pHnt;
+pRedlineUnDelText = static_cast();
 }
 else
 {


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

2024-05-30 Thread Noel Grandin (via logerrit)
 sw/inc/unocrsrhelper.hxx|3 +-
 sw/source/core/doc/DocumentContentOperationsManager.cxx |   11 +-
 sw/source/core/doc/docsort.cxx  |   10 +++--
 sw/source/core/unocore/unocrsrhelper.cxx|   17 +++-
 sw/source/uibase/uno/unotxvw.cxx|6 ++---
 5 files changed, 23 insertions(+), 24 deletions(-)

New commits:
commit 50a27ef3fb3d7ceab2acacdccd4048cbedb866f1
Author: Noel Grandin 
AuthorDate: Wed May 29 18:32:52 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 30 09:17:37 2024 +0200

reduce allocation of SwPaM

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

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 0e5e0db06be1..366cd276440b 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -95,6 +95,7 @@
 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star::i18n;
 
@@ -2051,10 +2052,10 @@ bool DocumentContentOperationsManager::CopyRange(SwPaM& 
rPam, SwPosition& rPos,
 }
 }
 
-SwPaM* pRedlineRange = nullptr;
+std::optional pRedlineRange;
 if( rDoc.getIDocumentRedlineAccess().IsRedlineOn() ||
 (!rDoc.getIDocumentRedlineAccess().IsIgnoreRedline() && 
!rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() ) )
-pRedlineRange = new SwPaM( rPos );
+pRedlineRange.emplace( rPos );
 
 RedlineFlags eOld = rDoc.getIDocumentRedlineAccess().GetRedlineFlags();
 
@@ -2062,7 +2063,7 @@ bool DocumentContentOperationsManager::CopyRange(SwPaM& 
rPam, SwPosition& rPos,
 
 if(  != _rDoc )
 {   // ordinary copy
-bRet = CopyImpl(rPam, rPos, flags & ~SwCopyFlags::CheckPosInFly, 
pRedlineRange);
+bRet = CopyImpl(rPam, rPos, flags & ~SwCopyFlags::CheckPosInFly, 
pRedlineRange ? &*pRedlineRange : nullptr);
 }
 else if( ! ( *pStt <= rPos && rPos < *pEnd &&
 ( pStt->GetNode() != pEnd->GetNode() ||
@@ -2070,7 +2071,7 @@ bool DocumentContentOperationsManager::CopyRange(SwPaM& 
rPam, SwPosition& rPos,
 {
 // Copy to a position outside of the area, or copy a single TextNode
 // Do an ordinary copy
-bRet = CopyImpl(rPam, rPos, flags & ~SwCopyFlags::CheckPosInFly, 
pRedlineRange);
+bRet = CopyImpl(rPam, rPos, flags & ~SwCopyFlags::CheckPosInFly, 
pRedlineRange ? &*pRedlineRange : nullptr);
 }
 else
 {
@@ -2086,7 +2087,7 @@ bool DocumentContentOperationsManager::CopyRange(SwPaM& 
rPam, SwPosition& rPos,
 new SwRangeRedline(RedlineType::Insert, *pRedlineRange, 
nMovedID), true);
 else
 rDoc.getIDocumentRedlineAccess().SplitRedline( *pRedlineRange );
-delete pRedlineRange;
+pRedlineRange.reset();
 }
 
 return bRet;
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 5be48cdedd30..df5aaf6e5c89 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -312,14 +312,14 @@ bool SwDoc::SortText(const SwPaM& rPaM, const 
SwSortOptions& rOpt)
 GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
 }
 
-SwPaM* pRedlPam = nullptr;
+std::optional pRedlPam;
 SwUndoRedlineSort* pRedlUndo = nullptr;
 SwUndoSort* pUndoSort = nullptr;
 
 // To-Do - add 'SwExtraRedlineTable' also ?
 if( getIDocumentRedlineAccess().IsRedlineOn() || 
(!getIDocumentRedlineAccess().IsIgnoreRedline() && 
!getIDocumentRedlineAccess().GetRedlineTable().empty() ))
 {
-pRedlPam = new SwPaM( pStart->GetNode(), pEnd->GetNode(), 
SwNodeOffset(-1), SwNodeOffset(1) );
+pRedlPam.emplace( pStart->GetNode(), pEnd->GetNode(), 
SwNodeOffset(-1), SwNodeOffset(1) );
 SwContentNode* pCNd = pRedlPam->GetMarkContentNode();
 if( pCNd )
 pRedlPam->GetMark()->SetContent( pCNd->Len() );
@@ -362,8 +362,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const 
SwSortOptions& rOpt)
 else
 {
 getIDocumentRedlineAccess().DeleteRedline( *pRedlPam, true, 
RedlineType::Any );
-delete pRedlPam;
-pRedlPam = nullptr;
+pRedlPam.reset();
 }
 }
 
@@ -447,8 +446,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const 
SwSortOptions& rOpt)
 pRedlUndo->SetValues( *pRedlPam );
 }
 
-delete pRedlPam;
-pRedlPam = nullptr;
+pRedlPam.reset();
 }
 GetIDocumentUndoRedo().DoUndo( bUndo );
 if( bUndo )
commit ee4d61b08dabe1c184a49c7301a301ed0dcfc710
Author: No

core.git: sw/source

2024-05-29 Thread Noel Grandin (via logerrit)
 sw/source/core/doc/docredln.cxx |   18 +++---
 1 file changed, 7 insertions(+), 11 deletions(-)

New commits:
commit 941d03968cc12a6f7badc2641decd91dbd8f0244
Author: Noel Grandin 
AuthorDate: Tue May 28 15:26:19 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 29 18:19:23 2024 +0200

simplify and reduce allocation in SwRedlineTable::getTextOfArea

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

diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index b5a9059a579d..9860964a89d6 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -872,33 +872,29 @@ OUString SwRedlineTable::getTextOfArea(size_type 
rPosStart, size_type rPosEnd) c
 SwRangeRedline* pRedline = (*this)[nIdx];
 bool bStartWithNonTextNode = false;
 
-SwPaM *pPaM;
-bool bDeletePaM = false;
+OUString sNew;
 if (nullptr == pRedline->GetContentIdx())
 {
-pPaM = pRedline;
+sNew = pRedline->GetText();
 }
 else // otherwise it is saved in pContentSect, e.g. during ODT import
 {
-pPaM = new SwPaM(pRedline->GetContentIdx()->GetNode(),
+SwPaM aTmpPaM(pRedline->GetContentIdx()->GetNode(),
   
*pRedline->GetContentIdx()->GetNode().EndOfSectionNode());
-if (!pPaM->Start()->nNode.GetNode().GetTextNode())
+if (!aTmpPaM.Start()->nNode.GetNode().GetTextNode())
 {
 bStartWithNonTextNode = true;
 }
-bDeletePaM = true;
+sNew = aTmpPaM.GetText();
 }
-const OUString sNew = pPaM->GetText();
 
 if (bStartWithNonTextNode &&
 sNew[0] == CH_TXTATR_NEWLINE)
 {
-sRet += pPaM->GetText().subView(1);
+sRet += sNew.subView(1);
 }
 else
-sRet += pPaM->GetText();
-if (bDeletePaM)
-delete pPaM;
+sRet += sNew;
 }
 
 return sRet;


core.git: sw/source

2024-05-29 Thread Noel Grandin (via logerrit)
 sw/source/core/doc/docredln.cxx |   29 ++---
 1 file changed, 6 insertions(+), 23 deletions(-)

New commits:
commit e4ca7aa44ad9856c2e5753e749dc031f8fec6a3f
Author: Noel Grandin 
AuthorDate: Tue May 28 15:33:12 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 29 12:55:52 2024 +0200

simplify and reduce allocation in SwRedlineTable

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

diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index b5a022d8effc..b5a9059a579d 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -932,8 +932,6 @@ bool SwRedlineTable::isMovedImpl(size_type rPos, bool 
bTryCombined) const
 // only deleted or inserted text can be moved
 return false;
 
-bool bDeletePaM = false;
-SwPaM* pPaM = nullptr;
 OUString sTrimmed;
 SwRedlineTable::size_type nPosStart = rPos;
 SwRedlineTable::size_type nPosEnd = rPos;
@@ -950,16 +948,14 @@ bool SwRedlineTable::isMovedImpl(size_type rPos, bool 
bTryCombined) const
 // if this redline is visible the content is in this PaM
 if (nullptr == pRedline->GetContentIdx())
 {
-pPaM = pRedline;
+sTrimmed = pRedline->GetText().trim();
 }
 else // otherwise it is saved in pContentSect, e.g. during ODT import
 {
-pPaM = new SwPaM(pRedline->GetContentIdx()->GetNode(),
+SwPaM aTmpPaM(pRedline->GetContentIdx()->GetNode(),
  
*pRedline->GetContentIdx()->GetNode().EndOfSectionNode());
-bDeletePaM = true;
+sTrimmed = aTmpPaM.GetText().trim();
 }
-
-sTrimmed = pPaM->GetText().trim();
 }
 
 // detection of move needs at least 6 characters with an inner
@@ -968,8 +964,6 @@ bool SwRedlineTable::isMovedImpl(size_type rPos, bool 
bTryCombined) const
 // word parts, e.g. 'the' and 'of a' to detect as text moving
 if (sTrimmed.getLength() < 6 || sTrimmed.indexOf(' ') == -1)
 {
-if (bDeletePaM)
-delete pPaM;
 return false;
 }
 
@@ -995,9 +989,6 @@ bool SwRedlineTable::isMovedImpl(size_type rPos, bool 
bTryCombined) const
 continue;
 }
 
-bool bDeletePairPaM = false;
-SwPaM* pPairPaM = nullptr;
-
 OUString sPairTrimmed = "";
 SwRedlineTable::size_type nPairStart = nPosAct;
 SwRedlineTable::size_type nPairEnd = nPosAct;
@@ -1007,17 +998,15 @@ bool SwRedlineTable::isMovedImpl(size_type rPos, bool 
bTryCombined) const
 // if this redline is visible the content is in this PaM
 if (nullptr == pPair->GetContentIdx())
 {
-pPairPaM = pPair;
+sPairTrimmed = o3tl::trim(pPair->GetText());
 }
 else // otherwise it is saved in pContentSect, e.g. during ODT 
import
 {
 // saved in pContentSect, e.g. during ODT import
-pPairPaM = new SwPaM(pPair->GetContentIdx()->GetNode(),
+SwPaM aPairPaM(pPair->GetContentIdx()->GetNode(),
  
*pPair->GetContentIdx()->GetNode().EndOfSectionNode());
-bDeletePairPaM = true;
+sPairTrimmed = o3tl::trim(aPairPaM.GetText());
 }
-
-sPairTrimmed = o3tl::trim(pPairPaM->GetText());
 }
 else
 {
@@ -1053,18 +1042,12 @@ bool SwRedlineTable::isMovedImpl(size_type rPos, bool 
bTryCombined) const
 bRet = true;
 }
 
-if (bDeletePairPaM)
-delete pPairPaM;
-
 //we can skip the combined redlines
 if (nPass == 1)
 nPosAct = nPairEnd;
 }
 }
 
-if ( bDeletePaM )
-delete pPaM;
-
 return bRet;
 }
 


core.git: sw/source

2024-05-29 Thread Noel Grandin (via logerrit)
 sw/source/writerfilter/dmapper/BorderHandler.cxx|   16 
 sw/source/writerfilter/dmapper/CellColorHandler.cxx |   20 
 sw/source/writerfilter/dmapper/CellMarginHandler.cxx|   12 
 sw/source/writerfilter/dmapper/DocumentProtection.cxx   |   22 
 sw/source/writerfilter/dmapper/DomainMapper.cxx |  220 ++--
 sw/source/writerfilter/dmapper/DomainMapperTableHandler.cxx |   76 -
 sw/source/writerfilter/dmapper/DomainMapperTableManager.cxx |   14 
 sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx|  598 ++--
 sw/source/writerfilter/dmapper/FormControlHelper.cxx|   42 
 sw/source/writerfilter/dmapper/GraphicHelpers.cxx   |4 
 sw/source/writerfilter/dmapper/GraphicImport.cxx|  160 +--
 sw/source/writerfilter/dmapper/MeasureHandler.cxx   |8 
 sw/source/writerfilter/dmapper/NumberingManager.cxx |4 
 sw/source/writerfilter/dmapper/OLEHandler.cxx   |   10 
 sw/source/writerfilter/dmapper/PropertyMap.cxx  |   72 -
 sw/source/writerfilter/dmapper/SdtHelper.cxx|   36 
 sw/source/writerfilter/dmapper/SettingsTable.cxx|   66 -
 sw/source/writerfilter/dmapper/StyleSheetTable.cxx  |   64 -
 sw/source/writerfilter/dmapper/TDefTableHandler.cxx |  446 
 sw/source/writerfilter/dmapper/TablePositionHandler.cxx |   44 
 sw/source/writerfilter/dmapper/TablePositionHandler.hxx |4 
 sw/source/writerfilter/dmapper/TablePropertiesHandler.cxx   |   14 
 sw/source/writerfilter/dmapper/TblStylePrHandler.cxx|   40 
 sw/source/writerfilter/dmapper/TextEffectsHandler.cxx   |  512 +-
 sw/source/writerfilter/dmapper/ThemeHandler.cxx |   86 -
 sw/source/writerfilter/dmapper/WriteProtection.cxx  |8 
 sw/source/writerfilter/filter/RtfFilter.cxx |   18 
 sw/source/writerfilter/filter/WriterFilter.cxx  |   67 -
 sw/source/writerfilter/ooxml/OOXMLDocumentImpl.cxx  |   10 
 sw/source/writerfilter/ooxml/OOXMLFastContextHandler.cxx|6 
 sw/source/writerfilter/rtftok/rtfdispatchdestination.cxx|5 
 sw/source/writerfilter/rtftok/rtfdispatchflag.cxx   |   21 
 sw/source/writerfilter/rtftok/rtfdispatchsymbol.cxx |6 
 sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx  |4 
 sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx   |   44 
 sw/source/writerfilter/rtftok/rtfdocumentimpl.hxx   |6 
 sw/source/writerfilter/rtftok/rtfsdrimport.cxx  |  137 +-
 sw/source/writerfilter/rtftok/rtfsprm.cxx   |2 
 38 files changed, 1472 insertions(+), 1452 deletions(-)

New commits:
commit 5edbc4fd99db9fa568143aa4fa15b29de4bcc48b
Author: Noel Grandin 
AuthorDate: Thu May 16 13:32:29 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 29 12:55:31 2024 +0200

loplugin:ostr in sw/../writerfilter

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

diff --git a/sw/source/writerfilter/dmapper/BorderHandler.cxx 
b/sw/source/writerfilter/dmapper/BorderHandler.cxx
index ed14194c2a01..ad37a1d46c35 100644
--- a/sw/source/writerfilter/dmapper/BorderHandler.cxx
+++ b/sw/source/writerfilter/dmapper/BorderHandler.cxx
@@ -58,37 +58,37 @@ void BorderHandler::lcl_attribute(Id rName, Value & rVal)
 case NS_ooxml::LN_CT_Border_sz:
 //  width of a single line in 1/8 pt, max of 32 pt -> twip * 5 / 2.
 m_nLineWidth = nIntValue * 5 / 2;
-appendGrabBag("sz", OUString::number(nIntValue));
+appendGrabBag(u"sz"_ustr, OUString::number(nIntValue));
 break;
 case NS_ooxml::LN_CT_Border_val:
 m_nLineType = nIntValue;
-appendGrabBag("val", 
TDefTableHandler::getBorderTypeString(nIntValue));
+appendGrabBag(u"val"_ustr, 
TDefTableHandler::getBorderTypeString(nIntValue));
 break;
 case NS_ooxml::LN_CT_Border_color:
 m_nLineColor = nIntValue;
-appendGrabBag("color", 
msfilter::util::ConvertColorOU(Color(ColorTransparency, nIntValue)));
+appendGrabBag(u"color"_ustr, 
msfilter::util::ConvertColorOU(Color(ColorTransparency, nIntValue)));
 break;
 case NS_ooxml::LN_CT_Border_space: // border distance in points
 m_nLineDistance = ConversionHelper::convertTwipToMM100( nIntValue 
* 20 );
-appendGrabBag("space", OUString::number(nIntValue));
+appendGrabBag(u"space"_ustr, OUString::number(nIntValue));
 break;
 case NS_ooxml::LN_CT_Border_shadow:
 m_bShadow = nIntValue;
 break;
 case NS_ooxml::LN_CT_Border_frame:
-appendGrabBag("frame", OUString:

core.git: 2 commits - include/svl sw/inc sw/source

2024-05-29 Thread Noel Grandin (via logerrit)
 include/svl/hint.hxx   |3 +++
 sw/inc/hints.hxx   |4 
 sw/inc/tox.hxx |2 +-
 sw/source/core/crsr/crsrsh.cxx |2 +-
 4 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 2be07e3c42b2c59a75f6ebb90e6f806c369483cb
Author: Noel Grandin 
AuthorDate: Tue May 28 18:46:37 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 29 12:55:15 2024 +0200

avoid dynamic_cast in SwCursorShell

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

diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index 2ce114824045..b802f786312b 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -121,6 +121,7 @@ enum class SfxHintId {
 SwNavigatorUpdateTracking,
 SwNavigatorSelectOutlinesWithSelections,
 SwPreGraphicArrived,
+SwPostGraphicArrived,
 SwGraphicPieceArrived,
 SwLinkedGraphicStreamArrived,
 SwLegacyModify,
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index a63ed932e944..15836add1988 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -186,6 +186,8 @@ public:
 
 class PostGraphicArrivedHint final : public SfxHint
 {
+public:
+PostGraphicArrivedHint() : SfxHint(SfxHintId::SwPostGraphicArrived) {}
 };
 
 class GraphicPieceArrivedHint final : public SfxHint
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index d3b39a4ae2c4..f0dd6e938c14 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2848,7 +2848,7 @@ SwContentFrame *SwCursorShell::GetCurrFrame( const bool 
bCalcFrame ) const
 */
 void SwCursorShell::SwClientNotify(const SwModify&, const SfxHint& rHint)
 {
-if(dynamic_cast() && 
m_aGrfArrivedLnk.IsSet())
+if (rHint.GetId() == SfxHintId::SwPostGraphicArrived && 
m_aGrfArrivedLnk.IsSet())
 {
 m_aGrfArrivedLnk.Call(*this);
 return;
commit 3a604beae75a1157e9bb4cf620cc7ad4d007ab45
Author: Noel Grandin 
AuthorDate: Tue May 28 18:34:45 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 29 12:55:07 2024 +0200

avoid dynamic_cast in SwTOXBase

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

diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index 0a7459175905..2ce114824045 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -161,6 +161,7 @@ enum class SfxHintId {
 SwFindRedline,
 SwModifyChanged,
 SwAttr,
+SwDocumentDying,
 
 ThisIsAnSdrHint,
 ThisIsAnSfxEventHint
@@ -254,6 +255,7 @@ inline std::basic_ostream & operator <<(
 case SfxHintId::SwFindRedline: return stream << "SwFindRedline";
 case SfxHintId::SwModifyChanged: return stream << "SwModifyChanged";
 case SfxHintId::SwAttr: return stream << "SwAttr";
+case SfxHintId::SwDocumentDying: return stream << "SwDocumentDying";
 case SfxHintId::ThisIsAnSdrHint: return stream << "SdrHint";
 default: return stream << "unk(" << std::to_string(int(id)) << ")";
 }
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index fa7a78200a26..a63ed932e944 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -218,6 +218,8 @@ public:
 
 class DocumentDyingHint final : public SfxHint
 {
+public:
+DocumentDyingHint() : SfxHint(SfxHintId::SwDocumentDying) {}
 };
 
 class TableLineFormatChanged final : public SfxHint
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index bd5e89101341..44d392909341 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -465,7 +465,7 @@ public:
 
 virtual void SwClientNotify(const SwModify& rMod, const SfxHint& rHint) 
override
 {
-if(dynamic_cast())
+if(rHint.GetId() == SfxHintId::SwDocumentDying)
 GetRegisteredIn()->Remove(*this);
 else
 SwClient::SwClientNotify(rMod, rHint);


core.git: include/svl sw/source

2024-05-29 Thread Noel Grandin (via logerrit)
 include/svl/hint.hxx |2 ++
 sw/source/core/inc/attrhint.hxx  |5 +
 sw/source/core/txtnode/ndtxt.cxx |2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 7449378435627e466e69c2becd07b17ad7d7ff9b
Author: Noel Grandin 
AuthorDate: Tue May 28 18:25:47 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 29 11:19:41 2024 +0200

avoid dynamic_cast in SwTextNode

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

diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index fc54ac23fc99..0a7459175905 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -160,6 +160,7 @@ enum class SfxHintId {
 SwFormatField,
 SwFindRedline,
 SwModifyChanged,
+SwAttr,
 
 ThisIsAnSdrHint,
 ThisIsAnSfxEventHint
@@ -252,6 +253,7 @@ inline std::basic_ostream & operator <<(
 case SfxHintId::SwFormatField: return stream << "SwFormatField";
 case SfxHintId::SwFindRedline: return stream << "SwFindRedline";
 case SfxHintId::SwModifyChanged: return stream << "SwModifyChanged";
+case SfxHintId::SwAttr: return stream << "SwAttr";
 case SfxHintId::ThisIsAnSdrHint: return stream << "SdrHint";
 default: return stream << "unk(" << std::to_string(int(id)) << ")";
 }
diff --git a/sw/source/core/inc/attrhint.hxx b/sw/source/core/inc/attrhint.hxx
index e098b2695244..261839c5bbc4 100644
--- a/sw/source/core/inc/attrhint.hxx
+++ b/sw/source/core/inc/attrhint.hxx
@@ -24,6 +24,11 @@
 
 class SwAttrHint final : public SfxHint
 {
+public:
+SwAttrHint()
+: SfxHint(SfxHintId::SwAttr)
+{
+}
 };
 
 #endif
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 1d71a1cd8169..4cb8534ab205 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -5552,7 +5552,7 @@ void SwTextNode::SwClientNotify( const SwModify& rModify, 
const SfxHint& rHint )
 auto pLegacyHint = static_cast();
 TriggerNodeUpdate(*pLegacyHint);
 }
-else if (dynamic_cast())
+else if (rHint.GetId() == SfxHintId::SwAttr)
 {
 if ( == GetRegisteredIn())
 ChkCondColl();


core.git: desktop/inc desktop/source

2024-05-28 Thread Noel Grandin (via logerrit)
 desktop/inc/app.hxx|1 -
 desktop/source/app/app.cxx |5 +
 2 files changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 8a5f822897434cffe1991325ea18014734bfa24e
Author: Noel Grandin 
AuthorDate: Tue May 28 12:32:29 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 28 18:02:22 2024 +0200

tdf#161048 Revert "move opencl check at startup inside its own thread"

This reverts commit 7d1242b01d3ad9be1cfcf2bd3fbee9ce63df.

Intel's OpenCL driver gets stuck during shutdown and blocks the process 
from exiting

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

diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index 7a789b59b55a..0c96240f1b0d 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -169,7 +169,6 @@ class Desktop final : public Application
 std::unique_ptr m_xLockfile;
 Timer   m_firstRunTimer;
 std::thread m_aUpdateThread;
-std::thread m_aOpenCLCheckThread;
 };
 
 OUString GetURL_Impl(
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 7075d6afcb89..b00dd75a39e6 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1613,7 +1613,7 @@ int Desktop::Main()
 
 // FIXME: move this somewhere sensible.
 #if HAVE_FEATURE_OPENCL
-m_aOpenCLCheckThread = std::thread(CheckOpenCLCompute, xDesktop);
+CheckOpenCLCompute(xDesktop);
 #endif
 
 #if !defined(EMSCRIPTEN)
@@ -1670,9 +1670,6 @@ int Desktop::doShutdown()
 if (m_aUpdateThread.joinable())
 m_aUpdateThread.join();
 
-if (m_aOpenCLCheckThread.joinable())
-m_aOpenCLCheckThread.join();
-
 if (pExecGlobals->xJVMloadThread.is())
 {
 pExecGlobals->xJVMloadThread->join();


core.git: 2 commits - include/svl sc/source sw/inc sw/source

2024-05-28 Thread Noel Grandin (via logerrit)
 include/svl/hint.hxx|2 
 sc/source/ui/unoobj/ChartRangeSelectionListener.cxx |2 
 sc/source/ui/unoobj/PivotTableDataProvider.cxx  |   12 -
 sc/source/ui/unoobj/PivotTableDataSequence.cxx  |2 
 sc/source/ui/unoobj/PivotTableDataSource.cxx|2 
 sc/source/ui/unoobj/TablePivotChart.cxx |2 
 sc/source/ui/unoobj/TablePivotCharts.cxx|2 
 sc/source/ui/unoobj/addruno.cxx |2 
 sc/source/ui/unoobj/afmtuno.cxx |   10 -
 sc/source/ui/unoobj/appluno.cxx |   12 -
 sc/source/ui/unoobj/celllistsource.cxx  |   18 +-
 sc/source/ui/unoobj/cellsuno.cxx|   34 ++---
 sc/source/ui/unoobj/cellvaluebinding.cxx|   20 +--
 sc/source/ui/unoobj/chart2uno.cxx   |   14 +-
 sc/source/ui/unoobj/chartuno.cxx|   16 +-
 sc/source/ui/unoobj/condformatuno.cxx   |4 
 sc/source/ui/unoobj/confuno.cxx |   18 +-
 sc/source/ui/unoobj/cursuno.cxx |2 
 sc/source/ui/unoobj/dapiuno.cxx |   80 ++--
 sc/source/ui/unoobj/datauno.cxx |   18 +-
 sc/source/ui/unoobj/defltuno.cxx|2 
 sc/source/ui/unoobj/docuno.cxx  |   86 ++---
 sc/source/ui/unoobj/eventuno.cxx|4 
 sc/source/ui/unoobj/exceldetect.cxx |   18 +-
 sc/source/ui/unoobj/fielduno.cxx|   16 +-
 sc/source/ui/unoobj/filtuno.cxx |4 
 sc/source/ui/unoobj/fmtuno.cxx  |8 -
 sc/source/ui/unoobj/funcuno.cxx |2 
 sc/source/ui/unoobj/linkuno.cxx |   28 ++--
 sc/source/ui/unoobj/miscuno.cxx |4 
 sc/source/ui/unoobj/nameuno.cxx |   16 +-
 sc/source/ui/unoobj/notesuno.cxx|2 
 sc/source/ui/unoobj/pageuno.cxx |4 
 sc/source/ui/unoobj/scdetect.cxx|6 
 sc/source/ui/unoobj/servuno.cxx |  130 ++--
 sc/source/ui/unoobj/shapeuno.cxx|6 
 sc/source/ui/unoobj/srchuno.cxx |2 
 sc/source/ui/unoobj/styleuno.cxx|   10 -
 sc/source/ui/unoobj/targuno.cxx |6 
 sc/source/ui/unoobj/textuno.cxx |8 -
 sc/source/ui/unoobj/tokenuno.cxx|2 
 sc/source/ui/unoobj/viewuno.cxx |6 
 sc/source/ui/unoobj/warnpassword.cxx|2 
 sw/inc/calbck.hxx   |2 
 sw/source/core/doc/docftn.cxx   |3 
 sw/source/core/docnode/node.cxx |3 
 sw/source/core/fields/ddetbl.cxx|3 
 sw/source/core/layout/pagedesc.cxx  |3 
 sw/source/core/unocore/unoidx.cxx   |3 
 49 files changed, 334 insertions(+), 327 deletions(-)

New commits:
commit 592947c1a421eae46d6268798cf3eab6bc6f0dc6
Author: Noel Grandin 
AuthorDate: Tue May 28 11:40:58 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 28 18:02:08 2024 +0200

loplugin:ostr in sc/../unoobj

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

diff --git a/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx 
b/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx
index eae58aee6f7a..4f1523d77857 100644
--- a/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx
+++ b/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx
@@ -30,7 +30,7 @@ using namespace ::com::sun::star;
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::Sequence;
 
-SC_SIMPLE_SERVICE_INFO( ScChartRangeSelectionListener, 
"ScChartRangeSelectionListener",
+SC_SIMPLE_SERVICE_INFO( ScChartRangeSelectionListener, 
u"ScChartRangeSelectionListener"_ustr,
 SC_SERVICENAME_CHRANGEHILIGHT )
 
 ScChartRangeSelectionListener::ScChartRangeSelectionListener( ScTabViewShell * 
pViewShell ) :
diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx 
b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
index 84178fba6d56..16a8237e391b 100644
--- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx
+++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
@@ -130,7 +130,7 @@ std::vector lcl_getVisiblePageMembers(const 
uno::Reference xResult = 
newLabeledDataSequence();
 rtl::Reference pSequence(new 
PivotTableDataSequence(m_pDocument,

lcl_identifierForCategories(), std::vector(rCategories)));
-pSequence->setRole("categories");
+pSequence->setRole(u"categories"_ustr);
   

core.git: 2 commits - include/svl sc/source sw/inc sw/source

2024-05-28 Thread Noel Grandin (via logerrit)
 include/svl/hint.hxx |2 
 sc/source/ui/dbgui/PivotLayoutDialog.cxx |   56 +--
 sc/source/ui/dbgui/consdlg.cxx   |   36 ++--
 sc/source/ui/dbgui/csvtablebox.cxx   |8 +-
 sc/source/ui/dbgui/dapidata.cxx  |8 +-
 sc/source/ui/dbgui/dapitype.cxx  |   28 -
 sc/source/ui/dbgui/dbnamdlg.cxx  |   38 ++---
 sc/source/ui/dbgui/dpgroupdlg.cxx|   40 ++---
 sc/source/ui/dbgui/filtdlg.cxx   |   86 ++---
 sc/source/ui/dbgui/pfiltdlg.cxx  |   32 +--
 sc/source/ui/dbgui/pvfundlg.cxx  |   90 +++
 sc/source/ui/dbgui/scendlg.cxx   |   24 
 sc/source/ui/dbgui/scuiasciiopt.cxx  |   82 ++--
 sc/source/ui/dbgui/scuiimoptdlg.cxx  |   28 -
 sc/source/ui/dbgui/sfiltdlg.cxx  |   38 ++---
 sc/source/ui/dbgui/sortdlg.cxx   |   18 +++---
 sc/source/ui/dbgui/sortkeydlg.cxx|   12 ++--
 sc/source/ui/dbgui/subtdlg.cxx   |   12 ++--
 sc/source/ui/dbgui/textimportoptions.cxx |   16 ++---
 sc/source/ui/dbgui/tpsort.cxx|   42 +++---
 sc/source/ui/dbgui/tpsubt.cxx|   34 +--
 sc/source/ui/dbgui/validate.cxx  |   40 ++---
 sw/inc/unoredline.hxx|3 -
 sw/source/core/unocore/unoredline.cxx|5 +
 24 files changed, 392 insertions(+), 386 deletions(-)

New commits:
commit aea4dd58521b5621463c653a47275808a315edd6
Author: Noel Grandin 
AuthorDate: Mon May 27 21:45:15 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 28 18:01:46 2024 +0200

avoid dynamic_cast in SwXRedline

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

diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index 98c37e4b7baa..31564677dd32 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -158,6 +158,7 @@ enum class SfxHintId {
 SwVirtPageNumHint,
 SwAutoFormatUsedHint,
 SwFormatField,
+SwFindRedline,
 
 ThisIsAnSdrHint,
 ThisIsAnSfxEventHint
@@ -248,6 +249,7 @@ inline std::basic_ostream & operator <<(
 case SfxHintId::SwCollectTextMarks: return stream << "SwCollectTextMarks";
 case SfxHintId::SwCollectTextTOXMarksForLayout: return stream << 
"SwCollectTextTOXMarksForLayout";
 case SfxHintId::SwFormatField: return stream << "SwFormatField";
+case SfxHintId::SwFindRedline: return stream << "SwFindRedline";
 case SfxHintId::ThisIsAnSdrHint: return stream << "SdrHint";
 default: return stream << "unk(" << std::to_string(int(id)) << ")";
 }
diff --git a/sw/inc/unoredline.hxx b/sw/inc/unoredline.hxx
index b0c2dc41cfab..90f9d212a168 100644
--- a/sw/inc/unoredline.hxx
+++ b/sw/inc/unoredline.hxx
@@ -114,7 +114,8 @@ namespace sw
 {
 const SwRangeRedline& m_rRedline;
 SwXRedline** m_ppXRedline;
-FindRedlineHint(const SwRangeRedline& rRedline, SwXRedline** 
ppXRedline) : m_rRedline(rRedline), m_ppXRedline(ppXRedline) {}
+FindRedlineHint(const SwRangeRedline& rRedline, SwXRedline** 
ppXRedline)
+: SfxHint(SfxHintId::SwFindRedline), m_rRedline(rRedline), 
m_ppXRedline(ppXRedline) {}
 };
 }
 
diff --git a/sw/source/core/unocore/unoredline.cxx 
b/sw/source/core/unocore/unoredline.cxx
index b97cc20028b2..414bebbc1056 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -490,7 +490,10 @@ void SwXRedline::Notify( const SfxHint& rHint )
 {
 m_pDoc = nullptr;
 m_pRedline = nullptr;
-} else if(auto pHint = dynamic_cast()) {
+}
+else if(rHint.GetId() == SfxHintId::SwFindRedline)
+{
+auto pHint = static_cast();
 if(!*pHint->m_ppXRedline && >m_rRedline == GetRedline())
 *pHint->m_ppXRedline = this;
 }
commit 57c7269fb48237573a0d2a0429dd6e82fe62fd71
Author: Noel Grandin 
AuthorDate: Tue May 28 11:40:18 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 28 18:01:34 2024 +0200

loplugin:ostr in sc/../dbgui

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

diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx 
b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index cd84cf8b248c..db93d6c5cee2 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -72,7 +72,7 @@ ScRange lclGetRangeForNamedRange(OUString const & aName, 
const ScDocument& rDocu
 ScPivotLayoutDialog::ScPivotLayoutDialog(
 

core.git: sw/source

2024-05-28 Thread Noel Grandin (via logerrit)
 sw/source/uibase/docvw/PostItMgr.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e70b7edfb1bb8bcbde272f0152c51ae193e115d7
Author: Noel Grandin 
AuthorDate: Mon May 27 21:17:39 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 28 16:13:12 2024 +0200

no need to dynamic_cast here

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

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 8a2ab40317ed..ebd1223c586d 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -447,8 +447,9 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const 
SfxHint& rHint )
 }
 }
 }
-else if ( const SfxStyleSheetModifiedHint * pStyleHint = 
dynamic_cast() )
+else if ( rHint.GetId() == SfxHintId::StyleSheetModifiedExtended )
 {
+const SfxStyleSheetModifiedHint * pStyleHint = static_cast();
 for (const auto& postItField : mvPostItFields)
 {
 auto pField = 
static_cast(postItField->GetFormatField().GetField());


core.git: sw/source

2024-05-28 Thread Noel Grandin (via logerrit)
 sw/source/filter/ww8/docxattributeoutput.cxx  |  276 +-
 sw/source/filter/ww8/docxexport.cxx   |   82 +++
 sw/source/filter/ww8/docxexportfilter.cxx |2 
 sw/source/filter/ww8/docxsdrexport.cxx|   63 +++--
 sw/source/filter/ww8/docxtableexport.cxx  |6 
 sw/source/filter/ww8/docxtablestyleexport.cxx |7 
 sw/source/filter/ww8/rtfattributeoutput.cxx   |   28 +-
 sw/source/filter/ww8/rtfexport.cxx|8 
 sw/source/filter/ww8/rtfexportfilter.cxx  |7 
 sw/source/filter/ww8/rtfsdrexport.cxx |2 
 sw/source/filter/ww8/writerwordglue.cxx   |2 
 sw/source/filter/ww8/wrtw8esh.cxx |   12 -
 sw/source/filter/ww8/wrtw8nds.cxx |   38 +--
 sw/source/filter/ww8/wrtw8sty.cxx |4 
 sw/source/filter/ww8/wrtww8.cxx   |   36 +--
 sw/source/filter/ww8/wrtww8gr.cxx |4 
 sw/source/filter/ww8/ww8atr.cxx   |   10 
 sw/source/filter/ww8/ww8par.cxx   |   64 +++---
 sw/source/filter/ww8/ww8par2.cxx  |6 
 sw/source/filter/ww8/ww8par3.cxx  |   46 ++--
 sw/source/filter/ww8/ww8par4.cxx  |8 
 sw/source/filter/ww8/ww8par5.cxx  |   28 +-
 sw/source/filter/ww8/ww8scan.cxx  |2 
 sw/source/filter/ww8/ww8toolbar.cxx   |   14 -
 24 files changed, 381 insertions(+), 374 deletions(-)

New commits:
commit 71ce1181942741d0899d9dbbf035632dffe2b323
Author: Noel Grandin 
AuthorDate: Wed May 22 12:45:39 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 28 13:26:37 2024 +0200

loplugin:ostr in sw/../ww8

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

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 682959b33f33..1532ecf72c81 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -482,7 +482,7 @@ static void 
checkAndWriteFloatingTables(DocxAttributeOutput& rDocxAttributeOutpu
 const SfxGrabBagItem* pTableGrabBag = 
pTableFormat->GetAttrSet().GetItem(RES_FRMATR_GRABBAG);
 const std::map & rTableGrabBag = 
pTableGrabBag->GetGrabBag();
 // no grabbag?
-if (rTableGrabBag.find("TablePosition") == rTableGrabBag.end())
+if (rTableGrabBag.find(u"TablePosition"_ustr) == rTableGrabBag.end())
 {
 if (pFrameFormat->GetFlySplit().GetValue())
 {
@@ -577,7 +577,7 @@ sal_Int32 
DocxAttributeOutput::StartParagraph(ww8::WW8TableNodeInfo::Pointer_t p
 {
 const SfxGrabBagItem& rParaGrabBag = static_cast(*pItem);
 const std::map& rMap = 
rParaGrabBag.GetGrabBag();
-bEndParaSdt = m_aParagraphSdt.m_bStartedSdt && 
rMap.contains("ParaSdtEndBefore");
+bEndParaSdt = m_aParagraphSdt.m_bStartedSdt && 
rMap.contains(u"ParaSdtEndBefore"_ustr);
 }
 }
 }
@@ -1110,12 +1110,12 @@ bool DocxAttributeOutput::TextBoxIsFramePr(const 
SwFrameFormat& rFrameFormat)
 return false;
 
 uno::Reference 
xPropSetInfo(xPropertySet->getPropertySetInfo());
-if (!xPropSetInfo.is() || 
!xPropSetInfo->hasPropertyByName("FrameInteropGrabBag"))
+if (!xPropSetInfo.is() || 
!xPropSetInfo->hasPropertyByName(u"FrameInteropGrabBag"_ustr))
 return false;
 
 bool bRet = false;
 uno::Sequence propList;
-xPropertySet->getPropertyValue("FrameInteropGrabBag") >>= propList;
+xPropertySet->getPropertyValue(u"FrameInteropGrabBag"_ustr) >>= propList;
 auto pProp = std::find_if(std::cbegin(propList), std::cend(propList),
 [](const beans::PropertyValue& rProp) { return rProp.Name == 
"ParaFrameProperties"; });
 if (pProp != std::cend(propList))
@@ -1718,7 +1718,7 @@ void DocxAttributeOutput::EndParagraphProperties(const 
SfxItemSet& rParagraphMar
 SwTextNode* pTextNode = m_rExport.m_pCurPam->GetPointNode().GetTextNode();
 std::map aStatements;
 if (pTextNode)
-aStatements = SwRDFHelper::getTextNodeStatements("urn:bails", 
*pTextNode);
+aStatements = SwRDFHelper::getTextNodeStatements(u"urn:bails"_ustr, 
*pTextNode);
 if (!aStatements.empty())
 {
 m_pSerializer->startElementNS(XML_w, XML_smartTag,
@@ -2042,7 +2042,7 @@ void DocxAttributeOutput::EndRun(const SwTextNode* pNode, 
sal_Int32 nPos, sal_In
 m_pSerializer->startElementNS(XML_w, XML_r);
 if(GetExport().m_bTabInTOC && m_pHyperlinkAttrList.is())
 {
-RunText("  ") ;
+RunText(u" "_ustr) ;
 }

core.git: sw/source

2024-05-28 Thread Noel Grandin (via logerrit)
 sw/source/uibase/app/docstyle.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 072bd5d40a149bd50e95d24fc54417094193077e
Author: Noel Grandin 
AuthorDate: Mon May 27 21:23:21 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 28 11:16:27 2024 +0200

no need to dynamic_cast here

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

diff --git a/sw/source/uibase/app/docstyle.cxx 
b/sw/source/uibase/app/docstyle.cxx
index 7cfd6f24fef1..f71002c09d13 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -136,11 +136,12 @@ public:
 
 void Notify(SfxBroadcaster&, const SfxHint& rHint) override
 {
-auto pHint = dynamic_cast();
-if (!pHint)
+auto nId = rHint.GetId();
+if (nId != SfxHintId::StyleSheetModified && nId != 
SfxHintId::StyleSheetModifiedExtended
+&& nId != SfxHintId::StyleSheetErased)
 return;
+auto pHint = static_cast();
 
-auto nId = pHint->GetId();
 auto pDocStyleSheet = pHint->GetStyleSheet();
 const SfxStyleSheetModifiedHint* pExtendedHint = nullptr;
 if (nId == SfxHintId::StyleSheetModifiedExtended)
@@ -3367,10 +3368,9 @@ void SwStyleSheetIterator::InvalidateIterator()
 void SwStyleSheetIterator::Notify( SfxBroadcaster&, const SfxHint& rHint )
 {
 // search and remove from View-List!!
-const SfxStyleSheetHint* pStyleSheetHint = dynamic_cast();
-if( pStyleSheetHint &&
-SfxHintId::StyleSheetErased == pStyleSheetHint->GetId() )
+if( SfxHintId::StyleSheetErased == rHint.GetId() )
 {
+const SfxStyleSheetHint* pStyleSheetHint = static_cast();
 SfxStyleSheetBase* pStyle = pStyleSheetHint->GetStyleSheet();
 
 if (pStyle)


core.git: 2 commits - include/svl svx/source sw/inc sw/source

2024-05-28 Thread Noel Grandin (via logerrit)
 include/svl/hint.hxx |5 +
 svx/source/form/fmshell.cxx  |2 
 sw/inc/fmtfld.hxx|3 
 sw/source/uibase/docvw/PostItMgr.cxx |7 -
 sw/source/uibase/uiview/view.cxx |  164 +--
 5 files changed, 93 insertions(+), 88 deletions(-)

New commits:
commit 25caf7dfd01534f9cdb044676c05c798fac96917
Author: Noel Grandin 
AuthorDate: Mon May 27 21:13:53 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 28 09:58:48 2024 +0200

avoid dynamic_cast in PostItMgr

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

diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index f93c9196c9a2..98c37e4b7baa 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -157,6 +157,7 @@ enum class SfxHintId {
 SwTableHeadingChange,
 SwVirtPageNumHint,
 SwAutoFormatUsedHint,
+SwFormatField,
 
 ThisIsAnSdrHint,
 ThisIsAnSfxEventHint
@@ -246,6 +247,7 @@ inline std::basic_ostream & operator <<(
 return stream << "SwNavigatorSelectOutlinesWithSelections";
 case SfxHintId::SwCollectTextMarks: return stream << "SwCollectTextMarks";
 case SfxHintId::SwCollectTextTOXMarksForLayout: return stream << 
"SwCollectTextTOXMarksForLayout";
+case SfxHintId::SwFormatField: return stream << "SwFormatField";
 case SfxHintId::ThisIsAnSdrHint: return stream << "SdrHint";
 default: return stream << "unk(" << std::to_string(int(id)) << ")";
 }
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index c9f7d756c0b9..5df4f0beaf57 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -196,7 +196,8 @@ class SW_DLLPUBLIC SwFormatFieldHint final : public SfxHint
 
 public:
 SwFormatFieldHint( const SwFormatField* pField, SwFormatFieldHintWhich 
nWhich, const SwView* pView = nullptr)
-: m_pField(pField)
+: SfxHint(SfxHintId::SwFormatField)
+, m_pField(pField)
 , m_nWhich(nWhich)
 , m_pView(pView)
 {}
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 95eaea2a5557..8a2ab40317ed 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -355,8 +355,9 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const 
SfxHint& rHint )
 }
 }
 }
-else if ( const SwFormatFieldHint * pFormatHint = dynamic_cast() )
+else if ( rHint.GetId() == SfxHintId::SwFormatField )
 {
+const SwFormatFieldHint * pFormatHint = static_cast();
 SwFormatField* pField = const_cast ( 
pFormatHint->GetField() );
 switch ( pFormatHint->Which() )
 {
@@ -1470,9 +1471,9 @@ class FieldDocWatchingStack : public SfxListener
 
 virtual void Notify(SfxBroadcaster&, const SfxHint& rHint) override
 {
-const SwFormatFieldHint* pHint = dynamic_cast();
-if (!pHint)
+if ( rHint.GetId() != SfxHintId::SwFormatField )
 return;
+const SwFormatFieldHint* pHint = static_cast();
 
 bool bAllInvalidated = false;
 if (pHint->Which() == SwFormatFieldHintWhich::REMOVED)
commit e7fcca88ce9acc78a402c5929d063e3cfc573be4
Author: Noel Grandin 
AuthorDate: Mon May 27 19:03:28 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 28 09:58:41 2024 +0200

avoid dynamic_cast in SwView::Notify
    
Change-Id: Id2b8f0f85165d442a5e3a54ee2e3b433f53b3613
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168120
Reviewed-by: Noel Grandin 
Tested-by: Jenkins

diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index e8971934c7d4..f93c9196c9a2 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -61,6 +61,8 @@ enum class SfxHintId {
 BasicStart,
 BasicStop,
 
+// SVX
+FmDesignModeChanged,
 // SVX edit source
 EditSourceParasMoved,
 EditSourceSelectionChanged,
@@ -195,6 +197,7 @@ inline std::basic_ostream & operator <<(
 case SfxHintId::BasicInfoWanted: return stream << "BasicInfoWanted";
 case SfxHintId::BasicStart: return stream << "BasicStart";
 case SfxHintId::BasicStop: return stream << "BasicStop";
+case SfxHintId::FmDesignModeChanged: return stream << 
"FmDesignModeChanged";
 case SfxHintId::EditSourceParasMoved: return stream << 
"EditSourceParasMoved";
 case SfxHintId::EditSourceSelectionChanged: return stream << 
"EditSourceSelectionChanged";
 case SfxHintId::ScDataChanged: return stream << "ScDataChanged";
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 10616b67d3d0..2cedf38ba9b1 100644
--- 

core.git: sd/source

2024-05-28 Thread Noel Grandin (via logerrit)
/slidesorter/controller/SlsCurrentSlideManager.cxx  |  
  2 
 sd/source/ui/slidesorter/controller/SlsListener.cxx |  
 14 
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx  |  
  6 
 sd/source/ui/slidesorter/model/SlideSorterModel.cxx |  
  4 
 sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx |  
  4 
 sd/source/ui/table/TableDesignPane.cxx  |  
 50 +--
 sd/source/ui/table/tablefunction.cxx|  
  4 
 sd/source/ui/tools/EventMultiplexer.cxx |  
  2 
 sd/source/ui/tools/PreviewRenderer.cxx  |  
  2 
 sd/source/ui/tools/SlotStateListener.cxx|  
  2 
 sd/source/ui/uitest/uiobject.cxx|  
 22 -
 sd/source/ui/unoidl/DrawController.cxx  |  
  4 
 sd/source/ui/unoidl/SdUnoDrawView.cxx   |  
  4 
 sd/source/ui/unoidl/SdUnoOutlineView.cxx|  
  4 
 sd/source/ui/unoidl/SdUnoSlideView.cxx  |  
  8 
 sd/source/ui/unoidl/UnoDocumentSettings.cxx |  
118 +++
 sd/source/ui/unoidl/randomnode.cxx  |  
  4 
 sd/source/ui/unoidl/sddetect.cxx|  
 12 
 sd/source/ui/unoidl/unocpres.cxx|  
  8 
 sd/source/ui/unoidl/unolayer.cxx|  
  8 
 sd/source/ui/unoidl/unomodel.cxx|  
122 
 sd/source/ui/unoidl/unomodule.cxx   |  
  4 
 sd/source/ui/unoidl/unoobj.cxx  |  
  6 
 sd/source/ui/unoidl/unopage.cxx |  
 16 -
 sd/source/ui/unoidl/unopback.cxx|  
  2 
 sd/source/ui/view/DocumentRenderer.cxx  |  
148 +-
 sd/source/ui/view/GraphicObjectBar.cxx  |  
  2 
 sd/source/ui/view/ImpressViewShellBase.cxx  |  
  2 
 sd/source/ui/view/NotesPanelViewShell.cxx   |  
  6 
 sd/source/ui/view/PresentationViewShellBase.cxx |  
  4 
 sd/source/ui/view/ToolBarManager.cxx|  
  2 
 sd/source/ui/view/ViewShellBase.cxx |  
  4 
 sd/source/ui/view/ViewTabBar.cxx|  
  4 
 sd/source/ui/view/drtxtob.cxx   |  
  2 
 sd/source/ui/view/drviews2.cxx  |  
 14 
 sd/source/ui/view/drviews4.cxx  |  
 12 
 sd/source/ui/view/drviews5.cxx  |  
  2 
 sd/source/ui/view/drviews6.cxx  |  
  4 
 sd/source/ui/view/drviews7.cxx  |  
  4 
 sd/source/ui/view/drviewsa.cxx  |  
  2 
 sd/source/ui/view/drviewsd.cxx  |  
  2 
 sd/source/ui/view/drviewse.cxx  |  
 36 +-
 sd/source/ui/view/drviewsf.cxx  |  
  2 
 sd/source/ui/view/drvwshrg.cxx  |  
  4 
 sd/source/ui/view/outlnvsh.cxx  |  
  6 
 sd/source/ui/view/outlview.cxx  |  
  4 
 sd/source/ui/view/sdview2.cxx   |  
  8 
 sd/source/ui/view/sdview3.cxx   |  
 18 -
 sd/source/ui/view/sdview4.cxx   |  
 10 
 sd/source/ui/view/tabcontr.cxx  |  
  2 
 sd/source/ui/view/viewshel.cxx  |  
  2 
 166 files changed, 1391 insertions(+), 1385 deletions(-)

New commits:
commit a4d53515faac28e7749b0c4d9a4e6b59aad63225
Author: Noel Grandin 
AuthorDate: Fri May 17 12:41:24 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 28 09:25:32 2024 +0200

loplugin:ostr in sd/../ui

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

diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx 
b/sd/source/ui/accessibility

core.git: sw/source

2024-05-28 Thread Noel Grandin (via logerrit)
 sw/source/uibase/utlui/content.cxx  |   26 --
 sw/source/uibase/utlui/glbltree.cxx |   32 +++-
 2 files changed, 35 insertions(+), 23 deletions(-)

New commits:
commit 9376df3c03d361a4c01493066db2a11a770d6cc9
Author: Noel Grandin 
AuthorDate: Mon May 27 21:34:14 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 28 09:03:24 2024 +0200

no need to dynamic_cast here

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

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index f462148fa7d8..d044b611eb59 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3664,18 +3664,24 @@ void SwContentTree::SetConstantShell(SwWrtShell* pSh)
 
 void SwContentTree::Notify(SfxBroadcaster & rBC, SfxHint const& rHint)
 {
-SfxViewEventHint const*const pVEHint(dynamic_cast());
-SwXTextView* pDyingShell = nullptr;
-if (m_pActiveShell && pVEHint && pVEHint->GetEventName() == "OnViewClosed")
-pDyingShell = 
dynamic_cast(pVEHint->GetController().get());
-if (pDyingShell && pDyingShell->GetView() == _pActiveShell->GetView())
+if (rHint.GetId() == SfxHintId::ThisIsAnSfxEventHint)
 {
-SetActiveShell(nullptr); // our view is dying, clear our pointers to it
-}
-else
-{
-SfxListener::Notify(rBC, rHint);
+const SfxEventHint* pEventHint = static_cast();
+if (pEventHint->GetEventId() == SfxEventHintId::CloseView)
+{
+SfxViewEventHint const*const pVEHint(static_cast());
+if (m_pActiveShell)
+{
+SwXTextView* pDyingShell = 
dynamic_cast(pVEHint->GetController().get());
+if (pDyingShell && pDyingShell->GetView() == 
_pActiveShell->GetView())
+{
+SetActiveShell(nullptr); // our view is dying, clear our 
pointers to it
+}
+}
+return;
+}
 }
+SfxListener::Notify(rBC, rHint);
 switch (rHint.GetId())
 {
 case SfxHintId::SwNavigatorUpdateTracking:
diff --git a/sw/source/uibase/utlui/glbltree.cxx 
b/sw/source/uibase/utlui/glbltree.cxx
index 448f2655727a..7d7d0104fc7b 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -1164,21 +1164,27 @@ IMPL_LINK( SwGlobalTree, DialogClosedHdl, 
sfx2::FileDialogHelper*, _pFileDlg, vo
 
 void SwGlobalTree::Notify(SfxBroadcaster& rBC, SfxHint const& rHint)
 {
-SfxViewEventHint const*const pVEHint(dynamic_cast());
-SwXTextView* pDyingShell = nullptr;
-if (m_pActiveShell && pVEHint && pVEHint->GetEventName() == "OnViewClosed")
-pDyingShell = 
dynamic_cast(pVEHint->GetController().get());
-if (pDyingShell && pDyingShell->GetView() == _pActiveShell->GetView())
+if (rHint.GetId() == SfxHintId::ThisIsAnSfxEventHint)
 {
-EndListening(*m_pActiveShell->GetView().GetDocShell());
-m_pActiveShell = nullptr;
-}
-else
-{
-SfxListener::Notify(rBC, rHint);
-if (rHint.GetId() == SfxHintId::SwNavigatorUpdateTracking)
-UpdateTracking();
+const SfxEventHint* pEventHint = static_cast();
+if (pEventHint->GetEventId() == SfxEventHintId::CloseView)
+{
+SfxViewEventHint const*const pVEHint(static_cast());
+if (m_pActiveShell)
+{
+SwXTextView* pDyingShell = 
dynamic_cast(pVEHint->GetController().get());
+if (pDyingShell && pDyingShell->GetView() == 
_pActiveShell->GetView())
+{
+EndListening(*m_pActiveShell->GetView().GetDocShell());
+m_pActiveShell = nullptr;
+}
+}
+return;
+}
 }
+SfxListener::Notify(rBC, rHint);
+if (rHint.GetId() == SfxHintId::SwNavigatorUpdateTracking)
+UpdateTracking();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


core.git: sc/source

2024-05-24 Thread Noel Grandin (via logerrit)
 sc/source/filter/excel/xlroot.cxx |5 -
 sc/source/filter/inc/xlroot.hxx   |2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 137f423cc18e23f64b3b2bc6075c5f1581ac6537
Author: Noel Grandin 
AuthorDate: Wed May 22 16:40:31 2024 +0200
Commit: Noel Grandin 
CommitDate: Fri May 24 20:11:12 2024 +0200

tdf#161210 speedup loading large XLS (2)

shave 2% off time by inlining GetDoc which is quite hot

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

diff --git a/sc/source/filter/excel/xlroot.cxx 
b/sc/source/filter/excel/xlroot.cxx
index 836c08b3f5e4..593a4d1583da 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -286,11 +286,6 @@ rtl::Reference XclRoot::OpenStream(const 
OUString& rStrmName)
 return OpenStream( GetRootStorage(), rStrmName );
 }
 
-ScDocument& XclRoot::GetDoc() const
-{
-return mrData.mrDoc;
-}
-
 ScDocShell* XclRoot::GetDocShell() const
 {
 return GetDoc().GetDocumentShell();
diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx
index aa86378416b4..603307fb3476 100644
--- a/sc/source/filter/inc/xlroot.hxx
+++ b/sc/source/filter/inc/xlroot.hxx
@@ -198,7 +198,7 @@ public:
 rtl::Reference OpenStream(const OUString& rStrmName) 
const;
 
 /** Returns reference to the destination document (import) or source 
document (export). */
-ScDocument& GetDoc() const;
+ScDocument& GetDoc() const { return mrData.mrDoc; }
 
 /** Returns the object shell of the Calc document. May be 0 (i.e. import 
from clipboard). */
 ScDocShell* GetDocShell() const;


core.git: sc/source

2024-05-24 Thread Noel Grandin (via logerrit)
 sc/source/filter/excel/xistyle.cxx |   33 -
 sc/source/filter/inc/xistyle.hxx   |4 ++--
 2 files changed, 18 insertions(+), 19 deletions(-)

New commits:
commit 397d7af2cbb1f2786ba857d350fb4641525e3bb2
Author: Noel Grandin 
AuthorDate: Wed May 22 15:03:40 2024 +0200
Commit: Noel Grandin 
CommitDate: Fri May 24 18:29:02 2024 +0200

tdf#161210 speedup loading large XLS

takes the time from 22s to 20s for me

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

diff --git a/sc/source/filter/excel/xistyle.cxx 
b/sc/source/filter/excel/xistyle.cxx
index 23db22d23ed8..00bc34c744bd 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -1724,7 +1724,7 @@ void XclImpXFRangeColumn::SetDefaultXF( const 
XclImpXFIndex& rXFIndex, const Xcl
 OSL_ENSURE( maIndexList.empty(), "XclImpXFRangeColumn::SetDefaultXF - 
Setting Default Column XF is not empty" );
 
 // insert a complete row range with one insert.
-maIndexList.push_back( std::make_unique( 0, 
rRoot.GetDoc().MaxRow(), rXFIndex ) );
+maIndexList.push_back( XclImpXFRange( 0, rRoot.GetDoc().MaxRow(), rXFIndex 
) );
 }
 
 void XclImpXFRangeColumn::SetXF( SCROW nScRow, const XclImpXFIndex& rXFIndex )
@@ -1748,7 +1748,7 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const 
XclImpXFIndex& rXFIndex )
 SCROW nLastScRow = pPrevRange->mnScRow2;
 sal_uLong nIndex = nNextIndex - 1;
 XclImpXFRange* pThisRange = pPrevRange;
-pPrevRange = (nIndex > 0 && nIndex <= maIndexList.size()) ? 
maIndexList[ nIndex - 1 ].get() : nullptr;
+pPrevRange = (nIndex > 0 && nIndex <= maIndexList.size()) ? 
[ nIndex - 1 ] : nullptr;
 
 if( nFirstScRow == nLastScRow ) // replace solely XF
 {
@@ -1761,20 +1761,20 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const 
XclImpXFIndex& rXFIndex )
 ++(pThisRange->mnScRow1);
 // try to concatenate with previous of this
 if( !pPrevRange || !pPrevRange->Expand( nScRow, rXFIndex ) )
-Insert( new XclImpXFRange( nScRow, rXFIndex ), nIndex );
+Insert( XclImpXFRange( nScRow, rXFIndex ), nIndex );
 }
 else if( nLastScRow == nScRow ) // replace last XF
 {
 --(pThisRange->mnScRow2);
 if( !pNextRange || !pNextRange->Expand( nScRow, rXFIndex ) )
-Insert( new XclImpXFRange( nScRow, rXFIndex ), nNextIndex 
);
+Insert( XclImpXFRange( nScRow, rXFIndex ), nNextIndex );
 }
 else// insert in the middle of 
the range
 {
 pThisRange->mnScRow1 = nScRow + 1;
 // List::Insert() moves entries towards end of list, so insert 
twice at nIndex
-Insert( new XclImpXFRange( nScRow, rXFIndex ), nIndex );
-Insert( new XclImpXFRange( nFirstScRow, nScRow - 1, 
pThisRange->maXFIndex ), nIndex );
+Insert( XclImpXFRange( nScRow, rXFIndex ), nIndex );
+Insert( XclImpXFRange( nFirstScRow, nScRow - 1, 
pThisRange->maXFIndex ), nIndex );
 }
 return;
 }
@@ -1790,12 +1790,12 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const 
XclImpXFIndex& rXFIndex )
 return;
 
 // create new range
-Insert( new XclImpXFRange( nScRow, rXFIndex ), nNextIndex );
+Insert( XclImpXFRange( nScRow, rXFIndex ), nNextIndex );
 }
 
-void XclImpXFRangeColumn::Insert(XclImpXFRange* pXFRange, sal_uLong nIndex)
+void XclImpXFRangeColumn::Insert(XclImpXFRange aXFRange, sal_uLong nIndex)
 {
-maIndexList.insert( maIndexList.begin() + nIndex, 
std::unique_ptr(pXFRange) );
+maIndexList.insert( maIndexList.begin() + nIndex, std::move(aXFRange) );
 }
 
 void XclImpXFRangeColumn::Find(
@@ -1811,8 +1811,8 @@ void XclImpXFRangeColumn::Find(
 return;
 }
 
-rpPrevRange = maIndexList.front().get();
-rpNextRange = maIndexList.back().get();
+rpPrevRange = ();
+rpNextRange = ();
 
 // test whether row is at end of list (contained in or behind last range)
 // rpPrevRange will contain a possible existing row
@@ -1843,7 +1843,7 @@ void XclImpXFRangeColumn::Find(
 while( ((rnNextIndex - nPrevIndex) > 1) && (rpPrevRange->mnScRow2 < 
nScRow) )
 {
 nMidIndex = (nPrevIndex + rnNextIndex) / 2;
-pMidRange = maIndexList[nMidIndex].get();
+pMidRange = [nMidIndex];
 assert(pMidRange && "XclImpXFRangeColumn::Find - missing XF index 
range");
 if( nScRow < pMidRange->mnScRow1 )  // row is really 

core.git: sc/source

2024-05-23 Thread Noel Grandin (via logerrit)
 sc/source/core/data/column2.cxx |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit f91a411340ae204ce1e6997f22e0352a4c6a8355
Author: Noel Grandin 
AuthorDate: Thu May 23 15:09:52 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 23 19:46:32 2024 +0200

reduce cost of calc column height calculation

avoid calling GetTextWidth unless we really need to

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

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index c4ac17ffe358..e62ac56a1e14 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -307,9 +307,10 @@ tools::Long ScColumn::GetNeededSize(
 {
 //  SetFont is moved up
 
-Size aSize( pDev->GetTextWidth( aValStr ), pDev->GetTextHeight() );
+Size aSize;
 if ( eOrient != SvxCellOrientation::Standard )
 {
+aSize = Size( pDev->GetTextWidth( aValStr ), 
pDev->GetTextHeight() );
 tools::Long nTemp = aSize.Width();
 aSize.setWidth( aSize.Height() );
 aSize.setHeight( nTemp );
@@ -318,6 +319,7 @@ tools::Long ScColumn::GetNeededSize(
 {
 //TODO: take different X/Y scaling into consideration
 
+aSize = Size( pDev->GetTextWidth( aValStr ), 
pDev->GetTextHeight() );
 double nRealOrient = toRadians(nRotate);
 double nCosAbs = fabs( cos( nRealOrient ) );
 double nSinAbs = fabs( sin( nRealOrient ) );
@@ -347,8 +349,13 @@ tools::Long ScColumn::GetNeededSize(
 }
 
 aSize = Size( nWidth, nHeight );
+nValue = bWidth ? aSize.Width() : aSize.Height();
 }
-nValue = bWidth ? aSize.Width() : aSize.Height();
+else if (bBreak && !bWidth)
+aSize = Size( pDev->GetTextWidth( aValStr ), 
pDev->GetTextHeight() );
+else
+// in the common case (height), avoid calling the expensive 
GetTextWidth
+nValue = bWidth ? pDev->GetTextWidth( aValStr ) : 
pDev->GetTextHeight();
 
 if ( bAddMargin )
 {


core.git: sw/source

2024-05-23 Thread Noel Grandin (via logerrit)
 |   24 +--
 sw/source/ui/vba/vbawindow.cxx   |   12 -
 sw/source/ui/vba/vbawordbasic.cxx|   12 -
 sw/source/ui/vba/vbawrapformat.cxx   |   32 ++--
 sw/source/ui/vba/wordvbahelper.cxx   |   14 +-
 83 files changed, 605 insertions(+), 603 deletions(-)

New commits:
commit dddba389b79647f69f447e576cf7e880be5661c6
Author: Noel Grandin 
AuthorDate: Wed May 22 12:46:02 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 23 08:37:41 2024 +0200

loplugin:ostr in sw/../vba

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

diff --git a/sw/source/ui/vba/vbaaddin.cxx b/sw/source/ui/vba/vbaaddin.cxx
index 8fdfb0048008..d05e978c2516 100644
--- a/sw/source/ui/vba/vbaaddin.cxx
+++ b/sw/source/ui/vba/vbaaddin.cxx
@@ -44,7 +44,7 @@ OUString SAL_CALL SwVbaAddin::getName()
 void SAL_CALL
 SwVbaAddin::setName( const OUString& )
 {
-throw uno::RuntimeException(" Fail to set name" );
+throw uno::RuntimeException(u" Fail to set name"_ustr );
 }
 
 OUString SAL_CALL SwVbaAddin::getPath()
@@ -76,7 +76,7 @@ void SAL_CALL SwVbaAddin::setInstalled( sal_Bool _installed )
 OUString
 SwVbaAddin::getServiceImplName()
 {
-return "SwVbaAddin";
+return u"SwVbaAddin"_ustr;
 }
 
 uno::Sequence< OUString >
@@ -84,7 +84,7 @@ SwVbaAddin::getServiceNames()
 {
 static uno::Sequence< OUString > const aServiceNames
 {
-"ooo.vba.word.Addin"
+u"ooo.vba.word.Addin"_ustr
 };
 return aServiceNames;
 }
diff --git a/sw/source/ui/vba/vbaaddins.cxx b/sw/source/ui/vba/vbaaddins.cxx
index 6fd6e42f8634..52207b314518 100644
--- a/sw/source/ui/vba/vbaaddins.cxx
+++ b/sw/source/ui/vba/vbaaddins.cxx
@@ -80,7 +80,7 @@ SwVbaAddins::createCollectionObject( const css::uno::Any& 
aSource )
 OUString
 SwVbaAddins::getServiceImplName()
 {
-return "SwVbaAddins";
+return u"SwVbaAddins"_ustr;
 }
 
 css::uno::Sequence
@@ -88,7 +88,7 @@ SwVbaAddins::getServiceNames()
 {
 static uno::Sequence< OUString > const sNames
 {
-"ooo.vba.word.Addins"
+u"ooo.vba.word.Addins"_ustr
 };
 return sNames;
 }
diff --git a/sw/source/ui/vba/vbaapplication.cxx 
b/sw/source/ui/vba/vbaapplication.cxx
index d3f290db28ab..ac519b9d7afd 100644
--- a/sw/source/ui/vba/vbaapplication.cxx
+++ b/sw/source/ui/vba/vbaapplication.cxx
@@ -107,7 +107,7 @@ SwVbaApplication::RemoveSink( sal_uInt32 nNumber )
 OUString SAL_CALL
 SwVbaApplication::getName()
 {
-return "Microsoft Word";
+return u"Microsoft Word"_ustr;
 }
 
 uno::Reference< word::XDocument > SAL_CALL
@@ -314,7 +314,7 @@ void SAL_CALL SwVbaApplication::setTop( sal_Int32 _top )
 
 OUString SAL_CALL SwVbaApplication::getStatusBar()
 {
-return "";
+return u""_ustr;
 }
 
 uno::Any SAL_CALL SwVbaApplication::getCustomizationContext()
@@ -443,7 +443,7 @@ void SAL_CALL SwVbaApplication::Move( sal_Int32 Left, 
sal_Int32 Top )
 OUString SAL_CALL
 SwVbaApplication::getIID()
 {
-return "{82154421-0FBF-11d4-8313-005004526AB4}";
+return u"{82154421-0FBF-11d4-8313-005004526AB4}"_ustr;
 }
 
 // XConnectable
@@ -451,7 +451,7 @@ SwVbaApplication::getIID()
 OUString SAL_CALL
 SwVbaApplication::GetIIDForClassItselfNotCoclass()
 {
-return "{82154423-0FBF-11D4-8313-005004526AB4}";
+return u"{82154423-0FBF-11D4-8313-005004526AB4}"_ustr;
 }
 
 TypeAndIID SAL_CALL
@@ -459,7 +459,7 @@ SwVbaApplication::GetConnectionPoint()
 {
 TypeAndIID aResult =
 { cppu::UnoType::get(),
-  "{82154422-0FBF-11D4-8313-005004526AB4}"
+  u"{82154422-0FBF-11D4-8313-005004526AB4}"_ustr
 };
 
 return aResult;
@@ -475,7 +475,7 @@ SwVbaApplication::FindConnectionPoint()
 OUString
 SwVbaApplication::getServiceImplName()
 {
-return "SwVbaApplication";
+return u"SwVbaApplication"_ustr;
 }
 
 uno::Sequence< OUString >
@@ -483,7 +483,7 @@ SwVbaApplication::getServiceNames()
 {
 static uno::Sequence< OUString > const aServiceNames
 {
-"ooo.vba.word.Application"
+u"ooo.vba.word.Application"_ustr
 };
 return aServiceNames;
 }
diff --git a/sw/source/ui/vba/vbaautotextentry.cxx 
b/sw/source/ui/vba/vbaautotextentry.cxx
index dd1f17f16ff4..051943cd1f41 100644
--- a/sw/source/ui/vba/vbaautotextentry.cxx
+++ b/sw/source/ui/vba/vbaautotextentry.cxx
@@ -41,14 +41,14 @@ uno::Reference< word::XRange > SAL_CALL 
SwVbaAutoTextEntry::Insert( const uno::R
 if( pWhere )
 {
 uno::Reference< text::XTextRange > xTextRange = 
pWhere->getXTextRange();
-xTextRange->setString( "x"

core.git: sw/source

2024-05-22 Thread Noel Grandin (via logerrit)
 sw/source/ui/dbui/addresslistdialog.cxx  |   56 -
 sw/source/ui/dbui/createaddresslistdialog.cxx|   48 
 sw/source/ui/dbui/customizeaddresslistdialog.cxx |   20 +--
 sw/source/ui/dbui/customizeaddresslistdialog.hxx |8 -
 sw/source/ui/dbui/dbinsdlg.cxx   |   76 ++--
 sw/source/ui/dbui/dbtablepreviewdialog.cxx   |8 -
 sw/source/ui/dbui/mailmergewizard.cxx|   10 -
 sw/source/ui/dbui/mmaddressblockpage.cxx |  136 +++
 sw/source/ui/dbui/mmdocselectpage.cxx|   22 +--
 sw/source/ui/dbui/mmgreetingspage.cxx|   22 +--
 sw/source/ui/dbui/mmgreetingspage.hxx|   30 ++---
 sw/source/ui/dbui/mmlayoutpage.cxx   |   30 ++---
 sw/source/ui/dbui/mmoutputtypepage.cxx   |   32 ++---
 sw/source/ui/dbui/mmresultdialogs.cxx|  106 -
 sw/source/ui/dbui/selectdbtabledialog.cxx|   19 +--
 15 files changed, 312 insertions(+), 311 deletions(-)

New commits:
commit ebb1444a17d56acc93ffbb06b43506531dd6
Author: Noel Grandin 
AuthorDate: Wed May 22 09:36:10 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 22 16:07:27 2024 +0200

loplugin:ostr in sw/../dbui

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

diff --git a/sw/source/ui/dbui/addresslistdialog.cxx 
b/sw/source/ui/dbui/addresslistdialog.cxx
index 30df8ce37ce2..d4e6f40be4bc 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -87,13 +87,13 @@ static OUString lcl_getFlatURL( 
uno::Reference const & xSou
 if(xSourceProperties.is())
 {
 OUString sDBURL;
-xSourceProperties->getPropertyValue("URL") >>= sDBURL;
+xSourceProperties->getPropertyValue(u"URL"_ustr) >>= sDBURL;
 if (sDBURL.startsWith("sdbc:flat:"))
 {
 uno::Sequence aFilters;
-xSourceProperties->getPropertyValue("TableFilter") >>= aFilters;
+xSourceProperties->getPropertyValue(u"TableFilter"_ustr) >>= 
aFilters;
 uno::Sequence aInfo;
-xSourceProperties->getPropertyValue("Info") >>= aInfo;
+xSourceProperties->getPropertyValue(u"Info"_ustr) >>= aInfo;
 if(aFilters.getLength() == 1 && aInfo.hasElements() )
 {
 OUString sExtension;
@@ -118,19 +118,19 @@ static OUString lcl_getFlatURL( 
uno::Reference const & xSou
 }
 
 SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
-: SfxDialogController(pParent->GetWizard()->getDialog(), 
"modules/swriter/ui/selectaddressdialog.ui", "SelectAddressDialog")
+: SfxDialogController(pParent->GetWizard()->getDialog(), 
u"modules/swriter/ui/selectaddressdialog.ui"_ustr, u"SelectAddressDialog"_ustr)
 , m_bInSelectHdl(false)
 , m_pAddressPage(pParent)
-, m_xDescriptionFI(m_xBuilder->weld_label("desc"))
-, m_xConnecting(m_xBuilder->weld_label("connecting"))
-, m_xListLB(m_xBuilder->weld_tree_view("sources"))
-, m_xLoadListPB(m_xBuilder->weld_button("add"))
-, m_xRemovePB(m_xBuilder->weld_button("remove"))
-, m_xCreateListPB(m_xBuilder->weld_button("create"))
-, m_xFilterPB(m_xBuilder->weld_button("filter"))
-, m_xEditPB(m_xBuilder->weld_button("edit"))
-, m_xTablePB(m_xBuilder->weld_button("changetable"))
-, m_xOK(m_xBuilder->weld_button("ok"))
+, m_xDescriptionFI(m_xBuilder->weld_label(u"desc"_ustr))
+, m_xConnecting(m_xBuilder->weld_label(u"connecting"_ustr))
+, m_xListLB(m_xBuilder->weld_tree_view(u"sources"_ustr))
+, m_xLoadListPB(m_xBuilder->weld_button(u"add"_ustr))
+, m_xRemovePB(m_xBuilder->weld_button(u"remove"_ustr))
+, m_xCreateListPB(m_xBuilder->weld_button(u"create"_ustr))
+, m_xFilterPB(m_xBuilder->weld_button(u"filter"_ustr))
+, m_xEditPB(m_xBuilder->weld_button(u"edit"_ustr))
+, m_xTablePB(m_xBuilder->weld_button(u"changetable"_ustr))
+, m_xOK(m_xBuilder->weld_button(u"ok"_ustr))
 , m_xIter(m_xListLB->make_iterator())
 {
 m_sConnecting = m_xConnecting->get_label();
@@ -245,20 +245,20 @@ IMPL_LINK_NOARG(SwAddressListDialog, FilterHdl_Impl, 
weld::Button&, void)
 {
 uno::Reference 
xConnectFactory(pUserData->xConnection, UNO_QUERY_THROW);
 uno::Reference xComposer(
-
xConnectFactory->createInstance(&

core.git: sc/source

2024-05-22 Thread Noel Grandin (via logerrit)
 sc/source/ui/Accessibility/AccessibleCell.cxx|4 +--
 sc/source/ui/Accessibility/AccessibleCellBase.cxx|   12 -
 sc/source/ui/Accessibility/AccessibleContextBase.cxx |6 ++--
 sc/source/ui/Accessibility/AccessibleCsvControl.cxx  |   14 +--
 sc/source/ui/Accessibility/AccessibleDocument.cxx|6 ++--
 sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx |4 +--
 sc/source/ui/Accessibility/AccessibleEditObject.cxx  |2 -
 sc/source/ui/Accessibility/AccessiblePageHeader.cxx  |4 +--
 sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx  |4 +--
 sc/source/ui/Accessibility/AccessiblePreviewCell.cxx |4 +--
 sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx   |4 +--
 sc/source/ui/Accessibility/AccessiblePreviewTable.cxx|2 -
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx |4 +--
 sc/source/ui/Accessibility/AccessibleTableBase.cxx   |2 -
 14 files changed, 36 insertions(+), 36 deletions(-)

New commits:
commit c2a2eb189c45b4eaf53bd2b5656185fa72512322
Author: Noel Grandin 
AuthorDate: Wed May 22 09:34:38 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 22 12:42:07 2024 +0200

loplugin:ostr in sc/../Accessibility

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

diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx 
b/sc/source/ui/Accessibility/AccessibleCell.cxx
index b27fbb90671a..3d1fb315965c 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -300,13 +300,13 @@ uno::Reference SAL_CALL
 
 OUString SAL_CALL ScAccessibleCell::getImplementationName()
 {
-return "ScAccessibleCell";
+return u"ScAccessibleCell"_ustr;
 }
 
 uno::Sequence< OUString> SAL_CALL
 ScAccessibleCell::getSupportedServiceNames()
 {
-const css::uno::Sequence vals { 
"com.sun.star.sheet.AccessibleCell" };
+const css::uno::Sequence vals { 
u"com.sun.star.sheet.AccessibleCell"_ustr };
 return 
comphelper::concatSequences(ScAccessibleContextBase::getSupportedServiceNames(),
 vals);
 }
 
diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx 
b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index d8b84fabafc1..ebff91c101e2 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -269,7 +269,7 @@ uno::Any SAL_CALL
 
 OUString SAL_CALL ScAccessibleCellBase::getImplementationName()
 {
-return "ScAccessibleCellBase";
+return u"ScAccessibleCellBase"_ustr;
 }
 
 //=  XTypeProvider  ===
@@ -374,9 +374,9 @@ OUString ScAccessibleCellBase::getShadowAttrs() const
 }
 }
 //construct shadow attributes string
-OUString sShadowAttrs("Shadow:");
-OUString sInnerSplit(",");
-OUString sOuterSplit(";");
+OUString sShadowAttrs(u"Shadow:"_ustr);
+OUString sInnerSplit(u","_ustr);
+OUString sOuterSplit(u";"_ustr);
 sal_Int32 nLocationVal = 0;
 switch( aShadowFmt.Location )
 {
@@ -479,8 +479,8 @@ OUString ScAccessibleCellBase::getBorderAttrs()
 
 //construct border attributes string
 OUString sBorderAttrs;
-OUString sInnerSplit(",");
-OUString sOuterSplit(";");
+OUString sInnerSplit(u","_ustr);
+OUString sOuterSplit(u";"_ustr);
 //top border
 //if top of the cell has no border
 if ( aTopBorder.InnerLineWidth == 0 && aTopBorder.OuterLineWidth == 0 )
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx 
b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
index 59f2f399032e..34826eb80e9d 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -416,7 +416,7 @@ void SAL_CALL
 // XServiceInfo
 OUString SAL_CALL ScAccessibleContextBase::getImplementationName()
 {
-return "ScAccessibleContextBase";
+return u"ScAccessibleContextBase"_ustr;
 }
 
 sal_Bool SAL_CALL ScAccessibleContextBase::supportsService(const OUString& 
sServiceName)
@@ -427,8 +427,8 @@ sal_Bool SAL_CALL 
ScAccessibleContextBase::supportsService(const OUString& sServ
 uno::Sequence< OUString> SAL_CALL
ScAccessibleContextBase::getSupportedServiceNames()
 {
-return {"com.sun.star.accessibility.Accessible",
-"com.sun.star.accessibility.AccessibleContext"};
+return {u"com.sun.star.accessibility.Accessible"_ustr,
+u"com.sun.star.accessibility.AccessibleContext"_ustr};
 }
 
 //=  internal  =

core.git: sc/qa

2024-05-21 Thread Noel Grandin (via logerrit)
/functions_spreadsheet.cxx |4 
 sc/qa/unit/functions_statistical.cxx |4 
 sc/qa/unit/functions_text.cxx|4 
 sc/qa/unit/helper/qahelper.cxx   |   20 
 sc/qa/unit/helper/scfiltertestbase.cxx   |4 
 sc/qa/unit/helper/shared_test_impl.hxx   |2 
 sc/qa/unit/jumbosheets-test.cxx  |   56 
 sc/qa/unit/opencl-test-1.cxx |2 
 sc/qa/unit/opencl-test-2.cxx |2 
 sc/qa/unit/parallelism.cxx   |2 
 sc/qa/unit/pivottable_filters_test.cxx   |  583 -
 sc/qa/unit/screenshots/screenshots.cxx   |6 
 sc/qa/unit/scshapetest.cxx   |  150 
 sc/qa/unit/subsequent_export_test.cxx|  725 -
 sc/qa/unit/subsequent_export_test2.cxx   |  585 -
 sc/qa/unit/subsequent_export_test3.cxx   |  297 
 sc/qa/unit/subsequent_export_test4.cxx   |  571 -
 sc/qa/unit/subsequent_filters_test.cxx   |  202 
 sc/qa/unit/subsequent_filters_test2.cxx  |  267 
 sc/qa/unit/subsequent_filters_test3.cxx  |   84 
 sc/qa/unit/subsequent_filters_test4.cxx  |  228 
 sc/qa/unit/tiledrendering/tiledrendering.cxx |  276 
 sc/qa/unit/tiledrendering2/tiledrendering2.cxx   |   14 
 sc/qa/unit/ucalc.cxx | 1024 +-
 sc/qa/unit/ucalc_DocumentThemes.cxx  |4 
 sc/qa/unit/ucalc_condformat.cxx  |  170 
 sc/qa/unit/ucalc_copypaste.cxx   | 4944 
--
 sc/qa/unit/ucalc_datatransformation.cxx  |  208 
 sc/qa/unit/ucalc_formula.cxx | 1500 +--
 sc/qa/unit/ucalc_formula2.cxx| 1034 +-
 sc/qa/unit/ucalc_parallelism.cxx |   62 
 sc/qa/unit/ucalc_pivottable.cxx  |  160 
 sc/qa/unit/ucalc_range.cxx   |6 
 sc/qa/unit/ucalc_sharedformula.cxx   |  426 
 sc/qa/unit/ucalc_solver.cxx  |   92 
 sc/qa/unit/ucalc_sort.cxx|  266 
 sc/qa/unit/ucalc_sparkline.cxx   |   28 
 sc/qa/unit/uicalc/uicalc.cxx | 1013 +-
 sc/qa/unit/uicalc/uicalc2.cxx|  776 -
 167 files changed, 9267 insertions(+), 9258 deletions(-)

New commits:
commit bc456ccf9f81bd36216c199ab42fa2fe77c5e17c
Author: Noel Grandin 
AuthorDate: Tue May 21 11:59:04 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 21 18:14:10 2024 +0200

loplugin:ostr in sc/qa

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

diff --git a/sc/qa/extras/accessibility/basics.cxx 
b/sc/qa/extras/accessibility/basics.cxx
index 30c857571fdb..7bed8a58f114 100644
--- a/sc/qa/extras/accessibility/basics.cxx
+++ b/sc/qa/extras/accessibility/basics.cxx
@@ -58,7 +58,8 @@ CPPUNIT_TEST_FIXTURE(test::AccessibleTestBase, TestCalcMenu)
 std::cout << "A1 (value): " << value << std::endl;
 uno::Reference xSupplier(mxDocument, 
uno::UNO_QUERY_THROW);
 util::Date nullDate;
-
CPPUNIT_ASSERT(xSupplier->getNumberFormatSettings()->getPropertyValue("NullDate")
 >>= nullDate);
+
CPPUNIT_ASSERT(xSupplier->getNumberFormatSettings()->getPropertyValue(u"NullDate"_ustr)
+   >>= nullDate);
 const Date afterDate(Date::SYSTEM);
 CPPUNIT_ASSERT_GREATEREQUAL(double(beforeDate - nullDate), value);
 CPPUNIT_ASSERT_LESSEQUAL(double(afterDate - nullDate), value);
diff --git a/sc/qa/extras/htmlexporttest.cxx b/sc/qa/extras/htmlexporttest.cxx
index 859b5a90d008..acc9a5b20081 100644
--- a/sc/qa/extras/htmlexporttest.cxx
+++ b/sc/qa/extras/htmlexporttest.cxx
@@ -16,21 +16,21 @@ class ScHTMLExportTest : public UnoApiXmlTest, public 
HtmlTestTools
 {
 public:
 ScHTMLExportTest()
-: UnoApiXmlTest("/sc/qa/extras/testdocuments/")
+: UnoApiXmlTest(u"/sc/qa/extras/testdocuments/"_ustr)
 {}
 
 void testHtmlSkipImage()
 {
 loadFromFile(u"

core.git: sw/qa

2024-05-21 Thread Noel Grandin (via logerrit)
 sw/qa/api/SwXAutoTextContainer.cxx|4 ++--
 sw/qa/api/SwXBodyText.cxx |3 ++-
 sw/qa/api/SwXBookmark.cxx |   12 ++--
 sw/qa/api/SwXBookmarks.cxx|   10 +-
 sw/qa/api/SwXChapterNumbering.cxx |4 ++--
 sw/qa/api/SwXDocumentIndex.cxx|   10 +-
 sw/qa/api/SwXDocumentIndexMark.cxx|6 +++---
 sw/qa/api/SwXDocumentIndexes.cxx  |8 
 sw/qa/api/SwXDocumentSettings.cxx |8 +---
 sw/qa/api/SwXFieldEnumeration.cxx |   16 +---
 sw/qa/api/SwXFootnote.cxx |6 +++---
 sw/qa/api/SwXFootnoteProperties.cxx   |5 +++--
 sw/qa/api/SwXFootnoteText.cxx |9 +
 sw/qa/api/SwXFootnotes.cxx|8 
 sw/qa/api/SwXFrames.cxx   |   10 +-
 sw/qa/api/SwXHeadFootText.cxx |   13 +++--
 sw/qa/api/SwXNumberingRules.cxx   |   11 ++-
 sw/qa/api/SwXParagraphEnumeration.cxx |   10 ++
 sw/qa/api/SwXReferenceMark.cxx|   13 +++--
 sw/qa/api/SwXReferenceMarks.cxx   |   16 +---
 sw/qa/api/SwXStyleFamilies.cxx|6 +++---
 sw/qa/api/SwXTableCellText.cxx|   14 +++---
 sw/qa/api/SwXTextEmbeddedObjects.cxx  |   13 +++--
 sw/qa/api/SwXTextField.cxx|   16 
 sw/qa/api/SwXTextFieldMasters.cxx |6 +++---
 sw/qa/api/SwXTextFieldTypes.cxx   |7 ---
 sw/qa/api/SwXTextFrame.cxx|8 
 sw/qa/api/SwXTextSections.cxx |   10 +-
 sw/qa/api/SwXTextTable.cxx|5 +++--
 sw/qa/api/SwXTextTables.cxx   |   14 +++---
 sw/qa/api/terminate.cxx   |4 ++--
 31 files changed, 151 insertions(+), 134 deletions(-)

New commits:
commit 6725ae0d7d6f2d677fbf62bc58bfd83c4418f485
Author: Noel Grandin 
AuthorDate: Tue May 21 12:00:20 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 21 15:39:35 2024 +0200

loplugin:ostr in sw/qa/api

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

diff --git a/sw/qa/api/SwXAutoTextContainer.cxx 
b/sw/qa/api/SwXAutoTextContainer.cxx
index 1f1fc3df1d49..5812e1ec0c44 100644
--- a/sw/qa/api/SwXAutoTextContainer.cxx
+++ b/sw/qa/api/SwXAutoTextContainer.cxx
@@ -35,10 +35,10 @@ class SwXAutoTextContainer final : public UnoApiTest,
 {
 public:
 SwXAutoTextContainer()
-: UnoApiTest("")
+: UnoApiTest(u""_ustr)
 , XElementAccess(cppu::UnoType::get())
 , XIndexAccess(3)
-, XNameAccess("crdbus50")
+, XNameAccess(u"crdbus50"_ustr)
 {
 }
 
diff --git a/sw/qa/api/SwXBodyText.cxx b/sw/qa/api/SwXBodyText.cxx
index 69fb22a959b2..3db54633e441 100644
--- a/sw/qa/api/SwXBodyText.cxx
+++ b/sw/qa/api/SwXBodyText.cxx
@@ -89,7 +89,8 @@ void SwXBodyText::tearDown()
 
 Reference SwXBodyText::init()
 {
-component_ = loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
+component_
+= loadFromDesktop(u"private:factory/swriter"_ustr, 
u"com.sun.star.text.TextDocument"_ustr);
 Reference xTextDocument(component_, UNO_QUERY_THROW);
 Reference xMSF(component_, UNO_QUERY_THROW);
 
diff --git a/sw/qa/api/SwXBookmark.cxx b/sw/qa/api/SwXBookmark.cxx
index ca6c02d81f8b..3e6bf37eacbb 100644
--- a/sw/qa/api/SwXBookmark.cxx
+++ b/sw/qa/api/SwXBookmark.cxx
@@ -34,8 +34,8 @@ class SwXBookmark final : public UnoApiTest,
 {
 public:
 SwXBookmark()
-: UnoApiTest("")
-, XNamed("Bookmark")
+: UnoApiTest(u""_ustr)
+, XNamed(u"Bookmark"_ustr)
 {
 }
 
@@ -43,7 +43,7 @@ public:
 {
 UnoApiTest::setUp();
 mxDesktop.set(frame::Desktop::create(mxComponentContext));
-mxComponent = loadFromDesktop("private:factory/swriter");
+mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
 CPPUNIT_ASSERT(mxComponent.is());
 }
 
@@ -55,13 +55,13 @@ public:
 Reference xText = xTextDocument->getText();
 Reference xCursor = xText->createTextCursor();
 
-Reference 
xBookmark(xMSF->createInstance("com.sun.star.text.Bookmark"),
-UNO_QUERY_THROW);
+Reference xBookmark(
+xMSF->createInstance(u"com.sun.star.text.Bookmark"_ustr), 
UNO_QUERY_THROW);
 
 xText->insertTextContent(xCursor, xBookmark, false);
 mxTextRange = Reference(xCursor, UNO_QUERY_THROW);
 mxTextContent = Reference(
-xMSF->createInstance("com.sun.star.text.Bookmark"), 
UNO_QUERY_THROW);
+xMSF->createInstance(u"com.sun.star.text.Bookmark"_ustr), 
UNO_Q

core.git: comphelper/source cpputools/source docmodel/source eventattacher/source i18nlangtag/qa i18nlangtag/source i18npool/qa i18nutil/source include/docmodel include/systools o3tl/qa opencl/source

2024-05-20 Thread Noel Grandin (via logerrit)
 UnoControls/source/controls/OConnectionPointHelper.cxx   |8 
 UnoControls/source/controls/framecontrol.cxx |   10 
 UnoControls/source/controls/statusindicator.cxx  |2 
 comphelper/source/property/propertysethelper.cxx |2 
 cpputools/source/unoexe/unoexe.cxx   |   20 
 docmodel/source/theme/Theme.cxx  |   12 
 eventattacher/source/eventattacher.cxx   |4 
 i18nlangtag/qa/cppunit/test_languagetag.cxx  |  678 +++
 i18nlangtag/source/languagetag/languagetag.cxx   |   20 
 i18npool/qa/cppunit/test_breakiterator.cxx   |8 
 i18nutil/source/utility/unicode.cxx  |2 
 include/docmodel/theme/Theme.hxx |2 
 include/systools/curlinit.hxx|2 
 include/systools/opensslinit.hxx |2 
 o3tl/qa/test-sorted_vector.cxx   |   20 
 o3tl/qa/test-string_view.cxx |   16 
 opencl/source/openclconfig.cxx   |   10 
 opencl/source/openclwrapper.cxx  |2 
 postprocess/qa/services.cxx  |   10 
 registry/source/regkey.cxx   |   18 
 remotebridges/source/unourl_resolver/unourl_resolver.cxx |6 
 scaddins/source/analysis/analysis.cxx|2 
 scaddins/source/analysis/analysishelper.cxx  |2 
 scaddins/source/datefunc/datefunc.cxx|2 
 smoketest/smoketest.cxx  |8 
 store/qa/store.cxx   |8 
 testtools/source/bridgetest/bridgetest.cxx   |   22 
 testtools/source/bridgetest/constructors.cxx |8 
 testtools/source/bridgetest/cppobj.cxx   |   20 
 testtools/source/bridgetest/multi.cxx|   42 
 unodevtools/source/skeletonmaker/cppcompskeleton.cxx |   26 
 unodevtools/source/skeletonmaker/javacompskeleton.cxx|   12 
 unodevtools/source/skeletonmaker/skeletoncommon.cxx  |   24 
 unotest/source/cpp/macros_test.cxx   |6 
 unotest/source/cpp/officeconnection.cxx  |   12 
 vcl/qa/cppunit/svm/svmtest.cxx   |   98 +-
 xmlreader/source/span.cxx|2 
 37 files changed, 573 insertions(+), 575 deletions(-)

New commits:
commit d573e2ae17d2ff589ec7adc0dddf6a78db4cc93a
Author: Noel Grandin 
AuthorDate: Mon May 20 09:34:37 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon May 20 22:09:56 2024 +0200

loplugin:ostr in various

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

diff --git a/UnoControls/source/controls/OConnectionPointHelper.cxx 
b/UnoControls/source/controls/OConnectionPointHelper.cxx
index b17edc2ba3da..26b04a6cc9af 100644
--- a/UnoControls/source/controls/OConnectionPointHelper.cxx
+++ b/UnoControls/source/controls/OConnectionPointHelper.cxx
@@ -101,7 +101,7 @@ Type SAL_CALL OConnectionPointHelper::getConnectionType()
 // Set default return value, if method failed.
 if ( !impl_LockContainer() )
 {
-throw RuntimeException("Container does not exist!");
+throw RuntimeException(u"Container does not exist!"_ustr);
 }
 
 // If container reference valid, return right type of supported interfaces 
of THIS connectionpoint.
@@ -144,7 +144,7 @@ void SAL_CALL OConnectionPointHelper::advise( const 
Reference< XInterface >& xLi
 // Operation is permitted only, if reference to container is valid!
 if ( !impl_LockContainer() )
 {
-throw RuntimeException("Container does not exist!");
+throw RuntimeException(u"Container does not exist!"_ustr);
 }
 // Forward it to OConnectionPointHelperContainer!
 m_pContainerImplementation->advise( m_aInterfaceType, xListener );
@@ -161,7 +161,7 @@ void SAL_CALL OConnectionPointHelper::unadvise( const 
Reference< XInterface >& x
 // Operation is permitted only, if reference to container is valid!
 if ( !impl_LockContainer() )
 {
-throw RuntimeException("Container does not exist!");
+throw RuntimeException(u"Container does not exist!"_ustr);
 
 }
 // Forward it to OConnectionPointHelperContainer!
@@ -179,7 +179,7 @@ Sequence< Reference< XInterface > > SAL_CALL 
OConnectionPointHelper::getConnecti
 // Operation is permitted only, if reference to container is valid!
 if ( !impl_LockContainer() )
 {
-throw RuntimeException("Container does not exist!");
+throw RuntimeException(u"Container does not exist!"_ustr);
 }
 // Se

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

2024-05-20 Thread Noel Grandin
So I saw the same thing on my ARM macbook, and I chased it for a while,
resetting/clearing ccache, rebooting, etc, but it just kept coming back, so
I gave up and updated to a newer version of ccache for my mac, which seems
to have fixed it (and as a bonus, is much newer and supports nice
compression, saving me disk space, etc)

Patch to update LODE here:
   https://gerrit.libreoffice.org/c/lode/+/167874

you will need to re-run LODE setup after applying that patch.


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

2024-05-20 Thread Noel Grandin (via logerrit)
 sw/inc/unocoll.hxx   |3 ++-
 sw/source/core/inc/frame.hxx |3 ++-
 sw/source/core/layout/wsfrm.cxx  |6 +++---
 sw/source/core/unocore/unocoll.cxx   |2 +-
 sw/source/core/unocore/unoredline.cxx|3 ++-
 sw/source/core/unocore/unotext.cxx   |   11 ---
 sw/source/filter/ww8/docxtableexport.cxx |4 ++--
 7 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 41c04ceb3b1b14c3c99ede86524df8f3de4f5daa
Author: Noel Grandin 
AuthorDate: Mon May 20 12:55:15 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon May 20 19:14:14 2024 +0200

use more concrete UNO types in sw

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

diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx
index 6254801bf8a7..0ecca6fb45c2 100644
--- a/sw/inc/unocoll.hxx
+++ b/sw/inc/unocoll.hxx
@@ -40,6 +40,7 @@ class SwSectionFormat;
 struct SvEventDescription;
 class SwXFootnote;
 class SwXTextSection;
+class SwXTextTable;
 
 const SvEventDescription* sw_GetSupportedMacroItems();
 
@@ -287,7 +288,7 @@ public:
 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) 
override;
 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() 
override;
 
-SW_DLLPUBLIC static css::uno::Reference 
GetObject(SwFrameFormat& rFormat);
+SW_DLLPUBLIC static rtl::Reference GetObject(SwFrameFormat& 
rFormat);
 };
 
 typedef
diff --git a/sw/source/core/unocore/unocoll.cxx 
b/sw/source/core/unocore/unocoll.cxx
index 24016c53350f..e00fa835f16a 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -973,7 +973,7 @@ uno::Sequence< OUString > 
SwXTextTables::getSupportedServiceNames()
 return { u"com.sun.star.text.TextTables"_ustr };
 }
 
-uno::Reference SwXTextTables::GetObject(SwFrameFormat& 
rFormat)
+rtl::Reference SwXTextTables::GetObject(SwFrameFormat& rFormat)
 {
 return SwXTextTable::CreateXTextTable(& rFormat);
 }
diff --git a/sw/source/core/unocore/unoredline.cxx 
b/sw/source/core/unocore/unoredline.cxx
index 27fd9aa7f555..b97cc20028b2 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -422,7 +423,7 @@ uno::Any SwXRedline::getPropertyValue( const OUString& 
rPropertyName )
 OSL_ENSURE(pTableNode, "No table node!");
 SwTable& rTable = pTableNode->GetTable();
 SwFrameFormat* pTableFormat = rTable.GetFrameFormat();
-xRet = SwXTextTables::GetObject( *pTableFormat );
+xRet = cppu::getXWeak(SwXTextTables::GetObject( *pTableFormat 
).get());
 }
 break;
 case SwNodeType::Text :
diff --git a/sw/source/core/unocore/unotext.cxx 
b/sw/source/core/unocore/unotext.cxx
index 730e24ca6718..50d9f75db63f 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -2214,9 +2214,8 @@ SwXText::convertToTable(
 if (!pTable)
 return uno::Reference< text::XTextTable >();
 
-uno::Reference const xRet =
+rtl::Reference const xRet =
 SwXTextTable::CreateXTextTable(pTable->GetFrameFormat());
-uno::Reference const xPrSet(xRet, uno::UNO_QUERY);
 // set properties to the table
 // catch lang::WrappedTargetException and lang::IndexOutOfBoundsException
 try
@@ -2254,7 +2253,7 @@ SwXText::convertToTable(
 };
 if (std::find(vDenylist.begin(), vDenylist.end(), 
rTableProperty.Name) == vDenylist.end())
 {
-xPrSet->setPropertyValue(rTableProperty.Name, 
rTableProperty.Value);
+xRet->setPropertyValue(rTableProperty.Name, 
rTableProperty.Value);
 }
 }
 catch (const uno::Exception&)
@@ -2270,7 +2269,6 @@ SwXText::convertToTable(
 for(sal_Int32 nCnt = 0; nCnt < nLast; ++nCnt)
 lcl_ApplyRowProperties(rRowProperties[nCnt], 
xRows->getByIndex(nCnt), aRowSeparators[nCnt]);
 
-uno::Reference const xCR(xRet, 
uno::UNO_QUERY_THROW);
 //apply cell properties
 sal_Int32 nRow = 0;
 for(const auto& rCellPropertiesForRow : rCellProperties)
@@ -2280,7 +2278,7 @@ SwXText::convertToTable(
 {
 lcl_ApplyCellProperties(lcl_GetLeftPos(nCell, 
aRowSeparators[nRow]),
 rCellProps,
-xCR->getCellByPosition(nCell, nRow),
+xRet->getCellByPosition(nCell, nRow),
 aMergedCells);
 ++nCell;
 }
@@ -2299,8 +2297,7 @@ SwXText::convertToTable(
 }
 
 

core.git: sc/source

2024-05-20 Thread Noel Grandin (via logerrit)
 sc/source/ui/vba/excelvbahelper.cxx  |   32 ++---
 sc/source/ui/vba/excelvbahelper.hxx  |2 
 sc/source/ui/vba/vbaapplication.cxx  |   60 +-
 sc/source/ui/vba/vbaassistant.cxx|4 
 sc/source/ui/vba/vbaaxes.cxx |   18 +--
 sc/source/ui/vba/vbaaxis.cxx |   56 +-
 sc/source/ui/vba/vbaaxistitle.cxx|4 
 sc/source/ui/vba/vbaborders.cxx  |   22 ++--
 sc/source/ui/vba/vbacharacters.cxx   |6 -
 sc/source/ui/vba/vbachart.cxx|   22 ++--
 sc/source/ui/vba/vbachartobject.cxx  |8 -
 sc/source/ui/vba/vbachartobjects.cxx |   12 +-
 sc/source/ui/vba/vbacharttitle.cxx   |4 
 sc/source/ui/vba/vbacomment.cxx  |8 -
 sc/source/ui/vba/vbacomments.cxx |4 
 sc/source/ui/vba/vbadialog.cxx   |4 
 sc/source/ui/vba/vbadialogs.cxx  |4 
 sc/source/ui/vba/vbaeventshelper.cxx |8 -
 sc/source/ui/vba/vbafiledialog.cxx   |6 -
 sc/source/ui/vba/vbafiledialogitems.cxx  |8 -
 sc/source/ui/vba/vbafont.cxx |   26 ++--
 sc/source/ui/vba/vbaformat.cxx   |4 
 sc/source/ui/vba/vbaformatcondition.cxx  |4 
 sc/source/ui/vba/vbaformatconditions.cxx |   12 +-
 sc/source/ui/vba/vbaglobals.cxx  |   20 +--
 sc/source/ui/vba/vbahyperlink.cxx|   14 +-
 sc/source/ui/vba/vbahyperlinks.cxx   |4 
 sc/source/ui/vba/vbainterior.cxx |   16 +-
 sc/source/ui/vba/vbamenu.cxx |4 
 sc/source/ui/vba/vbamenubar.cxx  |4 
 sc/source/ui/vba/vbamenubars.cxx |8 -
 sc/source/ui/vba/vbamenuitem.cxx |4 
 sc/source/ui/vba/vbamenuitems.cxx|4 
 sc/source/ui/vba/vbamenus.cxx|4 
 sc/source/ui/vba/vbaname.cxx |4 
 sc/source/ui/vba/vbanames.cxx|8 -
 sc/source/ui/vba/vbaoleobject.cxx|6 -
 sc/source/ui/vba/vbaoleobjects.cxx   |4 
 sc/source/ui/vba/vbaoutline.cxx  |4 
 sc/source/ui/vba/vbapagebreak.cxx|   16 +-
 sc/source/ui/vba/vbapagebreaks.cxx   |   10 -
 sc/source/ui/vba/vbapagesetup.cxx|   88 
 sc/source/ui/vba/vbapalette.cxx  |4 
 sc/source/ui/vba/vbapane.cxx |4 
 sc/source/ui/vba/vbapivotcache.cxx   |4 
 sc/source/ui/vba/vbapivottable.cxx   |4 
 sc/source/ui/vba/vbapivottables.cxx  |4 
 sc/source/ui/vba/vbarange.cxx|  170 +++
 sc/source/ui/vba/vbarange.hxx|2 
 sc/source/ui/vba/vbasheetobject.cxx  |   42 +++
 sc/source/ui/vba/vbasheetobjects.cxx |   18 +--
 sc/source/ui/vba/vbastyle.cxx|8 -
 sc/source/ui/vba/vbastyles.cxx   |8 -
 sc/source/ui/vba/vbatextboxshape.cxx |2 
 sc/source/ui/vba/vbatextframe.cxx|4 
 sc/source/ui/vba/vbatitle.hxx|   12 +-
 sc/source/ui/vba/vbavalidation.cxx   |   14 +-
 sc/source/ui/vba/vbawindow.cxx   |   12 +-
 sc/source/ui/vba/vbawindows.cxx  |6 -
 sc/source/ui/vba/vbaworkbook.cxx |   28 ++---
 sc/source/ui/vba/vbaworkbooks.cxx|   22 ++--
 sc/source/ui/vba/vbaworksheet.cxx|   30 ++---
 sc/source/ui/vba/vbaworksheets.cxx   |   12 +-
 sc/source/ui/vba/vbawsfunction.cxx   |8 -
 64 files changed, 489 insertions(+), 489 deletions(-)

New commits:
commit 5a602ed852b872f87893169062ec47041e013fb9
Author: Noel Grandin 
AuthorDate: Mon May 20 09:13:38 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon May 20 14:40:36 2024 +0200

loplugin:ostr in sc/.../vba

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

diff --git a/sc/source/ui/vba/excelvbahelper.cxx 
b/sc/source/ui/vba/excelvbahelper.cxx
index 3224171677e9..0f00dae66ed7 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -64,7 +64,7 @@ GetUnnamedDataBaseRanges( const ScDocShell* pShell )
 if ( pShell )
 xModel.set( pShell->GetModel(), uno::UNO_SET_THROW );
 uno::Reference< beans::XPropertySet > xModelProps( xModel, 
uno::UNO_QUERY_THROW );
-uno::Reference< sheet::XUnnamedDatabaseRanges > xUnnamedDBRanges( 
xModelProps->getPropertyValue("UnnamedDatabaseRanges"), uno::UNO_QUERY_THROW );
+uno::Reference< sheet::XUnnamedDatabaseRanges > xUnnamedDBRanges( 
xModelProps->getPropertyValue(u"UnnamedDatabaseRanges"_ustr), 
uno::UNO_QUERY_THROW );
 return xUnnamedDBRanges;
 }
 
@@ -80,7 +80,7 @@ GetAutoFiltRange( const ScDocShell* pShell, sal_Int16 nSheet )
 uno::Reference< sheet::XDatabaseRange > xDBRange( 
xUnnamedDBRanges->getByTable( nSheet ) , uno::UNO_QUERY_THROW );
 bool bHasAuto = false;
 uno::Reference< beans::XPropertySet > xProps( xDBRange, 
uno::UN

core.git: sw/source

2024-05-20 Thread Noel Grandin (via logerrit)
 sw/source/core/access/AccessibilityCheck.cxx |   29 +--
 sw/source/core/access/AccessibilityIssue.cxx |   12 +--
 sw/source/core/access/acccell.cxx|2 -
 sw/source/core/access/acccontext.cxx |   12 +--
 sw/source/core/access/accdoc.cxx |   12 +--
 sw/source/core/access/accembedded.cxx|2 -
 sw/source/core/access/accfootnote.cxx|2 -
 sw/source/core/access/accgraphic.cxx |4 +--
 sw/source/core/access/accheaderfooter.cxx|2 -
 sw/source/core/access/acchyperlink.cxx   |2 -
 sw/source/core/access/accpage.cxx|2 -
 sw/source/core/access/accpara.cxx|   16 +++---
 sw/source/core/access/accpreview.cxx |2 -
 sw/source/core/access/accselectionhelper.cxx |2 -
 sw/source/core/access/acctable.cxx   |6 ++---
 sw/source/core/access/acctextframe.cxx   |4 +--
 16 files changed, 56 insertions(+), 55 deletions(-)

New commits:
commit 9312f954b6d636f232a72e35aa2767e450690793
Author: Noel Grandin 
AuthorDate: Mon May 20 09:14:32 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon May 20 12:29:03 2024 +0200

loplugin:ostr in sw/.../access

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

diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index a1fed7c1ffd1..ae767b597698 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -373,11 +373,11 @@ private:
 sal_Int32 nStart)
 {
 uno::Reference xProperties(xTextRange, 
uno::UNO_QUERY);
-if 
(!xProperties->getPropertySetInfo()->hasPropertyByName("HyperLinkURL"))
+if 
(!xProperties->getPropertySetInfo()->hasPropertyByName(u"HyperLinkURL"_ustr))
 return;
 
 OUString sHyperlink;
-xProperties->getPropertyValue("HyperLinkURL") >>= sHyperlink;
+xProperties->getPropertyValue(u"HyperLinkURL"_ustr) >>= sHyperlink;
 if (!sHyperlink.isEmpty())
 {
 OUString sText = xTextRange->getString();
@@ -485,7 +485,7 @@ private:
 
 Color nParaBackColor(COL_AUTO);
 uno::Reference xParagraphProperties(xParagraph, 
uno::UNO_QUERY);
-if (!(xParagraphProperties->getPropertyValue("ParaBackColor") >>= 
nParaBackColor))
+if (!(xParagraphProperties->getPropertyValue(u"ParaBackColor"_ustr) 
>>= nParaBackColor))
 {
 SAL_WARN("sw.a11y", "ParaBackColor void");
 return;
@@ -497,7 +497,7 @@ private:
 
 // Foreground color
 sal_Int32 nCharColor = {}; // spurious -Werror=maybe-uninitialized
-if (!(xProperties->getPropertyValue("CharColor") >>= nCharColor))
+if (!(xProperties->getPropertyValue(u"CharColor"_ustr) >>= nCharColor))
 { // not sure this is impossible, can the default be void?
 SAL_WARN("sw.a11y", "CharColor void");
 return;
@@ -522,7 +522,7 @@ private:
 
 Color nCharBackColor(COL_AUTO);
 
-if (!(xProperties->getPropertyValue("CharBackColor") >>= 
nCharBackColor))
+if (!(xProperties->getPropertyValue(u"CharBackColor"_ustr) >>= 
nCharBackColor))
 {
 SAL_WARN("sw.a11y", "CharBackColor void");
 return;
@@ -538,7 +538,7 @@ private:
 {
 OUString sCharStyleName;
 Color nCharStyleBackColor(COL_AUTO);
-if (xProperties->getPropertyValue("CharStyleName") >>= 
sCharStyleName)
+if (xProperties->getPropertyValue(u"CharStyleName"_ustr) >>= 
sCharStyleName)
 {
 try
 {
@@ -547,10 +547,10 @@ private:
 uno::Reference xCont
 = xStyleFamiliesSupplier->getStyleFamilies();
 uno::Reference xStyleFamily(
-xCont->getByName("CharacterStyles"), uno::UNO_QUERY);
+xCont->getByName(u"CharacterStyles"_ustr), 
uno::UNO_QUERY);
 uno::Reference xInfo(
 xStyleFamily->getByName(sCharStyleName), 
uno::UNO_QUERY);
-xInfo->getPropertyValue("CharBackColor") >>= 
nCharStyleBackColor;
+xInfo->getPropertyValue(u"CharBackColor"_ustr) >>= 
nCharStyleBackColor;
 }
 catch (const uno::Exception&)
 {
@@ -1095

core.git: sw/source

2024-05-18 Thread Noel Grandin (via logerrit)
 sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx |4 +-
 sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx |2 -
 sw/source/writerfilter/dmapper/PropertyMap.cxx   |   27 +--
 3 files changed, 16 insertions(+), 17 deletions(-)

New commits:
commit 551c8230b495e8c0e0502b73445f6edd1510633e
Author: Noel Grandin 
AuthorDate: Fri May 17 14:57:56 2024 +0200
Commit: Noel Grandin 
CommitDate: Sat May 18 16:59:15 2024 +0200

use more concrete UNO type in sw/../writerfilter

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

diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx 
b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
index 0d6570997e82..2f46d3e977fb 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
@@ -3883,7 +3883,7 @@ void DomainMapper_Impl::PushPageHeaderFooter(PagePartType 
ePagePartType, PageTyp
 
 /** Prepares the header/footer text content by first removing the existing
  *  content and adding it to the text append stack. */
-void 
DomainMapper_Impl::prepareHeaderFooterContent(uno::Reference
 const& xPageStyle,
+void 
DomainMapper_Impl::prepareHeaderFooterContent(rtl::Reference 
const& xPageStyle,
PagePartType ePagePartType, 
PropertyIds ePropertyID,
bool 
bAppendToHeaderAndFooterTextStack)
 {
@@ -3921,7 +3921,7 @@ void 
DomainMapper_Impl::checkIfHeaderFooterIsEmpty(PagePartType ePagePartType, P
 
 bool bHeader = ePagePartType == PagePartType::Header;
 
-uno::Reference 
xPageStyle(pSectionContext->GetPageStyle(*this));
+rtl::Reference 
xPageStyle(pSectionContext->GetPageStyle(*this));
 
 if (!xPageStyle.is())
 return;
diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx 
b/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx
index 052a0a62c156..d54b42e719dd 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx
@@ -744,7 +744,7 @@ public:
 void RemoveLastParagraph();
 
 void checkIfHeaderFooterIsEmpty(PagePartType ePagePartType, PageType 
eType);
-void 
prepareHeaderFooterContent(css::uno::Reference const& 
xPageStyle,
+void prepareHeaderFooterContent(rtl::Reference const& 
xPageStyle,
 PagePartType ePagePartType, PropertyIds 
eID,
 bool bAppendToHeaderAndFooterTextStack);
 
diff --git a/sw/source/writerfilter/dmapper/PropertyMap.cxx 
b/sw/source/writerfilter/dmapper/PropertyMap.cxx
index 913dde2bc84e..f52d37764402 100644
--- a/sw/source/writerfilter/dmapper/PropertyMap.cxx
+++ b/sw/source/writerfilter/dmapper/PropertyMap.cxx
@@ -594,11 +594,10 @@ void SectionPropertyMap::SetBorder( BorderPosition ePos, 
sal_Int32 nLineDistance
 
 void SectionPropertyMap::ApplyPaperSource(DomainMapper_Impl& rDM_Impl)
 {
-uno::Reference xFirst;
 // todo: negative spacing (from ww8par6.cxx)
 if (!m_sPageStyleName.isEmpty())
 {
-xFirst = GetPageStyle(rDM_Impl);
+rtl::Reference xFirst = GetPageStyle(rDM_Impl);
 if ( xFirst.is() )
 try
 {
@@ -630,7 +629,7 @@ void SectionPropertyMap::ApplyBorderToPageStyles( 
DomainMapper_Impl& rDM_Impl,
 1 offset from edge of page
 */
 
-uno::Reference xFirst;
+rtl::Reference xFirst;
 // todo: negative spacing (from ww8par6.cxx)
 if (!m_sPageStyleName.isEmpty())
 xFirst = GetPageStyle(rDM_Impl);
@@ -895,8 +894,8 @@ namespace
 {
 
 // Copy the content of the header/footer property to the target style
-void copyHeaderFooterTextProperty(const uno::Reference& 
xSource,
-  const uno::Reference& 
xTarget,
+void copyHeaderFooterTextProperty(const rtl::Reference& xSource,
+  const rtl::Reference& xTarget,
   PropertyIds ePropId)
 {
 if (!xSource.is() || !xTarget.is())
@@ -923,8 +922,8 @@ void copyHeaderFooterTextProperty(const 
uno::Reference& xSo
 }
 
 // Copies all the header and footer content and relevant flags from the source 
style to the target.
-void completeCopyHeaderFooter(const uno::Reference& 
xSourceStyle,
-const uno::Reference& xTargetStyle,
+void completeCopyHeaderFooter(const rtl::Reference& xSourceStyle,
+const rtl::Reference& xTargetStyle,
 bool const bMissingHeader, bool const bMissingFooter)
 {
 if (!xSourceStyle.is() || !xTargetStyle.is())
@@ -994,8 +993,8 @@ void completeCopyHeaderFooter(const 
uno::Reference& xSource
 
 // Copy headers and footers from the previous page style.
 void copyHeaderFooter(const DomainMapper_Impl&

core.git: i18nlangtag/source

2024-05-18 Thread Noel Grandin (via logerrit)
 i18nlangtag/source/isolang/mslangid.cxx |9 +
 1 file changed, 9 insertions(+)

New commits:
commit f1ef9379fd9679775eadeecc598aa8087d09bb77
Author: Noel Grandin 
AuthorDate: Fri May 17 15:59:45 2024 +0200
Commit: Noel Grandin 
CommitDate: Sat May 18 12:29:08 2024 +0200

cool#8570 single-element cache in MsLangId::getScriptType

this method is hit pretty hard, so try a single element cache

Change-Id: I7c9f9285037a181ee24fbdf04cabc15b40a2ff03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167781
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 18102e3d7f832b8d5e445e427b55654f5bfd30b0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167687
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/i18nlangtag/source/isolang/mslangid.cxx 
b/i18nlangtag/source/isolang/mslangid.cxx
index aa913a7f7ff4..a989fbed75f4 100644
--- a/i18nlangtag/source/isolang/mslangid.cxx
+++ b/i18nlangtag/source/isolang/mslangid.cxx
@@ -364,6 +364,13 @@ bool MsLangId::needsSequenceChecking( LanguageType nLang )
 // static
 sal_Int16 MsLangId::getScriptType( LanguageType nLang )
 {
+// single-element cache
+static thread_local LanguageType nCachedLang = 
LANGUAGE_MONGOLIAN_MONGOLIAN_MONGOLIA;
+static thread_local sal_Int16 nCachedScript = 
css::i18n::ScriptType::COMPLEX;
+
+if (nCachedLang == nLang)
+return nCachedScript;
+
 sal_Int16 nScript;
 
 // CTL
@@ -475,6 +482,8 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang )
 {
 nScript = css::i18n::ScriptType::LATIN;
 }
+nCachedLang = nLang;
+nCachedScript = nScript;
 return nScript;
 }
 


core.git: sw/source

2024-05-17 Thread Noel Grandin (via logerrit)
 sw/source/core/unocore/SwXTextDefaults.cxx   |   16 +-
 sw/source/core/unocore/swunohelper.cxx   |6 -
 sw/source/core/unocore/unobkm.cxx|   30 ++---
 sw/source/core/unocore/unochart.cxx  |   30 ++---
 sw/source/core/unocore/unocoll.cxx   |   50 -
 sw/source/core/unocore/unocontentcontrol.cxx |   22 ++--
 sw/source/core/unocore/unocrsrhelper.cxx |   20 +--
 sw/source/core/unocore/unodraw.cxx   |   40 +++
 sw/source/core/unocore/unoevent.cxx  |8 -
 sw/source/core/unocore/unofield.cxx  |   26 ++--
 sw/source/core/unocore/unoflatpara.cxx   |   10 -
 sw/source/core/unocore/unoframe.cxx  |   46 
 sw/source/core/unocore/unoftn.cxx|4 
 sw/source/core/unocore/unoidx.cxx|   46 
 sw/source/core/unocore/unolinebreak.cxx  |6 -
 sw/source/core/unocore/unoobj.cxx|   40 +++
 sw/source/core/unocore/unoobj2.cxx   |   62 +--
 sw/source/core/unocore/unoparagraph.cxx  |   28 ++---
 sw/source/core/unocore/unoport.cxx   |   24 ++--
 sw/source/core/unocore/unoportenum.cxx   |4 
 sw/source/core/unocore/unoredline.cxx|4 
 sw/source/core/unocore/unoredlines.cxx   |4 
 sw/source/core/unocore/unorefmk.cxx  |   58 +-
 sw/source/core/unocore/unosect.cxx   |   18 +--
 sw/source/core/unocore/unosett.cxx   |   48 
 sw/source/core/unocore/unosrch.cxx   |4 
 sw/source/core/unocore/unostyle.cxx  |   66 ++--
 sw/source/core/unocore/unotbl.cxx|  148 +--
 sw/source/core/unocore/unotext.cxx   |   36 +++---
 29 files changed, 453 insertions(+), 451 deletions(-)

New commits:
commit 359ae74cc138c59d18285cea301a7382da14668d
Author: Noel Grandin 
AuthorDate: Fri May 17 12:42:04 2024 +0200
Commit: Noel Grandin 
CommitDate: Fri May 17 21:38:42 2024 +0200

loplugin:ostr in sw/../unocore

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

diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx 
b/sw/source/core/unocore/SwXTextDefaults.cxx
index f129eff219eb..66ea89e3d3f0 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -213,7 +213,7 @@ Any SAL_CALL SwXTextDefaults::getPropertyDefault( const 
OUString& rPropertyName
 
 OUString SAL_CALL SwXTextDefaults::getImplementationName(  )
 {
-return "SwXTextDefaults";
+return u"SwXTextDefaults"_ustr;
 }
 
 sal_Bool SAL_CALL SwXTextDefaults::supportsService( const OUString& 
rServiceName )
@@ -223,13 +223,13 @@ sal_Bool SAL_CALL SwXTextDefaults::supportsService( const 
OUString& rServiceName
 
 uno::Sequence< OUString > SAL_CALL SwXTextDefaults::getSupportedServiceNames(  
)
 {
-return { "com.sun.star.text.Defaults",
- "com.sun.star.style.CharacterProperties",
- "com.sun.star.style.CharacterPropertiesAsian",
- "com.sun.star.style.CharacterPropertiesComplex",
- "com.sun.star.style.ParagraphProperties",
- "com.sun.star.style.ParagraphPropertiesAsian",
- "com.sun.star.style.ParagraphPropertiesComplex" };
+return { u"com.sun.star.text.Defaults"_ustr,
+ u"com.sun.star.style.CharacterProperties"_ustr,
+ u"com.sun.star.style.CharacterPropertiesAsian"_ustr,
+ u"com.sun.star.style.CharacterPropertiesComplex"_ustr,
+ u"com.sun.star.style.ParagraphProperties"_ustr,
+ u"com.sun.star.style.ParagraphPropertiesAsian"_ustr,
+ u"com.sun.star.style.ParagraphPropertiesComplex"_ustr };
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/swunohelper.cxx 
b/sw/source/core/unocore/swunohelper.cxx
index 0aab2a681acf..b5b1d2adb36a 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -64,7 +64,7 @@ bool UCB_DeleteFile( const OUString& rURL )
 ucbhelper::Content aTempContent( rURL,
 css::uno::Reference< 
css::ucb::XCommandEnvironment >(),
 comphelper::getProcessComponentContext() );
-aTempContent.executeCommand("delete", css::uno::Any( true ) );
+aTempContent.executeCommand(u"delete"_ustr, css::uno::Any( true ) );
 bRemoved = true;
 }
 catch( css::uno::Exception& )
@@ -94,7 +94,7 @@ bool UCB_MoveFile( const OUString& rURL, std::u16string_view 
rNewURL )
 aInfo.NewTitle = sName;
 aInfo.SourceURL = rURL;
 aInfo.MoveData = true;
-

core.git: Branch 'distro/collabora/co-24.04' - 26 commits - dbaccess/source download.lst forms/source framework/source officecfg/registry readlicense_oo/license sal/rtl sc/Library_vbaobj.mk sc/source

2024-05-17 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/relationdesign/RTableConnection.cxx|2 
 download.lst  |8 
 forms/source/richtext/parametrizedattributedispatcher.cxx |   14 
 forms/source/richtext/parametrizedattributedispatcher.hxx |6 
 forms/source/richtext/specialdispatchers.cxx  |   14 
 forms/source/richtext/specialdispatchers.hxx  |2 
 framework/source/uielement/menubarmanager.cxx |   11 
 officecfg/registry/data/org/openoffice/Office/Paths.xcu   |5 
 readlicense_oo/license/CREDITS.fodt   | 2026 +++---
 sal/rtl/strtmpl.hxx   |5 
 sc/Library_vbaobj.mk  |1 
 sc/source/ui/app/transobj.cxx |   31 
 sd/qa/unit/PNGExportTests.cxx |8 
 solenv/gbuild/Rdb.mk  |1 
 svx/source/dialog/framelinkarray.cxx  |8 
 sw/qa/core/layout/calcmove.cxx|   24 
 sw/qa/core/layout/data/ignore-top-margin-fly.odt  |binary
 sw/qa/extras/uiwriter/data/tdf160842.fodt |   75 
 sw/qa/extras/uiwriter/uiwriter6.cxx   |  157 +
 sw/qa/extras/unowriter/data/tdf161035.fodt|9 
 sw/qa/extras/unowriter/unowriter.cxx  |   27 
 sw/source/core/access/accfrmobj.cxx   |   15 
 sw/source/core/doc/docdraw.cxx|   12 
 sw/source/core/draw/dview.cxx |  129 
 sw/source/core/frmedt/fecopy.cxx  |   25 
 sw/source/core/frmedt/fefly1.cxx  |   13 
 sw/source/core/frmedt/feshview.cxx|   59 
 sw/source/core/layout/anchoreddrawobject.cxx  |4 
 sw/source/core/layout/anchoredobject.cxx  |   11 
 sw/source/core/layout/calcmove.cxx|6 
 sw/source/core/layout/fly.cxx |4 
 sw/source/core/layout/flylay.cxx  |   41 
 sw/source/core/layout/frmtool.cxx |   40 
 sw/source/core/layout/pagechg.cxx |   19 
 sw/source/core/layout/trvlfrm.cxx |   39 
 sw/source/core/txtnode/atrflyin.cxx   |3 
 sw/source/core/undo/undraw.cxx|   31 
 sw/source/core/unocore/unoportenum.cxx|4 
 sw/source/uibase/docvw/edtwin.cxx |   10 
 sw/source/uibase/uiview/viewtab.cxx   |2 
 sw/source/uibase/utlui/content.cxx|2 
 vcl/osx/salinst.cxx   |   17 
 vcl/skia/gdiimpl.cxx  |   20 
 vcl/source/filter/igif/gifread.cxx|   36 
 vcl/unx/gtk3/hudawareness.cxx |2 
 45 files changed, 1752 insertions(+), 1226 deletions(-)

New commits:
commit f12e69cc4ccbc02ebb920dd9788b9273f8b8bdf8
Author: Noel Grandin 
AuthorDate: Tue May 14 09:08:16 2024 +0200
Commit: Andras Timar 
CommitDate: Fri May 17 19:57:46 2024 +0200

tdf#161019 tdf#159846 spreadsheet border rendering

regression from
commit e27d4cc31e04be4c47b5085dfa2363ee45457e8a
Author: Noel Grandin 
Date:   Mon Jun 19 12:23:55 2023 +0200
tdf#150534 reduce the memory consumption of cells when calculating

Change-Id: Id8b52a3a0880bbb6a7aff28f55bcd57cb1cae048
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167617
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 6f8a73a379d97829080367b21d54f9b5fab781c9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167682
Reviewed-by: Xisco Fauli 

diff --git a/svx/source/dialog/framelinkarray.cxx 
b/svx/source/dialog/framelinkarray.cxx
index fa5829438698..897012611151 100644
--- a/svx/source/dialog/framelinkarray.cxx
+++ b/svx/source/dialog/framelinkarray.cxx
@@ -936,7 +936,7 @@ void Array::SetAddMergedLeftSize( sal_Int32 nCol, sal_Int32 
nRow, sal_Int32 nAdd
 return;
 Cell aTempCell(*pTempCell);
 aTempCell.mnAddLeft = nAddSize;
-mxImpl->PutCell( nCol, nRow, aTempCell );
+mxImpl->PutCell( aIt.Col(), aIt.Row(), aTempCell );
 }
 }
 
@@ -951,7 +951,7 @@ void Array::SetAddMergedRightSize( sal_Int32 nCol, 
sal_Int32 nRow, sal_Int32 nAd
 return;
 Cell aTempCell(*pTempCell);
 aTempCell.mnAddRight = nAddSize;
-mxImpl->PutCell( nCol, nRow, aTempCell );
+mxImpl->PutCell( aIt.Col(), aIt.Row(), aTempCell );
 }
 }
 
@@ -966,7 +966,7 @@ void Array::SetAddMergedTopSize( sal_Int32 nCol, sal_Int32 
nRow, sal_Int32 nAddS
 return;
 Cell aTempCell(*pTempCell);
 aTempCell.mnAddTo

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

2024-05-17 Thread Noel Grandin (via logerrit)
 i18nlangtag/source/isolang/mslangid.cxx |9 +
 1 file changed, 9 insertions(+)

New commits:
commit 18102e3d7f832b8d5e445e427b55654f5bfd30b0
Author: Noel Grandin 
AuthorDate: Fri May 17 15:59:45 2024 +0200
Commit: Noel Grandin 
CommitDate: Fri May 17 18:58:13 2024 +0200

cool#8570 single-element cache in MsLangId::getScriptType

this method is hit pretty hard, so try a single element cache

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

diff --git a/i18nlangtag/source/isolang/mslangid.cxx 
b/i18nlangtag/source/isolang/mslangid.cxx
index 3a420dba2d2c..4e0a5584a28d 100644
--- a/i18nlangtag/source/isolang/mslangid.cxx
+++ b/i18nlangtag/source/isolang/mslangid.cxx
@@ -364,6 +364,13 @@ bool MsLangId::needsSequenceChecking( LanguageType nLang )
 // static
 sal_Int16 MsLangId::getScriptType( LanguageType nLang )
 {
+// single-element cache
+static thread_local LanguageType nCachedLang = 
LANGUAGE_MONGOLIAN_MONGOLIAN_MONGOLIA;
+static thread_local sal_Int16 nCachedScript = 
css::i18n::ScriptType::COMPLEX;
+
+if (nCachedLang == nLang)
+return nCachedScript;
+
 sal_Int16 nScript;
 
 // CTL
@@ -471,6 +478,8 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang )
 {
 nScript = css::i18n::ScriptType::LATIN;
 }
+nCachedLang = nLang;
+nCachedScript = nScript;
 return nScript;
 }
 


core.git: sc/source

2024-05-17 Thread Noel Grandin (via logerrit)
 sc/source/core/tool/addincol.cxx  |4 -
 sc/source/core/tool/addinlis.cxx  |2 
 sc/source/core/tool/appoptio.cxx  |   42 +--
 sc/source/core/tool/calcconfig.cxx|8 +--
 sc/source/core/tool/cellform.cxx  |2 
 sc/source/core/tool/cellkeytranslator.cxx |2 
 sc/source/core/tool/cellkeywords.inl  |6 +-
 sc/source/core/tool/charthelper.cxx   |   14 +++---
 sc/source/core/tool/compiler.cxx  |2 
 sc/source/core/tool/defaultsoptions.cxx   |6 +-
 sc/source/core/tool/docoptio.cxx  |   30 ++---
 sc/source/core/tool/editutil.cxx  |4 -
 sc/source/core/tool/filtopt.cxx   |6 +-
 sc/source/core/tool/formulalogger.cxx |2 
 sc/source/core/tool/formulaopt.cxx|   32 +++---
 sc/source/core/tool/formulaparserpool.cxx |2 
 sc/source/core/tool/grouparealistener.cxx |4 -
 sc/source/core/tool/inputopt.cxx  |   24 +-
 sc/source/core/tool/interpr1.cxx  |4 -
 sc/source/core/tool/interpr4.cxx  |6 +-
 sc/source/core/tool/interpr5.cxx  |2 
 sc/source/core/tool/printopt.cxx  |6 +-
 sc/source/core/tool/stylehelper.cxx   |   38 -
 sc/source/core/tool/unitconv.cxx  |2 
 sc/source/core/tool/viewopti.cxx  |   66 +++---
 sc/source/core/tool/zforauto.cxx  |2 
 26 files changed, 159 insertions(+), 159 deletions(-)

New commits:
commit cb4e9a7bf2231716d4809c682ae4b6b8b91b09b4
Author: Noel Grandin 
AuthorDate: Fri May 17 12:40:23 2024 +0200
Commit: Noel Grandin 
CommitDate: Fri May 17 14:15:20 2024 +0200

loplugin:ostr in sc/../tool

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

diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 66d8902de5f1..f66ff2da554c 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -260,7 +260,7 @@ void ScUnoAddInCollection::Initialize()
 if ( xEnAc.is() )
 {
 uno::Reference xEnum =
-xEnAc->createContentEnumeration( 
"com.sun.star.sheet.AddIn" );
+xEnAc->createContentEnumeration( 
u"com.sun.star.sheet.AddIn"_ustr );
 if ( xEnum.is() )
 {
 //  loop through all AddIns
@@ -368,7 +368,7 @@ void ScUnoAddInCollection::ReadConfiguration()
 const OUString sSlash('/');
 
 // get the list of add-ins (services)
-const uno::Sequence aServiceNames = rAddInConfig.GetNodeNames( 
"" );
+const uno::Sequence aServiceNames = rAddInConfig.GetNodeNames( 
u""_ustr );
 
 for ( const OUString& aServiceName : aServiceNames )
 {
diff --git a/sc/source/core/tool/addinlis.cxx b/sc/source/core/tool/addinlis.cxx
index f8a236780e07..b7548a78dec7 100644
--- a/sc/source/core/tool/addinlis.cxx
+++ b/sc/source/core/tool/addinlis.cxx
@@ -31,7 +31,7 @@
 
 using namespace com::sun::star;
 
-SC_SIMPLE_SERVICE_INFO( ScAddInListener, "ScAddInListener", 
"stardiv.one.sheet.AddInListener" )
+SC_SIMPLE_SERVICE_INFO( ScAddInListener, u"ScAddInListener"_ustr, 
u"stardiv.one.sheet.AddInListener"_ustr )
 
 ::std::vector> ScAddInListener::aAllListeners;
 
diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx
index c35524f9588f..7b44ca39fe4f 100644
--- a/sc/source/core/tool/appoptio.cxx
+++ b/sc/source/core/tool/appoptio.cxx
@@ -213,51 +213,51 @@ Sequence ScAppCfg::GetLayoutPropertyNames()
 {
 const bool bIsMetric = ScOptionsUtil::IsMetricSystem();
 
-return {(bIsMetric ? OUString("Other/MeasureUnit/Metric")
-   : OUString("Other/MeasureUnit/NonMetric")),  // 
SCLAYOUTOPT_MEASURE
- "Other/StatusbarFunction", // 
SCLAYOUTOPT_STATUSBAR
- "Zoom/Value",  // 
SCLAYOUTOPT_ZOOMVAL
- "Zoom/Type",   // 
SCLAYOUTOPT_ZOOMTYPE
- "Zoom/Synchronize",// 
SCLAYOUTOPT_SYNCZOOM
- "Other/StatusbarMultiFunction"};   // 
SCLAYOUTOPT_STATUSBARMULTI
+return {(bIsMetric ? u"Other/MeasureUnit/Metric"_ustr
+   : u"Other/MeasureUnit/NonMetric"_ustr),  // 
SCLAYOUTOPT_MEASURE
+ u"Other/StatusbarFunction"_ustr, // 
SCLAYOUTOPT_STATUSBAR
+ u"Zoom/Value"_ustr,  // 
SCLAYOUTOPT_ZOOMVAL
+ u"Zoom/Type"_ustr, 

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

2024-05-17 Thread Noel Grandin (via logerrit)
 svx/source/dialog/framelinkarray.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit ab69de0e0aa0c9e48355c9db36c8aa9b93f235d4
Author: Noel Grandin 
AuthorDate: Tue May 14 09:08:16 2024 +0200
Commit: Xisco Fauli 
CommitDate: Fri May 17 13:34:44 2024 +0200

tdf#161019 tdf#159846 spreadsheet border rendering

regression from
commit e27d4cc31e04be4c47b5085dfa2363ee45457e8a
Author: Noel Grandin 
Date:   Mon Jun 19 12:23:55 2023 +0200
tdf#150534 reduce the memory consumption of cells when calculating

Change-Id: Id8b52a3a0880bbb6a7aff28f55bcd57cb1cae048
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167617
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 6f8a73a379d97829080367b21d54f9b5fab781c9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167682
Reviewed-by: Xisco Fauli 

diff --git a/svx/source/dialog/framelinkarray.cxx 
b/svx/source/dialog/framelinkarray.cxx
index fa5829438698..897012611151 100644
--- a/svx/source/dialog/framelinkarray.cxx
+++ b/svx/source/dialog/framelinkarray.cxx
@@ -936,7 +936,7 @@ void Array::SetAddMergedLeftSize( sal_Int32 nCol, sal_Int32 
nRow, sal_Int32 nAdd
 return;
 Cell aTempCell(*pTempCell);
 aTempCell.mnAddLeft = nAddSize;
-mxImpl->PutCell( nCol, nRow, aTempCell );
+mxImpl->PutCell( aIt.Col(), aIt.Row(), aTempCell );
 }
 }
 
@@ -951,7 +951,7 @@ void Array::SetAddMergedRightSize( sal_Int32 nCol, 
sal_Int32 nRow, sal_Int32 nAd
 return;
 Cell aTempCell(*pTempCell);
 aTempCell.mnAddRight = nAddSize;
-mxImpl->PutCell( nCol, nRow, aTempCell );
+mxImpl->PutCell( aIt.Col(), aIt.Row(), aTempCell );
 }
 }
 
@@ -966,7 +966,7 @@ void Array::SetAddMergedTopSize( sal_Int32 nCol, sal_Int32 
nRow, sal_Int32 nAddS
 return;
 Cell aTempCell(*pTempCell);
 aTempCell.mnAddTop = nAddSize;
-mxImpl->PutCell( nCol, nRow, aTempCell );
+mxImpl->PutCell( aIt.Col(), aIt.Row(), aTempCell );
 }
 }
 
@@ -981,7 +981,7 @@ void Array::SetAddMergedBottomSize( sal_Int32 nCol, 
sal_Int32 nRow, sal_Int32 nA
 return;
 Cell aTempCell(*pTempCell);
 aTempCell.mnAddBottom = nAddSize;
-mxImpl->PutCell( nCol, nRow, aTempCell );
+mxImpl->PutCell( aIt.Col(), aIt.Row(), aTempCell );
 }
 }
 


core.git: sc/source

2024-05-17 Thread Noel Grandin (via logerrit)
 sc/source/filter/excel/excdoc.cxx|2 
 sc/source/filter/excel/excel.cxx |   12 -
 sc/source/filter/excel/excform.cxx   |6 
 sc/source/filter/excel/excform8.cxx  |6 
 sc/source/filter/excel/excimp8.cxx   |4 
 sc/source/filter/excel/expop2.cxx|2 
 sc/source/filter/excel/xechart.cxx   |2 
 sc/source/filter/excel/xecontent.cxx |4 
 sc/source/filter/excel/xeescher.cxx  |   72 -
 sc/source/filter/excel/xelink.cxx|4 
 sc/source/filter/excel/xepivotxml.cxx|2 
 sc/source/filter/excel/xeroot.cxx|2 
 sc/source/filter/excel/xestream.cxx  |6 
 sc/source/filter/excel/xestyle.cxx   |2 
 sc/source/filter/excel/xichart.cxx   |4 
 sc/source/filter/excel/xiescher.cxx  |  132 -
 sc/source/filter/excel/xistyle.cxx   |2 
 sc/source/filter/excel/xlchart.cxx   |   12 -
 sc/source/filter/excel/xltoolbar.cxx |6 
 sc/source/filter/html/htmlexp.cxx|2 
 sc/source/filter/html/htmlexp2.cxx   |2 
 sc/source/filter/html/htmlpars.cxx   |6 
 sc/source/filter/lotus/lotimpop.cxx  |4 
 sc/source/filter/oox/SparklineFragment.cxx   |8 -
 sc/source/filter/oox/commentsbuffer.cxx  |2 
 sc/source/filter/oox/condformatbuffer.cxx|4 
 sc/source/filter/oox/drawingfragment.cxx |   32 ++--
 sc/source/filter/oox/excelchartconverter.cxx |2 
 sc/source/filter/oox/excelfilter.cxx |2 
 sc/source/filter/oox/extlstcontext.cxx   |4 
 sc/source/filter/oox/formulabase.cxx |4 
 sc/source/filter/oox/numberformatsbuffer.cxx |4 
 sc/source/filter/oox/ooxformulaparser.cxx|6 
 sc/source/filter/oox/pivottablefragment.cxx  |2 
 sc/source/filter/oox/querytablebuffer.cxx|6 
 sc/source/filter/oox/sheetdatabuffer.cxx |2 
 sc/source/filter/oox/stylesbuffer.cxx|2 
 sc/source/filter/oox/unitconverter.cxx   |   14 -
 sc/source/filter/oox/viewsettings.cxx|2 
 sc/source/filter/oox/workbookfragment.cxx|6 
 sc/source/filter/oox/workbookhelper.cxx  |6 
 sc/source/filter/oox/workbooksettings.cxx|   12 -
 sc/source/filter/orcus/filterdetect.cxx  |   10 -
 sc/source/filter/xcl97/XclExpChangeTrack.cxx |4 
 sc/source/filter/xcl97/xcl97esc.cxx  |4 
 sc/source/filter/xcl97/xcl97rec.cxx  |2 
 sc/source/filter/xml/SparklineGroupsExport.cxx   |2 
 sc/source/filter/xml/XMLCodeNameProvider.cxx |2 
 sc/source/filter/xml/XMLExportDataPilot.cxx  |   16 +-
 sc/source/filter/xml/XMLExportDatabaseRanges.cxx |   16 +-
 sc/source/filter/xml/XMLStylesExportHelper.cxx   |6 
 sc/source/filter/xml/XMLTableHeaderFooterContext.cxx |   14 -
 sc/source/filter/xml/XMLTableShapeResizer.cxx|2 
 sc/source/filter/xml/XMLTrackedChangesContext.cxx|2 
 sc/source/filter/xml/xmlcondformat.cxx   |2 
 sc/source/filter/xml/xmlcvali.cxx|2 
 sc/source/filter/xml/xmlexprt.cxx|   98 ++---
 sc/source/filter/xml/xmlimprt.cxx|   68 -
 sc/source/filter/xml/xmlstyli.cxx|8 -
 sc/source/filter/xml/xmlwrap.cxx |  140 +--
 60 files changed, 407 insertions(+), 407 deletions(-)

New commits:
commit 000aaf1f8c6b3520a604327445a41ca6b8f568dc
Author: Noel Grandin 
AuthorDate: Fri May 17 08:50:01 2024 +0200
Commit: Noel Grandin 
CommitDate: Fri May 17 12:15:12 2024 +0200

loplugin:ostr in sc/../filter

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

diff --git a/sc/source/filter/excel/excdoc.cxx 
b/sc/source/filter/excel/excdoc.cxx
index 00b1ab0a3d72..9b2a29ff62ca 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -872,7 +872,7 @@ void ExcDocument::WriteXml( XclExpXmlStream& rStrm )
 std::shared_ptr pTheme = pDrawLayer->getTheme();
 if (pTheme)
 {
-OUString sThemeRelationshipPath = "theme/theme1.xml";
+OUString sThemeRelationshipPath = u"theme/theme1.xml"_ustr;
 OUString sThemeDocumentPath = "xl/" + sThemeRelationshipPath;
 
 oox::ThemeExport aThemeExport(, 
oox::drawingml::DOCUMENT

core.git: sd/source

2024-05-17 Thread Noel Grandin (via logerrit)
 sd/source/filter/eppt/eppt.cxx|   76 ++---
 sd/source/filter/eppt/epptso.cxx  |   88 
 sd/source/filter/eppt/pptexanimations.cxx |2 
 sd/source/filter/eppt/pptexsoundcollection.cxx|2 
 sd/source/filter/eppt/pptx-animations-nodectx.cxx |4 
 sd/source/filter/eppt/pptx-animations.cxx |7 -
 sd/source/filter/eppt/pptx-epptbase.cxx   |   34 +++---
 sd/source/filter/eppt/pptx-epptooxml.cxx  |  120 +++---
 sd/source/filter/eppt/pptx-stylesheet.cxx |6 -
 sd/source/filter/eppt/pptx-text.cxx   |   80 +++---
 sd/source/filter/html/htmlex.cxx  |4 
 sd/source/filter/ppt/pptin.cxx|   16 +-
 sd/source/filter/sdpptwrp.cxx |   18 +--
 sd/source/filter/xml/sdxmlwrp.cxx |  104 +--
 14 files changed, 281 insertions(+), 280 deletions(-)

New commits:
commit f2c46e9630567848e5aac3e88d98c4bfa1a4750f
Author: Noel Grandin 
AuthorDate: Fri May 17 08:50:28 2024 +0200
Commit: Noel Grandin 
CommitDate: Fri May 17 12:14:54 2024 +0200

loplugin:ostr in sd/../filter

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

diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index e6a71eb3f56c..32af30aecd97 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -99,21 +99,21 @@ void PPTWriter::exportPPTPre( const std::vector< 
css::beans::PropertyValue >& rM
 {
 mbStatusIndicator = true;
 mnStatMaxValue = ( mnPages + mnMasterPages ) * 5;
-mXStatusIndicator->start( "PowerPoint Export", mnStatMaxValue + ( 
mnStatMaxValue >> 3 ) );
+mXStatusIndicator->start( u"PowerPoint Export"_ustr, mnStatMaxValue + 
( mnStatMaxValue >> 3 ) );
 }
 
 SvGlobalName aGName(MSO_PPT8_CLASSID);
-mrStg->SetClass( aGName, SotClipboardFormatId::NONE, "MS PowerPoint 97" );
+mrStg->SetClass( aGName, SotClipboardFormatId::NONE, u"MS PowerPoint 
97"_ustr );
 
 if ( !ImplCreateCurrentUserStream() )
 return;
 
-mpStrm = mrStg->OpenSotStream( "PowerPoint Document" );
+mpStrm = mrStg->OpenSotStream( u"PowerPoint Document"_ustr );
 if ( !mpStrm )
 return;
 
 if ( !mpPicStrm )
-mpPicStrm = mrStg->OpenSotStream( "Pictures" );
+mpPicStrm = mrStg->OpenSotStream( u"Pictures"_ustr );
 
 auto aIter = std::find_if(rMediaData.begin(), rMediaData.end(),
 [](const css::beans::PropertyValue& rProp) { return rProp.Name == 
"BaseURI"; });
@@ -129,7 +129,7 @@ void PPTWriter::exportPPTPost( )
 
 if ( mbStatusIndicator )
 {
-mXStatusIndicator->setText( "PowerPoint Export" );
+mXStatusIndicator->setText( u"PowerPoint Export"_ustr );
 sal_uInt32 nValue = mnStatMaxValue + ( mnStatMaxValue >> 3 );
 if ( nValue > mnLatestStatValue )
 {
@@ -171,9 +171,9 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, 
sal_uInt32 nMasterNum, sal_
 bool bVisible = true;
 css::presentation::FadeEffect eFe = css::presentation::FadeEffect_NONE;
 
-if ( GetPropertyValue( aAny, mXPagePropSet, "Visible" ) )
+if ( GetPropertyValue( aAny, mXPagePropSet, u"Visible"_ustr ) )
 aAny >>= bVisible;
-if ( GetPropertyValue( aAny, mXPagePropSet, "Change" ) )
+if ( GetPropertyValue( aAny, mXPagePropSet, u"Change"_ustr ) )
 {
 switch ( *o3tl::doAccess(aAny) )
 {
@@ -188,7 +188,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, 
sal_uInt32 nMasterNum, sal_
 break;
 }
 }
-if ( GetPropertyValue( aAny, mXPagePropSet, "Effect" ) )
+if ( GetPropertyValue( aAny, mXPagePropSet, u"Effect"_ustr ) )
 aAny >>= eFe;
 
 sal_uInt32  nSoundRef = 0;
@@ -196,7 +196,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, 
sal_uInt32 nMasterNum, sal_
 boolbStopSound = false;
 boolbLoopSound = false;
 
-if ( GetPropertyValue( aAny, mXPagePropSet, "Sound" ) )
+if ( GetPropertyValue( aAny, mXPagePropSet, u"Sound"_ustr ) )
 {
 OUString aSoundURL;
 if ( aAny >>= aSoundURL )
@@ -207,7 +207,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, 
sal_uInt32 nMasterNum, sal_
 else
 aAny >>= bStopSound;
 }
-if ( GetPropertyValue( aAny, mXPagePropSet, "LoopSound" ) )
+if ( GetPropertyValue( aAny, mXPagePropSet, u"LoopSound"_ustr ) )
 aAny >>= bLoopSound;
 
 bool bNe

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

2024-05-17 Thread Noel Grandin (via logerrit)
 i18nlangtag/source/isolang/mslangid.cxx |  134 +++-
 1 file changed, 65 insertions(+), 69 deletions(-)

New commits:
commit 896b046fc35972a91f26dd31916d6833269b1d1d
Author: Noel Grandin 
AuthorDate: Fri May 17 09:01:36 2024 +0200
Commit: Michael Meeks 
CommitDate: Fri May 17 10:54:08 2024 +0200

cool#8570 try to reduce CPU spent in MsLangId::getScriptType

for some reason the optimiser does not like the o3tl::anyOf template
method and does not inline it nicely.

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

diff --git a/i18nlangtag/source/isolang/mslangid.cxx 
b/i18nlangtag/source/isolang/mslangid.cxx
index aa913a7f7ff4..3a420dba2d2c 100644
--- a/i18nlangtag/source/isolang/mslangid.cxx
+++ b/i18nlangtag/source/isolang/mslangid.cxx
@@ -367,87 +367,83 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang )
 sal_Int16 nScript;
 
 // CTL
-if( nLang.anyOf(
- LANGUAGE_MONGOLIAN_MONGOLIAN_MONGOLIA,
- LANGUAGE_MONGOLIAN_MONGOLIAN_CHINA,
- LANGUAGE_MONGOLIAN_MONGOLIAN_LSO,
- LANGUAGE_USER_KURDISH_IRAN,
- LANGUAGE_OBSOLETE_USER_KURDISH_IRAQ,
- LANGUAGE_KURDISH_ARABIC_IRAQ,
- LANGUAGE_KURDISH_ARABIC_LSO,
- LANGUAGE_USER_KURDISH_SOUTHERN_IRAN,
- LANGUAGE_USER_KURDISH_SOUTHERN_IRAQ,
- LANGUAGE_USER_KYRGYZ_CHINA,
- LANGUAGE_USER_HUNGARIAN_ROVAS,
- LANGUAGE_USER_MANCHU,
- LANGUAGE_USER_XIBE,
- LANGUAGE_USER_MALAY_ARABIC_MALAYSIA,
- LANGUAGE_USER_MALAY_ARABIC_BRUNEI,
- LANGUAGE_USER_ROHINGYA_HANIFI,
- LANGUAGE_USER_PALI_THAI))
+if( nLang == LANGUAGE_MONGOLIAN_MONGOLIAN_MONGOLIA
+|| nLang == LANGUAGE_MONGOLIAN_MONGOLIAN_CHINA
+|| nLang == LANGUAGE_MONGOLIAN_MONGOLIAN_LSO
+|| nLang == LANGUAGE_USER_KURDISH_IRAN
+|| nLang == LANGUAGE_OBSOLETE_USER_KURDISH_IRAQ
+|| nLang == LANGUAGE_KURDISH_ARABIC_IRAQ
+|| nLang == LANGUAGE_KURDISH_ARABIC_LSO
+|| nLang == LANGUAGE_USER_KURDISH_SOUTHERN_IRAN
+|| nLang == LANGUAGE_USER_KURDISH_SOUTHERN_IRAQ
+|| nLang == LANGUAGE_USER_KYRGYZ_CHINA
+|| nLang == LANGUAGE_USER_HUNGARIAN_ROVAS
+|| nLang == LANGUAGE_USER_MANCHU
+|| nLang == LANGUAGE_USER_XIBE
+|| nLang == LANGUAGE_USER_MALAY_ARABIC_MALAYSIA
+|| nLang == LANGUAGE_USER_MALAY_ARABIC_BRUNEI
+|| nLang == LANGUAGE_USER_ROHINGYA_HANIFI
+|| nLang == LANGUAGE_USER_PALI_THAI)
 {
 nScript = css::i18n::ScriptType::COMPLEX;
 }
 // "Western"
-else if (nLang.anyOf(
-LANGUAGE_MONGOLIAN_CYRILLIC_MONGOLIA,
-LANGUAGE_MONGOLIAN_CYRILLIC_LSO,
-LANGUAGE_USER_KURDISH_SYRIA,
-LANGUAGE_USER_KURDISH_TURKEY))
+else if ( nLang == LANGUAGE_MONGOLIAN_CYRILLIC_MONGOLIA
+|| nLang == LANGUAGE_MONGOLIAN_CYRILLIC_LSO
+|| nLang == LANGUAGE_USER_KURDISH_SYRIA
+|| nLang == LANGUAGE_USER_KURDISH_TURKEY)
 {
 nScript = css::i18n::ScriptType::LATIN;
 }
 // CJK catcher
-else if ( primary(nLang).anyOf(
-primary(LANGUAGE_CHINESE  ),
-primary(LANGUAGE_YUE_CHINESE_HONGKONG ),
-primary(LANGUAGE_JAPANESE ),
-primary(LANGUAGE_KOREAN   )
-))
+else if ( primary(nLang) == primary(LANGUAGE_CHINESE  )
+|| primary(nLang) == primary(LANGUAGE_YUE_CHINESE_HONGKONG )
+|| primary(nLang) == primary(LANGUAGE_JAPANESE )
+|| primary(nLang) == primary(LANGUAGE_KOREAN   )
+)
 {
 nScript = css::i18n::ScriptType::ASIAN;
 }
 // CTL catcher
-else if (primary(nLang).anyOf(
-primary(LANGUAGE_AMHARIC_ETHIOPIA),
-primary(LANGUAGE_ARABIC_SAUDI_ARABIA ),
-primary(LANGUAGE_ASSAMESE),
-primary(LANGUAGE_BENGALI ),
-primary(LANGUAGE_BURMESE ),
-primary(LANGUAGE_DHIVEHI ),
-primary(LANGUAGE_FARSI   ),
-primary(LANGUAGE_GUJARATI),
-primary(LANGUAGE_HEBREW  ),
-primary(LANGUAGE_HINDI   ),
-primary(LANGUAGE_KANNADA ),
-primary(LANGUAGE_KASHMIRI),
-primary(LANGUAGE_KHMER   ),
-primary(LANGUAGE_KONKANI ),
-primary(LANGUAGE_LAO ),
-primary(LANGUAGE_MALAYALAM   ),
-primary(LANGUAGE_MANIPURI),
-primary(LANGUAGE_MARATHI ),
-primary(LANGUAGE_NEPALI  ),
-primary(LANGUAGE_ODIA),
-primary(LANGUAGE_PUNJABI ),
- 

core.git: 2 commits - sd/source

2024-05-16 Thread Noel Grandin (via logerrit)
 sd/source/console/PresenterAccessibility.cxx |   28 +-
 sd/source/console/PresenterBitmapContainer.cxx   |   30 +-
 sd/source/console/PresenterButton.cxx|   22 +++
 sd/source/console/PresenterController.cxx|   32 +--
 sd/source/console/PresenterFrameworkObserver.cxx |2 
 sd/source/console/PresenterHelpView.cxx  |   12 ++--
 sd/source/console/PresenterNotesView.cxx |   10 +--
 sd/source/console/PresenterPane.cxx  |2 
 sd/source/console/PresenterPaneBase.cxx  |   18 +++---
 sd/source/console/PresenterPaneBorderPainter.cxx |   26 -
 sd/source/console/PresenterPaneContainer.cxx |2 
 sd/source/console/PresenterPaneFactory.cxx   |4 -
 sd/source/console/PresenterProtocolHandler.cxx   |8 +-
 sd/source/console/PresenterScreen.cxx|   58 ++--
 sd/source/console/PresenterScrollBar.cxx |   18 +++---
 sd/source/console/PresenterSlidePreview.cxx  |   10 +--
 sd/source/console/PresenterSlideShowView.cxx |   12 ++--
 sd/source/console/PresenterSlideSorter.cxx   |   52 +-
 sd/source/console/PresenterSpritePane.cxx|2 
 sd/source/console/PresenterTextView.cxx  |4 -
 sd/source/console/PresenterTheme.cxx |   64 +++
 sd/source/console/PresenterTimer.cxx |2 
 sd/source/console/PresenterToolBar.cxx   |   32 +--
 sd/source/console/PresenterViewFactory.cxx   |2 
 sd/source/console/PresenterWindowManager.cxx |   14 ++---
 sd/source/core/CustomAnimationEffect.cxx |   14 ++---
 sd/source/core/CustomAnimationPreset.cxx |   26 -
 sd/source/core/EffectMigration.cxx   |   14 ++---
 sd/source/core/ThemeColorChanger.cxx |2 
 sd/source/core/TransitionPreset.cxx  |   12 ++--
 sd/source/core/annotations/Annotation.cxx|   12 ++--
 sd/source/core/drawdoc.cxx   |4 -
 sd/source/core/drawdoc3.cxx  |8 +-
 sd/source/core/drawdoc4.cxx  |   14 ++---
 sd/source/core/sdpage.cxx|   28 +-
 sd/source/core/sdpage2.cxx   |4 -
 sd/source/core/sdpage_animations.cxx |2 
 sd/source/core/stlfamily.cxx |4 -
 sd/source/core/stlpool.cxx   |8 +-
 sd/source/core/stlsheet.cxx  |   32 +--
 40 files changed, 325 insertions(+), 325 deletions(-)

New commits:
commit 57ed936badf1e8bb1931fd8c4eb27b13a7c7171d
Author: Noel Grandin 
AuthorDate: Thu May 16 15:37:32 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 16 18:17:41 2024 +0200

loplugin:ostr in sd/../console

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

diff --git a/sd/source/console/PresenterAccessibility.cxx 
b/sd/source/console/PresenterAccessibility.cxx
index 08576be6940d..da3af5563fd3 100644
--- a/sd/source/console/PresenterAccessibility.cxx
+++ b/sd/source/console/PresenterAccessibility.cxx
@@ -324,12 +324,12 @@ public:
 const css::uno::Reference& rxContext,
 const lang::Locale& rLocale)
 {
-OUString sName ("Presenter Console");
+OUString sName (u"Presenter Console"_ustr);
 PresenterConfigurationAccess aConfiguration (
 rxContext,
-"/org.openoffice.Office.PresenterScreen/",
+u"/org.openoffice.Office.PresenterScreen/"_ustr,
 PresenterConfigurationAccess::READ_ONLY);
-
aConfiguration.GetConfigurationNode("Presenter/Accessibility/Console/String")
+
aConfiguration.GetConfigurationNode(u"Presenter/Accessibility/Console/String"_ustr)
 >>= sName;
 
 rtl::Reference pObject (
@@ -353,13 +353,13 @@ public:
 const Reference& rxContentWindow,
 const Reference& rxBorderWindow)
 {
-OUString sName ("Presenter Notes Window");
+OUString sName (u"Presenter Notes Window"_ustr);
 {
 PresenterConfigurationAccess aConfiguration (
 rxContext,
-"/org.openoffice.Office.PresenterScreen/",
+u"/org.openoffice.Office.PresenterScreen/"_ustr,
 PresenterConfigurationAccess::READ_ONLY);
-
aConfiguration.GetConfigurationNode("Presenter/Accessibility/Preview/String")
+
aConfiguration.GetConfigurationNode(u"Presenter/Accessibility/Preview/String"_ustr)
 >>= sName;
 }
 
@@ -763,7 +763,7 @@ Reference SAL_CALL
 ThrowIfDisposed();
 
 if (nIndex<0 || o3tl::make_unsigned(nIndex)>=maChildren.s

core.git: sc/source

2024-05-16 Thread Noel Grandin (via logerrit)
 sc/source/core/data/SolverSettings.cxx |2 +-
 sc/source/core/data/attrib.cxx |2 +-
 sc/source/core/data/docpool.cxx|4 ++--
 sc/source/core/data/documen2.cxx   |6 +++---
 sc/source/core/data/documen3.cxx   |4 ++--
 sc/source/core/data/documen5.cxx   |8 
 sc/source/core/data/document.cxx   |4 ++--
 sc/source/core/data/dptabres.cxx   |   14 +++---
 sc/source/core/data/dptabsrc.cxx   |   24 
 sc/source/core/data/dputil.cxx |2 +-
 sc/source/core/data/drwlayer.cxx   |8 
 sc/source/core/data/formulacell.cxx|   30 +++---
 sc/source/core/data/funcdesc.cxx   |   24 
 sc/source/core/data/global.cxx |2 +-
 sc/source/core/data/postit.cxx |4 ++--
 sc/source/core/data/table3.cxx |2 +-
 sc/source/core/data/validat.cxx|6 +++---
 17 files changed, 73 insertions(+), 73 deletions(-)

New commits:
commit 239641a4df8c137dc59eb4040608e5d7d9f79320
Author: Noel Grandin 
AuthorDate: Thu May 16 13:33:45 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 16 16:06:22 2024 +0200

loplugin:ostr in sc/../data

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

diff --git a/sc/source/core/data/SolverSettings.cxx 
b/sc/source/core/data/SolverSettings.cxx
index 1320d470efcf..333751d26734 100644
--- a/sc/source/core/data/SolverSettings.cxx
+++ b/sc/source/core/data/SolverSettings.cxx
@@ -202,7 +202,7 @@ OUString SolverSettings::GetParameter(SolverParameter 
eParam)
 return m_sLibrarySize;
 break;
 default:
-return "";
+return u""_ustr;
 }
 }
 
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 1a587d2b6572..35e6e991dd53 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -540,7 +540,7 @@ bool ScViewObjectModeItem::GetPresentation
 const IntlWrapper& /* rIntl */
 )   const
 {
-OUString aDel(": ");
+OUString aDel(u": "_ustr);
 rText.clear();
 
 switch ( ePres )
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 5ef4c4a4091f..2add110bc0f2 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -257,7 +257,7 @@ static ItemInfoPackage& getItemInfoPackageScDocument()
 }
 
 ScDocumentPool::ScDocumentPool()
-: SfxItemPool("ScDocumentPool")
+: SfxItemPool(u"ScDocumentPool"_ustr)
 {
 registerItemInfoPackage(getItemInfoPackageScDocument());
 }
@@ -373,7 +373,7 @@ bool ScDocumentPool::GetPresentation(
 sal_uInt16  nW = rItem.Which();
 OUString aStrYes  ( ScResId(STR_YES) );
 OUString aStrNo   ( ScResId(STR_NO) );
-OUString aStrSep(": ");
+OUString aStrSep(u": "_ustr);
 
 bool ePresentationRet = true;
 switch( nW )
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index a551bf014c42..ca7fbcc938c4 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -578,7 +578,7 @@ void ScDocument::ResetClip( ScDocument* pSourceDoc, SCTAB 
nTab )
 {
 maTabs.resize(nTab+1);
 }
-maTabs[nTab].reset( new ScTable(*this, nTab, "baeh") );
+maTabs[nTab].reset( new ScTable(*this, nTab, u"baeh"_ustr) );
 if (nTab < pSourceDoc->GetTableCount() && pSourceDoc->maTabs[nTab])
 maTabs[nTab]->SetLayoutRTL( 
pSourceDoc->maTabs[nTab]->IsLayoutRTL() );
 }
@@ -595,7 +595,7 @@ void ScDocument::EnsureTable( SCTAB nTab )
 maTabs.resize(nTab+1);
 
 if (!maTabs[nTab])
-maTabs[nTab].reset( new ScTable(*this, nTab, "temp", bExtras, bExtras) 
);
+maTabs[nTab].reset( new ScTable(*this, nTab, u"temp"_ustr, bExtras, 
bExtras) );
 }
 
 ScRefCellValue ScDocument::GetRefCellValue( const ScAddress& rPos )
@@ -1107,7 +1107,7 @@ bool ScDocument::TransferTab( ScDocument& rSrcDoc, SCTAB 
nSrcPos,
 ScDocShell* pSrcShell = rSrcDoc.GetDocumentShell();
 if ( pSrcShell )
 {
-OUString aLibName("Standard");
+OUString aLibName(u"Standard"_ustr);
 #if HAVE_FEATURE_SCRIPTING
 const BasicManager *pBasicManager = pSrcShell->GetBasicManager();
 if (pBasicManager && !pBasicManager->GetName().isEmpty())
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index e31c111a3786..db8a9972e43f 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -2048,7 +2048,7 @@ void ScDocument::DoMergeContents( SCCOL nSta

core.git: tools/qa tools/source

2024-05-16 Thread Noel Grandin (via logerrit)
 tools/qa/cppunit/test_color.cxx|   48 
 tools/qa/cppunit/test_inetmime.cxx |   30 +-
 tools/qa/cppunit/test_json_writer.cxx  |   12 ++--
 tools/qa/cppunit/test_urlobj.cxx   |   60 ++---
 tools/source/inet/inetmsg.cxx  |8 +-
 tools/source/inet/inetstrm.cxx |4 -
 tools/source/misc/extendapplicationenvironment.cxx |2 
 7 files changed, 82 insertions(+), 82 deletions(-)

New commits:
commit 45f9627659e882b9157782dfc5981e31567a306e
Author: Noel Grandin 
AuthorDate: Thu May 16 13:31:58 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 16 14:49:58 2024 +0200

loplugin:ostr in tools

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

diff --git a/tools/qa/cppunit/test_color.cxx b/tools/qa/cppunit/test_color.cxx
index 02f23fb3b81d..4e2046c58e71 100644
--- a/tools/qa/cppunit/test_color.cxx
+++ b/tools/qa/cppunit/test_color.cxx
@@ -84,27 +84,27 @@ void Test::test_asRGBColor()
 {
 Color aColor;
 aColor = COL_BLACK;
-CPPUNIT_ASSERT_EQUAL(OUString("00"), aColor.AsRGBHexString());
+CPPUNIT_ASSERT_EQUAL(u"00"_ustr, aColor.AsRGBHexString());
 
 aColor = COL_WHITE;
-CPPUNIT_ASSERT_EQUAL(OUString("ff"), aColor.AsRGBHexString());
+CPPUNIT_ASSERT_EQUAL(u"ff"_ustr, aColor.AsRGBHexString());
 
 aColor = COL_RED;
-CPPUNIT_ASSERT_EQUAL(OUString("80"), aColor.AsRGBHexString());
+CPPUNIT_ASSERT_EQUAL(u"80"_ustr, aColor.AsRGBHexString());
 
 aColor = COL_TRANSPARENT;
-CPPUNIT_ASSERT_EQUAL(OUString("ff"), aColor.AsRGBHexString());
+CPPUNIT_ASSERT_EQUAL(u"ff"_ustr, aColor.AsRGBHexString());
 
 aColor = COL_BLUE;
-CPPUNIT_ASSERT_EQUAL(OUString("80"), aColor.AsRGBHexString());
+CPPUNIT_ASSERT_EQUAL(u"80"_ustr, aColor.AsRGBHexString());
 
 aColor.SetRed(0x12);
 aColor.SetGreen(0x34);
 aColor.SetBlue(0x56);
-CPPUNIT_ASSERT_EQUAL(OUString("123456"), aColor.AsRGBHexString());
+CPPUNIT_ASSERT_EQUAL(u"123456"_ustr, aColor.AsRGBHexString());
 
 aColor = COL_AUTO;
-CPPUNIT_ASSERT_EQUAL(OUString("ff"), aColor.AsRGBHexString());
+CPPUNIT_ASSERT_EQUAL(u"ff"_ustr, aColor.AsRGBHexString());
 }
 
 OUString createTintShade(sal_uInt8 nR, sal_uInt8 nG, sal_uInt8 nB, 
std::u16string_view sReference, sal_Int16 nTintShade)
@@ -121,48 +121,48 @@ void Test::test_ApplyTintOrShade()
 // BLACK reference
 
 // 5% tint
-CPPUNIT_ASSERT_EQUAL(OUString("0d0d0d"), createTintShade(0x00, 0x00, 0x00, 
u"00",  500));
+CPPUNIT_ASSERT_EQUAL(u"0d0d0d"_ustr, createTintShade(0x00, 0x00, 0x00, 
u"00",  500));
 // 15% tint
-CPPUNIT_ASSERT_EQUAL(OUString("262626"), createTintShade(0x00, 0x00, 0x00, 
u"00",  1500));
+CPPUNIT_ASSERT_EQUAL(u"262626"_ustr, createTintShade(0x00, 0x00, 0x00, 
u"00",  1500));
 // 25% tint
-CPPUNIT_ASSERT_EQUAL(OUString("404040"), createTintShade(0x00, 0x00, 0x00, 
u"00",  2500));
+CPPUNIT_ASSERT_EQUAL(u"404040"_ustr, createTintShade(0x00, 0x00, 0x00, 
u"00",  2500));
 // 50% tint
-CPPUNIT_ASSERT_EQUAL(OUString("808080"), createTintShade(0x00, 0x00, 0x00, 
u"00",  5000));
+CPPUNIT_ASSERT_EQUAL(u"808080"_ustr, createTintShade(0x00, 0x00, 0x00, 
u"00",  5000));
 // 100% tint
-CPPUNIT_ASSERT_EQUAL(OUString("ff"), createTintShade(0x00, 0x00, 0x00, 
u"00", 1));
+CPPUNIT_ASSERT_EQUAL(u"ff"_ustr, createTintShade(0x00, 0x00, 0x00, 
u"00", 1));
 
 // WHITE reference
 
 // 5% shade
-CPPUNIT_ASSERT_EQUAL(OUString("f2f2f2"), createTintShade(0xff, 0xff, 0xff, 
u"ff",   -500));
+CPPUNIT_ASSERT_EQUAL(u"f2f2f2"_ustr, createTintShade(0xff, 0xff, 0xff, 
u"ff",   -500));
 // 15% shade
-CPPUNIT_ASSERT_EQUAL(OUString("d9d9d9"), createTintShade(0xff, 0xff, 0xff, 
u"ff",  -1500));
+CPPUNIT_ASSERT_EQUAL(u"d9d9d9"_ustr, createTintShade(0xff, 0xff, 0xff, 
u"ff",  -1500));
 // 25% shade
-CPPUNIT_ASSERT_EQUAL(OUString("bfbfbf"), createTintShade(0xff, 0xff, 0xff, 
u"ff",  -2500));
+CPPUNIT_ASSERT_EQUAL(u"bfbfbf"_ustr, createTintShade(0xff, 0xff, 0xff, 
u"ff",  -2500));
 // 50% shade
-CPPUNIT_ASSERT_EQUAL(OUString("808080"), createTintShade(0xff, 0xff, 0xff, 
u"ff&qu

core.git: ucbhelper/source

2024-05-16 Thread Noel Grandin (via logerrit)
 ucbhelper/source/client/content.cxx   |   20 ++--
 ucbhelper/source/client/proxydecider.cxx  |2 +-
 ucbhelper/source/provider/resultset.cxx   |6 +++---
 ucbhelper/source/provider/resultsethelper.cxx |2 +-
 4 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit f4c7ffc8edf83529550eb3897024792cbb6e48e0
Author: Noel Grandin 
AuthorDate: Thu May 16 09:28:47 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 16 14:49:15 2024 +0200

loplugin:ostr in ucbhelper

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

diff --git a/ucbhelper/source/client/content.cxx 
b/ucbhelper/source/client/content.cxx
index 8feab846baee..cc5fe291febe 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -223,7 +223,7 @@ static Reference< XContentIdentifier > 
getContentIdentifierThrow(
 ensureContentProviderForURL( rBroker, rURL );
 
 throw ContentCreationException(
-"Unable to create Content Identifier!",
+u"Unable to create Content Identifier!"_ustr,
 Reference< XInterface >(),
 ContentCreationError_IDENTIFIER_CREATION_FAILED );
 }
@@ -513,8 +513,8 @@ Sequence< Any > Content::setPropertyValues(
 {
 ucbhelper::cancelCommandExecution(
 Any( IllegalArgumentException(
-"Length of property names sequence and value "
-"sequence are unequal!",
+u"Length of property names sequence and value "
+"sequence are unequal!"_ustr,
 get(),
 -1 ) ),
 m_xImpl->getEnvironment() );
@@ -851,7 +851,7 @@ Sequence< ContentInfo > 
Content::queryCreatableContentsInfo()
 // First, try it using "CreatableContentsInfo" property -> the "new" way.
 Sequence< ContentInfo > aInfo;
 if ( getPropertyValue(
- "CreatableContentsInfo" )
+ u"CreatableContentsInfo"_ustr )
  >>= aInfo )
 return aInfo;
 
@@ -930,7 +930,7 @@ bool Content::insertNewContent( const OUString& 
rContentType,
 Content aNewContent(
 xNew, m_xImpl->getEnvironment(), m_xImpl->getComponentContext() );
 aNewContent.setPropertyValues( rPropertyNames, rPropertyValues );
-aNewContent.executeCommand( "insert",
+aNewContent.executeCommand( u"insert"_ustr,
 Any(
 InsertCommandArgument(
 rData.is() ? rData : new 
EmptyInputStream,
@@ -958,7 +958,7 @@ void Content::transferContent( const Content& 
rSourceContent,
 // Execute command "globalTransfer" at UCB.
 
 TransferCommandOperation eTransOp = TransferCommandOperation();
-OUString sCommand( "globalTransfer" );
+OUString sCommand( u"globalTransfer"_ustr );
 bool bCheckIn = false;
 switch ( eOperation )
 {
@@ -1008,13 +1008,13 @@ void Content::transferContent( const Content& 
rSourceContent,
 bool Content::isFolder()
 {
 bool bFolder = false;
-if ( getPropertyValue("IsFolder")
+if ( getPropertyValue(u"IsFolder"_ustr)
 >>= bFolder )
 return bFolder;
 
 ucbhelper::cancelCommandExecution(
  Any( UnknownPropertyException(
-"Unable to retrieve value of property 'IsFolder'!",
+u"Unable to retrieve value of property 'IsFolder'!"_ustr,
 get() ) ),
  m_xImpl->getEnvironment() );
 
@@ -1025,13 +1025,13 @@ bool Content::isFolder()
 bool Content::isDocument()
 {
 bool bDoc = false;
-if ( getPropertyValue("IsDocument")
+if ( getPropertyValue(u"IsDocument"_ustr)
 >>= bDoc )
 return bDoc;
 
 ucbhelper::cancelCommandExecution(
  Any( UnknownPropertyException(
-"Unable to retrieve value of property 'IsDocument'!",
+u"Unable to retrieve value of property 'IsDocument'!"_ustr,
 get() ) ),
  m_xImpl->getEnvironment() );
 
diff --git a/ucbhelper/source/client/proxydecider.cxx 
b/ucbhelper/source/client/proxydecider.cxx
index 6313937ab19d..cfc10080529e 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -303,7 +303,7 @@ InternetProxyDecider_Impl::InternetProxyDecider_Impl(
 uno::Sequence< uno::Any > aArguments{ uno::Any(CONFIG_ROOT_KEY) };
 uno::Reference< uno::XInterface > xInterface(
 

core.git: unoxml/qa unoxml/source

2024-05-16 Thread Noel Grandin (via logerrit)
 unoxml/qa/unit/domtest.cxx  |8 
 unoxml/source/dom/attr.cxx  |2 
 unoxml/source/dom/attributesmap.cxx |8 
 unoxml/source/dom/cdatasection.cxx  |2 
 unoxml/source/dom/characterdata.cxx |4 
 unoxml/source/dom/comment.cxx   |2 
 unoxml/source/dom/document.cxx  |6 
 unoxml/source/dom/documentbuilder.cxx   |4 
 unoxml/source/dom/documentfragment.cxx  |2 
 unoxml/source/dom/element.cxx   |   16 -
 unoxml/source/dom/elementlist.cxx   |4 
 unoxml/source/dom/node.cxx  |   12 -
 unoxml/source/dom/saxbuilder.cxx|4 
 unoxml/source/dom/text.cxx  |2 
 unoxml/source/rdf/CBlankNode.cxx|   10 
 unoxml/source/rdf/CLiteral.cxx  |   16 -
 unoxml/source/rdf/CURI.cxx  |   20 -
 unoxml/source/rdf/librdf_repository.cxx |  342 
 unoxml/source/xpath/xpathapi.cxx|   16 -
 19 files changed, 240 insertions(+), 240 deletions(-)

New commits:
commit 98142886f21e40d0f7052f18108d9586f4b2fbc5
Author: Noel Grandin 
AuthorDate: Thu May 16 09:28:11 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 16 13:14:09 2024 +0200

loplugin:ostr in unoxml

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

diff --git a/unoxml/qa/unit/domtest.cxx b/unoxml/qa/unit/domtest.cxx
index a97248167f60..96ecea6dd593 100644
--- a/unoxml/qa/unit/domtest.cxx
+++ b/unoxml/qa/unit/domtest.cxx
@@ -202,7 +202,7 @@ struct BasicTest : public test::BootstrapFixture
 test::BootstrapFixture::setUp();
 
 mxErrHandler.set( new ErrorHandler() );
-uno::Reference xDB( 
getMultiServiceFactory()->createInstance("com.sun.star.xml.dom.DocumentBuilder"),
 uno::UNO_QUERY_THROW );
+uno::Reference xDB( 
getMultiServiceFactory()->createInstance(u"com.sun.star.xml.dom.DocumentBuilder"_ustr),
 uno::UNO_QUERY_THROW );
 mxDomBuilder.set( xDB );
 mxValidInStream.set( new 
SequenceInputStream(css::uno::Sequence(reinterpret_cast(validTestFile), std::size(validTestFile) - 1)) );
 mxWarningInStream.set( new 
SequenceInputStream(css::uno::Sequence(reinterpret_cast(warningTestFile), std::size(warningTestFile) - 1)) );
@@ -286,7 +286,7 @@ struct SerializerTest : public test::BootstrapFixture
 test::BootstrapFixture::setUp();
 
 mxErrHandler.set( new ErrorHandler() );
-uno::Reference xDB( 
getMultiServiceFactory()->createInstance("com.sun.star.xml.dom.DocumentBuilder"),
 uno::UNO_QUERY_THROW );
+uno::Reference xDB( 
getMultiServiceFactory()->createInstance(u"com.sun.star.xml.dom.DocumentBuilder"_ustr),
 uno::UNO_QUERY_THROW );
 mxDomBuilder.set( xDB );
 mxInStream.set( new 
SequenceInputStream(css::uno::Sequence(reinterpret_cast(validTestFile), std::size(validTestFile) - 1)) );
 mxDomBuilder->setErrorHandler(mxErrHandler);
@@ -295,10 +295,10 @@ struct SerializerTest : public test::BootstrapFixture
 
 maRegisteredNamespaces = {
 beans::make_Pair(
-OUString( "urn:oasis:names:tc:opendocument:xmlns:office:1.0" ),
+u"urn:oasis:names:tc:opendocument:xmlns:office:1.0"_ustr,
 xml::sax::FastToken::NAMESPACE),
 beans::make_Pair(
-OUString( "http://www.w3.org/1999/xlink; ),
+u"http://www.w3.org/1999/xlink"_ustr,
 2*xml::sax::FastToken::NAMESPACE)
 };
 }
diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx
index d8d873cdf055..00349c5ae49e 100644
--- a/unoxml/source/dom/attr.cxx
+++ b/unoxml/source/dom/attr.cxx
@@ -195,7 +195,7 @@ namespace DOM
 
 // dispatch DOM events to signal change in attribute value
 // dispatch DomAttrModified + DOMSubtreeModified
-OUString sEventName( "DOMAttrModified" );
+OUString sEventName( u"DOMAttrModified"_ustr );
 Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY);
 Reference< XMutationEvent > 
event(docevent->createEvent(sEventName),UNO_QUERY);
 event->initMutationEvent(
diff --git a/unoxml/source/dom/attributesmap.cxx 
b/unoxml/source/dom/attributesmap.cxx
index f629d4cb3f31..ee0308b40255 100644
--- a/unoxml/source/dom/attributesmap.cxx
+++ b/unoxml/source/dom/attributesmap.cxx
@@ -163,7 +163,7 @@ namespace DOM
 Reference< XAttr > const xAttr(m_pElement->getAttributeNode(name));
 if (!xAttr.is()) {
 throw DOMException(
-"CAttributesMap::removeNamedItem: no such attribute",
+u"CAttributesMap::removeNamedItem: no such attribute"_ustr,
 getXWeak(),
 

core.git: unotools/qa unotools/source

2024-05-16 Thread Noel Grandin (via logerrit)
 unotools/qa/unit/configpaths.cxx|   40 ++--
 unotools/qa/unit/testGetEnglishSearchName.cxx   |   20 +-
 unotools/source/config/bootstrap.cxx|6 +--
 unotools/source/config/cmdoptions.cxx   |4 +-
 unotools/source/config/configitem.cxx   |2 -
 unotools/source/config/configmgr.cxx|   10 ++---
 unotools/source/config/confignode.cxx   |   10 ++---
 unotools/source/config/configpaths.cxx  |2 -
 unotools/source/config/docinfohelper.cxx|4 +-
 unotools/source/config/dynamicmenuoptions.cxx   |2 -
 unotools/source/config/eventcfg.cxx |   14 +++
 unotools/source/config/fontcfg.cxx  |   12 +++---
 unotools/source/config/historyoptions.cxx   |   12 +++---
 unotools/source/config/lingucfg.cxx |   46 
 unotools/source/config/moduleoptions.cxx|   34 -
 unotools/source/config/searchopt.cxx|2 -
 unotools/source/config/securityoptions.cxx  |2 -
 unotools/source/config/useroptions.cxx  |2 -
 unotools/source/i18n/calendarwrapper.cxx|4 +-
 unotools/source/i18n/resmgr.cxx |2 -
 unotools/source/i18n/transliterationwrapper.cxx |6 +--
 unotools/source/misc/ServiceDocumenter.cxx  |   16 
 unotools/source/misc/ServiceDocumenter.hxx  |4 +-
 unotools/source/misc/ZipPackageHelper.cxx   |6 +--
 unotools/source/misc/defaultencoding.cxx|2 -
 unotools/source/misc/mediadescriptor.cxx|   10 ++---
 unotools/source/ucbhelper/localfilehelper.cxx   |2 -
 unotools/source/ucbhelper/ucbhelper.cxx |   14 +++
 unotools/source/ucbhelper/ucblockbytes.cxx  |2 -
 unotools/source/ucbhelper/ucbstreamhelper.cxx   |4 +-
 unotools/source/ucbhelper/xtempfile.cxx |   24 ++--
 31 files changed, 160 insertions(+), 160 deletions(-)

New commits:
commit 49192335f8671a948bf729a929e1ccdbb88df4e4
Author: Noel Grandin 
AuthorDate: Thu May 16 09:28:24 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 16 11:36:10 2024 +0200

loplugin:ostr in unotools

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

diff --git a/unotools/qa/unit/configpaths.cxx b/unotools/qa/unit/configpaths.cxx
index 7d9907d9e34d..e16a97c899e9 100644
--- a/unotools/qa/unit/configpaths.cxx
+++ b/unotools/qa/unit/configpaths.cxx
@@ -26,8 +26,8 @@ public:
 {
 OUString path, last;
 CPPUNIT_ASSERT(!utl::splitLastFromConfigurationPath(u"", path, 
last));
-CPPUNIT_ASSERT_EQUAL(OUString(""), path);
-CPPUNIT_ASSERT_EQUAL(OUString(""), last);
+CPPUNIT_ASSERT_EQUAL(u""_ustr, path);
+CPPUNIT_ASSERT_EQUAL(u""_ustr, last);
 }
 {
 // Already prior to 5edefc801fb48559c8064003f23d22d838710ee4 "use 
more string_view in
@@ -35,8 +35,8 @@ public:
 // "@returns , if the path was a one-level path or an 
invalid path"):
 OUString path, last;
 CPPUNIT_ASSERT(utl::splitLastFromConfigurationPath(u"/", path, 
last));
-CPPUNIT_ASSERT_EQUAL(OUString(""), path);
-CPPUNIT_ASSERT_EQUAL(OUString(""), last);
+CPPUNIT_ASSERT_EQUAL(u""_ustr, path);
+CPPUNIT_ASSERT_EQUAL(u""_ustr, last);
 }
 {
 // Already prior to 5edefc801fb48559c8064003f23d22d838710ee4 "use 
more string_view in
@@ -44,8 +44,8 @@ public:
 // "@returns , if the path was a one-level path or an 
invalid path"):
 OUString path, last;
 CPPUNIT_ASSERT(utl::splitLastFromConfigurationPath(u"/foo", path, 
last));
-CPPUNIT_ASSERT_EQUAL(OUString(""), path);
-CPPUNIT_ASSERT_EQUAL(OUString("foo"), last);
+CPPUNIT_ASSERT_EQUAL(u""_ustr, path);
+CPPUNIT_ASSERT_EQUAL(u"foo"_ustr, last);
 }
 {
 // Already prior to 5edefc801fb48559c8064003f23d22d838710ee4 "use 
more string_view in
@@ -53,14 +53,14 @@ public:
 // "@returns , if the path was a one-level path or an 
invalid path"):
 OUString path, last;
 CPPUNIT_ASSERT(utl::splitLastFromConfigurationPath(u"/foo/", path, 
last));
-CPPUNIT_ASSERT_EQUAL(OUString(""), path);
-CPPUNIT_ASSERT_EQUAL(OUString("foo"), last);
+CPPUNIT_ASSERT_EQUAL(u""_ustr, path);
+CPPUNIT_ASSERT_EQUAL(u"foo"_ustr, last);
 }
 {
 OUString path, last;
 
CPPUNIT_A

core.git: xmlhelp/source

2024-05-16 Thread Noel Grandin (via logerrit)
 xmlhelp/source/cxxhelp/provider/databases.cxx|   23 ---
 xmlhelp/source/cxxhelp/provider/databases.hxx|2 +-
 xmlhelp/source/cxxhelp/provider/urlparameter.cxx |2 +-
 3 files changed, 6 insertions(+), 21 deletions(-)

New commits:
commit bab6d9c44ba39d08bbee43bca4a461bca52c07e1
Author: Noel Grandin 
AuthorDate: Wed May 15 18:57:09 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 16 10:57:12 2024 +0200

use more officecfg in xmlhelp::Databases

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

diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx 
b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 69fe80d78552..83083e7d0e16 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -57,6 +57,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 #include "databases.hxx"
@@ -176,26 +177,10 @@ Databases::~Databases()
 m_aKeywordInfo.clear();
 }
 
-OString Databases::getImageTheme() const
+// static
+OString Databases::getImageTheme()
 {
-uno::Reference< lang::XMultiServiceFactory > xConfigProvider =
-configuration::theDefaultProvider::get(m_xContext);
-
-// set root path
-uno::Sequence lParams(comphelper::InitAnyPropertySequence(
-{
-{"nodepath", uno::Any(u"org.openoffice.Office.Common"_ustr)}
-}));
-
-// open it
-uno::Reference< uno::XInterface > xCFG( 
xConfigProvider->createInstanceWithArguments(
-u"com.sun.star.configuration.ConfigurationAccess"_ustr,
-lParams) );
-
-uno::Reference< container::XHierarchicalNameAccess > xAccess(xCFG, 
uno::UNO_QUERY_THROW);
-uno::Any aResult = 
xAccess->getByHierarchicalName(u"Misc/SymbolStyle"_ustr);
-OUString aSymbolsStyleName;
-aResult >>= aSymbolsStyleName;
+OUString aSymbolsStyleName = 
officecfg::Office::Common::Misc::SymbolStyle::get();
 
 if ( aSymbolsStyleName.isEmpty() || aSymbolsStyleName == "auto" )
 {
diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx 
b/xmlhelp/source/cxxhelp/provider/databases.hxx
index 448d1f92cd71..c80e2e2dfad6 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -143,7 +143,7 @@ namespace chelp {
 
 ~Databases();
 
-OString getImageTheme() const;
+static OString getImageTheme();
 
 OUString getInstallPathAsURL();
 OUString getInstallPathAsURL(std::unique_lock& rGuard);
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx 
b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index c242c74add2d..f10a4ad2fff6 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -746,7 +746,7 @@ InputStreamTransformer::InputStreamTransformer( 
URLParameter* urlParam,
   RTL_TEXTENCODING_UTF8 ) + "'";
 
 parString[last++] = "imgtheme"_ostr;
-parString[last++] = "'" + pDatabases->getImageTheme() + "'";
+parString[last++] = "'" + chelp::Databases::getImageTheme() + "'";
 parString[last++] = "hp"_ostr;
 parString[last++] = "'" + urlParam->getByName( "HelpPrefix" ) + "'";
 


core.git: xmlscript/qa xmlscript/source

2024-05-16 Thread Noel Grandin (via logerrit)
 xmlscript/qa/cppunit/test.cxx  |   79 +
 xmlscript/source/xml_helper/xml_impctx.cxx |   12 
 xmlscript/source/xmldlg_imexp/imp_share.hxx|6 
 xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx |  854 ++---
 xmlscript/source/xmldlg_imexp/xmldlg_export.cxx|  402 -
 xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx |  674 
 xmlscript/source/xmldlg_imexp/xmldlg_import.cxx|  244 +++---
 xmlscript/source/xmlflat_imexp/xmlbas_export.cxx   |   24 
 xmlscript/source/xmllib_imexp/xmllib_export.cxx|   42 -
 xmlscript/source/xmllib_imexp/xmllib_import.cxx|   32 
 xmlscript/source/xmlmod_imexp/xmlmod_export.cxx|   14 
 xmlscript/source/xmlmod_imexp/xmlmod_import.cxx|   10 
 12 files changed, 1202 insertions(+), 1191 deletions(-)

New commits:
commit 28c64afa68f52fb847e9915cde108b856fa39987
Author: Noel Grandin 
AuthorDate: Wed May 15 20:45:27 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 16 08:50:01 2024 +0200

loplugin:ostr in xmlscript

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

diff --git a/xmlscript/qa/cppunit/test.cxx b/xmlscript/qa/cppunit/test.cxx
index 6db22be43738..f09bfac589dd 100644
--- a/xmlscript/qa/cppunit/test.cxx
+++ b/xmlscript/qa/cppunit/test.cxx
@@ -88,7 +88,7 @@ Reference 
XmlScriptTest::importFile(std::u16string_vi
 
 Reference xDialogModel(
 mxComponentContext->getServiceManager()->createInstanceWithContext(
-"com.sun.star.awt.UnoControlDialogModel", mxComponentContext),
+u"com.sun.star.awt.UnoControlDialogModel"_ustr, 
mxComponentContext),
 UNO_QUERY);
 
 
::xmlscript::importDialogModel(::xmlscript::createInputStream(std::move(bytes)),
 xDialogModel,
@@ -146,55 +146,66 @@ void XmlScriptTest::testBasicElements()
 CPPUNIT_ASSERT(pXmlDoc);
 
 // Ensure we have all elements
-assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:button[1]"_ostr, 
"id"_ostr, "button1");
-assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:button[2]"_ostr, 
"id"_ostr, "button3");
-assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:checkbox[1]"_ostr, 
"id"_ostr, "check1");
-assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:checkbox[2]"_ostr, 
"id"_ostr, "check2");
-assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:checkbox[3]"_ostr, 
"id"_ostr, "check3");
-assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:menulist[1]"_ostr, 
"id"_ostr, "list1");
-assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:menulist[2]"_ostr, 
"id"_ostr, "list2");
-assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:combobox[1]"_ostr, 
"id"_ostr, "combo1");
+assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:button[1]"_ostr, 
"id"_ostr,
+u"button1"_ustr);
+assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:button[2]"_ostr, 
"id"_ostr,
+u"button3"_ustr);
+assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:checkbox[1]"_ostr, 
"id"_ostr,
+u"check1"_ustr);
+assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:checkbox[2]"_ostr, 
"id"_ostr,
+u"check2"_ustr);
+assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:checkbox[3]"_ostr, 
"id"_ostr,
+u"check3"_ustr);
+assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:menulist[1]"_ostr, 
"id"_ostr,
+u"list1"_ustr);
+assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:menulist[2]"_ostr, 
"id"_ostr,
+u"list2"_ustr);
+assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:combobox[1]"_ostr, 
"id"_ostr,
+u"combo1"_ustr);
 assertXPath(pXmlDoc, 
"/dlg:window/dlg:bulletinboard/dlg:radiogroup[1]/dlg:radio[1]"_ostr,
-"id"_ostr, "radio1");
+"id"_ostr, u"radio1"_ustr);
 assertXPath(pXmlDoc, 
"/dlg:window/dlg:bulletinboard/dlg:radiogroup[1]/dlg:radio[2]"_ostr,
-"id"_ostr, "radio2");
+"id"_ostr, u"radio2"_ustr);
 assertXPath(pXmlDoc, 
"/dlg:window/dlg:bulletinboard/dlg:radiogroup[1]/dlg:radio[3]"_ostr,
-"id"_ostr, "radio3");
+

core.git: 2 commits - sdext/qa sdext/source uui/source

2024-05-16 Thread Noel Grandin (via logerrit)
 sdext/qa/unit/pdfimport.cxx|   92 +--
 sdext/source/minimizer/configurationaccess.cxx |   68 
 sdext/source/minimizer/fileopendialog.cxx  |4 
 sdext/source/minimizer/graphiccollector.cxx|   38 ++--
 sdext/source/minimizer/impoptimizer.cxx|   98 ++--
 sdext/source/minimizer/informationdialog.cxx   |8 -
 sdext/source/minimizer/optimizerdialog.cxx |   78 +-
 sdext/source/minimizer/optimizerdialogcontrols.cxx |   12 -
 sdext/source/minimizer/pppoptimizerdialog.cxx  |4 
 sdext/source/pdfimport/filterdet.cxx   |   12 -
 sdext/source/pdfimport/inc/pdfihelper.hxx  |   12 -
 sdext/source/pdfimport/misc/pdfihelper.cxx |4 
 sdext/source/pdfimport/odf/odfemitter.cxx  |2 
 sdext/source/pdfimport/pdfiadaptor.cxx |   18 +-
 sdext/source/pdfimport/pdfparse/pdfentries.cxx |2 
 sdext/source/pdfimport/tree/drawtreevisiting.cxx   |  152 +--
 sdext/source/pdfimport/tree/imagecontainer.cxx |4 
 sdext/source/pdfimport/tree/pdfiprocessor.cxx  |   42 ++---
 sdext/source/pdfimport/tree/style.cxx  |   12 -
 sdext/source/pdfimport/tree/writertreevisiting.cxx |  162 ++---
 sdext/source/pdfimport/wrapper/wrapper.cxx |4 
 uui/source/authfallbackdlg.cxx |   18 +-
 uui/source/fltdlg.cxx  |7 
 uui/source/iahndl-filter.cxx   |   10 -
 uui/source/iahndl.cxx  |4 
 uui/source/interactionhandler.cxx  |   24 +--
 uui/source/logindlg.cxx|   30 +--
 uui/source/masterpasscrtdlg.cxx|   12 -
 uui/source/masterpassworddlg.cxx   |6 
 uui/source/nameclashdlg.cxx|   12 -
 uui/source/openlocked.cxx  |   16 +-
 uui/source/passwordcontainer.cxx   |4 
 uui/source/passworddlg.cxx |   12 -
 uui/source/requeststringresolver.cxx   |4 
 uui/source/secmacrowarnings.cxx|   22 +-
 uui/source/sslwarndlg.cxx  |4 
 uui/source/unknownauthdlg.cxx  |9 -
 37 files changed, 512 insertions(+), 510 deletions(-)

New commits:
commit 4a19fefaee65b62377fa296698a4ca16dc279c4f
Author: Noel Grandin 
AuthorDate: Wed May 15 20:46:04 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 16 08:49:53 2024 +0200

loplugin:ostr in uui

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

diff --git a/uui/source/authfallbackdlg.cxx b/uui/source/authfallbackdlg.cxx
index daad28b77feb..7b101b5258c0 100644
--- a/uui/source/authfallbackdlg.cxx
+++ b/uui/source/authfallbackdlg.cxx
@@ -11,16 +11,16 @@
 
 AuthFallbackDlg::AuthFallbackDlg(weld::Window* pParent, const OUString& 
instructions,
  const OUString& url)
-: GenericDialogController(pParent, "uui/ui/authfallback.ui", 
"AuthFallbackDlg")
+: GenericDialogController(pParent, u"uui/ui/authfallback.ui"_ustr, 
u"AuthFallbackDlg"_ustr)
 , m_bGoogleMode(false)
-, m_xTVInstructions(m_xBuilder->weld_label("instructions"))
-, m_xEDUrl(m_xBuilder->weld_entry("url"))
-, m_xEDCode(m_xBuilder->weld_entry("code"))
-, m_xEDGoogleCode(m_xBuilder->weld_entry("google_code"))
-, m_xBTOk(m_xBuilder->weld_button("ok"))
-, m_xBTCancel(m_xBuilder->weld_button("cancel"))
-, m_xGoogleBox(m_xBuilder->weld_widget("GDrive"))
-, m_xOneDriveBox(m_xBuilder->weld_widget("OneDrive"))
+, m_xTVInstructions(m_xBuilder->weld_label(u"instructions"_ustr))
+, m_xEDUrl(m_xBuilder->weld_entry(u"url"_ustr))
+, m_xEDCode(m_xBuilder->weld_entry(u"code"_ustr))
+, m_xEDGoogleCode(m_xBuilder->weld_entry(u"google_code"_ustr))
+, m_xBTOk(m_xBuilder->weld_button(u"ok"_ustr))
+, m_xBTCancel(m_xBuilder->weld_button(u"cancel"_ustr))
+, m_xGoogleBox(m_xBuilder->weld_widget(u"GDrive"_ustr))
+, m_xOneDriveBox(m_xBuilder->weld_widget(u"OneDrive"_ustr))
 {
 m_xBTOk->connect_clicked(LINK(this, AuthFallbackDlg, OKHdl));
 m_xBTCancel->connect_clicked(LINK(this, AuthFallbackDlg, CancelHdl));
diff --git a/uui/source/fltdlg.cxx b/uui/source/fltdlg.cxx
index 748a2dc421a2..0aeee3a221f6 100644
--- a/uui/source/fltdlg.cxx
+++ b/uui/source/fltdlg.cxx
@@ -40,10 +40,11 @@ namespace uui
 @threadsafe no
 */ 
/*-*

core.git: 2 commits - shell/source writerperfect/inc writerperfect/qa writerperfect/source

2024-05-16 Thread Noel Grandin (via logerrit)
 shell/source/backends/desktopbe/desktopbackend.cxx  |   12 
 shell/source/backends/kf5be/kf5backend.cxx  |   17 
 shell/source/backends/localebe/localebackend.cxx|8 
 shell/source/cmdmail/cmdmailsuppl.cxx   |   20 
 shell/source/sessioninstall/SyncDbusSessionHelper.cxx   |6 
 shell/source/sessioninstall/SyncDbusSessionHelper.hxx   |4 
 shell/source/unix/exec/shellexec.cxx|4 
 writerperfect/inc/DocumentHandlerForOdg.hxx |2 
 writerperfect/inc/DocumentHandlerForOdp.hxx |2 
 writerperfect/inc/DocumentHandlerForOds.hxx |2 
 writerperfect/inc/DocumentHandlerForOdt.hxx |2 
 writerperfect/inc/ImportFilter.hxx  |2 
 writerperfect/qa/unit/DrawingImportTest.cxx |   17 
 writerperfect/qa/unit/EPUBExportTest.cxx|  365 
+-
 writerperfect/qa/unit/ImportTest.cxx|   10 
 writerperfect/qa/unit/PresentationImportTest.cxx|   17 
 writerperfect/qa/unit/SpreadsheetImportTest.cxx |   11 
 writerperfect/qa/unit/TextImportTest.cxx|   15 
 writerperfect/qa/unit/WPXSvStreamTest.cxx   |2 
 writerperfect/qa/unit/WpftCalcFilterTest.cxx|   10 
 writerperfect/qa/unit/WpftDrawFilterTest.cxx|   24 
 writerperfect/qa/unit/WpftFilterFixture.cxx |6 
 writerperfect/qa/unit/WpftImpressFilterTest.cxx |6 
 writerperfect/qa/unit/WpftLoader.cxx|2 
 writerperfect/qa/unit/WpftWriterFilterTest.cxx  |   16 
 writerperfect/source/calc/MSWorksCalcImportFilter.cxx   |7 
 writerperfect/source/calc/MWAWCalcImportFilter.cxx  |5 
 writerperfect/source/calc/NumbersImportFilter.cxx   |5 
 writerperfect/source/calc/StarOfficeCalcImportFilter.cxx|5 
 writerperfect/source/common/DirectoryStream.cxx |2 
 writerperfect/source/common/WPFTEncodingDialog.cxx  |8 
 writerperfect/source/common/WPXSvInputStream.cxx|2 
 writerperfect/source/draw/CDRImportFilter.cxx   |5 
 writerperfect/source/draw/CMXImportFilter.cxx   |5 
 writerperfect/source/draw/FreehandImportFilter.cxx  |5 
 writerperfect/source/draw/MSPUBImportFilter.cxx |5 
 writerperfect/source/draw/MWAWDrawImportFilter.cxx  |5 
 writerperfect/source/draw/PageMakerImportFilter.cxx |5 
 writerperfect/source/draw/QXPImportFilter.cxx   |5 
 writerperfect/source/draw/StarOfficeDrawImportFilter.cxx|5 
 writerperfect/source/draw/VisioImportFilter.cxx |5 
 writerperfect/source/draw/WPGImportFilter.cxx   |5 
 writerperfect/source/draw/ZMFImportFilter.cxx   |5 
 writerperfect/source/impress/KeynoteImportFilter.cxx|5 
 writerperfect/source/impress/MWAWPresentationImportFilter.cxx   |5 
 writerperfect/source/impress/StarOfficePresentationImportFilter.cxx |5 
 writerperfect/source/writer/AbiWordImportFilter.cxx |5 
 writerperfect/source/writer/EBookImportFilter.cxx   |5 
 writerperfect/source/writer/EPUBExportDialog.cxx|   58 -
 writerperfect/source/writer/EPUBExportFilter.cxx|   10 
 writerperfect/source/writer/EPUBExportUIComponent.cxx   |   12 
 writerperfect/source/writer/EPUBPackage.cxx |8 
 writerperfect/source/writer/MSWorksImportFilter.cxx |5 
 writerperfect/source/writer/MWAWImportFilter.cxx|5 
 writerperfect/source/writer/PagesImportFilter.cxx   |5 
 writerperfect/source/writer/StarOfficeWriterImportFilter.cxx|5 
 writerperfect/source/writer/WordPerfectImportFilter.cxx |7 
 writerperfect/source/writer/exp/xmlimp.cxx  |4 
 58 files changed, 432 insertions(+), 383 deletions(-)

New commits:
commit cb9c3c754c1c13172925974318e853adffda07bc
Author: Noel Grandin 
AuthorDate: Wed May 15 20:45:51 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 16 08:49:38 2024 +0200

loplugin:ostr in writerperfect

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

diff --git a/writerperfect/inc

core.git: xmlhelp/source

2024-05-16 Thread Noel Grandin (via logerrit)
 xmlhelp/source/cxxhelp/inc/tvread.hxx |   22 -
 xmlhelp/source/treeview/tvfactory.cxx |2 
 xmlhelp/source/treeview/tvread.cxx|  135 ++
 3 files changed, 14 insertions(+), 145 deletions(-)

New commits:
commit f3cced4ab2c3ddb7a83fd697334df490b11a9c8f
Author: Noel Grandin 
AuthorDate: Wed May 15 19:03:32 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 16 08:47:32 2024 +0200

use more officecfg in xmlhelp::TVChildTarget

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

diff --git a/xmlhelp/source/cxxhelp/inc/tvread.hxx 
b/xmlhelp/source/cxxhelp/inc/tvread.hxx
index 08bfdb6482da..dea63c0814eb 100644
--- a/xmlhelp/source/cxxhelp/inc/tvread.hxx
+++ b/xmlhelp/source/cxxhelp/inc/tvread.hxx
@@ -178,7 +178,7 @@ namespace treeview {
 
 TVChildTarget( const ConfigData& configData,TVDom* tvDom );
 
-TVChildTarget( const css::uno::Reference< css::uno::XComponentContext 
>& xContext );
+TVChildTarget();
 
 virtual ~TVChildTarget() override;
 
@@ -202,25 +202,7 @@ namespace treeview {
 private:
 std::vector< rtl::Reference< TVRead > >   Elements;
 
-static ConfigData init(
-const css::uno::Reference< css::uno::XComponentContext >& xContext 
);
-
-static css::uno::Reference< css::lang::XMultiServiceFactory >
-getConfiguration(
-const css::uno::Reference< css::uno::XComponentContext >& 
rxContext );
-
-static css::uno::Reference< css::container::XHierarchicalNameAccess >
-getHierAccess( const css::uno::Reference<  
css::lang::XMultiServiceFactory >& rxProvider,
-   const char* file );
-
-static OUString
-getKey( const css::uno::Reference< 
css::container::XHierarchicalNameAccess >& xHierAccess,
-const char* key );
-
-static bool
-getBooleanKey(
-const css::uno::Reference< 
css::container::XHierarchicalNameAccess >& xHierAccess,
-const char* key);
+static ConfigData init();
 
 static void subst( OUString& instpath );
 
diff --git a/xmlhelp/source/treeview/tvfactory.cxx 
b/xmlhelp/source/treeview/tvfactory.cxx
index 4d6c3d5d5771..d4a4906a31b0 100644
--- a/xmlhelp/source/treeview/tvfactory.cxx
+++ b/xmlhelp/source/treeview/tvfactory.cxx
@@ -84,7 +84,7 @@ TVFactory::createInstanceWithArguments(
 {
 if( ! m_xHDS.is() )
 {
-m_xHDS = cppu::getXWeak(new TVChildTarget( m_xContext ));
+m_xHDS = cppu::getXWeak(new TVChildTarget());
 }
 
 OUString hierview;
diff --git a/xmlhelp/source/treeview/tvread.cxx 
b/xmlhelp/source/treeview/tvread.cxx
index 054ad493849a..1e815fe6a393 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -39,6 +39,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 
@@ -367,9 +369,9 @@ TVChildTarget::TVChildTarget( const ConfigData& 
configData,TVDom* tvDom )
 Elements[i] = new TVRead( configData,tvDom->children[i].get() );
 }
 
-TVChildTarget::TVChildTarget( const Reference< XComponentContext >& xContext )
+TVChildTarget::TVChildTarget()
 {
-ConfigData configData = init( xContext );
+ConfigData configData = init();
 
 if( configData.locale.isEmpty() || configData.system.isEmpty() )
 return;
@@ -572,20 +574,17 @@ TVChildTarget::hasByHierarchicalName( const OUString& 
aName )
 return hasByName( aName );
 }
 
-ConfigData TVChildTarget::init( const Reference< XComponentContext >& xContext 
)
+ConfigData TVChildTarget::init()
 {
 ConfigData configData;
-Reference< XMultiServiceFactory > sProvider( getConfiguration(xContext) );
 
 /**/
 /*   reading Office.Common*/
 /**/
 
-Reference< XHierarchicalNameAccess > xHierAccess( getHierAccess( sProvider,
- 
"org.openoffice.Office.Common" ) );
-configData.system = getKey(xHierAccess,"Help/System");
-bool showBasic( getBooleanKey(xHierAccess,"Help/ShowBasic") );
-OUString instPath( getKey( xHierAccess,"Path/Current/Help" ) );
+configData.system = officecfg::Office::Common::Help::System::get();
+bool showBasic = officecfg::Office::Common::Help::ShowBasic::get();
+OUString instPath = officecfg::Office::Common::Path::Current::Help::get();
 if( instPath.isEmpty() )
   // try to determine path from default
   ins

core.git: xmloff/qa xmloff/source

2024-05-15 Thread Noel Grandin (via logerrit)
 files changed, 2359 insertions(+), 2349 deletions(-)

New commits:
commit 12008e10549aa3fe23063eb1af38fb3e86064d3e
Author: Noel Grandin 
AuthorDate: Wed May 15 13:12:19 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 15 20:37:38 2024 +0200

loplugin:ostr in xmloff

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

diff --git a/xmloff/qa/unit/draw.cxx b/xmloff/qa/unit/draw.cxx
index 985af4f1ad5e..05d5a756d6e9 100644
--- a/xmloff/qa/unit/draw.cxx
+++ b/xmloff/qa/unit/draw.cxx
@@ -70,7 +70,7 @@ public:
 };
 
 XmloffDrawTest::XmloffDrawTest()
-: UnoApiXmlTest("/xmloff/qa/unit/data/")
+: UnoApiXmlTest(u"/xmloff/qa/unit/data/"_ustr)
 {
 }
 
@@ -89,14 +89,14 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextBoxLoss)
 {
 // Load a document that has a shape with a textbox in it. Save it to ODF 
and reload.
 loadFromFile(u"textbox-loss.docx");
-saveAndReload("impress8");
+saveAndReload(u"impress8"_ustr);
 
 // Make sure that the shape is still a textbox.
 uno::Reference xDrawPageSupplier(mxComponent, 
uno::UNO_QUERY);
 uno::Reference xDrawPage = 
xDrawPageSupplier->getDrawPage();
 uno::Reference xShape(xDrawPage->getByIndex(1), 
uno::UNO_QUERY);
 bool bTextBox = false;
-xShape->getPropertyValue("TextBox") >>= bTextBox;
+xShape->getPropertyValue(u"TextBox"_ustr) >>= bTextBox;
 
 // Without the accompanying fix in place, this test would have failed, as 
the shape only had
 // editeng text, losing the image part of the shape text.
@@ -109,18 +109,18 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, 
testTdf141301_Extrusion_Angle)
 loadFromFile(u"tdf141301_Extrusion_Skew.odg");
 
 // Prepare use of XPath
-save("draw8");
-xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+save(u"draw8"_ustr);
+xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
 
 // Without fix draw:extrusion-skew="50 -135" was not written to file 
although "50 -135" is not
 // default in ODF, but only default inside LO.
-assertXPath(pXmlDoc, "//draw:enhanced-geometry"_ostr, 
"extrusion-skew"_ostr, "50 -135");
+assertXPath(pXmlDoc, "//draw:enhanced-geometry"_ostr, 
"extrusion-skew"_ostr, u"50 -135"_ustr);
 }
 
 CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeExport)
 {
 // Create an Impress document which has a master page which has a theme 
associated with it.
-mxComponent = loadFromDesktop("private:factory/simpress");
+mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr);
 uno::Reference 
xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
 uno::Reference xDrawPage(
 xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
@@ -143,13 +143,13 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeExport)
 pTheme->setColorSet(pColorSet);
 
 uno::Reference xTheme = model::theme::createXTheme(pTheme);
-xMasterPage->setPropertyValue("Theme", uno::Any(xTheme));
+xMasterPage->setPropertyValue(u"Theme"_ustr, uno::Any(xTheme));
 
 // Export to ODP:
-save("impress8");
+save(u"impress8"_ustr);
 
 // Check if the 12 colors are written in the XML:
-xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
+xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
 // Without the accompanying fix in place, this test would have failed with:
 // - Expected: 12
 // - Actual  : 0
@@ -185,9 +185,9 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testVideoSnapshot)
 CPPUNIT_ASSERT_EQUAL(static_cast(1356), rCrop.Right);
 
 // Execute ODP export:
-save("impress8");
+save(u"impress8"_ustr);
 
-xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
 // Check that the preview was exported:
 // Without the accompanying fix in place, this test would have failed with:
 // - Expected: 1
@@ -195,10 +195,10 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testVideoSnapshot)
 // - XPath '//draw:frame[@draw:style-name='gr1']/draw:image' number of 
nodes is incorrect
 // i.e. the preview wasn't exported to ODP.
 assertXPath(pXmlDoc, 
"//draw:frame[@draw:style-name='gr1']/draw:image"_ostr, "href"_ostr,
-"Pictures/MediaPreview1.png");
+u"Pictures/MediaPreview1.png"_ustr);
 // Check that the crop was exported:
 assertXPath(pXmlDoc, 
"//style:style[@style:name='gr1']/style:graphic-properties"_ostr,
-"clip

core.git: 2 commits - xmlhelp/source xmlsecurity/qa xmlsecurity/source xmlsecurity/workben

2024-05-15 Thread Noel Grandin (via logerrit)
 xmlhelp/source/cxxhelp/provider/content.cxx   |   15 
 xmlhelp/source/cxxhelp/provider/contentcaps.cxx   |   38 -
 xmlhelp/source/cxxhelp/provider/databases.cxx |   30 
 xmlhelp/source/cxxhelp/provider/inputstream.cxx   |2 
 xmlhelp/source/cxxhelp/provider/provider.cxx  |4 
 xmlhelp/source/cxxhelp/provider/resultsetbase.cxx |4 
 xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx |2 
 xmlhelp/source/treeview/tvfactory.cxx |6 
 xmlhelp/source/treeview/tvread.cxx|   18 
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |4 
 xmlsecurity/qa/unit/signing/signing.cxx   |  138 ++--
 xmlsecurity/qa/unit/signing/signing2.cxx  |   60 -
 xmlsecurity/source/component/certificatecontainer.cxx |4 
 xmlsecurity/source/component/documentdigitalsignatures.cxx|   22 
 xmlsecurity/source/dialogs/certificatechooser.cxx |   20 
 xmlsecurity/source/dialogs/certificateviewer.cxx  |   54 -
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx|   42 -
 xmlsecurity/source/dialogs/macrosecurity.cxx  |   60 -
 xmlsecurity/source/framework/saxeventkeeperimpl.cxx   |4 
 xmlsecurity/source/framework/signaturecreatorimpl.cxx |4 
 xmlsecurity/source/framework/signatureverifierimpl.cxx|4 
 xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx |4 
 xmlsecurity/source/gpg/CertificateImpl.cxx|6 
 xmlsecurity/source/gpg/SEInitializer.cxx  |4 
 xmlsecurity/source/gpg/SecurityEnvironment.cxx|6 
 xmlsecurity/source/gpg/XMLSecurityContext.cxx |   10 
 xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx   |   36 -
 xmlsecurity/source/helper/UriBindingHelper.cxx|4 
 xmlsecurity/source/helper/documentsignaturehelper.cxx |  108 +--
 xmlsecurity/source/helper/documentsignaturemanager.cxx|   11 
 xmlsecurity/source/helper/ooxmlsecexporter.cxx|  302 +-
 xmlsecurity/source/helper/ooxmlsecparser.cxx  |   32 -
 xmlsecurity/source/helper/pdfsignaturehelper.cxx  |   14 
 xmlsecurity/source/helper/xmlsignaturehelper.cxx  |   26 
 xmlsecurity/source/helper/xsecctl.cxx |  170 ++---
 xmlsecurity/source/helper/xsecparser.cxx  |   40 -
 xmlsecurity/source/helper/xsecsign.cxx|2 
 xmlsecurity/source/helper/xsecverify.cxx  |2 
 xmlsecurity/source/xmlsec/nss/ciphercontext.cxx   |   34 -
 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx  |   24 
 xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx |4 
 xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx   |8 
 xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx |2 
 xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx  |4 
 xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx|6 
 xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx   |6 
 xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx|4 
 xmlsecurity/source/xmlsec/xmlsec_init.cxx |6 
 xmlsecurity/workben/pdfverify.cxx |2 
 49 files changed, 714 insertions(+), 698 deletions(-)

New commits:
commit eee70d4e776a970a700db5379355292c480f8a02
Author: Noel Grandin 
AuthorDate: Wed May 15 13:13:12 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 15 18:04:00 2024 +0200

loplugin:ostr in xmlhelp

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

diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx 
b/xmlhelp/source/cxxhelp/provider/content.cxx
index 6d12041de9ec..5b1c1794186e 100644
--- a/xmlhelp/source/cxxhelp/provider/content.cxx
+++ b/xmlhelp/source/cxxhelp/provider/content.cxx
@@ -100,13 +100,13 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes()
 // virtual
 OUString SAL_CALL Content::getImplementationName()
 {
-return "CHelpContent";
+return u"CHelpContent"_ustr;
 }
 
 // virtual
 uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames()
 {
-return { "com.sun.star.ucb.CHelpContent" };
+return { u"com.sun.star.ucb.CHelpContent"_ustr };
 }
 
 // XContent methods.
@@ -334,8 +334,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
 if ( rProp.Name == "ContentType" )
 xRow->appendString(
 rProp,
-OUString(
-"application/vnd.sun.star.help&q

core.git: toolkit/qa toolkit/source

2024-05-15 Thread Noel Grandin (via logerrit)
 toolkit/qa/cppunit/Dialog.cxx   |5 
 toolkit/qa/cppunit/EventContainer.cxx   |   19 -
 toolkit/qa/cppunit/UnitConversion.cxx   |   24 -
 toolkit/source/awt/animatedimagespeer.cxx   |6 
 toolkit/source/awt/asynccallback.cxx|4 
 toolkit/source/awt/vclxaccessiblecomponent.cxx  |4 
 toolkit/source/awt/vclxmenu.cxx |   10 
 toolkit/source/awt/vclxpointer.cxx  |4 
 toolkit/source/awt/vclxprinter.cxx  |8 
 toolkit/source/awt/vclxtabpagecontainer.cxx |2 
 toolkit/source/awt/vclxtoolkit.cxx  |   24 -
 toolkit/source/awt/vclxwindow1.cxx  |4 
 toolkit/source/awt/vclxwindows.cxx  |   16 
 toolkit/source/controls/animatedimages.cxx  |   12 
 toolkit/source/controls/controlmodelcontainerbase.cxx   |   76 ++--
 toolkit/source/controls/dialogcontrol.cxx   |   44 +-
 toolkit/source/controls/filectrl.cxx|2 
 toolkit/source/controls/formattedcontrol.cxx|   10 
 toolkit/source/controls/grid/defaultgridcolumnmodel.cxx |6 
 toolkit/source/controls/grid/defaultgriddatamodel.cxx   |4 
 toolkit/source/controls/grid/gridcolumn.cxx |4 
 toolkit/source/controls/grid/gridcontrol.cxx|   10 
 toolkit/source/controls/grid/gridcontrol.hxx|4 
 toolkit/source/controls/grid/sortablegriddatamodel.cxx  |4 
 toolkit/source/controls/roadmapcontrol.cxx  |   18 -
 toolkit/source/controls/roadmapentry.cxx|   12 
 toolkit/source/controls/spinningprogress.cxx|   10 
 toolkit/source/controls/stdtabcontroller.cxx|8 
 toolkit/source/controls/stdtabcontrollermodel.cxx   |8 
 toolkit/source/controls/svtxgridcontrol.cxx |4 
 toolkit/source/controls/table/cellvalueconversion.cxx   |2 
 toolkit/source/controls/tabpagecontainer.cxx|   12 
 toolkit/source/controls/tabpagemodel.cxx|   16 
 toolkit/source/controls/tkscrollbar.cxx |   10 
 toolkit/source/controls/tkspinbutton.cxx|   14 
 toolkit/source/controls/tree/treecontrol.cxx|6 
 toolkit/source/controls/tree/treecontrol.hxx|2 
 toolkit/source/controls/tree/treecontrolpeer.cxx|2 
 toolkit/source/controls/tree/treedatamodel.cxx  |8 
 toolkit/source/controls/unocontrol.cxx  |   12 
 toolkit/source/controls/unocontrolcontainer.cxx |   18 -
 toolkit/source/controls/unocontrolcontainermodel.cxx|4 
 toolkit/source/controls/unocontrolmodel.cxx |4 
 toolkit/source/controls/unocontrols.cxx |  258 
 toolkit/source/hatchwindow/documentcloser.cxx   |   10 
 toolkit/source/hatchwindow/hatchwindowfactory.cxx   |4 
 toolkit/source/helper/tkresmgr.cxx  |2 
 toolkit/source/helper/vclunohelper.cxx  |2 
 48 files changed, 377 insertions(+), 375 deletions(-)

New commits:
commit ea49dde289c9c5799c8b85983bae1c0ab294a3cb
Author: Noel Grandin 
AuthorDate: Tue May 14 09:41:33 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 15 14:22:39 2024 +0200

loplugin:ostr in toolkit

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

diff --git a/toolkit/qa/cppunit/Dialog.cxx b/toolkit/qa/cppunit/Dialog.cxx
index 6ddf3f725840..c6f6f5699a8e 100644
--- a/toolkit/qa/cppunit/Dialog.cxx
+++ b/toolkit/qa/cppunit/Dialog.cxx
@@ -48,11 +48,12 @@ CPPUNIT_TEST_FIXTURE(DialogTest, testDialogSizeable)
 uno::Reference 
xFactory(mxContext->getServiceManager(),
   uno::UNO_SET_THROW);
 uno::Reference xControlModel(
-
xFactory->createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", 
mxContext),
+
xFactory->createInstanceWithContext(u"com.sun.star.awt.UnoControlDialogModel"_ustr,
+mxContext),
 uno::UNO_QUERY_THROW);
 
 uno::Reference xPropSet(xControlModel, 
uno::UNO_QUERY_THROW);
-xPropSet->setPropertyValue("Sizeable", uno::Any(true));
+xPropSet->setPropertyValue(u"Sizeable"_ustr, uno::Any(true));
 
 uno::Reference xControl = 
awt::UnoControlDialog::create(mxContext);
 xControl->setModel(xControlModel);
diff --git a/toolkit/qa/cppunit/EventContainer.cxx 
b/toolkit/qa/cppunit/EventContainer.cxx
index ad62f93105e8..ab13e9fdf4f7 100644
--- a/toolkit/qa/cppunit/EventContainer.cxx
+++ b/toolkit/qa/cppunit/EventContainer.cxx
@@ -52,7 +52,8 @@ CPPUNIT_TEST_FIXTURE(EventContainerT

core.git: svgio/qa svgio/source

2024-05-15 Thread Noel Grandin (via logerrit)
 svgio/qa/cppunit/SvgImportTest.cxx| 1470 +-
 svgio/qa/cppunit/SvgRead.cxx  |6 
 svgio/source/svgreader/svgcharacternode.cxx   |2 
 svgio/source/svgreader/svgfilternode.cxx  |   12 
 svgio/source/svgreader/svgnode.cxx|2 
 svgio/source/svgreader/svgstyleattributes.cxx |4 
 svgio/source/svgreader/svgsvgnode.cxx |2 
 svgio/source/svguno/xsvgparser.cxx|6 
 8 files changed, 752 insertions(+), 752 deletions(-)

New commits:
commit 75111c745a29552aca864fc218aec9b731e7d106
Author: Noel Grandin 
AuthorDate: Tue May 14 09:40:54 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 15 12:53:22 2024 +0200

loplugin:ostr in svgio

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

diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index dc2aa1a6eaf4..9dc25ac2fb03 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -80,15 +80,15 @@ void Test::checkRectPrimitive(Primitive2DSequence const & 
rPrimitive)
 
 CPPUNIT_ASSERT (pDocument);
 
-assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, 
"color"_ostr, "#00cc00"); // rect background color
-assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "height"_ostr, 
"100"); // rect background height
-assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "width"_ostr, 
"100"); // rect background width
-assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "minx"_ostr, "10");
-assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "miny"_ostr, "10");
-assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxx"_ostr, "110");
-assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxy"_ostr, "110");
-assertXPath(pDocument, 
"/primitive2D/transform/polypolygonstroke/line"_ostr, "color"_ostr, "#ff"); 
// rect stroke color
-assertXPath(pDocument, 
"/primitive2D/transform/polypolygonstroke/line"_ostr, "width"_ostr, "3"); // 
rect stroke width
+assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, 
"color"_ostr, u"#00cc00"_ustr); // rect background color
+assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "height"_ostr, 
u"100"_ustr); // rect background height
+assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "width"_ostr, 
u"100"_ustr); // rect background width
+assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "minx"_ostr, 
u"10"_ustr);
+assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "miny"_ostr, 
u"10"_ustr);
+assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxx"_ostr, 
u"110"_ustr);
+assertXPath(pDocument, 
"/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxy"_ostr, 
u"110"_ustr);
+assertXPath(pDocument, 
"/primitive2D/transform/polypolygonstroke/line"_ostr, "color"_ostr, 
u"#ff"_ustr); // rect stroke color
+assertXPath(pDocument, 
"/primitive2D/transform/polypolygonstroke/line"_ostr, "width"_ostr, u"3"_ustr); 
// rect stroke width
 }
 
 namespace
@@ -153,7 +153,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSymbol)
 // - Expected: 1
 // - Actual  : 2
 // number of nodes is incorrect
-assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, 
"color"_ostr, "#00d000");
+assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, 
"color"_ostr, u"#00d000"_ustr);
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testTdf150124)
@@ -181,53 +181,53 @@ CPPUNIT_TEST_FIXTURE(Test, testNormalBlend)
 xmlDocUniquePtr pDocument = 
dumpAndParseSvg(u"/svgio/qa/cppunit/data/normalBlend.svg");
 
 assertXPath(pDocument,
-"/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, 
"170");
+"/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, 
u"170"_ustr);
 assertXPath(pDocu

core.git: 2 commits - connectivity/Library_sdbc2.mk connectivity/source svtools/source

2024-05-15 Thread Noel Grandin (via logerrit)
 connectivity/Library_sdbc2.mk  |4 +
 connectivity/source/manager/mdrivermanager.cxx |   42 +-
 svtools/source/dialogs/insdlg.cxx  |   57 +
 3 files changed, 29 insertions(+), 74 deletions(-)

New commits:
commit 9091fb1c1ee9628e5e43d9d1776fae7b0559228c
Author: Noel Grandin 
AuthorDate: Tue May 14 19:45:57 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 15 10:05:52 2024 +0200

use more officecfg in SvObjectServerList

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

diff --git a/svtools/source/dialogs/insdlg.cxx 
b/svtools/source/dialogs/insdlg.cxx
index b59705dc456c..ff33bea4b782 100644
--- a/svtools/source/dialogs/insdlg.cxx
+++ b/svtools/source/dialogs/insdlg.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #if defined _WIN32
 #include 
@@ -108,47 +109,33 @@ void SvObjectServerList::FillInsertObjects()
 */
 {
 try{
-uno::Reference< uno::XComponentContext > xContext = 
comphelper::getProcessComponentContext();
+uno::Reference< container::XNameAccess > xNameAccess = 
officecfg::Office::Embedding::ObjectNames::get();
 
-uno::Reference< lang::XMultiServiceFactory > sProviderMSFactory =
-configuration::theDefaultProvider::get(xContext);
+const uno::Sequence< OUString > seqNames= 
xNameAccess->getElementNames();
 
-uno::Sequence aArguments(comphelper::InitAnyPropertySequence(
+for( const auto& rName : seqNames )
 {
-{"nodepath", 
uno::Any(u"/org.openoffice.Office.Embedding/ObjectNames"_ustr)}
-}));
-uno::Reference< container::XNameAccess > xNameAccess(
-sProviderMSFactory->createInstanceWithArguments( 
u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArguments ),
-uno::UNO_QUERY );
+uno::Reference< container::XNameAccess > xEntry ;
+xNameAccess->getByName( rName ) >>= xEntry;
+if ( xEntry.is() )
+{
+OUString aUIName;
+OUString aClassID;
+xEntry->getByName(u"ObjectUIName"_ustr) >>= aUIName;
+xEntry->getByName(u"ClassID"_ustr) >>= aClassID;
 
-if( xNameAccess.is())
-{
-const uno::Sequence< OUString > seqNames= 
xNameAccess->getElementNames();
+if ( !aUIName.isEmpty() )
+{
+aUIName = aUIName.replaceAll("%PRODUCTNAME", 
utl::ConfigManager::getProductName());
+aUIName = aUIName.replaceAll("%PRODUCTVERSION", 
utl::ConfigManager::getProductVersion());
+}
 
-for( const auto& rName : seqNames )
-{
-uno::Reference< container::XNameAccess > xEntry ;
-xNameAccess->getByName( rName ) >>= xEntry;
-if ( xEntry.is() )
+SvGlobalName aClassName;
+if( aClassName.MakeId( aClassID) )
 {
-OUString aUIName;
-OUString aClassID;
-xEntry->getByName(u"ObjectUIName"_ustr) >>= aUIName;
-xEntry->getByName(u"ClassID"_ustr) >>= aClassID;
-
-if ( !aUIName.isEmpty() )
-{
-aUIName = aUIName.replaceAll("%PRODUCTNAME", 
utl::ConfigManager::getProductName());
-aUIName = aUIName.replaceAll("%PRODUCTVERSION", 
utl::ConfigManager::getProductVersion());
-}
-
-SvGlobalName aClassName;
-if( aClassName.MakeId( aClassID) )
-{
-if( !Get( aClassName ) )
-// not entered yet
-aObjectServerList.emplace_back( aClassName, 
aUIName );
-}
+if( !Get( aClassName ) )
+        // not entered yet
+aObjectServerList.emplace_back( aClassName, aUIName );
 }
 }
 }
commit 0b8f585f8a3123e06d700dc18f4df1ec7d463440
Author: Noel Grandin 
AuthorDate: Tue May 14 19:30:05 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 15 10:05:45 2024 +0200

use more officecfg in OSDBCDriverManager

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

diff --git a/connectivity/Library_sdbc2.mk b/connectivity/Library_sdbc2.mk
index e7296a2efc59..611eba1d6fab 100644
--- a/connectivity/Libr

core.git: 2 commits - canvas/Library_canvasfactory.mk canvas/source i18npool/Library_i18npool.mk i18npool/source

2024-05-15 Thread Noel Grandin (via logerrit)
 canvas/Library_canvasfactory.mk   |4 
 canvas/source/factory/cf_service.cxx  |   51 
++
 i18npool/Library_i18npool.mk  |4 
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |   20 
---
 4 files changed, 26 insertions(+), 53 deletions(-)

New commits:
commit 0cf10e8669c6f40a2187624469682c5bbc0bfb4d
Author: Noel Grandin 
AuthorDate: Tue May 14 19:42:37 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 15 08:02:10 2024 +0200

use more officecfg in DefaultNumberingProvider

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

diff --git a/i18npool/Library_i18npool.mk b/i18npool/Library_i18npool.mk
index 0b72164bbf96..984137ebcf78 100644
--- a/i18npool/Library_i18npool.mk
+++ b/i18npool/Library_i18npool.mk
@@ -41,6 +41,10 @@ $(eval $(call gb_Library_use_externals,i18npool,\
icu_headers \
 ))
 
+$(eval $(call gb_Library_use_custom_headers,i18npool,\
+   officecfg/registry \
+))
+
 ifeq ($(DISABLE_DYNLOADING),TRUE)
 $(eval $(call gb_Library_add_cxxflags,i18npool,\
-DDICT_JA_ZH_IN_DATAFILE \
diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index a1630a1cc2bd..1ba942ca3b51 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 
 // Cyrillic upper case
 #define C_CYR_A "\xD0\x90"
@@ -1201,23 +1202,8 @@ OUString 
DefaultNumberingProvider::makeNumberingIdentifier(sal_Int16 index)
 bool
 DefaultNumberingProvider::isScriptFlagEnabled(const OUString& aName)
 {
-if (! xHierarchicalNameAccess.is()) {
-Reference< XMultiServiceFactory > xConfigProvider =
-configuration::theDefaultProvider::get(m_xContext);
-
-if (! xConfigProvider.is())
-throw RuntimeException();
-
-uno::Sequence aArgs(comphelper::InitAnyPropertySequence(
-{
-{"nodepath", uno::Any(u"/org.openoffice.Office.Common/I18N"_ustr)}
-}));
-
-Reference xInterface = 
xConfigProvider->createInstanceWithArguments(
-u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArgs);
-
-xHierarchicalNameAccess.set(xInterface, UNO_QUERY_THROW);
-}
+if (! xHierarchicalNameAccess.is())
+xHierarchicalNameAccess = officecfg::Office::Common::I18N::get();
 
 Any aEnabled = xHierarchicalNameAccess->getByHierarchicalName(aName);
 
commit 6555238fc62a08ef1e8c44e96dc18d38345dd419
Author: Noel Grandin 
AuthorDate: Tue May 14 19:17:28 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 15 08:01:56 2024 +0200

use more officecfg in CanvasFactory

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

diff --git a/canvas/Library_canvasfactory.mk b/canvas/Library_canvasfactory.mk
index 0b0a9d988e15..0141cd1362cd 100644
--- a/canvas/Library_canvasfactory.mk
+++ b/canvas/Library_canvasfactory.mk
@@ -28,6 +28,10 @@ $(eval $(call 
gb_Library_set_componentfile,canvasfactory,canvas/source/factory/c
 
 $(eval $(call gb_Library_use_external,canvasfactory,boost_headers))
 
+$(eval $(call gb_Library_use_custom_headers,canvasfactory,\
+   officecfg/registry \
+))
+
 $(eval $(call gb_Library_use_sdk_api,canvasfactory))
 
 $(eval $(call gb_Library_use_libraries,canvasfactory,\
diff --git a/canvas/source/factory/cf_service.cxx 
b/canvas/source/factory/cf_service.cxx
index 88f07fc56f06..62d7ec3c0bd3 100644
--- a/canvas/source/factory/cf_service.cxx
+++ b/canvas/source/factory/cf_service.cxx
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -60,7 +61,6 @@ class CanvasFactory
 
 mutable std::mutexm_mutex;
 Reference  m_xContext;
-Reference m_xCanvasConfigNameAccess;
 AvailVector   m_aAvailableImplementations;
 AvailVector   m_aAcceleratedImplementations;
 AvailVector   m_aAAImplementations;
@@ -71,7 +71,7 @@ class CanvasFactory
 
 void checkConfigFlag( bool& r_bFlag,
   bool& r_CacheFlag,
-  const OUString& nodeName ) const;
+  bool bCurrentConfigValue ) const;
 Reference use(
 OUString const & serviceName,
 Sequence const & args,
@@ -118,30 +118,12 @@ CanvasFactory::CanvasFactory( 
Reference const &

core.git: i18nutil/source include/i18nutil

2024-05-14 Thread Noel Grandin (via logerrit)
 i18nutil/source/utility/paper.cxx |   19 ++-
 include/i18nutil/paper.hxx|2 +-
 2 files changed, 11 insertions(+), 10 deletions(-)

New commits:
commit 23e3de725e32c05c615a7fd352edcc9f579e5bce
Author: Noel Grandin 
AuthorDate: Tue May 14 12:14:54 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 14 19:49:10 2024 +0200

use more string_view in i18nutil::PaperInfo

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

diff --git a/i18nutil/source/utility/paper.cxx 
b/i18nutil/source/utility/paper.cxx
index c5870d04d72b..f774b1998554 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -20,6 +20,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -254,9 +255,9 @@ PaperInfo PaperInfo::getSystemDefaultPaper()
 
 if (bOk && pBuffer && *pBuffer != 0)
 {
-OString aPaper(pBuffer);
-aPaper = aPaper.trim();
-static const struct { const char *pName; Paper ePaper; } 
aCustoms [] =
+std::string_view aPaper(pBuffer);
+aPaper = o3tl::trim(aPaper);
+static constexpr struct { std::string_view aName; Paper 
ePaper; } aCustoms [] =
 {
 { "B0",   PAPER_B0_ISO },
 { "B1",   PAPER_B1_ISO },
@@ -279,7 +280,7 @@ PaperInfo PaperInfo::getSystemDefaultPaper()
 size_t const nExtraTabSize = SAL_N_ELEMENTS(aCustoms);
 for (size_t i = 0; i < nExtraTabSize; ++i)
 {
-if (rtl_str_compareIgnoreAsciiCase(aCustoms[i].pName, 
aPaper.getStr()) == 0)
+if (o3tl::equalsIgnoreAsciiCase(aCustoms[i].aName, aPaper))
 {
 ePaper = aCustoms[i].ePaper;
 break;
@@ -288,7 +289,7 @@ PaperInfo PaperInfo::getSystemDefaultPaper()
 
 if (ePaper == PAPER_USER)
 {
-bHalve = aPaper.startsWith("half", );
+bHalve = o3tl::starts_with(aPaper, "half", );
 ePaper = PaperInfo::fromPSName(aPaper);
 }
 
@@ -398,20 +399,20 @@ OString PaperInfo::toPSName(Paper ePaper)
 return static_cast(ePaper) < nTabSize && aDinTab[ePaper].m_pPSName 
?  OString(aDinTab[ePaper].m_pPSName) : OString();
 }
 
-Paper PaperInfo::fromPSName(const OString )
+Paper PaperInfo::fromPSName(std::string_view rName)
 {
-if (rName.isEmpty())
+if (rName.empty())
 return PAPER_USER;
 
 for ( size_t i = 0; i < nTabSize; ++i )
 {
 if (aDinTab[i].m_pPSName &&
-  !rtl_str_compareIgnoreAsciiCase(aDinTab[i].m_pPSName, 
rName.getStr()))
+  o3tl::equalsIgnoreAsciiCase(aDinTab[i].m_pPSName, rName))
 {
 return static_cast(i);
 }
 else if (aDinTab[i].m_pAltPSName &&
-  !rtl_str_compareIgnoreAsciiCase(aDinTab[i].m_pAltPSName, 
rName.getStr()))
+  o3tl::equalsIgnoreAsciiCase(aDinTab[i].m_pAltPSName, rName))
 {
 return static_cast(i);
 }
diff --git a/include/i18nutil/paper.hxx b/include/i18nutil/paper.hxx
index b84d7b3af074..c097727cfa7c 100644
--- a/include/i18nutil/paper.hxx
+++ b/include/i18nutil/paper.hxx
@@ -147,7 +147,7 @@ public:
 static PaperInfo getSystemDefaultPaper();
 static PaperInfo getDefaultPaperForLocale(const css::lang::Locale& 
rLocale);
 
-static Paper fromPSName(const OString& rName);
+static Paper fromPSName(std::string_view rName);
 static OString toPSName(Paper eType);
 
 static tools::Long sloppyFitPageDimension(tools::Long nDimension);


core.git: filter/source

2024-05-14 Thread Noel Grandin (via logerrit)
 filter/source/msfilter/msdffimp.cxx |   37 
 1 file changed, 17 insertions(+), 20 deletions(-)

New commits:
commit 779a3b26edb31c3bb70e96e2cfa7ca17f53496ce
Author: Noel Grandin 
AuthorDate: Mon May 13 15:22:15 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 14 18:47:20 2024 +0200

createFromAscii -> OUString literals in SvxMSDffManager

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

diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index d25b687e8c4e..4089fcfba91d 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -7136,43 +7136,40 @@ css::uno::Reference < css::embed::XEmbeddedObject >  
SvxMSDffManager::CheckForCo
 sStarName = OUString::createFromAscii( pName );
 else if ( nConvertFlags )
 {
-static struct ObjImpType
+static constexpr struct ObjImpType
 {
 sal_uInt32 nFlag;
-const char* pFactoryNm;
+OUString aFactoryNm;
 // GlobalNameId
 sal_uInt32 n1;
 sal_uInt16 n2, n3;
 sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15;
-} const aArr[] = {
-{ OLE_MATHTYPE_2_STARMATH, "smath", MSO_EQUATION3_CLASSID },
-{ OLE_MATHTYPE_2_STARMATH, "smath", MSO_EQUATION2_CLASSID },
-{ OLE_WINWORD_2_STARWRITER, "swriter", MSO_WW8_CLASSID },
+} aArr[] {
+{ OLE_MATHTYPE_2_STARMATH, u"smath"_ustr, MSO_EQUATION3_CLASSID },
+{ OLE_MATHTYPE_2_STARMATH, u"smath"_ustr, MSO_EQUATION2_CLASSID },
+{ OLE_WINWORD_2_STARWRITER, u"swriter"_ustr, MSO_WW8_CLASSID },
 // Excel table
-{ OLE_EXCEL_2_STARCALC, "scalc", MSO_EXCEL5_CLASSID },
-{ OLE_EXCEL_2_STARCALC, "scalc", MSO_EXCEL8_CLASSID },
+{ OLE_EXCEL_2_STARCALC, u"scalc"_ustr, MSO_EXCEL5_CLASSID },
+{ OLE_EXCEL_2_STARCALC, u"scalc"_ustr, MSO_EXCEL8_CLASSID },
 // 114465: additional Excel OLE chart classId to above.
-{ OLE_EXCEL_2_STARCALC, "scalc", MSO_EXCEL8_CHART_CLASSID },
+{ OLE_EXCEL_2_STARCALC, u"scalc"_ustr, MSO_EXCEL8_CHART_CLASSID },
 // PowerPoint presentation
-{ OLE_POWERPOINT_2_STARIMPRESS, "simpress", MSO_PPT8_CLASSID },
+{ OLE_POWERPOINT_2_STARIMPRESS, u"simpress"_ustr, MSO_PPT8_CLASSID 
},
 // PowerPoint slide
-{ OLE_POWERPOINT_2_STARIMPRESS, "simpress", MSO_PPT8_SLIDE_CLASSID 
},
-{ 0, nullptr,
-  0, 0, 0,
-  0, 0, 0, 0, 0, 0, 0, 0 }
+{ OLE_POWERPOINT_2_STARIMPRESS, u"simpress"_ustr, 
MSO_PPT8_SLIDE_CLASSID }
 };
 
-for( const ObjImpType* pArr = aArr; pArr->nFlag; ++pArr )
+for( const ObjImpType & rArr : aArr )
 {
-if( nConvertFlags & pArr->nFlag )
+if( nConvertFlags & rArr.nFlag )
 {
-SvGlobalName aTypeName( pArr->n1, pArr->n2, pArr->n3,
-pArr->b8, pArr->b9, pArr->b10, pArr->b11,
-pArr->b12, pArr->b13, pArr->b14, pArr->b15 );
+SvGlobalName aTypeName( rArr.n1, rArr.n2, rArr.n3,
+rArr.b8, rArr.b9, rArr.b10, rArr.b11,
+rArr.b12, rArr.b13, rArr.b14, rArr.b15 );
 
 if ( aStgNm == aTypeName )
 {
-sStarName = OUString::createFromAscii( pArr->pFactoryNm );
+sStarName = rArr.aFactoryNm;
 break;
 }
 }


core.git: svx/source

2024-05-14 Thread Noel Grandin (via logerrit)
 svx/source/dialog/framelinkarray.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 6f8a73a379d97829080367b21d54f9b5fab781c9
Author: Noel Grandin 
AuthorDate: Tue May 14 09:08:16 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 14 18:46:48 2024 +0200

tdf#161019 tdf#159846 spreadsheet border rendering

regression from
commit e27d4cc31e04be4c47b5085dfa2363ee45457e8a
Author: Noel Grandin 
Date:   Mon Jun 19 12:23:55 2023 +0200
tdf#150534 reduce the memory consumption of cells when calculating

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

diff --git a/svx/source/dialog/framelinkarray.cxx 
b/svx/source/dialog/framelinkarray.cxx
index cada4ee2f882..fbdc727ebf10 100644
--- a/svx/source/dialog/framelinkarray.cxx
+++ b/svx/source/dialog/framelinkarray.cxx
@@ -935,7 +935,7 @@ void Array::SetAddMergedLeftSize( sal_Int32 nCol, sal_Int32 
nRow, sal_Int32 nAdd
 return;
 Cell aTempCell(*pTempCell);
 aTempCell.mnAddLeft = nAddSize;
-mxImpl->PutCell( nCol, nRow, aTempCell );
+mxImpl->PutCell( aIt.Col(), aIt.Row(), aTempCell );
 }
 }
 
@@ -950,7 +950,7 @@ void Array::SetAddMergedRightSize( sal_Int32 nCol, 
sal_Int32 nRow, sal_Int32 nAd
 return;
 Cell aTempCell(*pTempCell);
 aTempCell.mnAddRight = nAddSize;
-mxImpl->PutCell( nCol, nRow, aTempCell );
+mxImpl->PutCell( aIt.Col(), aIt.Row(), aTempCell );
 }
 }
 
@@ -965,7 +965,7 @@ void Array::SetAddMergedTopSize( sal_Int32 nCol, sal_Int32 
nRow, sal_Int32 nAddS
 return;
 Cell aTempCell(*pTempCell);
 aTempCell.mnAddTop = nAddSize;
-mxImpl->PutCell( nCol, nRow, aTempCell );
+mxImpl->PutCell( aIt.Col(), aIt.Row(), aTempCell );
 }
 }
 
@@ -980,7 +980,7 @@ void Array::SetAddMergedBottomSize( sal_Int32 nCol, 
sal_Int32 nRow, sal_Int32 nA
 return;
 Cell aTempCell(*pTempCell);
 aTempCell.mnAddBottom = nAddSize;
-mxImpl->PutCell( nCol, nRow, aTempCell );
+mxImpl->PutCell( aIt.Col(), aIt.Row(), aTempCell );
 }
 }
 


core.git: forms/source

2024-05-14 Thread Noel Grandin (via logerrit)
 forms/source/misc/limitedformats.cxx |  139 +--
 1 file changed, 55 insertions(+), 84 deletions(-)

New commits:
commit 9c92eb6800468de34c5aec3690c1b990a4e763c9
Author: Noel Grandin 
AuthorDate: Mon May 13 15:42:27 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 14 15:54:33 2024 +0200

createFromAscii -> OUString literals in OLimitedFormats

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

diff --git a/forms/source/misc/limitedformats.cxx 
b/forms/source/misc/limitedformats.cxx
index 1296b976e9f7..e899128aa5e8 100644
--- a/forms/source/misc/limitedformats.cxx
+++ b/forms/source/misc/limitedformats.cxx
@@ -23,7 +23,7 @@
 #include 
 #include 
 #include 
-
+#include 
 
 namespace frm
 {
@@ -79,54 +79,51 @@ namespace frm
 
 struct FormatEntry
 {
-const char*  pDescription;
+OUString aDescription;
 sal_Int32nKey;
 LocaleType   eLocale;
 };
 
 }
 
-static FormatEntry* lcl_getFormatTable(sal_Int16 nTableId)
+static std::span lcl_getFormatTable(sal_Int16 nTableId)
 {
 switch (nTableId)
 {
 case FormComponentType::TIMEFIELD:
 {
 static FormatEntry s_aFormats[] = {
-{ "HH:MM", -1, ltEnglishUS },
-{ "HH:MM:SS", -1, ltEnglishUS },
-{ "HH:MM AM/PM", -1, ltEnglishUS },
-{ "HH:MM:SS AM/PM", -1, ltEnglishUS },
-{ nullptr, -1, ltSystem }
+{ u"HH:MM"_ustr, -1, ltEnglishUS },
+{ u"HH:MM:SS"_ustr, -1, ltEnglishUS },
+{ u"HH:MM AM/PM"_ustr, -1, ltEnglishUS },
+{ u"HH:MM:SS AM/PM"_ustr, -1, ltEnglishUS }
 };
 return s_aFormats;
 }
 case FormComponentType::DATEFIELD:
 {
 static FormatEntry s_aFormats[] = {
-{ "T-M-JJ", -1, ltGerman },
-{ "TT-MM-JJ", -1, ltGerman },
-{ "TT-MM-", -1, ltGerman },
-{ "T.  ", -1, ltGerman },
-
-{ "DD/MM/YY", -1, ltEnglishUS },
-{ "MM/DD/YY", -1, ltEnglishUS },
-{ "YY/MM/DD", -1, ltEnglishUS },
-{ "DD/MM/", -1, ltEnglishUS },
-{ "MM/DD/", -1, ltEnglishUS },
-{ "/MM/DD", -1, ltEnglishUS },
-
-{ "JJ-MM-TT", -1, ltGerman },
-{ "-MM-TT", -1, ltGerman },
-
-{ nullptr, -1, ltSystem }
+{ u"T-M-JJ"_ustr, -1, ltGerman },
+{ u"TT-MM-JJ"_ustr, -1, ltGerman },
+{ u"TT-MM-"_ustr, -1, ltGerman },
+{ u"T.  "_ustr, -1, ltGerman },
+
+{ u"DD/MM/YY"_ustr, -1, ltEnglishUS },
+{ u"MM/DD/YY"_ustr, -1, ltEnglishUS },
+{ u"YY/MM/DD"_ustr, -1, ltEnglishUS },
+{ u"DD/MM/"_ustr, -1, ltEnglishUS },
+{ u"MM/DD/"_ustr, -1, ltEnglishUS },
+{ u"/MM/DD"_ustr, -1, ltEnglishUS },
+
+{ u"JJ-MM-TT"_ustr, -1, ltGerman },
+{ u"-MM-TT"_ustr, -1, ltGerman }
 };
 return s_aFormats;
 }
 }
 
 OSL_FAIL("lcl_getFormatTable: invalid id!");
-return nullptr;
+return {};
 }
 
 OLimitedFormats::OLimitedFormats(const Reference< XComponentContext >& 
_rxContext, const sal_Int16 _nClassId)
@@ -147,12 +144,12 @@ namespace frm
 
 void OLimitedFormats::ensureTableInitialized(const sal_Int16 _nTableId)
 {
-FormatEntry* pFormatTable = lcl_getFormatTable(_nTableId);
-if (-1 != pFormatTable->nKey)
+std::span pFormatTable = lcl_getFormatTable(_nTableId);
+if (-1 != pFormatTable[0].nKey)
 return;
 
 ::osl::MutexGuard aGuard(s_aMutex);
-if (-1 != pFormatTable->nKey)
+if (-1 != pFormatTable[0].nKey)
 return;
 
 // initialize the keys
@@ -165,26 +162,25 @@ namespace frm
 return;
 
 // loop through the table
-FormatEntry* pLoopFormats = pFormatTable;
-while (pLoopFormats->pDescription)
+for (FormatEntry & rLoopFormats : pFormatTable)
 {
 // get the key f

core.git: include/vbahelper vbahelper/source

2024-05-14 Thread Noel Grandin (via logerrit)
 include/vbahelper/vbaaccesshelper.hxx|2 
 include/vbahelper/vbacollectionimpl.hxx  |   10 -
 include/vbahelper/vbahelperinterface.hxx |2 
 include/vbahelper/vbapropvalue.hxx   |2 
 include/vbahelper/vbareturntypes.hxx |2 
 vbahelper/source/msforms/vbabutton.cxx   |8 -
 vbahelper/source/msforms/vbacheckbox.cxx |   14 +-
 vbahelper/source/msforms/vbacheckbox.hxx |2 
 vbahelper/source/msforms/vbacombobox.cxx |   12 +-
 vbahelper/source/msforms/vbacombobox.hxx |2 
 vbahelper/source/msforms/vbacontrol.cxx  |  112 +--
 vbahelper/source/msforms/vbacontrols.cxx |   50 
 vbahelper/source/msforms/vbaframe.cxx|6 -
 vbahelper/source/msforms/vbaimage.cxx|4 
 vbahelper/source/msforms/vbalabel.cxx|8 -
 vbahelper/source/msforms/vbalabel.hxx|2 
 vbahelper/source/msforms/vbalistbox.cxx  |   40 +++---
 vbahelper/source/msforms/vbalistbox.hxx  |2 
 vbahelper/source/msforms/vbalistcontrolhelper.cxx|   24 ++--
 vbahelper/source/msforms/vbamultipage.cxx|4 
 vbahelper/source/msforms/vbanewfont.cxx  |   30 ++---
 vbahelper/source/msforms/vbapages.cxx|4 
 vbahelper/source/msforms/vbaprogressbar.cxx  |4 
 vbahelper/source/msforms/vbaprogressbar.hxx  |2 
 vbahelper/source/msforms/vbaradiobutton.cxx  |   14 +-
 vbahelper/source/msforms/vbaradiobutton.hxx  |2 
 vbahelper/source/msforms/vbascrollbar.cxx|   24 ++--
 vbahelper/source/msforms/vbaspinbutton.cxx   |   16 +-
 vbahelper/source/msforms/vbasystemaxcontrol.cxx  |4 
 vbahelper/source/msforms/vbatextbox.cxx  |   16 +-
 vbahelper/source/msforms/vbatextbox.hxx  |2 
 vbahelper/source/msforms/vbatogglebutton.cxx |   14 +-
 vbahelper/source/msforms/vbatogglebutton.hxx |2 
 vbahelper/source/msforms/vbauserform.cxx |   10 -
 vbahelper/source/vbahelper/vbaapplicationbase.cxx|   24 ++--
 vbahelper/source/vbahelper/vbacolorformat.cxx|   16 +-
 vbahelper/source/vbahelper/vbacommandbar.cxx |   16 +-
 vbahelper/source/vbahelper/vbacommandbarcontrol.cxx  |   20 +--
 vbahelper/source/vbahelper/vbacommandbarcontrols.cxx |   18 +--
 vbahelper/source/vbahelper/vbacommandbarhelper.cxx   |   30 ++---
 vbahelper/source/vbahelper/vbacommandbars.cxx|   12 +-
 vbahelper/source/vbahelper/vbadialogbase.cxx |2 
 vbahelper/source/vbahelper/vbadocumentbase.cxx   |   16 +-
 vbahelper/source/vbahelper/vbadocumentsbase.cxx  |   12 +-
 vbahelper/source/vbahelper/vbaeventshelperbase.cxx   |8 -
 vbahelper/source/vbahelper/vbafillformat.cxx |   20 +--
 vbahelper/source/vbahelper/vbafontbase.cxx   |   16 +-
 vbahelper/source/vbahelper/vbaglobalbase.cxx |   12 +-
 vbahelper/source/vbahelper/vbahelper.cxx |   32 ++---
 vbahelper/source/vbahelper/vbalineformat.cxx |   64 +-
 vbahelper/source/vbahelper/vbapagesetupbase.cxx  |   54 -
 vbahelper/source/vbahelper/vbapictureformat.cxx  |   16 +-
 vbahelper/source/vbahelper/vbashape.cxx  |   66 +--
 vbahelper/source/vbahelper/vbashaperange.cxx |4 
 vbahelper/source/vbahelper/vbashapes.cxx |   44 +++
 vbahelper/source/vbahelper/vbatextframe.cxx  |   30 ++---
 vbahelper/source/vbahelper/vbawindowbase.cxx |4 
 57 files changed, 494 insertions(+), 494 deletions(-)

New commits:
commit fcaf6cee081b8e3282ee85672ba376a9bd0aeeb9
Author: Noel Grandin 
AuthorDate: Tue May 14 09:10:37 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 14 15:14:51 2024 +0200

loplugin:ostr in vbahelper

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

diff --git a/include/vbahelper/vbaaccesshelper.hxx 
b/include/vbahelper/vbaaccesshelper.hxx
index 36f24d3a4f71..cf163e90ac45 100644
--- a/include/vbahelper/vbaaccesshelper.hxx
+++ b/include/vbahelper/vbaaccesshelper.hxx
@@ -41,7 +41,7 @@ namespace ooo::vba
 inline css::uno::Reference< css::lang::XMultiServiceFactory > 
getVBAServiceFactory( SfxObjectShell const * pShell )
 {
 css::uno::Any aUnoVar;
-if ( !pShell || ! pShell->GetBasicManager()->GetGlobalUNOConstant( 
"VBAGlobals", aUnoVar ) )
+if ( !pShell || ! pShell->GetBasicManager()->GetGlobalUNOConstant( 
u"VBAGlobals"_ustr, aUnoVar ) )
 throw css::lang::IllegalArgumentException();
 css::uno::Reference< css::lang::XMultiServiceFactory > 
xVBAFactory( aUnoVar, css:

core.git: include/test test/qa test/source

2024-05-14 Thread Noel Grandin (via logerrit)
   |2 
 88 files changed, 669 insertions(+), 664 deletions(-)

New commits:
commit 008f4273ae201b5bebfd728a3b59958de49279bf
Author: Noel Grandin 
AuthorDate: Tue May 14 09:10:18 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 14 11:47:53 2024 +0200

loplugin:ostr in test

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

diff --git a/include/test/container/xnamecontainer.hxx 
b/include/test/container/xnamecontainer.hxx
index 5cc4bab1250c..259064e9c382 100644
--- a/include/test/container/xnamecontainer.hxx
+++ b/include/test/container/xnamecontainer.hxx
@@ -26,7 +26,7 @@ class OOO_DLLPUBLIC_TEST XNameContainer
 public:
 // removes default entry
 XNameContainer()
-: m_aName("XNameContainer")
+: m_aName(u"XNameContainer"_ustr)
 {
 }
 // removes given entry
diff --git a/include/test/sheet/xnamedranges.hxx 
b/include/test/sheet/xnamedranges.hxx
index 90b8ab6c2fcb..a8188e3d4549 100644
--- a/include/test/sheet/xnamedranges.hxx
+++ b/include/test/sheet/xnamedranges.hxx
@@ -26,7 +26,7 @@ class OOO_DLLPUBLIC_TEST XNamedRanges
 public:
 // remove default entry
 XNamedRanges()
-: maNameToRemove("initial1")
+: maNameToRemove(u"initial1"_ustr)
 {
 }
 
diff --git a/include/test/table/xcellrange.hxx 
b/include/test/table/xcellrange.hxx
index 94db1130b21e..e91941eb2708 100644
--- a/include/test/table/xcellrange.hxx
+++ b/include/test/table/xcellrange.hxx
@@ -23,7 +23,7 @@ class OOO_DLLPUBLIC_TEST XCellRange
 {
 public:
 XCellRange()
-: m_aRangeName("A1:A1")
+: m_aRangeName(u"A1:A1"_ustr)
 {
 }
 XCellRange(OUString aRangeName)
diff --git a/include/test/testinteractionhandler.hxx 
b/include/test/testinteractionhandler.hxx
index 1cfdec663d33..01a3726cf42d 100644
--- a/include/test/testinteractionhandler.hxx
+++ b/include/test/testinteractionhandler.hxx
@@ -47,7 +47,7 @@ public:
 
 virtual OUString SAL_CALL getImplementationName() override
 {
-return "com.sun.star.comp.uui.TestInteractionHandler";
+return u"com.sun.star.comp.uui.TestInteractionHandler"_ustr;
 }
 
 virtual sal_Bool SAL_CALL supportsService(OUString const & rServiceName) 
override
@@ -57,11 +57,11 @@ public:
 
 virtual css::uno::Sequence SAL_CALL getSupportedServiceNames() 
override
 {
-return { "com.sun.star.task.InteractionHandler",
+return { u"com.sun.star.task.InteractionHandler"_ustr,
 // added to indicate support for 
configuration.backend.MergeRecoveryRequest
- "com.sun.star.configuration.backend.InteractionHandler",
+ u"com.sun.star.configuration.backend.InteractionHandler"_ustr,
 // for backwards compatibility
- "com.sun.star.uui.InteractionHandler" };
+ u"com.sun.star.uui.InteractionHandler"_ustr };
 }
 
 virtual void SAL_CALL initialize(css::uno::Sequence const & 
/*rArguments*/) override
diff --git a/include/test/unoapi_property_testers.hxx 
b/include/test/unoapi_property_testers.hxx
index 4d83e8179ce4..70160280dd89 100644
--- a/include/test/unoapi_property_testers.hxx
+++ b/include/test/unoapi_property_testers.hxx
@@ -145,7 +145,7 @@ 
testStringProperty(css::uno::Reference const& xPropert
  */
 void OOO_DLLPUBLIC_TEST
 testStringOptionalProperty(css::uno::Reference 
const& xPropertySet,
-   const OUString& name, const OUString& rValue = 
OUString("StringValue"));
+   const OUString& name, const OUString& rValue = 
u"StringValue"_ustr);
 
 /** @brief Tester for read-only property type 'string' of a @see 
com::sun::star::beans::XPropertySet.
  *
diff --git a/include/test/util/xsearchable.hxx 
b/include/test/util/xsearchable.hxx
index 0f78ceb18cb1..ffd4e44fede6 100644
--- a/include/test/util/xsearchable.hxx
+++ b/include/test/util/xsearchable.hxx
@@ -21,7 +21,7 @@ class OOO_DLLPUBLIC_TEST XSearchable
 {
 public:
 XSearchable(OUString aString, sal_Int32 nCount) : 
maSearchString(std::move(aString)), mnCount(nCount) {}
-XSearchable() : maSearchString("SearchString"), mnCount(1) {}
+XSearchable() : maSearchString(u"SearchString"_ustr), mnCount(1) {}
 virtual ~XSearchable();
 
 void testFindFirst();
diff --git a/test/qa/cppunit/test_xpath.cxx b/test/qa/cppunit/test_xpath.cxx
index 8d105dd4eae6..18d815a2420b 100644
--- a/test/qa/cppunit/test_xpath.cxx
+++ b/test/qa/cppunit/test_xpath.cxx
@@ -33,7 +33,7 @@ CPPUNIT_TEST_FIXTURE(TestXPath, test_getXPath)
 // Must fail when requested non-empty attribute doesn't exist
 CPPUNIT_ASSERT_ASSERTION_FAIL(getXPath(pTable, "/xml/item"_os

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

2024-05-14 Thread Noel Grandin (via logerrit)
 starmath/inc/node.hxx   |2 
 starmath/qa/cppunit/test_cursor.cxx |   16 
 starmath/qa/cppunit/test_import.cxx |2 
 starmath/qa/cppunit/test_node.cxx   |   32 
 starmath/qa/cppunit/test_nodetotextvisitors.cxx |   24 
 starmath/qa/cppunit/test_parse.cxx  |   10 
 starmath/qa/cppunit/test_starmath.cxx   |   52 -
 starmath/qa/extras/mmlexport-test.cxx   |   50 -
 starmath/qa/extras/mmlimport-test.cxx   |   70 -
 starmath/source/SmElementsPanel.cxx |8 
 starmath/source/SmPanelFactory.cxx  |   26 
 starmath/source/SmPropertiesPanel.cxx   |   16 
 starmath/source/accessibility.cxx   |   10 
 starmath/source/cfgitem.cxx |  142 +--
 starmath/source/cursor.cxx  |   22 
 starmath/source/dialog.cxx  |  198 ++--
 starmath/source/document.cxx|8 
 starmath/source/edit.cxx|6 
 starmath/source/eqnolefilehdr.cxx   |2 
 starmath/source/mathml/export.cxx   |   82 +-
 starmath/source/mathml/import.cxx   |   16 
 starmath/source/mathml/mathmlexport.cxx |   20 
 starmath/source/mathml/mathmlimport.cxx |   32 
 starmath/source/mathml/starmathdatabase.cxx |  974 
 starmath/source/mathtype.cxx|   10 
 starmath/source/node.cxx|4 
 starmath/source/ooxmlimport.cxx |8 
 starmath/source/parse5.cxx  |   28 
 starmath/source/smdetect.cxx|   10 
 starmath/source/smdll.cxx   |2 
 starmath/source/smediteng.cxx   |4 
 starmath/source/smmod.cxx   |2 
 starmath/source/symbol.cxx  |4 
 starmath/source/unofilter.cxx   |9 
 starmath/source/unomodel.cxx|  184 ++--
 starmath/source/view.cxx|   20 
 36 files changed, 1060 insertions(+), 1045 deletions(-)

New commits:
commit b56ca52cef77d4d1f99bc3edd89b2557e5cb2cfb
Author: Noel Grandin 
AuthorDate: Mon May 13 15:16:59 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 14 10:13:45 2024 +0200

loplugin:ostr in starmath

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

diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index b637fea76d6a..f59c23ea426f 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -1055,7 +1055,7 @@ class SmPlaceNode final : public SmMathSymbolNode
 public:
 explicit SmPlaceNode(const SmToken )
 : SmMathSymbolNode(SmNodeType::Place, rNodeToken) { }
-SmPlaceNode() : SmMathSymbolNode(SmNodeType::Place, SmToken(TPLACE, 
MS_PLACE, "")) { };
+SmPlaceNode() : SmMathSymbolNode(SmNodeType::Place, SmToken(TPLACE, 
MS_PLACE, u""_ustr)) { };
 
 /**
  * Prepare preliminary settings about font and text
diff --git a/starmath/qa/cppunit/test_cursor.cxx 
b/starmath/qa/cppunit/test_cursor.cxx
index 89d4e6fe9a8e..ee442b75f067 100644
--- a/starmath/qa/cppunit/test_cursor.cxx
+++ b/starmath/qa/cppunit/test_cursor.cxx
@@ -70,7 +70,7 @@ void Test::tearDown()
 
 void Test::testCopyPaste()
 {
-auto xTree = SmParser5().Parse("a * b + c");
+auto xTree = SmParser5().Parse(u"a * b + c"_ustr);
 xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
 
 SmCursor aCursor(xTree.get(), xDocShRef.get());
@@ -88,13 +88,13 @@ void Test::testCopyPaste()
 aCursor.Paste();
 
 #ifndef _WIN32 // FIXME: on Windows clipboard does not work in tests for some 
reason
-CPPUNIT_ASSERT_EQUAL(OUString("{ { a * b } + { c * b } }"), 
xDocShRef->GetText());
+CPPUNIT_ASSERT_EQUAL(u"{ { a * b } + { c * b } }"_ustr, 
xDocShRef->GetText());
 #endif
 }
 
 void Test::testCopySelectPaste()
 {
-auto xTree = SmParser5().Parse("a * b + c");
+auto xTree = SmParser5().Parse(u"a * b + c"_ustr);
 xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
 
 SmCursor aCursor(xTree.get(), xDocShRef.get());
@@ -116,13 +116,13 @@ void Test::testCopySelectPaste()
 aCursor.Paste();
 
 #ifndef _WIN32 // FIXME: on Windows clipboard does not work in tests for some 
reason
-CPPUNIT_ASSERT_EQUAL(OUString("{ { b + { c * b } } + c }"), 
xDocShRef->GetText());
+CPPUNIT_ASSERT_EQUAL(u"{ { b + { c * b } } + c }"_ustr, 
xDocShRef->GetText());
 #endif
 }
 
 void Test::testCutPaste()
 {
-auto xTree = SmParser5().Parse("a * b + c");
+auto xTree = SmParser5().Parse(u"a * b + c"_ustr);
 xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
 
 SmCursor aCursor

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

2024-05-14 Thread Noel Grandin (via logerrit)
 include/svl/sigstruct.hxx  |4 
 svl/qa/unit/items/stylepool.cxx|   22 +-
 svl/qa/unit/items/test_IndexedStyleSheets.cxx  |   28 +--
 svl/qa/unit/lockfiles/test_lockfiles.cxx   |   89 +--
 svl/qa/unit/svl.cxx|  138 -
 svl/qa/unit/test_INetContentType.cxx   |   12 -
 svl/qa/unit/test_SvAddressParser.cxx   |   34 ++--
 svl/qa/unit/test_URIHelper.cxx |   24 +--
 svl/qa/unit/test_lngmisc.cxx   |   48 +++---
 svl/source/config/asiancfg.cxx |   12 -
 svl/source/config/ctloptions.cxx   |   14 -
 svl/source/crypto/cryptosign.cxx   |   14 -
 svl/source/fsstor/fsfactory.cxx|   16 +-
 svl/source/fsstor/fsstorage.cxx|   24 +--
 svl/source/items/cenumitm.cxx  |2 
 svl/source/items/itemprop.cxx  |2 
 svl/source/misc/documentlockfile.cxx   |6 
 svl/source/misc/fstathelper.cxx|2 
 svl/source/misc/inettype.cxx   |  162 ++---
 svl/source/misc/sharecontrolfile.cxx   |4 
 svl/source/misc/urihelper.cxx  |2 
 svl/source/numbers/numfmuno.cxx|   16 +-
 svl/source/numbers/supservs.cxx|4 
 svl/source/numbers/zforfind.cxx|   10 -
 svl/source/numbers/zforlist.cxx|   10 -
 svl/source/numbers/zformat.cxx |4 
 svl/source/numbers/zforscan.cxx|  106 ++---
 svl/source/passwordcontainer/passwordcontainer.cxx |   40 ++---
 svl/source/passwordcontainer/syscreds.cxx  |8 -
 svl/source/uno/pathservice.cxx |4 
 30 files changed, 429 insertions(+), 432 deletions(-)

New commits:
commit 320555963d69cbe19570a555a476d0ae757fef98
Author: Noel Grandin 
AuthorDate: Mon May 13 14:50:11 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue May 14 09:03:47 2024 +0200

loplugin:ostr in svl

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

diff --git a/include/svl/sigstruct.hxx b/include/svl/sigstruct.hxx
index 20cb0ebd2d0a..5b1609f7f9c1 100644
--- a/include/svl/sigstruct.hxx
+++ b/include/svl/sigstruct.hxx
@@ -53,9 +53,7 @@ struct SignatureReferenceInformation
 
 SignatureReferenceInformation() :
 nType(SignatureReferenceType::SAMEDOCUMENT),
-ouURI(""),
-nDigestID(css::xml::crypto::DigestID::SHA1),
-ouDigestValue("")
+nDigestID(css::xml::crypto::DigestID::SHA1)
 {
 }
 
diff --git a/svl/qa/unit/items/stylepool.cxx b/svl/qa/unit/items/stylepool.cxx
index 8ba33c1931de..ec82dbd72852 100644
--- a/svl/qa/unit/items/stylepool.cxx
+++ b/svl/qa/unit/items/stylepool.cxx
@@ -51,59 +51,59 @@ ItemInfoPackage& getItemInfoPackageTest()
 CPPUNIT_TEST_FIXTURE(StylePoolTest, testIterationOrder)
 {
 // Set up a style pool with multiple parents.
-rtl::Reference pPool = new SfxItemPool("test");
+rtl::Reference pPool = new SfxItemPool(u"test"_ustr);
 pPool->registerItemInfoPackage(getItemInfoPackageTest());
 {
 // Set up parents in mixed order to make sure we do not sort by 
pointer address.
 SfxItemSet aParent1(*pPool, svl::Items<1, 1>);
 SfxItemSet aChild1(*pPool, svl::Items<1, 1>);
 aChild1.SetParent();
-SfxStringItem aItem1(1, "Item1");
+SfxStringItem aItem1(1, u"Item1"_ustr);
 aChild1.Put(aItem1);
 
 SfxItemSet aParent3(*pPool, svl::Items<1, 1>);
 SfxItemSet aChild3(*pPool, svl::Items<1, 1>);
 aChild3.SetParent();
-SfxStringItem aItem3(1, "Item3");
+SfxStringItem aItem3(1, u"Item3"_ustr);
 aChild3.Put(aItem3);
 
 SfxItemSet aParent2(*pPool, svl::Items<1, 1>);
 SfxItemSet aChild2(*pPool, svl::Items<1, 1>);
 aChild2.SetParent();
-SfxStringItem aItem2(1, "Item2");
+SfxStringItem aItem2(1, u"Item2"_ustr);
 aChild2.Put(aItem2);
 
 // Insert item sets in alphabetical order.
 StylePool aStylePool;
-OUString aChild1Name("Child1");
+OUString aChild1Name(u"Child1"_ustr);
 aStylePool.insertItemSet(aChild1, );
-OUString aChild3Name("Child3");
+OUString aChild3Name(u"Child3"_ustr);
 aStylePool.insertItemSet(aChild3, );
-OUString aChild2Name("Child2");
+OUString aChild2Name(u"Child2"_ustr);
 aStylePool.insertItemSet(aChild2, );
 std::un

core.git: 2 commits - sot/qa sot/source stoc/source stoc/test

2024-05-13 Thread Noel Grandin (via logerrit)
 sot/qa/cppunit/test_sot.cxx   |2 
 sot/source/base/exchange.cxx  |  250 
+-
 sot/source/sdstor/stgelem.cxx |2 
 sot/source/sdstor/stgole.cxx  |4 
 sot/source/sdstor/storage.cxx |6 
 sot/source/sdstor/ucbstorage.cxx  |   34 -
 sot/source/unoolestorage/xolesimplestorage.cxx|8 
 stoc/source/corereflection/crarray.cxx|4 
 stoc/source/corereflection/crcomp.cxx |4 
 stoc/source/corereflection/crefl.cxx  |   18 
 stoc/source/corereflection/crenum.cxx |4 
 stoc/source/corereflection/criface.cxx|   16 
 stoc/source/corereflection/dump.cxx   |8 
 stoc/source/defaultregistry/defaultregistry.cxx   |   12 
 stoc/source/implementationregistration/implreg.cxx|   26 -
 stoc/source/implementationregistration/mergekeys.cxx  |8 
 stoc/source/inspect/introspection.cxx |4 
 stoc/source/invocation/invocation.cxx |   16 
 stoc/source/invocation_adapterfactory/iafactory.cxx   |   26 -
 stoc/source/javaloader/javaloader.cxx |   66 +-
 stoc/source/javavm/javavm.cxx |  190 
+++
 stoc/source/loader/dllcomponentloader.cxx |4 
 stoc/source/namingservice/namingservice.cxx   |4 
 stoc/source/proxy_factory/proxyfac.cxx|6 
 stoc/source/security/access_controller.cxx|   20 
 stoc/source/security/file_policy.cxx  |6 
 stoc/source/security/permissions.cxx  |2 
 stoc/source/servicemanager/servicemanager.cxx |   48 -
 stoc/source/simpleregistry/simpleregistry.cxx |   92 +--
 stoc/source/typeconv/convert.cxx  |   38 -
 stoc/source/uriproc/ExternalUriReferenceTranslator.cxx|4 
 stoc/source/uriproc/UriReferenceFactory.cxx   |4 
 stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx |6 
 stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx |4 
 stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx  |8 
 stoc/test/dump.cxx|  114 ++--
 stoc/test/uriproc/test_uriproc.cxx|   30 -
 37 files changed, 549 insertions(+), 549 deletions(-)

New commits:
commit df4b0ba2f631e2a99d72011e58ac5e81fbc1dec5
Author: Noel Grandin 
AuthorDate: Mon May 13 15:16:47 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon May 13 20:11:48 2024 +0200

loplugin:ostr in stoc

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

diff --git a/stoc/source/corereflection/crarray.cxx 
b/stoc/source/corereflection/crarray.cxx
index 67be31e1ac93..f3de3041c260 100644
--- a/stoc/source/corereflection/crarray.cxx
+++ b/stoc/source/corereflection/crarray.cxx
@@ -45,7 +45,7 @@ void ArrayIdlClassImpl::realloc( Any & rArray, sal_Int32 nLen 
)
 if (nLen < 0)
 {
 throw IllegalArgumentException(
-"negative length given!",
+u"negative length given!"_ustr,
 getXWeak(), 1 );
 }
 
@@ -134,7 +134,7 @@ void ArrayIdlClassImpl::set( Any & rArray, sal_Int32 
nIndex, const Any & rNewVal
 {
 TYPELIB_DANGER_RELEASE( pElemTypeDescr );
 throw IllegalArgumentException(
-"sequence element is not assignable by given value!",
+u"sequence element is not assignable by given value!"_ustr,
 getXWeak(), 2 );
 }
 TYPELIB_DANGER_RELEASE( pElemTypeDescr );
diff --git a/stoc/source/corereflection/crcomp.cxx 
b/stoc/source/corereflection/crcomp.cxx
index b1143e158b09..d47151c7ea92 100644
--- a/stoc/source/corereflection/crcomp.cxx
+++ b/stoc/source/corereflection/crcomp.cxx
@@ -160,7 +160,7 @@ void IdlCompFieldImpl::set( const Any & rObj, const Any & 
rValue )
 if (!coerce_assign( const_cast(static_cast(rObj.getValue()) + _nOffset), getTypeDescr(), rValue, getReflection() ))
 {
 throw IllegalArgumentException(
-"cannot assign value to destination",
+u"cannot assign value to destination"_ustr,
 getXWeak(), 1 );
 }
 ret

core.git: svtools/qa svtools/source

2024-05-13 Thread Noel Grandin (via logerrit)
 svtools/qa/unit/testHtmlReader.cxx  |4 
 svtools/source/brwbox/brwbox1.cxx   |   10 -
 svtools/source/brwbox/datwin.cxx|2 
 svtools/source/brwbox/ebbcontrols.cxx   |   40 ++--
 svtools/source/brwbox/recorditemwindow.cxx  |4 
 svtools/source/config/colorcfg.cxx  |   14 -
 svtools/source/config/extcolorcfg.cxx   |   20 +-
 svtools/source/contnr/querydelete.cxx   |5 
 svtools/source/control/accessibleruler.cxx  |4 
 svtools/source/control/ctrlbox.cxx  |   18 +-
 svtools/source/control/inettbc.cxx  |8 
 svtools/source/control/ruler.cxx|2 
 svtools/source/control/scrolladaptor.cxx|5 
 svtools/source/control/tabbar.cxx   |   20 +-
 svtools/source/control/toolbarmenu.cxx  |   12 -
 svtools/source/control/valueacc.cxx |8 
 svtools/source/dialogs/PlaceEditDialog.cxx  |  120 ++---
 svtools/source/dialogs/ServerDetailsControls.cxx|8 
 svtools/source/dialogs/addresstemplate.cxx  |   26 +-
 svtools/source/dialogs/colrdlg.cxx  |4 
 svtools/source/dialogs/insdlg.cxx   |8 
 svtools/source/dialogs/prnsetup.cxx |   16 -
 svtools/source/dialogs/restartdialog.cxx|   32 +--
 svtools/source/filter/DocumentToGraphicRenderer.cxx |   34 +--
 svtools/source/filter/SvFilterOptionsDialog.cxx |   12 -
 svtools/source/filter/exportdialog.cxx  |  178 ++--
 svtools/source/graphic/renderer.cxx |   10 -
 svtools/source/java/javainteractionhandler.cxx  |4 
 svtools/source/misc/acceleratorexecute.cxx  |   58 +++---
 svtools/source/misc/bindablecontrolhelper.cxx   |   22 +-
 svtools/source/misc/ehdl.cxx|2 
 svtools/source/misc/embedhlp.cxx|6 
 svtools/source/misc/embedtransfer.cxx   |2 
 svtools/source/misc/imagemgr.cxx|   12 -
 svtools/source/misc/imageresourceaccess.cxx |6 
 svtools/source/misc/langhelp.cxx|2 
 svtools/source/misc/langtab.cxx |4 
 svtools/source/misc/openfiledroptargetlistener.cxx  |2 
 svtools/source/misc/sampletext.cxx  |8 
 svtools/source/misc/templatefoldercache.cxx |4 
 svtools/source/uitest/uiobject.cxx  |   12 -
 svtools/source/uno/addrtempuno.cxx  |4 
 svtools/source/uno/fpicker.cxx  |   20 +-
 svtools/source/uno/genericunodialog.cxx |2 
 svtools/source/uno/popupmenucontrollerbase.cxx  |2 
 svtools/source/uno/statusbarcontroller.cxx  |2 
 svtools/source/uno/toolboxcontroller.cxx|4 
 svtools/source/uno/unoevent.cxx |   12 -
 svtools/source/uno/unoimap.cxx  |   54 +++---
 svtools/source/uno/wizard/unowizard.cxx |6 
 svtools/source/uno/wizard/wizardshell.cxx   |2 
 51 files changed, 438 insertions(+), 438 deletions(-)

New commits:
commit 16a9092595761acca0392b4e177b309371d04f15
Author: Noel Grandin 
AuthorDate: Mon May 13 14:49:56 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon May 13 19:13:53 2024 +0200

loplugin:ostr in svtools

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

diff --git a/svtools/qa/unit/testHtmlReader.cxx 
b/svtools/qa/unit/testHtmlReader.cxx
index 5605060eab34..d50da0d3cd97 100644
--- a/svtools/qa/unit/testHtmlReader.cxx
+++ b/svtools/qa/unit/testHtmlReader.cxx
@@ -62,7 +62,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf114428)
 
 // This was ' hello', XML declaration
 // was not ignored.
-CPPUNIT_ASSERT_EQUAL(OUString("hello"), xParser->m_aDocument.trim());
+CPPUNIT_ASSERT_EQUAL(u"hello"_ustr, xParser->m_aDocument.trim());
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testLineBreak)
@@ -97,7 +97,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCdata)
 // - Expected: B  
 // - Actual  :
 // i.e. the content inside CDATA was lost.
-CPPUNIT_ASSERT_EQUAL(OUString("B  "), xParser->m_aCdata);
+CPPUNIT_ASSERT_EQUAL(u"B  "_ustr, xParser->m_aCdata);
 }
 }
 
diff --git a/svtools/source/brwbox/brwbox1.cxx 
b/svtools/source/brwbox/brwbox1.cxx
index ce32f324bd42..982e00cfd388 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -121,11 +121,11 @@ private:
 std::unique_ptr m_xRecordCount;
 public:
 MeasureStatusBar(vcl::Window *pParent)
-: InterimItemWindow(pParent, "svx/ui/navigationbar.ui", 
"NavigationBar")
-, m_xRecordText(m_xBuilder->weld_label(

core.git: 2 commits - svx/source

2024-05-13 Thread Noel Grandin (via logerrit)
 svx/source/form/fmcontrollayout.cxx |7 +--
 svx/source/form/fmsrccfg.cxx|   65 ++--
 2 files changed, 29 insertions(+), 43 deletions(-)

New commits:
commit 5f739e1f35a600984a4f99d6394e821a71b69712
Author: Noel Grandin 
AuthorDate: Fri May 10 11:51:31 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon May 13 19:13:23 2024 +0200

createFromAscii -> OUString literals in ControlLayouter

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

diff --git a/svx/source/form/fmcontrollayout.cxx 
b/svx/source/form/fmcontrollayout.cxx
index 9038c71a1827..8368070a754c 100644
--- a/svx/source/form/fmcontrollayout.cxx
+++ b/svx/source/form/fmcontrollayout.cxx
@@ -144,24 +144,23 @@ namespace svxform
 
 // depending on this script type, use the right property from 
the document's style which controls the
 // default locale for document content
-const char* pCharLocalePropertyName = "CharLocale";
+OUString sCharLocalePropertyName = u"CharLocale"_ustr;
 switch ( eSysLocaleScriptType )
 {
 case ScriptType::LATIN:
 // already defaulted above
 break;
 case ScriptType::ASIAN:
-pCharLocalePropertyName = "CharLocaleAsian";
+sCharLocalePropertyName = u"CharLocaleAsian"_ustr;
 break;
 case ScriptType::COMPLEX:
-pCharLocalePropertyName = "CharLocaleComplex";
+sCharLocalePropertyName = u"CharLocaleComplex"_ustr;
 break;
 default:
 OSL_FAIL( "lcl_initializeControlFont: unexpected script 
type for system locale!" );
 break;
 }
 
-OUString sCharLocalePropertyName = OUString::createFromAscii( 
pCharLocalePropertyName );
 Locale aDocumentCharLocale;
 if ( xStylePSI->hasPropertyByName( sCharLocalePropertyName ) )
         {
commit 4d7faf2916f47a0d807d53da32114fff391eb104
Author:     Noel Grandin 
AuthorDate: Fri May 10 11:48:01 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon May 13 19:13:15 2024 +0200

createFromAscii -> OUString literals in FmSearchConfigItem

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

diff --git a/svx/source/form/fmsrccfg.cxx b/svx/source/form/fmsrccfg.cxx
index 610eb58ae455..c991fe4d6deb 100644
--- a/svx/source/form/fmsrccfg.cxx
+++ b/svx/source/form/fmsrccfg.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star::uno;
 
@@ -77,47 +78,35 @@ namespace svxform
 
 struct Ascii2Int16
 {
-const char* pAscii;
+OUStringaAscii;
 sal_Int16   nValue;
 };
 
 }
 
-static const Ascii2Int16* lcl_getSearchForTypeValueMap()
+constexpr Ascii2Int16 s_aSearchForTypeMap[]
 {
-static const Ascii2Int16 s_aSearchForTypeMap[] =
-{
-{ "text",   0 },
-{ "null",   1 },
-{ "non-null",   2 },
-{ nullptr, -1 }
-};
-return s_aSearchForTypeMap;
-}
+{ u"text"_ustr,   0 },
+{ u"null"_ustr,   1 },
+{ u"non-null"_ustr,   2 },
+};
 
-static const Ascii2Int16* lcl_getSearchPositionValueMap()
+constexpr Ascii2Int16 s_aSearchPositionMap[]
 {
-static const Ascii2Int16 s_aSearchPositionMap[] =
-{
-{ "anywhere-in-field",  MATCHING_ANYWHERE },
-{ "beginning-of-field", MATCHING_BEGINNING },
-{ "end-of-field",   MATCHING_END },
-{ "complete-field", MATCHING_WHOLETEXT },
-{ nullptr, -1 }
-};
-return s_aSearchPositionMap;
-}
+{ u"anywhere-in-field"_ustr,  MATCHING_ANYWHERE },
+{ u"beginning-of-field"_ustr, MATCHING_BEGINNING },
+{ u"end-of-field"_ustr,   MATCHING_END },
+{ u"complete-field"_ustr, MATCHING_WHOLETEXT },
+};
 
-static sal_Int16 lcl_implMapAsciiValue( const OUString& _rAsciiValue, 
const Ascii2Int16* _pMap )
+static sal_Int16 lcl_implMapAsciiValue( const OUString& _rAsciiValue, 
std::span _rMap )
 {
 // search the map for the given ascii value
-const Ascii2Int16* pSearch = _pMap;
-while

core.git: 2 commits - include/tools svx/source sw/source tools/source

2024-05-13 Thread Noel Grandin (via logerrit)
 include/tools/datetimeutils.hxx |6 +++--
 svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx |   11 +
 sw/source/core/doc/docbm.cxx|2 -
 sw/source/core/doc/doclay.cxx   |2 -
 sw/source/core/doc/docnum.cxx   |2 -
 sw/source/core/doc/doctxm.cxx   |2 -
 sw/source/core/docnode/ndsect.cxx   |2 -
 sw/source/core/docnode/ndtbl.cxx|2 -
 sw/source/filter/ww8/docxattributeoutput.cxx|2 -
 sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx  |4 ---
 sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx   |7 ++
 sw/source/writerfilter/rtftok/rtfdocumentimpl.hxx   |2 -
 tools/source/datetime/datetimeutils.cxx |   23 +++-
 13 files changed, 40 insertions(+), 27 deletions(-)

New commits:
commit 98746cca55dd088c34339682e98504dadb11d2c7
Author: Noel Grandin 
AuthorDate: Fri May 10 11:42:45 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon May 13 14:44:27 2024 +0200

createFromAscii -> OUString literals in StylesPreviewToolBoxControl

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

diff --git a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx 
b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
index 2870e5dc36b7..5496f4d4ae9a 100644
--- a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
+++ b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
@@ -62,7 +62,7 @@ void StylesPreviewToolBoxControl::InitializeStyles(
 {
 css::uno::Reference xParaStyles;
 
xStylesSupplier->getStyleFamilies()->getByName(u"ParagraphStyles"_ustr) >>= 
xParaStyles;
-static const std::vector aWriterStyles = {
+static constexpr OUString aWriterStyles[]{
 u"Standard"_ustr,   u"Text body"_ustr,u"Heading 
1"_ustr, u"Heading 2"_ustr,
 u"Heading 3"_ustr,  u"Heading 4"_ustr,u"Title"_ustr,   
  u"Subtitle"_ustr,
 u"Quotations"_ustr, u"Preformatted Text"_ustr
@@ -88,15 +88,16 @@ void StylesPreviewToolBoxControl::InitializeStyles(
 }
 else if 
(xServices->supportsService(u"com.sun.star.sheet.SpreadsheetDocument"_ustr))
 {
-static const char* aCalcStyles[] = { "Default",   "Accent 1",  
"Accent 2", "Accent 3",
- "Heading 1", "Heading 2", 
"Result" };
+static constexpr OUString aCalcStyles[]{ u"Default"_ustr,   
u"Accent 1"_ustr,
+ u"Accent 2"_ustr,  
u"Accent 3"_ustr,
+ u"Heading 1"_ustr, 
u"Heading 2"_ustr,
+ u"Result"_ustr };
 css::uno::Reference xCellStyles;
 xStylesSupplier->getStyleFamilies()->getByName(u"CellStyles"_ustr) 
>>= xCellStyles;
-for (const char* pCalcStyle : aCalcStyles)
+for (const OUString& sStyleName : aCalcStyles)
 {
 try
     {
-const OUString 
sStyleName(OUString::createFromAscii(pCalcStyle));
 if (xCellStyles->hasByName(sStyleName))
 {
 css::uno::Reference xStyle(
commit 57dc0cbd8ebfe465f9e21a47c253a8437f8860a9
Author: Noel Grandin 
AuthorDate: Fri May 10 11:39:18 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon May 13 14:44:19 2024 +0200

do less OString->OUString conversion in tools datetime functions

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

diff --git a/include/tools/datetimeutils.hxx b/include/tools/datetimeutils.hxx
index 3df6229cb574..deb7d7ee4f4c 100644
--- a/include/tools/datetimeutils.hxx
+++ b/include/tools/datetimeutils.hxx
@@ -14,12 +14,14 @@
 
 // This function converts a 'DateTime' object to an 'OString' object
 TOOLS_DLLPUBLIC OString DateTimeToOString(const DateTime& rDateTime);
+// This function converts a 'DateTime' object to an 'OUString' object
+TOOLS_DLLPUBLIC OUString DateTimeToOUString(const DateTime& rDateTime);
 
 // This function converts a 'Date' object to an 'OString' object in ISO-8601 
representation
 TOOLS_DLLPUBLIC OString DateToOString(const Date& rDate);
 
-// This function converts a 'Date' object to an 'OString' object in DD/MM/

core.git: 3 commits - sccomp/qa sccomp/source scripting/source slideshow/qa slideshow/source

2024-05-13 Thread Noel Grandin (via logerrit)
 sccomp/qa/unit/SwarmSolverTest.cxx |   14 +-
 sccomp/qa/unit/solver.cxx  |6 
 sccomp/source/solver/CoinMPSolver.cxx  |2 
 sccomp/source/solver/LpsolveSolver.cxx |2 
 sccomp/source/solver/SolverComponent.cxx   |2 
 sccomp/source/solver/SwarmSolver.cxx   |   12 -
 scripting/source/basprov/basmethnode.cxx   |   18 +-
 scripting/source/basprov/basprov.cxx   |   22 +--
 scripting/source/basprov/basscript.cxx |8 -
 scripting/source/dlgprov/DialogModelProvider.cxx   |4 
 scripting/source/dlgprov/dlgevtatt.cxx |   28 ++--
 scripting/source/dlgprov/dlgprov.cxx   |   42 
+++---
 scripting/source/inc/util/MiscUtils.hxx|6 
 scripting/source/protocolhandler/scripthandler.cxx |   12 -
 scripting/source/provider/ActiveMSPList.cxx|8 -
 scripting/source/provider/BrowseNodeFactoryImpl.cxx|   12 -
 scripting/source/provider/MasterScriptProvider.cxx |   54 

 scripting/source/provider/MasterScriptProviderFactory.cxx  |4 
 scripting/source/provider/ProviderCache.cxx|2 
 scripting/source/provider/URIHelper.cxx|   12 -
 scripting/source/stringresource/stringresource.cxx |   50 
+++
 scripting/source/vbaevents/eventhelper.cxx |   58 

 slideshow/qa/engine/engine.cxx |2 
 slideshow/source/engine/animationnodes/animationaudionode.cxx  |8 -
 slideshow/source/engine/animationnodes/animationbasenode.cxx   |2 
 slideshow/source/engine/animationnodes/animationcommandnode.cxx|4 
 slideshow/source/engine/animationnodes/animationsetnode.cxx|2 
 slideshow/source/engine/animationnodes/animationtransformnode.cxx  |   10 -
 slideshow/source/engine/animationnodes/basecontainernode.cxx   |2 
 slideshow/source/engine/animationnodes/basenode.cxx|6 
 slideshow/source/engine/animationnodes/generateevent.cxx   |   18 +-
 slideshow/source/engine/animationnodes/paralleltimecontainer.cxx   |2 
 slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx |6 
 slideshow/source/engine/effectrewinder.cxx |   10 -
 slideshow/source/engine/eventmultiplexer.cxx   |   10 -
 slideshow/source/engine/opengl/TransitionImpl.cxx  |   20 +--
 slideshow/source/engine/opengl/TransitionerImpl.cxx|8 -
 slideshow/source/engine/rehearsetimingsactivity.cxx|4 
 slideshow/source/engine/shapes/backgroundshape.cxx |4 
 slideshow/source/engine/shapes/drawinglayeranimation.cxx   |   16 +-
 slideshow/source/engine/shapes/drawshape.cxx   |2 
 slideshow/source/engine/shapes/gdimtftools.cxx |   14 +-
 slideshow/source/engine/shapes/shapeimporter.cxx   |   40 
+++---
 slideshow/source/engine/shapes/viewappletshape.cxx |2 
 slideshow/source/engine/shapes/viewmediashape.cxx  |   20 +--
 slideshow/source/engine/slide/slideimpl.cxx|4 
 slideshow/source/engine/slide/targetpropertiescreator.cxx  |2 
 slideshow/source/engine/slideshowimpl.cxx  |   66 
+-
 slideshow/source/engine/slideview.cxx  |4 
 slideshow/source/engine/soundplayer.cxx|2 
 slideshow/source/engine/tools.cxx  |2 
 slideshow/source/engine/transitions/shapetransitionfactory.cxx |2 
 slideshow/source/engine/usereventqueue.cxx |2 
 slideshow/source/engine/wakeupevent.cxx|2 
 slideshow/source/inc/interruptabledelayevent.hxx   |2 
 55 files changed, 338 insertions(+), 340 deletions(-)

New commits:
commit b6652dae45a469bc0e357ff4755a92992b0856e9
Author: Noel Grandin 
AuthorDate: Mon May 13 09:52:26 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon May 13 14:44:04 2024 +0200

loplugin:ostr in slideshow

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

diff --git a/slideshow/qa/engine/engine.cxx b/slideshow/qa/engine/engine.cxx
index ee7f705713b5..6644ddae0d4c 100644
--- a/slideshow/qa/engine/engine.cxx
+++ b/slideshow/qa/engine/engine.cxx
@@ -24,7 +24,7 @@ class Test : public UnoApiTest
 {
 public:
 Test

core.git: tools/source

2024-05-13 Thread Noel Grandin (via logerrit)
 tools/source/fsys/urlobj.cxx |   62 +--
 1 file changed, 31 insertions(+), 31 deletions(-)

New commits:
commit 05d4420c5e3c87dc458dd775039b58fc2baa0489
Author: Noel Grandin 
AuthorDate: Fri May 10 10:26:27 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon May 13 13:05:57 2024 +0200

createFromAscii -> OUString literals in INetURLObject

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

diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index a962682863aa..9c27aea1de80 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -293,7 +293,7 @@ int INetURLObject::SubString::compare(SubString const & 
rOther,
 struct INetURLObject::SchemeInfo
 {
 OUString m_sScheme;
-char const * m_pPrefix;
+OUString m_aPrefix;
 bool m_bAuthority;
 bool m_bUser;
 bool m_bAuth;
@@ -350,89 +350,89 @@ INetURLObject::getSchemeInfo(INetProtocol eTheScheme)
 static o3tl::enumarray constexpr map = {
 // [-loplugin:redundantfcast]:
 SchemeInfo{
-EMPTY, "", false, false, false, false, false, false, false, false},
+EMPTY, u""_ustr, false, false, false, false, false, false, false, 
false},
 SchemeInfo{
-FTP, "ftp://;, true, true, false, true, true, true, true,
+FTP, u"ftp://"_ustr, true, true, false, true, true, true, true,
 false},
 SchemeInfo{
-HTTP, "http://;, true, false, false, false, true, true, true,
+HTTP, u"http://"_ustr, true, false, false, false, true, true, true,
 true},
 SchemeInfo{
-FILE1, "file://", true, false, false, false, true, false, true,
+FILE1, u"file://"_ustr, true, false, false, false, true, false, 
true,
 false},
 SchemeInfo{
-MAILTO, "mailto:;, false, false, false, false, false, false,
+MAILTO, u"mailto:"_ustr, false, false, false, false, false, false,
 false, true},
 SchemeInfo{
-VND_WEBDAV, "vnd.sun.star.webdav://", true, false,
+VND_WEBDAV, u"vnd.sun.star.webdav://"_ustr, true, false,
 false, false, true, true, true, true},
 SchemeInfo{
-PRIVATE, "private:", false, false, false, false, false, false,
+PRIVATE, u"private:"_ustr, false, false, false, false, false, 
false,
 false, true},
 SchemeInfo{
-VND_HELP, "vnd.sun.star.help://", true, false, false,
+VND_HELP, u"vnd.sun.star.help://"_ustr, true, false, false,
 false, false, false, true, true},
 SchemeInfo{
-HTTPS, "https://;, true, false, false, false, true, true,
+HTTPS, u"https://"_ustr, true, false, false, false, true, true,
 true, true},
 SchemeInfo{
-SLOT, "slot:", false, false, false, false, false, false, false,
+SLOT, u"slot:"_ustr, false, false, false, false, false, false, 
false,
 true},
 SchemeInfo{
-MACRO, "macro:", false, false, false, false, false, false,
+MACRO, u"macro:"_ustr, false, false, false, false, false, false,
 false, true},
 SchemeInfo{
-JAVASCRIPT, "javascript:", false, false, false, false, false,
+JAVASCRIPT, u"javascript:"_ustr, false, false, false, false, false,
 false, false, false},
 SchemeInfo{
-DATA, "data:", false, false, false, false, false, false, false,
+DATA, u"data:"_ustr, false, false, false, false, false, false, 
false,
 false},
 SchemeInfo{
-CID, "cid:", false, false, false, false, false, false, false,
+CID, u"cid:"_ustr, false, false, false, false, false, false, false,
 false},
 SchemeInfo{
-VND_HIER, "vnd.sun.star.hier:", true, false, false,
+VND_HIER, u"vnd.sun.star.hier:"_ustr, true, false, false,
 false, false, false, true, false},
 SchemeInfo{
-UNO, ".uno:", false, false, false, false, false, false, false,
+UNO, u".uno:"_ustr, false, false, false, false, false, false, 
false,
 true},
 SchemeInfo{
-COMPONENT, ".component:", false, false, false, false, false,
+COMPONENT, u".component:"_ustr, false, false, false, false, false,
 false, false, true},
 SchemeInfo{
-VND_PKG, "vnd.sun.sta

core.git: include/unotools unotools/source

2024-05-13 Thread Noel Grandin (via logerrit)
 include/unotools/fontdefs.hxx|2 -
 unotools/source/misc/fontcvt.cxx |   47 +++
 2 files changed, 24 insertions(+), 25 deletions(-)

New commits:
commit daf7e7dc3ee1a8ab0d519c1537b9bd83379b98ed
Author: Noel Grandin 
AuthorDate: Fri May 10 10:21:30 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon May 13 09:44:32 2024 +0200

createFromAscii -> OUString literals in ConvertChar

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

diff --git a/include/unotools/fontdefs.hxx b/include/unotools/fontdefs.hxx
index ef03e8887a4b..55b70808ceae 100644
--- a/include/unotools/fontdefs.hxx
+++ b/include/unotools/fontdefs.hxx
@@ -49,7 +49,7 @@ class UNLESS_MERGELIBS(UNOTOOLS_DLLPUBLIC) ConvertChar
 {
 public:
 const sal_Unicode*  mpCvtTab;
-const char* mpSubsFontName;
+OUStringmaSubsFontName;
 sal_Unicode (*mpCvtFunc)( sal_Unicode );
 sal_Unicode RecodeChar( sal_Unicode c ) const;
 voidRecodeString( OUString& rStra, sal_Int32 nIndex, 
sal_Int32 nLen ) const;
diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx
index 60d2edb7788b..df15d9fcdc6e 100644
--- a/unotools/source/misc/fontcvt.cxx
+++ b/unotools/source/misc/fontcvt.cxx
@@ -1256,9 +1256,9 @@ sal_Unicode ConvertChar::RecodeChar( sal_Unicode cChar ) 
const
 {
 cRetVal = mpCvtTab[ cIndex - 0x0020 ];
 
-if (!cRetVal && mpSubsFontName)
+if (!cRetVal && !maSubsFontName.isEmpty())
 {
-if ( IsOpenSymbol( OUString::createFromAscii(mpSubsFontName) ) 
)
+if ( IsOpenSymbol( maSubsFontName ) )
 {
 cRetVal = 0xE12C;
 SAL_WARN( "unotools.misc", "Forcing a bullet substitution 
from 0x" <<
@@ -1308,31 +1308,31 @@ const RecodeTable aStarSymbolRecodeTable[] =
 {
 // the first two entries must be StarMath and StarBats; do not reorder!
 // reason: see CreateFontToSubsFontConverter method
-{"starbats",{aStarBatsTab,  "StarSymbol", nullptr}},
-{"starmath",{aStarMathTab,  "StarSymbol", nullptr}},
-
-{"symbol",  {aAdobeSymbolTab, "StarSymbol", nullptr}},
-{"standardsymbols", {aAdobeSymbolTab, "StarSymbol", nullptr}},
-{"standardsymbolsl",{aAdobeSymbolTab, "StarSymbol", nullptr}},
-
-{"monotypesorts",   {aMonotypeSortsTab, "StarSymbol", nullptr}},
-//  {"monotypesorts2",  {aMonotypeSorts2Tab, "StarSymbol", NULL}}
-{"zapfdingbats",{aMonotypeSortsTab, "StarSymbol", nullptr}},  
//ZapfDingbats=MonotypeSorts-X?
-{"itczapfdingbats", {aMonotypeSortsTab, "StarSymbol", nullptr}},
-{"dingbats",{aMonotypeSortsTab, "StarSymbol", nullptr}},
-
-{"webdings",{aWebDingsTab,   "StarSymbol", nullptr}},
-{"wingdings",   {aWingDingsTab,  "StarSymbol", nullptr}},
-{"wingdings2",  {aWingDings2Tab, "StarSymbol", nullptr}},
-{"wingdings3",  {aWingDings3Tab, "StarSymbol", nullptr}},
-{"mtextra", {aMTExtraTab, "StarSymbol", nullptr}}
+{"starbats",{aStarBatsTab,  u"StarSymbol"_ustr, nullptr}},
+{"starmath",{aStarMathTab,  u"StarSymbol"_ustr, nullptr}},
+
+{"symbol",  {aAdobeSymbolTab, u"StarSymbol"_ustr, nullptr}},
+{"standardsymbols", {aAdobeSymbolTab, u"StarSymbol"_ustr, nullptr}},
+{"standardsymbolsl",{aAdobeSymbolTab, u"StarSymbol"_ustr, nullptr}},
+
+{"monotypesorts",   {aMonotypeSortsTab, u"StarSymbol"_ustr, nullptr}},
+//  {"monotypesorts2",  {aMonotypeSorts2Tab, u"StarSymbol"_ustr, NULL}}
+{"zapfdingbats",{aMonotypeSortsTab, u"StarSymbol"_ustr, nullptr}},  
//ZapfDingbats=MonotypeSorts-X?
+{"itczapfdingbats", {aMonotypeSortsTab, u"StarSymbol"_ustr, nullptr}},
+{"dingbats",{aMonotypeSortsTab, u"StarSymbol"_ustr, nullptr}},
+
+{"webdings",{aWebDingsTab,   u"StarSymbol"_ustr, nullptr}},
+{"wingdings",   {aWingDingsTab,  u"StarSymbol"_ustr, nullptr}},
+{"wingdings2",  {aWingDings2Tab, u"StarSymbol"_ustr, nullptr}},
+{"wingdings3",  {aWingDings3Tab, u"StarSymbol"_ustr, nullptr}},
+{"mtextra", {aMTExtraTab, u"Star

core.git: 3 commits - unoxml/source xmloff/inc xmloff/source

2024-05-13 Thread Noel Grandin (via logerrit)
 unoxml/source/rdf/CURI.cxx|  266 ++
 xmloff/inc/animations.hxx |2 
 xmloff/source/draw/animationexport.cxx|   48 ++---
 xmloff/source/draw/animationimport.cxx|4 
 xmloff/source/text/XMLIndexTOCContext.cxx |   20 +-
 5 files changed, 168 insertions(+), 172 deletions(-)

New commits:
commit f363b211a6b3900fbf26c7166f8b11b4de9f083f
Author: Noel Grandin 
AuthorDate: Fri May 10 10:11:44 2024 +0200
Commit: Noel Grandin 
CommitDate: Mon May 13 09:44:24 2024 +0200

createFromAscii -> OUString literals in CURI

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

diff --git a/unoxml/source/rdf/CURI.cxx b/unoxml/source/rdf/CURI.cxx
index 0de8bb97e9db..5a8575b6e738 100644
--- a/unoxml/source/rdf/CURI.cxx
+++ b/unoxml/source/rdf/CURI.cxx
@@ -85,630 +85,628 @@ css::uno::Sequence< OUString > SAL_CALL 
CURI::getSupportedServiceNames()
 return { "com.sun.star.rdf.URI" };
 }
 
-const char s_nsXSD  [] = "http://www.w3.org/2001/XMLSchema-datatypes#;;
-const char s_nsRDF  [] = "http://www.w3.org/1999/02/22-rdf-syntax-ns#;;
-const char s_nsRDFs [] = "http://www.w3.org/2000/01/rdf-schema#;;
-const char s_nsOWL  [] = "http://www.w3.org/2002/07/owl#;;
-const char s_nsPkg  [] =
-"http://docs.oasis-open.org/ns/office/1.2/meta/pkg#;;
-const char s_nsODF  [] =
-"http://docs.oasis-open.org/ns/office/1.2/meta/odf#;;
-const char s_nsLO_EXT   [] =
-"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0odf#";
+constexpr OUString s_nsXSD = 
u"http://www.w3.org/2001/XMLSchema-datatypes#"_ustr;
+constexpr OUString s_nsRDF = 
u"http://www.w3.org/1999/02/22-rdf-syntax-ns#"_ustr;
+constexpr OUString s_nsRDFs = u"http://www.w3.org/2000/01/rdf-schema#"_ustr;
+constexpr OUString s_nsOWL = u"http://www.w3.org/2002/07/owl#"_ustr;
+constexpr OUString s_nsPkg = 
u"http://docs.oasis-open.org/ns/office/1.2/meta/pkg#"_ustr;
+constexpr OUString s_nsODF = 
u"http://docs.oasis-open.org/ns/office/1.2/meta/odf#"_ustr;
+constexpr OUString s_nsLO_EXT =
+
u"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0odf#"_ustr;
 
 void CURI::initFromConstant(const sal_Int16 i_Constant)
 {
-const char *ns(nullptr);
-const char *ln(nullptr);
+OUString ns;
+OUString ln;
 switch (i_Constant)
 {
 case css::rdf::URIs::XSD_NCNAME:
 ns = s_nsXSD;
-ln = "NCName";
+ln = u"NCName"_ustr;
 break;
 
 case css::rdf::URIs::XSD_STRING:
 ns = s_nsXSD;
-ln = "string";
+ln = u"string"_ustr;
 break;
 
 case css::rdf::URIs::XSD_NORMALIZEDSTRING:
 ns = s_nsXSD;
-ln = "normalizedString";
+ln = u"normalizedString"_ustr;
 break;
 
 case css::rdf::URIs::XSD_BOOLEAN:
 ns = s_nsXSD;
-ln = "boolean";
+ln = u"boolean"_ustr;
 break;
 
 case css::rdf::URIs::XSD_DECIMAL:
 ns = s_nsXSD;
-ln = "decimal";
+ln = u"decimal"_ustr;
 break;
 
 case css::rdf::URIs::XSD_FLOAT:
 ns = s_nsXSD;
-ln = "float";
+ln = u"float"_ustr;
 break;
 
 case css::rdf::URIs::XSD_DOUBLE:
 ns = s_nsXSD;
-ln = "double";
+ln = u"double"_ustr;
 break;
 
 case css::rdf::URIs::XSD_INTEGER:
 ns = s_nsXSD;
-ln = "integer";
+ln = u"integer"_ustr;
 break;
 
 case css::rdf::URIs::XSD_NONNEGATIVEINTEGER:
 ns = s_nsXSD;
-ln = "nonNegativeInteger";
+ln = u"nonNegativeInteger"_ustr;
 break;
 
 case css::rdf::URIs::XSD_POSITIVEINTEGER:
 ns = s_nsXSD;
-ln = "positiveInteger";
+ln = u"positiveInteger"_ustr;
 break;
 
 case css::rdf::URIs::XSD_NONPOSITIVEINTEGER:
 ns = s_nsXSD;
-ln = "nonPositiveInteger";
+ln = u"nonPositiveInteger"_ustr;
 break;
 
 case css::rdf::URIs::XSD_NEGATIVEINTEGER:
 ns = s_nsXSD;
-ln = "negativeInteger";
+ln = u"negativeInteger"_ustr;
 break;
 
 case css::rdf::URIs::XSD_LONG:
 ns = s_nsXSD;
-ln = "long";
+ln = u"long"

core.git: vcl/unx

2024-05-12 Thread Noel Grandin (via logerrit)
 vcl/unx/gtk3/a11y/atktextattributes.cxx |   64 
 1 file changed, 32 insertions(+), 32 deletions(-)

New commits:
commit 24b178cfb6b35789e69d80857e73e911abe338a3
Author: Noel Grandin 
AuthorDate: Thu May 9 11:48:34 2024 +0200
Commit: Noel Grandin 
CommitDate: Sun May 12 20:26:23 2024 +0200

createFromAscii -> OUString literals in attribute_set_map_to_property_values

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

diff --git a/vcl/unx/gtk3/a11y/atktextattributes.cxx 
b/vcl/unx/gtk3/a11y/atktextattributes.cxx
index d34d0a3d9860..7f3e5a23ce1e 100644
--- a/vcl/unx/gtk3/a11y/atktextattributes.cxx
+++ b/vcl/unx/gtk3/a11y/atktextattributes.cxx
@@ -1306,42 +1306,42 @@ namespace {
 
 struct AtkTextAttrMapping
 {
-const char *  name;
-TextPropertyValueFunc const toPropertyValue;
+OUString  name;
+TextPropertyValueFunc toPropertyValue;
 };
 
 }
 
-const AtkTextAttrMapping g_TextAttrMap[] =
+constexpr AtkTextAttrMapping g_TextAttrMap[]
 {
-{ "", InvalidValue },   // ATK_TEXT_ATTR_INVALID = 0
-{ "ParaLeftMargin", UnitString2CMM },   // ATK_TEXT_ATTR_LEFT_MARGIN
-{ "ParaRightMargin", UnitString2CMM },  // ATK_TEXT_ATTR_RIGHT_MARGIN
-{ "ParaFirstLineIndent", UnitString2CMM },  // ATK_TEXT_ATTR_INDENT
-{ "CharHidden", String2Bool },  // ATK_TEXT_ATTR_INVISIBLE
-{ "", InvalidValue },   // ATK_TEXT_ATTR_EDITABLE
-{ "ParaTopMargin", UnitString2CMM },// 
ATK_TEXT_ATTR_PIXELS_ABOVE_LINES
-{ "ParaBottomMargin", UnitString2CMM }, // 
ATK_TEXT_ATTR_PIXELS_BELOW_LINES
-{ "", InvalidValue },   // 
ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP
-{ "", InvalidValue },   // ATK_TEXT_ATTR_BG_FULL_HEIGHT
-{ "", InvalidValue },   // ATK_TEXT_ATTR_RISE
-{ "CharUnderline", String2Underline },  // ATK_TEXT_ATTR_UNDERLINE
-{ "CharStrikeout", String2Strikeout },  // ATK_TEXT_ATTR_STRIKETHROUGH
-{ "CharHeight", String2Float }, // ATK_TEXT_ATTR_SIZE
-{ "CharScaleWidth", String2Scale }, // ATK_TEXT_ATTR_SCALE
-{ "CharWeight", String2Weight },// ATK_TEXT_ATTR_WEIGHT
-{ "CharLocale", String2Locale },// ATK_TEXT_ATTR_LANGUAGE
-{ "CharFontName",  SetString }, // ATK_TEXT_ATTR_FAMILY_NAME
-{ "CharBackColor", String2Color },  // ATK_TEXT_ATTR_BG_COLOR
-{ "CharColor", String2Color },  // ATK_TEXT_ATTR_FG_COLOR
-{ "", InvalidValue },   // ATK_TEXT_ATTR_BG_STIPPLE
-{ "", InvalidValue },   // ATK_TEXT_ATTR_FG_STIPPLE
-{ "", InvalidValue },   // ATK_TEXT_ATTR_WRAP_MODE
-{ "", InvalidValue },   // ATK_TEXT_ATTR_DIRECTION
-{ "ParaAdjust", Justification2Adjust }, // ATK_TEXT_ATTR_JUSTIFICATION
-{ "", InvalidValue },   // ATK_TEXT_ATTR_STRETCH
-{ "CharCaseMap", String2CaseMap },  // ATK_TEXT_ATTR_VARIANT
-{ "CharPosture", Style2FontSlant }  // ATK_TEXT_ATTR_STYLE
+{ u""_ustr, InvalidValue },   // ATK_TEXT_ATTR_INVALID 
= 0
+{ u"ParaLeftMargin"_ustr, UnitString2CMM },   // 
ATK_TEXT_ATTR_LEFT_MARGIN
+{ u"ParaRightMargin"_ustr, UnitString2CMM },  // 
ATK_TEXT_ATTR_RIGHT_MARGIN
+{ u"ParaFirstLineIndent"_ustr, UnitString2CMM },  // ATK_TEXT_ATTR_INDENT
+{ u"CharHidden"_ustr, String2Bool },  // 
ATK_TEXT_ATTR_INVISIBLE
+{ u""_ustr, InvalidValue },   // ATK_TEXT_ATTR_EDITABLE
+{ u"ParaTopMargin"_ustr, UnitString2CMM },// 
ATK_TEXT_ATTR_PIXELS_ABOVE_LINES
+{ u"ParaBottomMargin"_ustr, UnitString2CMM }, // 
ATK_TEXT_ATTR_PIXELS_BELOW_LINES
+{ u""_ustr, InvalidValue },   // 
ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP
+{ u""_ustr, InvalidValue },   // 
ATK_TEXT_ATTR_BG_FULL_HEIGHT
+{ u""_ustr, InvalidValue },   // ATK_TEXT_ATTR_RISE
+{ u"CharUnderline"_ustr, String2Underline },  // 
ATK_TEXT_ATTR_UNDERLINE
+{ u"CharStrikeout"_ustr, String2Strikeout },  // 
ATK_TEXT_ATTR_STRIKETHROUGH
+{ u"CharHeight"_ustr, String2Float }, // ATK_TEXT_ATTR_SIZE
+{ u"CharScaleWidth"_ustr, String2Scale }, // ATK_TEXT_

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

2024-05-12 Thread Noel Grandin (via logerrit)
 vcl/inc/graphic/GraphicFormatDetector.hxx |   64 +-
 vcl/source/filter/FilterConfigCache.cxx   |  106 +++---
 vcl/source/filter/FilterConfigCache.hxx   |2 
 3 files changed, 85 insertions(+), 87 deletions(-)

New commits:
commit 8701b4fd4ea9a006c97207bd542dd072f6a92b41
Author: Noel Grandin 
AuthorDate: Thu May 9 11:44:06 2024 +0200
Commit: Noel Grandin 
CommitDate: Sun May 12 20:26:08 2024 +0200

replace createFromAscii with OUString literals in FilterConfigCache

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

diff --git a/vcl/source/filter/FilterConfigCache.cxx 
b/vcl/source/filter/FilterConfigCache.cxx
index 85020ec607a4..56541992dc5d 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -192,66 +192,66 @@ void FilterConfigCache::ImplInit()
 }
 };
 
-const char* FilterConfigCache::InternalFilterListForSvxLight[] =
-{
-"bmp","1","SVBMP",
-"bmp","2","SVBMP",
-"dxf","1","SVDXF",
-"eps","1","SVIEPS",
-"eps","2","SVEEPS",
-"gif","1","SVIGIF",
-"gif","2","SVEGIF",
-"jpg","1","SVIJPEG",
-"jpg","2","SVEJPEG",
-"mov","1","SVMOV",
-"mov","2","SVMOV",
-"met","1","SVMET",
-"png","1","SVIPNG",
-"png","2","SVEPNG",
-"pct","1","SVPICT",
-"pcd","1","SVPCD",
-"psd","1","SVPSD",
-"pcx","1","SVPCX",
-"pbm","1","SVPBM",
-"pgm","1","SVPBM",
-"ppm","1","SVPBM",
-"ras","1","SVRAS",
-"svm","1","SVMETAFILE",
-"svm","2","SVMETAFILE",
-"tga","1","SVTGA",
-"tif","1","SVTIFF",
-"tif","2","SVTIFF",
-"emf","1","SVEMF",
-"emf","2","SVEMF",
-"wmf","1","SVWMF",
-"wmf","2","SVWMF",
-"xbm","1","SVIXBM",
-"xpm","1","SVIXPM",
-"svg","1","SVISVG",
-"svg","2","SVESVG",
-"webp","1","SVIWEBP",
-"webp","2","SVEWEBP",
-nullptr
+namespace {
+struct FilterEntry
+{
+OUString sExtension;
+sal_Int32 nFlags;
+OUString sUserData;
+};
+}
+constexpr FilterEntry InternalFilterListForSvxLight[]
+{
+{ u"bmp"_ustr, 1, u"SVBMP"_ustr },
+{ u"bmp"_ustr, 2, u"SVBMP"_ustr },
+{ u"dxf"_ustr, 1, u"SVDXF"_ustr },
+{ u"eps"_ustr, 1, u"SVIEPS"_ustr },
+{ u"eps"_ustr, 2, u"SVEEPS"_ustr },
+{ u"gif"_ustr, 1, u"SVIGIF"_ustr },
+{ u"gif"_ustr, 2, u"SVEGIF"_ustr },
+{ u"jpg"_ustr, 1, u"SVIJPEG"_ustr },
+{ u"jpg"_ustr, 2, u"SVEJPEG"_ustr },
+{ u"mov"_ustr, 1, u"SVMOV"_ustr },
+{ u"mov"_ustr, 2, u"SVMOV"_ustr },
+{ u"met"_ustr, 1, u"SVMET"_ustr },
+{ u"png"_ustr, 1, u"SVIPNG"_ustr },
+{ u"png"_ustr, 2, u"SVEPNG"_ustr },
+{ u"pct"_ustr, 1, u"SVPICT"_ustr },
+{ u"pcd"_ustr, 1, u"SVPCD"_ustr },
+{ u"psd"_ustr, 1, u"SVPSD"_ustr },
+{ u"pcx"_ustr, 1, u"SVPCX"_ustr },
+{ u"pbm"_ustr, 1, u"SVPBM"_ustr },
+{ u"pgm"_ustr, 1, u"SVPBM"_ustr },
+{ u"ppm"_ustr, 1, u"SVPBM"_ustr },
+{ u"ras"_ustr, 1, u"SVRAS"_ustr },
+{ u"svm"_ustr, 1, u"SVMETAFILE"_ustr },
+{ u"svm"_ustr, 2, u"SVMETAFILE"_ustr },
+{ u"tga"_ustr, 1, u"SVTGA"_ustr },
+{ u"tif"_ustr, 1, u"SVTIFF"_ustr },
+{ u"tif"_ustr, 2, u"SVTIFF"_ustr },
+{ u"emf"_ustr, 1, u"SVEMF"_ustr },
+ 

core.git: 2 commits - include/unotools svx/source unotools/source

2024-05-12 Thread Noel Grandin (via logerrit)
 include/unotools/configvaluecontainer.hxx   |8 +-
 svx/source/form/fmsrccfg.cxx|   70 
 unotools/source/config/configvaluecontainer.cxx |8 +-
 unotools/source/config/fontcfg.cxx  |   52 -
 4 files changed, 69 insertions(+), 69 deletions(-)

New commits:
commit cb08b5e8617ea7b278eef0acc0606585b294e1db
Author: Noel Grandin 
AuthorDate: Thu May 9 11:31:33 2024 +0200
Commit: Noel Grandin 
CommitDate: Sun May 12 17:01:23 2024 +0200

replace createFromAscii with OUString literals in DefaultFontConfiguration

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

diff --git a/unotools/source/config/fontcfg.cxx 
b/unotools/source/config/fontcfg.cxx
index 14bfb646fb75..a9b1556fbbea 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -48,36 +48,36 @@ using namespace com::sun::star::configuration;
  * DefaultFontConfiguration
  */
 
-static const char* getKeyType( DefaultFontType nKeyType )
+static OUString getKeyType( DefaultFontType nKeyType )
 {
 switch( nKeyType )
 {
-case DefaultFontType::CJK_DISPLAY: return "CJK_DISPLAY";
-case DefaultFontType::CJK_HEADING: return "CJK_HEADING";
-case DefaultFontType::CJK_PRESENTATION: return "CJK_PRESENTATION";
-case DefaultFontType::CJK_SPREADSHEET: return "CJK_SPREADSHEET";
-case DefaultFontType::CJK_TEXT: return "CJK_TEXT";
-case DefaultFontType::CTL_DISPLAY: return "CTL_DISPLAY";
-case DefaultFontType::CTL_HEADING: return "CTL_HEADING";
-case DefaultFontType::CTL_PRESENTATION: return "CTL_PRESENTATION";
-case DefaultFontType::CTL_SPREADSHEET: return "CTL_SPREADSHEET";
-case DefaultFontType::CTL_TEXT: return "CTL_TEXT";
-case DefaultFontType::FIXED: return "FIXED";
-case DefaultFontType::LATIN_DISPLAY: return "LATIN_DISPLAY";
-case DefaultFontType::LATIN_FIXED: return "LATIN_FIXED";
-case DefaultFontType::LATIN_HEADING: return "LATIN_HEADING";
-case DefaultFontType::LATIN_PRESENTATION: return "LATIN_PRESENTATION";
-case DefaultFontType::LATIN_SPREADSHEET: return "LATIN_SPREADSHEET";
-case DefaultFontType::LATIN_TEXT: return "LATIN_TEXT";
-case DefaultFontType::SANS: return "SANS";
-case DefaultFontType::SANS_UNICODE: return "SANS_UNICODE";
-case DefaultFontType::SERIF: return "SERIF";
-case DefaultFontType::SYMBOL: return "SYMBOL";
-case DefaultFontType::UI_FIXED: return "UI_FIXED";
-case DefaultFontType::UI_SANS: return "UI_SANS";
+case DefaultFontType::CJK_DISPLAY: return u"CJK_DISPLAY"_ustr;
+case DefaultFontType::CJK_HEADING: return u"CJK_HEADING"_ustr;
+case DefaultFontType::CJK_PRESENTATION: return u"CJK_PRESENTATION"_ustr;
+case DefaultFontType::CJK_SPREADSHEET: return u"CJK_SPREADSHEET"_ustr;
+case DefaultFontType::CJK_TEXT: return u"CJK_TEXT"_ustr;
+case DefaultFontType::CTL_DISPLAY: return u"CTL_DISPLAY"_ustr;
+case DefaultFontType::CTL_HEADING: return u"CTL_HEADING"_ustr;
+case DefaultFontType::CTL_PRESENTATION: return u"CTL_PRESENTATION"_ustr;
+case DefaultFontType::CTL_SPREADSHEET: return u"CTL_SPREADSHEET"_ustr;
+case DefaultFontType::CTL_TEXT: return u"CTL_TEXT"_ustr;
+case DefaultFontType::FIXED: return u"FIXED"_ustr;
+case DefaultFontType::LATIN_DISPLAY: return u"LATIN_DISPLAY"_ustr;
+case DefaultFontType::LATIN_FIXED: return u"LATIN_FIXED"_ustr;
+case DefaultFontType::LATIN_HEADING: return u"LATIN_HEADING"_ustr;
+case DefaultFontType::LATIN_PRESENTATION: return 
u"LATIN_PRESENTATION"_ustr;
+case DefaultFontType::LATIN_SPREADSHEET: return u"LATIN_SPREADSHEET"_ustr;
+case DefaultFontType::LATIN_TEXT: return u"LATIN_TEXT"_ustr;
+case DefaultFontType::SANS: return u"SANS"_ustr;
+case DefaultFontType::SANS_UNICODE: return u"SANS_UNICODE"_ustr;
+case DefaultFontType::SERIF: return u"SERIF"_ustr;
+case DefaultFontType::SYMBOL: return u"SYMBOL"_ustr;
+case DefaultFontType::UI_FIXED: return u"UI_FIXED"_ustr;
+case DefaultFontType::UI_SANS: return u"UI_SANS"_ustr;
 default:
 OSL_FAIL( "unmatched type" );
-return "";
+return u""_ustr;
 }
 }
 
@@ -188,7 +188,7 @@ OUString DefaultFontConfiguration::tryLocale( const 
OUString& rBcp47, const OUSt
 
 OUString DefaultFontConfiguration::getDefaultFont( const L

  1   2   3   4   5   6   7   8   9   10   >