summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2011-03-11 12:11:04 +0100
committerMichael Stahl <mst@openoffice.org>2011-03-11 12:11:04 +0100
commitad961773037471b9d41ba64effe3794fbeb1ec0a (patch)
treeaf63ae2127fdc0534f6b50ba5dcc447a4728f535 /sw/source
parent24738dfe47e16d7a75a7cec9b51db3b32de4ef3e (diff)
parentd9e49c5269404110c35dd85f964c93f4793f25a9 (diff)
sw34bf04: merge DEV300_m102
Diffstat (limited to 'sw/source')
-rwxr-xr-x[-rw-r--r--]sw/source/core/crsr/swcrsr.cxx11
-rw-r--r--sw/source/core/doc/docdesc.cxx2
-rw-r--r--sw/source/core/doc/docdraw.cxx20
-rw-r--r--sw/source/core/doc/doclay.cxx18
-rwxr-xr-x[-rw-r--r--]sw/source/core/doc/tblafmt.cxx4
-rw-r--r--sw/source/core/draw/dflyobj.cxx29
-rw-r--r--sw/source/core/draw/dview.cxx12
-rwxr-xr-x[-rw-r--r--]sw/source/core/edit/acorrect.cxx20
-rw-r--r--sw/source/core/edit/autofmt.cxx3
-rw-r--r--sw/source/core/frmedt/fews.cxx170
-rwxr-xr-x[-rw-r--r--]sw/source/core/inc/acorrect.hxx1
-rw-r--r--sw/source/core/inc/anchoredobjectposition.hxx60
-rw-r--r--sw/source/core/inc/frame.hxx48
-rw-r--r--sw/source/core/layout/calcmove.cxx17
-rw-r--r--sw/source/core/layout/colfrm.cxx3
-rw-r--r--sw/source/core/layout/findfrm.cxx3
-rw-r--r--sw/source/core/layout/fly.cxx14
-rw-r--r--sw/source/core/layout/flycnt.cxx171
-rw-r--r--sw/source/core/layout/ftnfrm.cxx6
-rw-r--r--sw/source/core/layout/layact.cxx10
-rw-r--r--sw/source/core/layout/newfrm.cxx58
-rw-r--r--sw/source/core/layout/pagechg.cxx15
-rw-r--r--sw/source/core/layout/paintfrm.cxx20
-rw-r--r--sw/source/core/layout/ssfrm.cxx15
-rw-r--r--sw/source/core/layout/tabfrm.cxx6
-rw-r--r--sw/source/core/layout/trvlfrm.cxx3
-rw-r--r--sw/source/core/layout/wsfrm.cxx54
-rw-r--r--sw/source/core/objectpositioning/anchoredobjectposition.cxx102
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx109
-rw-r--r--sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx12
-rw-r--r--sw/source/core/text/frmcrsr.cxx15
-rw-r--r--sw/source/core/text/frmform.cxx18
-rw-r--r--sw/source/core/text/frmpaint.cxx4
-rw-r--r--sw/source/core/text/inftxt.cxx6
-rw-r--r--sw/source/core/text/itrtxt.cxx6
-rw-r--r--sw/source/core/text/txtfrm.cxx89
-rw-r--r--sw/source/core/text/txttab.cxx121
-rw-r--r--sw/source/core/text/widorp.cxx10
-rw-r--r--sw/source/core/txtnode/atrref.cxx2
-rw-r--r--sw/source/core/txtnode/atrtox.cxx2
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx85
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx26
-rw-r--r--sw/source/core/txtnode/thints.cxx9
-rw-r--r--sw/source/core/txtnode/txtatr2.cxx18
-rwxr-xr-x[-rw-r--r--]sw/source/core/txtnode/txtedt.cxx10
-rw-r--r--sw/source/core/unocore/unorefmk.cxx2
-rw-r--r--sw/source/core/unocore/unotext.cxx55
-rw-r--r--sw/source/filter/ascii/parasc.cxx2
-rwxr-xr-x[-rw-r--r--]sw/source/filter/ww8/rtfexport.cxx17
-rwxr-xr-x[-rw-r--r--]sw/source/filter/ww8/rtfexport.hxx2
-rwxr-xr-x[-rw-r--r--]sw/source/filter/ww8/wrtw8nds.cxx24
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx1
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx1
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx5
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx52
-rw-r--r--sw/source/ui/app/apphdl.cxx23
-rw-r--r--sw/source/ui/app/swmodul1.cxx7
-rw-r--r--sw/source/ui/chrdlg/break.cxx7
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx2
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx8
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx6
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx4
-rw-r--r--sw/source/ui/config/optpage.cxx9
-rw-r--r--sw/source/ui/dialog/docstdlg.cxx18
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx10
-rw-r--r--sw/source/ui/docvw/access.src19
-rw-r--r--sw/source/ui/docvw/edtwin.cxx8
-rw-r--r--sw/source/ui/envelp/label1.cxx12
-rw-r--r--sw/source/ui/envelp/labprt.cxx6
-rw-r--r--sw/source/ui/envelp/labprt.hxx4
-rw-r--r--sw/source/ui/envelp/swuilabimp.hxx7
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx16
-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.cxx116
-rw-r--r--sw/source/ui/inc/bookmark.hxx2
-rw-r--r--sw/source/ui/inc/break.hxx2
-rw-r--r--sw/source/ui/inc/column.hxx6
-rw-r--r--sw/source/ui/inc/docstdlg.hxx17
-rw-r--r--sw/source/ui/inc/drpcps.hxx4
-rw-r--r--sw/source/ui/inc/frmmgr.hxx3
-rw-r--r--sw/source/ui/inc/frmpage.hxx15
-rw-r--r--sw/source/ui/inc/glosbib.hxx7
-rw-r--r--sw/source/ui/inc/insfnote.hxx8
-rw-r--r--sw/source/ui/inc/linenum.hxx6
-rw-r--r--sw/source/ui/inc/num.hxx4
-rw-r--r--sw/source/ui/inc/numpara.hxx2
-rw-r--r--sw/source/ui/inc/optpage.hxx2
-rw-r--r--sw/source/ui/inc/outline.hxx4
-rw-r--r--sw/source/ui/inc/pgfnote.hxx4
-rw-r--r--sw/source/ui/inc/rowht.hxx2
-rw-r--r--sw/source/ui/inc/split.hxx4
-rw-r--r--sw/source/ui/inc/srtdlg.hxx4
-rw-r--r--sw/source/ui/inc/swrenamexnameddlg.hxx2
-rw-r--r--sw/source/ui/inc/swuicnttab.hxx10
-rw-r--r--sw/source/ui/inc/swuiidxmrk.hxx2
-rw-r--r--sw/source/ui/inc/tautofmt.hxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx38
-rw-r--r--sw/source/ui/index/cnttab.hrc1
-rwxr-xr-x[-rw-r--r--]sw/source/ui/index/cnttab.src10
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx4
-rwxr-xr-x[-rw-r--r--]sw/source/ui/lingu/hhcwrp.cxx10
-rw-r--r--sw/source/ui/misc/bookmark.cxx3
-rw-r--r--sw/source/ui/misc/docfnote.cxx11
-rw-r--r--sw/source/ui/misc/glosbib.cxx7
-rw-r--r--sw/source/ui/misc/glossary.cxx11
-rw-r--r--sw/source/ui/misc/glossary.src8
-rw-r--r--sw/source/ui/misc/impfnote.hxx8
-rw-r--r--sw/source/ui/misc/insfnote.cxx8
-rw-r--r--sw/source/ui/misc/insfnote.hrc4
-rw-r--r--sw/source/ui/misc/insfnote.src6
-rw-r--r--sw/source/ui/misc/linenum.cxx19
-rw-r--r--sw/source/ui/misc/num.cxx5
-rw-r--r--sw/source/ui/misc/outline.cxx13
-rw-r--r--sw/source/ui/misc/pgfnote.cxx12
-rw-r--r--sw/source/ui/misc/srtdlg.cxx46
-rw-r--r--sw/source/ui/shells/drwbassh.cxx11
-rwxr-xr-x[-rw-r--r--]sw/source/ui/shells/textsh.cxx8
-rw-r--r--sw/source/ui/table/colwd.cxx2
-rw-r--r--sw/source/ui/table/convert.cxx2
-rw-r--r--sw/source/ui/table/convert.hrc3
-rw-r--r--sw/source/ui/table/convert.src6
-rw-r--r--sw/source/ui/table/rowht.cxx2
-rw-r--r--sw/source/ui/table/tabledlg.cxx36
-rw-r--r--sw/source/ui/table/tabledlg.hrc1
-rw-r--r--sw/source/ui/table/tabledlg.src1
-rw-r--r--sw/source/ui/table/tablepg.hxx3
-rw-r--r--sw/source/ui/table/tautofmt.cxx2
-rw-r--r--sw/source/ui/uiview/viewtab.cxx33
-rwxr-xr-x[-rw-r--r--]sw/source/ui/uno/unotxdoc.cxx19
-rwxr-xr-x[-rw-r--r--]sw/source/ui/uno/unotxvw.cxx2
-rw-r--r--sw/source/ui/utlui/navipi.cxx10
-rw-r--r--sw/source/ui/utlui/navipi.hrc1
-rw-r--r--sw/source/ui/utlui/navipi.src13
-rw-r--r--sw/source/ui/utlui/poolfmt.src23
-rw-r--r--sw/source/ui/utlui/swrenamexnameddlg.cxx4
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx6
140 files changed, 1824 insertions, 656 deletions
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 5dbc7e0f9d..777144be3b 100644..100755
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -973,7 +973,7 @@ sal_uLong SwCursor::FindAll( SwFindParas& rParas,
{
// Cursor als Kopie vom akt. und in den Ring aufnehmen
// Verkettung zeigt immer auf den zuerst erzeugten, also vorwaerts
- SwCursor* pSav = Create( this ); // sicher den aktuellen Crsr
+ std::auto_ptr< SwCursor > pSav( Create( this ) ); // save the current cursor
// wenn schon ausserhalb vom Bodytext, suche von der Position,
// ansonsten beginne mit der 1. GrundSection
@@ -1004,8 +1004,8 @@ sal_uLong SwCursor::FindAll( SwFindParas& rParas,
DeleteMark();
return 0;
}
+ pSav.release();
- delete pSav;
if( !( FND_IN_SELALL & eFndRngs ))
{
// es sollte nur einer gesucht werden, also fuege in dazu
@@ -1031,7 +1031,7 @@ sal_uLong SwCursor::FindAll( SwFindParas& rParas,
}
else if( FND_IN_SELALL & eFndRngs )
{
- SwCursor* pSav = Create( this ); // sicher den aktuellen Crsr
+ ::std::auto_ptr< SwCursor> pSav( Create( this ) ); // save the current cursor
const SwNode* pSttNd = ( FND_IN_BODYONLY & eFndRngs )
? rNds.GetEndOfContent().StartOfSectionNode()
@@ -1058,10 +1058,7 @@ sal_uLong SwCursor::FindAll( SwFindParas& rParas,
DeleteMark();
return 0;
}
- // es wurde ein- bis mehrmals gefunden. Das steht alles
- // im neuen Crsr-Ring. Darum hebe erstmal den alten Ring auf
- delete pSav;
-
+ pSav.release();
while( GetNext() != this )
delete GetNext();
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 1fa3d04c94..8083535e21 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -610,7 +610,7 @@ sal_uInt16 SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy,
pNew = new SwPageDesc( rName, GetDfltFrmFmt(), this );
//Default-Seitenformat einstellen.
lcl_DefaultPageFmt( USHRT_MAX, pNew->GetMaster(), pNew->GetLeft() );
-
+
SvxFrameDirection aFrameDirection = bRegardLanguage ?
GetDefaultFrameDirection(GetAppLanguage())
: FRMDIR_HORI_LEFT_TOP;
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index b937130791..a5991c7e04 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -140,11 +140,12 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt,
{
case FRMDIR_VERT_TOP_LEFT:
{
- // vertical from left-to-right - not supported yet
+ // vertical from left-to-right - Badaa: supported now!
bVert = true;
bR2L = true;
- ASSERT( false,
- "<lcl_AdjustPositioningAttr(..)> - vertical from left-to-right not supported." );
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ //ASSERT( false, "<lcl_AdjustPositioningAttr(..)> - vertical from left-to-right not supported." );
+ //End
}
break;
case FRMDIR_VERT_TOP_RIGHT:
@@ -173,10 +174,18 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt,
}
// use geometry of drawing object
const SwRect aObjRect = _rSdrObj.GetSnapRect();
+
if ( bVert )
{
- nHoriRelPos = aObjRect.Top() - aAnchorPos.Y();
- nVertRelPos = aAnchorPos.X() - aObjRect.Right();
+ if ( bR2L ) {
+ //FRMDIR_VERT_TOP_LEFT
+ nHoriRelPos = aObjRect.Left() - aAnchorPos.X();
+ nVertRelPos = aObjRect.Top() - aAnchorPos.Y();
+ } else {
+ //FRMDIR_VERT_TOP_RIGHT
+ nHoriRelPos = aObjRect.Top() - aAnchorPos.Y();
+ nVertRelPos = aAnchorPos.X() - aObjRect.Right();
+ }
}
else if ( bR2L )
{
@@ -188,6 +197,7 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt,
nHoriRelPos = aObjRect.Left() - aAnchorPos.X();
nVertRelPos = aObjRect.Top() - aAnchorPos.Y();
}
+ //End of SCMS
}
_pFrmFmt->SetFmtAttr( SwFmtHoriOrient( nHoriRelPos, text::HoriOrientation::NONE, text::RelOrientation::FRAME ) );
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index f5fa0eb910..68f69c4792 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1312,6 +1312,17 @@ lcl_InsertLabel(SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
//Erstmal das Format zum Fly besorgen und das Layout entkoppeln.
SwFrmFmt *pOldFmt = rDoc.GetNodes()[nNdIdx]->GetFlyFmt();
ASSERT( pOldFmt, "Format des Fly nicht gefunden." );
+ // --> OD #i115719#
+ // <title> and <description> attributes are lost when calling <DelFrms()>.
+ // Thus, keep them and restore them after the calling <MakeFrms()>
+ const bool bIsSwFlyFrmFmtInstance( dynamic_cast<SwFlyFrmFmt*>(pOldFmt) != 0 );
+ const String sTitle( bIsSwFlyFrmFmtInstance
+ ? static_cast<SwFlyFrmFmt*>(pOldFmt)->GetObjTitle()
+ : String() );
+ const String sDescription( bIsSwFlyFrmFmtInstance
+ ? static_cast<SwFlyFrmFmt*>(pOldFmt)->GetObjDescription()
+ : String() );
+ // <--
pOldFmt->DelFrms();
pNewFmt = rDoc.MakeFlyFrmFmt( rDoc.GetUniqueFrameName(),
@@ -1449,6 +1460,13 @@ lcl_InsertLabel(SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
//Nun nur noch die Flys erzeugen lassen. Das ueberlassen
//wir vorhanden Methoden (insb. fuer InCntFlys etwas aufwendig).
pNewFmt->MakeFrms();
+ // --> OD #i115719#
+ if ( bIsSwFlyFrmFmtInstance )
+ {
+ static_cast<SwFlyFrmFmt*>(pOldFmt)->SetObjTitle( sTitle );
+ static_cast<SwFlyFrmFmt*>(pOldFmt)->SetObjDescription( sDescription );
+ }
+ // <--
}
break;
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 0c1c604bb5..01cb4c95a7 100644..100755
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -336,7 +336,7 @@ sal_Bool SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, s
READ( aFont, SvxFontItem , rVersions.nFontVersion)
if( rStream.GetStreamCharSet() == aFont.GetCharSet() )
- aFont.GetCharSet() = ::gsl_getSystemTextEncoding();
+ aFont.SetCharSet(::gsl_getSystemTextEncoding());
READ( aHeight, SvxFontHeightItem , rVersions.nFontHeightVersion)
READ( aWeight, SvxWeightItem , rVersions.nWeightVersion)
@@ -424,7 +424,7 @@ sal_Bool SwBoxAutoFmt::LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] )
READ( aFont, SvxFontItem , 0)
if( rStream.GetStreamCharSet() == aFont.GetCharSet() )
- aFont.GetCharSet() = ::gsl_getSystemTextEncoding();
+ aFont.SetCharSet(::gsl_getSystemTextEncoding());
READ( aHeight, SvxFontHeightItem , 1)
READ( aWeight, SvxWeightItem , 2)
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 05fe38f414..3932759445 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -679,8 +679,19 @@ void __EXPORT SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
long lYDiff = aNewPos.Y() - aOldPos.Y();
if( GetFlyFrm()->GetAnchorFrm()->IsVertical() )
{
- lXDiff -= rVert.GetPos();
- lYDiff += rHori.GetPos();
+ //lXDiff -= rVert.GetPos();
+ //lYDiff += rHori.GetPos();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( GetFlyFrm()->GetAnchorFrm()->IsVertLR() )
+ {
+ lXDiff += rVert.GetPos();
+ lXDiff = -lXDiff;
+ }
+ else
+ {
+ lXDiff -= rVert.GetPos();
+ lYDiff += rHori.GetPos();
+ }
}
else
{
@@ -791,7 +802,9 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef,
const sal_Bool bRTL = pTmpFrm->IsRightToLeft();
- const Point aNewPos( bVertX || bRTL ?
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ const bool bVertL2RX = pTmpFrm->IsVertLR();
+ const Point aNewPos( ( bVertX && !bVertL2RX ) || bRTL ?
aOutRect.Right() + 1 :
aOutRect.Left(),
aOutRect.Top() );
@@ -856,10 +869,9 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef,
}
//Position kann auch veraendert sein!
- const Point aOldPos( bVertX || bRTL ?
+ const Point aOldPos( ( bVertX && !bVertL2RX ) || bRTL ?
GetFlyFrm()->Frm().TopRight() :
GetFlyFrm()->Frm().Pos() );
-
if ( aNewPos != aOldPos )
{
//Kann sich durch das ChgSize veraendert haben!
@@ -867,7 +879,12 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef,
{
if( aOutRect.TopRight() != aNewPos )
{
- SwTwips nDeltaX = aNewPos.X() - aOutRect.Right();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwTwips nDeltaX;
+ if ( bVertL2RX )
+ nDeltaX = aNewPos.X() - aOutRect.Left();
+ else
+ nDeltaX = aNewPos.X() - aOutRect.Right();
SwTwips nDeltaY = aNewPos.Y() - aOutRect.Top();
MoveRect( aOutRect, Size( nDeltaX, nDeltaY ) );
}
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index d057d169ec..b0e484ba7f 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -279,8 +279,9 @@ void SwDrawView::AddCustomHdl()
}
// add anchor handle:
- aHdl.AddHdl( new SwSdrHdl( aPos, pAnch->IsVertical() ||
- pAnch->IsRightToLeft() ) );
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ aHdl.AddHdl( new SwSdrHdl( aPos, ( pAnch->IsVertical() && !pAnch->IsVertLR() ) ||
+ pAnch->IsRightToLeft() ) );
}
/*************************************************************************
@@ -829,9 +830,10 @@ const SwFrm* SwDrawView::CalcAnchor()
aMyRect = pObj->GetSnapRect();
}
- const sal_Bool bTopRight = pAnch && ( pAnch->IsVertical() ||
- pAnch->IsRightToLeft() );
-
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ const sal_Bool bTopRight = pAnch && ( ( pAnch->IsVertical() &&
+ !pAnch->IsVertLR() ) ||
+ pAnch->IsRightToLeft() );
const Point aMyPt = bTopRight ? aMyRect.TopRight() : aMyRect.TopLeft();
Point aPt;
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 9d78929b98..582c2fe405 100644..100755
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -157,6 +157,10 @@ sal_Bool SwAutoCorrDoc::Insert( xub_StrLen nPos, const String& rTxt )
sal_Bool SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt )
{
+ return ReplaceRange( nPos, rTxt.Len(), rTxt );
+}
+sal_Bool SwAutoCorrDoc::ReplaceRange( xub_StrLen nPos, xub_StrLen nSourceLength, const String& rTxt )
+{
SwPaM* pPam = &rCrsr;
if( pPam->GetPoint()->nContent.GetIndex() != nPos )
{
@@ -204,14 +208,26 @@ sal_Bool SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt )
pPam->SetMark();
pPam->GetPoint()->nContent = Min( pNd->GetTxt().Len(),
- xub_StrLen( nPos + rTxt.Len() ));
+ xub_StrLen( nPos + nSourceLength ));
pDoc->ReplaceRange( *pPam, rTxt, false );
pPam->Exchange();
pPam->DeleteMark();
}
}
else
- pDoc->Overwrite( *pPam, rTxt );
+ {
+ if( nSourceLength != rTxt.Len() )
+ {
+ pPam->SetMark();
+ pPam->GetPoint()->nContent = Min( pNd->GetTxt().Len(),
+ xub_StrLen( nPos + nSourceLength ));
+ pDoc->ReplaceRange( *pPam, rTxt, false );
+ pPam->Exchange();
+ pPam->DeleteMark();
+ }
+ else
+ pDoc->Overwrite( *pPam, rTxt );
+ }
// pDoc->SetRedlineMode_intern( eOld );
if( bUndoIdInitialized )
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 446a450503..6ba16057c1 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1542,6 +1542,9 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
aFmt.SetBulletFont( pBullFnt );
aFmt.SetBulletChar( cBullChar );
aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
+ // #i93908# clear suffix for bullet lists
+ aFmt.SetPrefix(::rtl::OUString());
+ aFmt.SetSuffix(::rtl::OUString());
aFmt.SetFirstLineOffset( lBullFirstLineOffset );
aFmt.SetAbsLSpace( nAbsPos );
if( !aFmt.GetCharFmt() )
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index e5cf0e206a..cde39446bc 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -772,8 +772,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
_bMirror = _bMirror && !pPage->OnRightPage();
Point aPos;
- sal_Bool bVertic = sal_False;
+ bool bVertic = false;
sal_Bool bRTL = sal_False;
+ // --> OD 2009-09-01 #mongolianlayout#
+ bool bVerticalL2R = false;
+ // <--
if ((FLY_AT_PAGE == _nAnchorId) || (FLY_AT_FLY == _nAnchorId)) // LAYER_IMPL
{
@@ -798,9 +801,14 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
else
aPos = (pFrm->Frm().*fnRect->fnGetPos)();
- if( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if( bVert || bVertL2R )
+ // <--
{
- bVertic = sal_True;
+ // --> OD 2009-09-01 #mongolianlayout#
+ bVertic = bVert ? true : false;
+ bVerticalL2R = bVertL2R ? true : false;
+ // <--
_bMirror = false; // no mirroring in vertical environment
switch ( _eHoriRelOrient )
{
@@ -849,8 +857,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
default:break;
}
}
- // --> OD 2006-12-12 #i67221# - proposed patch
- if( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bVert && !bVertL2R )
+ // <--
{
switch ( _eVertRelOrient )
{
@@ -862,6 +871,20 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
break;
}
}
+ // --> OD 2009-09-01 #mongolianlayout#
+ else if ( bVertL2R )
+ {
+ switch ( _eVertRelOrient )
+ {
+ case text::RelOrientation::PRINT_AREA:
+ case text::RelOrientation::PAGE_PRINT_AREA:
+ {
+ aPos.X() += pFrm->GetLeftMargin();
+ }
+ break;
+ }
+ }
+ // <--
else
{
switch ( _eVertRelOrient )
@@ -926,10 +949,17 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
// to page areas.
if ( _eVertRelOrient == text::RelOrientation::PAGE_FRAME || _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
{
- if ( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bVert && !bVertL2R )
+ // <--
{
aPos.X() = aVertEnvironRect.Right();
}
+ // --> OD 2009-09-01 #mongolianlayout#
+ else if ( bVertL2R )
+ {
+ aPos.X() = aVertEnvironRect.Left();
+ }
else
{
aPos.Y() = aVertEnvironRect.Top();
@@ -946,7 +976,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
// to page areas.
if ( _eVertRelOrient == text::RelOrientation::PAGE_FRAME || _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
{
- if ( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bVert && !bVertL2R )
+ // <--
{
aPos.X() = aVertEnvironRect.Right();
if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
@@ -954,6 +986,16 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
aPos.X() -= rVertEnvironLayFrm.GetRightMargin();
}
}
+ // --> OD 2009-09-01 #mongolianlayout#
+ else if ( bVertL2R )
+ {
+ aPos.X() = aVertEnvironRect.Left();
+ if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
+ {
+ aPos.X() += rVertEnvironLayFrm.GetLeftMargin();
+ }
+ }
+ // <--
else
{
aPos.Y() = aVertEnvironRect.Top();
@@ -1013,10 +1055,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
pTxtFrm->GetTopOfLine( nTop, aDefaultCntntPos );
}
}
- if ( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bVert || bVertL2R )
{
aPos.X() = nTop;
}
+ // <--
else
{
aPos.Y() = nTop;
@@ -1043,10 +1087,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
pTxtFrm->GetAutoPos( aChRect, aDefaultCntntPos );
}
nLeft = (aChRect.*fnRect->fnGetLeft)();
- if ( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bVert || bVertL2R )
{
aPos.Y() = nLeft;
}
+ // <--
else
{
aPos.X() = nLeft;
@@ -1054,7 +1100,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
}
// <--
- if ( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bVert || bVertL2R )
+ // <--
{
_orRect = SwRect( aVertEnvironRect.Left(),
aHoriEnvironRect.Top(),
@@ -1088,7 +1136,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
}
// bei zeichengebundenen lieber nur 90% der Hoehe ausnutzen
{
- if( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if( bVert || bVertL2R )
+ // <--
_orRect.Width( (_orRect.Width()*9)/10 );
else
_orRect.Height( (_orRect.Height()*9)/10 );
@@ -1098,26 +1148,51 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
const SwTwips nBaseOfstForFly = ( pFrm->IsTxtFrm() && pFly ) ?
((SwTxtFrm*)pFrm)->GetBaseOfstForFly( !bWrapThrough ) :
0;
- if( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if( bVert || bVertL2R )
+ // <--
{
- bVertic = sal_True;
+ // --> OD 2009-09-01 #mongolianlayout#
+ bVertic = bVert ? true : false;
+ bVerticalL2R = bVertL2R ? true : false;
+ // <--
_bMirror = false;
switch ( _eHoriRelOrient )
{
- case text::RelOrientation::FRAME_RIGHT: aPos.Y() += pFrm->Prt().Height();
- aPos += (pFrm->Prt().*fnRect->fnGetPos)();
- break;
- case text::RelOrientation::PRINT_AREA: aPos += (pFrm->Prt().*fnRect->fnGetPos)();
- aPos.Y() += nBaseOfstForFly;
- break;
- case text::RelOrientation::PAGE_RIGHT: aPos.Y() = pPage->Frm().Top()
- + pPage->Prt().Bottom(); break;
- case text::RelOrientation::PAGE_PRINT_AREA: aPos.Y() = pPage->Frm().Top()
- + pPage->Prt().Top(); break;
+ case text::RelOrientation::FRAME_RIGHT:
+ {
+ aPos.Y() += pFrm->Prt().Height();
+ aPos += (pFrm->Prt().*fnRect->fnGetPos)();
+ break;
+ }
+ case text::RelOrientation::PRINT_AREA:
+ {
+ aPos += (pFrm->Prt().*fnRect->fnGetPos)();
+ aPos.Y() += nBaseOfstForFly;
+ break;
+ }
+ case text::RelOrientation::PAGE_RIGHT:
+ {
+ aPos.Y() = pPage->Frm().Top() + pPage->Prt().Bottom();
+ break;
+ }
+ case text::RelOrientation::PAGE_PRINT_AREA:
+ {
+ aPos.Y() = pPage->Frm().Top() + pPage->Prt().Top();
+ break;
+ }
case text::RelOrientation::PAGE_LEFT:
- case text::RelOrientation::PAGE_FRAME: aPos.Y() = pPage->Frm().Top(); break;
- case text::RelOrientation::FRAME: aPos.Y() += nBaseOfstForFly; break;
+ case text::RelOrientation::PAGE_FRAME:
+ {
+ aPos.Y() = pPage->Frm().Top();
+ break;
+ }
+ case text::RelOrientation::FRAME:
+ {
+ aPos.Y() += nBaseOfstForFly;
+ break;
+ }
default: break;
}
}
@@ -1175,19 +1250,27 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
{
switch ( _eHoriRelOrient )
{
- case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrm->Prt().Width();
- aPos += pFrm->Prt().Pos();
- break;
- case text::RelOrientation::PRINT_AREA: aPos += pFrm->Prt().Pos();
- aPos.X() += nBaseOfstForFly;
- break;
- case text::RelOrientation::PAGE_RIGHT: aPos.X() = pPage->Frm().Left()
- + pPage->Prt().Right(); break;
- case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() = pPage->Frm().Left()
- + pPage->Prt().Left(); break;
+ case text::RelOrientation::FRAME_RIGHT:
+ aPos.X() += pFrm->Prt().Width();
+ aPos += pFrm->Prt().Pos();
+ break;
+ case text::RelOrientation::PRINT_AREA:
+ aPos += pFrm->Prt().Pos();
+ aPos.X() += nBaseOfstForFly;
+ break;
+ case text::RelOrientation::PAGE_RIGHT:
+ aPos.X() = pPage->Frm().Left() + pPage->Prt().Right();
+ break;
+ case text::RelOrientation::PAGE_PRINT_AREA:
+ aPos.X() = pPage->Frm().Left() + pPage->Prt().Left();
+ break;
case text::RelOrientation::PAGE_LEFT:
- case text::RelOrientation::PAGE_FRAME: aPos.X() = pPage->Frm().Left(); break;
- case text::RelOrientation::FRAME: aPos.X() += nBaseOfstForFly; break;
+ case text::RelOrientation::PAGE_FRAME:
+ aPos.X() = pPage->Frm().Left();
+ break;
+ case text::RelOrientation::FRAME:
+ aPos.X() += nBaseOfstForFly;
+ break;
default: break;
}
}
@@ -1195,8 +1278,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
}
if( !_opRef )
{
- if( bVertic )
+ if( bVertic && !bVerticalL2R )
_orRect.Pos( aPos.X() - _orRect.Width() - _orRect.Left(), _orRect.Top() - aPos.Y() );
+ // --> OD 2009-09-01 #mongolianlayout#
+ else if( bVerticalL2R )
+ _orRect.Pos( _orRect.Left() - aPos.X(), _orRect.Top() - aPos.Y() );
+ // <--
else if ( bRTL )
_orRect.Pos( - ( _orRect.Right() - aPos.X() ), _orRect.Top() - aPos.Y() );
else
@@ -1239,10 +1326,13 @@ Size SwFEShell::GetGraphicDefaultSize() const
/* -----------------------------12.08.2002 12:51------------------------------
---------------------------------------------------------------------------*/
-sal_Bool SwFEShell::IsFrmVertical(sal_Bool bEnvironment, sal_Bool& bRTL) const
+// --> OD 2009-08-31 #mongolianlayou#
+// add output parameter <bVertL2R>
+sal_Bool SwFEShell::IsFrmVertical(const sal_Bool bEnvironment, sal_Bool& bRTL, sal_Bool& bVertL2R) const
{
sal_Bool bVert = sal_False;
bRTL = sal_False;
+ bVertL2R = sal_False;
if ( Imp()->HasDrawView() )
{
@@ -1284,10 +1374,12 @@ sal_Bool SwFEShell::IsFrmVertical(sal_Bool bEnvironment, sal_Bool& bRTL) const
bVert = pRef->IsVertical();
bRTL = pRef->IsRightToLeft();
+ bVertL2R = pRef->IsVertLR();
}
return bVert;
}
+// <--
void SwFEShell::MoveObjectIfActive( svt::EmbeddedObjectRef&, const Point& )
{
diff --git a/sw/source/core/inc/acorrect.hxx b/sw/source/core/inc/acorrect.hxx
index 851d3d37e1..1221d7bccd 100644..100755
--- a/sw/source/core/inc/acorrect.hxx
+++ b/sw/source/core/inc/acorrect.hxx
@@ -68,6 +68,7 @@ public:
virtual sal_Bool Delete( xub_StrLen nStt, xub_StrLen nEnd );
virtual sal_Bool Insert( xub_StrLen nPos, const String& rTxt );
virtual sal_Bool Replace( xub_StrLen nPos, const String& rTxt );
+ virtual sal_Bool ReplaceRange( xub_StrLen nPos, xub_StrLen nLen, const String& rTxt );
virtual sal_Bool SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 nSlotId,
SfxPoolItem& );
diff --git a/sw/source/core/inc/anchoredobjectposition.hxx b/sw/source/core/inc/anchoredobjectposition.hxx
index 9dc6a46096..506479081c 100644
--- a/sw/source/core/inc/anchoredobjectposition.hxx
+++ b/sw/source/core/inc/anchoredobjectposition.hxx
@@ -83,12 +83,14 @@ namespace objectpositioning
void _GetInfoAboutObj();
// --> OD 2006-03-15 #i62875#
- SwTwips _ImplAdjustVertRelPos( const SwTwips _nTopOfAnch,
- const bool _bVert,
- const SwFrm& _rPageAlignLayFrm,
- const SwTwips _nProposedRelPosY,
- const bool _bFollowTextFlow,
- const bool _bCheckBottom = true ) const;
+ // --> OD 2009-09-01 #mongolianlayout# - add parameter <bVertL2R>
+ SwTwips _ImplAdjustVertRelPos( const SwTwips nTopOfAnch,
+ const bool bVert,
+ const bool bVertL2R,
+ const SwFrm& rPageAlignLayFrm,
+ const SwTwips nProposedRelPosY,
+ const bool bFollowTextFlow,
+ const bool bCheckBottom = true ) const;
SwTwips _ImplAdjustHoriRelPos( const SwFrm& _rPageAlignLayFrm,
const SwTwips _nProposedRelPosX ) const;
// <--
@@ -170,53 +172,59 @@ namespace objectpositioning
/** adjust calculated vertical in order to keep object inside
'page' alignment layout frame.
- OD 2004-07-22 #i31805# - add parameter <_bCheckBottom>
- OD 2004-10-08 #i26945# - add parameter <_bFollowTextFlow>
+ OD 2004-07-22 #i31805# - add parameter <bCheckBottom>
+ OD 2004-10-08 #i26945# - add parameter <bFollowTextFlow>
OD 2006-03-15 #i62875# - made inline, intrinsic actions moved
to private method <_ImplAdjustVertRelPos>, which is only
called, if <mbDoNotCaptureAnchoredObj> not set.
+ OD 2009-09-01 #mongolianlayout# - add parameter <bVertL2R>
- @param _nTopOfAnch
+ @param nTopOfAnch
input parameter - 'vertical' position, at which the relative
position of the object is calculated from.
- @param _bVert
+ @param bVert
input parameter - boolean, indicating, if object is in vertical
layout.
- @param _rPageAlignLayFrm
+ @param bVertL2R
+ input parameter - boolean, indicating, if object is in mongolian
+ layout (vertical left-to-right layout).
+
+ @param rPageAlignLayFrm
input parameter - layout frame, which determines the 'page area'
the object has to be vertical positioned in.
- @param _nProposedRelPosY
+ @param nProposedRelPosY
input parameter - proposed relative vertical position, which
will be adjusted.
- @param _bFollowTextFlow
+ @param bFollowTextFlow
input parameter - value of attribute 'Follow text flow' of the
anchored object.
- @param _bCheckBottom
+ @param bCheckBottom
input parameter - boolean indicating, if bottom of anchored
object has to be checked and thus, (if needed) the proposed
relative position has to be adjusted. default value <true>
@author OD
*/
- inline SwTwips _AdjustVertRelPos( const SwTwips _nTopOfAnch,
- const bool _bVert,
- const SwFrm& _rPageAlignLayFrm,
- const SwTwips _nProposedRelPosY,
- const bool _bFollowTextFlow,
- const bool _bCheckBottom = true ) const
+ inline SwTwips _AdjustVertRelPos( const SwTwips nTopOfAnch,
+ const bool bVert,
+ const bool bVertL2R,
+ const SwFrm& rPageAlignLayFrm,
+ const SwTwips nProposedRelPosY,
+ const bool bFollowTextFlow,
+ const bool bCheckBottom = true ) const
{
return !mbDoNotCaptureAnchoredObj
- ? _ImplAdjustVertRelPos( _nTopOfAnch, _bVert,
- _rPageAlignLayFrm,
- _nProposedRelPosY,
- _bFollowTextFlow,
- _bCheckBottom )
- : _nProposedRelPosY;
+ ? _ImplAdjustVertRelPos( nTopOfAnch, bVert, bVertL2R,
+ rPageAlignLayFrm,
+ nProposedRelPosY,
+ bFollowTextFlow,
+ bCheckBottom )
+ : nProposedRelPosY;
}
// *********************************************************************
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 46a7731e50..07dd102e79 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -198,8 +198,8 @@ struct SwRectFnCollection
};
typedef SwRectFnCollection* SwRectFn;
+/*
extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R;
-
#define SWRECTFN( pFrm ) sal_Bool bVert = pFrm->IsVertical(); \
sal_Bool bRev = pFrm->IsReverse(); \
SwRectFn fnRect = bVert ? \
@@ -221,6 +221,36 @@ extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R;
sal_Bool bNeighb = pFrm->IsNeighbourFrm(); \
SwRectFn fnRect = bVert == bNeighb ? \
fnRectHori : fnRectVert;
+*/
+
+//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R, fnRectVertL2R;
+#define SWRECTFN( pFrm ) sal_Bool bVert = pFrm->IsVertical(); \
+ sal_Bool bRev = pFrm->IsReverse(); \
+ sal_Bool bVertL2R = pFrm->IsVertLR(); \
+ SwRectFn fnRect = bVert ? \
+ ( bRev ? fnRectVL2R : ( bVertL2R ? fnRectVertL2R : fnRectVert ) ): \
+ ( bRev ? fnRectB2T : fnRectHori );
+#define SWRECTFNX( pFrm ) sal_Bool bVertX = pFrm->IsVertical(); \
+ sal_Bool bRevX = pFrm->IsReverse(); \
+ sal_Bool bVertL2RX = pFrm->IsVertLR(); \
+ SwRectFn fnRectX = bVertX ? \
+ ( bRevX ? fnRectVL2R : ( bVertL2RX ? fnRectVertL2R : fnRectVert ) ): \
+ ( bRevX ? fnRectB2T : fnRectHori );
+#define SWREFRESHFN( pFrm ) { if( bVert != pFrm->IsVertical() || \
+ bRev != pFrm->IsReverse() ) \
+ bVert = pFrm->IsVertical(); \
+ bRev = pFrm->IsReverse(); \
+ bVertL2R = pFrm->IsVertLR(); \
+ fnRect = bVert ? \
+ ( bRev ? fnRectVL2R : ( bVertL2R ? fnRectVertL2R : fnRectVert ) ): \
+ ( bRev ? fnRectB2T : fnRectHori ); }
+#define SWRECTFN2( pFrm ) sal_Bool bVert = pFrm->IsVertical(); \
+ sal_Bool bVertL2R = pFrm->IsVertLR(); \
+ sal_Bool bNeighb = pFrm->IsNeighbourFrm(); \
+ SwRectFn fnRect = bVert == bNeighb ? \
+ fnRectHori : ( bVertL2R ? fnRectVertL2R : fnRectVert );
+//End of SCMS
#define POS_DIFF( aFrm1, aFrm2 ) \
( (aFrm1.*fnRect->fnGetTop)() != (aFrm2.*fnRect->fnGetTop)() || \
(aFrm1.*fnRect->fnGetLeft)() != (aFrm2.*fnRect->fnGetLeft)() )
@@ -371,6 +401,9 @@ protected:
sal_uInt16 bInvalidVert: 1;
sal_uInt16 bDerivedVert: 1;
sal_uInt16 bVertical: 1;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ sal_uInt16 bVertLR: 1;
+ //End of SCMS
sal_uInt16 nType: 4; //Who am I?
sal_Bool bValidPos: 1;
@@ -562,8 +595,14 @@ public:
inline sal_Bool IsReverse() const { return bReverse; }
inline void SetReverse( sal_Bool bNew ){ bReverse = bNew ? 1 : 0; }
inline sal_Bool IsVertical() const;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ inline sal_Bool IsVertLR() const;
+ //End of SCMS
inline sal_Bool GetVerticalFlag() const;
inline void SetVertical( sal_Bool bNew ){ bVertical = bNew ? 1 : 0; }
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ inline void SetbVertLR( sal_Bool bNew ) { bVertLR = bNew ? 1 : 0; }
+ //End of SCMS
inline void SetDerivedVert( sal_Bool bNew ){ bDerivedVert = bNew ? 1 : 0; }
inline void SetInvalidVert( sal_Bool bNew) { bInvalidVert = bNew ? 1 : 0; }
inline sal_Bool IsRightToLeft() const;
@@ -571,6 +610,7 @@ public:
inline void SetRightToLeft( sal_Bool bNew ){ bRightToLeft = bNew ? 1 : 0; }
inline void SetDerivedR2L( sal_Bool bNew ) { bDerivedR2L = bNew ? 1 : 0; }
inline void SetInvalidR2L( sal_Bool bNew ) { bInvalidR2L = bNew ? 1 : 0; }
+
void CheckDirChange();
// returns upper left frame position for LTR and
// upper right frame position for Asian / RTL frames
@@ -950,6 +990,12 @@ sal_Bool SwFrm::IsVertical() const
((SwFrm*)this)->SetDirFlags( sal_True );
return bVertical != 0;
}
+//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+inline sal_Bool SwFrm::IsVertLR() const
+{
+ return bVertLR != 0;
+}
+//End of SCMS
sal_Bool SwFrm::GetVerticalFlag() const
{
return bVertical != 0;
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index b07a0d6dd6..74fbcdc072 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -577,7 +577,13 @@ void SwFrm::MakePos()
if( bReverse )
aFrm.Pos().X() += pPrv->Frm().Width();
else
- aFrm.Pos().X() -= aFrm.Width();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
+ if ( bVertL2R )
+ aFrm.Pos().X() += pPrv->Frm().Width();
+ else
+ aFrm.Pos().X() -= aFrm.Width();
+ }
}
else
aFrm.Pos().Y() += pPrv->Frm().Height();
@@ -645,13 +651,15 @@ void SwFrm::MakePos()
aFrm.Pos().X() += GetUpper()->Prt().Width()
- aFrm.Width();
}
- else if( bVert && FRM_NOTE_VERT & nMyType && !bReverse )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ else if( bVert && !bVertL2R && FRM_NOTE_VERT & nMyType && !bReverse )
aFrm.Pos().X() -= aFrm.Width() - GetUpper()->Prt().Width();
}
}
else
aFrm.Pos().X() = aFrm.Pos().Y() = 0;
- if( IsBodyFrm() && bVert && !bReverse && GetUpper() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsBodyFrm() && bVert && !bVertL2R && !bReverse && GetUpper() )
aFrm.Pos().X() += GetUpper()->Prt().Width() - aFrm.Width();
bValidPos = sal_True;
}
@@ -873,7 +881,8 @@ void SwLayoutFrm::MakeAll()
//uebernimmt im DTor die Benachrichtigung
const SwLayNotify aNotify( this );
sal_Bool bVert = IsVertical();
- SwRectFn fnRect = ( IsNeighbourFrm() == bVert )? fnRectHori : fnRectVert;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwRectFn fnRect = ( IsNeighbourFrm() == bVert )? fnRectHori : ( IsVertLR() ? fnRectVertL2R : fnRectVert );
SwBorderAttrAccess *pAccess = 0;
const SwBorderAttrs*pAttrs = 0;
diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index f53f373910..ce61d36e51 100644
--- a/sw/source/core/layout/colfrm.cxx
+++ b/sw/source/core/layout/colfrm.cxx
@@ -336,7 +336,8 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttribut
}
const sal_Bool bVert = IsVertical();
- SwRectFn fnRect = bVert ? fnRectVert : fnRectHori;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
//Ist ein Pointer da, oder sollen wir die Attribute einstellen,
//so stellen wir auf jeden Fall die Spaltenbreiten ein. Andernfalls
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index 03ffea9455..060e533ab3 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -1460,6 +1460,9 @@ void SwFrm::SetDirFlags( sal_Bool bVert )
{
bVertical = pAsk->IsVertical() ? 1 : 0;
bReverse = pAsk->IsReverse() ? 1 : 0;
+
+ bVertLR = pAsk->IsVertLR() ? 1 : 0;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if ( !pAsk->bInvalidVert )
bInvalidVert = sal_False;
}
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index b01d3b1590..192a6b48d3 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -154,9 +154,21 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
bDerivedR2L = 0;
if( FRMDIR_HORI_LEFT_TOP == nDir || FRMDIR_HORI_RIGHT_TOP == nDir
|| pFmt->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
bVertical = 0;
- else
+ bVertLR = 0;
+ }
+ else
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
bVertical = 1;
+ if ( FRMDIR_VERT_TOP_LEFT == nDir )
+ bVertLR = 1;
+ else
+ bVertLR = 0;
+ }
+
bVert = bVertical;
bInvalidR2L = 0;
if( FRMDIR_HORI_RIGHT_TOP == nDir )
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index e2b9510715..ee2fcce34c 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -661,13 +661,20 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
while( pUp->IsSctFrm() )
pUp = pUp->GetUpper();
const bool bVert = pUp->IsVertical();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ const bool bVertL2R = pUp->IsVertLR();
+
//Dem Textflus folgen.
// --> OD 2009-01-12 #i70582#
+ // --> OD 2009-03-05 - adopted for Support for Classical Mongolian Script
const SwTwips nTopForObjPos =
bVert
- ? ( pCnt->Frm().Left() +
- pCnt->Frm().Width() -
- pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() )
+ ? ( bVertL2R
+ ? ( pCnt->Frm().Left() +
+ pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() )
+ : ( pCnt->Frm().Left() +
+ pCnt->Frm().Width() -
+ pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) )
: ( pCnt->Frm().Top() +
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() );
// <--
@@ -676,7 +683,13 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
// OD 26.09.2003 - <rPt> point is inside environment of given content frame
// --> OD 2009-01-12 #i70582#
if( bVert )
- rRet.nMain = nTopForObjPos - rPt.X();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
+ if ( bVertL2R )
+ rRet.nMain = rPt.X() - nTopForObjPos;
+ else
+ rRet.nMain = nTopForObjPos - rPt.X();
+ }
else
rRet.nMain = rPt.Y() - nTopForObjPos;
// <--
@@ -701,7 +714,13 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
// OD 26.09.2003 - <rPt> point is in left border of environment
// --> OD 2009-01-12 #i70582#
if( bVert )
- rRet.nMain = nTopForObjPos - rPt.X();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
+ if ( bVertL2R )
+ rRet.nMain = rPt.X() - nTopForObjPos;
+ else
+ rRet.nMain = nTopForObjPos - rPt.X();
+ }
else
rRet.nMain = rPt.Y() - nTopForObjPos;
// <--
@@ -712,11 +731,13 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
}
else
{
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
// --> OD 2009-01-12 #i70582#
rRet.nMain = bVert
- ? nTopForObjPos - (pUp->Frm().Left() + pUp->Prt().Left())
- : (pUp->Frm().Top() + pUp->Prt().Bottom()) - nTopForObjPos;
- // <--
+ ? ( bVertL2R
+ ? ( (pUp->Frm().Left() + pUp->Prt().Right()) - nTopForObjPos )
+ : ( nTopForObjPos - (pUp->Frm().Left() + pUp->Prt().Left() ) ) )
+ : ( (pUp->Frm().Top() + pUp->Prt().Bottom()) - nTopForObjPos );
const SwFrm *pPre = pCnt;
const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, sal_True, pCnt );
@@ -737,7 +758,11 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
{
if( pLay->IsVertical() )
{
- nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( pLay->IsVertLR() )
+ nFrmTop = pLay->Frm().Left();
+ else
+ nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
nPrtHeight = pLay->Prt().Width();
}
else
@@ -752,9 +777,20 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
pLay = pSect->GetUpper();
if( pLay->IsVertical() )
{
- nFrmTop = pSect->Frm().Left();
- nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left()
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( pLay->IsVertLR() )
+ {
+ nFrmTop = pSect->Frm().Right();
+ nPrtHeight = pLay->Frm().Left() + pLay->Prt().Left()
+ + pLay->Prt().Width() - pSect->Frm().Left()
+ - pSect->Frm().Width();
+ }
+ else
+ {
+ nFrmTop = pSect->Frm().Left();
+ nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left()
- pLay->Prt().Left();
+ }
}
else
{
@@ -770,8 +806,17 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
{
if( pLay->IsVertical() )
{
- nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
- nPrtHeight = pLay->Prt().Width();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( pLay->IsVertLR() )
+ {
+ nFrmTop = pLay->Frm().Left();
+ nPrtHeight = pLay->Prt().Width();
+ }
+ else
+ {
+ nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
+ nPrtHeight = pLay->Prt().Width();
+ }
}
else
{
@@ -815,8 +860,17 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
pSect = pNxtSect;
if( pLay->IsVertical() )
{
- nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
- nPrtHeight = pLay->Prt().Width();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( pLay->IsVertLR() )
+ {
+ nFrmTop = pLay->Frm().Left();
+ nPrtHeight = pLay->Prt().Width();
+ }
+ else
+ {
+ nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
+ nPrtHeight = pLay->Prt().Width();
+ }
}
else
{
@@ -829,9 +883,20 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
pLay = pSect->GetUpper();
if( pLay->IsVertical() )
{
- nFrmTop = pSect->Frm().Left();
- nPrtHeight = pSect->Frm().Left() -
- pLay->Frm().Left() - pLay->Prt().Left();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( pLay->IsVertLR() )
+ {
+ nFrmTop = pSect->Frm().Right();
+ nPrtHeight = pLay->Frm().Left()+pLay->Prt().Left()
+ + pLay->Prt().Width() - pSect->Frm().Left()
+ - pSect->Frm().Width();
+ }
+ else
+ {
+ nFrmTop = pSect->Frm().Left();
+ nPrtHeight = pSect->Frm().Left() -
+ pLay->Frm().Left() - pLay->Prt().Left();
+ }
}
else
{
@@ -847,8 +912,17 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
{
if( pLay->IsVertical() )
{
- nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
- nPrtHeight = pLay->Prt().Width();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( pLay->IsVertLR() )
+ {
+ nFrmTop = pLay->Frm().Left();
+ nPrtHeight = pLay->Prt().Width();
+ }
+ else
+ {
+ nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
+ nPrtHeight = pLay->Prt().Width();
+ }
}
else
{
@@ -863,7 +937,8 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->Frm().IsInside( rPt ) )
{
- SwTwips nDiff = pLay->IsVertical() ? ( nFrmTop - rPt.X() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwTwips nDiff = pLay->IsVertical() ? ( pLay->IsVertLR() ? ( rPt.X() - nFrmTop ) : ( nFrmTop - rPt.X() ) )
: ( rPt.Y() - nFrmTop );
if( bSct || pSect )
rRet.nSub += nDiff;
@@ -1219,9 +1294,8 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
SwPageFrm *pOldPage = FindPageFrm();
const SwRect aOld( GetObjRectWithSpaces() );
Point aNew( rNew );
-
- if( GetAnchorFrm()->IsVertical() || GetAnchorFrm()->IsRightToLeft() )
-
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( ( GetAnchorFrm()->IsVertical() && !GetAnchorFrm()->IsVertLR() ) || GetAnchorFrm()->IsRightToLeft() )
aNew.X() += Frm().Width();
SwCntntFrm *pCnt = (SwCntntFrm*)::FindAnchor( GetAnchorFrm(), aNew );
if( pCnt->IsProtected() )
@@ -1229,6 +1303,8 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
SwPageFrm *pTmpPage = 0;
const bool bVert = pCnt->IsVertical();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ const bool bVertL2R = pCnt->IsVertLR();
const sal_Bool bRTL = pCnt->IsRightToLeft();
if( ( !bVert != !GetAnchorFrm()->IsVertical() ) ||
@@ -1261,15 +1337,22 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
// --> OD 2009-01-12 #i70582#
const SwTwips nTopForObjPos =
bVert
- ? ( pCnt->Frm().Left() +
- pCnt->Frm().Width() -
- pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() )
+ ? ( bVertL2R
+ ? ( pCnt->Frm().Left() +
+ pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() )
+ : ( pCnt->Frm().Left() +
+ pCnt->Frm().Width() -
+ pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) )
: ( pCnt->Frm().Top() +
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() );
- if ( bVert )
+ if( bVert )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
{
- nY = nTopForObjPos - rNew.X() - Frm().Width();
- }
+ if ( bVertL2R )
+ nY = rNew.X() - nTopForObjPos;
+ else
+ nY = nTopForObjPos - rNew.X() - Frm().Width();
+ }
else
{
nY = rNew.Y() - nTopForObjPos;
@@ -1302,8 +1385,14 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
do
{ const SwFrm *pUp = pFollow->GetUpper();
if( pUp->IsVertical() )
- nDiff += pFollow->Frm().Left() + pFollow->Frm().Width()
- - pUp->Frm().Left() - pUp->Prt().Left();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
+ if ( pUp->IsVertLR() )
+ nDiff += pUp->Prt().Width() - pFollow->GetRelPos().X();
+ else
+ nDiff += pFollow->Frm().Left() + pFollow->Frm().Width()
+ - pUp->Frm().Left() - pUp->Prt().Left();
+ }
else
nDiff += pUp->Prt().Height() - pFollow->GetRelPos().Y();
pFollow = pFollow->GetFollow();
@@ -1320,14 +1409,21 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
// --> OD 2009-01-12 #i70582#
const SwTwips nTopForObjPos =
bVert
- ? ( pCnt->Frm().Left() +
- pCnt->Frm().Width() -
- pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() )
+ ? ( bVertL2R
+ ? ( pCnt->Frm().Left() +
+ pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() )
+ : ( pCnt->Frm().Left() +
+ pCnt->Frm().Width() -
+ pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) )
: ( pCnt->Frm().Top() +
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() );
- if ( bVert )
+ if( bVert )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
{
- nY = nTopForObjPos - rNew.X();
+ if ( bVertL2R )
+ nY = rNew.X() - nTopForObjPos;
+ else
+ nY = nTopForObjPos - rNew.X();
}
else
{
@@ -1421,6 +1517,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
GetPageFrm()->MoveFly( this, pTmpPage );
const Point aRelPos = bVert ? Point( -nY, nX ) : Point( nX, nY );
+
ChgRelPos( aRelPos );
GetFmt()->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 588b69749b..815cd3fd56 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -421,7 +421,8 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
if ( !bTst )
{
(Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + nDist );
- if( IsVertical() && !IsReverse() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical() && !IsVertLR() && !IsReverse() )
Frm().Pos().X() -= nDist;
}
long nGrow = nDist - nAvail,
@@ -463,7 +464,8 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
nDist -= nReal;
//Den masslosen Wunsch koennen wir leider nur in Grenzen erfuellen.
Frm().SSize().Height() -= nDist;
- if( IsVertical() && !IsReverse() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical() && !IsVertLR() && !IsReverse() )
Frm().Pos().X() += nDist;
}
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 4004338797..0662531a67 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1648,13 +1648,21 @@ sal_Bool SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
bChanged = aOldRect != pFly->Frm();
if ( IsPaint() && (pFly->IsCompletePaint() || bChanged) &&
- pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 )
+ pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 )
pImp->GetShell()->AddPaintRect( pFly->Frm() );
if ( bChanged )
pFly->Invalidate();
else
pFly->Validate();
+/*
+ //mba: it's unclear why we should invalidate always, so I remove it
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsPaint() && bAddRect && pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 )
+ pImp->GetShell()->AddPaintRect( pFly->Frm() );
+
+ pFly->Invalidate();
+*/
bAddRect = false;
pFly->ResetCompletePaint();
}
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 7266c07de8..d995ac6762 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -290,9 +290,67 @@ static SwRectFnCollection aVerticalRightToLeft = {
&SwRect::SetBottomAndHeight,
&SwRect::SetLeftAndWidth
};
+//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+static SwRectFnCollection aVerticalLeftToRight = {
+ /* fnRectGet */
+ &SwRect::_Left,
+ &SwRect::_Right,
+ &SwRect::_Top,
+ &SwRect::_Bottom,
+ &SwRect::_Height,
+ &SwRect::_Width,
+ &SwRect::TopLeft,
+ &SwRect::SwappedSize,
+ /* fnRectSet */
+ &SwRect::_Left,
+ &SwRect::_Right,
+ &SwRect::_Top,
+ &SwRect::_Bottom,
+ &SwRect::_Height,
+ &SwRect::_Width,
+
+ &SwRect::SubLeft,
+ &SwRect::AddRight,
+ &SwRect::SubTop,
+ &SwRect::AddBottom,
+ &SwRect::AddHeight,
+ &SwRect::AddWidth,
+
+ &SwRect::SetPosY,
+ &SwRect::SetPosX,
+ &SwFrm::GetLeftMargin,
+ &SwFrm::GetRightMargin,
+ &SwFrm::GetTopMargin,
+ &SwFrm::GetBottomMargin,
+ &SwFrm::SetTopBottomMargins,
+ &SwFrm::SetLeftRightMargins,
+ &SwFrm::GetPrtLeft,
+ &SwFrm::GetPrtRight,
+ &SwFrm::GetPrtTop,
+ &SwFrm::GetPrtBottom,
+ &SwRect::GetLeftDistance,
+ &SwRect::GetRightDistance,
+ &SwRect::GetTopDistance,
+ &SwRect::GetBottomDistance,
+ &SwFrm::SetMaxRight,
+ &SwRect::OverStepRight,
+
+ &SwRect::SetUpperLeftCorner,
+ &SwFrm::MakeRightPos,
+ &FirstMinusSecond,
+ &FirstMinusSecond,
+ &SwIncrement,
+ &SwIncrement,
+ &SwRect::SetTopAndHeight,
+ &SwRect::SetLeftAndWidth
+};
+//End of SCMS
SwRectFn fnRectHori = &aHorizontal;
SwRectFn fnRectVert = &aVertical;
+//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+SwRectFn fnRectVertL2R = &aVerticalLeftToRight;
+//End of SCMS
SwRectFn fnRectB2T = &aBottomToTop;
SwRectFn fnRectVL2R = &aVerticalRightToLeft;
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 1821cf8a24..24c261ba96 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -131,7 +131,8 @@ void SwBodyFrm::Format( const SwBorderAttrs * )
if ( nHeight < 0 )
nHeight = 0;
Frm().Height( nHeight );
- if( IsVertical() && !IsReverse() && nWidth != Frm().Width() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical() && !IsVertLR() && !IsReverse() && nWidth != Frm().Width() )
Frm().Pos().X() += Frm().Width() - nWidth;
Frm().Width( nWidth );
}
@@ -342,9 +343,19 @@ void SwPageFrm::CheckDirection( sal_Bool bVert )
{
if( FRMDIR_HORI_LEFT_TOP == nDir || FRMDIR_HORI_RIGHT_TOP == nDir ||
GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
bVertical = 0;
- else
+ bVertLR = 0;
+ }
+ else
+ {
bVertical = 1;
+ if(FRMDIR_VERT_TOP_RIGHT == nDir)
+ bVertLR = 0;
+ else if(FRMDIR_VERT_TOP_LEFT==nDir)
+ bVertLR = 1;
+ }
/*
if( pDesc && pDesc->GetName().GetChar(0)=='x')
bReverse = 1;
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index a85982067b..f320ed99f2 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1214,7 +1214,9 @@ void MA_FASTCALL lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm,
if ( rAttrs.IsLine() || rAttrs.IsBorderDist() ||
(bShadow && rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE) )
{
- SwRectFn fnRect = pFrm->IsVertical() ? fnRectVert : fnRectHori;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwRectFn fnRect = pFrm->IsVertical() ? ( pFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
+
const SvxBoxItem &rBox = rAttrs.GetBox();
const sal_Bool bTop = 0 != (pFrm->*fnRect->fnGetTopMargin)();
if ( bTop )
@@ -3168,8 +3170,17 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect )
}
else
{
- fnCheck = &SwRect::GetRightDistance;
- nLimit = rRect.Left();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( rFrm.IsVertLR() )
+ {
+ fnCheck = &SwRect::GetLeftDistance;
+ nLimit = rRect.Right();
+ }
+ else
+ {
+ fnCheck = &SwRect::GetRightDistance;
+ nLimit = rRect.Left();
+ }
}
}
@@ -4880,8 +4891,9 @@ void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFmtCol &rFmtCol,
const SwFrm *pCol = Lower();
if ( !pCol || !pCol->IsColumnFrm() )
return;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwRectFn fnRect = pCol->IsVertical() ? ( pCol->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
- SwRectFn fnRect = pCol->IsVertical() ? fnRectVert : fnRectHori;
SwRect aLineRect = Prt();
aLineRect += Frm().Pos();
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 32113ae5c3..70eb0d7c75 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -230,7 +230,9 @@ void SwFrm::CheckDirChange()
SetInvalidVert( sal_True );
SetInvalidR2L( sal_True );
sal_Bool bChg = bOldR2L != IsRightToLeft();
- if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ sal_Bool bOldVertL2R = IsVertLR();
+ if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev || bOldVertL2R != IsVertLR() )
{
InvalidateAll();
if( IsLayoutFrm() )
@@ -324,9 +326,10 @@ void SwFrm::CheckDirChange()
Point SwFrm::GetFrmAnchorPos( sal_Bool bIgnoreFlysAnchoredAtThisFrame ) const
{
Point aAnchor = Frm().Pos();
- if ( IsVertical() || IsRightToLeft() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( ( IsVertical() && !IsVertLR() ) || IsRightToLeft() )
aAnchor.X() += Frm().Width();
-
+
if ( IsTxtFrm() )
{
SwTwips nBaseOfstForFly =
@@ -612,7 +615,8 @@ const SwRect SwFrm::PaintArea() const
// Cell frames may not leave their upper:
SwRect aRect = IsRowFrm() ? GetUpper()->Frm() : Frm();
const sal_Bool bVert = IsVertical();
- SwRectFn fnRect = bVert ? fnRectVert : fnRectHori;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
long nRight = (aRect.*fnRect->fnGetRight)();
long nLeft = (aRect.*fnRect->fnGetLeft)();
const SwFrm* pTmp = this;
@@ -711,7 +715,8 @@ const SwRect SwFrm::PaintArea() const
const SwRect SwFrm::UnionFrm( sal_Bool bBorder ) const
{
sal_Bool bVert = IsVertical();
- SwRectFn fnRect = bVert ? fnRectVert : fnRectHori;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
long nLeft = (Frm().*fnRect->fnGetLeft)();
long nWidth = (Frm().*fnRect->fnGetWidth)();
long nPrtLeft = (Prt().*fnRect->fnGetLeft)();
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 9fd84a1c3b..ef5d1e626c 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -4778,7 +4778,8 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SwTwips nHeight = (Frm().*fnRect->fnGetHeight)();
(Frm().*fnRect->fnSetHeight)( nHeight - nReal );
- if( IsVertical() && !bRev )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical() && !IsVertLR() && !bRev )
Frm().Pos().X() += nReal;
}
@@ -4792,7 +4793,8 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
nReal -= nTmp;
SwTwips nHeight = (Frm().*fnRect->fnGetHeight)();
(Frm().*fnRect->fnSetHeight)( nHeight + nReal );
- if( IsVertical() && !bRev )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical() && !IsVertLR() && !bRev )
Frm().Pos().X() -= nReal;
}
nReal = nTmp;
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 0a7c6eafeb..740f89ee27 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -2564,7 +2564,8 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
//At least the endframe...
bVert = pEndFrm->IsVertical();
bRev = pEndFrm->IsReverse();
- fnRect = bVert ? ( bRev ? fnRectVL2R : fnRectVert ) :
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ fnRect = bVert ? ( bRev ? fnRectVL2R : ( pEndFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) ) :
( bRev ? fnRectB2T : fnRectHori );
nTmpTwips = (aEndRect.*fnRect->fnGetTop)();
if( (aEndFrm.*fnRect->fnGetTop)() != nTmpTwips )
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index b3a9be89fa..75e277aeed 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -108,7 +108,9 @@ SwFrm::SwFrm( SwModify *pMod ) :
ASSERT( pMod, "Kein Frameformat uebergeben." );
bInvalidR2L = bInvalidVert = 1;
- bDerivedR2L = bDerivedVert = bRightToLeft = bVertical = bReverse = 0;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ bDerivedR2L = bDerivedVert = bRightToLeft = bVertical = bReverse = bVertLR = 0;
+
bValidPos = bValidPrtArea = bValidSize = bValidLineNum = bRetouche =
bFixSize = bColLocked = sal_False;
bCompletePaint = bInfInvalid = sal_True;
@@ -138,9 +140,19 @@ void SwFrm::CheckDir( sal_uInt16 nDir, sal_Bool bVert, sal_Bool bOnlyBiDi, sal_B
bInvalidVert = 0;
if( FRMDIR_HORI_LEFT_TOP == nDir || FRMDIR_HORI_RIGHT_TOP == nDir
|| bBrowse )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
bVertical = 0;
+ bVertLR = 0;
+ }
else
+ {
bVertical = 1;
+ if(FRMDIR_VERT_TOP_RIGHT == nDir)
+ bVertLR = 0;
+ else if(FRMDIR_VERT_TOP_LEFT==nDir)
+ bVertLR = 1;
+ }
}
else
{
@@ -1134,9 +1146,12 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
if ( IsHeaderFrm() || IsFooterFrm() )
fnRect = fnRectHori;
else if ( IsCellFrm() || IsColumnFrm() )
- fnRect = GetUpper()->IsVertical() ? fnRectHori : fnRectVert;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ fnRect = GetUpper()->IsVertical() ? fnRectHori : ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert );
else
- fnRect = GetUpper()->IsVertical() ? fnRectVert : fnRectHori;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ fnRect = GetUpper()->IsVertical() ? ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
+
if( (Frm().*fnRect->fnGetWidth)() != (pParent->Prt().*fnRect->fnGetWidth)())
_InvalidateSize();
@@ -1621,7 +1636,8 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst )
if ( !bTst )
{
(pFrm->GetNext()->Frm().*fnRect->fnSetHeight)(nAddMax-nAdd);
- if( bVert && !bRev )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( bVert && !bVertL2R && !bRev )
pFrm->GetNext()->Frm().Pos().X() += nAdd;
pFrm->GetNext()->InvalidatePrt();
if ( pFrm->GetNext()->GetNext() )
@@ -1635,7 +1651,8 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst )
{
SwTwips nTmp = (pFrm->Frm().*fnRect->fnGetHeight)();
(pFrm->Frm().*fnRect->fnSetHeight)( nTmp - nReal );
- if( bVert && !bRev )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( bVert && !bVertL2R && !bRev )
pFrm->Frm().Pos().X() += nReal;
pFrm->InvalidatePrt();
if ( pFrm->GetNext() )
@@ -1896,7 +1913,8 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
if ( !bTst )
{
(Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist );
- if( IsVertical() && !IsReverse() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical() && !IsVertLR() && !IsReverse() )
Frm().Pos().X() -= nDist;
if ( GetNext() )
{
@@ -1928,7 +1946,8 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
//Cntnts werden immer auf den gewuenschten Wert gebracht.
long nOld = (Frm().*fnRect->fnGetHeight)();
(Frm().*fnRect->fnSetHeight)( nOld + nDist );
- if( IsVertical() && !IsReverse() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical()&& !IsVertLR() && !IsReverse() )
Frm().Pos().X() -= nDist;
if ( nOld && IsInTab() )
{
@@ -2024,7 +2043,8 @@ SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
else
nRstHeight = nDist;
(Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() - nDist );
- if( IsVertical() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical() && !IsVertLR() )
Frm().Pos().X() += nDist;
nDist = nRstHeight;
if ( IsInTab() )
@@ -2443,7 +2463,8 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
if ( !bTst )
{
(Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist );
- if( bChgPos )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( bChgPos && !IsVertLR() )
Frm().Pos().X() -= nDist;
bMoveAccFrm = sal_True;
}
@@ -2524,7 +2545,8 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
( !IsCellFrm() || static_cast<SwCellFrm*>(this)->GetLayoutRowSpan() > 1 ) )
{
(Frm().*fnRect->fnSetHeight)( nFrmHeight + nReal );
- if( bChgPos )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( bChgPos && !IsVertLR() )
Frm().Pos().X() = nFrmPos - nReal;
bMoveAccFrm = sal_True;
}
@@ -2615,7 +2637,8 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
if ( !bTst )
{
(Frm().*fnRect->fnSetHeight)( nFrmHeight - nReal );
- if( bChgPos )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( bChgPos && !IsVertLR() )
Frm().Pos().X() += nReal;
bMoveAccFrm = sal_True;
}
@@ -2636,7 +2659,8 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
(Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)()
+ nRealDist - nReal );
- if( bChgPos )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( bChgPos && !IsVertLR() )
Frm().Pos().X() += nRealDist - nReal;
ASSERT( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" );
}
@@ -2649,7 +2673,8 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
(Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)()
+ nReal - nTmp );
- if( bChgPos )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( bChgPos && !IsVertLR() )
Frm().Pos().X() += nTmp - nReal;
ASSERT( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" );
nReal = nTmp;
@@ -3169,7 +3194,8 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
const sal_uInt16 nRight = (sal_uInt16)((SwBorderAttrs*)pAttrs)->CalcRight( this );
const sal_uInt16 nLower = pAttrs->CalcBottom();
sal_Bool bVert = IsVertical() && !IsPageFrm();
- SwRectFn fnRect = bVert ? fnRectVert : fnRectHori;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
if ( !bValidPrtArea )
{
bValidPrtArea = sal_True;
diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
index 171c3fd725..5f505c12e2 100644
--- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
@@ -375,7 +375,12 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos(
break;
case text::VertOrientation::TOP:
{
- nRelPosY += bVert ? _rLRSpacing.GetRight() : _rULSpacing.GetUpper();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ nRelPosY += bVert
+ ? ( bVertL2R
+ ? _rLRSpacing.GetLeft()
+ : _rLRSpacing.GetRight() )
+ : _rULSpacing.GetUpper();
}
break;
case text::VertOrientation::CENTER:
@@ -385,8 +390,13 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos(
break;
case text::VertOrientation::BOTTOM:
{
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
nRelPosY += nAlignAreaHeight -
- ( nObjHeight + ( bVert ? _rLRSpacing.GetLeft() : _rULSpacing.GetLower() ) );
+ ( nObjHeight + ( bVert
+ ? ( bVertL2R
+ ? _rLRSpacing.GetRight()
+ : _rLRSpacing.GetLeft() )
+ : _rULSpacing.GetLower() ) );
}
break;
default:
@@ -405,21 +415,23 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos(
/** adjust calculated vertical in order to keep object inside
'page' alignment layout frame.
- OD 2004-07-01 #i28701# - parameter <_nTopOfAnch> and <_bVert> added
- OD 2004-07-22 #i31805# - add parameter <_bCheckBottom>
- OD 2004-10-08 #i26945# - add parameter <_bFollowTextFlow>
+ OD 2004-07-01 #i28701# - parameter <nTopOfAnch> and <bVert> added
+ OD 2004-07-22 #i31805# - add parameter <bCheckBottom>
+ OD 2004-10-08 #i26945# - add parameter <bFollowTextFlow>
OD 2006-03-15 #i62875# - method now private and renamed.
+ OD 2009-09-01 #mongolianlayout# - add parameter <bVertL2R>
@author OD
*/
-SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips _nTopOfAnch,
- const bool _bVert,
- const SwFrm& _rPageAlignLayFrm,
- const SwTwips _nProposedRelPosY,
- const bool _bFollowTextFlow,
- const bool _bCheckBottom ) const
+SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnch,
+ const bool bVert,
+ const bool bVertL2R,
+ const SwFrm& rPageAlignLayFrm,
+ const SwTwips nProposedRelPosY,
+ const bool bFollowTextFlow,
+ const bool bCheckBottom ) const
{
- SwTwips nAdjustedRelPosY = _nProposedRelPosY;
+ SwTwips nAdjustedRelPosY = nProposedRelPosY;
const Size aObjSize( GetAnchoredObj().GetObjRect().SSize() );
@@ -436,57 +448,67 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips _nTopOfAn
// --> OD 2004-10-08 #i26945# - no extension of restricted area, if
// object's attribute follow text flow is set and its inside a table
if ( GetFrmFmt().getIDocumentSettingAccess()->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION) &&
- ( !_bFollowTextFlow ||
+ ( !bFollowTextFlow ||
!GetAnchoredObj().GetAnchorFrm()->IsInTab() ) )
{
- aPgAlignArea = _rPageAlignLayFrm.FindPageFrm()->Frm();
+ aPgAlignArea = rPageAlignLayFrm.FindPageFrm()->Frm();
}
else
{
- aPgAlignArea = _rPageAlignLayFrm.Frm();
+ aPgAlignArea = rPageAlignLayFrm.Frm();
}
}
- if ( _bVert )
+ if ( bVert )
{
- // OD 2004-07-22 #i31805# - consider value of <_bCheckBottom>
- if ( _bCheckBottom &&
- _nTopOfAnch - nAdjustedRelPosY - aObjSize.Width() <
- aPgAlignArea.Left() )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( !bVertL2R )
+ // <--
{
- nAdjustedRelPosY = aPgAlignArea.Left() +
- _nTopOfAnch -
- aObjSize.Width();
+ if ( bCheckBottom &&
+ nTopOfAnch - nAdjustedRelPosY - aObjSize.Width() <
+ aPgAlignArea.Left() )
+ {
+ nAdjustedRelPosY = aPgAlignArea.Left() +
+ nTopOfAnch -
+ aObjSize.Width();
+ }
+ if ( nTopOfAnch - nAdjustedRelPosY > aPgAlignArea.Right() )
+ {
+ nAdjustedRelPosY = nTopOfAnch - aPgAlignArea.Right();
+ }
}
- // --> OD 2004-08-13 #i32964# - correction
- if ( _nTopOfAnch - nAdjustedRelPosY > aPgAlignArea.Right() )
+ // --> OD 2009-09-01 #mongolianlayout#
+ else
{
- nAdjustedRelPosY = _nTopOfAnch - aPgAlignArea.Right();
+ if ( bCheckBottom &&
+ nTopOfAnch + nAdjustedRelPosY + aObjSize.Width() >
+ aPgAlignArea.Right() )
+ {
+ nAdjustedRelPosY = aPgAlignArea.Right() -
+ nTopOfAnch -
+ aObjSize.Width();
+ }
+ if ( nTopOfAnch + nAdjustedRelPosY < aPgAlignArea.Left() )
+ {
+ nAdjustedRelPosY = aPgAlignArea.Left() - nTopOfAnch;
+ }
}
// <--
}
else
{
- // OD 2004-07-22 #i31805# - consider value of <_bCheckBottom>
- if ( _bCheckBottom &&
- _nTopOfAnch + nAdjustedRelPosY + aObjSize.Height() >
- // --> OD 2006-01-13 #129959#
- // Do not mix usage of <top + height> and <bottom>
-// aPgAlignArea.Bottom() )
+ if ( bCheckBottom &&
+ nTopOfAnch + nAdjustedRelPosY + aObjSize.Height() >
aPgAlignArea.Top() + aPgAlignArea.Height() )
- // <--
{
- // --> OD 2006-01-13 #129959#
- // Do not mix usage of <top + height> and <bottom>
-// nAdjustedRelPosY = aPgAlignArea.Bottom() -
nAdjustedRelPosY = aPgAlignArea.Top() + aPgAlignArea.Height() -
- // <--
- _nTopOfAnch -
+ nTopOfAnch -
aObjSize.Height();
}
- if ( _nTopOfAnch + nAdjustedRelPosY < aPgAlignArea.Top() )
+ if ( nTopOfAnch + nAdjustedRelPosY < aPgAlignArea.Top() )
{
- nAdjustedRelPosY = aPgAlignArea.Top() - _nTopOfAnch;
+ nAdjustedRelPosY = aPgAlignArea.Top() - nTopOfAnch;
}
}
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
index 6bd92f4b4e..dead72872c 100644
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
@@ -268,9 +268,20 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// determine relative vertical position
SwTwips nRelPosY = nAlignAreaOffset;
- SwTwips nObjHeight = (aObjBoundRect.*fnRect->fnGetHeight)();
- SwTwips nUpperSpace = bVert ? rLR.GetRight() : rUL.GetUpper();
- SwTwips nLowerSpace = bVert ? rLR.GetLeft() : rUL.GetLower();
+ const SwTwips nObjHeight = (aObjBoundRect.*fnRect->fnGetHeight)();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ const SwTwips nUpperSpace = bVert
+ ? ( bVertL2R
+ ? rLR.GetLeft()
+ : rLR.GetRight() )
+ : rUL.GetUpper();
+ // --> OD 2009-08-31 #monglianlayout#
+ const SwTwips nLowerSpace = bVert
+ ? ( bVertL2R
+ ? rLR.GetLeft()
+ : rLR.GetRight() )
+ : rUL.GetLower();
+ // <--
switch ( aVert.GetVertOrient() )
{
case text::VertOrientation::CHAR_BOTTOM:
@@ -279,8 +290,11 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
{
// bottom (to character anchored)
nRelPosY += nAlignAreaHeight + nUpperSpace;
- if ( bVert )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( bVert && !bVertL2R )
+ {
nRelPosY += nObjHeight;
+ }
break;
}
}
@@ -402,7 +416,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
aEnvOfObj.GetVertEnvironmentLayoutFrm(
*(pOrientFrm->GetUpper()) );
const bool bCheckBottom = !DoesObjFollowsTextFlow();
- nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert,
+ nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R,
rVertEnvironLayFrm, nRelPosY,
DoesObjFollowsTextFlow(),
bCheckBottom );
@@ -584,7 +598,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// anchored object would fit into environment layout frame, if
// anchored object has to follow the text flow.
const bool bCheckBottom = !DoesObjFollowsTextFlow();
- nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert,
+ nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R,
rVertEnvironLayFrm, nRelPosY,
DoesObjFollowsTextFlow(),
bCheckBottom );
@@ -625,7 +639,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// anchored object would fit into environment layout
// frame, if anchored object has to follow the text flow.
const bool bCheckBottom = !DoesObjFollowsTextFlow();
- nTmpRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert,
+ nTmpRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R,
rVertEnvironLayFrm,
nTmpRelPosY,
DoesObjFollowsTextFlow(),
@@ -714,7 +728,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// align at 'page areas', but stay inside given environment
const SwFrm& rVertEnvironLayFrm =
aEnvOfObj.GetVertEnvironmentLayoutFrm( *pUpperOfOrientFrm );
- nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert,
+ nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R,
rVertEnvironLayFrm,
nRelPosY,
DoesObjFollowsTextFlow() );
@@ -735,9 +749,19 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert );
if( bVert )
{
- GetAnchoredObj().SetObjLeft( nTopOfAnch -
- ( aRelPos.X() - nRelDiff ) -
- aObjBoundRect.Width() );
+ // --> OD 2009-08-31 #monglianlayout#
+ if ( !bVertL2R )
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch -
+ ( aRelPos.X() - nRelDiff ) -
+ aObjBoundRect.Width() );
+ }
+ else
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch +
+ ( aRelPos.X() - nRelDiff ) );
+ }
+ // <--
}
else
{
@@ -828,7 +852,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
nTmpRelPosY = aRelPos.Y() + nDist;
const SwLayoutFrm& rVertEnvironLayFrm =
aEnvOfObj.GetVertEnvironmentLayoutFrm( *pUpperOfOrientFrm );
- nTmpRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert,
+ nTmpRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R,
rVertEnvironLayFrm,
nTmpRelPosY,
DoesObjFollowsTextFlow(),
@@ -836,9 +860,18 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
if ( bVert )
{
aRelPos.X() = nTmpRelPosY;
- GetAnchoredObj().SetObjLeft( nTopOfAnch -
- aRelPos.X() -
- aObjBoundRect.Width() );
+ // --> OD 2009-08-31 #mongolianlayout#
+ if ( !bVertL2R )
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch -
+ aRelPos.X() -
+ aObjBoundRect.Width() );
+ }
+ else
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch + aRelPos.X() );
+ }
+ // <--
}
else
{
@@ -918,9 +951,21 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
SWREFRESHFN( pUpperOfOrientFrm )
bMoveable = rAnchorTxtFrm.IsMoveable( (SwLayoutFrm*)pUpperOfOrientFrm );
if( bVertX )
- GetAnchoredObj().SetObjLeft( nTopOfAnch -
- aRelPos.X() -
- aObjBoundRect.Width() );
+ {
+ // --> OD 2009-08-31 #mongolianlayout#
+ if ( !bVertL2R )
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch -
+ aRelPos.X() -
+ aObjBoundRect.Width() );
+ }
+ else
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch +
+ aRelPos.X() );
+ }
+ // <--
+ }
else
GetAnchoredObj().SetObjTop( nTopOfAnch +
aRelPos.Y() );
@@ -972,8 +1017,19 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// frame, the horizontal position is oriented at.
const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert );
if( bVert )
- GetAnchoredObj().SetObjLeft( nTopOfAnch -
- aRelPos.X() - aObjBoundRect.Width() );
+ {
+ // --> OD 2009-08-31 #mongolianlayout#
+ if ( !bVertL2R )
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch -
+ aRelPos.X() - aObjBoundRect.Width() );
+ }
+ else
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch + aRelPos.X() );
+ }
+ // <--
+ }
else
GetAnchoredObj().SetObjTop( nTopOfAnch + aRelPos.Y() );
@@ -1023,8 +1079,17 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert );
if( bVert )
{
- GetAnchoredObj().SetObjLeft( nTopOfAnch -
- aRelPos.X() - aObjBoundRect.Width() );
+ // --> OD 2009-08-31 #mongolianlayout#
+ if ( !bVertL2R )
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch -
+ aRelPos.X() - aObjBoundRect.Width() );
+ }
+ else
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch + aRelPos.X() );
+ }
+ // <--
GetAnchoredObj().SetObjTop( rAnchorTxtFrm.Frm().Top() +
aRelPos.Y() );
}
diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
index 4dfadf0222..e42e792048 100644
--- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
@@ -120,7 +120,11 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition()
if( bVert )
{
ASSERT( !bRev, "<SwToLayoutAnchoredObjectPosition::CalcPosition()> - reverse layout set." );
- aRelPos.X() = -nRelPosY - aObjBoundRect.Width();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( bVertL2R )
+ aRelPos.X() = nRelPosY;
+ else
+ aRelPos.X() = -nRelPosY - aObjBoundRect.Width();
maOffsetToFrmAnchorPos.X() = nVertOffsetToFrmAnchorPos;
}
else
@@ -204,8 +208,12 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition()
// determine absolute 'horizontal' position, depending on layout-direction
// --> OD 2004-06-17 #i26791# - determine offset to 'horizontal' frame
// anchor position, depending on layout-direction
- if ( bVert )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ // --> OD 2009-09-04 #mongolianlayout#
+ if( bVert || bVertL2R )
+ // <--
{
+
aRelPos.Y() = nRelPosX;
maOffsetToFrmAnchorPos.Y() = nOffset;
}
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 9618fefa2d..89bdbfcbae 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -222,10 +222,11 @@ sal_Bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
SWRECTFN ( pFrm )
const SwTwips nUpperMaxY = (pTmpFrm->*fnRect->fnGetPrtBottom)();
const SwTwips nFrmMaxY = (pFrm->*fnRect->fnGetPrtBottom)();
-
+
// nMaxY is an absolute value
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
SwTwips nMaxY = bVert ?
- Max( nFrmMaxY, nUpperMaxY ) :
+ ( bVertL2R ? Min( nFrmMaxY, nUpperMaxY ) : Max( nFrmMaxY, nUpperMaxY ) ) :
Min( nFrmMaxY, nUpperMaxY );
sal_Bool bRet = sal_False;
@@ -242,8 +243,8 @@ sal_Bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
{
if( nFirstOffset > 0 )
aPnt1.Y() += nFirstOffset;
-
- if ( aPnt1.X() < nMaxY )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( aPnt1.X() < nMaxY && !bVertL2R )
aPnt1.X() = nMaxY;
aPnt2.X() = aPnt1.X() + pFrm->Prt().Width();
aPnt2.Y() = aPnt1.Y();
@@ -396,8 +397,9 @@ sal_Bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
SwTwips nUpperMaxY = (pTmpFrm->*fnRect->fnGetPrtBottom)();
// nMaxY is in absolute value
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
SwTwips nMaxY = bVert ?
- Max( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) :
+ ( bVertL2R ? Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) : Max( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) ) :
Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY );
if ( pFrm->IsEmpty() || ! (pFrm->Prt().*fnRect->fnGetHeight)() )
@@ -406,8 +408,9 @@ sal_Bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
Point aPnt2;
if ( bVert )
{
- if ( aPnt1.X() < nMaxY )
+ if ( aPnt1.X() < nMaxY && !bVertL2R )
aPnt1.X() = nMaxY;
+
aPnt2.X() = aPnt1.X() + pFrm->Prt().Width();
aPnt2.Y() = aPnt1.Y();
if( aPnt2.X() < nMaxY )
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 1d468339d6..f5a875c7f3 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -482,9 +482,17 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, sal_Bool bHasToFit )
if ( IsVertical() )
{
ASSERT( ! IsSwapped(),"Swapped frame while calculating nRstHeight" );
- nRstHeight = Frm().Left() + Frm().Width() -
- ( GetUpper()->Frm().Left() + GetUpper()->Prt().Left() );
- }
+
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsVertLR() )
+ nRstHeight = GetUpper()->Frm().Left()
+ + GetUpper()->Prt().Left()
+ + GetUpper()->Prt().Width()
+ - Frm().Left();
+ else
+ nRstHeight = Frm().Left() + Frm().Width() -
+ ( GetUpper()->Frm().Left() + GetUpper()->Prt().Left() );
+ }
else
nRstHeight = GetUpper()->Frm().Top()
+ GetUpper()->Prt().Top()
@@ -1137,7 +1145,9 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
// If the frame grows (or shirks) the repaint rectangle cannot simply
// be rotated back after formatting, because we use the upper left point
// of the frame for rotation. This point changes when growing/shrinking.
- if ( IsVertical() && nChg )
+
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsVertical() && !IsVertLR() && nChg )
{
SwRect &rRepaint = *(pPara->GetRepaint());
rRepaint.Left( rRepaint.Left() - nChg );
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 0dc6eddcb2..7d1ea3836b 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -448,6 +448,10 @@ SwRect SwTxtFrm::Paint()
// d.h. als linken Rand den berechneten PaintOfst!
SwRepaint *pRepaint = GetPara()->GetRepaint();
long l;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsVertLR() ) // mba: the following line was added, but we don't need it for the existing directions; kept for IsVertLR(), but should be checked
+ pRepaint->Chg( ( GetUpper()->Frm() ).Pos() + ( GetUpper()->Prt() ).Pos(), ( GetUpper()->Prt() ).SSize() );
+
if( pRepaint->GetOfst() )
pRepaint->Left( pRepaint->GetOfst() );
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 6fdb820d31..56f90b46dc 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -814,7 +814,11 @@ void SwTxtPaintInfo::CalcRect( const SwLinePortion& rPor,
else
{
aPoint.A() = X();
- aPoint.B() = Y() - rPor.GetAscent();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( GetTxtFrm()->IsVertLR() )
+ aPoint.B() = Y() - rPor.Height() + rPor.GetAscent();
+ else
+ aPoint.B() = Y() - rPor.GetAscent();
}
// Adjust x coordinate if we are inside a bidi portion
diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx
index 947f914691..1a53faf4cc 100644
--- a/sw/source/core/text/itrtxt.cxx
+++ b/sw/source/core/text/itrtxt.cxx
@@ -367,7 +367,11 @@ sal_uInt16 SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
case SvxParaVertAlignItem::AUTOMATIC :
if ( bAutoToCentered || GetInfo().GetTxtFrm()->IsVertical() )
{
- nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( GetInfo().GetTxtFrm()->IsVertLR() )
+ nOfst += rLine.Height() - ( rLine.Height() - nPorHeight ) / 2 - nPorAscent;
+ else
+ nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent;
break;
}
case SvxParaVertAlignItem::BASELINE :
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index bdcfdf09f0..620ee91e69 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -104,13 +104,22 @@ void SwTxtFrm::SwapWidthAndHeight()
{
const long nPrtOfstX = Prt().Pos().X();
Prt().Pos().X() = Prt().Pos().Y();
- Prt().Pos().Y() = Frm().Width() - ( nPrtOfstX + Prt().Width() );
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertLR() )
+ Prt().Pos().Y() = nPrtOfstX;
+ else
+ Prt().Pos().Y() = Frm().Width() - ( nPrtOfstX + Prt().Width() );
+
}
else
{
const long nPrtOfstY = Prt().Pos().Y();
Prt().Pos().Y() = Prt().Pos().X();
- Prt().Pos().X() = Frm().Height() - ( nPrtOfstY + Prt().Height() );
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertLR() )
+ Prt().Pos().X() = nPrtOfstY;
+ else
+ Prt().Pos().X() = Frm().Height() - ( nPrtOfstY + Prt().Height() );
}
const long nFrmWidth = Frm().Width();
@@ -128,16 +137,33 @@ void SwTxtFrm::SwapWidthAndHeight()
void SwTxtFrm::SwitchHorizontalToVertical( SwRect& rRect ) const
{
// calc offset inside frame
- const long nOfstX = rRect.Left() - Frm().Left();
- const long nOfstY = rRect.Top() + rRect.Height() - Frm().Top();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ long nOfstX, nOfstY;
+ if ( IsVertLR() )
+ {
+ nOfstX = rRect.Left() - Frm().Left();
+ nOfstY = rRect.Top() - Frm().Top();
+ }
+ else
+ {
+ nOfstX = rRect.Left() - Frm().Left();
+ nOfstY = rRect.Top() + rRect.Height() - Frm().Top();
+ }
+
const long nWidth = rRect.Width();
const long nHeight = rRect.Height();
- if ( bIsSwapped )
- rRect.Left( Frm().Left() + Frm().Height() - nOfstY );
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsVertLR() )
+ rRect.Left(Frm().Left() + nOfstY);
else
- // frame is rotated
- rRect.Left( Frm().Left() + Frm().Width() - nOfstY );
+ {
+ if ( bIsSwapped )
+ rRect.Left( Frm().Left() + Frm().Height() - nOfstY );
+ else
+ // frame is rotated
+ rRect.Left( Frm().Left() + Frm().Width() - nOfstY );
+ }
rRect.Top( Frm().Top() + nOfstX );
rRect.Width( nHeight );
@@ -151,12 +177,17 @@ void SwTxtFrm::SwitchHorizontalToVertical( Point& rPoint ) const
// calc offset inside frame
const long nOfstX = rPoint.X() - Frm().Left();
const long nOfstY = rPoint.Y() - Frm().Top();
-
- if ( bIsSwapped )
- rPoint.X() = Frm().Left() + Frm().Height() - nOfstY;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsVertLR() )
+ rPoint.X() = Frm().Left() + nOfstY;
else
- // calc rotated coords
- rPoint.X() = Frm().Left() + Frm().Width() - nOfstY;
+ {
+ if ( bIsSwapped )
+ rPoint.X() = Frm().Left() + Frm().Height() - nOfstY;
+ else
+ // calc rotated coords
+ rPoint.X() = Frm().Left() + Frm().Width() - nOfstY;
+ }
rPoint.Y() = Frm().Top() + nOfstX;
}
@@ -177,10 +208,17 @@ void SwTxtFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const
long nOfstX;
// calc offset inside frame
- if ( bIsSwapped )
- nOfstX = Frm().Left() + Frm().Height() - ( rRect.Left() + rRect.Width() );
+
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsVertLR() )
+ nOfstX = rRect.Left() - Frm().Left();
else
- nOfstX = Frm().Left() + Frm().Width() - ( rRect.Left() + rRect.Width() );
+ {
+ if ( bIsSwapped )
+ nOfstX = Frm().Left() + Frm().Height() - ( rRect.Left() + rRect.Width() );
+ else
+ nOfstX = Frm().Left() + Frm().Width() - ( rRect.Left() + rRect.Width() );
+ }
const long nOfstY = rRect.Top() - Frm().Top();
const long nWidth = rRect.Height();
@@ -200,10 +238,17 @@ void SwTxtFrm::SwitchVerticalToHorizontal( Point& rPoint ) const
long nOfstX;
// calc offset inside frame
- if ( bIsSwapped )
- nOfstX = Frm().Left() + Frm().Height() - rPoint.X();
+
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsVertLR() )
+ nOfstX = rPoint.X() - Frm().Left();
else
- nOfstX = Frm().Left() + Frm().Width() - rPoint.X();
+ {
+ if ( bIsSwapped )
+ nOfstX = Frm().Left() + Frm().Height() - rPoint.X();
+ else
+ nOfstX = Frm().Left() + Frm().Width() - rPoint.X();
+ }
const long nOfstY = rPoint.Y() - Frm().Top();
@@ -2547,6 +2592,12 @@ void SwTxtFrm::ChgThisLines()
else //Paragraphs which are not counted should not manipulate the AllLines.
nThisLines = nNew;
}
+
+ //mba: invalidating is not necessary; if mongolian script has a problem, it should be fixed at the ritgh place
+ //with invalidating we probably get too much flickering
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ //Ugly. How can we hack if better?
+ //InvalidatePage();
}
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index c1c8514946..9e4d10f170 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -84,7 +84,6 @@ sal_uInt16 SwLineInfo::NumberOfTabStops() const
/*************************************************************************
* SwTxtFormatter::NewTabPortion()
*************************************************************************/
-
SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto ) const
{
SwTabPortion *pTabPor = 0;
@@ -140,7 +139,12 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
nLinePos - nTabPos :
nLinePos + nTabPos;
- SwTwips nMyRight = Right();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwTwips nMyRight;
+ if ( pFrm->IsVertLR() )
+ nMyRight = Left();
+ else
+ nMyRight = Right();
if ( pFrm->IsVertical() )
{
@@ -211,63 +215,74 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
cFill = 0;
eAdj = SVX_TAB_ADJUST_LEFT;
}
- // --> OD 2008-02-07 #newlistlevelattrs#
- long nForced = 0;
- if ( !bTabsRelativeToIndent )
+
+ // --> OD #i115705# - correction and refactoring:
+ // overrule determined next tab stop position in order to apply
+ // a tab stop at the left margin under the following conditions:
+ // - the new tab portion is inside the hanging indent
+ // - a tab stop at the left margin is allowed
+ // - the determined next tab stop is a default tab stop position OR
+ // the determined next tab stop is beyond the left margin
{
- if ( bRTL )
+ long nLeftMarginTabPos = 0;
{
- Point aPoint( Left(), 0 );
- pFrm->SwitchLTRtoRTL( aPoint );
- nForced = pFrm->Frm().Right() - aPoint.X();
+ if ( !bTabsRelativeToIndent )
+ {
+ if ( bRTL )
+ {
+ Point aPoint( Left(), 0 );
+ pFrm->SwitchLTRtoRTL( aPoint );
+ nLeftMarginTabPos = pFrm->Frm().Right() - aPoint.X();
+ }
+ else
+ {
+ nLeftMarginTabPos = Left() - pFrm->Frm().Left();
+ }
+ }
+ if( pCurr->HasForcedLeftMargin() )
+ {
+ SwLinePortion* pPor = pCurr->GetPortion();
+ while( pPor && !pPor->IsFlyPortion() )
+ {
+ pPor = pPor->GetPortion();
+ }
+ if ( pPor )
+ {
+ nLeftMarginTabPos += pPor->Width();
+ }
+ }
}
- else
+ const bool bNewTabPortionInsideHangingIndent =
+ bRTL ? nCurrentAbsPos > nTabLeft - nLeftMarginTabPos
+ : nCurrentAbsPos < nTabLeft + nLeftMarginTabPos;
+ if ( bNewTabPortionInsideHangingIndent )
{
- nForced = Left() - pFrm->Frm().Left();
+ // If the paragraph is not inside a list having a list tab stop following
+ // the list label or no further tab stop found in such a paragraph or
+ // the next tab stop position does not equal the list tab stop,
+ // a tab stop at the left margin can be applied. If this condition is
+ // not hold, it is overruled by compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST.
+ const bool bTabAtLeftMarginAllowed =
+ ( !aLineInf.IsListTabStopIncluded() ||
+ !pTabStop ||
+ nNextPos != aLineInf.GetListTabStopPosition() ) ||
+ // compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
+ pFrm->GetTxtNode()->getIDocumentSettingAccess()->
+ get(IDocumentSettingAccess::TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST);
+ if ( bTabAtLeftMarginAllowed )
+ {
+ if ( !pTabStop || eAdj == SVX_TAB_ADJUST_DEFAULT ||
+ ( nNextPos > nLeftMarginTabPos ) )
+ {
+ eAdj = SVX_TAB_ADJUST_DEFAULT;
+ cFill = 0;
+ nNextPos = nLeftMarginTabPos;
+ }
+ }
}
}
- if( pCurr->HasForcedLeftMargin() )
- {
- SwLinePortion* pPor = pCurr->GetPortion();
- while( pPor && !pPor->IsFlyPortion() )
- pPor = pPor->GetPortion();
- if( pPor )
- nForced += pPor->Width();
- }
-
- // <--
- // --> OD 2009-04-03 #i100732#
- // correction of condition, when a tab stop at the left margin can
- // be applied:
- // If the paragraph is not inside a list having a list tab stop following
- // the list label or no further tab stop found in such a paragraph or
- // the next tab stop position does not equal the list tab stop,
- // a tab stop at the left margin can be applied. If this condition is
- // not hold, it is overruled by compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST.
- const bool bTabAtLeftMargin =
- ( !aLineInf.IsListTabStopIncluded() ||
- !pTabStop ||
- nNextPos != aLineInf.GetListTabStopPosition() ) ||
- // compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
- pFrm->GetTxtNode()->getIDocumentSettingAccess()->
- get(IDocumentSettingAccess::TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST);
- if ( bTabAtLeftMargin &&
- // <--
- ( ( bRTL && nCurrentAbsPos > nTabLeft - nForced ) ||
- ( !bRTL && nCurrentAbsPos < nTabLeft + nForced ) ) &&
- // --> OD 2009-07-21 #i103685#
- // adjust condition:
- // - back to pre OOo 3.0 condition, if tab stops are relative to indent
- // - further checks needed, if tab stops are not relative to indent
- ( nNextPos > 0 &&
- ( bTabsRelativeToIndent ||
- ( !pTabStop || nNextPos > nForced ) ) ) )
- // <--
- {
- eAdj = SVX_TAB_ADJUST_DEFAULT;
- cFill = 0;
- nNextPos = nForced;
- }
+ // <--
+
nNextPos += bRTL ? nLinePos - nTabLeft : nTabLeft - nLinePos;
ASSERT( nNextPos >= 0, "GetTabStop: Don't go back!" );
nNewTabPos = KSHORT(nNextPos);
diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx
index 9869ba7583..b89f364971 100644
--- a/sw/source/core/text/widorp.cxx
+++ b/sw/source/core/text/widorp.cxx
@@ -222,9 +222,17 @@ void SwTxtFrmBreak::SetRstHeight( const SwTxtMargin &rLine )
{
// OD, FME 2004-02-27 #106629# - consider bottom margin
SWRECTFN( pFrm )
+
nRstHeight = (pFrm->*fnRect->fnGetBottomMargin)();
+
if ( bVert )
- nRstHeight += nOrigin - pFrm->SwitchHorizontalToVertical( rLine.Y() );
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
+ if ( pFrm->IsVertLR() )
+ nRstHeight = (*fnRect->fnYDiff)( pFrm->SwitchHorizontalToVertical( rLine.Y() ) , nOrigin );
+ else
+ nRstHeight += nOrigin - pFrm->SwitchHorizontalToVertical( rLine.Y() );
+ }
else
nRstHeight += rLine.Y() - nOrigin;
}
diff --git a/sw/source/core/txtnode/atrref.cxx b/sw/source/core/txtnode/atrref.cxx
index 556ad0374c..89a5c65941 100644
--- a/sw/source/core/txtnode/atrref.cxx
+++ b/sw/source/core/txtnode/atrref.cxx
@@ -77,7 +77,7 @@ SfxPoolItem* SwFmtRefMark::Clone( SfxItemPool* ) const
// Attribut fuer Inhalts-/Positions-Referenzen im Text
SwTxtRefMark::SwTxtRefMark( SwFmtRefMark& rAttr,
- xub_StrLen nStartPos, xub_StrLen* pEnd )
+ xub_StrLen const nStartPos, xub_StrLen const*const pEnd)
: SwTxtAttrEnd( rAttr, nStartPos, nStartPos )
, m_pTxtNode( 0 )
, m_pEnd( 0 )
diff --git a/sw/source/core/txtnode/atrtox.cxx b/sw/source/core/txtnode/atrtox.cxx
index 58c16c05b9..ebd274b2e2 100644
--- a/sw/source/core/txtnode/atrtox.cxx
+++ b/sw/source/core/txtnode/atrtox.cxx
@@ -36,7 +36,7 @@
#include <ndtxt.hxx>
SwTxtTOXMark::SwTxtTOXMark( SwTOXMark& rAttr,
- xub_StrLen nStartPos, xub_StrLen* pEnd )
+ xub_StrLen const nStartPos, xub_StrLen const*const pEnd)
: SwTxtAttrEnd( rAttr, nStartPos, nStartPos )
, m_pTxtNode( 0 )
, m_pEnd( 0 )
diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index b839918cd9..8669ee4108 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -613,6 +613,7 @@ SwFmtMeta::~SwFmtMeta()
{
if (m_pMeta && (m_pMeta->GetFmtMeta() == this))
{
+ NotifyChangeTxtNode(0);
m_pMeta->SetFmtMeta(0);
}
}
@@ -633,16 +634,24 @@ SfxPoolItem * SwFmtMeta::Clone( SfxItemPool * /*pPool*/ ) const
void SwFmtMeta::SetTxtAttr(SwTxtMeta * const i_pTxtAttr)
{
- ASSERT(!(m_pTxtAttr && i_pTxtAttr),
+ OSL_ENSURE(!(m_pTxtAttr && i_pTxtAttr),
"SwFmtMeta::SetTxtAttr: already has text attribute?");
- ASSERT( m_pTxtAttr || i_pTxtAttr ,
+ OSL_ENSURE( m_pTxtAttr || i_pTxtAttr ,
"SwFmtMeta::SetTxtAttr: no attribute to remove?");
m_pTxtAttr = i_pTxtAttr;
- ASSERT(m_pMeta, "inserted SwFmtMeta has no sw::Meta?");
+ OSL_ENSURE(m_pMeta, "inserted SwFmtMeta has no sw::Meta?");
// the sw::Meta must be able to find the current text attribute!
- if (i_pTxtAttr && m_pMeta)
+ if (m_pMeta)
{
- m_pMeta->SetFmtMeta(this);
+ if (i_pTxtAttr)
+ {
+ m_pMeta->SetFmtMeta(this);
+ }
+ else if (m_pMeta->GetFmtMeta() == this)
+ { // text attribute gone => de-register from text node!
+ NotifyChangeTxtNode(0);
+ m_pMeta->SetFmtMeta(0);
+ }
}
}
@@ -650,36 +659,22 @@ void SwFmtMeta::NotifyChangeTxtNode(SwTxtNode *const pTxtNode)
{
// N.B.: do not reset m_pTxtAttr here: see call in nodes.cxx,
// where the hint is not deleted!
- ASSERT(m_pMeta, "NotifyRemoval: no meta ?");
- if (m_pMeta)
- {
- if (!pTxtNode)
- {
- SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT,
- &static_cast<SwModify&>(*m_pMeta) ); // cast to base class!
- m_pMeta->Modify(&aMsgHint, &aMsgHint);
- }
- else
- { // do not call Modify, that would call SwXMeta::Modify!
- m_pMeta->NotifyChangeTxtNode();
- }
+ OSL_ENSURE(m_pMeta, "SwFmtMeta::NotifyChangeTxtNode: no Meta?");
+ if (m_pMeta && (m_pMeta->GetFmtMeta() == this))
+ { // do not call Modify, that would call SwXMeta::Modify!
+ m_pMeta->NotifyChangeTxtNode(pTxtNode);
}
}
-// UGLY: this really awful method fixes up an inconsistent state,
-// and if it is not called when copying, total chaos will undoubtedly ensue
-void SwFmtMeta::DoCopy(SwFmtMeta & rOriginalMeta)
+// this SwFmtMeta has been cloned and points at the same sw::Meta as the source
+// this method copies the sw::Meta
+void SwFmtMeta::DoCopy(::sw::MetaFieldManager & i_rTargetDocManager,
+ SwTxtNode & i_rTargetTxtNode)
{
- ASSERT(m_pMeta, "DoCopy called for SwFmtMeta with no sw::Meta?");
+ OSL_ENSURE(m_pMeta, "DoCopy called for SwFmtMeta with no sw::Meta?");
if (m_pMeta)
{
const ::boost::shared_ptr< ::sw::Meta> pOriginal( m_pMeta );
- // UGLY: original sw::Meta now points at _this_ due to being already
- // inserted via MakeTxtAttr! so fix it up to point at the original item
- // (maybe would be better to tell MakeTxtAttr that it creates a copy?)
- pOriginal->SetFmtMeta(&rOriginalMeta);
- // force pOriginal to register in original text node!
- pOriginal->NotifyChangeTxtNode();
if (RES_TXTATR_META == Which())
{
m_pMeta.reset( new ::sw::Meta(this) );
@@ -688,14 +683,13 @@ void SwFmtMeta::DoCopy(SwFmtMeta & rOriginalMeta)
{
::sw::MetaField *const pMetaField(
static_cast< ::sw::MetaField* >(pOriginal.get()));
- SwDoc * const pTargetDoc( GetTxtAttr()->GetTxtNode()->GetDoc() );
- m_pMeta = pTargetDoc->GetMetaFieldManager().makeMetaField( this,
+ m_pMeta = i_rTargetDocManager.makeMetaField( this,
pMetaField->m_nNumberFormat, pMetaField->IsFixedLanguage() );
}
+ // Meta must have a text node before calling RegisterAsCopyOf
+ m_pMeta->NotifyChangeTxtNode(& i_rTargetTxtNode);
// this cannot be done in Clone: a Clone is not necessarily a copy!
m_pMeta->RegisterAsCopyOf(*pOriginal);
- // force copy Meta to register in target text node!
- m_pMeta->NotifyChangeTxtNode();
}
}
@@ -724,27 +718,36 @@ SwTxtMeta * Meta::GetTxtAttr() const
SwTxtNode * Meta::GetTxtNode() const
{
- SwTxtMeta * const pTxtAttr( GetTxtAttr() );
- return (pTxtAttr) ? pTxtAttr->GetTxtNode() : 0;
+ return m_pTxtNode;
}
-void Meta::NotifyChangeTxtNode()
+void Meta::NotifyChangeTxtNodeImpl()
{
- SwTxtNode * const pTxtNode( GetTxtNode() );
- if (pTxtNode && (GetRegisteredIn() != pTxtNode))
+ if (m_pTxtNode && (GetRegisteredIn() != m_pTxtNode))
{
- pTxtNode->Add(this);
+ m_pTxtNode->Add(this);
}
- else if (!pTxtNode && GetRegisteredIn())
+ else if (!m_pTxtNode && GetRegisteredIn())
{
const_cast<SwModify *>(GetRegisteredIn())->Remove(this);
}
}
+void Meta::NotifyChangeTxtNode(SwTxtNode *const pTxtNode)
+{
+ m_pTxtNode = pTxtNode;
+ NotifyChangeTxtNodeImpl();
+ if (!pTxtNode) // text node gone? invalidate UNO object!
+ {
+ SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT,
+ &static_cast<SwModify&>(*this) ); // cast to base class!
+ this->Modify(&aMsgHint, &aMsgHint);
+ }
+}
+
// SwClient
void Meta::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
- NotifyChangeTxtNode();
SwModify::Modify(pOld, pNew);
if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which()))
{ // invalidate cached uno object
@@ -752,7 +755,7 @@ void Meta::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
}
}
-// sw::Metadatable
+// sfx2::Metadatable
::sfx2::IXmlIdRegistry& Meta::GetRegistry()
{
SwTxtNode * const pTxtNode( GetTxtNode() );
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index a5831b394f..9ad6e03e6b 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1435,15 +1435,10 @@ void lcl_CopyHint( const sal_uInt16 nWhich, const SwTxtAttr * const pHt,
}
case RES_TXTATR_META:
case RES_TXTATR_METAFIELD:
- ASSERT(pNewHt, "copying META should not fail! cannot call DoCopy");
- ASSERT(pDest && (CH_TXTATR_INWORD ==
+ OSL_ENSURE(pNewHt, "copying Meta should not fail!");
+ OSL_ENSURE(pDest && (CH_TXTATR_INWORD ==
pDest->GetTxt().GetChar(*pNewHt->GetStart())),
"missing CH_TXTATR?");
- if (pNewHt)
- {
- SwFmtMeta & rMeta(static_cast<SwFmtMeta&>(pNewHt->GetAttr()));
- rMeta.DoCopy( const_cast<SwFmtMeta&>(pHt->GetMeta()) );
- }
break;
}
}
@@ -1484,7 +1479,8 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const xub_StrLen nTxtStartIdx,
{
// attribute in the area => copy
SwTxtAttr *const pNewHt = pDest->InsertItem(
- pHt->GetAttr(), nOldPos, nOldPos );
+ pHt->GetAttr(), nOldPos, nOldPos,
+ nsSetAttrMode::SETATTR_IS_COPY);
if ( pNewHt )
{
lcl_CopyHint( nWhich, pHt, pNewHt,
@@ -1495,7 +1491,8 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const xub_StrLen nTxtStartIdx,
: 0 == pOtherDoc->GetRefMark(
pHt->GetRefMark().GetRefName() ) )
{
- pDest->InsertItem( pHt->GetAttr(), nOldPos, nOldPos );
+ pDest->InsertItem( pHt->GetAttr(), nOldPos, nOldPos,
+ nsSetAttrMode::SETATTR_IS_COPY);
}
}
}
@@ -1718,9 +1715,9 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
if( pDest == this )
{
- // die Daten kopieren
+ // copy the hint here, but insert it later
pNewHt = MakeTxtAttr( *GetDoc(), pHt->GetAttr(),
- nAttrStt, nAttrEnd );
+ nAttrStt, nAttrEnd, COPY, pDest );
lcl_CopyHint(nWhich, pHt, pNewHt, 0, pDest);
aArr.C40_INSERT( SwTxtAttr, pNewHt, aArr.Count() );
@@ -1728,7 +1725,9 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
else
{
pNewHt = pDest->InsertItem( pHt->GetAttr(), nAttrStt - nDeletedDummyChars,
- nAttrEnd - nDeletedDummyChars, nsSetAttrMode::SETATTR_NOTXTATRCHR );
+ nAttrEnd - nDeletedDummyChars,
+ nsSetAttrMode::SETATTR_NOTXTATRCHR
+ | nsSetAttrMode::SETATTR_IS_COPY);
if (pNewHt)
{
lcl_CopyHint( nWhich, pHt, pNewHt, pOtherDoc, pDest );
@@ -2208,7 +2207,8 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
{
const bool bSuccess( pDest->InsertHint( pNewHt,
nsSetAttrMode::SETATTR_NOTXTATRCHR
- | nsSetAttrMode::SETATTR_DONTREPLACE ) );
+ | nsSetAttrMode::SETATTR_DONTREPLACE
+ | nsSetAttrMode::SETATTR_IS_COPY) );
if (bSuccess)
{
lcl_CopyHint( nWhich, pHt, pNewHt, pOtherDoc, pDest );
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index e011520ef3..f9a2cb96e7 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -996,7 +996,8 @@ SwTxtAttr* MakeRedlineTxtAttr( SwDoc & rDoc, SfxPoolItem & rAttr )
// create new text attribute
SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr,
- xub_StrLen nStt, xub_StrLen nEnd )
+ xub_StrLen const nStt, xub_StrLen const nEnd,
+ CopyOrNew_t const bIsCopy, SwTxtNode *const pTxtNode)
{
if ( isCHRATR(rAttr.Which()) )
{
@@ -1077,7 +1078,8 @@ SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr,
break;
case RES_TXTATR_META:
case RES_TXTATR_METAFIELD:
- pNew = new SwTxtMeta( static_cast<SwFmtMeta&>(rNew), nStt, nEnd );
+ pNew = SwTxtMeta::CreateTxtMeta( rDoc.GetMetaFieldManager(), pTxtNode,
+ static_cast<SwFmtMeta&>(rNew), nStt, nEnd, bIsCopy );
break;
default:
ASSERT(RES_TXTATR_AUTOFMT == rNew.Which(), "unknown attribute");
@@ -1211,7 +1213,8 @@ SwTxtNode::InsertItem( SfxPoolItem& rAttr,
ASSERT( !isCHRATR(rAttr.Which()), "AUTOSTYLES - "
"SwTxtNode::InsertItem should not be called with character attributes");
- SwTxtAttr* const pNew = MakeTxtAttr( *GetDoc(), rAttr, nStart, nEnd );
+ SwTxtAttr *const pNew = MakeTxtAttr( *GetDoc(), rAttr, nStart, nEnd,
+ (nMode & nsSetAttrMode::SETATTR_IS_COPY) ? COPY : NEW, this );
if ( pNew )
{
diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx
index 678a5d6c90..f49181cd48 100644
--- a/sw/source/core/txtnode/txtatr2.cxx
+++ b/sw/source/core/txtnode/txtatr2.cxx
@@ -308,10 +308,25 @@ SwCharFmt* SwTxtRuby::GetCharFmt()
* class SwTxtMeta
*************************************************************************/
+SwTxtMeta *
+SwTxtMeta::CreateTxtMeta(
+ ::sw::MetaFieldManager & i_rTargetDocManager,
+ SwTxtNode *const i_pTargetTxtNode,
+ SwFmtMeta & i_rAttr,
+ xub_StrLen const i_nStart, xub_StrLen const i_nEnd, bool const i_bIsCopy)
+{
+ if (COPY == i_bIsCopy)
+ { // i_rAttr is already cloned, now call DoCopy to copy the sw::Meta
+ OSL_ENSURE(i_pTargetTxtNode, "cannot copy Meta without target node");
+ i_rAttr.DoCopy(i_rTargetDocManager, *i_pTargetTxtNode);
+ }
+ SwTxtMeta *const pTxtMeta(new SwTxtMeta(i_rAttr, i_nStart, i_nEnd));
+ return pTxtMeta;
+}
+
SwTxtMeta::SwTxtMeta( SwFmtMeta & i_rAttr,
const xub_StrLen i_nStart, const xub_StrLen i_nEnd )
: SwTxtAttrNesting( i_rAttr, i_nStart, i_nEnd )
- , m_pTxtNode( 0 )
{
i_rAttr.SetTxtAttr( this );
SetHasDummyChar(true);
@@ -328,7 +343,6 @@ SwTxtMeta::~SwTxtMeta()
void SwTxtMeta::ChgTxtNode(SwTxtNode * const pNode)
{
- m_pTxtNode = pNode; // before Notify!
SwFmtMeta & rFmtMeta( static_cast<SwFmtMeta &>(GetAttr()) );
if (rFmtMeta.GetTxtAttr() == this)
{
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index a52bdc1ebe..13b9ef527c 100644..100755
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -966,11 +966,11 @@ void SwTxtNode::SetLanguageAndFont( const SwPaM &rPaM,
if (pFont)
{
SvxFontItem aFontItem = (SvxFontItem&) aSet.Get( nFontWhichId );
- aFontItem.GetFamilyName() = pFont->GetName();
- aFontItem.GetFamily() = pFont->GetFamily();
- aFontItem.GetStyleName() = pFont->GetStyleName();
- aFontItem.GetPitch() = pFont->GetPitch();
- aFontItem.GetCharSet() = pFont->GetCharSet();
+ aFontItem.SetFamilyName( pFont->GetName());
+ aFontItem.SetFamily( pFont->GetFamily());
+ aFontItem.SetStyleName( pFont->GetStyleName());
+ aFontItem.SetPitch( pFont->GetPitch());
+ aFontItem.SetCharSet( pFont->GetCharSet() );
aSet.Put( aFontItem );
}
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index a83710618d..f571ba513b 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -886,7 +886,7 @@ bool SwXMeta::SetContentRange(
SwTxtMeta const * const pTxtAttr( pMeta->GetTxtAttr() );
if (pTxtAttr)
{
- rpNode = pTxtAttr->GetTxtNode();
+ rpNode = pMeta->GetTxtNode();
if (rpNode)
{
// rStart points at the first position _within_ the meta!
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 7b7955cc30..da95279d8f 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1853,32 +1853,6 @@ static bool lcl_SimilarPosition( const sal_Int32 nPos1, const sal_Int32 nPos2 )
return abs( nPos1 - nPos2 ) < COL_POS_FUZZY;
}
-void SwXText::copyText(
- const uno::Reference< text::XTextCopy >& xSource )
- throw ( uno::RuntimeException )
-{
- uno::Reference< lang::XUnoTunnel > xTTunnel( xSource, uno::UNO_QUERY_THROW );
- SwXText* pText = 0;
- pText = reinterpret_cast< SwXText* >(
- sal::static_int_cast< sal_IntPtr >( xTTunnel->getSomething( SwXText::getUnoTunnelId()) ));
-
- uno::Reference< text::XText > xText( xSource, uno::UNO_QUERY_THROW );
- uno::Reference< text::XTextCursor > xCursor = xText->createTextCursor( );
- xCursor->gotoEnd( sal_True );
-
- uno::Reference< lang::XUnoTunnel > xTunnel( xCursor, uno::UNO_QUERY_THROW );
-
- OTextCursorHelper* pCursor = 0;
- pCursor = reinterpret_cast< OTextCursorHelper* >(
- sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) ));
- if ( pCursor )
- {
- SwNodeIndex rNdIndex( *GetStartNode( ), 1 );
- SwPosition rPos( rNdIndex );
- m_pImpl->m_pDoc->CopyRange( *pCursor->GetPaM( ), rPos, false );
- }
-}
-
void SwXText::Impl::ConvertCell(
const bool bFirstCell,
const uno::Sequence< uno::Reference< text::XTextRange > > & rCell,
@@ -2383,6 +2357,35 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
return xRet;
}
+
+void SAL_CALL
+SwXText::copyText(
+ const uno::Reference< text::XTextCopy >& xSource )
+throw (uno::RuntimeException)
+{
+ vos::OGuard g(Application::GetSolarMutex());
+
+ uno::Reference< text::XText > const xText(xSource, uno::UNO_QUERY_THROW);
+ uno::Reference< text::XTextCursor > const xCursor =
+ xText->createTextCursor();
+ xCursor->gotoEnd( sal_True );
+
+ uno::Reference< lang::XUnoTunnel > const xCursorTunnel(xCursor,
+ uno::UNO_QUERY_THROW);
+
+ OTextCursorHelper *const pCursor =
+ ::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xCursorTunnel);
+ if (!pCursor)
+ {
+ throw uno::RuntimeException();
+ }
+
+ SwNodeIndex rNdIndex( *GetStartNode( ), 1 );
+ SwPosition rPos( rNdIndex );
+ m_pImpl->m_pDoc->CopyRange( *pCursor->GetPaM(), rPos, false );
+}
+
+
/******************************************************************
* SwXBodyText
******************************************************************/
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index dd2cd6580a..6bd4ceb7f1 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -310,7 +310,7 @@ sal_uLong SwASCIIParser::ReadChars()
}
else if (pUseMe != &aEmpty) //Already successfully figured out type
{
- rInput.StartReadingUnicodeText();
+ rInput.StartReadingUnicodeText( currentCharSet );
bSwapUnicode = rInput.IsEndianSwap();
}
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 42f0cd0b58..7352c3d33d 100644..100755
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -118,6 +118,11 @@ RtfSdrExport& RtfExport::SdrExporter() const
return *m_pSdrExport;
}
+bool RtfExport::HackIsWW8OrHigher() const
+{
+ return true;
+}
+
bool RtfExport::CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich )
{
// FIXME is this actually true for rtf? - this is copied from DOCX
@@ -480,6 +485,10 @@ void RtfExport::WritePageDescTable()
}
Strm() << '}' << sNewLine;
bOutPageDescs = sal_False;
+
+ // reset table infos, otherwise the depth of the cells will be incorrect,
+ // in case the page style (header or footer) had tables
+ mpTableInfo = ww8::WW8TableInfo::Pointer_t(new ww8::WW8TableInfo());
}
void RtfExport::ExportDocument_Impl()
@@ -1243,16 +1252,19 @@ void RtfExport::WriteHeaderFooter(const SwFrmFmt& rFmt, bool bHeader, const sal_
class SwRTFWriter : public Writer
{
- public:
+ bool m_bOutOutlineOnly;
+ public:
SwRTFWriter( const String& rFilterName, const String& rBaseURL );
virtual ~SwRTFWriter();
virtual sal_uLong WriteStream();
};
-SwRTFWriter::SwRTFWriter( const String& /*rFltName*/, const String & rBaseURL )
+SwRTFWriter::SwRTFWriter( const String& rFltName, const String & rBaseURL )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
SetBaseURL( rBaseURL );
+ // export outline nodes, only (send outline to clipboard/presentation)
+ m_bOutOutlineOnly = 'O' == rFltName.GetChar( 0 );
}
SwRTFWriter::~SwRTFWriter()
@@ -1262,6 +1274,7 @@ sal_uLong SwRTFWriter::WriteStream()
{
OSL_TRACE("%s", OSL_THIS_FUNC);
RtfExport aExport( NULL, pDoc, new SwPaM( *pCurPam->End(), *pCurPam->Start() ), pCurPam, this );
+ aExport.mbOutOutlineOnly = m_bOutOutlineOnly;
aExport.ExportDocument( true );
return 0;
}
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index b53d634b25..8047cc3214 100644..100755
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -82,7 +82,7 @@ public:
virtual RtfSdrExport& SdrExporter() const;
/// Hack, unfortunately necessary at some places for now.
- virtual bool HackIsWW8OrHigher() const { return false; }
+ virtual bool HackIsWW8OrHigher() const;
/// Guess the script (asian/western).
virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich );
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index c20f4f3f10..ae1cf53637 100644..100755
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -107,6 +107,7 @@
#include <ndgrf.hxx>
#include <ndole.hxx>
+
#include <cstdio>
using namespace ::com::sun::star;
@@ -573,7 +574,7 @@ void WW8SwAttrIter::OutAttr( xub_StrLen nSwPos )
characters.
*/
if ( !m_rExport.HackIsWW8OrHigher() )
- aFont.GetCharSet() = GetCharSet();
+ aFont.SetCharSet( GetCharSet() );
if ( rParentFont != aFont )
m_rExport.AttrOutput().OutputItem( aFont );
@@ -1648,12 +1649,13 @@ xub_StrLen MSWordExportBase::GetNextPos( WW8SwAttrIter* aAttrIter, const SwTxtNo
{
// Get the bookmarks for the normal run
xub_StrLen nNextPos = aAttrIter->WhereNext();
-
- GetSortedBookmarks( rNode, nAktPos, nNextPos - nAktPos );
-
xub_StrLen nNextBookmark = nNextPos;
- NearestBookmark( nNextPos, nAktPos, false );
+ if( nNextBookmark > nAktPos )//no need to search for bookmarks otherwise
+ {
+ GetSortedBookmarks( rNode, nAktPos, nNextBookmark - nAktPos );
+ NearestBookmark( nNextBookmark, nAktPos, false );
+ }
return std::min( nNextPos, nNextBookmark );
}
@@ -1661,9 +1663,9 @@ void MSWordExportBase::UpdatePosition( WW8SwAttrIter* aAttrIter, xub_StrLen nAkt
{
xub_StrLen nNextPos;
- // go to next attribute if no bookmark is found of if the bookmark is behind the next attribute position
+ // go to next attribute if no bookmark is found and if the next attribute position if at the current position
bool bNextBookmark = NearestBookmark( nNextPos, nAktPos, true );
- if( !bNextBookmark || nNextPos < aAttrIter->WhereNext() )
+ if( !bNextBookmark && nAktPos >= aAttrIter->WhereNext() )
aAttrIter->NextPos();
}
@@ -2849,8 +2851,12 @@ void MSWordExportBase::OutputContentNode( const SwCntntNode& rNode )
switch ( rNode.GetNodeType() )
{
case ND_TEXTNODE:
- OutputTextNode( *rNode.GetTxtNode() );
- break;
+ {
+ const SwTxtNode& rTextNode = *rNode.GetTxtNode();
+ if( !mbOutOutlineOnly || rTextNode.IsOutline() )
+ OutputTextNode( rTextNode );
+ }
+ break;
case ND_GRFNODE:
OutputGrfNode( *rNode.GetGrfNode() );
break;
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 00d8208e9a..cf3ebf4e8c 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3391,6 +3391,7 @@ MSWordExportBase::MSWordExportBase( SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM
pStyles( NULL ),
bHasHdr(false), bHasFtr(false), bSubstituteBullets(true),
mbExportModeRTF( false ),
+ mbOutOutlineOnly( false ),
pDoc( pDocument ),
pCurPam( pCurrentPam ),
pOrigPam( pOriginalPam )
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 9d8f9a3a90..be83605310 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -554,6 +554,7 @@ public:
sal_uInt8 bSubstituteBullets : 1; // true: SubstituteBullet() gets called
bool mbExportModeRTF;
+ bool mbOutOutlineOnly; // export outline nodes, only (send outline to clipboard/presentation)
SwDoc *pDoc;
SwPaM *pCurPam, *pOrigPam;
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index e647f610f1..893d704049 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -79,6 +79,8 @@
#include "docsh.hxx"
#include <cstdio>
+#include <stdio.h>
+
using namespace ::com::sun::star;
using namespace nsFieldFlags;
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index d4bc6e9d24..e9f4faa148 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2573,7 +2573,10 @@ void WW8TabDesc::CreateSwTable()
else
{
if (nPreferredWidth)
- nLeft = pIo->maSectionManager.GetTextAreaWidth() - nPreferredWidth - nOrgDxaLeft;
+ {
+ nLeft = pIo->maSectionManager.GetTextAreaWidth();
+ nLeft = nLeft - nPreferredWidth - nOrgDxaLeft;
+ }
else
nLeft = -GetMinLeft();
}
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 2850668b60..e47676c74e 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -70,21 +70,22 @@ using ::com::sun::star::beans::XPropertySetInfo;
SwDoc* lcl_GetDocViaTunnel( Reference<XTextCursor> & rCursor )
{
Reference<XUnoTunnel> xTunnel( rCursor, UNO_QUERY);
- DBG_ASSERT( xTunnel.is(), "missing XUnoTunnel for Cursor" );
- OTextCursorHelper* pSwXCursor = reinterpret_cast< OTextCursorHelper * >(
- sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething(OTextCursorHelper::getUnoTunnelId())) );
- DBG_ASSERT( NULL != pSwXCursor, "OTextCursorHelper missing" );
- return pSwXCursor->GetDoc();
+ OSL_ENSURE(xTunnel.is(), "missing XUnoTunnel for XTextCursor");
+ OTextCursorHelper *const pXCursor =
+ ::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xTunnel);
+ OSL_ENSURE( pXCursor, "OTextCursorHelper missing" );
+ return (pXCursor) ? pXCursor->GetDoc() : 0;
}
SwDoc* lcl_GetDocViaTunnel( Reference<XTextRange> & rRange )
{
Reference<XUnoTunnel> xTunnel(rRange, UNO_QUERY);
- DBG_ASSERT(xTunnel.is(), "Can't tunnel XTextRange");
- SwXTextRange *pRange = reinterpret_cast< SwXTextRange *>(
- sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething(SwXTextRange::getUnoTunnelId())) );
- DBG_ASSERT( NULL != pRange, "SwXTextRange missing" );
- return pRange->GetDoc();
+ OSL_ENSURE(xTunnel.is(), "missing XUnoTunnel for XTextRange");
+ SwXTextRange *const pXRange =
+ ::sw::UnoTunnelGetImplementation<SwXTextRange>(xTunnel);
+ // #i115174#: this may be a SvxUnoTextRange
+// OSL_ENSURE( pXRange, "SwXTextRange missing" );
+ return (pXRange) ? pXRange->GetDoc() : 0;
}
@@ -111,7 +112,7 @@ public:
void Set( SwNodeIndex& rIndex );
void SetAsNodeIndex( Reference<XTextRange> & rRange );
- void CopyPositionInto(SwPosition& rPos);
+ void CopyPositionInto(SwPosition& rPos, SwDoc & rDoc);
SwDoc* GetDoc();
sal_Bool IsValid();
@@ -154,6 +155,12 @@ void XTextRangeOrNodeIndexPosition::SetAsNodeIndex(
// XTextRange -> XTunnel -> SwXTextRange
SwDoc* pDoc = lcl_GetDocViaTunnel(rRange);
+ if (!pDoc)
+ {
+ OSL_TRACE("SetAsNodeIndex: no SwDoc");
+ return;
+ }
+
// SwXTextRange -> PaM
SwUnoInternalPaM aPaM(*pDoc);
#ifdef DBG_UTIL
@@ -166,14 +173,15 @@ void XTextRangeOrNodeIndexPosition::SetAsNodeIndex(
Set(aPaM.GetPoint()->nNode);
}
-void XTextRangeOrNodeIndexPosition::CopyPositionInto(SwPosition& rPos)
+void
+XTextRangeOrNodeIndexPosition::CopyPositionInto(SwPosition& rPos, SwDoc & rDoc)
{
DBG_ASSERT(IsValid(), "Can't get Position");
// create PAM from start cursor (if no node index is present)
if (NULL == pIndex)
{
- SwUnoInternalPaM aUnoPaM(*GetDoc());
+ SwUnoInternalPaM aUnoPaM(rDoc);
#ifdef DBG_UTIL
sal_Bool bSuccess =
#endif
@@ -479,6 +487,13 @@ Reference<XTextCursor> XMLRedlineImportHelper::CreateRedlineTextSection(
// get document from old cursor (via tunnel)
SwDoc* pDoc = lcl_GetDocViaTunnel(xOldCursor);
+ if (!pDoc)
+ {
+ OSL_TRACE("XMLRedlineImportHelper::CreateRedlineTextSection: "
+ "no SwDoc => cannot create section.");
+ return 0;
+ }
+
// create text section for redline
SwTxtFmtColl *pColl = pDoc->GetTxtCollFromPool
(RES_POOLCOLL_STANDARD, false );
@@ -611,11 +626,18 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
// get the document (from one of the positions)
SwDoc* pDoc = pRedlineInfo->aAnchorStart.GetDoc();
+ if (!pDoc)
+ {
+ OSL_TRACE("XMLRedlineImportHelper::InsertIntoDocument: "
+ "no SwDoc => cannot insert redline.");
+ return;
+ }
+
// now create the PaM for the redline
SwPaM aPaM(pDoc->GetNodes().GetEndOfContent());
- pRedlineInfo->aAnchorStart.CopyPositionInto(*aPaM.GetPoint());
+ pRedlineInfo->aAnchorStart.CopyPositionInto(*aPaM.GetPoint(), *pDoc);
aPaM.SetMark();
- pRedlineInfo->aAnchorEnd.CopyPositionInto(*aPaM.GetPoint());
+ pRedlineInfo->aAnchorEnd.CopyPositionInto(*aPaM.GetPoint(), *pDoc);
// collapse PaM if (start == end)
if (*aPaM.GetPoint() == *aPaM.GetMark())
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index 520205976e..508397adf5 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -698,23 +698,28 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
SwWrtShell* pWrtSh = pDocSh ? pDocSh->GetWrtShell() : 0;
switch( rEvHint.GetEventId() )
{
-/* MA 07. Mar. 96: UpdateInputFlds() nur noch bei Dokument neu.
- (Und bei Einfuegen Textbaust.)
- case SFX_EVENT_OPENDOC:
- // dann am aktuellen Dokument die Input-Fedler updaten
- if( pWrtSh )
- pWrtSh->UpdateInputFlds();
+ case SFX_EVENT_LOADFINISHED:
+ OSL_ASSERT(!pWrtSh);
+ // if it is a new document created from a template,
+ // update fixed fields
+ if (pDocSh->GetMedium())
+ {
+ SFX_ITEMSET_ARG( pDocSh->GetMedium()->GetItemSet(),
+ pTemplateItem, SfxBoolItem,
+ SID_TEMPLATE, sal_False);
+ if (pTemplateItem && pTemplateItem->GetValue())
+ {
+ pDocSh->GetDoc()->SetFixFields(false, 0);
+ }
+ }
break;
-*/
case SFX_EVENT_CREATEDOC:
- // alle FIX-Date/Time Felder auf akt. setzen
if( pWrtSh )
{
SFX_ITEMSET_ARG( pDocSh->GetMedium()->GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
sal_Bool bUpdateFields = sal_True;
if( pUpdateDocItem && pUpdateDocItem->GetValue() == document::UpdateDocMode::NO_UPDATE)
bUpdateFields = sal_False;
- pWrtSh->SetFixFields();
if(bUpdateFields)
{
pWrtSh->UpdateInputFlds();
diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index 7787d3f8e3..dd7e3e5fe9 100644
--- a/sw/source/ui/app/swmodul1.cxx
+++ b/sw/source/ui/app/swmodul1.cxx
@@ -209,7 +209,12 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
return;
// Weitergabe an die CORE
- const sal_Bool bReadonly = pCurrView->GetDocShell()->IsReadOnly();
+ sal_Bool bReadonly;
+ const SwDocShell* pDocSh = pCurrView->GetDocShell();
+ if (pDocSh)
+ bReadonly = pDocSh->IsReadOnly();
+ else //Use existing option if DocShell missing
+ bReadonly = pSh->GetViewOptions()->IsReadonly();
SwViewOption* pViewOpt;
if(!bViewOnly)
pViewOpt = new SwViewOption( *pPref );
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index 266ccd2a8b..27882aee6e 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -160,6 +160,7 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
SvxStandardDialog( pParent,SW_RES(DLG_BREAK) ),
rSh(rS),
+ aBreakFL(this,SW_RES(FL_BREAK)),
aLineBtn(this,SW_RES(RB_LINE)),
aColumnBtn(this,SW_RES(RB_COL)),
aPageBtn(this,SW_RES(RB_PAGE)),
@@ -167,8 +168,7 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
aPageCollBox(this, SW_RES(LB_COLL)),
aPageNumBox(this, SW_RES(CB_PAGENUM)),
aPageNumEdit(this, SW_RES(ED_PAGENUM)),
- aBreakFL(this,SW_RES(FL_BREAK)),
-
+
aOkBtn(this,SW_RES(BT_OK)),
aCancelBtn(this,SW_RES(BT_CANCEL)),
aHelpBtn(this,SW_RES(BT_HELP)),
@@ -178,6 +178,9 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
bHtmlMode(0 != ::GetHtmlMode(rS.GetView().GetDocShell()))
{
+ aPageNumEdit.SetAccessibleRelationLabeledBy(&aPageNumBox);
+ aPageNumEdit.SetAccessibleName(aPageNumBox.GetText());
+
Link aLk = LINK(this,SwBreakDlg,ClickHdl);
aPageBtn.SetClickHdl( aLk );
aLineBtn.SetClickHdl( aLk );
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 9781310d43..65786cea64 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -216,6 +216,8 @@ SwCharURLPage::SwCharURLPage( Window* pParent,
{
FreeResource();
+ aEventPB.SetAccessibleRelationMemberOf(&aURLFL);
+
const SfxPoolItem* pItem;
SfxObjectShell* pShell;
if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem) ||
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 83a63ea159..3ce7dfd6ab 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -568,7 +568,8 @@ Page: Ctor
SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) :
SfxTabPage(pParent, SW_RES(TP_DROPCAPS), rSet),
-
+
+ aSettingsFL (this, SW_RES(FL_SETTINGS)),
aDropCapsBox (this, SW_RES(CB_SWITCH )),
aWholeWordCB (this, SW_RES(CB_WORD )),
aSwitchText (this, SW_RES(FT_DROPCAPS )),
@@ -577,14 +578,13 @@ SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) :
aLinesField (this, SW_RES(FLD_LINES )),
aDistanceText (this, SW_RES(TXT_DISTANCE)),
aDistanceField(this, SW_RES(FLD_DISTANCE)),
- aSettingsFL (this, SW_RES(FL_SETTINGS)),
+ aContentFL (this, SW_RES(FL_CONTENT )),
aTextText (this, SW_RES(TXT_TEXT )),
aTextEdit (this, SW_RES(EDT_TEXT )),
aTemplateText (this, SW_RES(TXT_TEMPLATE)),
aTemplateBox (this, SW_RES(BOX_TEMPLATE)),
- aContentFL (this, SW_RES(FL_CONTENT )),
-
+
pPict (new SwDropCapsPict(this, SW_RES(CNT_PICT))),
bModified(sal_False),
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 4973595738..c476de9e42 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -69,10 +69,10 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent,
aOutlineStartFL ( this, SW_RES( FL_OUTLINE_START )),
aOutlineLvFT ( this, SW_RES( FT_OUTLINE_LEVEL )),
aOutlineLvLB ( this, SW_RES( LB_OUTLINE_LEVEL )),
+ aNewStartFL ( this, SW_RES( FL_NEW_START ) ),
aNumberStyleFT ( this, SW_RES( FT_NUMBER_STYLE ) ),
aNumberStyleLB ( this, SW_RES( LB_NUMBER_STYLE ) ),
- aNewStartFL ( this, SW_RES( FL_NEW_START ) ),
- aNewStartCB ( this, SW_RES( CB_NEW_START ) ),
+ aNewStartCB ( this, SW_RES( CB_NEW_START ) ),
aNewStartNumberCB ( this, SW_RES( CB_NUMBER_NEW_START ) ),
aNewStartNF ( this, SW_RES( NF_NEW_START ) ),
aCountParaFL ( this, SW_RES( FL_COUNT_PARA ) ),
@@ -111,6 +111,8 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent,
SwParagraphNumTabPage, LineCountHdl_Impl));
aRestartParaCountCB.SetClickHdl(
LINK(this, SwParagraphNumTabPage, LineCountHdl_Impl));
+ aNewStartNF.SetAccessibleName(aNewStartNumberCB.GetText());
+ aNewStartNF.SetAccessibleRelationLabeledBy(&aNewStartNumberCB);
}
/*-----------------31.01.98 08:34-------------------
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index df6edad2db..bda5c764fe 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -99,6 +99,10 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
FreeResource();
SetExchangeSupport();
+ aRemovePB.SetAccessibleRelationMemberOf(&aConditionFL);
+ aAssignPB.SetAccessibleRelationMemberOf(&aConditionFL);
+ aTbLinks.SetAccessibleRelationLabeledBy(&aConditionCB);
+
// Handler installieren
aConditionCB.SetClickHdl( LINK(this, SwCondCollPage, OnOffHdl));
aTbLinks.SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 6ab390ff90..85141566e8 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -345,11 +345,11 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aProspectCB (this, SW_RES(CB_PROSPECT)),
aProspectCB_RTL (this, SW_RES(CB_PROSPECT_RTL)),
aSeparatorRFL (this, SW_RES(FL_SEP_PRT_RIGHT)),
+ aFL3 (this, SW_RES(FL_3)),
aNoRB (this, SW_RES(RB_NO)),
aOnlyRB (this, SW_RES(RB_ONLY)),
aEndRB (this, SW_RES(RB_END)),
aEndPageRB (this, SW_RES(RB_PAGEEND)),
- aFL3 (this, SW_RES(FL_3)),
aFL4 (this, SW_RES(FL_4)),
aPrintEmptyPagesCB(this, SW_RES(CB_PRINTEMPTYPAGES)),
// aSingleJobsCB (this, SW_RES(CB_SINGLEJOBS)),
@@ -1964,6 +1964,13 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent,
aLk = LINK(this, SwRedlineOptionsTabPage, ChangedMaskPrevHdl);
aMarkPosLB.SetSelectHdl( aLk );
aMarkColorLB.SetSelectHdl( aLk );
+//IAccessibility2 Impplementaton 2009-----
+ //solution: set different accessible name of four color box
+ aInsertColorLB.SetAccessibleName(::rtl::OUString( aInsertFT.GetDisplayText()) + ::rtl::OUString(aInsertColorFT.GetDisplayText()));
+ aDeletedColorLB.SetAccessibleName(::rtl::OUString( aDeletedFT.GetDisplayText()) + ::rtl::OUString( aDeletedColorFT.GetDisplayText()));
+ aChangedColorLB.SetAccessibleName(::rtl::OUString( aChangedFT.GetDisplayText()) + ::rtl::OUString( aChangedColorFT.GetDisplayText()));
+ aMarkColorLB.SetAccessibleName(::rtl::OUString( aMarkPosFT.GetDisplayText()) + ::rtl::OUString( aMarkColorFT.GetDisplayText()));
+//-----IAccessibility2 Impplementaton 2009
}
SwRedlineOptionsTabPage::~SwRedlineOptionsTabPage()
diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx
index a38af089e8..39fa7edafa 100644
--- a/sw/source/ui/dialog/docstdlg.cxx
+++ b/sw/source/ui/dialog/docstdlg.cxx
@@ -82,23 +82,21 @@ SfxTabPage * SwDocStatPage::Create(Window *pParent, const SfxItemSet &rSet)
SwDocStatPage::SwDocStatPage(Window *pParent, const SfxItemSet &rSet) :
SfxTabPage (pParent, SW_RES(TP_DOC_STAT), rSet),
-
+ aPageLbl (this, SW_RES( FT_PAGE )),
+ aPageNo (this, SW_RES( FT_PAGE_COUNT )),
aTableLbl (this, SW_RES( FT_TABLE )),
+ aTableNo (this, SW_RES( FT_TABLE_COUNT)),
aGrfLbl (this, SW_RES( FT_GRF )),
+ aGrfNo (this, SW_RES( FT_GRF_COUNT )),
aOLELbl (this, SW_RES( FT_OLE )),
- aPageLbl (this, SW_RES( FT_PAGE )),
+ aOLENo (this, SW_RES( FT_OLE_COUNT )),
aParaLbl (this, SW_RES( FT_PARA )),
+ aParaNo (this, SW_RES( FT_PARA_COUNT )),
aWordLbl (this, SW_RES( FT_WORD )),
+ aWordNo (this, SW_RES( FT_WORD_COUNT )),
aCharLbl (this, SW_RES( FT_CHAR )),
+ aCharNo (this, SW_RES( FT_CHAR_COUNT )),
aLineLbl (this, SW_RES( FT_LINE )),
-
- aTableNo (this, SW_RES( FT_TABLE_COUNT)),
- aGrfNo (this, SW_RES( FT_GRF_COUNT )),
- aOLENo (this, SW_RES( FT_OLE_COUNT )),
- aPageNo (this, SW_RES( FT_PAGE_COUNT )),
- aParaNo (this, SW_RES( FT_PARA_COUNT )),
- aWordNo (this, SW_RES( FT_WORD_COUNT )),
- aCharNo (this, SW_RES( FT_CHAR_COUNT )),
aLineNo (this, SW_RES( FT_LINE_COUNT )),
aUpdatePB (this, SW_RES( PB_PDATE ))
{
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 932bdcbadc..796df3f2d6 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -457,6 +457,10 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
aTree.Select( aTree.First() );
aTree.Show();
bDontCheckPasswd = sal_False;
+
+ aPasswdPB.SetAccessibleRelationMemberOf(&aProtectFL);
+ aPasswdPB.SetAccessibleRelationLabeledBy(&aPasswdCB);
+ aSubRegionED.SetAccessibleName(aSubRegionFT.GetText());
}
/* -----------------------------26.04.01 14:56--------------------------------
@@ -1353,6 +1357,7 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox )
rData.SetLinkFilePassword( aEmptyStr );
}
rData.SetType(DDE_LINK_SECTION);
+ aFileNameED.SetAccessibleName(aDDECommandFT.GetText());
}
else
{
@@ -1371,6 +1376,7 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox )
rData.SetLinkFilePassword( aEmptyStr );
aFileNameED.SetText(aEmptyStr);
}
+ aFileNameED.SetAccessibleName(aFileNameFT.GetText());
}
aFilePB.Enable(bFile && !bDDE);
}
@@ -1734,6 +1740,7 @@ SwInsertSectionTabPage::SwInsertSectionTabPage(
aCurName.SetModifyHdl ( LINK( this, SwInsertSectionTabPage, NameEditHdl));
aDDECB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, DDEHdl ));
ChangeProtectHdl(&aProtectCB);
+ aPasswdPB.SetAccessibleRelationMemberOf(&aProtectFL);
aSubRegionED.EnableAutocomplete( sal_True, sal_True );
}
/* -----------------21.05.99 10:31-------------------
@@ -1999,6 +2006,7 @@ IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox )
aDDECommandFT.Show();
aSubRegionFT.Hide();
aSubRegionED.Hide();
+ aFileNameED.SetAccessibleName(aDDECommandFT.GetText());
}
else
{
@@ -2008,6 +2016,7 @@ IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox )
aSubRegionFT.Show();
aSubRegionED.Show();
aSubRegionED.Enable(bFile);
+ aFileNameED.SetAccessibleName(aFileNameFT.GetText());
}
return 0;
}
@@ -2375,6 +2384,7 @@ SwSectionIndentTabPage::SwSectionIndentTabPage( Window *pParent, const SfxItemSe
Link aLk = LINK(this, SwSectionIndentTabPage, IndentModifyHdl);
aBeforeMF.SetModifyHdl(aLk);
aAfterMF.SetModifyHdl(aLk);
+ aPreviewWin.SetAccessibleName(aIndentFL.GetText());
}
/*-- 13.06.2003 09:59:23---------------------------------------------------
diff --git a/sw/source/ui/docvw/access.src b/sw/source/ui/docvw/access.src
index 42081d3ab7..d455c01d0c 100644
--- a/sw/source/ui/docvw/access.src
+++ b/sw/source/ui/docvw/access.src
@@ -100,3 +100,22 @@ String STR_ACCESS_ANNOTATION_BUTTON_DESC
Text [ en-US ] = "Activate this button to open a list of actions which can be performed on this comment and other comments";
};
+//IAccessibility2 Implementation 2009-----
+String STR_ACCESS_PREVIEW_DOC_NAME
+{
+ Text [ en-US ] = "Document preview";
+};
+String STR_ACCESS_PREVIEW_DOC_SUFFIX
+{
+ Text [ en-US ] = "(Preview mode)";
+};
+String STR_ACCESS_DOC_WORDPROCESSING
+{
+ Text [ en-US ] = "%PRODUCTNAME Document";
+};
+String STR_ACCESS_DOC_WORDPROCESSING_READONLY
+{
+ Text [ en-US ] = "(read-only)";
+};
+//-----IAccessibility2 Implementation 2009
+
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index c404f77739..fa16f089f5 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -1208,8 +1208,8 @@ void SwEditWin::ChangeDrawing( sal_uInt8 nDir )
{
// --> FME 2005-04-26 #i47138#
// Check if object is anchored as character and move direction
- sal_Bool bDummy;
- const bool bVertAnchor = rSh.IsFrmVertical( sal_True, bDummy );
+ sal_Bool bDummy1, bDummy2;
+ const bool bVertAnchor = rSh.IsFrmVertical( sal_True, bDummy1, bDummy2 );
const bool bHoriMove = !bVertAnchor == !( nDir % 2 );
const bool bMoveAllowed =
!bHoriMove || (rSh.GetAnchorId() != FLY_AS_CHAR);
@@ -1365,11 +1365,14 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
if( ( bVertText && ( !bTblCrsr || bVertTable ) ) ||
( bTblCrsr && bVertTable ) )
{
+ // Attempt to integrate cursor travelling for mongolian layout does not work.
+ // Thus, back to previous mapping of cursor keys to direction keys.
if( KEY_UP == nKey ) nKey = KEY_LEFT;
else if( KEY_DOWN == nKey ) nKey = KEY_RIGHT;
else if( KEY_LEFT == nKey ) nKey = KEY_DOWN;
else if( KEY_RIGHT == nKey ) nKey = KEY_UP;
}
+
if ( rSh.IsInRightToLeftText() )
{
if( KEY_LEFT == nKey ) nKey = KEY_RIGHT;
@@ -1979,6 +1982,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
#ifdef SW_CRSR_TIMER
sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
+ sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
#endif
if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT) {
eKeyState=KS_GotoPrevFieldMark;
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 110dc05c66..66dff1c03a 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -271,7 +271,8 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_LAB_LAB), rSet),
pNewDBMgr(NULL),
aItem ((const SwLabItem&) rSet.Get(FN_LABEL)),
-
+
+ aWritingFL (this, SW_RES(FL_WRITING)),
aWritingText (this, SW_RES(TXT_WRITING)),
aAddrBox (this, SW_RES(BOX_ADDR )),
aWritingEdit (this, SW_RES(EDT_WRITING)),
@@ -282,7 +283,7 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) :
aInsertBT (this, SW_RES(BTN_INSERT )),
aDBFieldFT (this, SW_RES(FT_DBFIELD )),
aDBFieldLB (this, SW_RES(LB_DBFIELD )),
- aWritingFL (this, SW_RES(FL_WRITING)),
+ aFormatFL (this, SW_RES(FL_FORMAT )),
aContButton (this, SW_RES(BTN_CONT )),
aSheetButton (this, SW_RES(BTN_SHEET )),
aMakeText (this, SW_RES(TXT_MAKE )),
@@ -290,9 +291,8 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) :
aTypeText (this, SW_RES(TXT_TYPE )),
aTypeBox (this, SW_RES(BOX_TYPE )),
aHiddenSortTypeBox(this, WB_SORT|WB_HIDE),
- aFormatInfo (this, SW_RES(INF_FORMAT )),
- aFormatFL (this, SW_RES(FL_FORMAT ))
-{
+ aFormatInfo (this, SW_RES(INF_FORMAT ))
+ {
WaitObject aWait( pParent );
FreeResource();
@@ -715,10 +715,10 @@ void SwVisitingCardPage::SetUserData( sal_uInt32 nCnt,
SwVisitingCardPage::SwVisitingCardPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_VISITING_CARDS), rSet),
+ aContentFL(this, SW_RES( FL_CONTENT )),
aAutoTextLB(this, SW_RES( LB_AUTO_TEXT )),
aAutoTextGroupFT(this, SW_RES( FT_AUTO_TEXT_GROUP )),
aAutoTextGroupLB(this, SW_RES( LB_AUTO_TEXT_GROUP )),
- aContentFL(this, SW_RES( FL_CONTENT )),
aExampleWIN(this, SW_RES( WIN_EXAMPLE )),
sVisCardGroup(SW_RES(ST_VISCARD_GROUP)),
pExampleFrame(0)
diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx
index 41315f95e5..868fd0539b 100644
--- a/sw/source/ui/envelp/labprt.cxx
+++ b/sw/source/ui/envelp/labprt.cxx
@@ -61,6 +61,7 @@ SwLabPrtPage::SwLabPrtPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_LAB_PRT), rSet),
pPrinter( 0 ),
+ aFLDontKnow (this, SW_RES(FL_DONTKNOW)),
aPageButton (this, SW_RES(BTN_PAGE )),
aSingleButton (this, SW_RES(BTN_SINGLE )),
aColText (this, SW_RES(TXT_COL )),
@@ -68,10 +69,9 @@ SwLabPrtPage::SwLabPrtPage(Window* pParent, const SfxItemSet& rSet) :
aRowText (this, SW_RES(TXT_ROW )),
aRowField (this, SW_RES(FLD_ROW )),
aSynchronCB (this, SW_RES(CB_SYNCHRON)),
- aFLDontKnow (this, SW_RES(FL_DONTKNOW)),
+ aFLPrinter (this, SW_RES(FL_PRINTER )),
aPrinterInfo (this, SW_RES(INF_PRINTER)),
- aPrtSetup (this, SW_RES(BTN_PRTSETUP)),
- aFLPrinter (this, SW_RES(FL_PRINTER ))
+ aPrtSetup (this, SW_RES(BTN_PRTSETUP))
{
FreeResource();
diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx
index ab11de0ed4..5bddd0ecf6 100644
--- a/sw/source/ui/envelp/labprt.hxx
+++ b/sw/source/ui/envelp/labprt.hxx
@@ -45,6 +45,7 @@ class SwLabPrtPage : public SfxTabPage
{
Printer* pPrinter; //Fuer die Schachteinstellug - leider.
+ FixedLine aFLDontKnow;
RadioButton aPageButton;
RadioButton aSingleButton;
FixedText aColText;
@@ -52,11 +53,10 @@ class SwLabPrtPage : public SfxTabPage
FixedText aRowText;
NumericField aRowField;
CheckBox aSynchronCB;
- FixedLine aFLDontKnow;
+ FixedLine aFLPrinter;
FixedInfo aPrinterInfo;
PushButton aPrtSetup;
- FixedLine aFLPrinter;
SwLabPrtPage(Window* pParent, const SfxItemSet& rSet);
~SwLabPrtPage();
diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx
index 49e12d0017..27df317d00 100644
--- a/sw/source/ui/envelp/swuilabimp.hxx
+++ b/sw/source/ui/envelp/swuilabimp.hxx
@@ -34,6 +34,7 @@ class SwLabPage : public SfxTabPage
String sActDBName;
SwLabItem aItem;
+ FixedLine aWritingFL;
FixedText aWritingText;
CheckBox aAddrBox;
MultiLineEdit aWritingEdit;
@@ -45,8 +46,8 @@ class SwLabPage : public SfxTabPage
FixedText aDBFieldFT;
ListBox aDBFieldLB;
// PushButton aDatabaseButton;
- FixedLine aWritingFL;
+ FixedLine aFormatFL;
RadioButton aContButton;
RadioButton aSheetButton;
FixedText aMakeText;
@@ -55,7 +56,6 @@ class SwLabPage : public SfxTabPage
ListBox aTypeBox;
ListBox aHiddenSortTypeBox;
FixedInfo aFormatInfo;
- FixedLine aFormatFL;
sal_Bool m_bLabel;
@@ -102,12 +102,11 @@ public:
class SwOneExampleFrame;
class SwVisitingCardPage : public SfxTabPage
{
+ FixedLine aContentFL;
SvTreeListBox aAutoTextLB;
FixedText aAutoTextGroupFT;
ListBox aAutoTextGroupLB;
- FixedLine aContentFL;
-
Window aExampleWIN;
String sVisCardGroup;
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 718c0e8cbc..04a6f56b3c 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -335,12 +335,16 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
aNameFT.SetText(SW_RESSTR(STR_MACNAME));
aValueFT.SetText(SW_RESSTR(STR_PROMPT));
aNameED.SetText(GetFldMgr().GetMacroName());
+ aNameED.SetAccessibleName(aNameFT.GetText());
+ aValueED.SetAccessibleName(aValueFT.GetText());
break;
case TYP_HIDDENPARAFLD:
aNameFT.SetText(SW_RESSTR(STR_COND));
aNameED.SetDropEnable(sal_True);
bName = sal_True;
+ aNameED.SetAccessibleName(aNameFT.GetText());
+ aValueED.SetAccessibleName(aValueFT.GetText());
break;
case TYP_HIDDENTXTFLD:
@@ -352,6 +356,8 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
if (!IsFldEdit() && pSh )
aValueED.SetText(pSh->GetSelTxt());
bName = bValue = sal_True;
+ aNameED.SetAccessibleName(aNameFT.GetText());
+ aValueED.SetAccessibleName(aValueFT.GetText());
}
break;
@@ -365,18 +371,24 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
}
bName = bValue = sal_True;
+ aNameED.SetAccessibleName(aNameFT.GetText());
+ aValueED.SetAccessibleName(aValueFT.GetText());
break;
case TYP_JUMPEDITFLD:
aNameFT.SetText(SW_RESSTR(STR_JUMPEDITFLD));
aValueFT.SetText(SW_RESSTR(STR_PROMPT));
bName = bValue = sal_True;
+ aNameED.SetAccessibleName(aNameFT.GetText());
+ aValueED.SetAccessibleName(aValueFT.GetText());
break;
case TYP_INPUTFLD:
aValueFT.SetText(SW_RESSTR(STR_PROMPT));
bValue = sal_True;
- // bShowSelection = sal_True;
+ // bShowSelection = TRUE;
+ aNameED.SetAccessibleName(aNameFT.GetText());
+ aValueED.SetAccessibleName(aValueFT.GetText());
break;
case TYP_COMBINED_CHARS:
@@ -388,6 +400,8 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
const sal_uInt16 nLen = aNameED.GetText().Len();
if( !nLen || nLen > MAX_COMBINED_CHARACTERS )
bInsert = sal_False;
+ aNameED.SetAccessibleName(aNameFT.GetText());
+ aValueED.SetAccessibleName(aValueFT.GetText());
}
break;
case TYP_DROPDOWN :
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 06c4349c7a..01637c5d07 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 172674a6b3..781bd100dc 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 537cf1ce9c..8734383294 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 8f4bcd3305..6070a5a25e 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 7decbbb395..633e23d445 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());
@@ -1271,7 +1321,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
aAtHorzPosFT.Enable( bEnable );
aAtHorzPosED.Enable( bEnable );
- bEnable = nV == text::VertOrientation::NONE && !bFormat;
+ bEnable = nV == text::VertOrientation::NONE;
if ( !bEnable )
{
aAtVertPosED.SetValue( 0, FUNIT_TWIP );
@@ -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));
@@ -2865,7 +2934,8 @@ 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),
diff --git a/sw/source/ui/inc/bookmark.hxx b/sw/source/ui/inc/bookmark.hxx
index 767ab14963..28257380a6 100644
--- a/sw/source/ui/inc/bookmark.hxx
+++ b/sw/source/ui/inc/bookmark.hxx
@@ -65,8 +65,8 @@ public:
class SwInsertBookmarkDlg: public SvxStandardDialog
{
- BookmarkCombo aBookmarkBox;
FixedLine aBookmarkFl;
+ BookmarkCombo aBookmarkBox;
OKButton aOkBtn;
CancelButton aCancelBtn;
PushButton aDeleteBtn;
diff --git a/sw/source/ui/inc/break.hxx b/sw/source/ui/inc/break.hxx
index b56826d223..ad20c90e05 100644
--- a/sw/source/ui/inc/break.hxx
+++ b/sw/source/ui/inc/break.hxx
@@ -50,6 +50,7 @@ class SwWrtShell;
class SwBreakDlg: public SvxStandardDialog
{
SwWrtShell &rSh;
+ FixedLine aBreakFL;
RadioButton aLineBtn;
RadioButton aColumnBtn;
RadioButton aPageBtn;
@@ -57,7 +58,6 @@ class SwBreakDlg: public SvxStandardDialog
ListBox aPageCollBox;
CheckBox aPageNumBox;
NumericField aPageNumEdit;
- FixedLine aBreakFL;
OKButton aOkBtn;
CancelButton aCancelBtn;
diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx
index 3f3e5e834c..193bfe0ef7 100644
--- a/sw/source/ui/inc/column.hxx
+++ b/sw/source/ui/inc/column.hxx
@@ -122,13 +122,14 @@ class ColumnValueSet : public ValueSet
--------------------------------------------------------------------*/
class SwColumnPage : public SfxTabPage
{
+ FixedLine aFLGroup;
FixedText aClNrLbl;
NumericField aCLNrEdt;
ColumnValueSet aDefaultVS;
ImageList aPreColsIL;
CheckBox aBalanceColsCB;
- FixedLine aFLGroup;
+ FixedLine aFLLayout;
ImageButton aBtnUp;
FixedText aColumnFT;
FixedText aWidthFT;
@@ -144,15 +145,14 @@ class SwColumnPage : public SfxTabPage
ImageButton aBtnDown;
CheckBox aAutoWidthBox;
- FixedLine aFLLayout;
+ FixedLine aFLLineType;
FixedText aLineTypeLbl;
LineListBox aLineTypeDLB;
FixedText aLineHeightLbl;
MetricField aLineHeightEdit;
FixedText aLinePosLbl;
ListBox aLinePosDLB;
- FixedLine aFLLineType;
FixedLine aVertFL;
FixedLine aPropertiesFL;
diff --git a/sw/source/ui/inc/docstdlg.hxx b/sw/source/ui/inc/docstdlg.hxx
index da19053796..d0efa37179 100644
--- a/sw/source/ui/inc/docstdlg.hxx
+++ b/sw/source/ui/inc/docstdlg.hxx
@@ -55,22 +55,21 @@ protected:
DECL_LINK( UpdateHdl, PushButton*);
private:
- FixedText aTableLbl;
- FixedText aGrfLbl;
- FixedText aOLELbl;
FixedText aPageLbl;
- FixedText aParaLbl;
- FixedText aWordLbl;
- FixedText aCharLbl;
- FixedText aLineLbl;
-
+ FixedInfo aPageNo;
+ FixedText aTableLbl;
FixedInfo aTableNo;
+ FixedText aGrfLbl;
FixedInfo aGrfNo;
+ FixedText aOLELbl;
FixedInfo aOLENo;
- FixedInfo aPageNo;
+ FixedText aParaLbl;
FixedInfo aParaNo;
+ FixedText aWordLbl;
FixedInfo aWordNo;
+ FixedText aCharLbl;
FixedInfo aCharNo;
+ FixedText aLineLbl;
FixedInfo aLineNo;
PushButton aUpdatePB;
diff --git a/sw/source/ui/inc/drpcps.hxx b/sw/source/ui/inc/drpcps.hxx
index 663c3a8edc..62df044473 100644
--- a/sw/source/ui/inc/drpcps.hxx
+++ b/sw/source/ui/inc/drpcps.hxx
@@ -72,6 +72,7 @@ class SwDropCapsPage : public SfxTabPage
{
friend class SwDropCapsPict;
+ FixedLine aSettingsFL;
CheckBox aDropCapsBox;
CheckBox aWholeWordCB;
FixedText aSwitchText;
@@ -80,13 +81,12 @@ friend class SwDropCapsPict;
NumericField aLinesField;
FixedText aDistanceText;
MetricField aDistanceField;
- FixedLine aSettingsFL;
+ FixedLine aContentFL;
FixedText aTextText;
Edit aTextEdit;
FixedText aTemplateText;
ListBox aTemplateBox;
- FixedLine aContentFL;
SwDropCapsPict *pPict;
diff --git a/sw/source/ui/inc/frmmgr.hxx b/sw/source/ui/inc/frmmgr.hxx
index 631f57297b..372055d755 100644
--- a/sw/source/ui/inc/frmmgr.hxx
+++ b/sw/source/ui/inc/frmmgr.hxx
@@ -65,6 +65,9 @@ class SW_DLLPUBLIC SwFlyFrmAttrMgr
sal_Bool bAbsPos,
bNewFrm;
sal_Bool bIsInVertical;
+ // --> OD 2009-09-01 #mongolianlayout#
+ sal_Bool bIsInVerticalL2R;
+ // <--
// interne Verrechnung fuer Umrandung
SW_DLLPRIVATE SwTwips CalcTopSpace();
diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx
index db31fed85a..5706b8a912 100644
--- a/sw/source/ui/inc/frmpage.hxx
+++ b/sw/source/ui/inc/frmpage.hxx
@@ -54,6 +54,7 @@ struct SwPosition;
class SwFrmPage: public SfxTabPage
{
// Size
+ FixedLine aSizeFL;
FixedText aWidthFT;
FixedText aWidthAutoFT;
PercentField aWidthED;
@@ -66,11 +67,10 @@ class SwFrmPage: public SfxTabPage
CheckBox aAutoHeightCB;
CheckBox aFixedRatioCB;
PushButton aRealSizeBT;
- FixedLine aSizeFL;
// Anker
- FixedLine aTypeFL;
FixedLine aTypeSepFL;
+ FixedLine aTypeFL;
RadioButton aAnchorAtPageRB;
RadioButton aAnchorAtParaRB;
RadioButton aAnchorAtCharRB;
@@ -78,6 +78,7 @@ class SwFrmPage: public SfxTabPage
RadioButton aAnchorAtFrameRB;
// Position
+ FixedLine aPositionFL;
FixedText aHorizontalFT;
ListBox aHorizontalDLB;
FixedText aAtHorzPosFT;
@@ -93,7 +94,6 @@ class SwFrmPage: public SfxTabPage
ListBox aVertRelationLB;
// OD 02.10.2003 #i18732# - check box for new option 'FollowTextFlow'
CheckBox aFollowTextFlowCB;
- FixedLine aPositionFL;
// Example
SvxSwFrameExample aExampleWN;
@@ -109,6 +109,9 @@ class SwFrmPage: public SfxTabPage
sal_Bool bNoModifyHdl;
sal_Bool bVerticalChanged; //check done whether frame is in vertical environment
sal_Bool bIsVerticalFrame; //current frame is in vertical environment - strings are exchanged
+ // --> OD 2009-08-31 #mongolianlayou#
+ sal_Bool bIsVerticalL2R;
+ // <--
sal_Bool bIsInRightToLeft; // current frame is in right-to-left environment - strings are exchanged
sal_Bool bHtmlMode;
sal_uInt16 nHtmlMode;
@@ -286,6 +289,7 @@ public:
class SwFrmAddPage : public SfxTabPage
{
+ FixedLine aNamesFL;
FixedText aNameFT;
Edit aNameED;
FixedText aAltNameFT;
@@ -294,19 +298,18 @@ class SwFrmAddPage : public SfxTabPage
ListBox aPrevLB;
FixedText aNextFT;
ListBox aNextLB;
- FixedLine aNamesFL;
+ FixedLine aProtectFL;
CheckBox aProtectContentCB;
CheckBox aProtectFrameCB;
CheckBox aProtectSizeCB;
- FixedLine aProtectFL;
+ FixedLine aExtFL;
CheckBox aEditInReadonlyCB;
CheckBox aPrintFrameCB;
FixedText aTextFlowFT;
ListBox aTextFlowLB;
- FixedLine aExtFL;
SwWrtShell* pWrtSh;
diff --git a/sw/source/ui/inc/glosbib.hxx b/sw/source/ui/inc/glosbib.hxx
index 82228bdaa5..f9dcd54ace 100644
--- a/sw/source/ui/inc/glosbib.hxx
+++ b/sw/source/ui/inc/glosbib.hxx
@@ -74,9 +74,11 @@ public:
class SwGlossaryGroupDlg : public SvxStandardDialog
{
-
+ FixedText aBibFT;
FEdit aNameED;
+ FixedText aPathFT;
ListBox aPathLB;
+ FixedText aSelectFT;
SwGlossaryGroupTLB aGroupTLB;
OKButton aOkPB;
@@ -85,9 +87,6 @@ class SwGlossaryGroupDlg : public SvxStandardDialog
PushButton aNewPB;
PushButton aDelPB;
PushButton aRenamePB;
- FixedText aBibFT;
- FixedText aPathFT;
- FixedText aSelectFT;
SvStrings* pRemovedArr;
SvStrings* pInsertedArr;
diff --git a/sw/source/ui/inc/insfnote.hxx b/sw/source/ui/inc/insfnote.hxx
index 87e429f9ff..908d2cca5e 100644
--- a/sw/source/ui/inc/insfnote.hxx
+++ b/sw/source/ui/inc/insfnote.hxx
@@ -48,18 +48,18 @@ class SwInsFootNoteDlg: public SvxStandardDialog
String aFontName;
CharSet eCharSet;
char cExtChar;
- sal_Bool bExtCharAvailable;
- sal_Bool bEdit;
+ sal_Bool bExtCharAvailable;
+ sal_Bool bEdit;
+ FixedLine aNumberFL;
RadioButton aNumberAutoBtn;
RadioButton aNumberCharBtn;
Edit aNumberCharEdit;
PushButton aNumberExtChar;
- FixedLine aNumberFL;
//Alles fuer die Auswahl Fussnote/Endnote
+ FixedLine aTypeFL;
RadioButton aFtnBtn;
RadioButton aEndNoteBtn;
- FixedLine aTypeFL;
OKButton aOkBtn;
CancelButton aCancelBtn;
diff --git a/sw/source/ui/inc/linenum.hxx b/sw/source/ui/inc/linenum.hxx
index 7b90413f5d..007d3ae0e1 100644
--- a/sw/source/ui/inc/linenum.hxx
+++ b/sw/source/ui/inc/linenum.hxx
@@ -66,6 +66,7 @@ public:
class SwLineNumberingPage : public SfxTabPage
{
CheckBox aNumberingOnCB;
+ FixedLine aDisplayFL;
FixedText aCharStyleFT;
ListBox aCharStyleLB;
FixedText aFormatFT;
@@ -77,17 +78,16 @@ class SwLineNumberingPage : public SfxTabPage
FixedText aNumIntervalFT;
NumericField aNumIntervalNF;
FixedText aNumRowsFT;
- FixedLine aDisplayFL;
+ FixedLine aDivisorFL;
FixedText aDivisorFT;
Edit aDivisorED;
FixedText aDivIntervalFT;
NumericField aDivIntervalNF;
FixedText aDivRowsFT;
- FixedLine aDivisorFL;
+ FixedLine aCountFL;
CheckBox aCountEmptyLinesCB;
CheckBox aCountFrameLinesCB;
CheckBox aRestartEachPageCB;
- FixedLine aCountFL;
SwWrtShell* pSh;
diff --git a/sw/source/ui/inc/num.hxx b/sw/source/ui/inc/num.hxx
index 5b2a1121b5..4234eff998 100644
--- a/sw/source/ui/inc/num.hxx
+++ b/sw/source/ui/inc/num.hxx
@@ -82,13 +82,13 @@ struct SwBmpItemInfo
--------------------------------------------------*/
class SwNumPositionTabPage : public SfxTabPage
{
- FixedLine aPositionFL;
- FixedLine aLevelFL;
+ FixedLine aLevelFL;
MultiListBox aLevelLB;
// --> OD 2008-02-01 #newlistlevelattrs#
// former set of controls shown for numbering rules containing list level
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
+ FixedLine aPositionFL;
FixedText aDistBorderFT;
MetricField aDistBorderMF;
CheckBox aRelativeCB;
diff --git a/sw/source/ui/inc/numpara.hxx b/sw/source/ui/inc/numpara.hxx
index d292764ee6..2936a57077 100644
--- a/sw/source/ui/inc/numpara.hxx
+++ b/sw/source/ui/inc/numpara.hxx
@@ -48,10 +48,10 @@ class SwParagraphNumTabPage : public SfxTabPage
FixedText aOutlineLvFT;
ListBox aOutlineLvLB;
+ FixedLine aNewStartFL;
FixedText aNumberStyleFT;
ListBox aNumberStyleLB;
- FixedLine aNewStartFL;
TriStateBox aNewStartCB;
TriStateBox aNewStartNumberCB;
NumericField aNewStartNF;
diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx
index c2aa3c574b..410b43867b 100644
--- a/sw/source/ui/inc/optpage.hxx
+++ b/sw/source/ui/inc/optpage.hxx
@@ -135,11 +135,11 @@ class SwAddPrinterTabPage : public SfxTabPage
FixedLine aSeparatorRFL;
+ FixedLine aFL3;
RadioButton aNoRB;
RadioButton aOnlyRB;
RadioButton aEndRB;
RadioButton aEndPageRB;
- FixedLine aFL3;
FixedLine aFL4;
CheckBox aPrintEmptyPagesCB;
// CheckBox aSingleJobsCB;
diff --git a/sw/source/ui/inc/outline.hxx b/sw/source/ui/inc/outline.hxx
index 644fea3f93..9c329ed5c2 100644
--- a/sw/source/ui/inc/outline.hxx
+++ b/sw/source/ui/inc/outline.hxx
@@ -104,9 +104,10 @@ class SwOutlineTabDialog : public SfxTabDialog
* --------------------------------------------------*/
class SwOutlineSettingsTabPage : public SfxTabPage
{
- ListBox aLevelLB;
FixedLine aLevelFL;
+ ListBox aLevelLB;
+ FixedLine aNumberFL;
FixedText aCollLbl;
ListBox aCollBox;
FixedText aNumberLbl;
@@ -122,7 +123,6 @@ class SwOutlineSettingsTabPage : public SfxTabPage
Edit aSuffixED;
FixedText aStartLbl;
NumericField aStartEdit;
- FixedLine aNumberFL;
NumberingPreview aPreviewWIN;
String aNoFmtName;
diff --git a/sw/source/ui/inc/pgfnote.hxx b/sw/source/ui/inc/pgfnote.hxx
index bfff36b339..30b5db07ee 100644
--- a/sw/source/ui/inc/pgfnote.hxx
+++ b/sw/source/ui/inc/pgfnote.hxx
@@ -59,13 +59,14 @@ private:
SwFootNotePage(Window *pParent, const SfxItemSet &rSet);
~SwFootNotePage();
+ FixedLine aPosHeader;
RadioButton aMaxHeightPageBtn;
RadioButton aMaxHeightBtn;
MetricField aMaxHeightEdit;
FixedText aDistLbl;
MetricField aDistEdit;
- FixedLine aPosHeader;
+ FixedLine aLineHeader;
FixedText aLinePosLbl;
ListBox aLinePosBox;
FixedText aLineTypeLbl;
@@ -74,7 +75,6 @@ private:
MetricField aLineWidthEdit;
FixedText aLineDistLbl;
MetricField aLineDistEdit;
- FixedLine aLineHeader;
DECL_LINK( HeightPage, Button * );
DECL_LINK( HeightMetric, Button * );
diff --git a/sw/source/ui/inc/rowht.hxx b/sw/source/ui/inc/rowht.hxx
index 5e6e6502bc..a9005eea53 100644
--- a/sw/source/ui/inc/rowht.hxx
+++ b/sw/source/ui/inc/rowht.hxx
@@ -49,9 +49,9 @@ class SwWrtShell;
class SwTableHeightDlg : public SvxStandardDialog
{
+ FixedLine aHeightFL;
MetricField aHeightEdit;
CheckBox aAutoHeightCB;
- FixedLine aHeightFL;
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
diff --git a/sw/source/ui/inc/split.hxx b/sw/source/ui/inc/split.hxx
index 2ffe470197..68f5049aed 100644
--- a/sw/source/ui/inc/split.hxx
+++ b/sw/source/ui/inc/split.hxx
@@ -49,13 +49,13 @@ class SwWrtShell;
class SwSplitTableDlg : public SvxStandardDialog
{
+ FixedLine aCountFL;
FixedText aCountLbl;
NumericField aCountEdit;
- FixedLine aCountFL;
+ FixedLine aDirFL;
ImageRadioButton aHorzBox;
ImageRadioButton aVertBox;
CheckBox aPropCB;
- FixedLine aDirFL;
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
diff --git a/sw/source/ui/inc/srtdlg.hxx b/sw/source/ui/inc/srtdlg.hxx
index bf3fd1341f..2ae34bd461 100644
--- a/sw/source/ui/inc/srtdlg.hxx
+++ b/sw/source/ui/inc/srtdlg.hxx
@@ -51,7 +51,7 @@ class SwSortDlg : public SvxStandardDialog
FixedText aTypLbl;
FixedText aDirLbl;
- FixedLine aDirFL;
+ FixedLine aSortFL;
CheckBox aKeyCB1;
NumericField aColEdt1;
@@ -71,7 +71,7 @@ class SwSortDlg : public SvxStandardDialog
RadioButton aSortUp3RB;
RadioButton aSortDn3RB;
- FixedLine aSortFL;
+ FixedLine aDirFL;
RadioButton aColumnRB;
RadioButton aRowRB;
diff --git a/sw/source/ui/inc/swrenamexnameddlg.hxx b/sw/source/ui/inc/swrenamexnameddlg.hxx
index b4dbfaed74..7c919c9376 100644
--- a/sw/source/ui/inc/swrenamexnameddlg.hxx
+++ b/sw/source/ui/inc/swrenamexnameddlg.hxx
@@ -50,9 +50,9 @@
* --------------------------------------------------*/
class SwRenameXNamedDlg : public ModalDialog
{
+ FixedLine aNameFL;
FixedText aNewNameFT;
NoSpaceEdit aNewNameED;
- FixedLine aNameFL;
OKButton aOk;
CancelButton aCancel;
HelpButton aHelp;
diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx
index 8b54b7a0ea..213b10d856 100644
--- a/sw/source/ui/inc/swuicnttab.hxx
+++ b/sw/source/ui/inc/swuicnttab.hxx
@@ -188,6 +188,7 @@ class SwTOXSelectTabPage : public SfxTabPage
//
//index only
+ FixedLine aIdxOptionsFL;
CheckBox aCollectSameCB;
CheckBox aUseFFCB;
CheckBox aUseDashCB;
@@ -196,7 +197,6 @@ class SwTOXSelectTabPage : public SfxTabPage
CheckBox aKeyAsEntryCB;
CheckBox aFromFileCB;
MenuButton aAutoMarkPB;
- FixedLine aIdxOptionsFL; // index only
// object only
SwOLENames aFromNames;
@@ -363,6 +363,7 @@ class SwTOXEntryTabPage : public SfxTabPage
FixedText aLevelFT;
SwIdxTreeListBox aLevelLB;
+ FixedLine aEntryFL;
FixedText aTokenFT;
SwTokenWindow aTokenWIN;
PushButton aAllLevelsPB;
@@ -395,14 +396,13 @@ class SwTOXEntryTabPage : public SfxTabPage
FixedText aTabPosFT;
MetricField aTabPosMF; // tab stop position
CheckBox aAutoRightCB;
- FixedLine aEntryFL;
+ FixedLine aFormatFL;
CheckBox aRelToStyleCB; // position relative to the right margin of the para style
FixedText aMainEntryStyleFT;
ListBox aMainEntryStyleLB; // character style of main entries in indexes
CheckBox aAlphaDelimCB;
CheckBox aCommaSeparatedCB;
- FixedLine aFormatFL;
RadioButton aSortDocPosRB;
RadioButton aSortContentRB;
@@ -492,14 +492,14 @@ public:
--------------------------------------------------*/
class SwTOXStylesTabPage : public SfxTabPage
{
+ FixedLine aFormatFL;
FixedText aLevelFT2;
ListBox aLevelLB;
+ ImageButton aAssignBT;
FixedText aTemplateFT;
ListBox aParaLayLB;
PushButton aStdBT;
- ImageButton aAssignBT;
PushButton aEditStyleBT;
- FixedLine aFormatFL;
SwForm* m_pCurrentForm;
// void UpdatePattern();
diff --git a/sw/source/ui/inc/swuiidxmrk.hxx b/sw/source/ui/inc/swuiidxmrk.hxx
index 779d504a00..a6fee5ae4e 100644
--- a/sw/source/ui/inc/swuiidxmrk.hxx
+++ b/sw/source/ui/inc/swuiidxmrk.hxx
@@ -71,6 +71,7 @@ class SwIndexMarkDlg : public Window
{
friend class SwIndexMarkFloatDlg;
friend class SwIndexMarkModalDlg;
+ FixedLine aIndexFL;
FixedText aTypeFT;
ListBox aTypeDCB;
ImageButton aNewBT;
@@ -97,7 +98,6 @@ class SwIndexMarkDlg : public Window
CheckBox aSearchCaseSensitiveCB;
CheckBox aSearchCaseWordOnlyCB;
- FixedLine aIndexFL;
OKButton aOKBT;
CancelButton aCancelBT;
diff --git a/sw/source/ui/inc/tautofmt.hxx b/sw/source/ui/inc/tautofmt.hxx
index bb5df4a841..7fec212497 100644
--- a/sw/source/ui/inc/tautofmt.hxx
+++ b/sw/source/ui/inc/tautofmt.hxx
@@ -63,12 +63,12 @@ class SwAutoFormatDlg : public SfxModalDialog
{
FixedLine aFlFormat;
ListBox aLbFormat;
+ FixedLine aFlFormats;
CheckBox aBtnNumFormat;
CheckBox aBtnBorder;
CheckBox aBtnFont;
CheckBox aBtnPattern;
CheckBox aBtnAlignment;
- FixedLine aFlFormats;
OKButton aBtnOk;
CancelButton aBtnCancel;
HelpButton aBtnHelp;
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 87ec19bca1..2ccb0a498f 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -374,6 +374,8 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet
aShowExampleCB.SetClickHdl(LINK(this, SwMultiTOXTabDialog, ShowPreviewHdl));
aShowExampleCB.Check( SW_MOD()->GetModuleConfig()->IsShowIndexPreview());
+
+ aExampleContainerWIN.SetAccessibleName(aShowExampleCB.GetText());
SetViewAlign( WINDOWALIGN_LEFT );
// SetViewWindow does not work if the dialog is visible!
@@ -807,6 +809,10 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent,
{
FreeResource();
+ aHeaderTree.SetAccessibleRelationMemberOf(&aStylesFL);
+ aLeftPB.SetAccessibleRelationMemberOf(&aStylesFL);
+ aRightPB.SetAccessibleRelationMemberOf(&aStylesFL);
+
aLeftPB.SetModeImage( Image( SW_RES( IMG_ALL_LEFT_HC ) ), BMP_COLOR_HIGHCONTRAST );
aRightPB.SetModeImage( Image( SW_RES( IMG_ALL_RIGHT_HC ) ), BMP_COLOR_HIGHCONTRAST );
@@ -985,6 +991,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS
aTOXMarksCB( this, SW_RES(CB_TOXMARKS )),
+ aIdxOptionsFL( this, SW_RES(FL_IDXOPTIONS )),
aCollectSameCB( this, SW_RES(CB_COLLECTSAME )),
aUseFFCB( this, SW_RES(CB_USEFF )),
aUseDashCB( this, SW_RES(CB_USE_DASH )),
@@ -993,7 +1000,6 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS
aKeyAsEntryCB( this, SW_RES(CB_KEYASENTRY )),
aFromFileCB( this, SW_RES(CB_FROMFILE )),
aAutoMarkPB( this, SW_RES(MB_AUTOMARK )),
- aIdxOptionsFL( this, SW_RES(FL_IDXOPTIONS )),
aFromNames( SW_RES(RES_SRCTYPES )),
aFromObjCLB( this, SW_RES(CLB_FROMOBJ )),
@@ -1017,6 +1023,11 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS
bFirstCall(sal_True)
{
aBracketLB.InsertEntry(String(SW_RES(ST_NO_BRACKET)), 0);
+
+ aAddStylesPB.SetAccessibleRelationMemberOf(&aCreateFromFL);
+ aAddStylesPB.SetAccessibleRelationLabeledBy(&aAddStylesCB);
+ aAddStylesPB.SetAccessibleName(aAddStylesCB.GetText());
+
FreeResource();
pIndexEntryWrapper = new IndexEntrySupplierWrapper();
@@ -2053,6 +2064,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
SfxTabPage(pParent, SW_RES(TP_TOX_ENTRY), rAttrSet),
aLevelFT(this, SW_RES(FT_LEVEL )),
aLevelLB(this, SW_RES(LB_LEVEL )),
+ aEntryFL(this, SW_RES(FL_ENTRY )),
aTokenFT(this, SW_RES(FT_TOKEN )),
aTokenWIN(this, SW_RES(WIN_TOKEN )),
@@ -2086,14 +2098,14 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
aTabPosFT(this, SW_RES(FT_TABPOS )),
aTabPosMF(this, SW_RES(MF_TABPOS )),
aAutoRightCB(this, SW_RES(CB_AUTORIGHT )),
- aEntryFL(this, SW_RES(FL_ENTRY )),
+ aFormatFL(this, SW_RES(FL_FORMAT )),
+
aRelToStyleCB(this, SW_RES(CB_RELTOSTYLE )),
aMainEntryStyleFT(this, SW_RES(FT_MAIN_ENTRY_STYLE)),
aMainEntryStyleLB(this, SW_RES(LB_MAIN_ENTRY_STYLE)),
aAlphaDelimCB(this, SW_RES(CB_ALPHADELIM )),
aCommaSeparatedCB(this, SW_RES(CB_COMMASEPARATED )),
- aFormatFL(this, SW_RES(FL_FORMAT )),
aSortDocPosRB(this, SW_RES(RB_DOCPOS )),
aSortContentRB(this, SW_RES(RB_SORTCONTENT )),
@@ -2124,6 +2136,16 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
m_pCurrentForm(0),
bInLevelHdl(sal_False)
{
+ aEditStylePB.SetAccessibleRelationMemberOf(&aEntryFL);
+ aHyperLinkPB.SetAccessibleRelationMemberOf(&aEntryFL);
+ aPageNoPB.SetAccessibleRelationMemberOf(&aEntryFL);
+ aTabPB.SetAccessibleRelationMemberOf(&aEntryFL);
+ aEntryPB.SetAccessibleRelationMemberOf(&aEntryFL);
+ aEntryNoPB.SetAccessibleRelationMemberOf(&aEntryFL);
+ aAllLevelsPB.SetAccessibleRelationMemberOf(&aEntryFL);
+ aTokenWIN.SetAccessibleRelationMemberOf(&aEntryFL);
+ aTokenWIN.SetAccessibleRelationLabeledBy(&aTokenFT);
+
Image aSortUpHC(SW_RES(IMG_SORTUP_HC ));
aFirstSortUpRB.SetModeRadioImage(aSortUpHC,BMP_COLOR_HIGHCONTRAST);
aSecondSortUpRB.SetModeRadioImage(aSortUpHC,BMP_COLOR_HIGHCONTRAST);
@@ -3912,17 +3934,18 @@ void SwTokenWindow::GetFocus()
* --------------------------------------------------*/
SwTOXStylesTabPage::SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrSet ) :
SfxTabPage(pParent, SW_RES(TP_TOX_STYLES), rAttrSet),
+ aFormatFL(this, SW_RES(FL_FORMAT )),
aLevelFT2(this, SW_RES(FT_LEVEL )),
aLevelLB(this, SW_RES(LB_LEVEL )),
+ aAssignBT(this, SW_RES(BT_ASSIGN )),
aTemplateFT(this, SW_RES(FT_TEMPLATE)),
aParaLayLB(this, SW_RES(LB_PARALAY )),
aStdBT(this, SW_RES(BT_STD )),
- aAssignBT(this, SW_RES(BT_ASSIGN )),
aEditStyleBT(this, SW_RES(BT_EDIT_STYLE )),
- aFormatFL(this, SW_RES(FL_FORMAT )),
m_pCurrentForm(0)
{
FreeResource();
+
SetExchangeSupport( sal_True );
aAssignBT.SetModeImage( Image( SW_RES( IMG_ONE_LEFT_HC ) ), BMP_COLOR_HIGHCONTRAST );
@@ -3933,6 +3956,11 @@ SwTOXStylesTabPage::SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrS
aParaLayLB.SetSelectHdl (LINK( this, SwTOXStylesTabPage, EnableSelectHdl));
aLevelLB.SetSelectHdl (LINK( this, SwTOXStylesTabPage, EnableSelectHdl));
aParaLayLB.SetDoubleClickHdl(LINK( this, SwTOXStylesTabPage, DoubleClickHdl));
+
+ aStdBT.SetAccessibleRelationMemberOf(&aFormatFL);
+ aAssignBT.SetAccessibleRelationMemberOf(&aFormatFL);
+ aEditStyleBT.SetAccessibleRelationMemberOf(&aFormatFL);
+
}
/* -----------------25.03.99 15:17-------------------
*
diff --git a/sw/source/ui/index/cnttab.hrc b/sw/source/ui/index/cnttab.hrc
index 5b80e4342b..1025cc8a2d 100644
--- a/sw/source/ui/index/cnttab.hrc
+++ b/sw/source/ui/index/cnttab.hrc
@@ -173,6 +173,7 @@
#define STR_TOKEN_HELP_AUTHORITY (STR_BUTTON_HELP_TEXT_START + 9)
#define STR_CHARSTYLE (STR_TOKEN_HELP_AUTHORITY + 1)
+
#define TLB_STYLES 100
#define FL_STYLES 101
#define PB_OK 102
diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src
index 4532c50658..980a15dd56 100644..100755
--- a/sw/source/ui/index/cnttab.src
+++ b/sw/source/ui/index/cnttab.src
@@ -575,8 +575,8 @@ TabPage TP_TOX_ENTRY
};
Window WIN_TOKEN
{
- Pos = MAP_APPFONT ( 70, 16 ) ;
- Size = MAP_APPFONT ( 136, 12 ) ;
+ Pos = MAP_APPFONT ( 70, 15 ) ;
+ Size = MAP_APPFONT ( 136, 14 ) ;
ImageButton WIN_LEFT_SCROLL
{
HelpID = "sw:ImageButton:TP_TOX_ENTRY:WIN_LEFT_SCROLL";
@@ -1218,6 +1218,9 @@ ModalDialog DLG_ADD_IDX_STYLES
};
MaskColor = IMAGE_MASK_COLOR ;
};
+ //IAccessibility2 Implementation 2009-----
+ QuickHelpText [ en-US ] = "Left" ;
+ //-----IAccessibility2 Implementation 2009
};
ImageButton PB_RIGHT
{
@@ -1233,6 +1236,9 @@ ModalDialog DLG_ADD_IDX_STYLES
};
MaskColor = IMAGE_MASK_COLOR ;
};
+ //IAccessibility2 Implementation 2009-----
+ QuickHelpText [ en-US ] = "Right" ;
+ //-----IAccessibility2 Implementation 2009
};
FixedLine FL_STYLES
{
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 674ded12f8..4559882588 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -102,6 +102,7 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent,
const ResId& rResId,
sal_Int32 _nOptionsId, SwWrtShell& rWrtShell ) :
Window(pParent, rResId),
+ aIndexFL(this, SW_RES(FL_INDEX )),
aTypeFT (this, SW_RES(LBL_INDEX )),
aTypeDCB(this, SW_RES(DCB_INDEX )),
aNewBT(this, SW_RES(BT_NEW )),
@@ -128,7 +129,6 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent,
aSearchCaseSensitiveCB(this, SW_RES(CB_CASESENSITIVE )),
aSearchCaseWordOnlyCB(this, SW_RES(CB_WORDONLY )),
- aIndexFL(this, SW_RES(FL_INDEX )),
aOKBT(this, SW_RES(BT_OK )),
aCancelBT(this, SW_RES(BT_CANCEL )),
@@ -154,6 +154,8 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent,
pTOXMgr(0),
pSh(&rWrtShell)
{
+ aNewBT.SetAccessibleRelationMemberOf(&aIndexFL);
+
if( SvtCJKOptions().IsCJKFontEnabled() )
{
uno::Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory();
diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx
index 4c88093fc1..7fa9173bfb 100644..100755
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -560,11 +560,11 @@ void SwHHCWrapper::ReplaceUnit(
if (pTargetFont && pNewUnitLanguage)
{
SvxFontItem aFontItem = (SvxFontItem&) aSet.Get( RES_CHRATR_CJK_FONT );
- aFontItem.GetFamilyName() = pTargetFont->GetName();
- aFontItem.GetFamily() = pTargetFont->GetFamily();
- aFontItem.GetStyleName() = pTargetFont->GetStyleName();
- aFontItem.GetPitch() = pTargetFont->GetPitch();
- aFontItem.GetCharSet() = pTargetFont->GetCharSet();
+ aFontItem.SetFamilyName( pTargetFont->GetName());
+ aFontItem.SetFamily( pTargetFont->GetFamily());
+ aFontItem.SetStyleName( pTargetFont->GetStyleName());
+ aFontItem.SetPitch( pTargetFont->GetPitch());
+ aFontItem.SetCharSet( pTargetFont->GetCharSet() );
aSet.Put( aFontItem );
}
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 0bb5f892e3..cce6dfe5b8 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -152,9 +152,8 @@ void SwInsertBookmarkDlg::Apply()
SwInsertBookmarkDlg::SwInsertBookmarkDlg( Window *pParent, SwWrtShell &rS, SfxRequest& rRequest ) :
SvxStandardDialog(pParent,SW_RES(DLG_INSERT_BOOKMARK)),
-
- aBookmarkBox(this,SW_RES(CB_BOOKMARK)),
aBookmarkFl(this,SW_RES(FL_BOOKMARK)),
+ aBookmarkBox(this,SW_RES(CB_BOOKMARK)),
aOkBtn(this,SW_RES(BT_OK)),
aCancelBtn(this,SW_RES(BT_CANCEL)),
aDeleteBtn(this,SW_RES(BT_DELETE)),
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 4454dbe6c8..b188f87406 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -110,6 +110,8 @@ IMPL_LINK( SwFootNoteOptionDlg, OkHdl, Button *, pBtn )
SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, sal_Bool bEN,
const SfxItemSet &rSet ) :
SfxTabPage( pParent, SW_RES(bEN ? TP_ENDNOTEOPTION : TP_FOOTNOTEOPTION), rSet ),
+ aNumFL (this, SW_RES( FL_NUM )),
+
aNumTypeFT (this, SW_RES( FT_NUMTYPE )),
aNumViewBox (this, SW_RES( LB_NUMVIEW ), INSERT_NUM_EXTENDED_TYPES),
aOffsetLbl (this, SW_RES( FT_OFFSET )),
@@ -123,25 +125,24 @@ SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, sal_Bool bEN,
aPosFT (this, SW_RES( FT_POS )),
aPosPageBox (this, SW_RES( RB_POS_PAGE )),
aPosChapterBox (this, SW_RES( RB_POS_CHAPTER)),
- aNumFL (this, SW_RES( FL_NUM )),
+ aTemplFL (this, SW_RES( FL_TEMPL )),
aParaTemplLbl (this, SW_RES( FT_PARA_TEMPL)),
aParaTemplBox (this, SW_RES( LB_PARA_TEMPL)),
aPageTemplLbl (this, SW_RES( FT_PAGE_TEMPL)),
aPageTemplBox (this, SW_RES( LB_PAGE_TEMPL)),
- aTemplFL (this, SW_RES( FL_TEMPL )),
+ aCharTemplFL( this, SW_RES(FL_CHAR_TEMPL)),
aFtnCharAnchorTemplLbl( this, SW_RES( FT_ANCHR_CHARFMT)),
aFtnCharAnchorTemplBox( this, SW_RES( LB_ANCHR_CHARFMT)),
aFtnCharTextTemplLbl( this, SW_RES( FT_TEXT_CHARFMT)),
aFtnCharTextTemplBox( this, SW_RES( LB_TEXT_CHARFMT)),
- aCharTemplFL( this, SW_RES(FL_CHAR_TEMPL)),
+ aContFL (this, SW_RES( FL_CONT )),
aContLbl (this, SW_RES( FT_CONT )),
aContEdit (this, SW_RES( ED_CONT )),
aContFromLbl (this, SW_RES( FT_CONT_FROM )),
aContFromEdit (this, SW_RES( ED_CONT_FROM )),
- aContFL (this, SW_RES( FL_CONT )),
aNumDoc(aNumCountBox.GetEntry(FTNNUM_DOC)),
aNumPage(aNumCountBox.GetEntry(FTNNUM_PAGE)),
@@ -156,6 +157,8 @@ SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, sal_Bool bEN,
aPosChapterBox.SetClickHdl(LINK(this, SwEndNoteOptionPage, PosChapterHdl));
aNumCountBox.SetSelectHdl(LINK(this, SwEndNoteOptionPage, NumCountHdl));
+ aPosPageBox.SetAccessibleRelationMemberOf(&aPosFT);
+ aPosChapterBox.SetAccessibleRelationMemberOf(&aPosFT);
}
void SwEndNoteOptionPage::Reset( const SfxItemSet& )
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index 4be6db07bf..750ebe2543 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -76,9 +76,11 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
const SvStrings* pPathArr,
SwGlossaryHdl *pHdl) :
SvxStandardDialog(pParent, SW_RES(DLG_BIB_BASE)),
-
+ aBibFT( this, SW_RES(FT_BIB)),
aNameED( this, SW_RES(ED_NAME)),
+ aPathFT( this, SW_RES(FT_PATH)),
aPathLB( this, SW_RES(LB_PATH)),
+ aSelectFT( this, SW_RES(FT_SELECT)),
aGroupTLB( this, SW_RES(TLB_GROUPS)),
aOkPB( this, SW_RES(BT_OK)),
@@ -87,9 +89,6 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
aNewPB( this, SW_RES(PB_NEW)),
aDelPB( this, SW_RES(PB_DELETE)),
aRenamePB( this, SW_RES(PB_RENAME)),
- aBibFT( this, SW_RES(FT_BIB)),
- aPathFT( this, SW_RES(FT_PATH)),
- aSelectFT( this, SW_RES(FT_SELECT)),
pRemovedArr(0),
pInsertedArr(0),
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 2203e216f4..c8b1457439 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -91,6 +91,8 @@
#include <swmodule.hxx>
#include <sfx2/filedlghelper.hxx>
+#include "access.hrc"
+
#define LONG_LENGTH 60
#define SHORT_LENGTH 30
@@ -152,11 +154,11 @@ class SwNewGlosNameDlg : public ModalDialog
NoSpaceEdit aNewShort;
OKButton aOk;
CancelButton aCancel;
- FixedLine aFL;
FixedText aONFT;
Edit aOldName;
FixedText aOSFT;
Edit aOldShort;
+ FixedLine aFL;
protected:
DECL_LINK( Modify, Edit * );
@@ -181,11 +183,12 @@ SwNewGlosNameDlg::SwNewGlosNameDlg(Window* pParent,
aNewShort(this,SW_RES( ED_NS )),
aOk (this, SW_RES( BT_OKNEW)),
aCancel (this, SW_RES( BT_CANCEL)),
- aFL (this, SW_RES( FL_NN )),
aONFT (this, SW_RES( FT_ON )),
aOldName(this, SW_RES( ED_ON )),
aOSFT (this, SW_RES( FT_OS )),
- aOldShort(this,SW_RES( ED_OS ))
+ aOldShort(this,SW_RES( ED_OS )),
+ aFL (this, SW_RES( FL_NN ))
+
{
FreeResource();
aOldName.SetText( rOldName );
@@ -298,6 +301,8 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame,
aCategoryBox.GetModel()->SetSortMode(SortAscending);
aCategoryBox.SetHighlightRange(); // ueber volle Breite selektieren
aCategoryBox.SetNodeDefaultImages( );
+ aCategoryBox.SetAccessibleName(SW_RES(STR_ACCESS_SW_CATEGORY));
+ aCategoryBox.SetAccessibleRelationLabeledBy(&aInsertTipCB);
Init();
}
diff --git a/sw/source/ui/misc/glossary.src b/sw/source/ui/misc/glossary.src
index 5ad32faa2f..94d56829bf 100644
--- a/sw/source/ui/misc/glossary.src
+++ b/sw/source/ui/misc/glossary.src
@@ -29,6 +29,8 @@
#include "glossary.hrc"
#include "cmdid.h"
#include "helpid.h"
+#include "access.hrc"
+
// #define DLG_GLOSSARY 256
ModalDialog DLG_GLOSSARY
{
@@ -288,6 +290,12 @@ String STR_GLOSSARY
{
Text [ en-US ] = "AutoText :" ;
};
+/*IAccessibility2 Implementation 2009-----*/
+String STR_ACCESS_SW_CATEGORY
+{
+ Text [ en-US ] = "Category" ;
+};
+/*-----IAccessibility2 Implementation 2009*/
ModalDialog DLG_RENAME_GLOS
{
OutputSize = TRUE ;
diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx
index 29da9b203b..d0f9adf304 100644
--- a/sw/source/ui/misc/impfnote.hxx
+++ b/sw/source/ui/misc/impfnote.hxx
@@ -46,6 +46,7 @@ class SwWrtShell;
class SwEndNoteOptionPage : public SfxTabPage
{
+ FixedLine aNumFL;
FixedText aNumTypeFT;
SwNumberingTypeListBox aNumViewBox;
FixedText aOffsetLbl;
@@ -59,25 +60,24 @@ class SwEndNoteOptionPage : public SfxTabPage
FixedText aPosFT;
RadioButton aPosPageBox;
RadioButton aPosChapterBox;
- FixedLine aNumFL;
+ FixedLine aTemplFL;
FixedText aParaTemplLbl;
ListBox aParaTemplBox;
FixedText aPageTemplLbl;
ListBox aPageTemplBox;
- FixedLine aTemplFL;
+ FixedLine aCharTemplFL;
FixedText aFtnCharAnchorTemplLbl;
ListBox aFtnCharAnchorTemplBox;
FixedText aFtnCharTextTemplLbl;
ListBox aFtnCharTextTemplBox;
- FixedLine aCharTemplFL;
+ FixedLine aContFL;
FixedText aContLbl;
Edit aContEdit;
FixedText aContFromLbl;
Edit aContFromEdit;
- FixedLine aContFL;
String aNumDoc;
String aNumPage;
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index a5211af5fe..5a02e812ce 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -233,15 +233,15 @@ SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, sal_Bool
rSh(rShell),
bExtCharAvailable(sal_False),
bEdit(bEd),
+ aNumberFL (this,SW_RES(FL_NUMBER)),
aNumberAutoBtn (this,SW_RES(RB_NUMBER_AUTO)),
aNumberCharBtn (this,SW_RES(RB_NUMBER_CHAR)),
aNumberCharEdit (this,SW_RES(ED_NUMBER_CHAR)),
aNumberExtChar (this,SW_RES(BT_NUMBER_CHAR)),
- aNumberFL (this,SW_RES(FL_NUMBER)),
+ aTypeFL (this,SW_RES(FL_TYPE)),
aFtnBtn (this,SW_RES(RB_TYPE_FTN)),
aEndNoteBtn (this,SW_RES(RB_TYPE_ENDNOTE)),
- aTypeFL (this,SW_RES(FL_TYPE)),
aOkBtn (this,SW_RES(BT_OK)),
aCancelBtn (this,SW_RES(BT_CANCEL)),
@@ -249,6 +249,10 @@ SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, sal_Bool
aPrevBT (this,SW_RES(BT_PREV)),
aNextBT (this,SW_RES(BT_NEXT))
{
+ aNumberCharEdit.SetAccessibleName(String(SW_RES(STR_CHAR)));
+ aNumberExtChar.SetAccessibleRelationMemberOf(&aNumberFL);
+ aNumberCharEdit.SetAccessibleRelationLabeledBy(&aNumberCharBtn);
+
aNumberAutoBtn.SetClickHdl(LINK(this,SwInsFootNoteDlg,NumberAutoBtnHdl));
aNumberExtChar.SetClickHdl(LINK(this,SwInsFootNoteDlg,NumberExtCharHdl));
aNumberCharBtn.SetClickHdl(LINK(this,SwInsFootNoteDlg,NumberCharHdl));
diff --git a/sw/source/ui/misc/insfnote.hrc b/sw/source/ui/misc/insfnote.hrc
index 104693acea..c3649748f0 100644
--- a/sw/source/ui/misc/insfnote.hrc
+++ b/sw/source/ui/misc/insfnote.hrc
@@ -39,3 +39,7 @@
#define BT_HELP 102
#define BT_PREV 103
#define BT_NEXT 104
+
+//IAccessibility2 Implementation 2009-----
+#define STR_CHAR 105
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/ui/misc/insfnote.src b/sw/source/ui/misc/insfnote.src
index c462e01188..761241619e 100644
--- a/sw/source/ui/misc/insfnote.src
+++ b/sw/source/ui/misc/insfnote.src
@@ -49,6 +49,12 @@ ModalDialog DLG_INS_FOOTNOTE
Group = TRUE ;
Left = TRUE ;
};
+ //IAccessibility2 Implementation 2009-----
+ String STR_CHAR
+ {
+ Text [ en-US ] = "Character" ;
+ };
+ //-----IAccessibility2 Implementation 2009
OKButton BT_OK
{
Pos = MAP_APPFONT ( 104 , 6 ) ;
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index 4cca0d1aa6..584b31ee34 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -105,6 +105,7 @@ SwLineNumberingPage::SwLineNumberingPage( Window* pParent,
const SfxItemSet& rSet )
: SfxTabPage(pParent, SW_RES(TP_LINENUMBERING), rSet),
aNumberingOnCB ( this, SW_RES( CB_NUMBERING_ON )),
+ aDisplayFL ( this, SW_RES( FL_DISPLAY )),
aCharStyleFT ( this, SW_RES( FT_CHAR_STYLE )),
aCharStyleLB ( this, SW_RES( LB_CHAR_STYLE )),
aFormatFT ( this, SW_RES( FT_FORMAT )),
@@ -116,19 +117,29 @@ SwLineNumberingPage::SwLineNumberingPage( Window* pParent,
aNumIntervalFT ( this, SW_RES( FT_NUM_INVERVAL )),
aNumIntervalNF ( this, SW_RES( NF_NUM_INVERVAL )),
aNumRowsFT ( this, SW_RES( FT_NUM_ROWS )),
- aDisplayFL ( this, SW_RES( FL_DISPLAY )),
+ aDivisorFL ( this, SW_RES( FL_DIVISOR )),
aDivisorFT ( this, SW_RES( FT_DIVISOR )),
aDivisorED ( this, SW_RES( ED_DIVISOR )),
aDivIntervalFT ( this, SW_RES( FT_DIV_INTERVAL )),
aDivIntervalNF ( this, SW_RES( NF_DIV_INTERVAL )),
aDivRowsFT ( this, SW_RES( FT_DIV_ROWS )),
- aDivisorFL ( this, SW_RES( FL_DIVISOR )),
+ aCountFL ( this, SW_RES( FL_COUNT )),
aCountEmptyLinesCB ( this, SW_RES( CB_COUNT_EMPTYLINES )),
aCountFrameLinesCB ( this, SW_RES( CB_COUNT_FRAMELINES )),
- aRestartEachPageCB ( this, SW_RES( CB_RESTART_PAGE )),
- aCountFL ( this, SW_RES( FL_COUNT ))
+ aRestartEachPageCB ( this, SW_RES( CB_RESTART_PAGE ))
{
+ String sIntervalName = aDivIntervalFT.GetAccessibleName();
+ sIntervalName += String::CreateFromAscii("(");
+ sIntervalName += aDivRowsFT.GetAccessibleName();
+ sIntervalName += String::CreateFromAscii(")");
+ aDivIntervalNF.SetAccessibleName(sIntervalName);
+ sIntervalName = aNumIntervalFT.GetAccessibleName();
+ sIntervalName += String::CreateFromAscii("(");
+ sIntervalName += aNumRowsFT.GetAccessibleName();
+ sIntervalName += String::CreateFromAscii(")");
+ aNumIntervalNF.SetAccessibleName(sIntervalName);
+
FreeResource();
SwLineNumberingDlg *pDlg = (SwLineNumberingDlg *)GetParent();
pSh = pDlg->GetWrtShell();
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index a5fd3511fa..d9dd5f9e3e 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -101,9 +101,9 @@ static sal_Bool bLastRelative = sal_False;
SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
const SfxItemSet& rSet) :
SfxTabPage( pParent, SW_RES( TP_NUM_POSITION ), rSet ),
- aPositionFL( this, SW_RES(FL_POSITION )),
aLevelFL( this, SW_RES(FL_LEVEL )),
aLevelLB( this, SW_RES(LB_LEVEL )),
+ aPositionFL( this, SW_RES(FL_POSITION )),
aDistBorderFT( this, SW_RES(FT_BORDERDIST )),
aDistBorderMF( this, SW_RES(MF_BORDERDIST )),
@@ -143,6 +143,9 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
FreeResource();
SetExchangeSupport();
aPreviewWIN.SetBackground(Wallpaper(Color(COL_TRANSPARENT)));
+
+ aStandardPB.SetAccessibleRelationMemberOf(&aPositionFL);
+
aRelativeCB.Check();
aAlignLB.SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl));
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 276aadafdf..277e645bcd 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -88,6 +88,10 @@
#include <app.hrc>
// <--
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#endif
+
using namespace ::com::sun::star;
/* -----------------------------31.01.01 10:23--------------------------------
@@ -102,9 +106,9 @@ DBG_NAME(outlinehdl)
class SwNumNamesDlg: public ModalDialog
{
+ FixedLine aFormFL;
Edit aFormEdit;
ListBox aFormBox;
- FixedLine aFormFL;
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
@@ -186,9 +190,9 @@ IMPL_LINK_INLINE_END( SwNumNamesDlg, DoubleClickHdl, ListBox *, EMPTYARG )
SwNumNamesDlg::SwNumNamesDlg(Window *pParent)
: ModalDialog(pParent, SW_RES(DLG_NUM_NAMES)),
+ aFormFL(this, SW_RES(FL_FORM)),
aFormEdit(this, SW_RES(ED_FORM)),
aFormBox(this, SW_RES(LB_FORM)),
- aFormFL(this, SW_RES(FL_FORM)),
aOKBtn(this, SW_RES(BT_OK)),
aCancelBtn(this, SW_RES(BT_CANCEL)),
aHelpBtn(this, SW_RES(BT_HELP))
@@ -241,6 +245,7 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent,
pUserButton->SetText(SW_RES(ST_FORM));
pUserButton->SetHelpId(HID_OUTLINE_FORM);
pUserButton->SetClickHdl(LINK(this, SwOutlineTabDialog, FormHdl));
+ pUserButton->SetAccessibleRole( com::sun::star::accessibility::AccessibleRole::BUTTON_MENU );
FreeResource();
pNumRule = new SwNumRule( *rSh.GetOutlineNumRule() );
@@ -543,8 +548,9 @@ short SwOutlineTabDialog::Ok()
* --------------------------------------------------*/
SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_OUTLINE_NUM), rSet),
- aLevelLB( this, SW_RES(LB_LEVEL )),
aLevelFL( this, SW_RES(FL_LEVEL )),
+ aLevelLB( this, SW_RES(LB_LEVEL )),
+ aNumberFL(this, SW_RES(FL_NUMBER)),
aCollLbl(this, SW_RES(FT_COLL)),
aCollBox(this, SW_RES(LB_COLL)),
aNumberLbl(this, SW_RES(FT_NUMBER)),
@@ -560,7 +566,6 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(Window* pParent, const SfxIte
aSuffixED(this, SW_RES(ED_SUFFIX)),
aStartLbl(this, SW_RES(FT_START)),
aStartEdit(this, SW_RES(ED_START)),
- aNumberFL(this, SW_RES(FL_NUMBER)),
aPreviewWIN( this, SW_RES(WIN_PREVIEW )),
aNoFmtName(SW_RES(ST_NO_COLL)),
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 70a807ae37..efb98d9d5c 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -156,14 +156,14 @@ IMPL_LINK( SwFootNotePage, HeightModify, MetricField *, EMPTYARG )
SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) :
SfxTabPage(pParent, SW_RES(TP_FOOTNOTE_PAGE), rSet),
-
+ aPosHeader(this, SW_RES(FL_FOOTNOTE_SIZE)),
aMaxHeightPageBtn(this, SW_RES(RB_MAXHEIGHT_PAGE)),
aMaxHeightBtn(this, SW_RES(RB_MAXHEIGHT)),
aMaxHeightEdit(this, SW_RES(ED_MAXHEIGHT)),
aDistLbl(this, SW_RES(FT_DIST)),
aDistEdit(this, SW_RES(ED_DIST)),
- aPosHeader(this, SW_RES(FL_FOOTNOTE_SIZE)),
-
+
+ aLineHeader(this, SW_RES(FL_LINE)),
aLinePosLbl(this, SW_RES(FT_LINEPOS)),
aLinePosBox(this, SW_RES(DLB_LINEPOS)),
aLineTypeLbl(this, SW_RES(FT_LINETYPE)),
@@ -171,9 +171,8 @@ SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) :
aLineWidthLbl(this, SW_RES(FT_LINEWIDTH)),
aLineWidthEdit(this, SW_RES(ED_LINEWIDTH)),
aLineDistLbl(this, SW_RES(FT_LINEDIST)),
- aLineDistEdit(this, SW_RES(ED_LINEDIST)),
- aLineHeader(this, SW_RES(FL_LINE))
-{
+ aLineDistEdit(this, SW_RES(ED_LINEDIST))
+ {
FreeResource();
SetExchangeSupport();
@@ -184,6 +183,7 @@ SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) :
MeasurementSystem eSys = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
long nHeightValue = MEASURE_METRIC != eSys ? 1440 : 1134;
aMaxHeightEdit.SetValue(aMaxHeightEdit.Normalize(nHeightValue),FUNIT_TWIP);;
+ aMaxHeightEdit.SetAccessibleRelationLabeledBy(&aMaxHeightBtn);
}
SwFootNotePage::~SwFootNotePage()
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index 9f844fa6cc..8f5d5ffa80 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -133,12 +133,13 @@ sal_Bool lcl_GetSelTbl( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY )
SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
SvxStandardDialog(pParent, SW_RES(DLG_SORTING)),
+
aColLbl(this, SW_RES(FT_COL )),
aTypLbl(this, SW_RES(FT_KEYTYP)),
aDirLbl(this, SW_RES(FT_DIR )),
+ aSortFL(this, SW_RES(FL_SORT_2 )),
- aDirFL(this, SW_RES(FL_DIR )),
-
+
aKeyCB1(this, SW_RES(CB_KEY1 )),
aColEdt1(this, SW_RES(ED_KEY1 )),
aTypDLB1(this, SW_RES(DLB_KEY1 )),
@@ -156,8 +157,8 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
aTypDLB3(this, SW_RES(DLB_KEY3 )),
aSortUp3RB(this, SW_RES(RB_UP3 )),
aSortDn3RB(this, SW_RES(RB_DN3 )),
+ aDirFL(this, SW_RES(FL_DIR )),
- aSortFL(this, SW_RES(FL_SORT_2 )),
aColumnRB(this, SW_RES(RB_COL )),
aRowRB(this, SW_RES(RB_ROW )),
@@ -185,6 +186,19 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
nX( 99 ),
nY( 99 )
{
+ aColEdt1.SetAccessibleName(aColLbl.GetText());
+ aColEdt2.SetAccessibleName(aColLbl.GetText());
+ aColEdt3.SetAccessibleName(aColLbl.GetText());
+ aTypDLB1.SetAccessibleName(aTypLbl.GetText());
+ aTypDLB2.SetAccessibleName(aTypLbl.GetText());
+ aTypDLB3.SetAccessibleName(aTypLbl.GetText());
+ aSortUpRB.SetAccessibleRelationMemberOf( &aKeyCB1 );
+ aSortDnRB.SetAccessibleRelationMemberOf( &aKeyCB1 );
+ aSortUp2RB.SetAccessibleRelationMemberOf( &aKeyCB2 );
+ aSortDn2RB.SetAccessibleRelationMemberOf( &aKeyCB2 );
+ aSortUp3RB.SetAccessibleRelationMemberOf( &aKeyCB3 );
+ aSortDn3RB.SetAccessibleRelationMemberOf( &aKeyCB3 );
+
aDelimEdt.SetMaxTextLen( 1 );
if(rSh.GetSelectionType() &
(nsSelectionType::SEL_TBL|nsSelectionType::SEL_TBL_CELLS) )
@@ -262,6 +276,25 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
aColEdt2.SetMax(nMax);
aColEdt3.SetMax(nMax);
}
+
+ aDelimEdt.SetAccessibleRelationLabeledBy(&aDelimFreeRB);
+ aDelimPB.SetAccessibleRelationLabeledBy(&aDelimFreeRB);
+ aDelimPB.SetAccessibleRelationMemberOf(&aDelimFL);
+
+ aColEdt1.SetAccessibleRelationMemberOf(&aKeyCB1);
+ aColEdt1.SetAccessibleRelationLabeledBy(&aColLbl);
+ aTypDLB1.SetAccessibleRelationMemberOf(&aKeyCB1);
+ aTypDLB1.SetAccessibleRelationLabeledBy(&aTypLbl);
+
+ aColEdt2.SetAccessibleRelationMemberOf(&aKeyCB2);
+ aColEdt2.SetAccessibleRelationLabeledBy(&aColLbl);
+ aTypDLB2.SetAccessibleRelationMemberOf(&aKeyCB2);
+ aTypDLB2.SetAccessibleRelationLabeledBy(&aTypLbl);
+
+ aColEdt3.SetAccessibleRelationMemberOf(&aKeyCB3);
+ aColEdt3.SetAccessibleRelationLabeledBy(&aColLbl);
+ aTypDLB3.SetAccessibleRelationMemberOf(&aKeyCB3);
+ aTypDLB3.SetAccessibleRelationLabeledBy(&aTypLbl);
}
SwSortDlg::~SwSortDlg()
@@ -416,6 +449,9 @@ IMPL_LINK( SwSortDlg, CheckHdl, CheckBox *, pCheck )
aColEdt2.SetMax(nY);
aColEdt3.SetMax(nY);
+ aColEdt1.SetAccessibleName(aColTxt);
+ aColEdt2.SetAccessibleName(aColTxt);
+ aColEdt3.SetAccessibleName(aColTxt);
}
else if( pCheck == ( CheckBox* ) &aColumnRB)
{
@@ -423,6 +459,10 @@ IMPL_LINK( SwSortDlg, CheckHdl, CheckBox *, pCheck )
aColEdt1.SetMax(nX);
aColEdt2.SetMax(nX);
aColEdt3.SetMax(nX);
+
+ aColEdt1.SetAccessibleName(aRowTxt);
+ aColEdt2.SetAccessibleName(aRowTxt);
+ aColEdt3.SetAccessibleName(aRowTxt);
}
else if(!aKeyCB1.IsChecked() &&
!aKeyCB2.IsChecked() &&
diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx
index 43967174d0..644923d431 100644
--- a/sw/source/ui/shells/drwbassh.cxx
+++ b/sw/source/ui/shells/drwbassh.cxx
@@ -266,7 +266,8 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor));
sal_Bool bRTL;
- aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(sal_True, bRTL)));
+ sal_Bool bVertL2R;
+ aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(sal_True, bRTL, bVertL2R)));
aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_RTL_TEXT, bRTL));
SwFrmFmt* pFrmFmt = FindFrmFmt( pObj );
@@ -832,8 +833,12 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
pValidation->bFollowTextFlow,
pValidation->bMirror, NULL, &pValidation->aPercentSize);
- sal_Bool bRTL;
- sal_Bool bIsInVertical = pSh->IsFrmVertical(sal_True, bRTL);
+ sal_Bool bIsInVertical( sal_False );
+ {
+ sal_Bool bRTL;
+ sal_Bool bVertL2R;
+ bIsInVertical = pSh->IsFrmVertical(sal_True, bRTL, bVertL2R);
+ }
if(bIsInVertical)
{
Point aPos(aBoundRect.Pos());
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index b99cc467f7..34732bf109 100644..100755
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -1161,10 +1161,10 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
{
bFontChanged = sal_True;
SvxFontItem aNewFontItem( aFont );
- aNewFontItem.GetFamilyName() = aNewFont.GetName();
- aNewFontItem.GetFamily() = aNewFont.GetFamily();
- aNewFontItem.GetPitch() = aNewFont.GetPitch();
- aNewFontItem.GetCharSet() = aNewFont.GetCharSet();
+ aNewFontItem.SetFamilyName( aNewFont.GetName());
+ aNewFontItem.SetFamily( aNewFont.GetFamily());
+ aNewFontItem.SetPitch( aNewFont.GetPitch());
+ aNewFontItem.SetCharSet( aNewFont.GetCharSet() );
SfxItemSet aRestoreSet( GetPool(), RES_CHRATR_FONT, RES_CHRATR_FONT,
RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_FONT,
diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx
index dc7ca95821..2361f50a98 100644
--- a/sw/source/ui/table/colwd.cxx
+++ b/sw/source/ui/table/colwd.cxx
@@ -76,12 +76,12 @@ IMPL_LINK_INLINE_END( SwTableWidthDlg, LoseFocusHdl, Edit *, EMPTYARG )
SwTableWidthDlg::SwTableWidthDlg(Window *pParent, SwTableFUNC &rTableFnc ) :
SvxStandardDialog( pParent, SW_RES(DLG_COL_WIDTH) ),
+ aWidthFL(this, SW_RES(FL_WIDTH)),
aColFT(this, SW_RES(FT_COL)),
aColEdit(this, SW_RES(ED_COL)),
aWidthFT(this, SW_RES(FT_WIDTH)),
aWidthEdit(this, SW_RES(ED_WIDTH)),
- aWidthFL(this, SW_RES(FL_WIDTH)),
aOKBtn(this, SW_RES(BT_OK)),
aCancelBtn(this, SW_RES(BT_CANCEL)),
aHelpBtn(this, SW_RES(BT_HELP)),
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx
index 9678ff6f51..1c08d7c075 100644
--- a/sw/source/ui/table/convert.cxx
+++ b/sw/source/ui/table/convert.cxx
@@ -153,6 +153,8 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable )
pTAutoFmt( 0 ),
pShell( &rView.GetWrtShell() )
{
+ aOtherEd.SetAccessibleName(String(SW_RES(STR_SYMBOL)));
+ aOtherEd.SetAccessibleRelationLabeledBy(&aOtherBtn);
FreeResource();
if(nSaveButtonState > -1)
{
diff --git a/sw/source/ui/table/convert.hrc b/sw/source/ui/table/convert.hrc
index e86906dd20..34e152c489 100644
--- a/sw/source/ui/table/convert.hrc
+++ b/sw/source/ui/table/convert.hrc
@@ -45,3 +45,6 @@
#define BT_AUTOFORMAT 102
#define BT_HELP 103
#define WIN_REPEAT_HEADER 104
+//IAccessibility2 Implementation 2009-----
+#define STR_SYMBOL 105
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/ui/table/convert.src b/sw/source/ui/table/convert.src
index 13e9b9e860..56f8d098a1 100644
--- a/sw/source/ui/table/convert.src
+++ b/sw/source/ui/table/convert.src
@@ -191,6 +191,12 @@ ModalDialog DLG_CONV_TEXT_TABLE
Hide = TRUE ;
Text [ en-US ] = "Auto~Format..." ;
};
+ /*IAccessibility2 Implementation 2009-----*/
+ String STR_SYMBOL
+ {
+ Text [ en-US ] = "Symbol" ;
+ };
+ /*-----IAccessibility2 Implementation 2009*/
};
diff --git a/sw/source/ui/table/rowht.cxx b/sw/source/ui/table/rowht.cxx
index 9bfdbe74e5..0493123823 100644
--- a/sw/source/ui/table/rowht.cxx
+++ b/sw/source/ui/table/rowht.cxx
@@ -86,10 +86,10 @@ void SwTableHeightDlg::Apply()
SwTableHeightDlg::SwTableHeightDlg( Window *pParent, SwWrtShell &rS ) :
SvxStandardDialog(pParent, SW_RES(DLG_ROW_HEIGHT)),
+ aHeightFL(this, SW_RES(FL_HEIGHT)),
aHeightEdit(this, SW_RES(ED_HEIGHT)),
aAutoHeightCB(this, SW_RES(CB_AUTOHEIGHT)),
- aHeightFL(this, SW_RES(FL_HEIGHT)),
aOKBtn(this, SW_RES(BT_OK)),
aCancelBtn(this, SW_RES(BT_CANCEL)),
aHelpBtn( this, SW_RES( BT_HELP ) ),
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 3d8f81241c..3101aecc16 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -53,6 +53,8 @@
#include <fmtrowsplt.hxx>
#include <svx/htmlmode.hxx>
+#include "access.hrc"
+
#ifndef _DOCSH_HXX
#include <docsh.hxx>
#endif
@@ -824,7 +826,8 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent,
aProportionalCB(this, SW_RES(CB_PROP)),
aSpaceFT(this, SW_RES(FT_SPACE)),
aSpaceED(this, SW_RES(ED_SPACE)),
-
+
+ aColFL(this, SW_RES(COL_FL_LAYOUT)),
aUpBtn(this, SW_RES(COL_BTN_UP)),
aFT1(this, SW_RES(COL_FT_1)),
aMF1(this, SW_RES(COL_MF_1)),
@@ -839,7 +842,6 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent,
aFT6(this, SW_RES(COL_FT_6)),
aMF6(this, SW_RES(COL_MF_6)),
aDownBtn(this, SW_RES(COL_BTN_DOWN)),
- aColFL(this, SW_RES(COL_FL_LAYOUT)),
nTableWidth(0),
nMinWidth( MINLAY ),
@@ -852,6 +854,9 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent,
FreeResource();
SetExchangeSupport();
+ aDownBtn.SetAccessibleRelationMemberOf(&aColFL);
+ aUpBtn.SetAccessibleRelationMemberOf(&aColFL);
+
pFieldArr[0] = &aMF1;
pFieldArr[1] = &aMF2;
pFieldArr[2] = &aMF3;
@@ -986,8 +991,16 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox )
for( sal_uInt16 i = 0; (i < nNoOfVisibleCols ) && ( i < MET_FIELDS); i++ )
{
String sEntry('~');
- sEntry += String::CreateFromInt32( aValueTbl[i] + 1 );
+ String sIndex = String::CreateFromInt32( aValueTbl[i] + 1 );
+ sEntry += sIndex;
pTextArr[i]->SetText( sEntry );
+//IAccessibility2 Impplementaton 2009-----
+ //added by menghu for SODC_5143,12/12/2006
+ String sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH);
+ sColumnWidth.SearchAndReplace( DEFINE_CONST_UNICODE("%1"), sIndex );
+ pFieldArr[i]->SetAccessibleName( sColumnWidth );
+ //end of SODC_5143
+//-----IAccessibility2 Impplementaton 2009
}
aDownBtn.Enable(aValueTbl[0] > 0);
@@ -1098,12 +1111,18 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos )
if(!bModifyTable && !bProp )
{
-// Tabellenbreite bleibt, Differenz wird mit der/den
-// naechsten Zellen ausgeglichen
+// the table width is constant, the difference is balanced with the other columns
+ sal_uInt16 nLoopCount = 0;
while( nDiff )
{
if( ++nAktPos == nNoOfVisibleCols)
+ {
nAktPos = 0;
+ ++nLoopCount;
+ //#i101353# in small tables it might not be possible to balance column width
+ if( nLoopCount > 1 )
+ break;
+ }
if( nDiff < 0 )
{
SetVisibleWidth(nAktPos, GetVisibleWidth(nAktPos) -nDiff);
@@ -1458,6 +1477,13 @@ SwTextFlowPage::SwTextFlowPage( Window* pParent,
{
FreeResource();
+ aPgBrkRB.SetAccessibleRelationMemberOf(&aPgBrkCB);
+ aColBrkRB.SetAccessibleRelationMemberOf(&aPgBrkCB);
+ aPgBrkBeforeRB.SetAccessibleRelationMemberOf(&aPgBrkCB);
+ aPgBrkAfterRB.SetAccessibleRelationMemberOf(&aPgBrkCB);
+ aPageCollLB.SetAccessibleRelationLabeledBy(&aPageCollCB);
+ aPageCollLB.SetAccessibleName(aPageCollCB.GetText());
+
aPgBrkCB.SetClickHdl(LINK(this, SwTextFlowPage, PageBreakHdl_Impl));
aPgBrkBeforeRB.SetClickHdl(
LINK( this, SwTextFlowPage, PageBreakPosHdl_Impl ) );
diff --git a/sw/source/ui/table/tabledlg.hrc b/sw/source/ui/table/tabledlg.hrc
index 1640c623d9..395613dac4 100644
--- a/sw/source/ui/table/tabledlg.hrc
+++ b/sw/source/ui/table/tabledlg.hrc
@@ -108,3 +108,4 @@
#define FT_VERTORIENT 150
#define LB_VERTORIENT 151
+
diff --git a/sw/source/ui/table/tabledlg.src b/sw/source/ui/table/tabledlg.src
index b3d52ec516..8c33398ca9 100644
--- a/sw/source/ui/table/tabledlg.src
+++ b/sw/source/ui/table/tabledlg.src
@@ -786,4 +786,3 @@ InfoBox MSG_WRONG_TABLENAME
{
Message [ en-US ] = "The name of the table must not contain spaces." ;
};
-
diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx
index ea200094c6..a95e659fe0 100644
--- a/sw/source/ui/table/tablepg.hxx
+++ b/sw/source/ui/table/tablepg.hxx
@@ -121,7 +121,7 @@ class SwTableColumnPage : public SfxTabPage
CheckBox aProportionalCB;
FixedText aSpaceFT;
MetricField aSpaceED;
-
+ FixedLine aColFL;
ImageButton aUpBtn;
FixedText aFT1;
PercentField aMF1;
@@ -136,7 +136,6 @@ class SwTableColumnPage : public SfxTabPage
FixedText aFT6;
PercentField aMF6;
ImageButton aDownBtn;
- FixedLine aColFL;
SwTableRep* pTblData;
PercentField* pFieldArr[MET_FIELDS];
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index e9665532f1..88854b9a88 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -184,13 +184,13 @@ SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell,
//
aFlFormat ( this, SW_RES( FL_FORMAT ) ),
aLbFormat ( this, SW_RES( LB_FORMAT ) ),
+ aFlFormats ( this, SW_RES( FL_FORMATS ) ),
aBtnNumFormat ( this, SW_RES( BTN_NUMFORMAT ) ),
aBtnBorder ( this, SW_RES( BTN_BORDER ) ),
aBtnFont ( this, SW_RES( BTN_FONT ) ),
aBtnPattern ( this, SW_RES( BTN_PATTERN ) ),
aBtnAlignment ( this, SW_RES( BTN_ALIGNMENT ) ),
- aFlFormats ( this, SW_RES( FL_FORMATS ) ),
aBtnOk ( this, SW_RES( BTN_OK ) ),
aBtnCancel ( this, SW_RES( BTN_CANCEL ) ),
aBtnHelp ( this, SW_RES( BTN_HELP ) ),
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 03b6dfa5f3..806831d334 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -313,8 +313,14 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwFrmFmt* pFmt = ((SwFrmFmt*)rSh.GetFlyFrmFmt());
const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED);
- sal_Bool bRTL;
- sal_Bool bVerticalFrame = (bFrmSelection && rSh.IsFrmVertical(sal_True, bRTL))|| (!bFrmSelection && bVerticalWriting);
+ sal_Bool bVerticalFrame(sal_False);
+ {
+ sal_Bool bRTL;
+ sal_Bool bVertL2R;
+ bVerticalFrame = ( bFrmSelection &&
+ rSh.IsFrmVertical(sal_True, bRTL, bVertL2R) ) ||
+ ( !bFrmSelection && bVerticalWriting);
+ }
long nDeltaX = bVerticalFrame ?
rRect.Right() - rPageRect.Right() + aLongLR.GetRight() :
rPageRect.Left() + aLongLR.GetLeft() - rRect.Left();
@@ -452,7 +458,10 @@ void SwView::ExecTabWin( SfxRequest& rReq )
RES_VERT_ORIENT, RES_HORI_ORIENT, 0 );
//which of the orientation attributes is to be put depends on the frame's environment
sal_Bool bRTL;
- if((bFrmSelection && rSh.IsFrmVertical(sal_True, bRTL))|| (!bFrmSelection && bVerticalWriting))
+ sal_Bool bVertL2R;
+ if ( ( bFrmSelection &&
+ rSh.IsFrmVertical(sal_True, bRTL, bVertL2R ) ) ||
+ ( !bFrmSelection && bVerticalWriting ) )
{
SwFmtHoriOrient aHoriOrient(pFmt->GetHoriOrient());
aHoriOrient.SetHoriOrient(text::HoriOrientation::NONE);
@@ -1274,8 +1283,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
case SID_RULER_BORDERS_VERTICAL:
case SID_RULER_BORDERS:
{
- sal_Bool bFrameRTL;
- sal_Bool bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL) && bFrmSelection;
+ sal_Bool bFrameHasVerticalColumns(sal_False);
+ {
+ sal_Bool bFrameRTL;
+ sal_Bool bFrameVertL2R;
+ bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL, bFrameVertL2R) &&
+ bFrmSelection;
+ }
sal_Bool bHasTable = ( IsTabColFromDoc() ||
( rSh.GetTableFmt() && !bFrmSelection &&
!(nFrmType & FRMTYPE_COLSECT ) ) );
@@ -1498,8 +1512,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
case SID_RULER_ROWS :
case SID_RULER_ROWS_VERTICAL:
{
- sal_Bool bFrameRTL;
- sal_Bool bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL) && bFrmSelection;
+ sal_Bool bFrameHasVerticalColumns(sal_False);
+ {
+ sal_Bool bFrameRTL;
+ sal_Bool bFrameVertL2R;
+ bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL, bFrameVertL2R) &&
+ bFrmSelection;
+ }
if( ( (SID_RULER_ROWS == nWhich) &&
((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) ) ||
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index fb034d41bd..b91a3c763e 100644..100755
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -2891,6 +2891,9 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
aTmpSize = pPrinter->LogicToLogic( aTmpSize,
pPrinter->GetMapMode(), MapMode( MAP_100TH_MM ));
aPageSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() );
+ #if 0
+ // #i115048# it seems users didn't like getting double the formatted page size
+ // revert to "old" behavior scaling to the current paper size of the printer
if (bPrintProspect)
{
// we just state what output size we would need
@@ -2900,6 +2903,20 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
aPreferredPageSize = awt::Size ( TWIP_TO_MM100( 2 * aTmpSize.Width() ),
TWIP_TO_MM100( aTmpSize.Height() ));
}
+ #else
+ if( bPrintProspect )
+ {
+ // just switch to an appropriate portrait/landscape format
+ // FIXME: brochure printing with landscape pages puts the
+ // pages next to each other, so landscape is currently always
+ // the better choice
+ if( aPageSize.Width < aPageSize.Height )
+ {
+ aPreferredPageSize.Width = aPageSize.Height;
+ aPreferredPageSize.Height = aPageSize.Width;
+ }
+ }
+ #endif
}
}
else
@@ -4106,6 +4123,8 @@ SwViewOptionAdjust_Impl::SwViewOptionAdjust_Impl( SwWrtShell& rSh, const SwViewO
SwViewOptionAdjust_Impl::~SwViewOptionAdjust_Impl()
{
m_rShell.ApplyViewOptions( m_aOldViewOptions );
+ //#i115062# invalidate meta character slot
+ m_rShell.GetView().GetViewFrame()->GetBindings().Invalidate( FN_VIEW_META_CHARS );
}
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index 84854a0f29..d6efd946a1 100644..100755
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -421,8 +421,8 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg
{
rSh.EnterStdMode();
rSh.GotoMark(pMark);
+ return sal_True;
}
- return sal_True;
}
// IndexMark, Index, TextField, Draw, Section, Footnote, Paragraph
//
diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx
index fd066e43a9..5dbe797c18 100644
--- a/sw/source/ui/utlui/navipi.cxx
+++ b/sw/source/ui/utlui/navipi.cxx
@@ -80,6 +80,8 @@
#include <utlui.hrc>
#endif
+#include "access.hrc"
+
#include <unomid.h>
@@ -807,7 +809,9 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
&aContentToolBox, SW_RES(NF_PAGE ));
pEdit->SetActionHdl(LINK(this, SwNavigationPI, EditAction));
pEdit->SetGetFocusHdl(LINK(this, SwNavigationPI, EditGetFocus));
- pEdit->SetModifyHdl(LINK(this, SwNavigationPI, PageEditModifyHdl));
+ pEdit->SetAccessibleName(pEdit->GetQuickHelpText());
+ pEdit->SetUpHdl(LINK(this, SwNavigationPI, PageEditModifyHdl));
+ pEdit->SetDownHdl(LINK(this, SwNavigationPI, PageEditModifyHdl));
bPageCtrlsVisible = sal_True;
@@ -933,6 +937,10 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
UsePage(0);
aPageChgTimer.SetTimeoutHdl(LINK(this, SwNavigationPI, ChangePageHdl));
aPageChgTimer.SetTimeout(PAGE_CHANGE_TIMEOUT);
+
+ aContentTree.SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_CONTENT));
+ aGlobalTree.SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL));
+ aDocListBox.SetAccessibleName(aStatusArr[3]);
}
/*------------------------------------------------------------------------
diff --git a/sw/source/ui/utlui/navipi.hrc b/sw/source/ui/utlui/navipi.hrc
index e8a6dc2e39..f7d1e1c329 100644
--- a/sw/source/ui/utlui/navipi.hrc
+++ b/sw/source/ui/utlui/navipi.hrc
@@ -88,4 +88,3 @@
#define ST_POSTIT_SHOW (ST_GLOBAL_CONTEXT_FIRST +35)
#define ST_POSTIT_HIDE (ST_GLOBAL_CONTEXT_FIRST +36)
#define ST_POSTIT_DELETE (ST_GLOBAL_CONTEXT_FIRST +37)
-
diff --git a/sw/source/ui/utlui/navipi.src b/sw/source/ui/utlui/navipi.src
index fd83ec9067..ff2522d9bd 100644
--- a/sw/source/ui/utlui/navipi.src
+++ b/sw/source/ui/utlui/navipi.src
@@ -29,6 +29,7 @@
#include "utlui.hrc"
#include "navipi.hrc"
#include "helpid.h"
+#include "access.hrc"
Window DLG_NAVIGATION_PI
{
@@ -534,3 +535,15 @@ ImageList IMG_NAVI_ENTRYBMPH
MaskColor = IMAGE_MASK_COLOR ;
NAVI_ENTRY_IDS
};
+
+//IAccessibility2 Implementation 2009-----
+String STR_ACCESS_TL_GLOBAL
+{
+ Text [ en-US ] = "Global View";
+};
+String STR_ACCESS_TL_CONTENT
+{
+ Text [ en-US ] = "Content View";
+};
+//-----IAccessibility2 Implementation 2009
+
diff --git a/sw/source/ui/utlui/poolfmt.src b/sw/source/ui/utlui/poolfmt.src
index e7bd9dd7d5..909296c8c2 100644
--- a/sw/source/ui/utlui/poolfmt.src
+++ b/sw/source/ui/utlui/poolfmt.src
@@ -738,7 +738,28 @@ String STR_POOLCHR_RUBYTEXT
{
Text [ en-US ] = "Rubies";
};
-
+//IAccessibility2 Implementation 2009-----
+String STR_COLUMN_VALUESET_ITEM0
+{
+ Text [ en-US ] = "1 column";
+};
+String STR_COLUMN_VALUESET_ITEM1
+{
+ Text [ en-US ] = "2 columns with equal size";
+};
+String STR_COLUMN_VALUESET_ITEM2
+{
+ Text [ en-US ] = "3 columns with equal size";
+};
+String STR_COLUMN_VALUESET_ITEM3
+{
+ Text [ en-US ] = "2 columns with different size (left > right)";
+};
+String STR_COLUMN_VALUESET_ITEM4
+{
+ Text [ en-US ] = "2 columns with different size (left < right)";
+};
+//-----IAccessibility2 Implementation 2009
String STR_POOLCHR_VERT_NUM
{
Text [ en-US ] = "Vertical Numbering Symbols";
diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx
index 7c774be049..29f58799cf 100644
--- a/sw/source/ui/utlui/swrenamexnameddlg.cxx
+++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx
@@ -72,9 +72,9 @@ SwRenameXNamedDlg::SwRenameXNamedDlg( Window* pWin,
uno::Reference< container::XNamed > & xN,
uno::Reference< container::XNameAccess > & xNA ) :
ModalDialog(pWin, SW_RES(DLG_RENAME_XNAMED)),
- aNewNameFT(this, SW_RES(FT_NEW_NAME)),
- aNewNameED(this, SW_RES(ED_NEW_NAME)),
aNameFL(this, SW_RES(FL_NAME)),
+ aNewNameFT(this, SW_RES(FT_NEW_NAME)),
+ aNewNameED(this, SW_RES(ED_NEW_NAME)),
aOk(this, SW_RES(PB_OK)),
aCancel(this, SW_RES(PB_CANCEL)),
aHelp(this, SW_RES(PB_HELP)),
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index d446d0a6b5..e85aa2e1c6 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -1307,6 +1307,9 @@ void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
// <--
aFmt.SetBulletChar( numfunc::GetBulletChar(static_cast<sal_uInt8>(nLevel)));
aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
+ // #i93908# clear suffix for bullet lists
+ aFmt.SetPrefix(::rtl::OUString());
+ aFmt.SetSuffix(::rtl::OUString());
}
aNumRule.Set(static_cast<sal_uInt16>(nLevel), aFmt);
}
@@ -1370,6 +1373,9 @@ void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
}
aFmt.SetBulletChar( numfunc::GetBulletChar(nLvl) );
aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
+ // #i93908# clear suffix for bullet lists
+ aFmt.SetPrefix(::rtl::OUString());
+ aFmt.SetSuffix(::rtl::OUString());
}
// --> OD 2009-08-26 #i95907#