Move accessibility relations to .ui files, Part 11: tdf#87026

By removing unnecessary variables/strings/function calls,
and making proper changes in the related .ui files.

As of this commit, all accessible relations of type
"SetAccessibleName" have been moved to .ui files
other than a few exceptions.

Change-Id: I5972211f58de70889066dec3c74341b405f82c85
Reviewed-on: https://gerrit.libreoffice.org/26520
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Muhammet Kara 2016-06-20 15:36:23 +03:00 committed by Caolán McNamara
parent 2d6a88135e
commit 0ea96b1a2f
10 changed files with 132 additions and 66 deletions

View file

@ -595,10 +595,8 @@ void SvtFileDialog::Init_Impl
bool bSaveMode = ( FILEDLG_MODE_SAVE == _pImp->_eMode );
_pImp->_pEdFileName->SetNoURLSelection( bSaveMode );
_pImp->_pBtnConnectToServer->SetAccessibleName( _pImp->_pBtnConnectToServer->GetQuickHelpText() );
_pImp->_pBtnNewFolder->SetStyle( _pImp->_pBtnNewFolder->GetStyle() | WB_NOPOINTERFOCUS );
_pImp->_pBtnUp->SetAccessibleName( _pImp->_pBtnUp->GetQuickHelpText() );
_pImp->_pBtnNewFolder->SetAccessibleName( _pImp->_pBtnNewFolder->GetQuickHelpText() );
if ( nStyle & PickerFlags::MultiSelection )
_pImp->_bMultiSelection = true;

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<requires lib="LibreOffice" version="1.0"/>
@ -77,6 +77,11 @@
<property name="has_tooltip">True</property>
<property name="tooltip_markup" translatable="yes">Connect To Server</property>
<property name="tooltip_text" translatable="yes">Connect To Server</property>
<child internal-child="accessible">
<object class="AtkObject" id="connect_to_server-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Connect To Server</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -108,6 +113,11 @@
<property name="has_tooltip">True</property>
<property name="tooltip_markup" translatable="yes">Create New Folder</property>
<property name="tooltip_text" translatable="yes">Create New Folder</property>
<child internal-child="accessible">
<object class="AtkObject" id="new_folder-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Create New Folder</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>

View file

