summaryrefslogtreecommitdiff
path: root/sw/source/ui/frmdlg
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/frmdlg')
-rw-r--r--sw/source/ui/frmdlg/column.cxx43
-rw-r--r--sw/source/ui/frmdlg/column.hrc1
-rw-r--r--sw/source/ui/frmdlg/column.src12
-rw-r--r--sw/source/ui/frmdlg/frmmgr.cxx18
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx112
5 files changed, 153 insertions, 33 deletions
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 62b95165bd6b..9859f4875b46 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -68,6 +68,8 @@
#include <docary.hxx>
#include <pagedesc.hxx>
+#include "access.hrc"
+
#define FRAME_FORMAT_WIDTH 1000
// sw/inc/fmtclds.hxx
@@ -451,12 +453,13 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet)
: SfxTabPage(pParent, SW_RES(TP_COLUMN), rSet),
+ aFLGroup(this, SW_RES(FL_COLUMNS )),
aClNrLbl(this, SW_RES(FT_NUMBER )),
aCLNrEdt(this, SW_RES(ED_NUMBER )),
aDefaultVS(this, SW_RES(VS_DEFAULTS)),
aBalanceColsCB(this, SW_RES(CB_BALANCECOLS)),
- aFLGroup(this, SW_RES(FL_COLUMNS )),
+ aFLLayout(this, SW_RES(FL_LAYOUT)),
aBtnUp(this, SW_RES(BTN_DOWN)),
aColumnFT(this, SW_RES(FT_COLUMN)),
aWidthFT(this, SW_RES(FT_WIDTH)),
@@ -472,15 +475,13 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet)
aBtnDown(this, SW_RES(BTN_UP)),
aAutoWidthBox(this, SW_RES(CB_AUTO_WIDTH)),
- aFLLayout(this, SW_RES(FL_LAYOUT)),
-
+ aFLLineType(this, SW_RES(FL_LINETYPE)),
aLineTypeLbl(this, SW_RES(FT_STYLE)),
aLineTypeDLB(this, SW_RES(LB_STYLE)),
aLineHeightLbl(this, SW_RES(FT_HEIGHT)),
aLineHeightEdit(this, SW_RES(ED_HEIGHT)),
aLinePosLbl(this, SW_RES(FT_POSITION)),
aLinePosDLB(this, SW_RES(LB_POSITION)),
- aFLLineType(this, SW_RES(FL_LINETYPE)),
aVertFL(this, SW_RES(FL_VERT)),
aPropertiesFL( this, SW_RES( FL_PROPERTIES )),
@@ -505,6 +506,15 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet)
FreeResource();
SetExchangeSupport();
+ aBtnDown.SetAccessibleRelationMemberOf(&aFLLayout);
+ aEd1.SetAccessibleRelationLabeledBy(&aWidthFT);
+ aEd2.SetAccessibleRelationLabeledBy(&aWidthFT);
+ aEd3.SetAccessibleRelationLabeledBy(&aWidthFT);
+ aDistEd1.SetAccessibleRelationLabeledBy(&aDistFT);
+ aDistEd2.SetAccessibleRelationLabeledBy(&aDistFT);
+ aBtnUp.SetAccessibleRelationLabeledBy(&aColumnFT);
+ aBtnDown.SetAccessibleRelationLabeledBy(&aColumnFT);
+
aDefaultVS.SetHelpId(HID_COLUMN_VALUESET);
aDefaultVS.SetColCount( 5 );
aDefaultVS.SetStyle( aDefaultVS.GetStyle()
@@ -909,16 +919,41 @@ void SwColumnPage::SetLabels( sal_uInt16 nVis )
String sLbl( '~' );
String sLbl2( String::CreateFromInt32( nVis + 1 ));
+ String tmp1(sLbl2);
sLbl2.Insert(sLbl, sLbl2.Len() - 1);
aLbl1.SetText(sLbl2);
sLbl2 = String::CreateFromInt32( nVis + 2 );
+ String tmp2(sLbl2);
sLbl2.Insert(sLbl, sLbl2.Len() - 1);
aLbl2.SetText(sLbl2);
sLbl2 = String::CreateFromInt32( nVis + 3 );
+ String tmp3(sLbl2);
sLbl2.Insert(sLbl, sLbl2.Len() - 1);
aLbl3.SetText(sLbl2);
+ String sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
+ sColumnWidth.SearchAndReplaceAscii("%1", tmp1);
+ aEd1.SetAccessibleName(sColumnWidth);
+
+ sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
+ sColumnWidth.SearchAndReplaceAscii("%1", tmp2);
+ aEd2.SetAccessibleName(sColumnWidth);
+
+ sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
+ sColumnWidth.SearchAndReplaceAscii("%1", tmp3);
+ aEd3.SetAccessibleName(sColumnWidth);
+
+ String sDist = SW_RESSTR( STR_ACCESS_PAGESETUP_SPACING ) ;
+ String sDist1 = sDist;
+ sDist1.SearchAndReplaceAscii("%1", tmp1);
+ sDist1.SearchAndReplaceAscii("%2", tmp2);
+ aDistEd1.SetAccessibleName(sDist1);
+
+ String sDist2 = sDist;
+ sDist2.SearchAndReplaceAscii("%1", tmp2);
+ sDist2.SearchAndReplaceAscii("%2", tmp3);
+ aDistEd2.SetAccessibleName(sDist2);
}
/*------------------------------------------------------------------------
diff --git a/sw/source/ui/frmdlg/column.hrc b/sw/source/ui/frmdlg/column.hrc
index dd8b81e0c91a..e46697a8c618 100644
--- a/sw/source/ui/frmdlg/column.hrc
+++ b/sw/source/ui/frmdlg/column.hrc
@@ -79,7 +79,6 @@
#define FT_TEXTDIRECTION 60
#define LB_TEXTDIRECTION 61
#define FL_VERT 62
-
#define LISTBOX_SELECTION 0
#define LISTBOX_SECTION 1
#define LISTBOX_SECTIONS 2
diff --git a/sw/source/ui/frmdlg/column.src b/sw/source/ui/frmdlg/column.src
index 04e91ce3560a..c5ba19c9a958 100644
--- a/sw/source/ui/frmdlg/column.src
+++ b/sw/source/ui/frmdlg/column.src
@@ -30,6 +30,8 @@
#include "frmui.hrc"
#include "cmdid.h"
#include "helpid.h"
+#include "access.hrc"
+
// #define TP_COLUMN 256
TabPage TP_COLUMN
{
@@ -416,4 +418,14 @@ ModalDialog DLG_COLUMN
Text [ en-US ] = "Columns";
};
+//IAccessibility2 Impplementaton 2009-----
+String STR_ACCESS_PAGESETUP_SPACING
+{
+ Text [ en-US ] = "Spacing between %1 and %2";
+};
+String STR_ACCESS_COLUMN_WIDTH
+{
+ Text [ en-US ] = "Column %1 Width";
+};
+//-----IAccessibility2 Impplementaton 2009
diff --git a/sw/source/ui/frmdlg/frmmgr.cxx b/sw/source/ui/frmdlg/frmmgr.cxx
index 09c9764c460e..dd709b8243d4 100644
--- a/sw/source/ui/frmdlg/frmmgr.cxx
+++ b/sw/source/ui/frmdlg/frmmgr.cxx
@@ -71,7 +71,8 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, sal_uInt8 nTyp
pOwnSh( pSh ),
bAbsPos( sal_False ),
bNewFrm( bNew ),
- bIsInVertical( sal_False )
+ bIsInVertical( sal_False ),
+ bIsInVerticalL2R( sal_False )
{
if ( bNewFrm )
{
@@ -92,7 +93,7 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, sal_uInt8 nTyp
{
pOwnSh->GetFlyFrmAttr( aSet );
sal_Bool bRightToLeft;
- bIsInVertical = pOwnSh->IsFrmVertical(sal_True, bRightToLeft);
+ bIsInVertical = pOwnSh->IsFrmVertical(sal_True, bRightToLeft, bIsInVerticalL2R);
}
::PrepareBoxInfo( aSet, *pOwnSh );
}
@@ -102,12 +103,13 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, const SfxItemS
pOwnSh( pSh ),
bAbsPos( sal_False ),
bNewFrm( bNew ),
- bIsInVertical(sal_False)
+ bIsInVertical(sal_False),
+ bIsInVerticalL2R(sal_False)
{
if(!bNew)
{
sal_Bool bRightToLeft;
- bIsInVertical = pSh->IsFrmVertical(sal_True, bRightToLeft);
+ bIsInVertical = pSh->IsFrmVertical(sal_True, bRightToLeft, bIsInVerticalL2R);
}
}
@@ -297,7 +299,9 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
if (bOnlyPercentRefValue)
return;
- if(bIsInVertical)
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bIsInVertical || bIsInVerticalL2R )
+ // <--
{
Point aPos(aBoundRect.Pos());
long nTmp = aPos.X();
@@ -494,7 +498,9 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
rVal.nMaxVPos = -aBoundRect.Height();
}
}
- if(bIsInVertical)
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bIsInVertical || bIsInVerticalL2R )
+ // <--
{
//restore width/height exchange
long nTmp = rVal.nWidth;
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 9c107582aed9..e64ec62f6c3a 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -500,17 +500,32 @@ void lcl_InsertVectors(ListBox& rBox,
/* -----------------------------20.08.2002 16:12------------------------------
---------------------------------------------------------------------------*/
-SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, sal_Bool bVertical, sal_Bool bRTL)
+// --> OD 2009-08-31 #mongolianlayout#
+// add input parameter
+SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, sal_Bool bVertical, sal_Bool bVerticalL2R, sal_Bool bRTL)
{
//special handling of STR_FROMLEFT
- if(SwFPos::FROMLEFT == eStringId)
+ if ( SwFPos::FROMLEFT == eStringId )
+ {
+ eStringId = bVertical
+ ? ( bRTL
+ ? SwFPos::FROMBOTTOM
+ : SwFPos::FROMTOP )
+ : ( bRTL
+ ? SwFPos::FROMRIGHT
+ : SwFPos::FROMLEFT );
+ return eStringId;
+ }
+ // --> OD 2009-08-31 #mongolianlayout#
+ // special handling of STR_FROMTOP in case of mongolianlayout (vertical left-to-right)
+ if ( SwFPos::FROMTOP == eStringId &&
+ bVertical && bVerticalL2R )
{
- eStringId = bVertical ?
- bRTL ? SwFPos::FROMBOTTOM : SwFPos::FROMTOP :
- bRTL ? SwFPos::FROMRIGHT : SwFPos::FROMLEFT;
+ eStringId = SwFPos::FROMLEFT;
return eStringId;
}
- if(bVertical)
+ // <--
+ if ( bVertical )
{
//exchange horizontal strings with vertical strings and vice versa
static const StringIdPair_Impl aHoriIds[] =
@@ -535,6 +550,19 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString
{SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT },
{SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT }
};
+ // --> OD 2009-08-31 #monglianlayout#
+ static const StringIdPair_Impl aVertL2RIds[] =
+ {
+ {SwFPos::TOP, SwFPos::LEFT },
+ {SwFPos::BOTTOM, SwFPos::RIGHT },
+ {SwFPos::CENTER_VERT, SwFPos::CENTER_HORI },
+ {SwFPos::FROMTOP, SwFPos::FROMLEFT },
+ {SwFPos::REL_PG_TOP, SwFPos::REL_PG_LEFT },
+ {SwFPos::REL_PG_BOTTOM, SwFPos::REL_PG_RIGHT } ,
+ {SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT },
+ {SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT }
+ };
+ // <--
sal_uInt16 nIndex;
for(nIndex = 0; nIndex < sizeof(aHoriIds) / sizeof(StringIdPair_Impl); ++nIndex)
{
@@ -547,11 +575,24 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString
nIndex = 0;
for(nIndex = 0; nIndex < sizeof(aVertIds) / sizeof(StringIdPair_Impl); ++nIndex)
{
- if(aVertIds[nIndex].eHori == eStringId)
+ // --> OD 2009-08-31 #mongolianlayout#
+ if ( !bVerticalL2R )
{
- eStringId = aVertIds[nIndex].eVert;
- break;
+ if(aVertIds[nIndex].eHori == eStringId)
+ {
+ eStringId = aVertIds[nIndex].eVert;
+ break;
+ }
+ }
+ else
+ {
+ if(aVertL2RIds[nIndex].eHori == eStringId)
+ {
+ eStringId = aVertL2RIds[nIndex].eVert;
+ break;
+ }
}
+ // <--
}
}
return eStringId;
@@ -613,6 +654,7 @@ namespace
SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
SfxTabPage (pParent, SW_RES(TP_FRM_STD), rSet),
+ aSizeFL (this, SW_RES(FL_SIZE)),
aWidthFT (this, SW_RES(FT_WIDTH)),
aWidthAutoFT (this, SW_RES(FT_WIDTH_AUTO)),
aWidthED (this, SW_RES(ED_WIDTH)),
@@ -625,16 +667,16 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
aAutoHeightCB (this, SW_RES(CB_AUTOHEIGHT)),
aFixedRatioCB (this, SW_RES(CB_FIXEDRATIO)),
aRealSizeBT (this, SW_RES(BT_REALSIZE)),
- aSizeFL (this, SW_RES(FL_SIZE)),
- aTypeFL (this, SW_RES(FL_TYPE)),
aTypeSepFL (this, SW_RES(FL_TYPE_SEP)),
+ aTypeFL (this, SW_RES(FL_TYPE)),
aAnchorAtPageRB (this, SW_RES(RB_ANCHOR_PAGE)),
aAnchorAtParaRB (this, SW_RES(RB_ANCHOR_PARA)),
aAnchorAtCharRB (this, SW_RES(RB_ANCHOR_AT_CHAR)),
aAnchorAsCharRB (this, SW_RES(RB_ANCHOR_AS_CHAR)),
aAnchorAtFrameRB(this, SW_RES(RB_ANCHOR_FRAME)),
+ aPositionFL (this, SW_RES(FL_POSITION)),
aHorizontalFT (this, SW_RES(FT_HORIZONTAL)),
aHorizontalDLB (this, SW_RES(DLB_HORIZONTAL)),
aAtHorzPosFT (this, SW_RES(FT_AT_HORZ_POS)),
@@ -650,18 +692,21 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
aVertRelationLB (this, SW_RES(LB_VERT_RELATION)),
// OD 19.09.2003 #i18732# - new checkbox
aFollowTextFlowCB(this, SW_RES(CB_FOLLOWTEXTFLOW)),
- aPositionFL (this, SW_RES(FL_POSITION)),
aExampleWN (this, SW_RES(WN_BSP)),
bAtHorzPosModified( sal_False ),
bAtVertPosModified( sal_False ),
-
bFormat(sal_False),
bNew(sal_True),
bNoModifyHdl(sal_True),
- bVerticalChanged(sal_False),
+ // --> OD 2009-08-31 #mongolianlayout# - no used
+// bVerticalChanged(FALSE),
+ // <--
bIsVerticalFrame(sal_False),
+ // --> OD 2009-08-31 #mongolianlayou#
+ bIsVerticalL2R(sal_False),
+ // <--
bIsInRightToLeft(sal_False),
bHtmlMode(sal_False),
nHtmlMode(0),
@@ -685,6 +730,8 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
FreeResource();
SetExchangeSupport();
+ aRealSizeBT.SetAccessibleRelationMemberOf(&aSizeFL);
+
Link aLk = LINK(this, SwFrmPage, RangeModifyHdl);
aWidthED. SetLoseFocusHdl( aLk );
aHeightED. SetLoseFocusHdl( aLk );
@@ -811,7 +858,10 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
{
if (rAnchor.GetAnchorId() != FLY_AT_FLY && !pSh->IsFlyInFly())
aAnchorAtFrameRB.Hide();
- if(!bVerticalChanged && pSh->IsFrmVertical(sal_True, bIsInRightToLeft))
+ // --> OD 2009-08-31 #mongolianlayout#
+// if ( !bVerticalChanged && pSh->IsFrmVertical(sal_True, bIsInRightToLeft) )
+ if ( pSh->IsFrmVertical( sal_True, bIsInRightToLeft, bIsVerticalL2R ) )
+ // <--
{
String sHLabel = aHorizontalFT.GetText();
aHorizontalFT.SetText(aVerticalFT.GetText());
@@ -1323,7 +1373,12 @@ sal_uInt16 SwFrmPage::FillPosLB(const FrmMap* _pMap,
// if (!bFormat || (pMap[i].eStrId != SwFPos::FROMLEFT && pMap[i].eStrId != SwFPos::FROMTOP))
{
SvxSwFramePosString::StringId eStrId = aMirrorPagesCB.IsChecked() ? _pMap[i].eMirrorStrId : _pMap[i].eStrId;
- eStrId = lcl_ChangeResIdToVerticalOrRTL(eStrId, bIsVerticalFrame, bIsInRightToLeft);
+ // --> OD 2009-08-31 #mongolianlayout#
+ eStrId = lcl_ChangeResIdToVerticalOrRTL( eStrId,
+ bIsVerticalFrame,
+ bIsVerticalL2R,
+ bIsInRightToLeft);
+ // <--
String sEntry(aFramePosString.GetString(eStrId));
if (_rLB.GetEntryPos(sEntry) == LISTBOX_ENTRY_NOTFOUND)
{
@@ -1387,7 +1442,13 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap,
{
SvxSwFramePosString::StringId sStrId1 = aAsCharRelationMap[nRelPos].eStrId;
- sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, bIsVerticalFrame, bIsInRightToLeft);
+ // --> OD 2009-08-31 #mongolianlayout#
+ sStrId1 =
+ lcl_ChangeResIdToVerticalOrRTL( sStrId1,
+ bIsVerticalFrame,
+ bIsVerticalL2R,
+ bIsInRightToLeft);
+ // <--
String sEntry = aFramePosString.GetString(sStrId1);
sal_uInt16 nPos = _rLB.InsertEntry(sEntry);
_rLB.SetEntryData(nPos, &aAsCharRelationMap[nRelPos]);
@@ -1447,7 +1508,13 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap,
{
SvxSwFramePosString::StringId eStrId1 = aMirrorPagesCB.IsChecked() ?
aRelationMap[nRelPos].eMirrorStrId : aRelationMap[nRelPos].eStrId;
- eStrId1 = lcl_ChangeResIdToVerticalOrRTL(eStrId1, bIsVerticalFrame, bIsInRightToLeft);
+ // --> OD 2009-08-31 #mongolianlayout#
+ eStrId1 =
+ lcl_ChangeResIdToVerticalOrRTL( eStrId1,
+ bIsVerticalFrame,
+ bIsVerticalL2R,
+ bIsInRightToLeft);
+ // <--
String sEntry = aFramePosString.GetString(eStrId1);
sal_uInt16 nPos = _rLB.InsertEntry(sEntry);
_rLB.SetEntryData(nPos, &aRelationMap[nRelPos]);
@@ -2354,6 +2421,8 @@ SwGrfExtPage::SwGrfExtPage(Window *pParent, const SfxItemSet &rSet) :
{
FreeResource();
+ aBrowseBT.SetAccessibleRelationMemberOf(&aConnectFL);
+
SetExchangeSupport();
aMirrorHorzBox.SetClickHdl( LINK(this, SwGrfExtPage, MirrorHdl));
aMirrorVertBox.SetClickHdl( LINK(this, SwGrfExtPage, MirrorHdl));
@@ -2866,6 +2935,7 @@ void lcl_Move(Window& rWin, sal_Int32 nDiff)
SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) :
SfxTabPage(pParent, SW_RES(TP_FRM_ADD), rSet),
+ aNamesFL (this, SW_RES(FL_NAME)),
aNameFT (this, SW_RES(FT_NAME)),
aNameED (this, SW_RES(ED_NAME)),
aAltNameFT (this, SW_RES(FT_ALT_NAME)),
@@ -2874,20 +2944,18 @@ SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) :
aPrevLB (this, SW_RES(LB_PREV)),
aNextFT (this, SW_RES(FT_NEXT)),
aNextLB (this, SW_RES(LB_NEXT)),
- aNamesFL (this, SW_RES(FL_NAME)),
+ aProtectFL (this, SW_RES(FL_PROTECT)),
aProtectContentCB (this, SW_RES(CB_PROTECT_CONTENT)),
aProtectFrameCB (this, SW_RES(CB_PROTECT_FRAME)),
aProtectSizeCB (this, SW_RES(CB_PROTECT_SIZE)),
- aProtectFL (this, SW_RES(FL_PROTECT)),
+ aExtFL (this, SW_RES(FL_EXT)),
aEditInReadonlyCB (this, SW_RES(CB_EDIT_IN_READONLY)),
aPrintFrameCB (this, SW_RES(CB_PRINT_FRAME)),
aTextFlowFT (this, SW_RES(FT_TEXTFLOW)),
aTextFlowLB (this, SW_RES(LB_TEXTFLOW)),
- aExtFL (this, SW_RES(FL_EXT)),
-
pWrtSh(0),
nDlgType(0),