diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2021-06-23 16:58:23 +0200 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2021-06-25 10:15:49 +0200 |
commit | 0fd2012dcedc8f98b14dc478c71f9312d4c26c85 (patch) | |
tree | fea159475e8e47d8bedadc5a6c27340bae28e165 | |
parent | cd09753cb04a0649dfa9d3cb73ad7514af2d03bd (diff) |
Resolves tdf#125868 - Insert dialog text in case of RTL
Change-Id: I28725b2ec685b320fd68117109bdeaa00db55a35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117740
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
-rw-r--r-- | sc/inc/strings.hrc | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/inscldlg.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/inscldlg.cxx | 8 |
3 files changed, 10 insertions, 0 deletions
diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc index 2da196f51776..2815c9aa6d74 100644 --- a/sc/inc/strings.hrc +++ b/sc/inc/strings.hrc @@ -38,6 +38,7 @@ #define SCSTR_FILTER_TEXT_COLOR NC_("SCSTR_FILTER_TEXT_COLOR", "Text color") #define SCSTR_FILTER_BACKGROUND_COLOR NC_("SCSTR_FILTER_BACKGROUND_COLOR", "Background color") #define SCSTR_NONAME NC_("SCSTR_NONAME", "unnamed") +#define SCSTR_INSERT_RTL NC_("SCSTR_INSERT_RTL", "Shift cells left") // "%1 is replaced to column letter, such as 'Column A'" #define SCSTR_COLUMN NC_("SCSTR_COLUMN", "Column %1") // "%1 is replaced to row number, such as 'Row 1'" diff --git a/sc/source/ui/inc/inscldlg.hxx b/sc/source/ui/inc/inscldlg.hxx index b44bfb60baa9..d159c65cd8ac 100644 --- a/sc/source/ui/inc/inscldlg.hxx +++ b/sc/source/ui/inc/inscldlg.hxx @@ -30,6 +30,7 @@ private: std::unique_ptr<weld::RadioButton> m_xBtnCellsRight; std::unique_ptr<weld::RadioButton> m_xBtnInsRow; std::unique_ptr<weld::RadioButton> m_xBtnInsCol; + std::unique_ptr<weld::Label> m_xLbCellsRight; public: ScInsertCellDlg(weld::Window* pParent, bool bDisallowCellMove); diff --git a/sc/source/ui/miscdlgs/inscldlg.cxx b/sc/source/ui/miscdlgs/inscldlg.cxx index 3ad28fa36346..ac97c6ac3578 100644 --- a/sc/source/ui/miscdlgs/inscldlg.cxx +++ b/sc/source/ui/miscdlgs/inscldlg.cxx @@ -20,6 +20,9 @@ #undef SC_DLLIMPLEMENTATION #include <inscldlg.hxx> +#include <viewdata.hxx> +#include <strings.hrc> +#include <scresid.hxx> static sal_uInt8 nInsItemChecked = 0; @@ -29,7 +32,12 @@ ScInsertCellDlg::ScInsertCellDlg(weld::Window* pParent, bool bDisallowCellMove) , m_xBtnCellsRight(m_xBuilder->weld_radio_button("right")) , m_xBtnInsRow(m_xBuilder->weld_radio_button("rows")) , m_xBtnInsCol(m_xBuilder->weld_radio_button("cols")) + , m_xLbCellsRight(m_xBuilder->weld_label("right")) { + const ScViewData* pViewData = ScDocShell::GetViewData(); + if (pViewData && pViewData->GetDocument().IsLayoutRTL(pViewData->GetTabNo())) + m_xLbCellsRight->set_label(ScResId(SCSTR_INSERT_RTL)); + if (bDisallowCellMove) { m_xBtnCellsDown->set_sensitive(false); |