diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-04-02 01:18:42 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-04-02 18:46:47 +0200 |
commit | 116b9d6ddf2b61186b29f0370234eec9c1bbe306 (patch) | |
tree | 7f90a12333274086e33c4e0fabfd96a8e54e6b6c /sc/source/ui/attrdlg | |
parent | d7ba78e9c7be835a1e2ecdacd25995663e96862f (diff) |
Avoid conversions between OUString and OString in VCL
Standardize on OUString, which is the main internal string class.
Convert from/to OUString only when communicating with respective
external APIs.
Removes about 200 conversions from the code.
Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc/source/ui/attrdlg')
-rw-r--r-- | sc/source/ui/attrdlg/attrdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 48 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.hxx | 48 |
3 files changed, 49 insertions, 49 deletions
diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx index 4e13eae6dea4..ad0a82542c3e 100644 --- a/sc/source/ui/attrdlg/attrdlg.cxx +++ b/sc/source/ui/attrdlg/attrdlg.cxx @@ -69,7 +69,7 @@ ScAttrDlg::~ScAttrDlg() { } -void ScAttrDlg::PageCreated(const OString& rPageId, SfxTabPage& rTabPage) +void ScAttrDlg::PageCreated(const OUString& rPageId, SfxTabPage& rTabPage) { SfxObjectShell* pDocSh = SfxObjectShell::Current(); SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index d0db6f84505a..26db05f15bf2 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -154,7 +154,7 @@ BitmapEx AbstractScDataFormDlg_Impl::createScreenshot() const return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } -OString AbstractScDataFormDlg_Impl::GetScreenshotId() const +OUString AbstractScDataFormDlg_Impl::GetScreenshotId() const { return m_xDlg->get_help_id(); } @@ -220,7 +220,7 @@ BitmapEx AbstractScMoveTableDlg_Impl::createScreenshot() const return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } -OString AbstractScMoveTableDlg_Impl::GetScreenshotId() const +OUString AbstractScMoveTableDlg_Impl::GetScreenshotId() const { return m_xDlg->get_help_id(); } @@ -345,7 +345,7 @@ BitmapEx AbstractScImportAsciiDlg_Impl::createScreenshot() const return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } -OString AbstractScImportAsciiDlg_Impl::GetScreenshotId() const +OUString AbstractScImportAsciiDlg_Impl::GetScreenshotId() const { return m_xDlg->get_help_id(); } @@ -376,7 +376,7 @@ BitmapEx AbstractScColRowLabelDlg_Impl::createScreenshot() const return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } -OString AbstractScColRowLabelDlg_Impl::GetScreenshotId() const +OUString AbstractScColRowLabelDlg_Impl::GetScreenshotId() const { return m_xDlg->get_help_id(); } @@ -392,7 +392,7 @@ BitmapEx AbstractScDataPilotDatabaseDlg_Impl::createScreenshot() const return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } -OString AbstractScDataPilotDatabaseDlg_Impl::GetScreenshotId() const +OUString AbstractScDataPilotDatabaseDlg_Impl::GetScreenshotId() const { return m_xDlg->get_help_id(); } @@ -428,7 +428,7 @@ BitmapEx AbstractScDataPilotSourceTypeDlg_Impl::createScreenshot() const return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } -OString AbstractScDataPilotSourceTypeDlg_Impl::GetScreenshotId() const +OUString AbstractScDataPilotSourceTypeDlg_Impl::GetScreenshotId() const { return m_xDlg->get_help_id(); } @@ -469,7 +469,7 @@ BitmapEx AbstractScDeleteCellDlg_Impl::createScreenshot() const return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } -OString AbstractScDeleteCellDlg_Impl::GetScreenshotId() const +OUString AbstractScDeleteCellDlg_Impl::GetScreenshotId() const { return m_xDlg->get_help_id(); } @@ -490,7 +490,7 @@ BitmapEx AbstractScDeleteContentsDlg_Impl::createScreenshot() const return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } -OString AbstractScDeleteContentsDlg_Impl::GetScreenshotId() const +OUString AbstractScDeleteContentsDlg_Impl::GetScreenshotId() const { return m_xDlg->get_help_id(); } @@ -606,7 +606,7 @@ BitmapEx AbstractScInsertContentsDlg_Impl::createScreenshot() const return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } -OString AbstractScInsertContentsDlg_Impl::GetScreenshotId() const +OUString AbstractScInsertContentsDlg_Impl::GetScreenshotId() const { return m_xDlg->get_help_id(); } @@ -652,7 +652,7 @@ BitmapEx AbstractScInsertTableDlg_Impl::createScreenshot() const return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } -OString AbstractScInsertTableDlg_Impl::GetScreenshotId() const +OUString AbstractScInsertTableDlg_Impl::GetScreenshotId() const { return m_xDlg->get_help_id(); } @@ -765,7 +765,7 @@ BitmapEx AbstractScNameCreateDlg_Impl::createScreenshot() const return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } -OString AbstractScNameCreateDlg_Impl::GetScreenshotId() const +OUString AbstractScNameCreateDlg_Impl::GetScreenshotId() const { return m_xDlg->get_help_id(); } @@ -849,7 +849,7 @@ void AbstractScShowTabDlg_Impl::Insert( const OUString& rString, bool bSelected void AbstractScShowTabDlg_Impl::SetDescription( const OUString& rTitle, const OUString& rFixedText, - const OString& sDlgHelpId, const OString& sLbHelpId ) + const OUString& sDlgHelpId, const OUString& sLbHelpId ) { m_xDlg->SetDescription( rTitle, rFixedText, sDlgHelpId, sLbHelpId ); } @@ -871,7 +871,7 @@ void AbstractScGoToTabDlg_Impl::Insert( const OUString& rString, bool bSelected void AbstractScGoToTabDlg_Impl::SetDescription( const OUString& rTitle, const OUString& rEntryLabel, const OUString& rListLabel, - const OString& rDlgHelpId, const OString& rEnHelpId, const OString& rLbHelpId ) + const OUString& rDlgHelpId, const OUString& rEnHelpId, const OUString& rLbHelpId ) { m_xDlg->SetDescription( rTitle, rEntryLabel, rListLabel, rDlgHelpId, rEnHelpId, rLbHelpId ); } @@ -897,7 +897,7 @@ BitmapEx AbstractScStringInputDlg_Impl::createScreenshot() const return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } -OString AbstractScStringInputDlg_Impl::GetScreenshotId() const +OUString AbstractScStringInputDlg_Impl::GetScreenshotId() const { return m_xDlg->get_help_id(); } @@ -913,7 +913,7 @@ BitmapEx AbstractScTabBgColorDlg_Impl::createScreenshot() const return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } -OString AbstractScTabBgColorDlg_Impl::GetScreenshotId() const +OUString AbstractScTabBgColorDlg_Impl::GetScreenshotId() const { return m_xDlg->get_help_id(); } @@ -949,7 +949,7 @@ BitmapEx AbstractScTextImportOptionsDlg_Impl::createScreenshot() const return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()); } -OString AbstractScTextImportOptionsDlg_Impl::GetScreenshotId() const +OUString AbstractScTextImportOptionsDlg_Impl::GetScreenshotId() const { return m_xDlg->get_help_id(); } @@ -964,7 +964,7 @@ bool ScAbstractTabController_Impl::StartExecuteAsync(AsyncContext &rCtx) return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); } -void ScAbstractTabController_Impl::SetCurPageId( const OString &rName ) +void ScAbstractTabController_Impl::SetCurPageId( const OUString &rName ) { m_xDlg->SetCurPageId( rName ); } @@ -990,12 +990,12 @@ void ScAbstractTabController_Impl::SetText( const OUString& rStr ) m_xDlg->set_title(rStr); } -std::vector<OString> ScAbstractTabController_Impl::getAllPageUIXMLDescriptions() const +std::vector<OUString> ScAbstractTabController_Impl::getAllPageUIXMLDescriptions() const { return m_xDlg->getAllPageUIXMLDescriptions(); } -bool ScAbstractTabController_Impl::selectPageByUIXMLDescription(const OString& rUIXMLDescription) +bool ScAbstractTabController_Impl::selectPageByUIXMLDescription(const OUString& rUIXMLDescription) { return m_xDlg->selectPageByUIXMLDescription(rUIXMLDescription); } @@ -1005,7 +1005,7 @@ BitmapEx ScAbstractTabController_Impl::createScreenshot() const return m_xDlg->createScreenshot(); } -OString ScAbstractTabController_Impl::GetScreenshotId() const +OUString ScAbstractTabController_Impl::GetScreenshotId() const { return m_xDlg->GetScreenshotId(); } @@ -1015,7 +1015,7 @@ bool ScAsyncTabController_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContex return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); } -void ScAsyncTabController_Impl::SetCurPageId( const OString &rName ) +void ScAsyncTabController_Impl::SetCurPageId( const OUString &rName ) { m_xDlg->SetCurPageId( rName ); } @@ -1146,7 +1146,7 @@ VclPtr<AbstractScLinkedAreaDlg> ScAbstractDialogFactory_Impl::CreateScLinkedArea } VclPtr<AbstractScMetricInputDlg> ScAbstractDialogFactory_Impl::CreateScMetricInputDlg(weld::Window* pParent, - const OString& sDialogName, + const OUString& sDialogName, tools::Long nCurrent, tools::Long nDefault, FieldUnit eFUnit, @@ -1231,8 +1231,8 @@ VclPtr<AbstractScGoToTabDlg> ScAbstractDialogFactory_Impl::CreateScGoToTabDlg(we } VclPtr<AbstractScStringInputDlg> ScAbstractDialogFactory_Impl::CreateScStringInputDlg(weld::Window* pParent, - const OUString& rTitle, const OUString& rEditTitle, const OUString& rDefault, const OString& rHelpId, - const OString& rEditHelpId) + const OUString& rTitle, const OUString& rEditTitle, const OUString& rDefault, const OUString& rHelpId, + const OUString& rEditHelpId) { return VclPtr<AbstractScStringInputDlg_Impl>::Create(std::make_unique<ScStringInputDlg>(pParent, rTitle, rEditTitle, rDefault, rHelpId, rEditHelpId)); diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 855abeecf1c8..434b84df3d7c 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -68,7 +68,7 @@ public: // screenshotting virtual BitmapEx createScreenshot() const override; - virtual OString GetScreenshotId() const override; + virtual OUString GetScreenshotId() const override; }; class AbstractScAutoFormatDlg_Impl : public AbstractScAutoFormatDlg @@ -98,7 +98,7 @@ public: // screenshotting virtual BitmapEx createScreenshot() const override; - virtual OString GetScreenshotId() const override; + virtual OUString GetScreenshotId() const override; }; class AbstractScCondFormatManagerDlg_Impl : public AbstractScCondFormatManagerDlg @@ -131,7 +131,7 @@ public: // screenshotting virtual BitmapEx createScreenshot() const override; - virtual OString GetScreenshotId() const override; + virtual OUString GetScreenshotId() const override; }; class AbstractScDataPilotSourceTypeDlg_Impl :public AbstractScDataPilotSourceTypeDlg @@ -152,7 +152,7 @@ public: // screenshotting virtual BitmapEx createScreenshot() const override; - virtual OString GetScreenshotId() const override; + virtual OUString GetScreenshotId() const override; }; class AbstractScDataPilotServiceDlg_Impl : public AbstractScDataPilotServiceDlg @@ -186,7 +186,7 @@ public: // screenshotting virtual BitmapEx createScreenshot() const override; - virtual OString GetScreenshotId() const override; + virtual OUString GetScreenshotId() const override; }; //for dataform @@ -202,7 +202,7 @@ public: // screenshotting virtual BitmapEx createScreenshot() const override; - virtual OString GetScreenshotId() const override; + virtual OUString GetScreenshotId() const override; }; class AbstractScDeleteContentsDlg_Impl : public AbstractScDeleteContentsDlg @@ -219,7 +219,7 @@ public: // screenshotting virtual BitmapEx createScreenshot() const override; - virtual OString GetScreenshotId() const override; + virtual OUString GetScreenshotId() const override; }; class AbstractScFillSeriesDlg_Impl:public AbstractScFillSeriesDlg @@ -289,7 +289,7 @@ public: // screenshotting virtual BitmapEx createScreenshot() const override; - virtual OString GetScreenshotId() const override; + virtual OUString GetScreenshotId() const override; }; class AbstractScInsertTableDlg_Impl : public AbstractScInsertTableDlg @@ -311,7 +311,7 @@ public: // screenshotting virtual BitmapEx createScreenshot() const override; - virtual OString GetScreenshotId() const override; + virtual OUString GetScreenshotId() const override; }; class AbstractScSelEntryDlg_Impl : public AbstractScSelEntryDlg @@ -378,7 +378,7 @@ public: // screenshotting virtual BitmapEx createScreenshot() const override; - virtual OString GetScreenshotId() const override; + virtual OUString GetScreenshotId() const override; }; class AbstractScNameCreateDlg_Impl : public AbstractScNameCreateDlg @@ -394,7 +394,7 @@ public: // screenshotting virtual BitmapEx createScreenshot() const override; - virtual OString GetScreenshotId() const override; + virtual OUString GetScreenshotId() const override; }; class AbstractScNamePasteDlg_Impl : public AbstractScNamePasteDlg @@ -516,7 +516,7 @@ public: virtual short Execute() override; virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override; virtual void Insert( const OUString& rString, bool bSelected ) override; - virtual void SetDescription(const OUString& rTitle, const OUString& rFixedText, const OString& sDlgHelpId, const OString& sLbHelpId) override; + virtual void SetDescription(const OUString& rTitle, const OUString& rFixedText, const OUString& sDlgHelpId, const OUString& sLbHelpId) override; virtual OUString GetEntry(sal_Int32 nPos) const override; virtual std::vector<sal_Int32> GetSelectedRows() const override; }; @@ -533,7 +533,7 @@ public: virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override; virtual void Insert( const OUString& rString, bool bSelected ) override; virtual void SetDescription(const OUString& rTitle, const OUString& rEntryLabel, const OUString& rListLabel, - const OString& rDlgHelpId, const OString& rEnHelpId, const OString& rLbHelpId) override; + const OUString& rDlgHelpId, const OUString& rEnHelpId, const OUString& rLbHelpId) override; virtual OUString GetSelectedEntry() const override; }; @@ -561,7 +561,7 @@ public: // screenshotting virtual BitmapEx createScreenshot() const override; - virtual OString GetScreenshotId() const override; + virtual OUString GetScreenshotId() const override; }; class AbstractScTabBgColorDlg_Impl : public AbstractScTabBgColorDlg @@ -577,7 +577,7 @@ public: // screenshotting virtual BitmapEx createScreenshot() const override; - virtual OString GetScreenshotId() const override; + virtual OUString GetScreenshotId() const override; }; class AbstractScImportOptionsDlg_Impl : public AbstractScImportOptionsDlg @@ -608,7 +608,7 @@ public: // screenshotting virtual BitmapEx createScreenshot() const override; - virtual OString GetScreenshotId() const override; + virtual OUString GetScreenshotId() const override; }; class ScAbstractTabController_Impl : public SfxAbstractTabDialog @@ -621,17 +621,17 @@ public: } virtual short Execute() override; virtual bool StartExecuteAsync(AsyncContext &rCtx) override; - virtual void SetCurPageId( const OString &rName ) override; + virtual void SetCurPageId( const OUString &rName ) override; virtual const SfxItemSet* GetOutputItemSet() const override; virtual WhichRangesContainer GetInputRanges( const SfxItemPool& pItem ) override; virtual void SetInputSet( const SfxItemSet* pInSet ) override; virtual void SetText( const OUString& rStr ) override; // screenshotting - virtual std::vector<OString> getAllPageUIXMLDescriptions() const override; - virtual bool selectPageByUIXMLDescription(const OString& rUIXMLDescription) override; + virtual std::vector<OUString> getAllPageUIXMLDescriptions() const override; + virtual bool selectPageByUIXMLDescription(const OUString& rUIXMLDescription) override; virtual BitmapEx createScreenshot() const override; - virtual OString GetScreenshotId() const override; + virtual OUString GetScreenshotId() const override; }; class ScAsyncTabController_Impl : public ScAsyncTabController @@ -644,7 +644,7 @@ public: } virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override; virtual const SfxItemSet* GetOutputItemSet() const override; - virtual void SetCurPageId( const OString &rName ) override; + virtual void SetCurPageId( const OUString &rName ) override; }; //AbstractDialogFactory_Impl implementations @@ -714,7 +714,7 @@ public: virtual VclPtr<AbstractScLinkedAreaDlg> CreateScLinkedAreaDlg(weld::Widget* pParent) override; virtual VclPtr<AbstractScMetricInputDlg> CreateScMetricInputDlg(weld::Window* pParent, - const OString& sDialogName, + const OUString& sDialogName, tools::Long nCurrent, tools::Long nDefault, FieldUnit eFUnit, @@ -765,8 +765,8 @@ public: const OUString& rTitle, const OUString& rEditTitle, const OUString& rDefault, - const OString& rHelpId, - const OString& rEditHelpId) override; + const OUString& rHelpId, + const OUString& rEditHelpId) override; virtual VclPtr<AbstractScTabBgColorDlg> CreateScTabBgColorDlg(weld::Window* pParent, const OUString& rTitle, //Dialog Title |