summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKira Tubo <kira.tubo@gmail.com>2024-06-16 23:22:11 -0700
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2024-06-20 09:11:16 +0200
commit14231e45ce5c8f2615fc5a448479960dfe1ed22b (patch)
tree21a8cc673dea651bfab1dcb19cc4081421489f5f /sc
parentdd6bc1243af8d20cb19c96598f805cc6c9703ce7 (diff)
tdf#146468: Match border tooltips in toolbar/sidebar
Update the border tooltips within Calc's toolbar and sidebar so that they have matching descriptions. Also update tooltips in Writer toolbar so that descriptions match across both apps. Change-Id: Ib7c682ed5035fe61d991209c4f2cf7f0a1a08a5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169052 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Stéphane Guillou <stephane.guillou@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/sidebar/CellBorderStyleControl.cxx20
-rw-r--r--sc/uiconfig/scalc/ui/floatingborderstyle.ui16
2 files changed, 20 insertions, 16 deletions
diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.cxx b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
index b6ec90b18e54..12ac05d23794 100644
--- a/sc/source/ui/sidebar/CellBorderStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
@@ -22,6 +22,8 @@
#include <editeng/borderline.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
+#include <svx/dialmgr.hxx>
+#include <svx/strings.hrc>
#include <svx/svxids.hrc>
#include <vcl/settings.hxx>
#include <editeng/lineitem.hxx>
@@ -62,12 +64,30 @@ CellBorderStylePopup::~CellBorderStylePopup()
void CellBorderStylePopup::Initialize()
{
+ // Tooltip values now controlled in svx/strings.hrc instead of sc/uiconfig/scalc/ui/floatingborderstyle.ui
mxTBBorder1->connect_clicked ( LINK(this, CellBorderStylePopup, TB1SelectHdl) );
+ mxTBBorder1->set_item_tooltip_text(0, SvxResId(RID_SVXSTR_TABLE_PRESET_NONE));
+ mxTBBorder1->set_item_tooltip_text(1, SvxResId(RID_SVXSTR_TABLE_PRESET_OUTERALL));
+ mxTBBorder1->set_item_tooltip_text(2, SvxResId(RID_SVXSTR_TABLE_PRESET_OUTER));
+ mxTBBorder1->set_item_tooltip_text(3, SvxResId(RID_SVXSTR_TABLE_PRESET_THICK));
mxTBBorder2->connect_clicked ( LINK(this, CellBorderStylePopup, TB2and3SelectHdl) );
+ mxTBBorder2->set_item_tooltip_text(0, SvxResId(RID_SVXSTR_PARA_PRESET_ONLYLEFT));
+ mxTBBorder2->set_item_tooltip_text(1, SvxResId(RID_SVXSTR_PARA_PRESET_ONLYRIGHT));
+ mxTBBorder2->set_item_tooltip_text(2, SvxResId(RID_SVXSTR_PARA_PRESET_ONLYTOP));
+ mxTBBorder2->set_item_tooltip_text(3, SvxResId(RID_SVXSTR_PARA_PRESET_ONLYBOTTOM));
+
mxTBBorder3->connect_clicked ( LINK(this, CellBorderStylePopup, TB2and3SelectHdl) );
+ mxTBBorder3->set_item_tooltip_text(0, SvxResId(RID_SVXSTR_PARA_PRESET_DIAGONALUP));
+ mxTBBorder3->set_item_tooltip_text(1, SvxResId(RID_SVXSTR_PARA_PRESET_DIAGONALDOWN));
+ mxTBBorder3->set_item_tooltip_text(2, SvxResId(RID_SVXSTR_PARA_PRESET_TOPBOTTOM));
+ mxTBBorder3->set_item_tooltip_text(3, SvxResId(RID_SVXSTR_PARA_PRESET_LEFTRIGHT));
mxTBBorder4->connect_clicked ( LINK(this, CellBorderStylePopup, TB4SelectHdl) );
+ mxTBBorder4->set_item_tooltip_text(0, SvxResId(RID_SVXSTR_TABLE_PRESET_THICKBOTTOM));
+ mxTBBorder4->set_item_tooltip_text(1, SvxResId(RID_SVXSTR_TABLE_PRESET_DOUBLEBOTTOM));
+ mxTBBorder4->set_item_tooltip_text(2, SvxResId(RID_SVXSTR_TABLE_PRESET_TOPTHICKBOTTOM));
+ mxTBBorder4->set_item_tooltip_text(3, SvxResId(RID_SVXSTR_TABLE_PRESET_TOPDOUBLEBOTTOM));
}
IMPL_LINK(CellBorderStylePopup, TB1SelectHdl, const OUString&, rId, void)
diff --git a/sc/uiconfig/scalc/ui/floatingborderstyle.ui b/sc/uiconfig/scalc/ui/floatingborderstyle.ui
index df407c4b456b..2640d06d051f 100644
--- a/sc/uiconfig/scalc/ui/floatingborderstyle.ui
+++ b/sc/uiconfig/scalc/ui/floatingborderstyle.ui
@@ -31,7 +31,6 @@
<child>
<object class="GtkToolButton" id="none">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|none|tooltip_text">No Border</property>
<property name="icon_name">sc/res/sidebar/CellBorder_Empty_18x18.png</property>
</object>
<packing>
@@ -42,7 +41,6 @@
<child>
<object class="GtkToolButton" id="all">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|all|tooltip_text">All Borders</property>
<property name="icon_name">sc/res/sidebar/CellBorder_All_18x18.png</property>
</object>
<packing>
@@ -53,7 +51,6 @@
<child>
<object class="GtkToolButton" id="outside">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|outside|tooltip_text">Outside Borders</property>
<property name="icon_name">sc/res/sidebar/CellBorder_FourBorders_18x18.png</property>
</object>
<packing>
@@ -64,7 +61,6 @@
<child>
<object class="GtkToolButton" id="thickbox">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|thickbox|tooltip_text">Thick Box Border</property>
<property name="icon_name">sc/res/sidebar/CellBorder_FourBorders_Thick_18x18.png</property>
</object>
<packing>
@@ -87,7 +83,6 @@
<child>
<object class="GtkToolButton" id="thickbottom">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|thickbottom|tooltip_text">Thick Bottom Border</property>
<property name="icon_name">sc/res/sidebar/CellBorder_Bottom_Thick_18x18.png</property>
</object>
<packing>
@@ -98,7 +93,6 @@
<child>
<object class="GtkToolButton" id="doublebottom">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|doublebottom|tooltip_text">Double Bottom Border</property>
<property name="icon_name">sc/res/sidebar/CellBorder_Bottom_Double_18x18.png</property>
</object>
<packing>
@@ -109,7 +103,6 @@
<child>
<object class="GtkToolButton" id="topthickbottom">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|topthickbottom|tooltip_text">Top and Thick Bottom Borders</property>
<property name="icon_name">sc/res/sidebar/CellBorder_TopThin_BottomThick_18x18.png</property>
</object>
<packing>
@@ -120,7 +113,6 @@
<child>
<object class="GtkToolButton" id="topdoublebottom">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|topdoublebottom|tooltip_text">Top and Double Bottom Borders</property>
<property name="icon_name">sc/res/sidebar/CellBorder_TopSingle_BottomDouble_18x18.png</property>
</object>
<packing>
@@ -143,7 +135,6 @@
<child>
<object class="GtkToolButton" id="left">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|left|tooltip_text">Left Border</property>
<property name="icon_name">sc/res/sidebar/CellBorder_Left_18x18.png</property>
</object>
<packing>
@@ -154,7 +145,6 @@
<child>
<object class="GtkToolButton" id="right">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|right|tooltip_text">Right Border</property>
<property name="icon_name">sc/res/sidebar/CellBorder_Right_18x18.png</property>
</object>
<packing>
@@ -165,7 +155,6 @@
<child>
<object class="GtkToolButton" id="top">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|top|tooltip_text">Top Border</property>
<property name="icon_name">sc/res/sidebar/CellBorder_Top_18x18.png</property>
</object>
<packing>
@@ -176,7 +165,6 @@
<child>
<object class="GtkToolButton" id="bottom">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|bottom|tooltip_text">Bottom Border</property>
<property name="icon_name">sc/res/sidebar/CellBorder_Bottom_18x18.png</property>
</object>
<packing>
@@ -199,7 +187,6 @@
<child>
<object class="GtkToolButton" id="diagup">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|diagup|tooltip_text">Diagonal Up Border</property>
<property name="use_underline">True</property>
<property name="icon_name">sc/res/sidebar/CellBorder_RightDiagonal_18x18.png</property>
</object>
@@ -211,7 +198,6 @@
<child>
<object class="GtkToolButton" id="diagdown">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|diagdown|tooltip_text">Diagonal Down Border</property>
<property name="use_underline">True</property>
<property name="icon_name">sc/res/sidebar/CellBorder_LeftDiagonal_18x18.png</property>
</object>
@@ -223,7 +209,6 @@
<child>
<object class="GtkToolButton" id="topbottom">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|topbottom|tooltip_text">Top and Bottom Borders</property>
<property name="use_underline">True</property>
<property name="icon_name">sc/res/sidebar/CellBorder_TopAndBottom_18x18.png</property>
</object>
@@ -235,7 +220,6 @@
<child>
<object class="GtkToolButton" id="leftright">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes" context="floatingborderstyle|leftright|tooltip_text">Left and Right Borders</property>
<property name="use_underline">True</property>
<property name="icon_name">sc/res/sidebar/CellBorder_LeftAndRight_18x18.png</property>
</object>