@ -60,9 +60,6 @@ CopyDlg::CopyDlg(vcl::Window* pWindow, const SfxItemSet& rInAttrs,
get(m_pLbEndColor, "end");
get(m_pBtnSetDefault, "default");
// Set up the view data button (image and accessible name).
m_pBtnSetViewData->SetAccessibleName (m_pBtnSetViewData->GetQuickHelpText());
// color tables
DBG_ASSERT( mpColorList.is(), "No colortable available !" );
m_pLbStartColor->Fill( mpColorList );

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<requires lib="LibreOffice" version="1.0"/>
@ -156,6 +156,11 @@
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Values from Selection</property>
<property name="image">image1</property>
<child internal-child="accessible">
<object class="AtkObject" id="viewdata-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Values from Selection</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -195,10 +200,10 @@
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_X axis:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">x:0.00cm</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@ -209,10 +214,10 @@
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Y axis:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">y:0.00cm</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@ -223,10 +228,10 @@
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Angle:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">angle:0degrees</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@ -320,10 +325,10 @@
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Width:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">width:0.00cm</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@ -334,10 +339,10 @@
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Height:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">height:0.00cm</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@ -418,10 +423,10 @@
<object class="GtkLabel" id="label10">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Start:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">start</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@ -432,10 +437,10 @@
<object class="GtkLabel" id="endlabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_End:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">end</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>

View file

@ -108,9 +108,6 @@ void GraphicPropertyPanel::Initialize()
mpMtrGreen->SetModifyHdl( LINK( this, GraphicPropertyPanel, GreenHdl ) );
mpMtrBlue->SetModifyHdl( LINK( this, GraphicPropertyPanel, BlueHdl ) );
mpMtrGamma->SetModifyHdl( LINK( this, GraphicPropertyPanel, GammaHdl ) );
mpMtrRed->SetAccessibleName(mpMtrRed->GetQuickHelpText());
mpMtrGreen->SetAccessibleName(mpMtrGreen->GetQuickHelpText());
mpMtrBlue->SetAccessibleName(mpMtrBlue->GetQuickHelpText());
// Fix left position of some controls that may be wrong due to
// rounding errors.

View file

@ -167,10 +167,6 @@ void ParaPropertyPanel::InitToolBoxIndent()
mpRightIndent->SetModifyHdl( aLink );
mpFLineIndent->SetModifyHdl( aLink );
mpLeftIndent->SetAccessibleName(mpLeftIndent->GetQuickHelpText());
mpRightIndent->SetAccessibleName(mpRightIndent->GetQuickHelpText());
mpFLineIndent->SetAccessibleName(mpFLineIndent->GetQuickHelpText());
const sal_uInt16 nIdIncrement = mpTbxIndent_IncDec->GetItemId(UNO_INCREMENTINDENT);
const sal_uInt16 nIdDecrement = mpTbxIndent_IncDec->GetItemId(UNO_DECREMENTINDENT);
const sal_uInt16 nIdHanging = mpTbxIndent_IncDec->GetItemId(UNO_HANGINGINDENT);
@ -189,8 +185,6 @@ void ParaPropertyPanel::InitToolBoxSpacing()
mpTopDist->SetModifyHdl(aLink);
mpBottomDist->SetModifyHdl( aLink );
mpTopDist->SetAccessibleName(mpTopDist->GetQuickHelpText());
mpBottomDist->SetAccessibleName(mpBottomDist->GetQuickHelpText());
m_eULSpaceUnit = maULSpaceControl.GetCoreMetric();
}

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkAdjustment" id="0to100adjustment">
@ -43,10 +43,10 @@
<object class="GtkLabel" id="brightnesslabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Brightness:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">setbrightness:%</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@ -64,13 +64,13 @@
<property name="adjustment">plusminus100adjustment</property>
<property name="climb_rate">1</property>
<accessibility>
<relation type="labelled-by" target="brightnesslabel"/>
<relation type="labelled-by" target="brightnesslabel"/>
</accessibility>
<child internal-child="accessible">
<object class="AtkObject" id="setbrightness:%in">
<property name="AtkObject::accessible-name" translatable="yes">Brightness</property>
</object>
</child>
<child internal-child="accessible">
<object class="AtkObject" id="setbrightness:%-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Brightness</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
@ -81,10 +81,10 @@
<object class="GtkLabel" id="contrastlabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Contrast:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">setcontrast:%</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">1</property>
@ -101,14 +101,14 @@
<property name="invisible_char">•</property>
<property name="adjustment">plusminus100adjustment</property>
<property name="climb_rate">1</property>
<accessibility>
<relation type="labelled-by" target="contrastlabel"/>
</accessibility>
<child internal-child="accessible">
<object class="AtkObject" id="setcontrast:%in">
<accessibility>
<relation type="labelled-by" target="contrastlabel"/>
</accessibility>
<child internal-child="accessible">
<object class="AtkObject" id="setcontrast:%-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Contrast</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
@ -119,10 +119,10 @@
<object class="GtkLabel" id="colorlmodelabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Color _mode:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">setcolormode</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@ -134,12 +134,12 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<accessibility>
<relation type="labelled-by" target="colorlmodelabel"/>
<relation type="labelled-by" target="colorlmodelabel"/>
</accessibility>
<child internal-child="accessible">
<object class="AtkObject" id="setcolormode-in">
<property name="AtkObject::accessible-name" translatable="yes">Color mode</property>
</object>
<object class="AtkObject" id="setcolormode-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Color mode</property>
</object>
</child>
</object>
<packing>
@ -151,10 +151,10 @@
<object class="GtkLabel" id="transparencylabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Transparency:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">settransparency:%</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">1</property>
@ -172,12 +172,12 @@
<property name="adjustment">0to100adjustment</property>
<property name="climb_rate">1</property>
<accessibility>
<relation type="labelled-by" target="transparencylabel"/>
<relation type="labelled-by" target="transparencylabel"/>
</accessibility>
<child internal-child="accessible">
<object class="AtkObject" id="settransparency:%in">
<property name="AtkObject::accessible-name" translatable="yes">Transparency</property>
</object>
<object class="AtkObject" id="settransparency:%-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Transparency</property>
</object>
</child>
</object>
<packing>
@ -214,6 +214,11 @@
<property name="invisible_char">•</property>
<property name="adjustment">plusminus100adjustment</property>
<property name="climb_rate">1</property>
<child internal-child="accessible">
<object class="AtkObject" id="setred:%-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Red</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
@ -256,6 +261,11 @@
<property name="invisible_char">•</property>
<property name="adjustment">plusminus100adjustment</property>
<property name="climb_rate">1</property>
<child internal-child="accessible">
<object class="AtkObject" id="setgreen:%-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Green</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
@ -299,6 +309,11 @@
<property name="invisible_char">•</property>
<property name="adjustment">plusminus100adjustment</property>
<property name="climb_rate">1</property>
<child internal-child="accessible">
<object class="AtkObject" id="setblue:%-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Blue</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
@ -346,9 +361,9 @@
<relation target="image4"/>
</accessibility>
<child internal-child="accessible">
<object class="AtkObject" id="setgamma:0in">
<property name="AtkObject::accessible-name" translatable="yes">Gamma value</property>
</object>
<object class="AtkObject" id="setgamma:0-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Gamma value</property>
</object>
</child>
</object>
<packing>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.4"/>
<requires lib="LibreOffice" version="1.0"/>
@ -311,8 +311,13 @@
<property name="tooltip_text" translatable="yes">Above Paragraph Spacing</property>
<property name="hexpand">True</property>
<property name="invisible_char">•</property>
<property name="text" translatable="no">0</property>
<property name="text">0</property>
<property name="adjustment">adjustment1</property>
<child internal-child="accessible">
<object class="AtkObject" id="aboveparaspacing-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Above Paragraph Spacing</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -354,8 +359,13 @@
<property name="tooltip_text" translatable="yes">Below Paragraph Spacing</property>
<property name="hexpand">True</property>
<property name="invisible_char">•</property>
<property name="text" translatable="no">0</property>
<property name="text">0</property>
<property name="adjustment">adjustment1</property>
<child internal-child="accessible">
<object class="AtkObject" id="belowparaspacing-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Below Paragraph Spacing</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -507,8 +517,13 @@
<property name="tooltip_text" translatable="yes">Before Text Indent</property>
<property name="hexpand">True</property>
<property name="invisible_char">•</property>
<property name="text" translatable="no">0</property>
<property name="text">0</property>
<property name="adjustment">adjustment1</property>
<child internal-child="accessible">
<object class="AtkObject" id="beforetextindent-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Before Text Indent</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -549,8 +564,13 @@
<property name="tooltip_text" translatable="yes">After Text Indent</property>
<property name="hexpand">True</property>
<property name="invisible_char">•</property>
<property name="text" translatable="no">0</property>
<property name="text">0</property>
<property name="adjustment">adjustment1</property>
<child internal-child="accessible">
<object class="AtkObject" id="aftertextindent-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">After Text Indent</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -591,8 +611,13 @@
<property name="tooltip_text" translatable="yes">First Line Indent</property>
<property name="hexpand">True</property>
<property name="invisible_char">•</property>
<property name="text" translatable="no">0</property>
<property name="text">0</property>
<property name="adjustment">adjustment1</property>
<child internal-child="accessible">
<object class="AtkObject" id="firstlineindent-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">First Line Indent</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>

