sc/inc/strings.hrc | 4 ++++ sc/source/ui/dbgui/tpsort.cxx | 18 ++++++++++++++++++ sc/source/ui/inc/tpsort.hxx | 4 ++++ 3 files changed, 26 insertions(+)
New commits: commit b7dfed873d79417fff83410760fec84567b534e9 Author: Arvind K <khandelwalarvin...@gmail.com> AuthorDate: Fri Apr 14 23:49:51 2023 +0530 Commit: Andreas Heinisch <andreas.heini...@yahoo.de> CommitDate: Mon Apr 24 10:39:20 2023 +0200 tdf#139544 change boundary columns to rows in sort dialog Change-Id: I7f525bea42e6efd3c7c4b62a21d2638b676cd836 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150432 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heini...@yahoo.de> diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc index f7d33399faa2..e860263424be 100644 --- a/sc/inc/strings.hrc +++ b/sc/inc/strings.hrc @@ -129,6 +129,10 @@ #define SCSTR_FORMULA_SYNTAX_XL_R1C1 NC_("SCSTR_FORMULA_SYNTAX_XL_R1C1", "Excel R1C1") #define SCSTR_COL_LABEL NC_("SCSTR_COL_LABEL", "Range contains column la~bels" ) #define SCSTR_ROW_LABEL NC_("SCSTR_ROW_LABEL", "Range contains ~row labels" ) +#define SCSTR_NOTES_COL_LABEL NC_("SCSTR_INCLUDE_NOTES_COL_LABEL","Include boundary column(s) containing only comments") +#define SCSTR_NOTES_ROW_LABEL NC_("SCSTR_INCLUDE_NOTES_ROW_LABEL","Include boundary row(s) containing only comments") +#define SCSTR_IMAGES_COL_LABEL NC_("SCSTR_INCLUDE_IMAGES_COL_LABEL","Include boundary column(s) containing only images") +#define SCSTR_IMAGES_ROW_LABEL NC_("SCSTR_INCLUDE_IMAGES_ROW_LABEL","Include boundary row(s) containing only images") #define SCSTR_VALERR NC_("SCSTR_VALERR", "Invalid value" ) #define STR_NOFORMULASPECIFIED NC_("STR_NOFORMULASPECIFIED", "No formula specified." ) #define STR_NOCOLROW NC_("STR_NOCOLROW", "Neither row or column specified." ) diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 88d6cf6472e2..c137ec4cf898 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -492,6 +492,10 @@ void ScTabPageSortFields::AddSortKey( sal_uInt16 nItem ) ScTabPageSortOptions::ScTabPageSortOptions(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rArgSet) : SfxTabPage(pPage, pController, "modules/scalc/ui/sortoptionspage.ui", "SortOptionsPage", &rArgSet) , aStrUndefined(ScResId(SCSTR_UNDEFINED)) + , aStrCommentsRowLabel(ScResId(SCSTR_NOTES_ROW_LABEL)) + , aStrCommentsColLabel(ScResId(SCSTR_NOTES_COL_LABEL)) + , aStrImgRowLabel(ScResId(SCSTR_IMAGES_ROW_LABEL)) + , aStrImgColLabel(ScResId(SCSTR_IMAGES_COL_LABEL)) , nWhichSort(rArgSet.GetPool()->GetWhich(SID_SORT)) , aSortData(rArgSet.Get(nWhichSort).GetSortData()) , pViewData(nullptr) @@ -557,6 +561,9 @@ void ScTabPageSortOptions::Init() m_xEdOutPos->set_text(OUString()); } + m_xBtnIncComments->set_label(aStrCommentsColLabel); + m_xBtnIncImages->set_label(aStrImgColLabel); + FillUserSortListBox(); // get available languages @@ -681,6 +688,17 @@ void ScTabPageSortOptions::ActivatePage( const SfxItemSet& rSet ) ScSortDlg* pDlg = static_cast<ScSortDlg*>(GetDialogController()); if (!pDlg) return; + + if (aSortData.bByRow) + { + m_xBtnIncComments->set_label(aStrCommentsRowLabel); + m_xBtnIncImages->set_label(aStrImgRowLabel); + } + else + { + m_xBtnIncComments->set_label(aStrCommentsColLabel); + m_xBtnIncImages->set_label(aStrImgColLabel); + } } DeactivateRC ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP ) diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx index 4e6a36ca9da5..1c9d27926b1c 100644 --- a/sc/source/ui/inc/tpsort.hxx +++ b/sc/source/ui/inc/tpsort.hxx @@ -113,6 +113,10 @@ protected: private: OUString aStrUndefined; + OUString aStrCommentsRowLabel; + OUString aStrCommentsColLabel; + OUString aStrImgRowLabel; + OUString aStrImgColLabel; TypedWhichId<ScSortItem> nWhichSort; ScSortParam aSortData;