summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2021-03-03 15:28:15 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2021-03-04 08:15:29 +0100
commit23548f4ff51e28fec6751604a0a28197d6680773 (patch)
tree4a6ca4fdae1cccd61d378b207f2a34b931f0ff32 /svtools
parent6065e4f400390702080c7de3bcc3de670453a347 (diff)
Related tdf#140762 Add texts for "Border style" toolbar item
Make 'GetLineStyleName' a static method of 'SvtLineListBox' and use it to retrieve and set the names for the items used in the "Border Style" dropdown button in Calc's formatting toolbar. This ensures that the corresponding names are available as tooltips and for screen readers. Change-Id: I6b775e1bcd62deefd8a8a6a778dcee426bf3a1f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111905 Tested-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/ctrlbox.cxx31
1 files changed, 14 insertions, 17 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 2f7c3eb4dfdd..393c7439e2cb 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1403,23 +1403,6 @@ void SvtLineListBox::ImpGetLine( tools::Long nLine1, tools::Long nLine2, tools::
rBmp = aVirDev->GetBitmapEx( Point(), Size( aSize.Width(), n1+nDist+n2 ) );
}
-namespace
-{
- OUString GetLineStyleName(SvxBorderLineStyle eStyle)
- {
- OUString sRet;
- for (sal_uInt32 i = 0; i < SAL_N_ELEMENTS(RID_SVXSTR_BORDERLINE); ++i)
- {
- if (eStyle == RID_SVXSTR_BORDERLINE[i].second)
- {
- sRet = SvtResId(RID_SVXSTR_BORDERLINE[i].first);
- break;
- }
- }
- return sRet;
- }
-}
-
SvtLineListBox::SvtLineListBox(std::unique_ptr<weld::MenuButton> pControl)
: m_xControl(std::move(pControl))
, m_xBuilder(Application::CreateBuilder(m_xControl.get(), "svt/ui/linewindow.ui"))
@@ -1486,6 +1469,20 @@ SvtLineListBox::~SvtLineListBox()
{
}
+OUString SvtLineListBox::GetLineStyleName(SvxBorderLineStyle eStyle)
+{
+ OUString sRet;
+ for (sal_uInt32 i = 0; i < SAL_N_ELEMENTS(RID_SVXSTR_BORDERLINE); ++i)
+ {
+ if (eStyle == RID_SVXSTR_BORDERLINE[i].second)
+ {
+ sRet = SvtResId(RID_SVXSTR_BORDERLINE[i].first);
+ break;
+ }
+ }
+ return sRet;
+}
+
sal_Int32 SvtLineListBox::GetStylePos( sal_Int32 nListPos )
{
sal_Int32 nPos = -1;