Kaydet (Commit) bf48090e authored tarafından Caolán McNamara's avatar Caolán McNamara

discard explicit SetAccessibleRelationMemberOf when members of a true VclFrame

I think the old use of "SetAccessibleRelationMemberOf" is a kind of workaround
to show that those widgets are logically all children of a pseudo-frame in the
a11y view. Now that they are truly children of a real frame I think we don't
need them anymore.

If it turns out that being implicit children of a frame isn't sufficient for
a11y, then hopefully we don't need to manually insert them everywhere but
instead make one centralized change down in vcl to automatically present
children of frame as "AccessibleRelationMemberOf"s.

RID_SVXQBX_DELETE_HEADFOOT: This one is still in use, so I added it back

Change-Id: I00df4bd376ba21b7cdc2af87763f7c9ae015b70a
üst 2cc80091
...@@ -58,7 +58,7 @@ ScHFPage::ScHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId ) ...@@ -58,7 +58,7 @@ ScHFPage::ScHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId )
nPageUsage ( (sal_uInt16)SVX_PAGE_ALL ), nPageUsage ( (sal_uInt16)SVX_PAGE_ALL ),
pStyleDlg ( NULL ) pStyleDlg ( NULL )
{ {
get(m_pBtnEdit,"buttonEdit"); get(m_pBtnEdit, "buttonEdit");
SetExchangeSupport(); SetExchangeSupport();
...@@ -83,8 +83,6 @@ ScHFPage::ScHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId ) ...@@ -83,8 +83,6 @@ ScHFPage::ScHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId )
m_pBtnEdit->SetHelpId( HID_SC_HEADER_EDIT ); m_pBtnEdit->SetHelpId( HID_SC_HEADER_EDIT );
else else
m_pBtnEdit->SetHelpId( HID_SC_FOOTER_EDIT ); m_pBtnEdit->SetHelpId( HID_SC_FOOTER_EDIT );
m_pBtnEdit->SetAccessibleRelationMemberOf(m_pFrm);
} }
//------------------------------------------------------------------ //------------------------------------------------------------------
......
...@@ -55,6 +55,7 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\ ...@@ -55,6 +55,7 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\
svx/source/dialog/docrecovery.src \ svx/source/dialog/docrecovery.src \
svx/source/dialog/fontwork.src \ svx/source/dialog/fontwork.src \
svx/source/dialog/frmsel.src \ svx/source/dialog/frmsel.src \
svx/source/dialog/hdft.src \
svx/source/dialog/imapdlg.src \ svx/source/dialog/imapdlg.src \
svx/source/dialog/langbox.src \ svx/source/dialog/langbox.src \
svx/source/dialog/language.src \ svx/source/dialog/language.src \
......
...@@ -72,8 +72,6 @@ ...@@ -72,8 +72,6 @@
#define HID_FONTWORK_TBI_STYLE_SLANTX "SVX_HID_FONTWORK_TBI_STYLE_SLANTX" #define HID_FONTWORK_TBI_STYLE_SLANTX "SVX_HID_FONTWORK_TBI_STYLE_SLANTX"
#define HID_FONTWORK_TBI_STYLE_SLANTY "SVX_HID_FONTWORK_TBI_STYLE_SLANTY" #define HID_FONTWORK_TBI_STYLE_SLANTY "SVX_HID_FONTWORK_TBI_STYLE_SLANTY"
#define HID_FONTWORK_TBI_STYLE_UPRIGHT "SVX_HID_FONTWORK_TBI_STYLE_UPRIGHT" #define HID_FONTWORK_TBI_STYLE_UPRIGHT "SVX_HID_FONTWORK_TBI_STYLE_UPRIGHT"
#define HID_FORMAT_FOOTER "SVX_HID_FORMAT_FOOTER"
#define HID_FORMAT_HEADER "SVX_HID_FORMAT_HEADER"
// free // free
#define HID_GALLERY_ICONVIEW "SVX_HID_GALLERY_ICONVIEW" #define HID_GALLERY_ICONVIEW "SVX_HID_GALLERY_ICONVIEW"
#define HID_GALLERY_LISTVIEW "SVX_HID_GALLERY_LISTVIEW" #define HID_GALLERY_LISTVIEW "SVX_HID_GALLERY_LISTVIEW"
......
...@@ -159,8 +159,6 @@ ...@@ -159,8 +159,6 @@
#define RID_SVXDLG_SEARCH (RID_SVX_START + 20) #define RID_SVXDLG_SEARCH (RID_SVX_START + 20)
// ResId fuer die PageDialog // ResId fuer die PageDialog
#define RID_SVXPAGE_FOOTER (RID_SVX_START + 26)
#define RID_SVXPAGE_HEADER (RID_SVX_START + 27)
#define RID_SVXQBX_DELETE_HEADFOOT (RID_SVX_START + 28) #define RID_SVXQBX_DELETE_HEADFOOT (RID_SVX_START + 28)
// ResId's fuer Dialoge aus StarDraw // ResId's fuer Dialoge aus StarDraw
......
...@@ -59,7 +59,6 @@ protected: ...@@ -59,7 +59,6 @@ protected:
SvxHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId ); SvxHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId );
VclFrame* m_pFrm;
FixedText* m_pPageLbl; FixedText* m_pPageLbl;
CheckBox* m_pTurnOnBox; CheckBox* m_pTurnOnBox;
CheckBox* m_pCntSharedBox; CheckBox* m_pCntSharedBox;
...@@ -77,12 +76,6 @@ protected: ...@@ -77,12 +76,6 @@ protected:
SvxPageWindow* m_pBspWin; SvxPageWindow* m_pBspWin;
PushButton* m_pBackgroundBtn; PushButton* m_pBackgroundBtn;
FixedText* m_pFooterOn;
FixedText* m_pFooterLbl;
FixedText* m_pHeaderOn;
FixedText* m_pHeaderLbl;
FixedText* m_pMsg;
sal_uInt16 nId; sal_uInt16 nId;
SfxItemSet* pBBSet; SfxItemSet* pBBSet;
sal_Bool bDisableQueryBox; sal_Bool bDisableQueryBox;
......
...@@ -164,9 +164,6 @@ SvxHFPage::SvxHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId ...@@ -164,9 +164,6 @@ SvxHFPage::SvxHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId
bEnableBackgroundSelector ( sal_True ) bEnableBackgroundSelector ( sal_True )
{ {
get(m_pFrm,"frameHdrOn");
get(m_pPageLbl,"labelHeaderFooterFormat");
get(m_pTurnOnBox,"checkHeaderOn");
get(m_pCntSharedBox,"checkSameLR"); get(m_pCntSharedBox,"checkSameLR");
get(m_pCntSharedFirstBox,"checkSameFP"); get(m_pCntSharedFirstBox,"checkSameFP");
get(m_pLMEdit,"spinMargLeft"); get(m_pLMEdit,"spinMargLeft");
...@@ -182,23 +179,19 @@ SvxHFPage::SvxHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId ...@@ -182,23 +179,19 @@ SvxHFPage::SvxHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId
get(m_pBspWin,"drawingareaPageHF"); get(m_pBspWin,"drawingareaPageHF");
get(m_pBackgroundBtn,"buttonMore"); get(m_pBackgroundBtn,"buttonMore");
get(m_pFooterOn,"labelFooterOn");
get(m_pFooterLbl,"labelFooter");
get(m_pHeaderOn,"labelHeaderOn");
get(m_pHeaderLbl,"labelHeader");
get(m_pMsg,"labelMsg");
//swap header <-> footer in UI //swap header <-> footer in UI
if(nId == SID_ATTR_PAGE_FOOTERSET) if(nId == SID_ATTR_PAGE_FOOTERSET)
{ {
m_pPageLbl->SetText(m_pFooterLbl->GetText()); get(m_pPageLbl,"labelFooterFormat");
m_pTurnOnBox->SetText(m_pFooterOn->GetText()); get(m_pTurnOnBox, "checkFooterOn");
} }
else //Header else //Header
{ {
m_pPageLbl->SetText(m_pHeaderLbl->GetText()); get(m_pPageLbl,"labelHeaderFormat");
m_pTurnOnBox->SetText(m_pHeaderOn->GetText()); get(m_pTurnOnBox, "checkHeaderOn");
} }
m_pTurnOnBox->Show();
m_pPageLbl->Show();
InitHandler(); InitHandler();
m_pBspWin->EnableRTL( sal_False ); m_pBspWin->EnableRTL( sal_False );
...@@ -213,21 +206,6 @@ SvxHFPage::SvxHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId ...@@ -213,21 +206,6 @@ SvxHFPage::SvxHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId
SetFieldUnit( *m_pHeightEdit, eFUnit ); SetFieldUnit( *m_pHeightEdit, eFUnit );
SetFieldUnit( *m_pLMEdit, eFUnit ); SetFieldUnit( *m_pLMEdit, eFUnit );
SetFieldUnit( *m_pRMEdit, eFUnit ); SetFieldUnit( *m_pRMEdit, eFUnit );
m_pTurnOnBox->SetAccessibleRelationMemberOf( m_pFrm );
m_pCntSharedBox->SetAccessibleRelationMemberOf( m_pFrm );
m_pCntSharedFirstBox->SetAccessibleRelationMemberOf( m_pFrm );
m_pLMLbl->SetAccessibleRelationMemberOf( m_pFrm );
m_pLMEdit->SetAccessibleRelationMemberOf( m_pFrm );
m_pRMLbl->SetAccessibleRelationMemberOf( m_pFrm );
m_pRMEdit->SetAccessibleRelationMemberOf( m_pFrm );
m_pDistFT->SetAccessibleRelationMemberOf( m_pFrm );
m_pDistEdit->SetAccessibleRelationMemberOf( m_pFrm );
m_pDynSpacingCB->SetAccessibleRelationMemberOf( m_pFrm );
m_pHeightFT->SetAccessibleRelationMemberOf( m_pFrm );
m_pHeightEdit->SetAccessibleRelationMemberOf( m_pFrm );
m_pHeightDynBtn->SetAccessibleRelationMemberOf( m_pFrm );
m_pBackgroundBtn->SetAccessibleRelationMemberOf(m_pFrm);
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
......
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <svx/dialogs.hrc>
QueryBox RID_SVXQBX_DELETE_HEADFOOT
{
Buttons = WB_YES_NO ;
DefButton = WB_DEF_NO ;
Message [ en-US ] = "Removing headers or footers deletes the contents.\nDo you want to delete this text?" ;
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment