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>
diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc
index 2da196f..2815c9a 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 b44bfb6..d159c65 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 3ad28fa..ac97c6a 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);