From bf48090e0a81c6490ee938eabaef4e791df85229 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 4 Mar 2013 11:21:29 +0000 Subject: 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 --- sc/source/ui/pagedlg/tphf.cxx | 4 +- svx/AllLangResTarget_svx.mk | 1 + svx/inc/helpid.hrc | 2 - svx/inc/svx/dialogs.hrc | 2 - svx/inc/svx/hdft.hxx | 7 - svx/source/dialog/hdft.cxx | 34 +- svx/source/dialog/hdft.src | 26 ++ svx/uiconfig/ui/headfootformatpage.ui | 696 +++++++++++++++++----------------- 8 files changed, 374 insertions(+), 398 deletions(-) create mode 100644 svx/source/dialog/hdft.src diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx index 2c62c9b9a6dd..e7542267d6c3 100644 --- a/sc/source/ui/pagedlg/tphf.cxx +++ b/sc/source/ui/pagedlg/tphf.cxx @@ -58,7 +58,7 @@ ScHFPage::ScHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId ) nPageUsage ( (sal_uInt16)SVX_PAGE_ALL ), pStyleDlg ( NULL ) { - get(m_pBtnEdit,"buttonEdit"); + get(m_pBtnEdit, "buttonEdit"); SetExchangeSupport(); @@ -83,8 +83,6 @@ ScHFPage::ScHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId ) m_pBtnEdit->SetHelpId( HID_SC_HEADER_EDIT ); else m_pBtnEdit->SetHelpId( HID_SC_FOOTER_EDIT ); - - m_pBtnEdit->SetAccessibleRelationMemberOf(m_pFrm); } //------------------------------------------------------------------ diff --git a/svx/AllLangResTarget_svx.mk b/svx/AllLangResTarget_svx.mk index 6591df1dc243..ca50785202c0 100644 --- a/svx/AllLangResTarget_svx.mk +++ b/svx/AllLangResTarget_svx.mk @@ -55,6 +55,7 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\ svx/source/dialog/docrecovery.src \ svx/source/dialog/fontwork.src \ svx/source/dialog/frmsel.src \ + svx/source/dialog/hdft.src \ svx/source/dialog/imapdlg.src \ svx/source/dialog/langbox.src \ svx/source/dialog/language.src \ diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc index a310c7969c8a..b1f1fdeb2273 100644 --- a/svx/inc/helpid.hrc +++ b/svx/inc/helpid.hrc @@ -72,8 +72,6 @@ #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_UPRIGHT "SVX_HID_FONTWORK_TBI_STYLE_UPRIGHT" -#define HID_FORMAT_FOOTER "SVX_HID_FORMAT_FOOTER" -#define HID_FORMAT_HEADER "SVX_HID_FORMAT_HEADER" // free #define HID_GALLERY_ICONVIEW "SVX_HID_GALLERY_ICONVIEW" #define HID_GALLERY_LISTVIEW "SVX_HID_GALLERY_LISTVIEW" diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc index fa416239192d..d41157c46877 100644 --- a/svx/inc/svx/dialogs.hrc +++ b/svx/inc/svx/dialogs.hrc @@ -159,8 +159,6 @@ #define RID_SVXDLG_SEARCH (RID_SVX_START + 20) // 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) // ResId's fuer Dialoge aus StarDraw diff --git a/svx/inc/svx/hdft.hxx b/svx/inc/svx/hdft.hxx index 57924c1aedee..bb1d2f507d3d 100644 --- a/svx/inc/svx/hdft.hxx +++ b/svx/inc/svx/hdft.hxx @@ -59,7 +59,6 @@ protected: SvxHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId ); - VclFrame* m_pFrm; FixedText* m_pPageLbl; CheckBox* m_pTurnOnBox; CheckBox* m_pCntSharedBox; @@ -77,12 +76,6 @@ protected: SvxPageWindow* m_pBspWin; PushButton* m_pBackgroundBtn; - FixedText* m_pFooterOn; - FixedText* m_pFooterLbl; - FixedText* m_pHeaderOn; - FixedText* m_pHeaderLbl; - FixedText* m_pMsg; - sal_uInt16 nId; SfxItemSet* pBBSet; sal_Bool bDisableQueryBox; diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 3a08520f9f7e..79d0eaf2f834 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -164,9 +164,6 @@ SvxHFPage::SvxHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId bEnableBackgroundSelector ( sal_True ) { - get(m_pFrm,"frameHdrOn"); - get(m_pPageLbl,"labelHeaderFooterFormat"); - get(m_pTurnOnBox,"checkHeaderOn"); get(m_pCntSharedBox,"checkSameLR"); get(m_pCntSharedFirstBox,"checkSameFP"); get(m_pLMEdit,"spinMargLeft"); @@ -182,23 +179,19 @@ SvxHFPage::SvxHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId get(m_pBspWin,"drawingareaPageHF"); 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 if(nId == SID_ATTR_PAGE_FOOTERSET) { - m_pPageLbl->SetText(m_pFooterLbl->GetText()); - m_pTurnOnBox->SetText(m_pFooterOn->GetText()); + get(m_pPageLbl,"labelFooterFormat"); + get(m_pTurnOnBox, "checkFooterOn"); } else //Header { - m_pPageLbl->SetText(m_pHeaderLbl->GetText()); - m_pTurnOnBox->SetText(m_pHeaderOn->GetText()); + get(m_pPageLbl,"labelHeaderFormat"); + get(m_pTurnOnBox, "checkHeaderOn"); } + m_pTurnOnBox->Show(); + m_pPageLbl->Show(); InitHandler(); m_pBspWin->EnableRTL( sal_False ); @@ -213,21 +206,6 @@ SvxHFPage::SvxHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId SetFieldUnit( *m_pHeightEdit, eFUnit ); SetFieldUnit( *m_pLMEdit, 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); } // ----------------------------------------------------------------------- diff --git a/svx/source/dialog/hdft.src b/svx/source/dialog/hdft.src new file mode 100644 index 000000000000..70fd30f176b2 --- /dev/null +++ b/svx/source/dialog/hdft.src @@ -0,0 +1,26 @@ +/* + * 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 + +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?" ; +}; diff --git a/svx/uiconfig/ui/headfootformatpage.ui b/svx/uiconfig/ui/headfootformatpage.ui index b6a26bad266d..28234fcb8156 100644 --- a/svx/uiconfig/ui/headfootformatpage.ui +++ b/svx/uiconfig/ui/headfootformatpage.ui @@ -2,11 +2,24 @@ + + 99.989999999999995 + 0.10000000000000001 + 10 + + + 0.10000000000000001 + 99.989999999999995 + 0.5 + 0.10000000000000001 + 10 + True False - start start + True + True 6 6 12 @@ -30,19 +43,50 @@ True False - start start + True + True vertical 6 - - Hea_der on + True - True - False - True - 0 - True + False + vertical + + + Hea_der on + True + False + True + True + True + 0 + True + + + False + True + 0 + + + + + _Footer on + True + False + True + True + True + 0 + True + + + False + True + 1 + + False @@ -51,250 +95,270 @@ - + True False - 0 - 0 - none + True + 12 - + True False - start start - 12 + True + 6 + 12 + + + Same _content left/right + True + True + False + True + True + 0 + True + + + 0 + 0 + 2 + 1 + + - + + Same content on first page + True + True + False + True + 0 + True + + + 0 + 1 + 2 + 1 + + + + True False - start - start - 6 - 12 - - - Same _content left/right - True - True - False - True - 0 - True - - - 0 - 0 - 1 - 1 - - - - - Same content on first page - True - True - False - 0 - True - - - 0 - 1 - 1 - 1 - - - - - True - False - 0 - _Left margin: - True - spinMargLeft:0.00cm - - - 0 - 2 - 1 - 1 - - - - - True - True - - True - - - 1 - 2 - 1 - 1 - - - - - True - False - 0 - R_ight margin: - True - spinMargRight:0.00cm - - - 0 - 3 - 1 - 1 - - - - - True - True - - True - - - 1 - 3 - 1 - 1 - - - - - True - False - 0 - _Spacing: - True - spinSpacing:0.00cm - - - 0 - 4 - 1 - 1 - - - - - True - True - - True - - - 1 - 4 - 1 - 1 - - - - - Use d_ynamic spacing - True - False - True - 0 - True - - - 0 - 5 - 1 - 1 - - - - - True - False - 0 - _Height: - True - spinHeight:0.00cm - end - - - 0 - 6 - 1 - 1 - - - - - True - True - - True - - - 1 - 6 - 1 - 1 - - + True + 0 + _Left margin: + True + spinMargLeft:0.00cm + + + 0 + 2 + 1 + 1 + + + + + True + True + center + + True + adjustment1 + 2 + + + 1 + 2 + 1 + 1 + + + + + True + False + True + 0 + R_ight margin: + True + spinMargRight:0.00cm + + + 0 + 3 + 1 + 1 + + + + + True + True + center + + True + adjustment1 + 2 + + + 1 + 3 + 1 + 1 + + + + + True + False + True + 0 + _Spacing: + True + spinSpacing:0.00cm + + + 0 + 4 + 1 + 1 + + + + + True + True + center + + True + adjustment1 + 2 + + + 1 + 4 + 1 + 1 + + + + + Use d_ynamic spacing + True + False + True + True + 0 + True + + + 0 + 5 + 2 + 1 + + + + + True + False + True + 0 + _Height: + True + spinHeight:0.00cm + end + + + 0 + 6 + 1 + 1 + + + + + True + True + center + + True + adjustment2 + 2 + + + 1 + 6 + 1 + 1 + + + + + _AutoFit height + True + True + False + True + True + 0 + True + + + 0 + 7 + 2 + 1 + + + + + True + False + 12 + start - - _AutoFit height + + More... True True - False - True - 0 - True + True - 0 - 7 - 1 - 1 + False + True + 0 - - More... - True + + _Edit... True True + True + 0.51999998092651367 + True - 0 - 8 - 1 - 1 + False + True + 1 - - - - - - - - - - - - - - - + + 0 + 8 + 2 + 1 + - - - False @@ -307,14 +371,42 @@ - + True False - 0 - Header - - - + vertical + + + False + True + 0 + Header + + + + + + False + True + 0 + + + + + False + True + 0 + Footer + + + + + + False + True + 1 + + @@ -326,135 +418,34 @@ - - False - - - False - Footer on - - - 0 - 0 - 1 - 1 - - - - - False - Footer - - - 0 - 1 - 1 - 1 - - - - - False - Header on - - - 1 - 0 - 1 - 1 - - - - - False - Header - - - 1 - 1 - 1 - 1 - - - - - - - - False - Removing headers or footers deletes the contents. -Do you want to delete this text? - - - 0 - 2 - 1 - 1 - - - - - 0 - 1 - 1 - 1 - - - - + True False - 0 - none + 6 - + True False - 6 + True + vertical + 6 - + True False - vertical - 6 - - - True - False - center - center - True - True - - - False - True - 0 - - - - - gtk-edit - True - True - True - True - 0.51999998092651367 - True - - - False - True - 1 - - + center + center + True + True + + True + True + 0 + - - - 1 @@ -463,15 +454,8 @@ Do you want to delete this text? 1 - - - True - - - - -- cgit