core.git: sw/source
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
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
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'
New branch 'feature/gsoc24-lua' available with the following commits:
core.git: 2 commits - sc/source sw/source
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
/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
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
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
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
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
| 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
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
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
/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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
|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
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
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
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
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
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
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
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
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
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
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
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
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
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
core.git: 2 commits - svx/source tools/source
svx/source/tbxctrls/tbcontrl.cxx | 21 +++--- tools/source/fsys/urlobj.cxx | 124 +++ 2 files changed, 72 insertions(+), 73 deletions(-) New commits: commit 8b075d020ce25cff28a12fabad69d8677f7b8f2d Author: Noel Grandin AuthorDate: Wed May 8 21:50:58 2024 +0200 Commit: Noel Grandin CommitDate: Sun May 12 17:01:06 2024 +0200 replace createFromAscii with OUString literals in INetURLObject Change-Id: Ibad8181624afd745e2fa501cdcc7a5d915dfe6ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167544 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 611a14145dde..a962682863aa 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -308,8 +308,8 @@ struct INetURLObject::PrefixInfo { enum class Kind { Official, Internal, External }; // order is important! -char const * m_pPrefix; -char const * m_pTranslatedPrefix; +OUString m_aPrefix; +OUString m_aTranslatedPrefix; INetProtocol m_eScheme; Kind m_eKind; }; @@ -745,11 +745,11 @@ bool INetURLObject::setAbsURIRef(std::u16string_view rTheAbsURIRef, pPos = p; m_eScheme = pPrefix->m_eScheme; -char const * pTemp = pPrefix->m_eKind >= PrefixInfo::Kind::External ? - pPrefix->m_pTranslatedPrefix : - pPrefix->m_pPrefix; -m_aAbsURIRef.appendAscii(pTemp); -m_aScheme = SubString( 0, strstr(pTemp, ":") - pTemp ); +const OUString & rTemp = pPrefix->m_eKind >= PrefixInfo::Kind::External ? + pPrefix->m_aTranslatedPrefix : + pPrefix->m_aPrefix; +m_aAbsURIRef.append(rTemp); +m_aScheme = SubString( 0, rTemp.indexOf(':') ); } else { @@ -2152,7 +2152,7 @@ bool INetURLObject::convertIntToExt(std::u16string_view rTheIntURIRef, if (bConvert) { comphelper::string::replaceAt(aSynExtURIRef, 0, p - pBegin, -OUString::createFromAscii(pPrefix->m_pTranslatedPrefix)); +pPrefix->m_aTranslatedPrefix); } rTheExtURIRef = decode(aSynExtURIRef, eDecodeMechanism, eCharset); return bConvert; @@ -2175,7 +2175,7 @@ bool INetURLObject::convertExtToInt(std::u16string_view rTheExtURIRef, if (bConvert) { comphelper::string::replaceAt(aSynIntURIRef, 0, p - pBegin, -OUString::createFromAscii(pPrefix->m_pTranslatedPrefix)); +pPrefix->m_aTranslatedPrefix); } rTheIntURIRef = decode(aSynIntURIRef, eDecodeMechanism, eCharset); return bConvert; @@ -2185,83 +2185,83 @@ bool INetURLObject::convertExtToInt(std::u16string_view rTheExtURIRef, INetURLObject::PrefixInfo const * INetURLObject::getPrefix(sal_Unicode const *& rBegin, sal_Unicode const * pEnd) { -static PrefixInfo const aMap[] -= { // dummy entry at front needed, because pLast may point here: -{ nullptr, nullptr, INetProtocol::NotValid, PrefixInfo::Kind::Internal }, -{ ".component:", "staroffice.component:", INetProtocol::Component, +static PrefixInfo constexpr aMap[] + { // dummy entry at front needed, because pLast may point here: +{ u""_ustr, u""_ustr, INetProtocol::NotValid, PrefixInfo::Kind::Internal }, +{ u".component:"_ustr, u"staroffice.component:"_ustr, INetProtocol::Component, PrefixInfo::Kind::Internal }, -{ ".uno:", "staroffice.uno:", INetProtocol::Uno, +{ u".uno:"_ustr, u"staroffice.uno:"_ustr, INetProtocol::Uno, PrefixInfo::Kind::Internal }, -{ "cid:", nullptr, INetProtocol::Cid, PrefixInfo::Kind::Official }, -{ "data:", nullptr, INetProtocol::Data, PrefixInfo::Kind::Official }, -{ "db:", "staroffice.db:", INetProtocol::Db, PrefixInfo::Kind::Internal }, -{ "file:", nullptr, INetProtocol::File, PrefixInfo::Kind::Official }, -{ "ftp:", nullptr, INetProtocol::Ftp, PrefixInfo::Kind::Official }, -{ "hid:", "staroffice.hid:", INetProtocol::Hid, +{ u"cid:"_ustr, u""_ustr, INetProtocol::Cid, PrefixInfo::Kind::Official }, +{ u"data:"_ustr, u""_ustr, INetProtocol::Data, PrefixInfo::Kind::Official }, +{ u"db:"_ustr, u"staroffice.db:"_ustr, INetProtocol::Db, PrefixInfo::Kind::Internal }, +{ u"file:"_ustr, u""_ustr, INetProtoc
core.git: 2 commits - cui/source include/unotools sfx2/source svl/source
cui/source/customize/CustomNotebookbarGenerator.cxx |2 cui/source/dialogs/toolbarmodedlg.cxx |8 +-- include/unotools/confignode.hxx |5 - sfx2/source/appl/appserv.cxx|6 +- sfx2/source/notebookbar/SfxNotebookBar.cxx |4 - sfx2/source/sidebar/ResourceManager.cxx | 12 ++-- svl/source/items/srchitem.cxx | 52 7 files changed, 38 insertions(+), 51 deletions(-) New commits: commit 017045b6545a56c5980c63c80e04a80d502b21bb Author: Noel Grandin AuthorDate: Wed May 8 19:54:10 2024 +0200 Commit: Noel Grandin CommitDate: Sun May 12 12:58:21 2024 +0200 replace createFromAscii with OUString literals in SvxSearchItem Change-Id: Ie1dc68bd5c5550718103f9ecbbb2fa707c950ee3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167529 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx index 6aa7c36ddca2..5f37d07b7674 100644 --- a/svl/source/items/srchitem.cxx +++ b/svl/source/items/srchitem.cxx @@ -62,38 +62,30 @@ SfxPoolItem* SvxSearchItem::CreateDefault() { return new SvxSearchItem(0);} static Sequence< OUString > lcl_GetNotifyNames() { // names of transliteration relevant properties -static const char* aTranslitNames[] = +return { -"IsMatchCase", // 0 -"Japanese/IsMatchFullHalfWidthForms", // 1 -"Japanese/IsMatchHiraganaKatakana", // 2 -"Japanese/IsMatchContractions", // 3 -"Japanese/IsMatchMinusDashCho-on", // 4 -"Japanese/IsMatchRepeatCharMarks", // 5 -"Japanese/IsMatchVariantFormKanji", // 6 -"Japanese/IsMatchOldKanaForms", // 7 -"Japanese/IsMatch_DiZi_DuZu", // 8 -"Japanese/IsMatch_BaVa_HaFa", // 9 -"Japanese/IsMatch_TsiThiChi_DhiZi", // 10 -"Japanese/IsMatch_HyuIyu_ByuVyu", // 11 -"Japanese/IsMatch_SeShe_ZeJe", // 12 -"Japanese/IsMatch_IaIya", // 13 -"Japanese/IsMatch_KiKu",// 14 -"Japanese/IsIgnorePunctuation", // 15 -"Japanese/IsIgnoreWhitespace", // 16 -"Japanese/IsIgnoreProlongedSoundMark", // 17 -"Japanese/IsIgnoreMiddleDot", // 18 -"IsIgnoreDiacritics_CTL", // 19 -"IsIgnoreKashida_CTL" // 20 +u"IsMatchCase"_ustr, // 0 +u"Japanese/IsMatchFullHalfWidthForms"_ustr, // 1 +u"Japanese/IsMatchHiraganaKatakana"_ustr, // 2 +u"Japanese/IsMatchContractions"_ustr, // 3 +u"Japanese/IsMatchMinusDashCho-on"_ustr, // 4 +u"Japanese/IsMatchRepeatCharMarks"_ustr, // 5 +u"Japanese/IsMatchVariantFormKanji"_ustr, // 6 +u"Japanese/IsMatchOldKanaForms"_ustr, // 7 +u"Japanese/IsMatch_DiZi_DuZu"_ustr, // 8 +u"Japanese/IsMatch_BaVa_HaFa"_ustr, // 9 +u"Japanese/IsMatch_TsiThiChi_DhiZi"_ustr, // 10 +u"Japanese/IsMatch_HyuIyu_ByuVyu"_ustr, // 11 +u"Japanese/IsMatch_SeShe_ZeJe"_ustr, // 12 +u"Japanese/IsMatch_IaIya"_ustr, // 13 +u"Japanese/IsMatch_KiKu"_ustr,// 14 +u"Japanese/IsIgnorePunctuation"_ustr, // 15 +u"Japanese/IsIgnoreWhitespace"_ustr, // 16 +u"Japanese/IsIgnoreProlongedSoundMark"_ustr, // 17 +u"Japanese/IsIgnoreMiddleDot"_ustr, // 18 +u"IsIgnoreDiacritics_CTL"_ustr, // 19 + u"IsIgnoreKashida_CTL"_ustr // 20 }; - - const int nCount = SAL_N_ELEMENTS( aTranslitNames ); -Sequence< OUString > aNames( nCount ); -OUString* pNames = aNames.getArray(); -for (sal_Int32 i = 0; i < nCount; ++i) -pNames[i] = OUString::createFromAscii( aTranslitNames[i] ); - -return aNames; } commit 1ffe136bc2951c3be5005c1bc304ca7b9742fd78 Author: Noel Grandin AuthorDate: Wed May 8 11:33:18 2024 +0200 Commit: Noel Grandin CommitDate: Sun May 12 12:58:12 2024 +0200 replace createFromAscii with OUString literals in OConfigurationNode Change-Id: I487828fd11e1b22da2cc651b413f0744bf43b6d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167526 Tested-by: Jenkins
core.git: svx/source
svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx | 424 +++ 1 file changed, 212 insertions(+), 212 deletions(-) New commits: commit 744dfe387bc7512cd028b1de43b956bd0974377c Author: Noel Grandin AuthorDate: Wed May 8 21:24:11 2024 +0200 Commit: Noel Grandin CommitDate: Sun May 12 09:24:10 2024 +0200 replace createFromAscii with OUString literals in EnhancedCustomShapeTypeNames Change-Id: I69b89d7ee86c1d0b2dbdc4553cc12c01bdd76d1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167530 Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx b/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx index fe1db10f67c3..a6fcb11a60c1 100644 --- a/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx @@ -304,223 +304,223 @@ namespace { struct ACCNameTypeTable { -const char* pS; -const char* pE; +OUString pS; +OUString pE; }; } -const ACCNameTypeTable pACCNameTypeTableArray[] = +constexpr ACCNameTypeTable pACCNameTypeTableArray[] { -{ "non-primitive", "Non Primitive Shape" }, -{ "rectangle", "Rectangle" }, -{ "round-rectangle", "Rounded Rectangle" }, -{ "ellipse", "Ellipse" }, -{ "diamond", "Diamond" }, -{ "isosceles-triangle", "Triangle" }, -{ "right-triangle", "Right Triangle" }, -{ "parallelogram", "Parallelogram" }, -{ "trapezoid", "Trapezoid" }, -{ "hexagon", "Hexagon" }, -{ "octagon", "Octagon" }, -{ "cross", "Cross" }, -{ "star5", "5-Point Star" }, -{ "right-arrow", "Right Arrow" }, -//{ "mso-spt14", mso_sptThickArrow }, -{ "pentagon-right", "Pentagon" }, -{ "cube", "Cuboid" }, -{ "mso-spt21", "Doorplate" }, -/*{ "mso-spt17", mso_sptBalloon }, -{ "mso-spt18", mso_sptSeal }, -{ "mso-spt19", mso_sptArc }, -{ "mso-spt20", mso_sptLine }, -{ "mso-spt21", mso_sptPlaque }, -{ "can", mso_sptCan },*/ -{ "ring", "Ring" }, -/*{ "mso-spt24", mso_sptTextSimple }, -{ "mso-spt25", mso_sptTextOctagon }, -{ "mso-spt26", mso_sptTextHexagon }, -{ "mso-spt27", mso_sptTextCurve }, -{ "mso-spt28", mso_sptTextWave }, -{ "mso-spt29", mso_sptTextRing }, -{ "mso-spt30", mso_sptTextOnCurve }, -{ "mso-spt31", mso_sptTextOnRing }, -{ "mso-spt32", mso_sptStraightConnector1 }, -{ "mso-spt33", mso_sptBentConnector2 }, -{ "mso-spt34", mso_sptBentConnector3 }, -{ "mso-spt35", mso_sptBentConnector4 }, -{ "mso-spt36", mso_sptBentConnector5 }, -{ "mso-spt37", mso_sptCurvedConnector2 }, -{ "mso-spt38", mso_sptCurvedConnector3 }, -{ "mso-spt39", mso_sptCurvedConnector4 }, -{ "mso-spt40", mso_sptCurvedConnector5 }, -{ "mso-spt41", mso_sptCallout1 }, -{ "mso-spt42", mso_sptCallout2 }, -{ "mso-spt43", mso_sptCallout3 }, -{ "mso-spt44", mso_sptAccentCallout1 }, -{ "mso-spt45", mso_sptAccentCallout2 }, -{ "mso-spt46", mso_sptAccentCallout3 },*/ -{ "line-callout-1", "Line Callout 1" }, -{ "line-callout-2", "Line Callout 2" }, -/*{ "mso-spt49", mso_sptBorderCallout3 }, -{ "mso-spt50", mso_sptAccentBorderCallout1 }, -{ "mso-spt51", mso_sptAccentBorderCallout2 }, -{ "mso-spt52", mso_sptAccentBorderCallout3 }, -{ "mso-spt53", mso_sptRibbon }, -{ "mso-spt54", mso_sptRibbon2 },*/ -{ "chevron", "Chevron" }, -{ "pentagon", "Pentagon" }, -{ "forbidden", "'No' Symbol" }, -{ "star8", "8-Point Star" }, -/*{ "mso-spt59", mso_sptSeal16 }, -{ "mso-spt60", mso_sptSeal32 },*/ -{ "rectangular-callout", "Rectangular Callout" }, -{ "round-rectangular-callout", "Rounded Rectangular Callout" }, -{ "round-callout", "Round Callout" }, -//{ "mso-spt64", mso_sptWave }, -{ "paper", "Folded Corner" }, -{ "left-arrow", "Left Arrow" }, -{ "down-arrow", "Down Arrow" }, -{ "up-arrow", "Up Arrow&quo
core.git: 2 commits - sc/inc sc/source
sc/inc/colorscale.hxx |4 - sc/source/core/data/colorscale.cxx| 54 sc/source/filter/excel/xecontent.cxx |4 - sc/source/filter/excel/xeextlst.cxx | 10 +-- sc/source/filter/inc/xeextlst.hxx |4 - sc/source/filter/oox/condformatbuffer.cxx |4 - sc/source/filter/xml/editattributemap.cxx | 96 ++ sc/source/filter/xml/editattributemap.hxx |4 - sc/source/filter/xml/xmlcondformat.cxx|5 - sc/source/filter/xml/xmlexprt.cxx |7 -- 10 files changed, 94 insertions(+), 98 deletions(-) New commits: commit ad40932a04fe0b71669651675417765c82ccbb79 Author: Noel Grandin AuthorDate: Wed May 8 11:47:21 2024 +0200 Commit: Noel Grandin CommitDate: Sun May 12 09:23:47 2024 +0200 replace createFromAscii with OUString literals in ScIconSetFormat Change-Id: I5af0128c55608bf6192af4dc46f9476393a15afa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167528 Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx index 9e81360215e9..85b57bb6e7b9 100644 --- a/sc/inc/colorscale.hxx +++ b/sc/inc/colorscale.hxx @@ -216,7 +216,7 @@ enum ScIconSetType }; struct ScIconSetMap { -const char* pName; +OUString aName; ScIconSetType eType; sal_Int32 nElements; }; @@ -384,7 +384,7 @@ public: virtual Type GetType() const override; SC_DLLPUBLIC static const ScIconSetMap g_IconSetMap[]; -SC_DLLPUBLIC static const char* getIconSetName( ScIconSetType eType ); +SC_DLLPUBLIC static OUString getIconSetName( ScIconSetType eType ); static sal_Int32 getIconSetElements( ScIconSetType eType ); static OUString getIconName(ScIconSetType eType, sal_Int32 nIndex); static BitmapEx& getBitmap(sc::IconSetBitmapMap& rBitmapMap, ScIconSetType eType, sal_Int32 nIndex); diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index 963ee78c05d3..4df58b5269a6 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -1331,30 +1331,30 @@ double ScIconSetFormat::CalcValue(double nMin, double nMax, const ScIconSetForma return (*itr)->GetValue(); } -const ScIconSetMap ScIconSetFormat::g_IconSetMap[] = { -{ "3Arrows", IconSet_3Arrows, 3 }, -{ "3ArrowsGray", IconSet_3ArrowsGray, 3 }, -{ "3Flags", IconSet_3Flags, 3 }, -{ "3TrafficLights1", IconSet_3TrafficLights1, 3 }, -{ "3TrafficLights2", IconSet_3TrafficLights2, 3 }, -{ "3Signs", IconSet_3Signs, 3 }, -{ "3Symbols", IconSet_3Symbols, 3 }, -{ "3Symbols2", IconSet_3Symbols2, 3 }, -{ "3Smilies", IconSet_3Smilies, 3 }, -{ "3ColorSmilies", IconSet_3ColorSmilies, 3 }, -{ "3Stars", IconSet_3Stars, 3 }, -{ "3Triangles", IconSet_3Triangles, 3 }, -{ "4Arrows", IconSet_4Arrows, 4 }, -{ "4ArrowsGray", IconSet_4ArrowsGray, 4 }, -{ "4RedToBlack", IconSet_4RedToBlack, 4 }, -{ "4Rating", IconSet_4Rating, 4 }, -{ "4TrafficLights", IconSet_4TrafficLights, 4 }, -{ "5Arrows", IconSet_5Arrows, 5 }, -{ "5ArrowsGray", IconSet_5ArrowsGray, 5 }, -{ "5Rating", IconSet_5Ratings, 5 }, -{ "5Quarters", IconSet_5Quarters, 5 }, -{ "5Boxes", IconSet_5Boxes, 5 }, -{ nullptr, IconSet_3Arrows, 0 } +constexpr ScIconSetMap ScIconSetFormat::g_IconSetMap[] = { +{ u"3Arrows"_ustr, IconSet_3Arrows, 3 }, +{ u"3ArrowsGray"_ustr, IconSet_3ArrowsGray, 3 }, +{ u"3Flags"_ustr, IconSet_3Flags, 3 }, +{ u"3TrafficLights1"_ustr, IconSet_3TrafficLights1, 3 }, +{ u"3TrafficLights2"_ustr, IconSet_3TrafficLights2, 3 }, +{ u"3Signs"_ustr, IconSet_3Signs, 3 }, +{ u"3Symbols"_ustr, IconSet_3Symbols, 3 }, +{ u"3Symbols2"_ustr, IconSet_3Symbols2, 3 }, +{ u"3Smilies"_ustr, IconSet_3Smilies, 3 }, +{ u"3ColorSmilies"_ustr, IconSet_3ColorSmilies, 3 }, +{ u"3Stars"_ustr, IconSet_3Stars, 3 }, +{ u"3Triangles"_ustr, IconSet_3Triangles, 3 }, +{ u"4Arrows"_ustr, IconSet_4Arrows, 4 }, +{ u"4ArrowsGray"_ustr, IconSet_4ArrowsGray, 4 }, +{ u"4RedToBlack"_ustr, IconSet_4RedToBlack, 4 }, +{ u"4Rating"_ustr, IconSet_4Rating, 4 }, +{ u"4TrafficLights"_ustr, IconSet_4TrafficLights, 4 }, +{ u"5Arrows"_ustr, IconSet_5Arrows, 5 }, +{ u"5ArrowsGray"_ustr, IconSet_5ArrowsGray, 5 }, +{ u"5Rating"_ustr, IconSet_5Ratings, 5 }, +{ u"5Quarters"_ustr, IconSet_5Quarters, 5 }, +{ u"5Boxes"_ustr, IconSet_5Boxes, 5 }, +{ u""_us
core.git: connectivity/source cui/source dbaccess/source framework/source include/unotools reportdesign/source sfx2/source svx/source sw/source uui/source vcl/source
connectivity/source/commontools/DriversConfig.cxx|6 - connectivity/source/commontools/dbtools2.cxx |4 connectivity/source/drivers/jdbc/JConnection.cxx |2 cui/source/customize/CustomNotebookbarGenerator.cxx |2 cui/source/dialogs/toolbarmodedlg.cxx|2 cui/source/options/optsave.cxx | 14 +- dbaccess/source/ui/browser/unodatbr.cxx |2 dbaccess/source/ui/dlg/generalpage.cxx |2 framework/source/uielement/toolbarmodemenucontroller.cxx | 12 +- include/unotools/confignode.hxx |5 reportdesign/source/ui/report/propbrw.cxx|2 sfx2/source/appl/appserv.cxx | 14 +- sfx2/source/dialog/filtergrouping.cxx|6 - sfx2/source/notebookbar/SfxNotebookBar.cxx | 10 - sfx2/source/sidebar/ResourceManager.cxx | 76 +++ svx/source/form/databaselocationinput.cxx|2 svx/source/form/fmPropBrw.cxx|2 sw/source/ui/fldui/fldtdlg.cxx |3 uui/source/iahndl.cxx|4 vcl/source/app/settings.cxx |2 vcl/source/window/toolbox2.cxx |4 21 files changed, 85 insertions(+), 91 deletions(-) New commits: commit d4f07d4c08724602d0a13045bec957e285d45c0d Author: Noel Grandin AuthorDate: Wed May 8 11:24:50 2024 +0200 Commit: Noel Grandin CommitDate: Sat May 11 23:05:38 2024 +0200 replace createFromAscii with OUString literals in OConfigurationNode Change-Id: I19017bc993f0adafdae32313e0e01e69e1bbe80b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167517 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx index 3c5fe27e8327..fac2feb872ed 100644 --- a/connectivity/source/commontools/DriversConfig.cxx +++ b/connectivity/source/commontools/DriversConfig.cxx @@ -61,17 +61,17 @@ namespace return; OUString sParentURLPattern; -aURLPatternNode.getNodeValue("ParentURLPattern") >>= sParentURLPattern; +aURLPatternNode.getNodeValue(u"ParentURLPattern"_ustr) >>= sParentURLPattern; if ( !sParentURLPattern.isEmpty() ) lcl_readURLPatternNode(_aInstalled,sParentURLPattern,_rInstalledDriver); OUString sDriverFactory; -aURLPatternNode.getNodeValue("Driver") >>= sDriverFactory; +aURLPatternNode.getNodeValue(u"Driver"_ustr) >>= sDriverFactory; if ( !sDriverFactory.isEmpty() ) _rInstalledDriver.sDriverFactory = sDriverFactory; OUString sDriverTypeDisplayName; -aURLPatternNode.getNodeValue("DriverTypeDisplayName") >>= sDriverTypeDisplayName; +aURLPatternNode.getNodeValue(u"DriverTypeDisplayName"_ustr) >>= sDriverTypeDisplayName; OSL_ENSURE(!sDriverTypeDisplayName.isEmpty(),"No valid DriverTypeDisplayName property!"); if ( !sDriverTypeDisplayName.isEmpty() ) _rInstalledDriver.sDriverTypeDisplayName = sDriverTypeDisplayName; diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index e6088c513711..8590878dbcf6 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -947,7 +947,7 @@ OUString getDefaultReportEngineServiceName(const Reference< XComponentContext >& if ( aReportEngines.isValid() ) { OUString sDefaultReportEngineName; -aReportEngines.getNodeValue("DefaultReportEngine") >>= sDefaultReportEngineName; +aReportEngines.getNodeValue(u"DefaultReportEngine"_ustr) >>= sDefaultReportEngineName; if ( !sDefaultReportEngineName.isEmpty() ) { ::utl::OConfigurationNode aReportEngineNames = aReportEngines.openNode(u"ReportEngineNames"_ustr); @@ -957,7 +957,7 @@ OUString getDefaultReportEngineServiceName(const Reference< XComponentContext >& if ( aReportEngine.isValid() ) { OUString sRet; -aReportEngine.getNodeValue("ServiceName") >>= sRet; +aReportEngine.getNodeValue(u"ServiceName"_ustr) >>= sRet; return sRet; } } diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx index ed92faf87dba..00a868d92595 100644 --- a/connectivity/source/drivers/jdbc/JConnection.cxx +++ b/connectivity/source/
core.git: 2 commits - connectivity/source cui/source framework/source include/unotools sfx2/source uui/source
connectivity/source/commontools/dbtools2.cxx |2 - cui/source/customize/CustomNotebookbarGenerator.cxx |4 +- framework/source/uiconfiguration/imagemanagerimpl.cxx | 28 +- include/unotools/confignode.hxx |5 --- sfx2/source/dialog/filtergrouping.cxx |4 +- sfx2/source/notebookbar/SfxNotebookBar.cxx|2 - uui/source/iahndl.cxx |2 - 7 files changed, 21 insertions(+), 26 deletions(-) New commits: commit 9dac3118ee80bea900cede71e4ef616bad165401 Author: Noel Grandin AuthorDate: Wed May 8 10:36:51 2024 +0200 Commit: Noel Grandin CommitDate: Sat May 11 23:05:30 2024 +0200 replace createFromAscii with OUString literals in OConfigurationNode Change-Id: I6029cd4c894c6ab079cc508ba15df41ec5d4f8db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167516 Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index f43cd2f77d89..e6088c513711 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -950,7 +950,7 @@ OUString getDefaultReportEngineServiceName(const Reference< XComponentContext >& aReportEngines.getNodeValue("DefaultReportEngine") >>= sDefaultReportEngineName; if ( !sDefaultReportEngineName.isEmpty() ) { -::utl::OConfigurationNode aReportEngineNames = aReportEngines.openNode("ReportEngineNames"); +::utl::OConfigurationNode aReportEngineNames = aReportEngines.openNode(u"ReportEngineNames"_ustr); if ( aReportEngineNames.isValid() ) { ::utl::OConfigurationNode aReportEngine = aReportEngineNames.openNode(sDefaultReportEngineName); diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx b/cui/source/customize/CustomNotebookbarGenerator.cxx index 20610dc9b096..df065fb81e7b 100644 --- a/cui/source/customize/CustomNotebookbarGenerator.cxx +++ b/cui/source/customize/CustomNotebookbarGenerator.cxx @@ -258,7 +258,7 @@ Sequence CustomNotebookbarGenerator::getCustomizedUIItem(OUString sNot const utl::OConfigurationTreeRoot aAppNode(::comphelper::getProcessComponentContext(), aPath, false); -const utl::OConfigurationNode aModesNode = aAppNode.openNode("Modes"); +const utl::OConfigurationNode aModesNode = aAppNode.openNode(u"Modes"_ustr); const utl::OConfigurationNode aModeNode(aModesNode.openNode(sNotebookbarConfigType)); const Any aValue = aModeNode.getNodeValue("UIItemProperties"); Sequence aValues; @@ -272,7 +272,7 @@ void CustomNotebookbarGenerator::setCustomizedUIItem(const Sequence& r OUString aPath = getAppNameRegistryPath(); const utl::OConfigurationTreeRoot aAppNode(::comphelper::getProcessComponentContext(), aPath, true); -const utl::OConfigurationNode aModesNode = aAppNode.openNode("Modes"); +const utl::OConfigurationNode aModesNode = aAppNode.openNode(u"Modes"_ustr); const utl::OConfigurationNode aModeNode(aModesNode.openNode(rNotebookbarConfigType)); css::uno::Any aUIItemProperties(rUIItemProperties); diff --git a/include/unotools/confignode.hxx b/include/unotools/confignode.hxx index 946825aa4821..c95acd8bdbdb 100644 --- a/include/unotools/confignode.hxx +++ b/include/unotools/confignode.hxx @@ -81,11 +81,6 @@ namespace utl */ OConfigurationNode openNode(const OUString& _rPath) const noexcept; -OConfigurationNode openNode( const char* _pAsciiPath ) const -{ -return openNode( OUString::createFromAscii( _pAsciiPath ) ); -} - /** create a new child node If the object represents a set node, this method may be used to create a new child. For non-set-nodes, the diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx index e4f210c59765..dfa9d0295466 100644 --- a/sfx2/source/dialog/filtergrouping.cxx +++ b/sfx2/source/dialog/filtergrouping.cxx @@ -254,7 +254,7 @@ namespace sfx2 // go for all the single class entries OConfigurationNode aFilterClassesNode = -_rFilterClassification.openNode( "GlobalFilters/Classes" ); +_rFilterClassification.openNode( u"GlobalFilters/Classes"_ustr ); const Sequence< OUString > aFilterClasses = aFilterClassesNode.getNodeNames(); ::std::for_each( aFilterClasses.begin(), @@ -298,7 +298,7 @@ namespace sfx2 // the node for the local classes OConfigurationNode aFilterClassesNode = -_rFilterClassification.openNode( "LocalFilters/Class
core.git: forms/source
forms/source/component/clickableimage.cxx |2 forms/source/helper/controlfeatureinterception.cxx |4 - forms/source/helper/formnavigation.cxx | 81 - forms/source/helper/urltransformer.cxx |6 - forms/source/inc/controlfeatureinterception.hxx|2 forms/source/inc/formnavigation.hxx|4 - forms/source/inc/frm_strings.hxx | 24 -- forms/source/inc/urltransformer.hxx|5 - 8 files changed, 39 insertions(+), 89 deletions(-) New commits: commit f2545fffcbdd9d88a57abd4842719b40d0ed45ec Author: Noel Grandin AuthorDate: Wed May 8 09:56:13 2024 +0200 Commit: Noel Grandin CommitDate: Sat May 11 19:27:55 2024 +0200 replace createFromAscii with OUString literals in ControlFeatureInterception Change-Id: If0fbaafbaa318ec541341fde723f92f3e8e92cfa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167510 Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index 6ab579072e1b..9d57272274a0 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -233,7 +233,7 @@ namespace frm case FormButtonType_SUBMIT: { // if some outer component can provide an interaction handler, use it -Reference< XInteractionHandler > xHandler( m_aFeatureInterception.queryDispatch( "private:/InteractionHandler" ), UNO_QUERY ); +Reference< XInteractionHandler > xHandler( m_aFeatureInterception.queryDispatch( u"private:/InteractionHandler"_ustr ), UNO_QUERY ); try { implSubmit( rEvt, xHandler ); diff --git a/forms/source/helper/controlfeatureinterception.cxx b/forms/source/helper/controlfeatureinterception.cxx index e8a4ebb337d3..c83b61308395 100644 --- a/forms/source/helper/controlfeatureinterception.cxx +++ b/forms/source/helper/controlfeatureinterception.cxx @@ -133,9 +133,9 @@ namespace frm } -Reference< XDispatch > ControlFeatureInterception::queryDispatch( const char* _pAsciiURL ) +Reference< XDispatch > ControlFeatureInterception::queryDispatch( const OUString& _rURL ) { -return queryDispatch( m_pUrlTransformer->getStrictURLFromAscii( _pAsciiURL ) ); +return queryDispatch( m_pUrlTransformer->getStrictURL( _rURL ) ); } diff --git a/forms/source/helper/formnavigation.cxx b/forms/source/helper/formnavigation.cxx index a43287463b40..8178382d5fb5 100644 --- a/forms/source/helper/formnavigation.cxx +++ b/forms/source/helper/formnavigation.cxx @@ -364,11 +364,11 @@ namespace frm bool OFormNavigationMapper::getFeatureURL( sal_Int16 _nFeatureId, URL& /* [out] */ _rURL ) { // get the ascii version of the URL -const char* pAsciiURL = getFeatureURLAscii( _nFeatureId ); +std::optional pAsciiURL = getFeatureURL( _nFeatureId ); if ( pAsciiURL ) -_rURL = m_pUrlTransformer->getStrictURLFromAscii( pAsciiURL ); +_rURL = m_pUrlTransformer->getStrictURL( *pAsciiURL ); -return ( pAsciiURL != nullptr ); +return pAsciiURL.has_value(); } @@ -377,65 +377,50 @@ namespace frm struct FeatureURL { const sal_Int16 nFormFeature; -const char* pAsciiURL; - -FeatureURL( const sal_Int16 _nFormFeature, const char* _pAsciiURL ) -:nFormFeature( _nFormFeature ) -,pAsciiURL( _pAsciiURL ) -{ -} +OUString aAsciiURL; }; -const FeatureURL* lcl_getFeatureTable() +constexpr FeatureURL s_aFeatureURLs[] { -static const FeatureURL s_aFeatureURLs[] = -{ -FeatureURL( FormFeature::MoveAbsolute, URL_FORM_POSITION ), -FeatureURL( FormFeature::TotalRecords, URL_FORM_RECORDCOUNT ), -FeatureURL( FormFeature::MoveToFirst, URL_RECORD_FIRST ), -FeatureURL( FormFeature::MoveToPrevious, URL_RECORD_PREV ), -FeatureURL( FormFeature::MoveToNext, URL_RECORD_NEXT ), -FeatureURL( FormFeature::MoveToLast, URL_RECORD_LAST ), -FeatureURL( FormFeature::SaveRecordChanges, URL_RECORD_SAVE ), -FeatureURL( FormFeature::UndoRecordChanges, URL_RECORD_UNDO ), -FeatureURL( FormFeature::MoveToInsertRow, URL_RECORD_NEW ), -FeatureURL( FormFeature::DeleteRecord, URL_RECORD_DELETE ), -FeatureURL( FormFeature::ReloadForm, URL_FORM_REFRESH ), -FeatureURL( FormFea
core.git: 2 commits - dbaccess/source
dbaccess/source/ui/browser/unodatbr.cxx| 16 dbaccess/source/ui/control/opendoccontrols.cxx | 21 + dbaccess/source/ui/dlg/generalpage.cxx |2 +- dbaccess/source/ui/inc/opendoccontrols.hxx |5 + 4 files changed, 15 insertions(+), 29 deletions(-) New commits: commit b4f2dbe6001109a61f009fc0df74f14071ac8645 Author: Noel Grandin AuthorDate: Tue May 7 14:39:41 2024 +0200 Commit: Noel Grandin CommitDate: Sat May 11 18:16:46 2024 +0200 replace createFromAscii with OUString literals in OpenDocumentButton Change-Id: I989f5f82fe65e0f877d86b7eb98ba8ad57147988 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167509 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx index f8b9d6721ab6..bb2558afd435 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -52,12 +52,8 @@ namespace dbaui using ::com::sun::star::ui::XImageManager; using ::com::sun::star::graphic::XGraphic; -Reference< XGraphic> GetCommandIcon( const char* _pCommandURL, const OUString& _rModuleName ) +Reference< XGraphic> GetCommandIcon( const OUString& sCommandURL, const OUString& _rModuleName ) { -if ( !_pCommandURL || !*_pCommandURL ) -return nullptr; - -OUString sCommandURL = OUString::createFromAscii( _pCommandURL ); try { do @@ -94,24 +90,17 @@ namespace dbaui // OpenButton -OpenDocumentButton::OpenDocumentButton(std::unique_ptr xControl, const char* _pAsciiModuleName) -: m_xControl(std::move(xControl)) +OpenDocumentButton::OpenDocumentButton(std::unique_ptr xControl, const OUString& _rAsciiModuleName) +: m_sModule( _rAsciiModuleName ) +, m_xControl(std::move(xControl)) { -impl_init( _pAsciiModuleName ); -} - -void OpenDocumentButton::impl_init( const char* _pAsciiModuleName ) -{ -OSL_ENSURE( _pAsciiModuleName, "OpenDocumentButton::impl_init: invalid module name!" ); -m_sModule = OUString::createFromAscii( _pAsciiModuleName ); - // our label should equal the UI text of the "Open" command auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(u".uno:Open"_ustr, m_sModule); OUString sLabel(vcl::CommandInfoProvider::GetLabelForCommand(aProperties)); m_xControl->set_label(" " + sLabel.replaceAll("~", "")); // Place icon left of text and both centered in the button. -m_xControl->set_image(GetCommandIcon(".uno:Open", m_sModule)); +m_xControl->set_image(GetCommandIcon(u".uno:Open"_ustr, m_sModule)); } // OpenDocumentListBox diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 03887054becb..bd87bb8a0f1b 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -453,7 +453,7 @@ namespace dbaui , m_xEmbeddedDBType(m_xBuilder->weld_combo_box(u"embeddeddbList"_ustr)) , m_xFT_DocListLabel(m_xBuilder->weld_label(u"docListLabel"_ustr)) , m_xLB_DocumentList(new OpenDocumentListBox(m_xBuilder->weld_combo_box(u"documentList"_ustr), "com.sun.star.sdb.OfficeDatabaseDocument")) -, m_xPB_OpenDatabase(new OpenDocumentButton(m_xBuilder->weld_button(u"openDatabase"_ustr), "com.sun.star.sdb.OfficeDatabaseDocument")) +, m_xPB_OpenDatabase(new OpenDocumentButton(m_xBuilder->weld_button(u"openDatabase"_ustr), u"com.sun.star.sdb.OfficeDatabaseDocument"_ustr)) , m_xFT_NoEmbeddedDBLabel(m_xBuilder->weld_label(u"noembeddeddbLabel"_ustr)) , m_eOriginalCreationMode(eCreateNew) , m_bInitEmbeddedDBList(true) diff --git a/dbaccess/source/ui/inc/opendoccontrols.hxx b/dbaccess/source/ui/inc/opendoccontrols.hxx index 8448a047dc7b..d0bfe63e8214 100644 --- a/dbaccess/source/ui/inc/opendoccontrols.hxx +++ b/dbaccess/source/ui/inc/opendoccontrols.hxx @@ -38,13 +38,10 @@ namespace dbaui std::unique_ptr m_xControl; public: -OpenDocumentButton(std::unique_ptr xControl, const char* _pAsciiModuleName); +OpenDocumentButton(std::unique_ptr xControl, const OUString& _rAsciiModuleName); void set_sensitive(bool bSensitive) { m_xControl->set_sensitive(bSensitive); } void connect_clicked(const Link& rLink) { m_xControl->connect_clicked(rLink); } - - private: -voidimpl_init( const char* _pAsciiModuleName ); }; // OpenDocumentListBox commit 1ea8e12e50579c
core.git: framework/source
framework/source/uiconfiguration/CommandImageResolver.cxx | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 89d35be82851d820f36e31ac1866b1d58be0aa07 Author: Noel Grandin AuthorDate: Wed May 8 10:01:08 2024 +0200 Commit: Noel Grandin CommitDate: Sat May 11 15:04:15 2024 +0200 replace createFromAscii with OUString literals in CommandImageResolver Change-Id: I668062d2e6e220be16e3aa74b01db281d54876ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167511 Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/framework/source/uiconfiguration/CommandImageResolver.cxx b/framework/source/uiconfiguration/CommandImageResolver.cxx index a431ae320b35..e6c0c8ba850d 100644 --- a/framework/source/uiconfiguration/CommandImageResolver.cxx +++ b/framework/source/uiconfiguration/CommandImageResolver.cxx @@ -21,11 +21,11 @@ namespace vcl namespace { -const o3tl::enumarray ImageType_Prefixes = +constexpr o3tl::enumarray ImageType_Prefixes { -"cmd/sc_", -"cmd/lc_", -"cmd/32/" +u"cmd/sc_"_ustr, +u"cmd/lc_"_ustr, +u"cmd/32/"_ustr }; OUString lclConvertToCanonicalName(const OUString& rFileName) @@ -129,7 +129,7 @@ ImageList* CommandImageResolver::getImageList(ImageType nImageType) if (!m_pImageList[nImageType]) { -OUString sIconPath = OUString::createFromAscii(ImageType_Prefixes[nImageType]); +OUString sIconPath = ImageType_Prefixes[nImageType]; m_pImageList[nImageType].reset( new ImageList(m_aImageNameVector, sIconPath) ); }
core.git: 2 commits - dbaccess/source pyuno/source vcl/source
dbaccess/source/filter/xml/xmlfilter.cxx |8 +++- pyuno/source/module/pyuno_module.cxx | 27 +++ vcl/source/image/ImplImageTree.cxx | 14 -- 3 files changed, 26 insertions(+), 23 deletions(-) New commits: commit 0652885ffeddac94c47fe7c53a58c172a63f9d56 Author: Noel Grandin AuthorDate: Tue May 7 14:28:40 2024 +0200 Commit: Noel Grandin CommitDate: Sat May 11 14:50:40 2024 +0200 replace createFromAscii with OUString literals in ReadThroughComponent Change-Id: Ic92b15ea369e420faf6bfc40f509bba6e454710f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167500 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index 06b6db1edd95..18a1d223df86 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -125,12 +125,11 @@ static ErrCode ReadThroughComponent( static ErrCode ReadThroughComponent( const uno::Reference< embed::XStorage >& xStorage, const uno::Reference& xModelComponent, -const char* pStreamName, +const OUString& sStreamName, const uno::Reference & rxContext, ODBFilter& _rFilter) { OSL_ENSURE( xStorage.is(), "Need storage!"); -OSL_ENSURE(nullptr != pStreamName, "Please, please, give me a name!"); if ( !xStorage ) // TODO/LATER: better error handling @@ -141,7 +140,6 @@ static ErrCode ReadThroughComponent( try { // open stream (and set parser input) -OUString sStreamName = OUString::createFromAscii(pStreamName); if ( !xStorage->hasByName( sStreamName ) || !xStorage->isStreamElement( sStreamName ) ) { // stream name not found! return immediately with OK signal @@ -323,7 +321,7 @@ bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) uno::Reference xModel(GetModel()); ErrCode nRet = ReadThroughComponent( xStorage ,xModel -,"settings.xml" +,u"settings.xml"_ustr ,GetComponentContext() ,*this ); @@ -331,7 +329,7 @@ bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) if ( nRet == ERRCODE_NONE ) nRet = ReadThroughComponent( xStorage ,xModel -,"content.xml" +,u"content.xml"_ustr ,GetComponentContext() ,*this ); commit ed699baa9226f94d912cd2646ed8e2ce37bb1869 Author: Noel Grandin AuthorDate: Fri May 10 21:51:11 2024 +0200 Commit: Noel Grandin CommitDate: Sat May 11 14:50:28 2024 +0200 workaround clang segfault on macos-intel Change-Id: Icfced4a990e2d02995bff4078f14b8ee26e9cca3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167497 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index 2a70e80285fe..53527df35780 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -196,21 +196,24 @@ void fillStruct( } } -OUString getLibDir() +OUString getLibDir(); +OUString getLibDirImpl() { -static OUString sLibDir = []() { -OUString libDir; +OUString libDir; -// workarounds the $(ORIGIN) until it is available -if (Module::getUrlFromAddress(reinterpret_cast(getLibDir), libDir)) -{ -libDir = libDir.copy(0, libDir.lastIndexOf('/')); -OUString name(u"PYUNOLIBDIR"_ustr); -rtl_bootstrap_set(name.pData, libDir.pData); -} -return libDir; -}(); +// workarounds the $(ORIGIN) until it is available +if (Module::getUrlFromAddress(reinterpret_cast(getLibDir), libDir)) +{ +libDir = libDir.copy(0, libDir.lastIndexOf('/')); +OUString name(u"PYUNOLIBDIR"_ustr); +rtl_bootstrap_set(name.pData, libDir.pData); +} +return libDir; +} +OUString getLibDir() +{ +static OUString sLibDir = getLibDirImpl(); return sLibDir; } diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index 55fb4ee2f349..f565461f8607 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -108,15 +108,17 @@ OUString createPath(std::u16string_view name, sal_Int32 pos, std::u16string_view return OUString::Concat(name.substr(0, pos + 1)) + locale + name.substr(pos); } +OUString get
core.git: dbaccess/source
dbaccess/source/ui/app/subcomponentmanager.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 6b513772e558e2982d1dc4a56626b0e4303f5869 Author: Noel Grandin AuthorDate: Tue May 7 14:33:27 2024 +0200 Commit: Noel Grandin CommitDate: Sat May 11 12:43:09 2024 +0200 replace createFromAscii with OUString literals in SubComponentManager Change-Id: I165b93ff8986f288b03fb001e8ceda12b5076872 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167502 Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx index 9b390d97ba47..de97525bcb48 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.cxx +++ b/dbaccess/source/ui/app/subcomponentmanager.cxx @@ -307,14 +307,14 @@ namespace dbaui return bSuccess; } -void lcl_notifySubComponentEvent( const SubComponentManager_Data& _rData, const char* _pAsciiEventName, +void lcl_notifySubComponentEvent( const SubComponentManager_Data& _rData, const OUString& _rAsciiEventName, const SubComponentDescriptor& _rComponent ) { try { Reference< XDocumentEventBroadcaster > xBroadcaster( _rData.m_rController.getModel(), UNO_QUERY_THROW ); xBroadcaster->notifyDocumentEvent( -OUString::createFromAscii( _pAsciiEventName ), +_rAsciiEventName, &_rData.m_rController, Any( _rComponent.xFrame ) ); @@ -397,7 +397,7 @@ namespace dbaui if ( aClosedComponent.is() ) { aGuard.clear(); -lcl_notifySubComponentEvent( *m_pData, "OnSubComponentClosed", aClosedComponent ); +lcl_notifySubComponentEvent( *m_pData, u"OnSubComponentClosed"_ustr, aClosedComponent ); } } @@ -474,7 +474,7 @@ namespace dbaui // notify this to interested parties aGuard.clear(); -lcl_notifySubComponentEvent( *m_pData, "OnSubComponentOpened", aElement ); +lcl_notifySubComponentEvent( *m_pData, u"OnSubComponentOpened"_ustr, aElement ); } bool SubComponentManager::activateSubFrame( const OUString& _rName, const sal_Int32 _nComponentType,
core.git: 2 commits - dbaccess/inc dbaccess/source
dbaccess/inc/core_resource.hxx |4 ++-- dbaccess/source/core/api/RowSet.cxx |2 +- dbaccess/source/core/dataaccess/databasedocument.cxx |4 ++-- dbaccess/source/core/resource/core_resource.cxx |8 dbaccess/source/ui/browser/dbloader.cxx | 16 5 files changed, 17 insertions(+), 17 deletions(-) New commits: commit 9e8fd61044aa290e9c809fa4472f2406202dc881 Author: Noel Grandin AuthorDate: Tue May 7 14:26:40 2024 +0200 Commit: Noel Grandin CommitDate: Sat May 11 12:43:02 2024 +0200 replace createFromAscii with OUString literals in ResourceManager Change-Id: Iea6430d5f56a1f30a5dd168fcf2fee2ba7198f18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167499 Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/dbaccess/inc/core_resource.hxx b/dbaccess/inc/core_resource.hxx index 000a59bf1713..e806c398d297 100644 --- a/dbaccess/inc/core_resource.hxx +++ b/dbaccess/inc/core_resource.hxx @@ -57,9 +57,9 @@ namespace dbaccess */ static OUString loadString( TranslateId pResId, -const char* _pPlaceholderAscii1, +std::u16string_view _rPlaceholderAscii1, std::u16string_view _rReplace1, -const char* _pPlaceholderAscii2, +std::u16string_view _rPlaceholderAscii2, std::u16string_view _rReplace2 ); }; diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index a65e842e8557..56bdcb3435be 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -2180,7 +2180,7 @@ Reference< XConnection > ORowSet::calcConnection(const Reference< XInteractionH { Any aError = ::cppu::getCaughtException(); OUString sMessage = ResourceManager::loadString( RID_NO_SUCH_DATA_SOURCE, -"$name$", m_aDataSourceName, "$error$", extractExceptionMessage( m_aContext, aError ) ); +u"$name$", m_aDataSourceName, u"$error$", extractExceptionMessage( m_aContext, aError ) ); ::dbtools::throwGenericSQLException( sMessage, *this, aError ); } } diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 117e49300c7d..5e0bb346b572 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -993,8 +993,8 @@ void ODatabaseDocument::impl_throwIOExceptionCausedBySave_throw( const Any& i_rE OUString sErrorMessage = extractExceptionMessage( m_pImpl->m_aContext, i_rError ); sErrorMessage = ResourceManager::loadString( RID_STR_ERROR_WHILE_SAVING, -"$location$", i_rTargetURL, -"$message$", sErrorMessage +u"$location$", i_rTargetURL, +u"$message$", sErrorMessage ); throw IOException( sErrorMessage, *const_cast< ODatabaseDocument* >( this ) ); } diff --git a/dbaccess/source/core/resource/core_resource.cxx b/dbaccess/source/core/resource/core_resource.cxx index fdef07e1f8f8..8a0bba5b67de 100644 --- a/dbaccess/source/core/resource/core_resource.cxx +++ b/dbaccess/source/core/resource/core_resource.cxx @@ -28,12 +28,12 @@ namespace dbaccess return Translate::get(pResId, Translate::Create("dba")); } -OUString ResourceManager::loadString(TranslateId pResId, const char* _pPlaceholderAscii1, std::u16string_view _rReplace1, -const char* _pPlaceholderAscii2, std::u16string_view _rReplace2) +OUString ResourceManager::loadString(TranslateId pResId, std::u16string_view _rPlaceholderAscii1, std::u16string_view _rReplace1, +std::u16string_view _rPlaceholderAscii2, std::u16string_view _rReplace2) { OUString sString(loadString(pResId)); -sString = sString.replaceFirst( OUString::createFromAscii(_pPlaceholderAscii1), _rReplace1 ); -sString = sString.replaceFirst( OUString::createFromAscii(_pPlaceholderAscii2), _rReplace2 ); +sString = sString.replaceFirst( _rPlaceholderAscii1, _rReplace1 ); +sString = sString.replaceFirst( _rPlaceholderAscii2, _rReplace2 ); return sString; } } commit 3908d2aa90df3f600fdf2acd9f570b895669feab Author: Noel Grandin AuthorDate: Tue May 7 14:34:32 2024 +0200 Commit: Noel Grandin CommitDate: Sat May 11 12:42:53 2024 +0200 replace createFromAscii with OUString literals in DBContentLoader Change-Id: Iaa1169be4ab9db824af4406dd18e6c36326bdcd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167503 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cx
core.git: 2 commits - dbaccess/source
dbaccess/source/core/misc/dsntypes.cxx|4 +-- dbaccess/source/inc/dsntypes.hxx |2 - dbaccess/source/ui/app/AppDetailView.cxx | 24 +++--- dbaccess/source/ui/app/AppDetailView.hxx |2 - dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx |2 - dbaccess/source/ui/dlg/generalpage.cxx|2 - 6 files changed, 18 insertions(+), 18 deletions(-) New commits: commit 40b89a47890eb706939f4d75d11c6eceee300841 Author: Noel Grandin AuthorDate: Tue May 7 14:32:24 2024 +0200 Commit: Noel Grandin CommitDate: Sat May 11 12:41:37 2024 +0200 replace createFromAscii with OUString literals in OApplicationDetailView Change-Id: Icb7961ad247711e6a3b4761e7d6922ba7e4848a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167501 Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index ecd8a8dce7ee..a9613e1b4b36 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -48,8 +48,8 @@ using namespace ::com::sun::star::beans; using ::com::sun::star::util::URL; using ::com::sun::star::sdb::application::NamedDatabaseObject; -TaskEntry::TaskEntry( const char* _pAsciiUNOCommand, TranslateId _pHelpID, TranslateId pTitleResourceID, bool _bHideWhenDisabled ) -:sUNOCommand( OUString::createFromAscii( _pAsciiUNOCommand ) ) +TaskEntry::TaskEntry( const OUString& _rAsciiUNOCommand, TranslateId _pHelpID, TranslateId pTitleResourceID, bool _bHideWhenDisabled ) +:sUNOCommand( _rAsciiUNOCommand ) ,pHelpID( _pHelpID ) ,sTitle( DBA_RES(pTitleResourceID) ) ,bHideWhenDisabled( _bHideWhenDisabled ) @@ -259,28 +259,28 @@ void OApplicationDetailView::impl_fillTaskPaneData(ElementType _eType, TaskPaneD switch ( _eType ) { case E_TABLE: -rList.emplace_back( ".uno:DBNewTable", RID_STR_TABLES_HELP_TEXT_DESIGN, RID_STR_NEW_TABLE ); -rList.emplace_back( ".uno:DBNewTableAutoPilot", RID_STR_TABLES_HELP_TEXT_WIZARD, RID_STR_NEW_TABLE_AUTO ); -rList.emplace_back( ".uno:DBNewView", RID_STR_VIEWS_HELP_TEXT_DESIGN, RID_STR_NEW_VIEW, true ); +rList.emplace_back( u".uno:DBNewTable"_ustr, RID_STR_TABLES_HELP_TEXT_DESIGN, RID_STR_NEW_TABLE ); +rList.emplace_back( u".uno:DBNewTableAutoPilot"_ustr, RID_STR_TABLES_HELP_TEXT_WIZARD, RID_STR_NEW_TABLE_AUTO ); +rList.emplace_back( u".uno:DBNewView"_ustr, RID_STR_VIEWS_HELP_TEXT_DESIGN, RID_STR_NEW_VIEW, true ); _rData.pTitleId = RID_STR_TABLES_CONTAINER; break; case E_FORM: -rList.emplace_back( ".uno:DBNewForm", RID_STR_FORMS_HELP_TEXT, RID_STR_NEW_FORM ); -rList.emplace_back( ".uno:DBNewFormAutoPilot", RID_STR_FORMS_HELP_TEXT_WIZARD, RID_STR_NEW_FORM_AUTO ); +rList.emplace_back( u".uno:DBNewForm"_ustr, RID_STR_FORMS_HELP_TEXT, RID_STR_NEW_FORM ); +rList.emplace_back( u".uno:DBNewFormAutoPilot"_ustr, RID_STR_FORMS_HELP_TEXT_WIZARD, RID_STR_NEW_FORM_AUTO ); _rData.pTitleId = RID_STR_FORMS_CONTAINER; break; case E_REPORT: -rList.emplace_back( ".uno:DBNewReport", RID_STR_REPORT_HELP_TEXT, RID_STR_NEW_REPORT, true ); -rList.emplace_back( ".uno:DBNewReportAutoPilot", RID_STR_REPORTS_HELP_TEXT_WIZARD, RID_STR_NEW_REPORT_AUTO ); +rList.emplace_back( u".uno:DBNewReport"_ustr, RID_STR_REPORT_HELP_TEXT, RID_STR_NEW_REPORT, true ); +rList.emplace_back( u".uno:DBNewReportAutoPilot"_ustr, RID_STR_REPORTS_HELP_TEXT_WIZARD, RID_STR_NEW_REPORT_AUTO ); _rData.pTitleId = RID_STR_REPORTS_CONTAINER; break; case E_QUERY: -rList.emplace_back( ".uno:DBNewQuery", RID_STR_QUERIES_HELP_TEXT, RID_STR_NEW_QUERY ); -rList.emplace_back( ".uno:DBNewQueryAutoPilot", RID_STR_QUERIES_HELP_TEXT_WIZARD, RID_STR_NEW_QUERY_AUTO ); -rList.emplace_back( ".uno:DBNewQuerySql", RID_STR_QUERIES_HELP_TEXT_SQL, RID_STR_NEW_QUERY_SQL ); +rList.emplace_back( u".uno:DBNewQuery"_ustr, RID_STR_QUERIES_HELP_TEXT, RID_STR_NEW_QUERY ); +rList.emplace_back( u".uno:DBNewQueryAutoPilot"_ustr, RID_STR_QUERIES_HELP_TEXT_WIZARD, RID_STR_NEW_QUERY_AUTO ); +rList.emplace_back( u".uno:DBNewQuerySql"_ustr, RID_STR_QUERIES_HELP_TEXT_SQL, RID_STR_NEW_QUERY_SQL ); _rData.pTitleId = RID_STR_QUERIES_CONTAINER; break; diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx index f074df4401f7..18c572b1a957 100644 --- a/dbaccess/source/ui/app/AppDetailView.hxx +++ b/dbaccess/source/ui/app/AppDetailView.hxx @@ -47,7 +47,7 @@ namespace dbaui // If an
core.git: include/svx svx/inc svx/qa svx/source
| 56 +- svx/source/unodraw/unomtabl.cxx| 4 svx/source/unodraw/unopage.cxx | 6 svx/source/unodraw/unopool.cxx | 8 svx/source/unodraw/unoprov.cxx | 2 svx/source/unodraw/unoshap2.cxx| 64 +- svx/source/unodraw/unoshap4.cxx| 30 - svx/source/unodraw/unoshape.cxx| 16 svx/source/unodraw/unoshcol.cxx| 4 svx/source/unodraw/unoshtxt.cxx| 2 svx/source/unodraw/unottabl.cxx| 4 svx/source/unogallery/unogalitem.cxx | 16 svx/source/unogallery/unogaltheme.cxx | 4 svx/source/unogallery/unogalthemeprovider.cxx | 4 svx/source/xml/xmleohlp.cxx| 8 svx/source/xml/xmlgrhlp.cxx| 30 - svx/source/xml/xmlxtexp.cxx| 8 svx/source/xml/xmlxtimp.cxx| 14 svx/source/xoutdev/_xoutbmp.cxx| 4 svx/source/xoutdev/xattr.cxx | 12 svx/source/xoutdev/xattrbmp.cxx| 4 svx/source/xoutdev/xtabcolr.cxx| 2 svx/source/xoutdev/xtable.cxx | 4 256 files changed, 2636 insertions(+), 2597 deletions(-) New commits: commit bc91cc47505c448ded7297074ccff809b59e8ed1 Author: Noel Grandin AuthorDate: Fri May 10 13:18:59 2024 +0200 Commit: Noel Grandin CommitDate: Sat May 11 12:41:09 2024 +0200 loplugin:ostr in svx Change-Id: Ia765a03e033acb82e367873380d289587ea87d6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167449 Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/include/svx/ClassificationField.hxx b/include/svx/ClassificationField.hxx index e2b5a71ab775..4e2633d0392b 100644 --- a/include/svx/ClassificationField.hxx +++ b/include/svx/ClassificationField.hxx @@ -36,7 +36,7 @@ public: OUString msIdentifier; //< The identifier of this entry (from example.xml). ClassificationResult(ClassificationType eType, OUString sName, - OUString sAbbreviatedName, OUString sIdentifier = "") + OUString sAbbreviatedName, OUString sIdentifier = u""_ustr) : meType(eType) , msName(std::move(sName)) , msAbbreviatedName(std::move(sAbbreviatedName)) diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx index 8eadfa366e66..6890e23fc78b 100644 --- a/include/svx/hdft.hxx +++ b/include/svx/hdft.hxx @@ -113,8 +113,8 @@ class SVX_DLLPUBLIC DeleteHeaderDialog final : public weld::MessageDialogControl { public: DeleteHeaderDialog(weld::Widget* pParent) -: MessageDialogController(pParent, "svx/ui/deleteheaderdialog.ui", -"DeleteHeaderDialog") +: MessageDialogController(pParent, u"svx/ui/deleteheaderdialog.ui"_ustr, +u"DeleteHeaderDialog"_ustr) { } }; @@ -123,8 +123,8 @@ class SVX_DLLPUBLIC DeleteFooterDialog final : public weld::MessageDialogControl { public: DeleteFooterDialog(weld::Widget* pParent) -: MessageDialogController(pParent, "svx/ui/deletefooterdialog.ui", -"DeleteFooterDialog") +: MessageDialogController(pParent, u"svx/ui/deletefooterdialog.ui"_ustr, +u"DeleteFooterDialog"_ustr) { } }; diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index f775c1099917..aa73fb57e5c2 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -377,7 +377,7 @@ public: virtual VclPtr CreateSvxNewDictionaryDialog(weld::Window* pParent) = 0; virtual VclPtr CreateSvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName) = 0; virtual VclPtr CreateSvxNameDialog(weld::Window* pParent, -const OUString& rName, const OUString& rDesc, const OUString& rTitle = "" ) = 0; +const OUString& rName, const OUString& rDesc, const OUString& rTitle = u""_ustr ) = 0; // #i68101# virtual VclPtr CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName)
core.git: dbaccess/source
dbaccess/source/core/dataaccess/ModelImpl.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit e0635101b42657ec1c12f961fccff9604f577efa Author: Noel Grandin AuthorDate: Tue May 7 14:04:20 2024 +0200 Commit: Noel Grandin CommitDate: Sat May 11 09:22:49 2024 +0200 replace createFromAscii with OUString literals in ODatabaseModelImpl Change-Id: I861bf52bb49a54ec546a4465fb9053a5ebdaa641 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167491 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index 2ab07a8e6c20..78f1693ebc97 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -457,17 +457,17 @@ namespace { OUString lcl_getContainerStorageName_throw( ODatabaseModelImpl::ObjectType _eType ) { -const char* pAsciiName( nullptr ); +OUString sName; switch ( _eType ) { -case ODatabaseModelImpl::ObjectType::Form: pAsciiName = "forms"; break; -case ODatabaseModelImpl::ObjectType::Report: pAsciiName = "reports"; break; -case ODatabaseModelImpl::ObjectType::Query: pAsciiName = "queries"; break; -case ODatabaseModelImpl::ObjectType::Table: pAsciiName = "tables"; break; +case ODatabaseModelImpl::ObjectType::Form: sName = u"forms"_ustr; break; +case ODatabaseModelImpl::ObjectType::Report: sName = u"reports"_ustr; break; +case ODatabaseModelImpl::ObjectType::Query: sName = u"queries"_ustr; break; +case ODatabaseModelImpl::ObjectType::Table: sName = u"tables"_ustr; break; default: throw RuntimeException(); } -return OUString::createFromAscii( pAsciiName ); +return sName; } bool lcl_hasObjectWithMacros_throw( const ODefinitionContainer_Impl& _rObjectDefinitions, const Reference< XStorage >& _rxContainerStorage )
core.git: 2 commits - dbaccess/source
dbaccess/source/core/dataaccess/databasedocument.cxx | 19 +--- dbaccess/source/core/dataaccess/databasedocument.hxx |6 - dbaccess/source/core/dataaccess/documentevents.cxx | 73 --- 3 files changed, 42 insertions(+), 56 deletions(-) New commits: commit d1f3e9af6a71150da95b48dbcd81451806332812 Author: Noel Grandin AuthorDate: Tue May 7 14:19:25 2024 +0200 Commit: Noel Grandin CommitDate: Sat May 11 09:22:40 2024 +0200 replace createFromAscii with OUString literals in DocumentEvents Change-Id: I5cf5401afafc1c6d2d72445e898903c95288531b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167494 Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/dbaccess/source/core/dataaccess/documentevents.cxx b/dbaccess/source/core/dataaccess/documentevents.cxx index c7070fa58c72..35d54727e31b 100644 --- a/dbaccess/source/core/dataaccess/documentevents.cxx +++ b/dbaccess/source/core/dataaccess/documentevents.cxx @@ -41,55 +41,48 @@ namespace dbaccess // helper struct DocumentEventData { -const char* pAsciiEventName; +OUStringaAsciiEventName; boolbNeedsSyncNotify; }; -const DocumentEventData* lcl_getDocumentEventData() -{ -static const DocumentEventData s_aData[] = { -{ "OnCreate", true }, -{ "OnLoadFinished", true }, -{ "OnNew", false },// compatibility, see https://bz.apache.org/ooo/show_bug.cgi?id=46484 -{ "OnLoad", false },// compatibility, see https://bz.apache.org/ooo/show_bug.cgi?id=46484 -{ "OnSaveAs", true }, -{ "OnSaveAsDone", false }, -{ "OnSaveAsFailed", false }, -{ "OnSave", true }, -{ "OnSaveDone", false }, -{ "OnSaveFailed", false }, -{ "OnSaveTo", true }, -{ "OnSaveToDone", false }, -{ "OnSaveToFailed", false }, -{ "OnPrepareUnload",true }, -{ "OnUnload", true }, -{ "OnFocus",false }, -{ "OnUnfocus", false }, -{ "OnModifyChanged",false }, -{ "OnViewCreated", false }, -{ "OnPrepareViewClosing", true }, -{ "OnViewClosed", false }, -{ "OnTitleChanged", false }, -{ "OnSubComponentOpened", false }, -{ "OnSubComponentClosed", false }, -{ nullptr, false } -}; -return s_aData; -} +constexpr DocumentEventData s_DocumentEventData[] { +{ u"OnCreate"_ustr, true }, +{ u"OnLoadFinished"_ustr, true }, +{ u"OnNew"_ustr, false },// compatibility, see https://bz.apache.org/ooo/show_bug.cgi?id=46484 +{ u"OnLoad"_ustr, false },// compatibility, see https://bz.apache.org/ooo/show_bug.cgi?id=46484 +{ u"OnSaveAs"_ustr, true }, +{ u"OnSaveAsDone"_ustr, false }, +{ u"OnSaveAsFailed"_ustr, false }, +{ u"OnSave"_ustr, true }, +{ u"OnSaveDone"_ustr, false }, +{ u"OnSaveFailed"_ustr, false }, +{ u"OnSaveTo"_ustr, true }, +{ u"OnSaveToDone"_ustr, false }, +{ u"OnSaveToFailed"_ustr, false }, +{ u"OnPrepareUnload"_ustr,true }, +{ u"OnUnload"_ustr, true }, +{ u"OnFocus"_ustr,false }, +{ u"OnUnfocus"_ustr, false }, +{ u"OnModifyChanged"_ustr,false }, +{ u"OnViewCreated"_ustr, false }, +{ u"OnPrepareViewClosing"_ustr, true }, +{ u"OnViewClosed"_ustr, false }, +{ u"OnTitleChanged"_ustr, false }, +{ u"OnSubComponentOpened"_ustr, false }, +{ u"OnSubComponentClosed"_ustr, false }, +}; } // DocumentEvents Document
core.git: dbaccess/source
dbaccess/source/core/dataaccess/databasedocument.cxx | 36 +++--- dbaccess/source/core/dataaccess/documenteventnotifier.hxx | 32 2 files changed, 18 insertions(+), 50 deletions(-) New commits: commit 14f65dc1ad3dc7bdc2e8638b5fb0130f8f22eaaa Author: Noel Grandin AuthorDate: Tue May 7 14:15:03 2024 +0200 Commit: Noel Grandin CommitDate: Fri May 10 21:53:55 2024 +0200 replace createFromAscii with OUString literals in DocumentEventNotifier Change-Id: I6987033a461ec91b59de8e2aabef513471f887f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167493 Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 82c1b66954cc..413b53a0f763 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -124,7 +124,7 @@ bool ViewMonitor::onSetCurrentController( const Reference< XController >& _rxCon // notify the respective events if ( bLoadFinished ) -m_rEventNotifier.notifyDocumentEventAsync( m_bIsNewDocument ? "OnNew" : "OnLoad" ); +m_rEventNotifier.notifyDocumentEventAsync( m_bIsNewDocument ? u"OnNew"_ustr : u"OnLoad"_ustr, nullptr, Any() ); return bLoadFinished; } @@ -480,12 +480,12 @@ void SAL_CALL ODatabaseDocument::initNew( ) impl_setInitialized(); -m_aEventNotifier.notifyDocumentEventAsync( "OnTitleChanged" ); +m_aEventNotifier.notifyDocumentEventAsync( u"OnTitleChanged"_ustr, nullptr, Any() ); impl_setModified_nothrow( false, aGuard ); // <- SYNCHRONIZED -m_aEventNotifier.notifyDocumentEvent( "OnCreate" ); +m_aEventNotifier.notifyDocumentEvent( u"OnCreate"_ustr, nullptr, Any() ); impl_notifyStorageChange_nolck_nothrow( xTempStor ); } @@ -763,7 +763,7 @@ bool ODatabaseDocument::impl_attachResource( const OUString& i_rLogicalDocumentU _rDocGuard.clear(); // <- SYNCHRONIZED -m_aEventNotifier.notifyDocumentEvent( "OnLoadFinished" ); +m_aEventNotifier.notifyDocumentEvent( u"OnLoadFinished"_ustr, nullptr, Any() ); } return true; @@ -808,7 +808,7 @@ void SAL_CALL ODatabaseDocument::connectController( const Reference< XController m_aControllers.push_back( _xController ); -m_aEventNotifier.notifyDocumentEventAsync( "OnViewCreated", Reference< XController2 >( _xController, UNO_QUERY ) ); +m_aEventNotifier.notifyDocumentEventAsync( u"OnViewCreated"_ustr, Reference< XController2 >( _xController, UNO_QUERY ), Any() ); bool bFirstControllerEver = m_aViewMonitor.onControllerConnected( _xController ); if ( !bFirstControllerEver ) @@ -845,7 +845,7 @@ void SAL_CALL ODatabaseDocument::disconnectController( const Reference< XControl // <- SYNCHRONIZED if ( bNotifyViewClosed ) -m_aEventNotifier.notifyDocumentEvent( "OnViewClosed", Reference< XController2 >( _xController, UNO_QUERY ) ); +m_aEventNotifier.notifyDocumentEvent( u"OnViewClosed"_ustr, Reference< XController2 >( _xController, UNO_QUERY ), Any() ); if ( !bLastControllerGone || bIsClosing ) return; @@ -1013,7 +1013,7 @@ void ODatabaseDocument::impl_storeAs_throw( const OUString& _rURL, const ::comph if ( !bIsInitializationProcess ) { _rGuard.clear(); -m_aEventNotifier.notifyDocumentEvent( _eType == SAVE ? "OnSave" : "OnSaveAs", nullptr, Any( _rURL ) ); +m_aEventNotifier.notifyDocumentEvent( _eType == SAVE ? u"OnSave"_ustr : u"OnSaveAs"_ustr, nullptr, Any( _rURL ) ); _rGuard.reset(); } @@ -1073,13 +1073,13 @@ void ODatabaseDocument::impl_storeAs_throw( const OUString& _rURL, const ::comph catch( const IOException& ) { if ( !bIsInitializationProcess ) -m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? "OnSaveFailed" : "OnSaveAsFailed", nullptr, Any( _rURL ) ); +m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? u"OnSaveFailed"_ustr : u"OnSaveAsFailed"_ustr, nullptr, Any( _rURL ) ); throw; } catch( const RuntimeException& ) { if ( !bIsInitializationProcess ) -m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? "OnSaveFailed" : "OnSaveAsFailed", nullptr, Any( _rURL ) ); +m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? u"OnSaveFailed"_ustr : u"OnSaveAsFailed"_ustr, nullptr, Any( _rURL ) ); throw; } catch( const Exception& ) @@ -1088,14 +1088,14 @@ void ODatabaseDocument::impl
core.git: cui/source
cui/source/options/optpath.cxx | 35 --- 1 file changed, 16 insertions(+), 19 deletions(-) New commits: commit 3563fca550f678a6797769cd3b5e529e95ca7e36 Author: Noel Grandin AuthorDate: Tue May 7 13:57:38 2024 +0200 Commit: Noel Grandin CommitDate: Fri May 10 19:55:57 2024 +0200 replace createFromAscii with OUString literals in SvxPathTabPage Change-Id: I831bc78f4934c7d1c137ad70c7bb189d75237e88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167473 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index e81d12043ed2..6357989e5fb9 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -92,42 +92,39 @@ struct PathUserData_Impl struct Handle2CfgNameMapping_Impl { SvtPathOptions::Paths m_nHandle; -const char* m_pCfgName; +OUString m_aCfgName; }; } -Handle2CfgNameMapping_Impl const Hdl2CfgMap_Impl[] = +constexpr Handle2CfgNameMapping_Impl Hdl2CfgMap_Impl[] { -{ SvtPathOptions::Paths::AutoCorrect, "AutoCorrect" }, -{ SvtPathOptions::Paths::AutoText,"AutoText" }, -{ SvtPathOptions::Paths::Backup, "Backup" }, -{ SvtPathOptions::Paths::Gallery, "Gallery" }, -{ SvtPathOptions::Paths::Graphic, "Graphic" }, -{ SvtPathOptions::Paths::Temp,"Temp" }, -{ SvtPathOptions::Paths::Template,"Template" }, -{ SvtPathOptions::Paths::Work,"Work" }, -{ SvtPathOptions::Paths::Dictionary,"Dictionary" }, -{ SvtPathOptions::Paths::Classification, "Classification" }, +{ SvtPathOptions::Paths::AutoCorrect, u"AutoCorrect"_ustr }, +{ SvtPathOptions::Paths::AutoText,u"AutoText"_ustr }, +{ SvtPathOptions::Paths::Backup, u"Backup"_ustr }, +{ SvtPathOptions::Paths::Gallery, u"Gallery"_ustr }, +{ SvtPathOptions::Paths::Graphic, u"Graphic"_ustr }, +{ SvtPathOptions::Paths::Temp,u"Temp"_ustr }, +{ SvtPathOptions::Paths::Template,u"Template"_ustr }, +{ SvtPathOptions::Paths::Work,u"Work"_ustr }, +{ SvtPathOptions::Paths::Dictionary, u"Dictionary"_ustr }, +{ SvtPathOptions::Paths::Classification, u"Classification"_ustr }, #if OSL_DEBUG_LEVEL > 1 -{ SvtPathOptions::Paths::Linguistic,"Linguistic" }, +{ SvtPathOptions::Paths::Linguistic, u"Linguistic"_ustr }, #endif -{ SvtPathOptions::Paths::LAST, nullptr } }; static OUString getCfgName_Impl( SvtPathOptions::Paths _nHandle ) { OUString sCfgName; -sal_uInt16 nIndex = 0; -while ( Hdl2CfgMap_Impl[ nIndex ].m_nHandle != SvtPathOptions::Paths::LAST ) +for (const auto & rMapping : Hdl2CfgMap_Impl) { -if ( Hdl2CfgMap_Impl[ nIndex ].m_nHandle == _nHandle ) +if ( rMapping.m_nHandle == _nHandle ) { // config name found -sCfgName = OUString::createFromAscii( Hdl2CfgMap_Impl[ nIndex ].m_pCfgName ); +sCfgName = rMapping.m_aCfgName; break; } -++nIndex; } return sCfgName;
core.git: include/vcl vcl/backendtest vcl/headless vcl/inc vcl/jsdialog vcl/qa vcl/qt5 vcl/skia vcl/source vcl/unx vcl/workben
+-- vcl/source/window/cursor.cxx |8 vcl/source/window/dialog.cxx | 20 vcl/source/window/dockwin.cxx | 10 vcl/source/window/floatwin.cxx |6 vcl/source/window/keycod.cxx |2 vcl/source/window/layout.cxx | 14 vcl/source/window/menu.cxx |2 vcl/source/window/paint.cxx|2 vcl/source/window/printdlg.cxx | 194 ++--- vcl/source/window/status.cxx |4 vcl/source/window/toolbox2.cxx |4 vcl/source/window/window.cxx |8 vcl/unx/generic/app/geninst.cxx|2 vcl/unx/generic/app/gensys.cxx |6 vcl/unx/generic/app/i18n_im.cxx|2 vcl/unx/generic/app/saldata.cxx|2 vcl/unx/generic/app/salinst.cxx|2 vcl/unx/generic/app/wmadaptor.cxx |4 vcl/unx/generic/desktopdetect/desktopdetector.cxx |2 vcl/unx/generic/dtrans/X11_clipboard.cxx |6 vcl/unx/generic/dtrans/X11_droptarget.cxx |2 vcl/unx/generic/dtrans/X11_selection.cxx | 46 - vcl/unx/generic/dtrans/X11_service.cxx |8 vcl/unx/generic/dtrans/X11_transferable.cxx|4 vcl/unx/generic/fontmanager/fontconfig.cxx |4 vcl/unx/generic/fontmanager/helper.cxx |6 vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx|2 vcl/unx/generic/print/genprnpsp.cxx| 36 - vcl/unx/generic/print/prtsetup.cxx | 60 - vcl/unx/generic/printer/cpdmgr.cxx | 18 vcl/unx/generic/printer/cupsmgr.cxx| 20 vcl/unx/generic/printer/jobdata.cxx|4 vcl/unx/generic/printer/ppdparser.cxx | 38 - vcl/unx/generic/printer/printerinfomanager.cxx | 10 vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx |6 vcl/unx/gtk3/fpicker/SalGtkFolderPicker.cxx|2 vcl/unx/gtk3/fpicker/SalGtkPicker.cxx |2 vcl/unx/gtk3/gtkinst.cxx | 50 - vcl/unx/kf5/KFFilePicker.cxx | 10 vcl/workben/fftester.cxx | 10 vcl/workben/icontest.cxx |2 vcl/workben/listfonts.cxx | 170 ++--- vcl/workben/listglyphs.cxx |2 vcl/workben/mtfdemo.cxx| 10 vcl/workben/svdem.cxx |4 vcl/workben/svpclient.cxx |8 vcl/workben/svptest.cxx|6 vcl/workben/vcldemo.cxx| 36 - 194 files changed, 2237 insertions(+), 2224 deletions(-) New commits: commit 40dde4385cd913ac08292ad3be28bf17de9d296c Author: Noel Grandin AuthorDate: Fri May 10 13:19:35 2024 +0200 Commit: Noel Grandin CommitDate: Fri May 10 18:44:00 2024 +0200 loplugin:ostr in vcl Change-Id: I5b6ee5bda0c5ff69d297f7f8e87d4c3f3d21791c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167470 Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/include/vcl/textfilter.hxx b/include/vcl/textfilter.hxx index 0113b28bcedc..bab09107e835 100644 --- a/include/vcl/textfilter.hxx +++ b/include/vcl/textfilter.hxx @@ -22,7 +22,7 @@ public: virtual OUString filter(const OUString& rText); -TextFilter(OUString aForbiddenChars = OUString(" ")); +TextFilter(OUString aForbiddenChars = u" "_ustr); virtual ~TextFilter(); }; diff --git a/include/vcl/weldutils.hxx b/include/vcl/weldutils.hxx index 222e96a63158..3807c83c478a 100644 --- a/include/vcl/weldutils.hxx +++ b/include/vcl/weldutils.hxx @@ -68,12 +68,12 @@ public: // css::awt::XWindow void SAL_CALL setPosSize(sal_Int32, sal_Int32, sal_Int32, sal_Int32, sal_Int16) override { -throw css::uno::RuntimeException("not implemented"); +throw css::uno::RuntimeException(u"not implemented"_ustr); } css::awt::Rectangle SAL_CALL getPosSize() override { -throw css::uno::RuntimeException("not implemented"); +throw css::uno::RuntimeException(u"not implemented"_ustr); } void SAL_CALL setVisible(sal_Bool bVisible) override { m_pWeldWidget->set_visible(bVisible); } diff
core.git: include/sfx2 sfx2/inc sfx2/qa sfx2/source
/srchdlg.cxx| 18 - sfx2/source/dialog/styledlg.cxx |4 sfx2/source/dialog/tabdlg.cxx | 16 - sfx2/source/dialog/templdlg.cxx | 92 sfx2/source/dialog/versdlg.cxx| 40 +-- sfx2/source/doc/DocumentMetadataAccess.cxx| 142 ++-- sfx2/source/doc/DocumentSigner.cxx|4 sfx2/source/doc/Metadatable.cxx | 22 - sfx2/source/doc/QuerySaveDocument.cxx |5 sfx2/source/doc/SfxDocumentMetaData.cxx | 190 sfx2/source/doc/SfxRedactionHelper.cxx| 69 +++--- sfx2/source/doc/autoredactdialog.cxx | 56 ++-- sfx2/source/doc/docfac.cxx| 20 - sfx2/source/doc/docfile.cxx | 50 ++-- sfx2/source/doc/docfilt.cxx | 14 - sfx2/source/doc/docinf.cxx|4 sfx2/source/doc/doctempl.cxx | 10 sfx2/source/doc/doctemplates.cxx | 38 +-- sfx2/source/doc/doctemplateslocal.cxx |8 sfx2/source/doc/graphhelp.cxx |6 sfx2/source/doc/guisaveas.cxx | 144 ++-- sfx2/source/doc/iframe.cxx| 16 - sfx2/source/doc/new.cxx | 28 +- sfx2/source/doc/objmisc.cxx | 26 +- sfx2/source/doc/objserv.cxx | 86 +++ sfx2/source/doc/objstor.cxx | 70 +++--- sfx2/source/doc/objxtor.cxx |8 sfx2/source/doc/ownsubfilterservice.cxx |4 sfx2/source/doc/printhelper.cxx | 16 - sfx2/source/doc/saveastemplatedlg.cxx | 10 sfx2/source/doc/sfxbasemodel.cxx | 126 +-- sfx2/source/doc/sfxmodelfactory.cxx |6 sfx2/source/doc/templatedlg.cxx | 64 ++--- sfx2/source/doc/watermarkitem.cxx |4 sfx2/source/explorer/nochaos.cxx |2 sfx2/source/inet/inettbc.cxx | 14 - sfx2/source/notebookbar/NotebookbarTabControl.cxx |6 sfx2/source/notebookbar/SfxNotebookBar.cxx| 16 - sfx2/source/notify/globalevents.cxx | 10 sfx2/source/safemode/safemode.cxx | 19 - sfx2/source/sidebar/Deck.cxx |8 sfx2/source/sidebar/DeckTitleBar.cxx |8 sfx2/source/sidebar/Panel.cxx |6 sfx2/source/sidebar/PanelTitleBar.cxx |4 sfx2/source/sidebar/ResourceManager.cxx | 16 - sfx2/source/sidebar/Sidebar.cxx |2 sfx2/source/sidebar/SidebarController.cxx | 36 +-- sfx2/source/sidebar/TabBar.cxx| 36 +-- sfx2/source/sidebar/Theme.cxx | 30 +- sfx2/source/sidebar/TitleBar.cxx |8 sfx2/source/sidebar/Tools.cxx |2 sfx2/source/sidebar/UnoSidebar.cxx|2 sfx2/source/sidebar/uiobject.cxx | 10 sfx2/source/toolbox/tbxitem.cxx |2 sfx2/source/view/classificationcontroller.cxx | 18 - sfx2/source/view/classificationhelper.cxx | 78 +++--- sfx2/source/view/frame2.cxx | 24 +- sfx2/source/view/frmload.cxx | 92 sfx2/source/view/ipclient.cxx |8 sfx2/source/view/lokhelper.cxx|6 sfx2/source/view/lokstarmathhelper.cxx|2 sfx2/source/view/printer.cxx |4 sfx2/source/view/sfxbasecontroller.cxx| 18 - sfx2/source/view/viewfac.cxx |2 sfx2/source/view/viewfrm.cxx | 60 ++--- sfx2/source/view/viewfrm2.cxx |2 sfx2/source/view/viewprn.cxx | 24 +- sfx2/source/view/viewsh.cxx | 44 +-- 145 files changed, 1858 insertions(+), 1849 deletions(-) New commits: commit ca5c9591ba38ad83415a2d4ced98bfc74d30b032 Author: Noel Grandin AuthorDate: Fri May 10 13:18:37 2024 +0200 Commit: Noel Grandin CommitDate: Fri May 10 18:42:35 2024 +0200 loplugin:ostr in sfx2 Change-Id: I6306260d03c1208ec250c2f9a3860fa569f6d9c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167448 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx index 0805e55264e7..0a7f653b0180 100644 --- a/include/sfx2