View file

@ -892,11 +892,6 @@ IMPL_LINK_TYPED( SwTableColumnPage, AutoClickHdl, Button*, pControl, void )
OUString sIndex = OUString::number( aValueTable[i] + 1 );
sEntry += sIndex;
m_pTextArr[i]->SetText( sEntry );
//added by menghu for SODC_5143,12/12/2006
OUString sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH);
sColumnWidth = sColumnWidth.replaceFirst( "%1", sIndex );
m_aFieldArr[i].SetAccessibleName( sColumnWidth );
}
m_pDownBtn->Enable(aValueTable[0] > 0);

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkAdjustment" id="adjustment1">
@ -17,13 +17,13 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-go-back</property>
<property name="icon-size">1</property>
<property name="icon_size">1</property>
</object>
<object class="GtkImage" id="image8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-go-forward</property>
<property name="icon-size">1</property>
<property name="icon_size">1</property>
</object>
<object class="GtkGrid" id="TableColumnPage">
<property name="visible">True</property>
@ -129,6 +129,11 @@
<property name="invisible_char">•</property>
<property name="adjustment">adjustment2</property>
<property name="digits">2</property>
<child internal-child="accessible">
<object class="AtkObject" id="width2:0.0cm-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Column 2 Width</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">2</property>
@ -145,6 +150,11 @@
<property name="invisible_char">•</property>
<property name="adjustment">adjustment2</property>
<property name="digits">2</property>
<child internal-child="accessible">
<object class="AtkObject" id="width3:0.00cm-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Column 3 Width</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">3</property>
@ -161,6 +171,11 @@
<property name="invisible_char">•</property>
<property name="adjustment">adjustment2</property>
<property name="digits">2</property>
<child internal-child="accessible">
<object class="AtkObject" id="width4:0.00cm-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Column 4 Width</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">4</property>
@ -177,6 +192,11 @@
<property name="invisible_char">•</property>
<property name="adjustment">adjustment2</property>
<property name="digits">2</property>
<child internal-child="accessible">
<object class="AtkObject" id="width5:0.00cm-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Column 5 Width</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">5</property>
@ -193,6 +213,11 @@
<property name="invisible_char">•</property>
<property name="adjustment">adjustment2</property>
<property name="digits">2</property>
<child internal-child="accessible">
<object class="AtkObject" id="width6:0.00cm-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Column 6 Width</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">6</property>
@ -294,6 +319,11 @@
<property name="invisible_char">•</property>
<property name="adjustment">adjustment2</property>
<property name="digits">2</property>
<child internal-child="accessible">
<object class="AtkObject" id="width1:0.00cm-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Column 1 Width</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>