diff options
author | Muhammet Kara <muhammet.kara@pardus.org.tr> | 2016-06-06 11:13:57 +0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-06-07 08:12:01 +0000 |
commit | 71bdc1d936f7930a176f760d7148a152dd9cb3e4 (patch) | |
tree | 35e171d328f6f65ed6795e922161c2ad715f5553 /svx | |
parent | ca1d1c41f1dd4702bdffb1936b85bb6ac617219a (diff) |
Remove unnecessary strings in bmpmask dialog tdf#87026
By moving accessibility relations to the related .ui file,
and deleting calls to SetAccessibleName where possible.
Change-Id: Ic2b309d54d3579158bdf33468f0895ca2b2a393e
Reviewed-on: https://gerrit.libreoffice.org/25956
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/_bmpmask.cxx | 48 | ||||
-rw-r--r-- | svx/source/dialog/bmpmask.hrc | 3 | ||||
-rw-r--r-- | svx/source/dialog/bmpmask.src | 17 | ||||
-rw-r--r-- | svx/uiconfig/ui/dockingcolorreplace.ui | 118 |
4 files changed, 68 insertions, 118 deletions
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index f947e7aeb7e7..73f082133edd 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -1123,24 +1123,6 @@ bool SvxBmpMask::IsEyedropping() const */ void SvxBmpMask::SetAccessibleNames() { - OUString sSourceColor(BMP_RESID(RID_SVXDLG_BMPMASK_STR_SOURCECOLOR).toString()); - OUString sSourceColorN; - - sSourceColorN = sSourceColor; - sSourceColorN += " 1"; - m_pCbx1->SetAccessibleName (sSourceColorN); - - sSourceColorN = sSourceColor; - sSourceColorN += " 2"; - m_pCbx2->SetAccessibleName (sSourceColorN); - - sSourceColorN = sSourceColor; - sSourceColorN += " 3"; - m_pCbx3->SetAccessibleName (sSourceColorN); - - sSourceColorN = sSourceColor; - sSourceColorN += " 4"; - m_pCbx4->SetAccessibleName (sSourceColorN); // set the accessible name for valueset OUString sColorPalette (BMP_RESID( RID_SVXDLG_BMPMASK_STR_PALETTE)); OUString sColorPaletteN; @@ -1156,36 +1138,6 @@ void SvxBmpMask::SetAccessibleNames() sColorPaletteN = sColorPalette; sColorPaletteN += " 4"; m_pQSet4->SetText (sColorPaletteN); - // set the accessible for replace with spin boxes. - OUString sTolerance(BMP_RESID( RID_SVXDLG_BMPMASK_STR_TOLERANCE)); - OUString sToleranceN; - sToleranceN = sTolerance; - sToleranceN += " 1"; - m_pSp1->SetAccessibleName (sToleranceN); - sToleranceN = sTolerance; - sToleranceN += " 2"; - m_pSp2->SetAccessibleName (sToleranceN); - sToleranceN = sTolerance; - sToleranceN += " 3"; - m_pSp3->SetAccessibleName (sToleranceN); - sToleranceN = sTolerance; - sToleranceN += " 4"; - m_pSp4->SetAccessibleName (sToleranceN); - // set the accessible for replace with combo boxes. - OUString sReplaceWith(BMP_RESID( RID_SVXDLG_BMPMASK_STR_REPLACEWITH)); - OUString sReplaceWithN; - sReplaceWithN = sReplaceWith; - sReplaceWithN += " 1"; - m_pLbColor1->SetAccessibleName (sReplaceWithN); - sReplaceWithN = sReplaceWith; - sReplaceWithN += " 2"; - m_pLbColor2->SetAccessibleName (sReplaceWithN); - sReplaceWithN = sReplaceWith; - sReplaceWithN += " 3"; - m_pLbColor3->SetAccessibleName (sReplaceWithN); - sReplaceWithN = sReplaceWith; - sReplaceWithN += " 4"; - m_pLbColor4->SetAccessibleName (sReplaceWithN); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/bmpmask.hrc b/svx/source/dialog/bmpmask.hrc index 3fa3f8332e78..1e446c418145 100644 --- a/svx/source/dialog/bmpmask.hrc +++ b/svx/source/dialog/bmpmask.hrc @@ -17,9 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #define RID_SVXDLG_BMPMASK_STR_TRANSP (RID_SVX_BMPMASK_START + 1) -#define RID_SVXDLG_BMPMASK_STR_SOURCECOLOR (RID_SVX_BMPMASK_START + 2) #define RID_SVXDLG_BMPMASK_STR_PALETTE (RID_SVX_BMPMASK_START + 3) -#define RID_SVXDLG_BMPMASK_STR_TOLERANCE (RID_SVX_BMPMASK_START + 4) -#define RID_SVXDLG_BMPMASK_STR_REPLACEWITH (RID_SVX_BMPMASK_START + 5) /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/bmpmask.src b/svx/source/dialog/bmpmask.src index a6c6a405cf4a..d154d7ed0db9 100644 --- a/svx/source/dialog/bmpmask.src +++ b/svx/source/dialog/bmpmask.src @@ -27,26 +27,9 @@ String RID_SVXDLG_BMPMASK_STR_TRANSP Text [ en-US ] = "Transparent"; }; -String RID_SVXDLG_BMPMASK_STR_SOURCECOLOR -{ - // This string is used by the eyedropper dialog to denote a color in an image - // that will be replaced by another color. - Text [ en-US ] = "Source Color"; -}; - String RID_SVXDLG_BMPMASK_STR_PALETTE { Text [ en-US ] = "Color Palette"; }; -String RID_SVXDLG_BMPMASK_STR_TOLERANCE -{ - Text [ en-US ] = "Tolerance"; -}; - -String RID_SVXDLG_BMPMASK_STR_REPLACEWITH -{ - Text [ en-US ] = "Replace with"; -}; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/uiconfig/ui/dockingcolorreplace.ui b/svx/uiconfig/ui/dockingcolorreplace.ui index e9536129bf86..778c740f38bc 100644 --- a/svx/uiconfig/ui/dockingcolorreplace.ui +++ b/svx/uiconfig/ui/dockingcolorreplace.ui @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.16.1 --> +<!-- Generated with glade 3.20.0 --> <interface> <requires lib="gtk+" version="3.0"/> - <!-- interface-requires LibreOffice 1.0 --> + <requires lib="LibreOffice" version="1.0"/> <object class="GtkAdjustment" id="adjustment1"> <property name="upper">99</property> <property name="value">10</property> @@ -49,42 +49,37 @@ <object class="GtkLabel" id="label2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes">Source color</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> <property name="width">2</property> - <property name="height">1</property> </packing> </child> <child> <object class="GtkLabel" id="label3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes">Tolerance</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">2</property> <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> <object class="GtkLabel" id="label4"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes">Replace with...</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">3</property> <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -94,12 +89,15 @@ <property name="receives_default">False</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="cbx2-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes" comments="This string is used by the eyedropper dialog to denote a color in an image that will be replaced by another color.">Source Color 2</property> + </object> + </child> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">2</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -109,12 +107,15 @@ <property name="receives_default">False</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="cbx3-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes" comments="This string is used by the eyedropper dialog to denote a color in an image that will be replaced by another color.">Source Color 3</property> + </object> + </child> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">3</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -124,12 +125,15 @@ <property name="receives_default">False</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="cbx4-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes" comments="This string is used by the eyedropper dialog to denote a color in an image that will be replaced by another color.">Source Color 4</property> + </object> + </child> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">4</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -139,12 +143,15 @@ <property name="receives_default">False</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="cbx1-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes" comments="This string is used by the eyedropper dialog to denote a color in an image that will be replaced by another color.">Source Color 1</property> + </object> + </child> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -161,7 +168,6 @@ <property name="left_attach">0</property> <property name="top_attach">5</property> <property name="width">3</property> - <property name="height">1</property> </packing> </child> <child> @@ -169,57 +175,69 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="adjustment">adjustment1</property> + <child internal-child="accessible"> + <object class="AtkObject" id="tol1:0%-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes">Tolerance 1</property> + </object> + </child> </object> <packing> <property name="left_attach">2</property> <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> <object class="GtkSpinButton" id="tol2:0%"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="text" translatable="no">10</property> + <property name="text">10</property> <property name="adjustment">adjustment1</property> <property name="value">10</property> + <child internal-child="accessible"> + <object class="AtkObject" id="tol2:0%-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes">Tolerance 2</property> + </object> + </child> </object> <packing> <property name="left_attach">2</property> <property name="top_attach">2</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> <object class="GtkSpinButton" id="tol3:0%"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="text" translatable="no">10</property> + <property name="text">10</property> <property name="adjustment">adjustment1</property> <property name="value">10</property> + <child internal-child="accessible"> + <object class="AtkObject" id="tol3:0%-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes">Tolerance 3</property> + </object> + </child> </object> <packing> <property name="left_attach">2</property> <property name="top_attach">3</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> <object class="GtkSpinButton" id="tol4:0%"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="text" translatable="no">10</property> + <property name="text">10</property> <property name="adjustment">adjustment1</property> <property name="value">10</property> + <child internal-child="accessible"> + <object class="AtkObject" id="tol4:0%-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes">Tolerance 4</property> + </object> + </child> </object> <packing> <property name="left_attach">2</property> <property name="top_attach">4</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -227,12 +245,15 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="color1-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes">Replace with 1</property> + </object> + </child> </object> <packing> <property name="left_attach">3</property> <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -240,12 +261,15 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="color2-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes">Replace with 2</property> + </object> + </child> </object> <packing> <property name="left_attach">3</property> <property name="top_attach">2</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -253,12 +277,15 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="color3-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes">Replace with 3</property> + </object> + </child> </object> <packing> <property name="left_attach">3</property> <property name="top_attach">3</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -266,12 +293,15 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="color4-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes">Replace with 4</property> + </object> + </child> </object> <packing> <property name="left_attach">3</property> <property name="top_attach">4</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -282,8 +312,6 @@ <packing> <property name="left_attach">3</property> <property name="top_attach">5</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -316,8 +344,6 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -340,8 +366,6 @@ <packing> <property name="left_attach">1</property> <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -374,24 +398,18 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> </object> |