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 /reportdesign | |
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 'reportdesign')
-rw-r--r-- | reportdesign/inc/helpids.h | 96 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/AddField.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Condition.cxx | 18 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Condition.hxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Formula.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/GroupsSorting.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Navigator.cxx | 18 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/dlgpage.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/inc/AddField.hxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/inc/FunctionHelper.hxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/inc/GroupsSorting.hxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/inc/dlgpage.hxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/inc/metadata.hxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/inspection/DefaultInspection.cxx | 9 | ||||
-rw-r--r-- | reportdesign/source/ui/inspection/metadata.cxx | 10 | ||||
-rw-r--r-- | reportdesign/source/ui/misc/FunctionHelper.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/DesignView.cxx | 12 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 8 |
18 files changed, 103 insertions, 104 deletions
diff --git a/reportdesign/inc/helpids.h b/reportdesign/inc/helpids.h index 219d967228c0..94374c834105 100644 --- a/reportdesign/inc/helpids.h +++ b/reportdesign/inc/helpids.h @@ -27,59 +27,59 @@ inline constexpr OUStringLiteral UID_RPT_PROP_CHARTTYPE_DLG = u"REPORTDESIGN_UID inline constexpr OUStringLiteral UID_RPT_PROP_DLG_LINKFIELDS = u"REPORTDESIGN_UID_RPT_PROP_DLG_LINKFIELDS"; #define UID_RPT_RPT_APP_VIEW "REPORTDESIGN_UID_RPT_RPT_APP_VIEW" -inline constexpr OStringLiteral UID_RPT_REPORTWINDOW = "REPORTDESIGN_UID_RPT_REPORTWINDOW"; -inline constexpr OStringLiteral HID_REPORTSECTION = "REPORTDESIGN_HID_REPORTSECTION"; -inline constexpr OStringLiteral HID_RPT_FIELDEXPRESSION = "REPORTDESIGN_HID_RPT_FIELDEXPRESSION"; -inline constexpr OStringLiteral HID_RPT_FIELD_SEL = "REPORTDESIGN_HID_RPT_FIELD_SEL"; +inline constexpr OUStringLiteral UID_RPT_REPORTWINDOW = u"REPORTDESIGN_UID_RPT_REPORTWINDOW"; +inline constexpr OUStringLiteral HID_REPORTSECTION = u"REPORTDESIGN_HID_REPORTSECTION"; +inline constexpr OUStringLiteral HID_RPT_FIELDEXPRESSION = u"REPORTDESIGN_HID_RPT_FIELDEXPRESSION"; +inline constexpr OUStringLiteral HID_RPT_FIELD_SEL = u"REPORTDESIGN_HID_RPT_FIELD_SEL"; #define HID_RPT_FIELD_SEL_WIN "REPORTDESIGN_HID_RPT_FIELD_SEL_WIN" -inline constexpr OStringLiteral HID_RPT_PROPDLG_TAB_GENERAL = "REPORTDESIGN_HID_RPT_PROPDLG_TAB_GENERAL"; -inline constexpr OStringLiteral HID_RPT_PROPDLG_TAB_DATA = "REPORTDESIGN_HID_RPT_PROPDLG_TAB_DATA"; +inline constexpr OUStringLiteral HID_RPT_PROPDLG_TAB_GENERAL = u"REPORTDESIGN_HID_RPT_PROPDLG_TAB_GENERAL"; +inline constexpr OUStringLiteral HID_RPT_PROPDLG_TAB_DATA = u"REPORTDESIGN_HID_RPT_PROPDLG_TAB_DATA"; -inline constexpr OStringLiteral HID_RPT_PROP_FORCENEWPAGE = "REPORTDESIGN_HID_RPT_PROP_FORCENEWPAGE"; -inline constexpr OStringLiteral HID_RPT_PROP_NEWROWORCOL = "REPORTDESIGN_HID_RPT_PROP_NEWROWORCOL"; -inline constexpr OStringLiteral HID_RPT_PROP_KEEPTOGETHER = "REPORTDESIGN_HID_RPT_PROP_KEEPTOGETHER"; -inline constexpr OStringLiteral HID_RPT_PROP_CANGROW = "REPORTDESIGN_HID_RPT_PROP_CANGROW"; -inline constexpr OStringLiteral HID_RPT_PROP_CANSHRINK = "REPORTDESIGN_HID_RPT_PROP_CANSHRINK"; -inline constexpr OStringLiteral HID_RPT_PROP_REPEATSECTION = "REPORTDESIGN_HID_RPT_PROP_REPEATSECTION"; -inline constexpr OStringLiteral HID_RPT_PROP_FORMULALIST = "REPORTDESIGN_HID_RPT_PROP_FORMULALIST"; -inline constexpr OStringLiteral HID_RPT_PROP_SCOPE = "REPORTDESIGN_HID_RPT_PROP_SCOPE"; -inline constexpr OStringLiteral HID_RPT_PROP_TYPE = "REPORTDESIGN_HID_RPT_PROP_TYPE"; -inline constexpr OStringLiteral HID_RPT_PROP_MASTERFIELDS = "REPORTDESIGN_HID_RPT_PROP_MASTERFIELDS"; -inline constexpr OStringLiteral HID_RPT_PROP_DETAILFIELDS = "REPORTDESIGN_HID_RPT_PROP_DETAILFIELDS"; -inline constexpr OStringLiteral HID_RPT_PROP_AREA = "REPORTDESIGN_HID_RPT_PROP_AREA"; -inline constexpr OStringLiteral HID_RPT_PROP_MIMETYPE = "REPORTDESIGN_HID_RPT_PROP_MIMETYPE"; +inline constexpr OUStringLiteral HID_RPT_PROP_FORCENEWPAGE = u"REPORTDESIGN_HID_RPT_PROP_FORCENEWPAGE"; +inline constexpr OUStringLiteral HID_RPT_PROP_NEWROWORCOL = u"REPORTDESIGN_HID_RPT_PROP_NEWROWORCOL"; +inline constexpr OUStringLiteral HID_RPT_PROP_KEEPTOGETHER = u"REPORTDESIGN_HID_RPT_PROP_KEEPTOGETHER"; +inline constexpr OUStringLiteral HID_RPT_PROP_CANGROW = u"REPORTDESIGN_HID_RPT_PROP_CANGROW"; +inline constexpr OUStringLiteral HID_RPT_PROP_CANSHRINK = u"REPORTDESIGN_HID_RPT_PROP_CANSHRINK"; +inline constexpr OUStringLiteral HID_RPT_PROP_REPEATSECTION = u"REPORTDESIGN_HID_RPT_PROP_REPEATSECTION"; +inline constexpr OUStringLiteral HID_RPT_PROP_FORMULALIST = u"REPORTDESIGN_HID_RPT_PROP_FORMULALIST"; +inline constexpr OUStringLiteral HID_RPT_PROP_SCOPE = u"REPORTDESIGN_HID_RPT_PROP_SCOPE"; +inline constexpr OUStringLiteral HID_RPT_PROP_TYPE = u"REPORTDESIGN_HID_RPT_PROP_TYPE"; +inline constexpr OUStringLiteral HID_RPT_PROP_MASTERFIELDS = u"REPORTDESIGN_HID_RPT_PROP_MASTERFIELDS"; +inline constexpr OUStringLiteral HID_RPT_PROP_DETAILFIELDS = u"REPORTDESIGN_HID_RPT_PROP_DETAILFIELDS"; +inline constexpr OUStringLiteral HID_RPT_PROP_AREA = u"REPORTDESIGN_HID_RPT_PROP_AREA"; +inline constexpr OUStringLiteral HID_RPT_PROP_MIMETYPE = u"REPORTDESIGN_HID_RPT_PROP_MIMETYPE"; // free // free -inline constexpr OStringLiteral HID_RPT_PROP_PRINTREPEATEDVALUES = "REPORTDESIGN_HID_RPT_PROP_PRINTREPEATEDVALUES"; -inline constexpr OStringLiteral HID_RPT_PROP_CONDITIONALPRINTEXPRESSION = "REPORTDESIGN_HID_RPT_PROP_CONDITIONALPRINTEXPRESSION"; -inline constexpr OStringLiteral HID_RPT_PROP_VERTICALALIGN = "REPORTDESIGN_HID_RPT_PROP_VERTICALALIGN"; -inline constexpr OStringLiteral HID_RPT_PROP_STARTNEWCOLUMN = "REPORTDESIGN_HID_RPT_PROP_STARTNEWCOLUMN"; -inline constexpr OStringLiteral HID_RPT_PROP_RESETPAGENUMBER = "REPORTDESIGN_HID_RPT_PROP_RESETPAGENUMBER"; -inline constexpr OStringLiteral HID_RPT_PROP_PARAADJUST = "REPORTDESIGN_HID_RPT_PROP_PARAADJUST"; -inline constexpr OStringLiteral HID_RPT_PROP_PRINTWHENGROUPCHANGE = "REPORTDESIGN_HID_RPT_PROP_PRINTWHENGROUPCHANGE"; -inline constexpr OStringLiteral HID_RPT_PROP_CHARTTYPE = "REPORTDESIGN_HID_RPT_PROP_CHARTTYPE"; +inline constexpr OUStringLiteral HID_RPT_PROP_PRINTREPEATEDVALUES = u"REPORTDESIGN_HID_RPT_PROP_PRINTREPEATEDVALUES"; +inline constexpr OUStringLiteral HID_RPT_PROP_CONDITIONALPRINTEXPRESSION = u"REPORTDESIGN_HID_RPT_PROP_CONDITIONALPRINTEXPRESSION"; +inline constexpr OUStringLiteral HID_RPT_PROP_VERTICALALIGN = u"REPORTDESIGN_HID_RPT_PROP_VERTICALALIGN"; +inline constexpr OUStringLiteral HID_RPT_PROP_STARTNEWCOLUMN = u"REPORTDESIGN_HID_RPT_PROP_STARTNEWCOLUMN"; +inline constexpr OUStringLiteral HID_RPT_PROP_RESETPAGENUMBER = u"REPORTDESIGN_HID_RPT_PROP_RESETPAGENUMBER"; +inline constexpr OUStringLiteral HID_RPT_PROP_PARAADJUST = u"REPORTDESIGN_HID_RPT_PROP_PARAADJUST"; +inline constexpr OUStringLiteral HID_RPT_PROP_PRINTWHENGROUPCHANGE = u"REPORTDESIGN_HID_RPT_PROP_PRINTWHENGROUPCHANGE"; +inline constexpr OUStringLiteral HID_RPT_PROP_CHARTTYPE = u"REPORTDESIGN_HID_RPT_PROP_CHARTTYPE"; // free // free -inline constexpr OStringLiteral HID_RPT_PROP_VISIBLE = "REPORTDESIGN_HID_RPT_PROP_VISIBLE"; -inline constexpr OStringLiteral HID_RPT_PROP_GROUPKEEPTOGETHER = "REPORTDESIGN_HID_RPT_PROP_GROUPKEEPTOGETHER"; -inline constexpr OStringLiteral HID_RPT_PROP_PAGEHEADEROPTION = "REPORTDESIGN_HID_RPT_PROP_PAGEHEADEROPTION"; -inline constexpr OStringLiteral HID_RPT_PROP_PAGEFOOTEROPTION = "REPORTDESIGN_HID_RPT_PROP_PAGEFOOTEROPTION"; -inline constexpr OStringLiteral HID_RPT_PROP_PREVIEW_COUNT = "REPORTDESIGN_HID_RPT_PROP_PREVIEW_COUNT"; -inline constexpr OStringLiteral HID_RPT_PROP_DATAFIELD = "REPORTDESIGN_HID_RPT_PROP_DATAFIELD"; -inline constexpr OStringLiteral HID_RPT_PROP_BACKCOLOR = "REPORTDESIGN_HID_RPT_PROP_BACKCOLOR"; -inline constexpr OStringLiteral HID_RPT_PROP_RPT_POSITIONX = "REPORTDESIGN_HID_RPT_PROP_RPT_POSITIONX"; -inline constexpr OStringLiteral HID_RPT_PROP_RPT_POSITIONY = "REPORTDESIGN_HID_RPT_PROP_RPT_POSITIONY"; -inline constexpr OStringLiteral HID_RPT_PROP_RPT_WIDTH = "REPORTDESIGN_HID_RPT_PROP_RPT_WIDTH"; -inline constexpr OStringLiteral HID_RPT_PROP_RPT_HEIGHT = "REPORTDESIGN_HID_RPT_PROP_RPT_HEIGHT"; -inline constexpr OStringLiteral HID_RPT_PROP_RPT_AUTOGROW = "REPORTDESIGN_HID_RPT_PROP_RPT_AUTOGROW"; -inline constexpr OStringLiteral HID_RPT_PROP_DEEPTRAVERSING = "REPORTDESIGN_HID_RPT_PROP_DEEPTRAVERSING"; -inline constexpr OStringLiteral HID_RPT_PROP_PREEVALUATED = "REPORTDESIGN_HID_RPT_PROP_PREEVALUATED"; -inline constexpr OStringLiteral HID_REPORT_NAVIGATOR_TREE = "REPORTDESIGN_HID_REPORT_NAVIGATOR_TREE"; -inline constexpr OStringLiteral HID_RPT_PROP_FORMULA = "REPORTDESIGN_HID_RPT_PROP_FORMULA"; -inline constexpr OStringLiteral HID_RPT_PROP_INITIALFORMULA = "REPORTDESIGN_HID_RPT_PROP_INITIALFORMULA"; -inline constexpr OStringLiteral HID_RPT_PROP_RPT_FONT = "REPORTDESIGN_HID_RPT_PROP_RPT_FONT"; -inline constexpr OStringLiteral HID_RPT_PROP_PRESERVEIRI = "REPORTDESIGN_HID_RPT_PROP_PRESERVEIRI"; -inline constexpr OStringLiteral HID_RPT_PROP_BACKTRANSPARENT = "REPORTDESIGN_HID_RPT_PROP_BACKTRANSPARENT"; -inline constexpr OStringLiteral HID_RPT_PROP_CONTROLBACKGROUNDTRANSPARENT = "REPORTDESIGN_HID_RPT_PROP_CONTROLBACKGROUNDTRANSPARENT"; +inline constexpr OUStringLiteral HID_RPT_PROP_VISIBLE = u"REPORTDESIGN_HID_RPT_PROP_VISIBLE"; +inline constexpr OUStringLiteral HID_RPT_PROP_GROUPKEEPTOGETHER = u"REPORTDESIGN_HID_RPT_PROP_GROUPKEEPTOGETHER"; +inline constexpr OUStringLiteral HID_RPT_PROP_PAGEHEADEROPTION = u"REPORTDESIGN_HID_RPT_PROP_PAGEHEADEROPTION"; +inline constexpr OUStringLiteral HID_RPT_PROP_PAGEFOOTEROPTION = u"REPORTDESIGN_HID_RPT_PROP_PAGEFOOTEROPTION"; +inline constexpr OUStringLiteral HID_RPT_PROP_PREVIEW_COUNT = u"REPORTDESIGN_HID_RPT_PROP_PREVIEW_COUNT"; +inline constexpr OUStringLiteral HID_RPT_PROP_DATAFIELD = u"REPORTDESIGN_HID_RPT_PROP_DATAFIELD"; +inline constexpr OUStringLiteral HID_RPT_PROP_BACKCOLOR = u"REPORTDESIGN_HID_RPT_PROP_BACKCOLOR"; +inline constexpr OUStringLiteral HID_RPT_PROP_RPT_POSITIONX = u"REPORTDESIGN_HID_RPT_PROP_RPT_POSITIONX"; +inline constexpr OUStringLiteral HID_RPT_PROP_RPT_POSITIONY = u"REPORTDESIGN_HID_RPT_PROP_RPT_POSITIONY"; +inline constexpr OUStringLiteral HID_RPT_PROP_RPT_WIDTH = u"REPORTDESIGN_HID_RPT_PROP_RPT_WIDTH"; +inline constexpr OUStringLiteral HID_RPT_PROP_RPT_HEIGHT = u"REPORTDESIGN_HID_RPT_PROP_RPT_HEIGHT"; +inline constexpr OUStringLiteral HID_RPT_PROP_RPT_AUTOGROW = u"REPORTDESIGN_HID_RPT_PROP_RPT_AUTOGROW"; +inline constexpr OUStringLiteral HID_RPT_PROP_DEEPTRAVERSING = u"REPORTDESIGN_HID_RPT_PROP_DEEPTRAVERSING"; +inline constexpr OUStringLiteral HID_RPT_PROP_PREEVALUATED = u"REPORTDESIGN_HID_RPT_PROP_PREEVALUATED"; +inline constexpr OUStringLiteral HID_REPORT_NAVIGATOR_TREE = u"REPORTDESIGN_HID_REPORT_NAVIGATOR_TREE"; +inline constexpr OUStringLiteral HID_RPT_PROP_FORMULA = u"REPORTDESIGN_HID_RPT_PROP_FORMULA"; +inline constexpr OUStringLiteral HID_RPT_PROP_INITIALFORMULA = u"REPORTDESIGN_HID_RPT_PROP_INITIALFORMULA"; +inline constexpr OUStringLiteral HID_RPT_PROP_RPT_FONT = u"REPORTDESIGN_HID_RPT_PROP_RPT_FONT"; +inline constexpr OUStringLiteral HID_RPT_PROP_PRESERVEIRI = u"REPORTDESIGN_HID_RPT_PROP_PRESERVEIRI"; +inline constexpr OUStringLiteral HID_RPT_PROP_BACKTRANSPARENT = u"REPORTDESIGN_HID_RPT_PROP_BACKTRANSPARENT"; +inline constexpr OUStringLiteral HID_RPT_PROP_CONTROLBACKGROUNDTRANSPARENT = u"REPORTDESIGN_HID_RPT_PROP_CONTROLBACKGROUNDTRANSPARENT"; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx index 6ae0ccabebf1..631a7f7d9015 100644 --- a/reportdesign/source/ui/dlg/AddField.cxx +++ b/reportdesign/source/ui/dlg/AddField.cxx @@ -188,7 +188,7 @@ void OAddFieldWindow::Update() // ListBox loeschen m_xListBox->clear(); m_aListBoxData.clear(); - const OString aIds[] = { "up", "down" }; + const OUString aIds[] = { "up", "down" }; for (size_t j = 0; j< std::size(aIds); ++j) m_xActions->set_item_sensitive(aIds[j], false); @@ -319,7 +319,7 @@ IMPL_LINK_NOARG( OAddFieldWindow, OnDoubleClickHdl, weld::TreeView&, bool ) return true; } -IMPL_LINK(OAddFieldWindow, OnSortAction, const OString&, rCurItem, void) +IMPL_LINK(OAddFieldWindow, OnSortAction, const OUString&, rCurItem, void) { if (rCurItem == "insert") { @@ -327,7 +327,7 @@ IMPL_LINK(OAddFieldWindow, OnSortAction, const OString&, rCurItem, void) return; } - const OString aIds[] = { "up", "down" }; + const OUString aIds[] = { "up", "down" }; if (rCurItem == "delete") { diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx index 456a9dfd6a3d..59a72ff6c2dc 100644 --- a/reportdesign/source/ui/dlg/Condition.cxx +++ b/reportdesign/source/ui/dlg/Condition.cxx @@ -128,19 +128,19 @@ Condition::Condition(weld::Container* pParent, weld::Window* pDialog, ICondition ConditionalExpressionFactory::getKnownConditionalExpressions( m_aConditionalExpressions ); } -sal_uInt16 Condition::mapToolbarItemToSlotId(std::string_view rItemId) +sal_uInt16 Condition::mapToolbarItemToSlotId(std::u16string_view rItemId) { - if (rItemId == "bold") + if (rItemId == u"bold") return SID_ATTR_CHAR_WEIGHT; - if (rItemId == "italic") + if (rItemId == u"italic") return SID_ATTR_CHAR_POSTURE; - if (rItemId == "underline") + if (rItemId == u"underline") return SID_ATTR_CHAR_UNDERLINE; - if (rItemId == "background") + if (rItemId == u"background") return SID_BACKGROUND_COLOR; - if (rItemId == "foreground") + if (rItemId == u"foreground") return SID_ATTR_CHAR_COLOR2; - if (rItemId == "fontdialog") + if (rItemId == u"fontdialog") return SID_CHAR_DLG; return 0; } @@ -180,7 +180,7 @@ void Condition::SetForegroundDropdownClick() } -IMPL_LINK(Condition, OnFormatAction, const OString&, rIdent, void) +IMPL_LINK(Condition, OnFormatAction, const OUString&, rIdent, void) { ApplyCommand(mapToolbarItemToSlotId(rIdent), NamedColor(COL_AUTO, "#" + COL_AUTO.AsRGBHexString())); @@ -304,7 +304,7 @@ void Condition::setCondition( const uno::Reference< report::XFormatCondition >& void Condition::updateToolbar(const uno::Reference< report::XReportControlFormat >& _xReportControlFormat) { - OString aItems[] = { "bold", "italic", "underline", "fontdialog" }; + OUString aItems[] = { "bold", "italic", "underline", "fontdialog" }; OSL_ENSURE(_xReportControlFormat.is(),"XReportControlFormat is NULL!"); if ( !_xReportControlFormat.is() ) diff --git a/reportdesign/source/ui/dlg/Condition.hxx b/reportdesign/source/ui/dlg/Condition.hxx index 2e25d343d1b9..91bb52e5a231 100644 --- a/reportdesign/source/ui/dlg/Condition.hxx +++ b/reportdesign/source/ui/dlg/Condition.hxx @@ -103,7 +103,7 @@ namespace rptui void SetBackgroundDropdownClick(); void SetForegroundDropdownClick(); - DECL_LINK( OnFormatAction, const OString&, void ); + DECL_LINK( OnFormatAction, const OUString&, void ); DECL_LINK( OnConditionAction, weld::Button&, void ); public: @@ -141,7 +141,7 @@ namespace rptui ::rptui::OReportController& getController() const { return m_rController; } - static sal_uInt16 mapToolbarItemToSlotId(std::string_view rItemId); + static sal_uInt16 mapToolbarItemToSlotId(std::u16string_view rItemId); css::uno::Reference<css::awt::XWindow> GetXWindow() const { return m_pDialog->GetXWindow(); } diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx index b3ce1bbfcfcb..9cad568ec62a 100644 --- a/reportdesign/source/ui/dlg/Formula.cxx +++ b/reportdesign/source/ui/dlg/Formula.cxx @@ -88,7 +88,7 @@ FormulaDialog::~FormulaDialog() if ( m_xAddField ) { SvtViewOptions aDlgOpt( EViewType::Window, HID_RPT_FIELD_SEL_WIN ); - aDlgOpt.SetWindowState(OStringToOUString(m_xAddField->getDialog()->get_window_state(vcl::WindowDataMask::Pos | vcl::WindowDataMask::State | vcl::WindowDataMask::Minimized), RTL_TEXTENCODING_ASCII_US)); + aDlgOpt.SetWindowState(m_xAddField->getDialog()->get_window_state(vcl::WindowDataMask::Pos | vcl::WindowDataMask::State | vcl::WindowDataMask::Minimized)); if (m_xAddField->getDialog()->get_visible()) m_xAddField->response(RET_CANCEL); @@ -213,7 +213,7 @@ void FormulaDialog::ToggleCollapsed( RefEdit* _pEdit, RefButton* _pButton) SvtViewOptions aDlgOpt( EViewType::Window, HID_RPT_FIELD_SEL_WIN ); if ( aDlgOpt.Exists() ) { - m_xAddField->getDialog()->set_window_state(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US)); + m_xAddField->getDialog()->set_window_state(aDlgOpt.GetWindowState()); } diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx index 1f14651d1487..38697ca12861 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.cxx +++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx @@ -971,7 +971,7 @@ IMPL_LINK_NOARG(OGroupsSortingDialog, OnWidgetFocusLost, weld::Widget&, void) } } -IMPL_LINK(OGroupsSortingDialog, OnFormatAction, const OString&, rCommand, void) +IMPL_LINK(OGroupsSortingDialog, OnFormatAction, const OUString&, rCommand, void) { if ( !m_xFieldExpression ) return; diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx index 24a4e253b849..af7696c2fe6c 100644 --- a/reportdesign/source/ui/dlg/Navigator.cxx +++ b/reportdesign/source/ui/dlg/Navigator.cxx @@ -238,19 +238,19 @@ NavigatorTree::~NavigatorTree() namespace { - sal_uInt16 mapIdent(std::string_view rIdent) + sal_uInt16 mapIdent(std::u16string_view rIdent) { - if (rIdent == "sorting") + if (rIdent == u"sorting") return SID_SORTINGANDGROUPING; - else if (rIdent == "page") + else if (rIdent == u"page") return SID_PAGEHEADERFOOTER; - else if (rIdent == "report") + else if (rIdent == u"report") return SID_REPORTHEADERFOOTER; - else if (rIdent == "function") + else if (rIdent == u"function") return SID_RPT_NEW_FUNCTION; - else if (rIdent == "properties") + else if (rIdent == u"properties") return SID_SHOW_PROPERTYBROWSER; - else if (rIdent == "delete") + else if (rIdent == u"delete") return SID_DELETE; return 0; } @@ -276,7 +276,7 @@ IMPL_LINK(NavigatorTree, CommandHdl, const CommandEvent&, rEvt, bool) std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xTreeView.get(), "modules/dbreport/ui/navigatormenu.ui")); std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu")); - const OString aIds[] = { "sorting", "page", "report", "function", "properties", "delete" }; + const OUString aIds[] = { "sorting", "page", "report", "function", "properties", "delete" }; for (size_t i = 0; i < SAL_N_ELEMENTS(aIds); ++i) { sal_uInt16 nSId = mapIdent(aIds[i]); @@ -295,7 +295,7 @@ IMPL_LINK(NavigatorTree, CommandHdl, const CommandEvent&, rEvt, bool) // the point that was clicked on ::Point aWhere(rEvt.GetMousePosPixel()); - OString sCurItemIdent = xContextMenu->popup_at_rect(m_xTreeView.get(), tools::Rectangle(aWhere, Size(1,1))); + OUString sCurItemIdent = xContextMenu->popup_at_rect(m_xTreeView.get(), tools::Rectangle(aWhere, Size(1,1))); if (!sCurItemIdent.isEmpty()) { sal_uInt16 nId = mapIdent(sCurItemIdent); diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx b/reportdesign/source/ui/dlg/dlgpage.cxx index c4fb41c465b4..7e99ba19d4e5 100644 --- a/reportdesign/source/ui/dlg/dlgpage.cxx +++ b/reportdesign/source/ui/dlg/dlgpage.cxx @@ -34,7 +34,7 @@ namespace rptui ORptPageDialog::ORptPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, const OUString &rDialog) : SfxTabDialogController(pParent, "modules/dbreport/ui/" + - rDialog.toAsciiLowerCase() + ".ui", rDialog.toUtf8(), pAttr) + rDialog.toAsciiLowerCase() + ".ui", rDialog, pAttr) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); @@ -63,7 +63,7 @@ ORptPageDialog::ORptPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, c RemoveTabPage("asianlayout"); } -void ORptPageDialog::PageCreated(const OString& rId, SfxTabPage &rPage) +void ORptPageDialog::PageCreated(const OUString& rId, SfxTabPage &rPage) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); if (rId == "background") diff --git a/reportdesign/source/ui/inc/AddField.hxx b/reportdesign/source/ui/inc/AddField.hxx index c5d8eb603d94..17b6e9169bd1 100644 --- a/reportdesign/source/ui/inc/AddField.hxx +++ b/reportdesign/source/ui/inc/AddField.hxx @@ -67,7 +67,7 @@ class OAddFieldWindow : public weld::GenericDialogController DECL_LINK( OnDoubleClickHdl, weld::TreeView&, bool ); DECL_LINK( OnSelectHdl, weld::TreeView&, void ); DECL_LINK( DragBeginHdl, bool&, bool ); - DECL_LINK( OnSortAction, const OString&, void ); + DECL_LINK( OnSortAction, const OUString&, void ); DECL_LINK( FocusChangeHdl, weld::Container&, void ); void addToList(const css::uno::Sequence<OUString>& rEntries); diff --git a/reportdesign/source/ui/inc/FunctionHelper.hxx b/reportdesign/source/ui/inc/FunctionHelper.hxx index 2ce34368783e..2d9fbed18cbd 100644 --- a/reportdesign/source/ui/inc/FunctionHelper.hxx +++ b/reportdesign/source/ui/inc/FunctionHelper.hxx @@ -70,7 +70,7 @@ public: virtual void fillVisibleArgumentMapping(::std::vector<sal_uInt16>& _rArguments) const override ; virtual void initArgumentInfo() const override; virtual OUString getSignature() const override ; - virtual OString getHelpId() const override ; + virtual OUString getHelpId() const override ; virtual bool isHidden() const override; virtual sal_uInt32 getParameterCount() const override ; virtual sal_uInt32 getVarArgsStart() const override; diff --git a/reportdesign/source/ui/inc/GroupsSorting.hxx b/reportdesign/source/ui/inc/GroupsSorting.hxx index 0418ee1d9abb..932791c022b9 100644 --- a/reportdesign/source/ui/inc/GroupsSorting.hxx +++ b/reportdesign/source/ui/inc/GroupsSorting.hxx @@ -75,7 +75,7 @@ private: DECL_LINK( OnControlFocusGot, LinkParamNone*, void ); DECL_LINK( LBChangeHdl, weld::ComboBox&, void ); - DECL_LINK( OnFormatAction, const OString&, void ); + DECL_LINK( OnFormatAction, const OUString&, void ); /** returns the groups @return the groups which now have to check which one changes diff --git a/reportdesign/source/ui/inc/dlgpage.hxx b/reportdesign/source/ui/inc/dlgpage.hxx index 0e40bd0c64e6..7b680840b16a 100644 --- a/reportdesign/source/ui/inc/dlgpage.hxx +++ b/reportdesign/source/ui/inc/dlgpage.hxx @@ -36,7 +36,7 @@ private: public: ORptPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, const OUString& rDialog); - virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override; + virtual void PageCreated(const OUString& rId, SfxTabPage& rPage) override; }; } // namespace rptui diff --git a/reportdesign/source/ui/inc/metadata.hxx b/reportdesign/source/ui/inc/metadata.hxx index c5ea24a82287..4b8c46b98a68 100644 --- a/reportdesign/source/ui/inc/metadata.hxx +++ b/reportdesign/source/ui/inc/metadata.hxx @@ -53,7 +53,7 @@ namespace rptui // IPropertyInfoService static sal_Int32 getPropertyId(const OUString& _rName); static OUString getPropertyTranslation(sal_Int32 _nId); - static OString getPropertyHelpId(sal_Int32 _nId); + static OUString getPropertyHelpId(sal_Int32 _nId); static PropUIFlags getPropertyUIFlags(sal_Int32 _nId); static void getExcludeProperties(::std::vector< css::beans::Property >& _rExcludeProperties,const css::uno::Reference< css::inspection::XPropertyHandler >& _xFormComponentHandler); @@ -84,7 +84,7 @@ namespace rptui class HelpIdUrl { public: - static OUString getHelpURL( std::string_view _sHelpId ); + static OUString getHelpURL( std::u16string_view _sHelpId ); }; diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx index 51edab1410ea..04404de5fdda 100644 --- a/reportdesign/source/ui/inspection/DefaultInspection.cxx +++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx @@ -30,11 +30,10 @@ namespace rptui { - OUString HelpIdUrl::getHelpURL( std::string_view sHelpId ) + OUString HelpIdUrl::getHelpURL( std::u16string_view sHelpId ) { - OUString aTmp( OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8) ); - DBG_ASSERT( INetURLObject( aTmp ).GetProtocol() == INetProtocol::NotValid, "Wrong HelpId!" ); - return INET_HID_SCHEME + aTmp; + DBG_ASSERT( INetURLObject(sHelpId).GetProtocol() == INetProtocol::NotValid, "Wrong HelpId!" ); + return INET_HID_SCHEME + sHelpId; } using namespace com::sun::star::uno; @@ -161,7 +160,7 @@ namespace rptui { const char* programmaticName; TranslateId uiNameResId; - OString helpId; + OUString helpId; } aCategories[] = { { "General", RID_STR_PROPPAGE_DEFAULT, HID_RPT_PROPDLG_TAB_GENERAL }, { "Data", RID_STR_PROPPAGE_DATA, HID_RPT_PROPDLG_TAB_DATA }, diff --git a/reportdesign/source/ui/inspection/metadata.cxx b/reportdesign/source/ui/inspection/metadata.cxx index fe8c5bae2527..954e7ee2141b 100644 --- a/reportdesign/source/ui/inspection/metadata.cxx +++ b/reportdesign/source/ui/inspection/metadata.cxx @@ -41,7 +41,7 @@ namespace rptui { OUString sName; OUString sTranslation; - OString sHelpId; + OUString sHelpId; sal_Int32 nId; PropUIFlags nUIFlags; @@ -49,13 +49,13 @@ namespace rptui OUString aName, sal_Int32 _nId, OUString aTranslation, - OString _sHelpId, + OUString _sHelpId, PropUIFlags _nUIFlags); }; OPropertyInfoImpl::OPropertyInfoImpl(OUString _aName, sal_Int32 _nId, - OUString aString, OString sHid, PropUIFlags _nUIFlags) + OUString aString, OUString sHid, PropUIFlags _nUIFlags) :sName(std::move(_aName)) ,sTranslation(std::move(aString)) ,sHelpId(std::move(sHid)) @@ -157,10 +157,10 @@ namespace rptui } - OString OPropertyInfoService::getPropertyHelpId(sal_Int32 _nId) + OUString OPropertyInfoService::getPropertyHelpId(sal_Int32 _nId) { const OPropertyInfoImpl* pInfo = getPropertyInfo(_nId); - return pInfo ? pInfo->sHelpId : OString(); + return pInfo ? pInfo->sHelpId : OUString(); } diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx b/reportdesign/source/ui/misc/FunctionHelper.cxx index e1b8768c60c4..363242a34457 100644 --- a/reportdesign/source/ui/misc/FunctionHelper.cxx +++ b/reportdesign/source/ui/misc/FunctionHelper.cxx @@ -191,9 +191,9 @@ OUString FunctionDescription::getSignature() const return m_xFunctionDescription->getSignature(); } -OString FunctionDescription::getHelpId() const +OUString FunctionDescription::getHelpId() const { - return OString(); + return {}; } bool FunctionDescription::isHidden() const diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 84d8dad1429f..e1d7fce1435f 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -136,7 +136,7 @@ void ODesignView::dispose() if ( m_xAddField ) { SvtViewOptions aDlgOpt( EViewType::Window, UID_RPT_RPT_APP_VIEW ); - aDlgOpt.SetWindowState(OStringToOUString(m_xAddField->getDialog()->get_window_state(vcl::WindowDataMask::All), RTL_TEXTENCODING_ASCII_US)); + aDlgOpt.SetWindowState(m_xAddField->getDialog()->get_window_state(vcl::WindowDataMask::All)); if (m_xAddField->getDialog()->get_visible()) m_xAddField->response(RET_CANCEL); @@ -145,8 +145,8 @@ void ODesignView::dispose() } if ( m_xReportExplorer ) { - SvtViewOptions aDlgOpt(EViewType::Window, OStringToOUString(m_xReportExplorer->get_help_id(), RTL_TEXTENCODING_UTF8)); - aDlgOpt.SetWindowState(OStringToOUString(m_xReportExplorer->getDialog()->get_window_state(vcl::WindowDataMask::All), RTL_TEXTENCODING_ASCII_US)); + SvtViewOptions aDlgOpt(EViewType::Window, m_xReportExplorer->get_help_id()); + aDlgOpt.SetWindowState(m_xReportExplorer->getDialog()->get_window_state(vcl::WindowDataMask::All)); if (m_xReportExplorer->getDialog()->get_visible()) m_xReportExplorer->response(RET_CANCEL); @@ -475,9 +475,9 @@ void ODesignView::toggleReportExplorer() { OReportController& rReportController = getController(); m_xReportExplorer = std::make_shared<ONavigator>(GetFrameWeld(), rReportController); - SvtViewOptions aDlgOpt(EViewType::Window, OStringToOUString(m_xReportExplorer->get_help_id(), RTL_TEXTENCODING_UTF8)); + SvtViewOptions aDlgOpt(EViewType::Window, m_xReportExplorer->get_help_id()); if ( aDlgOpt.Exists() ) - m_xReportExplorer->getDialog()->set_window_state(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US)); + m_xReportExplorer->getDialog()->set_window_state(aDlgOpt.GetWindowState()); } if (!m_xReportExplorer->getDialog()->get_visible()) @@ -515,7 +515,7 @@ void ODesignView::toggleAddField() m_xAddField->SetCreateHdl(LINK( &rReportController, OReportController, OnCreateHdl ) ); SvtViewOptions aDlgOpt( EViewType::Window, UID_RPT_RPT_APP_VIEW ); if ( aDlgOpt.Exists() ) - m_xAddField->getDialog()->set_window_state(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US)); + m_xAddField->getDialog()->set_window_state(aDlgOpt.GetWindowState()); m_xAddField->Update(); } if (!m_xAddField->getDialog()->get_visible()) diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index d2dcb5037467..4fa68d296b17 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -297,8 +297,8 @@ void OReportController::disposing() } if ( m_xGroupsFloater ) { - SvtViewOptions aDlgOpt(EViewType::Window, OStringToOUString(m_xGroupsFloater->get_help_id(), RTL_TEXTENCODING_UTF8)); - aDlgOpt.SetWindowState(OStringToOUString(m_xGroupsFloater->getDialog()->get_window_state(vcl::WindowDataMask::All), RTL_TEXTENCODING_ASCII_US)); + SvtViewOptions aDlgOpt(EViewType::Window, m_xGroupsFloater->get_help_id()); + aDlgOpt.SetWindowState(m_xGroupsFloater->getDialog()->get_window_state(vcl::WindowDataMask::All)); if (m_xGroupsFloater->getDialog()->get_visible()) m_xGroupsFloater->response(RET_CANCEL); m_xGroupsFloater.reset(); @@ -2542,9 +2542,9 @@ void OReportController::openSortingAndGroupingDialog() if (!m_xGroupsFloater) { m_xGroupsFloater = std::make_shared<OGroupsSortingDialog>(getFrameWeld(), !isEditable(), this); - SvtViewOptions aDlgOpt(EViewType::Window, OStringToOUString(m_xGroupsFloater->get_help_id(), RTL_TEXTENCODING_UTF8)); + SvtViewOptions aDlgOpt(EViewType::Window, m_xGroupsFloater->get_help_id()); if ( aDlgOpt.Exists() ) - m_xGroupsFloater->getDialog()->set_window_state(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US)); + m_xGroupsFloater->getDialog()->set_window_state(aDlgOpt.GetWindowState()); } if (isUiVisible()) { |