From 8357393805955523d089aa81adf8a44022937917 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 4 Mar 2009 16:19:59 +0000 Subject: #91226#: mongolian text layout --- sw/source/core/crsr/crsrsh.cxx | 6 + sw/source/core/doc/docdraw.cxx | 34 +++- sw/source/core/draw/dflyobj.cxx | 42 ++++- sw/source/core/draw/dview.cxx | 17 +- sw/source/core/inc/frame.hxx | 47 +++++- sw/source/core/layout/calcmove.cxx | 28 +++- sw/source/core/layout/colfrm.cxx | 5 +- sw/source/core/layout/findfrm.cxx | 4 + sw/source/core/layout/fly.cxx | 13 ++ sw/source/core/layout/flycnt.cxx | 182 ++++++++++++++++++--- sw/source/core/layout/ftnfrm.cxx | 10 +- sw/source/core/layout/layact.cxx | 26 ++- sw/source/core/layout/newfrm.cxx | 58 +++++++ sw/source/core/layout/pagechg.cxx | 19 ++- sw/source/core/layout/paintfrm.cxx | 27 ++- sw/source/core/layout/ssfrm.cxx | 21 ++- sw/source/core/layout/tabfrm.cxx | 10 +- sw/source/core/layout/trvlfrm.cxx | 6 +- sw/source/core/layout/wsfrm.cxx | 82 ++++++++-- .../objectpositioning/anchoredobjectposition.cxx | 15 +- .../tocntntanchoredobjectposition.cxx | 10 +- .../tolayoutanchoredobjectposition.cxx | 14 +- sw/source/core/text/frmcrsr.cxx | 28 +++- sw/source/core/text/frmform.cxx | 21 ++- sw/source/core/text/frmpaint.cxx | 4 + sw/source/core/text/inftxt.cxx | 8 +- sw/source/core/text/itrtxt.cxx | 8 +- sw/source/core/text/txtfrm.cxx | 105 ++++++++++-- sw/source/core/text/txttab.cxx | 9 +- sw/source/core/text/widorp.cxx | 12 +- 30 files changed, 753 insertions(+), 118 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index bb6a870bc252..94c99ca742f5 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -462,6 +462,12 @@ void SwCrsrShell::UpdateMarkedListLevel() BOOL SwCrsrShell::UpDown( BOOL bUp, USHORT nCnt ) { + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + SwCntntFrm *pFrm = pCurCrsr->GetCntntNode()->GetFrm( + &pCurCrsr->GetPtPos(), pCurCrsr->GetPoint() ); + if(pFrm->IsVertical() && pFrm->IsVertLR()) + bUp=!bUp; + //End of SCMS SET_CURR_SHELL( this ); SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index 61d35ece9df6..cbcf67e7f1e8 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -150,11 +150,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, - " - vertical from left-to-right not supported." ); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //ASSERT( false, " - vertical from left-to-right not supported." ); + //End } break; case FRMDIR_VERT_TOP_RIGHT: @@ -183,7 +184,8 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt, } // use geometry of drawing object const SwRect aObjRect = _rSdrObj.GetSnapRect(); - if ( bVert ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + /*if ( bVert ) { nHoriRelPos = aObjRect.Top() - aAnchorPos.Y(); nVertRelPos = aAnchorPos.X() - aObjRect.Right(); @@ -194,10 +196,34 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt, nVertRelPos = aObjRect.Top() - aAnchorPos.Y(); } else + { + nHoriRelPos = aObjRect.Left() - aAnchorPos.X(); + nVertRelPos = aObjRect.Top() - aAnchorPos.Y(); + }*/ + + if ( bVert ) + { + 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 ) + { + nHoriRelPos = aAnchorPos.X() - aObjRect.Right(); + nVertRelPos = aObjRect.Top() - aAnchorPos.Y(); + } + else { 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/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index a9be7f621d93..5c6349a80a85 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -653,8 +653,20 @@ 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(); + } + //End of SCMS } else { @@ -765,11 +777,18 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef, const sal_Bool bRTL = pTmpFrm->IsRightToLeft(); - const Point aNewPos( bVertX || bRTL ? + //const Point aNewPos( bVertX || bRTL ? + // aOutRect.Right() + 1 : + // aOutRect.Left(), + // aOutRect.Top() ); + //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() ); + //End of SCMS Size aSz( aOutRect.Right() - aOutRect.Left() + 1, aOutRect.Bottom()- aOutRect.Top() + 1 ); if( aSz != GetFlyFrm()->Frm().SSize() ) @@ -830,10 +849,14 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef, } //Position kann auch veraendert sein! - const Point aOldPos( bVertX || bRTL ? + //const Point aOldPos( bVertX || bRTL ? + // GetFlyFrm()->Frm().TopRight() : + // GetFlyFrm()->Frm().Pos() ); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + const Point aOldPos( ( bVertX && !bVertL2RX ) || bRTL ? GetFlyFrm()->Frm().TopRight() : GetFlyFrm()->Frm().Pos() ); - + //End of SCMS if ( aNewPos != aOldPos ) { //Kann sich durch das ChgSize veraendert haben! @@ -841,7 +864,14 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef, { if( aOutRect.TopRight() != aNewPos ) { - SwTwips nDeltaX = aNewPos.X() - aOutRect.Right(); + //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(); + //End of SCMS 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 bd5e08a7af4a..edd1cd9be301 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -198,8 +198,13 @@ void SwDrawView::AddCustomHdl() } // add anchor handle: - aHdl.AddHdl( new SwSdrHdl( aPos, pAnch->IsVertical() || + //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() ) ); + //End of SCMS + } /************************************************************************* @@ -748,9 +753,13 @@ const SwFrm* SwDrawView::CalcAnchor() aMyRect = pObj->GetSnapRect(); } - const sal_Bool bTopRight = pAnch && ( pAnch->IsVertical() || - pAnch->IsRightToLeft() ); - + //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() ); + //End of SCMS const Point aMyPt = bTopRight ? aMyRect.TopRight() : aMyRect.TopLeft(); Point aPt; diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 02c8040b83c3..4c738eac8984 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -199,8 +199,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 ? \ @@ -222,6 +222,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)() ) @@ -376,6 +406,9 @@ protected: USHORT bInvalidVert: 1; USHORT bDerivedVert: 1; USHORT bVertical: 1; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + USHORT bVertLR: 1; + //End of SCMS USHORT nType: 4; //Who am I? BOOL bValidPos: 1; @@ -567,8 +600,14 @@ public: inline BOOL IsReverse() const { return bReverse; } inline void SetReverse( BOOL bNew ){ bReverse = bNew ? 1 : 0; } inline BOOL IsVertical() const; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + inline BOOL IsVertLR() const; + //End of SCMS inline BOOL GetVerticalFlag() const; inline void SetVertical( BOOL bNew ){ bVertical = bNew ? 1 : 0; } + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + inline void SetbVertLR( BOOL bNew ) { bVertLR = bNew ? 1 : 0; } + //End of SCMS inline void SetDerivedVert( BOOL bNew ){ bDerivedVert = bNew ? 1 : 0; } inline void SetInvalidVert( BOOL bNew) { bInvalidVert = bNew ? 1 : 0; } inline BOOL IsRightToLeft() const; @@ -954,6 +993,12 @@ BOOL SwFrm::IsVertical() const ((SwFrm*)this)->SetDirFlags( TRUE ); return bVertical != 0; } +//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin +inline BOOL SwFrm::IsVertLR() const +{ + return bVertLR != 0; +} +//End of SCMS BOOL SwFrm::GetVerticalFlag() const { return bVertical != 0; diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index b24ee7fd78b1..ab48252ffb66 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -582,7 +582,15 @@ void SwFrm::MakePos() if( bReverse ) aFrm.Pos().X() += pPrv->Frm().Width(); else - aFrm.Pos().X() -= aFrm.Width(); + //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(); + } + //End of SCMS } else aFrm.Pos().Y() += pPrv->Frm().Height(); @@ -650,14 +658,23 @@ void SwFrm::MakePos() aFrm.Pos().X() += GetUpper()->Prt().Width() - aFrm.Width(); } - else if( bVert && FRM_NOTE_VERT & nMyType && !bReverse ) + //else if( bVert && FRM_NOTE_VERT & nMyType && !bReverse ) + // aFrm.Pos().X() -= aFrm.Width() - GetUpper()->Prt().Width(); + //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(); + //End of SCMS } } else aFrm.Pos().X() = aFrm.Pos().Y() = 0; - if( IsBodyFrm() && bVert && !bReverse && GetUpper() ) + + //if( IsBodyFrm() && bVert && !bReverse && GetUpper() ) + // aFrm.Pos().X() += GetUpper()->Prt().Width() - aFrm.Width(); + //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(); + //End of SCMS bValidPos = TRUE; } } @@ -878,7 +895,10 @@ void SwLayoutFrm::MakeAll() //uebernimmt im DTor die Benachrichtigung const SwLayNotify aNotify( this ); BOOL bVert = IsVertical(); - SwRectFn fnRect = ( IsNeighbourFrm() == bVert )? fnRectHori : fnRectVert; + //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 ); + //End of SCMS SwBorderAttrAccess *pAccess = 0; const SwBorderAttrs*pAttrs = 0; diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx index 291affe8e9f8..d6e1b261f384 100644 --- a/sw/source/core/layout/colfrm.cxx +++ b/sw/source/core/layout/colfrm.cxx @@ -330,7 +330,10 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, BOOL bAdjustAttributes ) } const BOOL bVert = IsVertical(); - SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; + //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; + //End of SCMS //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 49d084691234..d80dec27f00c 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -1461,8 +1461,12 @@ void SwFrm::SetDirFlags( 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 = FALSE; + //End of SCMS } } else diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 808a5e4257e4..a053c669bb3f 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -156,9 +156,22 @@ 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; + bVertLR = 0; + } + //End of SCMS 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; + } + //End of SCMS 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 3d30aee66efb..909d7a8e01a4 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -662,12 +662,23 @@ 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(); + //End of SCMS //Dem Textflus folgen. if ( pUp->Frm().IsInside( rPt ) ) { // OD 26.09.2003 - point is inside environment of given content frame if( bVert ) - rRet.nMain = pCnt->Frm().Left() + pCnt->Frm().Width() -rPt.X(); + //rRet.nMain = pCnt->Frm().Left() + pCnt->Frm().Width() -rPt.X(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { + if ( bVertL2R ) + rRet.nMain = rPt.X() - pCnt->Frm().Left(); + else + rRet.nMain = pCnt->Frm().Left() + pCnt->Frm().Width() -rPt.X(); + } + //End of SCMS else rRet.nMain = rPt.Y() - pCnt->Frm().Top(); return pCnt; @@ -690,8 +701,17 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, { // OD 26.09.2003 - point is in left border of environment if( bVert ) - rRet.nMain = pCnt->Frm().Left() + pCnt->Frm().Width() - - rPt.X(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //rRet.nMain = pCnt->Frm().Left() + pCnt->Frm().Width() + // - rPt.X(); + { + if ( bVertL2R ) + rRet.nMain = rPt.X() - pCnt->Frm().Left(); + else + rRet.nMain = pCnt->Frm().Left() + pCnt->Frm().Width() + - rPt.X(); + } + //End of SCMS else rRet.nMain = rPt.Y() - pCnt->Frm().Top(); return pCnt; @@ -701,10 +721,14 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, } else { - rRet.nMain = bVert ? pCnt->Frm().Left() + pCnt->Frm().Width() - - (pUp->Frm().Left() + pUp->Prt().Left()) - : (pUp->Frm().Top() + pUp->Prt().Bottom()) - pCnt->Frm().Top(); - + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //rRet.nMain = bVert ? pCnt->Frm().Left() + pCnt->Frm().Width() - + // (pUp->Frm().Left() + pUp->Prt().Left()) + // : (pUp->Frm().Top() + pUp->Prt().Bottom()) - pCnt->Frm().Top(); + rRet.nMain = bVert ? ( bVertL2R ? (pUp->Frm().Left() + pUp->Prt().Right()) - pCnt->Frm().Left() + : pCnt->Frm().Left() + pCnt->Frm().Width() - (pUp->Frm().Left() + pUp->Prt().Left()) ) + : (pUp->Frm().Top() + pUp->Prt().Bottom()) - pCnt->Frm().Top(); + //End of SCMS const SwFrm *pPre = pCnt; const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, TRUE, pCnt ); SwTwips nFrmTop = 0; @@ -724,7 +748,13 @@ 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 + //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + if ( pLay->IsVertLR() ) + nFrmTop = pLay->Frm().Left(); + else + nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + //End of SCMS nPrtHeight = pLay->Prt().Width(); } else @@ -739,9 +769,24 @@ 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 + //nFrmTop = pSect->Frm().Left(); + //nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left() + // - pLay->Prt().Left(); + 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(); + } + //End of SCMS } else { @@ -757,8 +802,20 @@ 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 + //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + //nPrtHeight = pLay->Prt().Width(); + if ( pLay->IsVertLR() ) + { + nFrmTop = pLay->Frm().Left(); + nPrtHeight = pLay->Prt().Width(); + } + else + { + nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + nPrtHeight = pLay->Prt().Width(); + } + //End of SCMS } else { @@ -802,8 +859,20 @@ 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 + //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + //nPrtHeight = pLay->Prt().Width(); + if ( pLay->IsVertLR() ) + { + nFrmTop = pLay->Frm().Left(); + nPrtHeight = pLay->Prt().Width(); + } + else + { + nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + nPrtHeight = pLay->Prt().Width(); + } + //End of SCMS } else { @@ -816,9 +885,24 @@ 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 + //nFrmTop = pSect->Frm().Left(); + //nPrtHeight = pSect->Frm().Left() - + // pLay->Frm().Left() - pLay->Prt().Left(); + 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(); + } + //End of SCMS } else { @@ -834,8 +918,20 @@ 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 + //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + //nPrtHeight = pLay->Prt().Width(); + if ( pLay->IsVertLR() ) + { + nFrmTop = pLay->Frm().Left(); + nPrtHeight = pLay->Prt().Width(); + } + else + { + nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + nPrtHeight = pLay->Prt().Width(); + } + //End of SCMS } else { @@ -850,8 +946,12 @@ 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() ? ( nFrmTop - rPt.X() ) + // : ( rPt.Y() - nFrmTop ); + SwTwips nDiff = pLay->IsVertical() ? ( pLay->IsVertLR() ? ( rPt.X() - nFrmTop ) : ( nFrmTop - rPt.X() ) ) : ( rPt.Y() - nFrmTop ); + //End of SCMS if( bSct || pSect ) rRet.nSub += nDiff; else @@ -1206,9 +1306,10 @@ 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()->IsRightToLeft() ) + if( ( GetAnchorFrm()->IsVertical() && !GetAnchorFrm()->IsVertLR() ) || GetAnchorFrm()->IsRightToLeft() ) + //End of SCMS aNew.X() += Frm().Width(); SwCntntFrm *pCnt = (SwCntntFrm*)::FindAnchor( GetAnchorFrm(), aNew ); if( pCnt->IsProtected() ) @@ -1216,6 +1317,9 @@ 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(); + //End of SCMS const sal_Bool bRTL = pCnt->IsRightToLeft(); if( ( !bVert != !GetAnchorFrm()->IsVertical() ) || @@ -1246,7 +1350,15 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) if ( pCnt->Frm().IsInside( aNew ) ) { if( bVert ) - nY = pCnt->Frm().Left()+pCnt->Frm().Width()-rNew.X()-Frm().Width(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nY = pCnt->Frm().Left()+pCnt->Frm().Width()-rNew.X()-Frm().Width(); + { + if ( bVertL2R ) + nY = rNew.X() - pCnt->Frm().Left(); + else + nY = pCnt->Frm().Left()+pCnt->Frm().Width()-rNew.X()-Frm().Width(); + } + //End of SCMS else nY = rNew.Y() - pCnt->Frm().Top(); } @@ -1276,8 +1388,17 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) do { const SwFrm *pUp = pFollow->GetUpper(); if( pUp->IsVertical() ) - nDiff += pFollow->Frm().Left() + pFollow->Frm().Width() + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nDiff += pFollow->Frm().Left() + pFollow->Frm().Width() + // - pUp->Frm().Left() - pUp->Prt().Left(); + { + if ( pUp->IsVertLR() ) + nDiff += pUp->Prt().Width() - pFollow->GetRelPos().X(); + else + nDiff += pFollow->Frm().Left() + pFollow->Frm().Width() - pUp->Frm().Left() - pUp->Prt().Left(); + } + //End of SCMS else nDiff += pUp->Prt().Height() - pFollow->GetRelPos().Y(); pFollow = pFollow->GetFollow(); @@ -1292,7 +1413,15 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) if ( nY == LONG_MAX ) { if( bVert ) - nY = pCnt->Frm().Left() + pCnt->Frm().Width() - rNew.X(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nY = pCnt->Frm().Left() + pCnt->Frm().Width() - rNew.X(); + { + if ( bVertL2R ) + nY = rNew.X() - pCnt->Frm().Left(); + else + nY = pCnt->Frm().Left() + pCnt->Frm().Width() - rNew.X(); + } + //End of SCMS else nY = rNew.Y() - pCnt->Frm().Top(); } @@ -1382,6 +1511,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()->EndUndo( UNDO_END, NULL ); diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index b9663b1418d6..0184385133f2 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -424,7 +424,10 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, 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() && !IsReverse() ) + if( IsVertical() && !IsVertLR() && !IsReverse() ) + //End of SCMS Frm().Pos().X() -= nDist; } long nGrow = nDist - nAvail, @@ -466,8 +469,11 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, 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() && !IsReverse() ) + if( IsVertical() && !IsVertLR() && !IsReverse() ) Frm().Pos().X() += nDist; + //End of SCMS } //Nachfolger braucht nicht invalidiert werden, denn wir wachsen diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 9cbf7ace6ea7..72b0c6cc2d70 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1809,14 +1809,17 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) pFly->Calc(); bChanged = aOldRect != pFly->Frm(); - if ( IsPaint() && (pFly->IsCompletePaint() || bChanged) && - pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + // if ( IsPaint() && (pFly->IsCompletePaint() || bChanged) && + // pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) + if ( IsPaint() && bAddRect && pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) pImp->GetShell()->AddPaintRect( pFly->Frm() ); - if ( bChanged ) + //if ( bChanged ) pFly->Invalidate(); - else - pFly->Validate(); + //else + // pFly->Validate(); + //End of SCMS bAddRect = false; pFly->ResetCompletePaint(); } @@ -2036,7 +2039,11 @@ void MA_FASTCALL lcl_AddScrollRectTab( SwTabFrm *pTab, SwLayoutFrm *pRow, //Frm nicht selbst steht, so ist nichts mit Scrollen. SwRect aRect( rRect ); // OD 04.11.2002 #104100# - not needed. - if( pTab->IsVertical() ) + + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( pTab->IsVertical() ) + if( pTab->IsVertical() && !pTab->IsVertLR() ) + //End of SCMS aRect.Pos().X() -= nOfst; else aRect.Pos().Y() += nOfst; @@ -2506,9 +2513,14 @@ void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt, aNewRect.SSize() == aOldRect.SSize() ) { - _AddScrollRect( pCntnt, pPage, (*fnRect->fnYDiff)( + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + if ( !bVertL2R ) + _AddScrollRect( pCntnt, pPage, (*fnRect->fnYDiff)( (pCntnt->Frm().*fnRect->fnGetTop)(), (aOldRect.*fnRect->fnGetTop)() ), nOldBottom ); + else + PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); + //End of SCMS } else PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index b6188caf8dd2..843e56ea606f 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -293,9 +293,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 79d267c1f934..c596019946f0 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -136,7 +136,10 @@ 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() && !IsReverse() && nWidth != Frm().Width() ) + if( IsVertical() && !IsVertLR() && !IsReverse() && nWidth != Frm().Width() ) + //End of SCMS Frm().Pos().X() += Frm().Width() - nWidth; Frm().Width( nWidth ); } @@ -347,9 +350,21 @@ void SwPageFrm::CheckDirection( 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; + } + //End of SCMS + /* 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 7f681df6127e..213f3db05f9f 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1227,7 +1227,10 @@ 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() ? fnRectVert : fnRectHori; + SwRectFn fnRect = pFrm->IsVertical() ? ( pFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; + //End of SCMS const SvxBoxItem &rBox = rAttrs.GetBox(); const BOOL bTop = 0 != (pFrm->*fnRect->fnGetTopMargin)(); if ( bTop ) @@ -3182,8 +3185,20 @@ 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 + //fnCheck = &SwRect::GetRightDistance; + //nLimit = rRect.Left(); + if ( rFrm.IsVertLR() ) + { + fnCheck = &SwRect::GetLeftDistance; + nLimit = rRect.Right(); + } + else + { + fnCheck = &SwRect::GetRightDistance; + nLimit = rRect.Left(); + } + //End of SCMS } } @@ -4880,8 +4895,10 @@ void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFmtCol &rFmtCol, const SwFrm *pCol = Lower(); if ( !pCol || !pCol->IsColumnFrm() ) return; - - SwRectFn fnRect = pCol->IsVertical() ? fnRectVert : fnRectHori; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //SwRectFn fnRect = pCol->IsVertical() ? fnRectVert : fnRectHori; + SwRectFn fnRect = pCol->IsVertical() ? ( pCol->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; + //End of SCMS SwRect aLineRect = Prt(); aLineRect += Frm().Pos(); diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index 520a5945b9d9..8a9717adad50 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -233,7 +233,11 @@ void SwFrm::CheckDirChange() SetInvalidVert( TRUE ); SetInvalidR2L( TRUE ); BOOL bChg = bOldR2L != IsRightToLeft(); - if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + BOOL bOldVertL2R = IsVertLR(); + //if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev ) + if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev || bOldVertL2R != IsVertLR() ) + //End of SCMS { InvalidateAll(); if( IsLayoutFrm() ) @@ -326,8 +330,11 @@ 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() || IsRightToLeft() ) + if ( ( IsVertical() && !IsVertLR() ) || IsRightToLeft() ) aAnchor.X() += Frm().Width(); + //End of SCMS if ( IsTxtFrm() ) { @@ -601,7 +608,10 @@ const SwRect SwFrm::PaintArea() const // Cell frames may not leave their upper: SwRect aRect = IsRowFrm() ? GetUpper()->Frm() : Frm(); const BOOL bVert = IsVertical(); - SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; + SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; + //End of SCMS long nRight = (aRect.*fnRect->fnGetRight)(); long nLeft = (aRect.*fnRect->fnGetLeft)(); const SwFrm* pTmp = this; @@ -700,7 +710,10 @@ const SwRect SwFrm::PaintArea() const const SwRect SwFrm::UnionFrm( BOOL bBorder ) const { BOOL bVert = IsVertical(); - SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; + SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; + //End of SCMS 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 be31859c036d..5f0483ad06f0 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -4906,7 +4906,10 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, 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() && !bRev ) + if( IsVertical() && !IsVertLR() && !bRev ) + //End of SCMS Frm().Pos().X() += nReal; } @@ -4920,7 +4923,10 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, 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() && !bRev ) + if( IsVertical() && !IsVertLR() && !bRev ) + //End of SCMS Frm().Pos().X() -= nReal; } nReal = nTmp; diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 145ffa111be0..85a6eea5b82d 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -2547,8 +2547,12 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, 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 : fnRectVert ) : + // ( bRev ? fnRectB2T : fnRectHori ); + fnRect = bVert ? ( bRev ? fnRectVL2R : ( pEndFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) ) : ( bRev ? fnRectB2T : fnRectHori ); + //End of SCMS 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 5377a5eec18b..2061378eb0b7 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -108,7 +108,10 @@ 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 = 0; + bDerivedR2L = bDerivedVert = bRightToLeft = bVertical = bReverse = bVertLR = 0; + //End of SCMS bValidPos = bValidPrtArea = bValidSize = bValidLineNum = bRetouche = bFixSize = bColLocked = FALSE; bCompletePaint = bInfInvalid = TRUE; @@ -138,9 +141,21 @@ void SwFrm::CheckDir( UINT16 nDir, BOOL bVert, BOOL bOnlyBiDi, BOOL bBrowse ) 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; + } + //End of SCMS } else { @@ -1156,9 +1171,15 @@ 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 : fnRectVert; + fnRect = GetUpper()->IsVertical() ? fnRectHori : ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert ); + //End of SCMS else - fnRect = GetUpper()->IsVertical() ? fnRectVert : fnRectHori; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //fnRect = GetUpper()->IsVertical() ? fnRectVert : fnRectHori; + fnRect = GetUpper()->IsVertical() ? ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; + //End of SCMS if( (Frm().*fnRect->fnGetWidth)() != (pParent->Prt().*fnRect->fnGetWidth)()) _InvalidateSize(); @@ -1643,7 +1664,10 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, 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 && !bRev ) + if( bVert && !bVertL2R && !bRev ) + //End of SCMS pFrm->GetNext()->Frm().Pos().X() += nAdd; pFrm->GetNext()->InvalidatePrt(); if ( pFrm->GetNext()->GetNext() ) @@ -1657,7 +1681,10 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, 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 && !bRev ) + if( bVert && !bVertL2R && !bRev ) + //End of SCMS pFrm->Frm().Pos().X() += nReal; pFrm->InvalidatePrt(); if ( pFrm->GetNext() ) @@ -1918,7 +1945,10 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, BOOL bTst, 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() && !IsReverse() ) + if( IsVertical() && !IsVertLR() && !IsReverse() ) + //End of SCMS Frm().Pos().X() -= nDist; if ( GetNext() ) { @@ -1950,7 +1980,10 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, BOOL bTst, 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() && !IsReverse() ) + if( IsVertical()&& !IsVertLR() && !IsReverse() ) + //End of SCMS Frm().Pos().X() -= nDist; if ( nOld && IsInTab() ) { @@ -2046,7 +2079,10 @@ SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, 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() ) + if( IsVertical() && !IsVertLR() ) + //End of SCMS Frm().Pos().X() += nDist; nDist = nRstHeight; if ( IsInTab() ) @@ -2464,7 +2500,10 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, 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 ) + if( bChgPos && !IsVertLR() ) + //End of SCMS Frm().Pos().X() -= nDist; bMoveAccFrm = sal_True; } @@ -2545,7 +2584,10 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) ( !IsCellFrm() || static_cast(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 ) + if( bChgPos && !IsVertLR() ) + //End of SCMS Frm().Pos().X() = nFrmPos - nReal; bMoveAccFrm = sal_True; } @@ -2636,7 +2678,10 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, 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 ) + if( bChgPos && !IsVertLR() ) + //End of SCMS Frm().Pos().X() += nReal; bMoveAccFrm = sal_True; } @@ -2657,7 +2702,10 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, 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 ) + if( bChgPos && !IsVertLR() ) + //End of SCMS Frm().Pos().X() += nRealDist - nReal; ASSERT( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" ); } @@ -2670,7 +2718,10 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, 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 ) + if( bChgPos && !IsVertLR() ) + //End of SCMS Frm().Pos().X() += nTmp - nReal; ASSERT( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" ); nReal = nTmp; @@ -3190,7 +3241,10 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs ) const USHORT nRight = (USHORT)((SwBorderAttrs*)pAttrs)->CalcRight( this ); const USHORT nLower = pAttrs->CalcBottom(); 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 ? fnRectVert : fnRectHori; + SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; + //End of SCMS if ( !bValidPrtArea ) { bValidPrtArea = TRUE; diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index daae99bc4925..660491281410 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -378,7 +378,11 @@ 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 ? _rLRSpacing.GetRight() : _rULSpacing.GetUpper(); + nRelPosY += bVert ? ( bVertL2R ? + _rLRSpacing.GetLeft() : _rLRSpacing.GetRight() ) : _rULSpacing.GetUpper(); + //End of SCMS } break; case text::VertOrientation::CENTER: @@ -388,8 +392,13 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos( break; case text::VertOrientation::BOTTOM: { - nRelPosY += nAlignAreaHeight - - ( nObjHeight + ( bVert ? _rLRSpacing.GetLeft() : _rULSpacing.GetLower() ) ); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nRelPosY += nAlignAreaHeight - + // ( nObjHeight + ( bVert ? _rLRSpacing.GetLeft() : _rULSpacing.GetLower() ) ); + nRelPosY += nAlignAreaHeight - + (nObjHeight + ( bVert ? ( bVertL2R ? + _rLRSpacing.GetRight() : _rLRSpacing.GetLeft() ) : _rULSpacing.GetLower())); + //End of SCMS } break; default: diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index 800235bf95e5..0dd9254e35a0 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -274,7 +274,10 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() // determine relative vertical position SwTwips nRelPosY = nAlignAreaOffset; SwTwips nObjHeight = (aObjBoundRect.*fnRect->fnGetHeight)(); - SwTwips nUpperSpace = bVert ? rLR.GetRight() : rUL.GetUpper(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //SwTwips nUpperSpace = bVert ? rLR.GetRight() : rUL.GetUpper(); + SwTwips nUpperSpace = bVert ? ( bVertL2R ? rLR.GetLeft() : rLR.GetRight() ) : rUL.GetUpper(); + //End of SCMS SwTwips nLowerSpace = bVert ? rLR.GetLeft() : rUL.GetLower(); switch ( aVert.GetVertOrient() ) { @@ -284,7 +287,10 @@ 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 ) + if ( bVert && !bVertL2R) + //End of SCMS nRelPosY += nObjHeight; break; } diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx index 55749f144377..0091e44ab0c7 100644 --- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx @@ -123,7 +123,13 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() if( bVert ) { ASSERT( !bRev, " - reverse layout set." ); - aRelPos.X() = -nRelPosY - aObjBoundRect.Width(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //aRelPos.X() = -nRelPosY - aObjBoundRect.Width(); + if ( bVertL2R ) + aRelPos.X() = nRelPosY; + else + aRelPos.X() = -nRelPosY - aObjBoundRect.Width(); + //End of SCMS maOffsetToFrmAnchorPos.X() = nVertOffsetToFrmAnchorPos; } else @@ -207,8 +213,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 + //if ( bVert ) + if( bVert && !bVertL2R ) + //End of SCMS { + aRelPos.Y() = nRelPosX; maOffsetToFrmAnchorPos.Y() = nOffset; } diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index e4844762f39d..760b1c4e1a69 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -227,10 +227,14 @@ sal_Bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, 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 ) : + // Min( nFrmMaxY, nUpperMaxY ); SwTwips nMaxY = bVert ? - Max( nFrmMaxY, nUpperMaxY ) : + ( bVertL2R ? Min( nFrmMaxY, nUpperMaxY ) : Max( nFrmMaxY, nUpperMaxY ) ) : Min( nFrmMaxY, nUpperMaxY ); - + //End of SCMS sal_Bool bRet = sal_False; if ( pFrm->IsEmpty() || ! (pFrm->Prt().*fnRect->fnGetHeight)() ) @@ -245,9 +249,12 @@ 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 ) + // aPnt1.X() = nMaxY; + if ( aPnt1.X() < nMaxY && !bVertL2R ) aPnt1.X() = nMaxY; + //End of SCMS aPnt2.X() = aPnt1.X() + pFrm->Prt().Width(); aPnt2.Y() = aPnt1.Y(); if( aPnt2.X() < nMaxY ) @@ -399,18 +406,25 @@ 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 ) : + // Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); SwTwips nMaxY = bVert ? - Max( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) : + ( bVertL2R ? Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) : Max( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) ) : Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); - + //End of SCMS if ( pFrm->IsEmpty() || ! (pFrm->Prt().*fnRect->fnGetHeight)() ) { Point aPnt1 = pFrm->Frm().Pos() + pFrm->Prt().Pos(); Point aPnt2; if ( bVert ) { - if ( aPnt1.X() < nMaxY ) + //if ( aPnt1.X() < nMaxY ) + // aPnt1.X() = nMaxY; + if ( aPnt1.X() < nMaxY && !bVertL2R ) aPnt1.X() = nMaxY; + //End of SCMS 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 8a39847705e2..3a30e86b2e11 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -485,9 +485,20 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, sal_Bool bHasToFit ) if ( IsVertical() ) { ASSERT( ! IsSwapped(),"Swapped frame while calculating nRstHeight" ); + + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nRstHeight = Frm().Left() + Frm().Width() - + // ( GetUpper()->Frm().Left() + GetUpper()->Prt().Left() ); + 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() ); - } + ( GetUpper()->Frm().Left() + GetUpper()->Prt().Left() ); + //End of SCMS + } else nRstHeight = GetUpper()->Frm().Top() + GetUpper()->Prt().Top() @@ -1140,7 +1151,11 @@ 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() && nChg ) + if ( IsVertical() && !IsVertLR() && nChg ) + //End of SCMS { 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 5a88599c6e35..830c3d4a6484 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -456,6 +456,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 ( IsVertical() ) + pRepaint->Chg( ( GetUpper()->Frm() ).Pos() + ( GetUpper()->Prt() ).Pos(), ( GetUpper()->Prt() ).SSize() ); + //End of SCMS if( pRepaint->GetOfst() ) pRepaint->Left( pRepaint->GetOfst() ); diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 2e10a40a1b66..54922dad66a6 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -815,7 +815,13 @@ 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 + //aPoint.B() = Y() - rPor.GetAscent(); + if ( GetTxtFrm()->IsVertLR() ) + aPoint.B() = Y() - rPor.Height() + rPor.GetAscent(); + else + aPoint.B() = Y() - rPor.GetAscent(); + //End of SCMS } // 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 9b14d52256e7..65433ba661a3 100644 --- a/sw/source/core/text/itrtxt.cxx +++ b/sw/source/core/text/itrtxt.cxx @@ -370,7 +370,13 @@ USHORT 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 + //nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent; + if( GetInfo().GetTxtFrm()->IsVertLR() ) + nOfst += rLine.Height() - ( rLine.Height() - nPorHeight ) / 2 - nPorAscent; + else + nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent; + //End of SCMS break; } case SvxParaVertAlignItem::BASELINE : diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 6308aba3587e..a8abfb43eb14 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -108,13 +108,24 @@ 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 + //End of SCMS + 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 + //End of SCMS + Prt().Pos().X() = Frm().Height() - ( nPrtOfstY + Prt().Height() ); } const long nFrmWidth = Frm().Width(); @@ -132,16 +143,43 @@ 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 + + //const long nOfstX = rRect.Left() - Frm().Left(); + //const long nOfstY = rRect.Top() + rRect.Height() - Frm().Top(); + 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(); + } + //End of SCMS + const long nWidth = rRect.Width(); const long nHeight = rRect.Height(); - if ( bIsSwapped ) - rRect.Left( Frm().Left() + Frm().Height() - nOfstY ); - else + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if ( bIsSwapped ) + // rRect.Left( Frm().Left() + Frm().Height() - nOfstY ); + //else // frame is rotated - rRect.Left( Frm().Left() + Frm().Width() - nOfstY ); + // rRect.Left( Frm().Left() + Frm().Width() - nOfstY ); + if ( IsVertLR() ) + rRect.Left(Frm().Left() + nOfstY); + else + { + if ( bIsSwapped ) + rRect.Left( Frm().Left() + Frm().Height() - nOfstY ); + else + rRect.Left( Frm().Left() + Frm().Width() - nOfstY ); + } + // End of SCMS rRect.Top( Frm().Top() + nOfstX ); rRect.Width( nHeight ); @@ -155,12 +193,23 @@ 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 ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + /* if ( bIsSwapped ) rPoint.X() = Frm().Left() + Frm().Height() - nOfstY; else // calc rotated coords rPoint.X() = Frm().Left() + Frm().Width() - nOfstY; + */ + if ( IsVertLR() ) + rPoint.X() = Frm().Left() + nOfstY; + else + { + if ( bIsSwapped ) + rPoint.X() = Frm().Left() + Frm().Height() - nOfstY; + else + rPoint.X() = Frm().Left() + Frm().Width() - nOfstY; + } + //End of SCMS rPoint.Y() = Frm().Top() + nOfstX; } @@ -181,11 +230,23 @@ void SwTxtFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const long nOfstX; // calc offset inside frame - if ( bIsSwapped ) + + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + /*if ( bIsSwapped ) nOfstX = Frm().Left() + Frm().Height() - ( rRect.Left() + rRect.Width() ); else nOfstX = Frm().Left() + Frm().Width() - ( rRect.Left() + rRect.Width() ); - + */ + if ( IsVertLR() ) + nOfstX = rRect.Left() - Frm().Left(); + else + { + if ( bIsSwapped ) + nOfstX = Frm().Left() + Frm().Height() - ( rRect.Left() + rRect.Width() ); + else + nOfstX = Frm().Left() + Frm().Width() - ( rRect.Left() + rRect.Width() ); + } + //End of SCMS const long nOfstY = rRect.Top() - Frm().Top(); const long nWidth = rRect.Height(); const long nHeight = rRect.Width(); @@ -204,11 +265,23 @@ void SwTxtFrm::SwitchVerticalToHorizontal( Point& rPoint ) const long nOfstX; // calc offset inside frame - if ( bIsSwapped ) + + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + /*if ( bIsSwapped ) nOfstX = Frm().Left() + Frm().Height() - rPoint.X(); else nOfstX = Frm().Left() + Frm().Width() - rPoint.X(); - + */ + if ( IsVertLR() ) + nOfstX = rPoint.X() - Frm().Left(); + else + { + if ( bIsSwapped ) + nOfstX = Frm().Left() + Frm().Height() - rPoint.X(); + else + nOfstX = Frm().Left() + Frm().Width() - rPoint.X(); + } + //End of SCMS const long nOfstY = rPoint.Y() - Frm().Top(); // calc rotated coords @@ -2533,6 +2606,10 @@ void SwTxtFrm::ChgThisLines() else //Paragraphs which are not counted should not manipulate the AllLines. nThisLines = nNew; } + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //Ugly. How can we hack if better? + InvalidatePage(); + //End of SCMS } diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index f43b2777486f..3a31a5cb0242 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -143,7 +143,14 @@ 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 = Right(); + SwTwips nMyRight; + if ( pFrm->IsVertLR() ) + nMyRight = Left(); + else + nMyRight = Right(); + //End of SCMS if ( pFrm->IsVertical() ) { diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx index 3b09e80e5d29..3fc333afd6c9 100644 --- a/sw/source/core/text/widorp.cxx +++ b/sw/source/core/text/widorp.cxx @@ -225,9 +225,19 @@ 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 + //nRstHeight += nOrigin - pFrm->SwitchHorizontalToVertical( rLine.Y() ); + { + if ( pFrm->IsVertLR() ) + nRstHeight = (*fnRect->fnYDiff)( pFrm->SwitchHorizontalToVertical( rLine.Y() ) , nOrigin ); + else + nRstHeight += nOrigin - pFrm->SwitchHorizontalToVertical( rLine.Y() ); + } + //End of SCMS else nRstHeight += rLine.Y() - nOrigin; } -- cgit v1.2.3 From 69ce11cb10411709fd215f994186dbf90fd3db0a Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 17 Jun 2009 14:19:43 +0000 Subject: remove code that was commented out in the patch --- sw/source/core/doc/docdraw.cxx | 16 --- sw/source/core/draw/dflyobj.cxx | 13 --- sw/source/core/draw/dview.cxx | 7 -- sw/source/core/layout/calcmove.cxx | 19 +--- sw/source/core/layout/colfrm.cxx | 2 - sw/source/core/layout/findfrm.cxx | 2 +- sw/source/core/layout/fly.cxx | 9 +- sw/source/core/layout/flycnt.cxx | 109 +++++++-------------- sw/source/core/layout/ftnfrm.cxx | 4 - sw/source/core/layout/layact.cxx | 7 +- sw/source/core/layout/pagechg.cxx | 18 ++-- sw/source/core/layout/paintfrm.cxx | 17 ++-- sw/source/core/layout/ssfrm.cxx | 10 +- sw/source/core/layout/tabfrm.cxx | 4 - sw/source/core/layout/trvlfrm.cxx | 3 - sw/source/core/layout/wsfrm.cxx | 42 ++------ .../objectpositioning/anchoredobjectposition.cxx | 5 - .../tocntntanchoredobjectposition.cxx | 4 - .../tolayoutanchoredobjectposition.cxx | 10 +- sw/source/core/text/frmcrsr.cxx | 17 +--- sw/source/core/text/frmform.cxx | 9 +- sw/source/core/text/frmpaint.cxx | 4 +- sw/source/core/text/inftxt.cxx | 2 - sw/source/core/text/itrtxt.cxx | 2 - sw/source/core/text/txtfrm.cxx | 37 +------ sw/source/core/text/txttab.cxx | 2 - sw/source/core/text/widorp.cxx | 16 ++- 27 files changed, 87 insertions(+), 303 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index 0d832d9286d4..9db434bdf39a 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -184,22 +184,6 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt, } // use geometry of drawing object const SwRect aObjRect = _rSdrObj.GetSnapRect(); - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - /*if ( bVert ) - { - nHoriRelPos = aObjRect.Top() - aAnchorPos.Y(); - nVertRelPos = aAnchorPos.X() - aObjRect.Right(); - } - else if ( bR2L ) - { - nHoriRelPos = aAnchorPos.X() - aObjRect.Right(); - nVertRelPos = aObjRect.Top() - aAnchorPos.Y(); - } - else - { - nHoriRelPos = aObjRect.Left() - aAnchorPos.X(); - nVertRelPos = aObjRect.Top() - aAnchorPos.Y(); - }*/ if ( bVert ) { diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index 4b85d23f3386..9528114790e0 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -667,7 +667,6 @@ void __EXPORT SwVirtFlyDrawObj::NbcMove(const Size& rSiz) lXDiff -= rVert.GetPos(); lYDiff += rHori.GetPos(); } - //End of SCMS } else { @@ -778,10 +777,6 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef, const sal_Bool bRTL = pTmpFrm->IsRightToLeft(); - //const Point aNewPos( bVertX || bRTL ? - // aOutRect.Right() + 1 : - // aOutRect.Left(), - // aOutRect.Top() ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin const bool bVertL2RX = pTmpFrm->IsVertLR(); const Point aNewPos( ( bVertX && !bVertL2RX ) || bRTL ? @@ -789,7 +784,6 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef, aOutRect.Left(), aOutRect.Top() ); - //End of SCMS Size aSz( aOutRect.Right() - aOutRect.Left() + 1, aOutRect.Bottom()- aOutRect.Top() + 1 ); if( aSz != GetFlyFrm()->Frm().SSize() ) @@ -850,14 +844,9 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef, } //Position kann auch veraendert sein! - //const Point aOldPos( bVertX || bRTL ? - // GetFlyFrm()->Frm().TopRight() : - // GetFlyFrm()->Frm().Pos() ); - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin const Point aOldPos( ( bVertX && !bVertL2RX ) || bRTL ? GetFlyFrm()->Frm().TopRight() : GetFlyFrm()->Frm().Pos() ); - //End of SCMS if ( aNewPos != aOldPos ) { //Kann sich durch das ChgSize veraendert haben! @@ -865,14 +854,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(); - //End of SCMS 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 94629cb542b5..419cb2d9a94c 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -205,13 +205,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() ) ); - //End of SCMS - } /************************************************************************* @@ -760,13 +756,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() ); - //End of SCMS const Point aMyPt = bTopRight ? aMyRect.TopRight() : aMyRect.TopLeft(); Point aPt; diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index ab48252ffb66..6867ff155c67 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -582,15 +582,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(); + aFrm.Pos().X() += pPrv->Frm().Width(); else - aFrm.Pos().X() -= aFrm.Width(); - } - //End of SCMS + aFrm.Pos().X() -= aFrm.Width(); + } } else aFrm.Pos().Y() += pPrv->Frm().Height(); @@ -658,23 +656,16 @@ void SwFrm::MakePos() aFrm.Pos().X() += GetUpper()->Prt().Width() - aFrm.Width(); } - //else if( bVert && FRM_NOTE_VERT & nMyType && !bReverse ) - // aFrm.Pos().X() -= aFrm.Width() - GetUpper()->Prt().Width(); //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(); - //End of SCMS } } else aFrm.Pos().X() = aFrm.Pos().Y() = 0; - - //if( IsBodyFrm() && bVert && !bReverse && GetUpper() ) - // aFrm.Pos().X() += GetUpper()->Prt().Width() - aFrm.Width(); //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(); - //End of SCMS bValidPos = TRUE; } } @@ -895,10 +886,8 @@ void SwLayoutFrm::MakeAll() //uebernimmt im DTor die Benachrichtigung const SwLayNotify aNotify( this ); 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 ); - //End of SCMS SwBorderAttrAccess *pAccess = 0; const SwBorderAttrs*pAttrs = 0; diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx index d6e1b261f384..19d6ea92d5bc 100644 --- a/sw/source/core/layout/colfrm.cxx +++ b/sw/source/core/layout/colfrm.cxx @@ -330,10 +330,8 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, BOOL bAdjustAttributes ) } const 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; - //End of SCMS //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 d80dec27f00c..0383ce677a70 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -1466,7 +1466,7 @@ void SwFrm::SetDirFlags( BOOL bVert ) //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin if ( !pAsk->bInvalidVert ) bInvalidVert = FALSE; - //End of SCMS + } } else diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index a053c669bb3f..0bef6d1032b8 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -156,12 +156,11 @@ 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 - { + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { bVertical = 0; bVertLR = 0; - } - //End of SCMS + } else //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin { @@ -171,7 +170,7 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) : else bVertLR = 0; } - //End of SCMS + 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 e0b85c13c2ab..c552ca61f40d 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -664,7 +664,7 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, const bool bVert = pUp->IsVertical(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin const bool bVertL2R = pUp->IsVertLR(); - //End of SCMS + //Dem Textflus folgen. // --> OD 2009-01-12 #i70582# // --> OD 2009-03-05 - adopted for Support for Classical Mongolian Script @@ -684,15 +684,13 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, // OD 26.09.2003 - point is inside environment of given content frame // --> OD 2009-01-12 #i70582# if( bVert ) - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //rRet.nMain = nTopForObjPos - rPt.X(); - { - if ( bVertL2R ) - rRet.nMain = rPt.X() - nTopForObjPos; - else - rRet.nMain = nTopForObjPos - rPt.X(); - } - //End of SCMS + //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; // <-- @@ -717,15 +715,13 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, // OD 26.09.2003 - point is in left border of environment // --> OD 2009-01-12 #i70582# if( bVert ) - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //rRet.nMain = nTopForObjPos - rPt.X(); - { - if ( bVertL2R ) - rRet.nMain = rPt.X() - nTopForObjPos; - else - rRet.nMain = nTopForObjPos - rPt.X(); - } - //End of SCMS + //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; // <-- @@ -738,16 +734,11 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, { //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; - // <-- rRet.nMain = bVert ? ( bVertL2R ? ( (pUp->Frm().Left() + pUp->Prt().Right()) - nTopForObjPos ) : ( nTopForObjPos - (pUp->Frm().Left() + pUp->Prt().Left() ) ) ) : ( (pUp->Frm().Top() + pUp->Prt().Bottom()) - nTopForObjPos ); - //End of SCMS const SwFrm *pPre = pCnt; const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, TRUE, pCnt ); @@ -769,12 +760,10 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, if( pLay->IsVertical() ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); if ( pLay->IsVertLR() ) nFrmTop = pLay->Frm().Left(); else nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); - //End of SCMS nPrtHeight = pLay->Prt().Width(); } else @@ -790,9 +779,6 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, if( pLay->IsVertical() ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nFrmTop = pSect->Frm().Left(); - //nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left() - // - pLay->Prt().Left(); if ( pLay->IsVertLR() ) { nFrmTop = pSect->Frm().Right(); @@ -806,7 +792,6 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left() - pLay->Prt().Left(); } - //End of SCMS } else { @@ -823,8 +808,6 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, if( pLay->IsVertical() ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); - //nPrtHeight = pLay->Prt().Width(); if ( pLay->IsVertLR() ) { nFrmTop = pLay->Frm().Left(); @@ -835,7 +818,6 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); nPrtHeight = pLay->Prt().Width(); } - //End of SCMS } else { @@ -880,19 +862,16 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, if( pLay->IsVertical() ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); - //nPrtHeight = pLay->Prt().Width(); if ( pLay->IsVertLR() ) { nFrmTop = pLay->Frm().Left(); nPrtHeight = pLay->Prt().Width(); - } - else - { + } + else + { nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); nPrtHeight = pLay->Prt().Width(); - } - //End of SCMS + } } else { @@ -906,23 +885,19 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, if( pLay->IsVertical() ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nFrmTop = pSect->Frm().Left(); - //nPrtHeight = pSect->Frm().Left() - - // pLay->Frm().Left() - pLay->Prt().Left(); if ( pLay->IsVertLR() ) { nFrmTop = pSect->Frm().Right(); nPrtHeight = pLay->Frm().Left()+pLay->Prt().Left() + pLay->Prt().Width() - pSect->Frm().Left() - pSect->Frm().Width(); - } - else - { + } + else + { nFrmTop = pSect->Frm().Left(); nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left() - pLay->Prt().Left(); - } - //End of SCMS + } } else { @@ -939,8 +914,6 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, if( pLay->IsVertical() ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); - //nPrtHeight = pLay->Prt().Width(); if ( pLay->IsVertLR() ) { nFrmTop = pLay->Frm().Left(); @@ -951,7 +924,6 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); nPrtHeight = pLay->Prt().Width(); } - //End of SCMS } else { @@ -967,11 +939,8 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, if ( pLay->Frm().IsInside( rPt ) ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwTwips nDiff = pLay->IsVertical() ? ( nFrmTop - rPt.X() ) - // : ( rPt.Y() - nFrmTop ); SwTwips nDiff = pLay->IsVertical() ? ( pLay->IsVertLR() ? ( rPt.X() - nFrmTop ) : ( nFrmTop - rPt.X() ) ) : ( rPt.Y() - nFrmTop ); - //End of SCMS if( bSct || pSect ) rRet.nSub += nDiff; else @@ -1327,9 +1296,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) const SwRect aOld( GetObjRectWithSpaces() ); Point aNew( rNew ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( GetAnchorFrm()->IsVertical() || GetAnchorFrm()->IsRightToLeft() ) if( ( GetAnchorFrm()->IsVertical() && !GetAnchorFrm()->IsVertLR() ) || GetAnchorFrm()->IsRightToLeft() ) - //End of SCMS aNew.X() += Frm().Width(); SwCntntFrm *pCnt = (SwCntntFrm*)::FindAnchor( GetAnchorFrm(), aNew ); if( pCnt->IsProtected() ) @@ -1339,7 +1306,6 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) const bool bVert = pCnt->IsVertical(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin const bool bVertL2R = pCnt->IsVertLR(); - //End of SCMS const sal_Bool bRTL = pCnt->IsRightToLeft(); if( ( !bVert != !GetAnchorFrm()->IsVertical() ) || @@ -1381,15 +1347,13 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) : ( pCnt->Frm().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ); if( bVert ) - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nY = nTopForObjPos - rNew.X() - Frm().Width(); - { + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { if ( bVertL2R ) nY = rNew.X() - nTopForObjPos; else nY = nTopForObjPos - rNew.X() - Frm().Width(); - } - //End of SCMS + } else { nY = rNew.Y() - nTopForObjPos; @@ -1422,17 +1386,14 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) do { const SwFrm *pUp = pFollow->GetUpper(); if( pUp->IsVertical() ) - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //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(); - } - //End of SCMS + nDiff += pFollow->Frm().Left() + pFollow->Frm().Width() + - pUp->Frm().Left() - pUp->Prt().Left(); + } else nDiff += pUp->Prt().Height() - pFollow->GetRelPos().Y(); pFollow = pFollow->GetFollow(); @@ -1458,15 +1419,13 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) : ( pCnt->Frm().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ); if( bVert ) - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nY = nTopForObjPos - rNew.X(); - { + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { if ( bVertL2R ) nY = rNew.X() - nTopForObjPos; else nY = nTopForObjPos - rNew.X(); - } - //End of SCMS + } else { nY = rNew.Y() - nTopForObjPos; diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index 0184385133f2..8c52fead76a6 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -425,9 +425,7 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL ) { (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + nDist ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() && !IsReverse() ) if( IsVertical() && !IsVertLR() && !IsReverse() ) - //End of SCMS Frm().Pos().X() -= nDist; } long nGrow = nDist - nAvail, @@ -470,10 +468,8 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL ) //Den masslosen Wunsch koennen wir leider nur in Grenzen erfuellen. Frm().SSize().Height() -= nDist; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() && !IsReverse() ) if( IsVertical() && !IsVertLR() && !IsReverse() ) Frm().Pos().X() += nDist; - //End of SCMS } //Nachfolger braucht nicht invalidiert werden, denn wir wachsen diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 72b0c6cc2d70..dc32cc7bc40c 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1810,8 +1810,6 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) bChanged = aOldRect != pFly->Frm(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - // if ( IsPaint() && (pFly->IsCompletePaint() || bChanged) && - // pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) if ( IsPaint() && bAddRect && pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) pImp->GetShell()->AddPaintRect( pFly->Frm() ); @@ -1819,7 +1817,7 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) pFly->Invalidate(); //else // pFly->Validate(); - //End of SCMS + bAddRect = false; pFly->ResetCompletePaint(); } @@ -2041,9 +2039,7 @@ void MA_FASTCALL lcl_AddScrollRectTab( SwTabFrm *pTab, SwLayoutFrm *pRow, // OD 04.11.2002 #104100# - not needed. //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( pTab->IsVertical() ) if( pTab->IsVertical() && !pTab->IsVertLR() ) - //End of SCMS aRect.Pos().X() -= nOfst; else aRect.Pos().Y() += nOfst; @@ -2520,7 +2516,6 @@ void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt, (aOldRect.*fnRect->fnGetTop)() ), nOldBottom ); else PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); - //End of SCMS } else PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index c596019946f0..79b5dda1d810 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -137,9 +137,7 @@ void SwBodyFrm::Format( const SwBorderAttrs * ) nHeight = 0; Frm().Height( nHeight ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() && !IsReverse() && nWidth != Frm().Width() ) if( IsVertical() && !IsVertLR() && !IsReverse() && nWidth != Frm().Width() ) - //End of SCMS Frm().Pos().X() += Frm().Width() - nWidth; Frm().Width( nWidth ); } @@ -350,21 +348,19 @@ void SwPageFrm::CheckDirection( 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 - { + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { bVertical = 0; bVertLR = 0; - } - else { + } + else + { bVertical = 1; if(FRMDIR_VERT_TOP_RIGHT == nDir) bVertLR = 0; - - else if(FRMDIR_VERT_TOP_LEFT==nDir) - bVertLR = 1; + else if(FRMDIR_VERT_TOP_LEFT==nDir) + bVertLR = 1; } - //End of SCMS - /* 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 8d46e12c9c51..83c8c0491b38 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1228,9 +1228,8 @@ void MA_FASTCALL lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm, (bShadow && rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE) ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwRectFn fnRect = pFrm->IsVertical() ? fnRectVert : fnRectHori; SwRectFn fnRect = pFrm->IsVertical() ? ( pFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; - //End of SCMS + const SvxBoxItem &rBox = rAttrs.GetBox(); const BOOL bTop = 0 != (pFrm->*fnRect->fnGetTopMargin)(); if ( bTop ) @@ -3186,19 +3185,16 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect ) else { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //fnCheck = &SwRect::GetRightDistance; - //nLimit = rRect.Left(); if ( rFrm.IsVertLR() ) { fnCheck = &SwRect::GetLeftDistance; nLimit = rRect.Right(); - } - else - { + } + else + { fnCheck = &SwRect::GetRightDistance; nLimit = rRect.Left(); - } - //End of SCMS + } } } @@ -4896,9 +4892,8 @@ void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFmtCol &rFmtCol, if ( !pCol || !pCol->IsColumnFrm() ) return; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwRectFn fnRect = pCol->IsVertical() ? fnRectVert : fnRectHori; SwRectFn fnRect = pCol->IsVertical() ? ( pCol->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; - //End of SCMS + SwRect aLineRect = Prt(); aLineRect += Frm().Pos(); diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index eb4c1fb4959e..5ef786405d85 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -235,9 +235,7 @@ void SwFrm::CheckDirChange() BOOL bChg = bOldR2L != IsRightToLeft(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin BOOL bOldVertL2R = IsVertLR(); - //if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev ) if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev || bOldVertL2R != IsVertLR() ) - //End of SCMS { InvalidateAll(); if( IsLayoutFrm() ) @@ -332,10 +330,8 @@ Point SwFrm::GetFrmAnchorPos( sal_Bool bIgnoreFlysAnchoredAtThisFrame ) const { Point aAnchor = Frm().Pos(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if ( IsVertical() || IsRightToLeft() ) if ( ( IsVertical() && !IsVertLR() ) || IsRightToLeft() ) aAnchor.X() += Frm().Width(); - //End of SCMS if ( IsTxtFrm() ) { @@ -610,9 +606,8 @@ const SwRect SwFrm::PaintArea() const SwRect aRect = IsRowFrm() ? GetUpper()->Frm() : Frm(); const BOOL bVert = IsVertical(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; - //End of SCMS + long nRight = (aRect.*fnRect->fnGetRight)(); long nLeft = (aRect.*fnRect->fnGetLeft)(); const SwFrm* pTmp = this; @@ -712,9 +707,8 @@ const SwRect SwFrm::UnionFrm( BOOL bBorder ) const { BOOL bVert = IsVertical(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; - //End of SCMS + 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 5f0483ad06f0..60b84ad97960 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -4907,9 +4907,7 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) SwTwips nHeight = (Frm().*fnRect->fnGetHeight)(); (Frm().*fnRect->fnSetHeight)( nHeight - nReal ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() && !bRev ) if( IsVertical() && !IsVertLR() && !bRev ) - //End of SCMS Frm().Pos().X() += nReal; } @@ -4924,9 +4922,7 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) SwTwips nHeight = (Frm().*fnRect->fnGetHeight)(); (Frm().*fnRect->fnSetHeight)( nHeight + nReal ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() && !bRev ) if( IsVertical() && !IsVertLR() && !bRev ) - //End of SCMS Frm().Pos().X() -= nReal; } nReal = nTmp; diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 6862b4cd6b03..ae35cd47c278 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -2569,11 +2569,8 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode ) bVert = pEndFrm->IsVertical(); bRev = pEndFrm->IsReverse(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //fnRect = bVert ? ( bRev ? fnRectVL2R : fnRectVert ) : - // ( bRev ? fnRectB2T : fnRectHori ); fnRect = bVert ? ( bRev ? fnRectVL2R : ( pEndFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) ) : ( bRev ? fnRectB2T : fnRectHori ); - //End of SCMS 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 9e1bfc171e81..cf7cd2309f8d 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -109,9 +109,8 @@ SwFrm::SwFrm( SwModify *pMod ) : ASSERT( pMod, "Kein Frameformat uebergeben." ); bInvalidR2L = bInvalidVert = 1; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //bDerivedR2L = bDerivedVert = bRightToLeft = bVertical = bReverse = 0; bDerivedR2L = bDerivedVert = bRightToLeft = bVertical = bReverse = bVertLR = 0; - //End of SCMS + bValidPos = bValidPrtArea = bValidSize = bValidLineNum = bRetouche = bFixSize = bColLocked = FALSE; bCompletePaint = bInfInvalid = TRUE; @@ -141,21 +140,19 @@ void SwFrm::CheckDir( UINT16 nDir, BOOL bVert, BOOL bOnlyBiDi, BOOL bBrowse ) 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 - { + //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) + else if(FRMDIR_VERT_TOP_LEFT==nDir) bVertLR = 1; } - //End of SCMS } else { @@ -1172,14 +1169,11 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling) fnRect = fnRectHori; else if ( IsCellFrm() || IsColumnFrm() ) //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //fnRect = GetUpper()->IsVertical() ? fnRectHori : fnRectVert; fnRect = GetUpper()->IsVertical() ? fnRectHori : ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert ); - //End of SCMS else //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //fnRect = GetUpper()->IsVertical() ? fnRectVert : fnRectHori; fnRect = GetUpper()->IsVertical() ? ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; - //End of SCMS + if( (Frm().*fnRect->fnGetWidth)() != (pParent->Prt().*fnRect->fnGetWidth)()) _InvalidateSize(); @@ -1665,9 +1659,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst ) { (pFrm->GetNext()->Frm().*fnRect->fnSetHeight)(nAddMax-nAdd); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( bVert && !bRev ) if( bVert && !bVertL2R && !bRev ) - //End of SCMS pFrm->GetNext()->Frm().Pos().X() += nAdd; pFrm->GetNext()->InvalidatePrt(); if ( pFrm->GetNext()->GetNext() ) @@ -1682,9 +1674,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst ) SwTwips nTmp = (pFrm->Frm().*fnRect->fnGetHeight)(); (pFrm->Frm().*fnRect->fnSetHeight)( nTmp - nReal ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( bVert && !bRev ) if( bVert && !bVertL2R && !bRev ) - //End of SCMS pFrm->Frm().Pos().X() += nReal; pFrm->InvalidatePrt(); if ( pFrm->GetNext() ) @@ -1946,9 +1936,7 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) { (Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() && !IsReverse() ) if( IsVertical() && !IsVertLR() && !IsReverse() ) - //End of SCMS Frm().Pos().X() -= nDist; if ( GetNext() ) { @@ -1981,9 +1969,7 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) long nOld = (Frm().*fnRect->fnGetHeight)(); (Frm().*fnRect->fnSetHeight)( nOld + nDist ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() && !IsReverse() ) if( IsVertical()&& !IsVertLR() && !IsReverse() ) - //End of SCMS Frm().Pos().X() -= nDist; if ( nOld && IsInTab() ) { @@ -2080,9 +2066,7 @@ SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) nRstHeight = nDist; (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() - nDist ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() ) if( IsVertical() && !IsVertLR() ) - //End of SCMS Frm().Pos().X() += nDist; nDist = nRstHeight; if ( IsInTab() ) @@ -2502,9 +2486,7 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) { (Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( bChgPos ) if( bChgPos && !IsVertLR() ) - //End of SCMS Frm().Pos().X() -= nDist; bMoveAccFrm = sal_True; } @@ -2586,9 +2568,7 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) { (Frm().*fnRect->fnSetHeight)( nFrmHeight + nReal ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( bChgPos ) if( bChgPos && !IsVertLR() ) - //End of SCMS Frm().Pos().X() = nFrmPos - nReal; bMoveAccFrm = sal_True; } @@ -2680,9 +2660,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) { (Frm().*fnRect->fnSetHeight)( nFrmHeight - nReal ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( bChgPos ) if( bChgPos && !IsVertLR() ) - //End of SCMS Frm().Pos().X() += nReal; bMoveAccFrm = sal_True; } @@ -2704,9 +2682,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + nRealDist - nReal ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( bChgPos ) if( bChgPos && !IsVertLR() ) - //End of SCMS Frm().Pos().X() += nRealDist - nReal; ASSERT( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" ); } @@ -2720,9 +2696,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + nReal - nTmp ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( bChgPos ) if( bChgPos && !IsVertLR() ) - //End of SCMS Frm().Pos().X() += nTmp - nReal; ASSERT( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" ); nReal = nTmp; @@ -3243,9 +3217,7 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs ) const USHORT nLower = pAttrs->CalcBottom(); BOOL bVert = IsVertical() && !IsPageFrm(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; - //End of SCMS if ( !bValidPrtArea ) { bValidPrtArea = TRUE; diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index 660491281410..cc86f036c57d 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -379,10 +379,8 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos( case text::VertOrientation::TOP: { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nRelPosY += bVert ? _rLRSpacing.GetRight() : _rULSpacing.GetUpper(); nRelPosY += bVert ? ( bVertL2R ? _rLRSpacing.GetLeft() : _rLRSpacing.GetRight() ) : _rULSpacing.GetUpper(); - //End of SCMS } break; case text::VertOrientation::CENTER: @@ -393,12 +391,9 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos( 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() ) ); nRelPosY += nAlignAreaHeight - (nObjHeight + ( bVert ? ( bVertL2R ? _rLRSpacing.GetRight() : _rLRSpacing.GetLeft() ) : _rULSpacing.GetLower())); - //End of SCMS } break; default: diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index 0dd9254e35a0..7a43781b1dc7 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -275,9 +275,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() SwTwips nRelPosY = nAlignAreaOffset; SwTwips nObjHeight = (aObjBoundRect.*fnRect->fnGetHeight)(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwTwips nUpperSpace = bVert ? rLR.GetRight() : rUL.GetUpper(); SwTwips nUpperSpace = bVert ? ( bVertL2R ? rLR.GetLeft() : rLR.GetRight() ) : rUL.GetUpper(); - //End of SCMS SwTwips nLowerSpace = bVert ? rLR.GetLeft() : rUL.GetLower(); switch ( aVert.GetVertOrient() ) { @@ -288,9 +286,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() // bottom (to character anchored) nRelPosY += nAlignAreaHeight + nUpperSpace; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if ( bVert ) if ( bVert && !bVertL2R) - //End of SCMS nRelPosY += nObjHeight; break; } diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx index 0091e44ab0c7..dc84e4bd6780 100644 --- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx @@ -124,12 +124,10 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() { ASSERT( !bRev, " - reverse layout set." ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //aRelPos.X() = -nRelPosY - aObjBoundRect.Width(); if ( bVertL2R ) - aRelPos.X() = nRelPosY; - else - aRelPos.X() = -nRelPosY - aObjBoundRect.Width(); - //End of SCMS + aRelPos.X() = nRelPosY; + else + aRelPos.X() = -nRelPosY - aObjBoundRect.Width(); maOffsetToFrmAnchorPos.X() = nVertOffsetToFrmAnchorPos; } else @@ -214,9 +212,7 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() // --> OD 2004-06-17 #i26791# - determine offset to 'horizontal' frame // anchor position, depending on layout-direction //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if ( bVert ) if( bVert && !bVertL2R ) - //End of SCMS { aRelPos.Y() = nRelPosX; diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index f84c4ed55bf0..6529b146cca9 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -228,13 +228,10 @@ sal_Bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, // nMaxY is an absolute value //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwTwips nMaxY = bVert ? - // Max( nFrmMaxY, nUpperMaxY ) : - // Min( nFrmMaxY, nUpperMaxY ); SwTwips nMaxY = bVert ? ( bVertL2R ? Min( nFrmMaxY, nUpperMaxY ) : Max( nFrmMaxY, nUpperMaxY ) ) : Min( nFrmMaxY, nUpperMaxY ); - //End of SCMS + sal_Bool bRet = sal_False; if ( pFrm->IsEmpty() || ! (pFrm->Prt().*fnRect->fnGetHeight)() ) @@ -250,11 +247,8 @@ sal_Bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, if( nFirstOffset > 0 ) aPnt1.Y() += nFirstOffset; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if ( aPnt1.X() < nMaxY ) - // aPnt1.X() = nMaxY; if ( aPnt1.X() < nMaxY && !bVertL2R ) aPnt1.X() = nMaxY; - //End of SCMS aPnt2.X() = aPnt1.X() + pFrm->Prt().Width(); aPnt2.Y() = aPnt1.Y(); if( aPnt2.X() < nMaxY ) @@ -407,24 +401,19 @@ sal_Bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const // 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 ) : - // Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); SwTwips nMaxY = bVert ? ( bVertL2R ? Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) : Max( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) ) : Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); - //End of SCMS + if ( pFrm->IsEmpty() || ! (pFrm->Prt().*fnRect->fnGetHeight)() ) { Point aPnt1 = pFrm->Frm().Pos() + pFrm->Prt().Pos(); Point aPnt2; if ( bVert ) { - //if ( aPnt1.X() < nMaxY ) - // aPnt1.X() = nMaxY; if ( aPnt1.X() < nMaxY && !bVertL2R ) aPnt1.X() = nMaxY; - //End of SCMS + 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 3a30e86b2e11..baee5fc4465f 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -487,17 +487,14 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, sal_Bool bHasToFit ) ASSERT( ! IsSwapped(),"Swapped frame while calculating nRstHeight" ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nRstHeight = Frm().Left() + Frm().Width() - - // ( GetUpper()->Frm().Left() + GetUpper()->Prt().Left() ); if ( IsVertLR() ) nRstHeight = GetUpper()->Frm().Left() + GetUpper()->Prt().Left() + GetUpper()->Prt().Width() - Frm().Left(); - else - nRstHeight = Frm().Left() + Frm().Width() - + else + nRstHeight = Frm().Left() + Frm().Width() - ( GetUpper()->Frm().Left() + GetUpper()->Prt().Left() ); - //End of SCMS } else nRstHeight = GetUpper()->Frm().Top() @@ -1153,9 +1150,7 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine, // of the frame for rotation. This point changes when growing/shrinking. //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if ( IsVertical() && nChg ) if ( IsVertical() && !IsVertLR() && nChg ) - //End of SCMS { 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 830c3d4a6484..7cd258523903 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -458,8 +458,8 @@ SwRect SwTxtFrm::Paint() long l; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin if ( IsVertical() ) - pRepaint->Chg( ( GetUpper()->Frm() ).Pos() + ( GetUpper()->Prt() ).Pos(), ( GetUpper()->Prt() ).SSize() ); - //End of SCMS + 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 9e584f5a6542..665f09b20556 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -816,12 +816,10 @@ void SwTxtPaintInfo::CalcRect( const SwLinePortion& rPor, { aPoint.A() = X(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //aPoint.B() = Y() - rPor.GetAscent(); if ( GetTxtFrm()->IsVertLR() ) aPoint.B() = Y() - rPor.Height() + rPor.GetAscent(); else aPoint.B() = Y() - rPor.GetAscent(); - //End of SCMS } // 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 65433ba661a3..a17d79356d77 100644 --- a/sw/source/core/text/itrtxt.cxx +++ b/sw/source/core/text/itrtxt.cxx @@ -371,12 +371,10 @@ USHORT SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine, if ( bAutoToCentered || GetInfo().GetTxtFrm()->IsVertical() ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent; if( GetInfo().GetTxtFrm()->IsVertLR() ) nOfst += rLine.Height() - ( rLine.Height() - nPorHeight ) / 2 - nPorAscent; else nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent; - //End of SCMS break; } case SvxParaVertAlignItem::BASELINE : diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 8a02cb7061e2..606d4daadcf9 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -114,7 +114,6 @@ void SwTxtFrm::SwapWidthAndHeight() if( IsVertLR() ) Prt().Pos().Y() = nPrtOfstX; else - //End of SCMS Prt().Pos().Y() = Frm().Width() - ( nPrtOfstX + Prt().Width() ); } @@ -126,7 +125,6 @@ void SwTxtFrm::SwapWidthAndHeight() if( IsVertLR() ) Prt().Pos().X() = nPrtOfstY; else - //End of SCMS Prt().Pos().X() = Frm().Height() - ( nPrtOfstY + Prt().Height() ); } @@ -145,11 +143,7 @@ void SwTxtFrm::SwapWidthAndHeight() void SwTxtFrm::SwitchHorizontalToVertical( SwRect& rRect ) const { // calc offset inside frame - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - - //const long nOfstX = rRect.Left() - Frm().Left(); - //const long nOfstY = rRect.Top() + rRect.Height() - Frm().Top(); long nOfstX, nOfstY; if ( IsVertLR() ) { @@ -161,17 +155,11 @@ void SwTxtFrm::SwitchHorizontalToVertical( SwRect& rRect ) const nOfstX = rRect.Left() - Frm().Left(); nOfstY = rRect.Top() + rRect.Height() - Frm().Top(); } - //End of SCMS const long nWidth = rRect.Width(); const long nHeight = rRect.Height(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if ( bIsSwapped ) - // rRect.Left( Frm().Left() + Frm().Height() - nOfstY ); - //else - // frame is rotated - // rRect.Left( Frm().Left() + Frm().Width() - nOfstY ); if ( IsVertLR() ) rRect.Left(Frm().Left() + nOfstY); else @@ -179,9 +167,9 @@ void SwTxtFrm::SwitchHorizontalToVertical( SwRect& rRect ) const if ( bIsSwapped ) rRect.Left( Frm().Left() + Frm().Height() - nOfstY ); else + // frame is rotated rRect.Left( Frm().Left() + Frm().Width() - nOfstY ); } - // End of SCMS rRect.Top( Frm().Top() + nOfstX ); rRect.Width( nHeight ); @@ -196,12 +184,6 @@ void SwTxtFrm::SwitchHorizontalToVertical( Point& rPoint ) const const long nOfstX = rPoint.X() - Frm().Left(); const long nOfstY = rPoint.Y() - Frm().Top(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - /* if ( bIsSwapped ) - rPoint.X() = Frm().Left() + Frm().Height() - nOfstY; - else - // calc rotated coords - rPoint.X() = Frm().Left() + Frm().Width() - nOfstY; - */ if ( IsVertLR() ) rPoint.X() = Frm().Left() + nOfstY; else @@ -209,9 +191,9 @@ void SwTxtFrm::SwitchHorizontalToVertical( Point& rPoint ) const if ( bIsSwapped ) rPoint.X() = Frm().Left() + Frm().Height() - nOfstY; else + // calc rotated coords rPoint.X() = Frm().Left() + Frm().Width() - nOfstY; } - //End of SCMS rPoint.Y() = Frm().Top() + nOfstX; } @@ -234,11 +216,6 @@ void SwTxtFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const // calc offset inside frame //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - /*if ( bIsSwapped ) - nOfstX = Frm().Left() + Frm().Height() - ( rRect.Left() + rRect.Width() ); - else - nOfstX = Frm().Left() + Frm().Width() - ( rRect.Left() + rRect.Width() ); - */ if ( IsVertLR() ) nOfstX = rRect.Left() - Frm().Left(); else @@ -248,7 +225,7 @@ void SwTxtFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const else nOfstX = Frm().Left() + Frm().Width() - ( rRect.Left() + rRect.Width() ); } - //End of SCMS + const long nOfstY = rRect.Top() - Frm().Top(); const long nWidth = rRect.Height(); const long nHeight = rRect.Width(); @@ -269,11 +246,6 @@ void SwTxtFrm::SwitchVerticalToHorizontal( Point& rPoint ) const // calc offset inside frame //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - /*if ( bIsSwapped ) - nOfstX = Frm().Left() + Frm().Height() - rPoint.X(); - else - nOfstX = Frm().Left() + Frm().Width() - rPoint.X(); - */ if ( IsVertLR() ) nOfstX = rPoint.X() - Frm().Left(); else @@ -283,7 +255,7 @@ void SwTxtFrm::SwitchVerticalToHorizontal( Point& rPoint ) const else nOfstX = Frm().Left() + Frm().Width() - rPoint.X(); } - //End of SCMS + const long nOfstY = rPoint.Y() - Frm().Top(); // calc rotated coords @@ -2637,7 +2609,6 @@ void SwTxtFrm::ChgThisLines() //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin //Ugly. How can we hack if better? InvalidatePage(); - //End of SCMS } diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index 6718a353e569..024844f8e00d 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -144,13 +144,11 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto ) nLinePos + nTabPos; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwTwips nMyRight = Right(); SwTwips nMyRight; if ( pFrm->IsVertLR() ) nMyRight = Left(); else nMyRight = Right(); - //End of SCMS if ( pFrm->IsVertical() ) { diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx index 3fc333afd6c9..6ef96017091e 100644 --- a/sw/source/core/text/widorp.cxx +++ b/sw/source/core/text/widorp.cxx @@ -229,15 +229,13 @@ void SwTxtFrmBreak::SetRstHeight( const SwTxtMargin &rLine ) nRstHeight = (pFrm->*fnRect->fnGetBottomMargin)(); if ( bVert ) - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nRstHeight += nOrigin - pFrm->SwitchHorizontalToVertical( rLine.Y() ); - { - if ( pFrm->IsVertLR() ) - nRstHeight = (*fnRect->fnYDiff)( pFrm->SwitchHorizontalToVertical( rLine.Y() ) , nOrigin ); - else - nRstHeight += nOrigin - pFrm->SwitchHorizontalToVertical( rLine.Y() ); - } - //End of SCMS + //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; } -- cgit v1.2.3 From 006871cd6c1785242a1eef0ff5cdfb914fcd99c5 Mon Sep 17 00:00:00 2001 From: Oliver Düsterhoff Date: Fri, 4 Sep 2009 12:37:31 +0000 Subject: #i91226# adjustment of object positioning for Mongolian layout --- sw/source/core/inc/anchoredobjectposition.hxx | 60 +++++++----- .../objectpositioning/anchoredobjectposition.cxx | 104 +++++++++++--------- .../tocntntanchoredobjectposition.cxx | 107 ++++++++++++++++----- .../tolayoutanchoredobjectposition.cxx | 4 +- 4 files changed, 183 insertions(+), 92 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/inc/anchoredobjectposition.hxx b/sw/source/core/inc/anchoredobjectposition.hxx index 87adedcf6c0d..fb4e1ce8d592 100644 --- a/sw/source/core/inc/anchoredobjectposition.hxx +++ b/sw/source/core/inc/anchoredobjectposition.hxx @@ -86,12 +86,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 + 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; // <-- @@ -173,53 +175,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 + OD 2004-10-08 #i26945# - add parameter OD 2006-03-15 #i62875# - made inline, intrinsic actions moved to private method <_ImplAdjustVertRelPos>, which is only called, if not set. + OD 2009-09-01 #mongolianlayout# - add parameter - @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 @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/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index cc86f036c57d..149a4a478156 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -379,8 +379,11 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos( case text::VertOrientation::TOP: { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - nRelPosY += bVert ? ( bVertL2R ? - _rLRSpacing.GetLeft() : _rLRSpacing.GetRight() ) : _rULSpacing.GetUpper(); + nRelPosY += bVert + ? ( bVertL2R + ? _rLRSpacing.GetLeft() + : _rLRSpacing.GetRight() ) + : _rULSpacing.GetUpper(); } break; case text::VertOrientation::CENTER: @@ -391,9 +394,12 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos( case text::VertOrientation::BOTTOM: { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - nRelPosY += nAlignAreaHeight - - (nObjHeight + ( bVert ? ( bVertL2R ? - _rLRSpacing.GetRight() : _rLRSpacing.GetLeft() ) : _rULSpacing.GetLower())); + nRelPosY += nAlignAreaHeight - + ( nObjHeight + ( bVert + ? ( bVertL2R + ? _rLRSpacing.GetRight() + : _rLRSpacing.GetLeft() ) + : _rULSpacing.GetLower() ) ); } break; default: @@ -412,21 +418,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 and added + OD 2004-07-22 #i31805# - add parameter + OD 2004-10-08 #i26945# - add parameter OD 2006-03-15 #i62875# - method now private and renamed. + OD 2009-09-01 #mongolianlayout# - add parameter @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() ); @@ -443,57 +451,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 and -// aPgAlignArea.Bottom() ) + if ( bCheckBottom && + nTopOfAnch + nAdjustedRelPosY + aObjSize.Height() > aPgAlignArea.Top() + aPgAlignArea.Height() ) - // <-- { - // --> OD 2006-01-13 #129959# - // Do not mix usage of and -// 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 7a43781b1dc7..91daf0e202fc 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -273,10 +273,20 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() // determine relative vertical position SwTwips nRelPosY = nAlignAreaOffset; - SwTwips nObjHeight = (aObjBoundRect.*fnRect->fnGetHeight)(); + const SwTwips nObjHeight = (aObjBoundRect.*fnRect->fnGetHeight)(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - SwTwips nUpperSpace = bVert ? ( bVertL2R ? rLR.GetLeft() : rLR.GetRight() ) : rUL.GetUpper(); - SwTwips nLowerSpace = bVert ? rLR.GetLeft() : rUL.GetLower(); + 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: @@ -286,8 +296,10 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() // bottom (to character anchored) nRelPosY += nAlignAreaHeight + nUpperSpace; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - if ( bVert && !bVertL2R) + if ( bVert && !bVertL2R ) + { nRelPosY += nObjHeight; + } break; } } @@ -409,7 +421,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 ); @@ -591,7 +603,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 ); @@ -632,7 +644,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(), @@ -721,7 +733,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() ); @@ -742,9 +754,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 { @@ -835,7 +857,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(), @@ -843,9 +865,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 { @@ -925,9 +956,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() ); @@ -979,8 +1022,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() ); @@ -1030,8 +1084,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 dc84e4bd6780..48776aeebfda 100644 --- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx @@ -212,7 +212,9 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() // --> OD 2004-06-17 #i26791# - determine offset to 'horizontal' frame // anchor position, depending on layout-direction //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - if( bVert && !bVertL2R ) + // --> OD 2009-09-04 #mongolianlayout# + if( bVert || bVertL2R ) + // <-- { aRelPos.Y() = nRelPosX; -- cgit v1.2.3 From 43867f5e04f671d6f3276724a47454ec5799ff80 Mon Sep 17 00:00:00 2001 From: Oliver Düsterhoff Date: Fri, 4 Sep 2009 13:08:11 +0000 Subject: #i91226# adjustment of the object positioning dialog for Mongolian layout --- sw/inc/fesh.hxx | 8 +- sw/source/core/frmedt/fews.cxx | 172 ++++++++++++++++++++++++++++++--------- sw/source/ui/docvw/edtwin.cxx | 4 +- sw/source/ui/frmdlg/frmmgr.cxx | 18 ++-- sw/source/ui/frmdlg/frmpage.cxx | 98 ++++++++++++++++++---- sw/source/ui/inc/frmmgr.hxx | 3 + sw/source/ui/inc/frmpage.hxx | 3 + sw/source/ui/shells/drwbassh.cxx | 11 ++- sw/source/ui/uiview/viewtab.cxx | 33 ++++++-- 9 files changed, 278 insertions(+), 72 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 8697ee2833d1..50ce7f95a197 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -364,7 +364,13 @@ public: void SetFlyPos( const Point &rAbsPos); Point FindAnchorPos( const Point &rAbsPos, BOOL bMoveIt = FALSE ); // determines whether a frame or its environment is vertically formatted and right-to-left - BOOL IsFrmVertical(BOOL bEnvironment, BOOL& bRightToLeft) const; + // --> OD 2009-08-31 #mongolianlayout# + // also determines, if frame or its environmane is in mongolianlayout (vertical left-to-right) + // - add output parameter + BOOL IsFrmVertical( const BOOL bEnvironment, + BOOL& bRightToLeft, + BOOL& bVertL2R ) const; + // <-- SwFrmFmt* GetCurFrmFmt() const; //Wenn Rahmen, dann Rahmenvorlage, sonst 0 void SetFrmFmt( SwFrmFmt *pFmt, BOOL bKeepOrient = FALSE, Point* pDocPos = 0 ); //Wenn Rahmen, dann Rahmenvorlage setzen diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 13e6a5e732b3..f5a704d15050 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -775,8 +775,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, _bMirror = _bMirror && !pPage->OnRightPage(); Point aPos; - BOOL bVertic = FALSE; + bool bVertic = false; BOOL bRTL = FALSE; + // --> OD 2009-09-01 #mongolianlayout# + bool bVerticalL2R = false; + // <-- if( FLY_PAGE == _nAnchorId || FLY_AT_FLY == _nAnchorId ) // LAYER_IMPL { @@ -801,9 +804,14 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, else aPos = (pFrm->Frm().*fnRect->fnGetPos)(); - if( bVert ) + // --> OD 2009-09-01 #mongolianlayout# + if( bVert || bVertL2R ) + // <-- { - bVertic = TRUE; + // --> OD 2009-09-01 #mongolianlayout# + bVertic = bVert ? true : false; + bVerticalL2R = bVertL2R ? true : false; + // <-- _bMirror = false; // no mirroring in vertical environment switch ( _eHoriRelOrient ) { @@ -852,8 +860,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 ) { @@ -865,6 +874,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 ) @@ -929,10 +952,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(); @@ -949,7 +979,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 ) @@ -957,6 +989,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(); @@ -1016,10 +1058,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; @@ -1046,10 +1090,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; @@ -1057,7 +1103,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, } // <-- - if ( bVert ) + // --> OD 2009-09-01 #mongolianlayout# + if ( bVert || bVertL2R ) + // <-- { _orRect = SwRect( aVertEnvironRect.Left(), aHoriEnvironRect.Top(), @@ -1091,7 +1139,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 ); @@ -1101,26 +1151,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 = 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; } } @@ -1178,19 +1253,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; } } @@ -1198,8 +1281,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 @@ -1242,10 +1329,15 @@ Size SwFEShell::GetGraphicDefaultSize() const /* -----------------------------12.08.2002 12:51------------------------------ ---------------------------------------------------------------------------*/ -BOOL SwFEShell::IsFrmVertical(BOOL bEnvironment, BOOL& bRTL) const +// --> OD 2009-08-31 #mongolianlayou# +// add output parameter +BOOL SwFEShell::IsFrmVertical( const BOOL bEnvironment, + BOOL& bRTL, + BOOL& bVertL2R ) const { BOOL bVert = FALSE; bRTL = FALSE; + bVertL2R = FALSE; if ( Imp()->HasDrawView() ) { @@ -1287,10 +1379,12 @@ BOOL SwFEShell::IsFrmVertical(BOOL bEnvironment, 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/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 8236791701ef..b707286ef49e 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -1182,8 +1182,8 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) { // --> FME 2005-04-26 #i47138# // Check if object is anchored as character and move direction - BOOL bDummy; - const bool bVertAnchor = rSh.IsFrmVertical( TRUE, bDummy ); + BOOL bDummy1, bDummy2; + const bool bVertAnchor = rSh.IsFrmVertical( TRUE, bDummy1, bDummy2 ); const bool bHoriMove = !bVertAnchor == !( nDir % 2 ); const bool bMoveAllowed = !bHoriMove || rSh.GetAnchorId() != FLY_IN_CNTNT; if ( bMoveAllowed ) diff --git a/sw/source/ui/frmdlg/frmmgr.cxx b/sw/source/ui/frmdlg/frmmgr.cxx index bd1e98b37b9e..a84d1b39ecef 100644 --- a/sw/source/ui/frmdlg/frmmgr.cxx +++ b/sw/source/ui/frmdlg/frmmgr.cxx @@ -77,7 +77,8 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType ) : pOwnSh( pSh ), bAbsPos( FALSE ), bNewFrm( bNew ), - bIsInVertical( FALSE ) + bIsInVertical( FALSE ), + bIsInVerticalL2R( FALSE ) { if ( bNewFrm ) { @@ -98,7 +99,7 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType ) : { pOwnSh->GetFlyFrmAttr( aSet ); BOOL bRightToLeft; - bIsInVertical = pOwnSh->IsFrmVertical(TRUE, bRightToLeft); + bIsInVertical = pOwnSh->IsFrmVertical( TRUE, bRightToLeft, bIsInVerticalL2R ); } ::PrepareBoxInfo( aSet, *pOwnSh ); } @@ -108,12 +109,13 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, const SfxItemSet & pOwnSh( pSh ), bAbsPos( FALSE ), bNewFrm( bNew ), - bIsInVertical(FALSE) + bIsInVertical(FALSE), + bIsInVerticalL2R( FALSE ) { if(!bNew) { BOOL bRightToLeft; - bIsInVertical = pSh->IsFrmVertical(TRUE, bRightToLeft); + bIsInVertical = pSh->IsFrmVertical( TRUE, bRightToLeft, bIsInVerticalL2R ); } } @@ -303,7 +305,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(); @@ -500,7 +504,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 3225e120248a..eb5d61fa5f1e 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -513,17 +513,36 @@ void lcl_InsertVectors(ListBox& rBox, /* -----------------------------20.08.2002 16:12------------------------------ ---------------------------------------------------------------------------*/ -SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, BOOL bVertical, BOOL bRTL) +// --> OD 2009-08-31 #mongolianlayout# +// add input parameter +SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( + SvxSwFramePosString::StringId eStringId, + const BOOL bVertical, + const BOOL bVerticalL2R, + const 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[] = @@ -548,6 +567,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 } + }; + // <-- USHORT nIndex; for(nIndex = 0; nIndex < sizeof(aHoriIds) / sizeof(StringIdPair_Impl); ++nIndex) { @@ -560,11 +592,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; @@ -673,8 +718,13 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : bFormat(FALSE), bNew(TRUE), bNoModifyHdl(TRUE), - bVerticalChanged(FALSE), + // --> OD 2009-08-31 #mongolianlayout# - no used +// bVerticalChanged(FALSE), + // <-- bIsVerticalFrame(FALSE), + // --> OD 2009-08-31 #mongolianlayou# + bIsVerticalL2R( FALSE ), + // <-- bIsInRightToLeft(FALSE), bHtmlMode(FALSE), nHtmlMode(0), @@ -813,7 +863,10 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) { if (rAnchor.GetAnchorId() != FLY_AT_FLY && !pSh->IsFlyInFly()) aAnchorAtFrameRB.Hide(); - if(!bVerticalChanged && pSh->IsFrmVertical(TRUE, bIsInRightToLeft)) + // --> OD 2009-08-31 #mongolianlayout# +// if ( !bVerticalChanged && pSh->IsFrmVertical(TRUE, bIsInRightToLeft) ) + if ( pSh->IsFrmVertical( TRUE, bIsInRightToLeft, bIsVerticalL2R ) ) + // <-- { String sHLabel = aHorizontalFT.GetText(); aHorizontalFT.SetText(aVerticalFT.GetText()); @@ -1324,7 +1377,12 @@ USHORT 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) { @@ -1388,7 +1446,13 @@ 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); USHORT nPos = _rLB.InsertEntry(sEntry); _rLB.SetEntryData(nPos, &aAsCharRelationMap[nRelPos]); @@ -1448,7 +1512,13 @@ 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); USHORT nPos = _rLB.InsertEntry(sEntry); _rLB.SetEntryData(nPos, &aRelationMap[nRelPos]); diff --git a/sw/source/ui/inc/frmmgr.hxx b/sw/source/ui/inc/frmmgr.hxx index 4223960dfca5..ea09a89a827b 100644 --- a/sw/source/ui/inc/frmmgr.hxx +++ b/sw/source/ui/inc/frmmgr.hxx @@ -68,6 +68,9 @@ class SW_DLLPUBLIC SwFlyFrmAttrMgr BOOL bAbsPos, bNewFrm; BOOL bIsInVertical; + // --> OD 2009-09-01 #mongolianlayout# + 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 c30b1bcf8488..fdf3f75511a1 100644 --- a/sw/source/ui/inc/frmpage.hxx +++ b/sw/source/ui/inc/frmpage.hxx @@ -122,6 +122,9 @@ class SwFrmPage: public SfxTabPage BOOL bNoModifyHdl; BOOL bVerticalChanged; //check done whether frame is in vertical environment BOOL bIsVerticalFrame; //current frame is in vertical environment - strings are exchanged + // --> OD 2009-08-31 #mongolianlayou# + BOOL bIsVerticalL2R; + // <-- BOOL bIsInRightToLeft; // current frame is in right-to-left environment - strings are exchanged BOOL bHtmlMode; USHORT nHtmlMode; diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx index 339c332c9135..f367aac330fb 100644 --- a/sw/source/ui/shells/drwbassh.cxx +++ b/sw/source/ui/shells/drwbassh.cxx @@ -271,7 +271,8 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor)); BOOL bRTL; - aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(TRUE, bRTL))); + BOOL bVertL2R; + aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(TRUE, bRTL, bVertL2R))); aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_RTL_TEXT, bRTL)); SwFrmFmt* pFrmFmt = FindFrmFmt( pObj ); @@ -837,8 +838,12 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation pValidation->bFollowTextFlow, pValidation->bMirror, NULL, &pValidation->aPercentSize); - BOOL bRTL; - BOOL bIsInVertical = pSh->IsFrmVertical(TRUE, bRTL); + BOOL bIsInVertical( FALSE ); + { + BOOL bRTL; + BOOL bVertL2R; + bIsInVertical = pSh->IsFrmVertical(TRUE, bRTL, bVertL2R); + } if(bIsInVertical) { Point aPos(aBoundRect.Pos()); diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index 6223d1d0234a..1b9b18dd0888 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -316,8 +316,14 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SwFrmFmt* pFmt = ((SwFrmFmt*)rSh.GetFlyFrmFmt()); const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED); - BOOL bRTL; - BOOL bVerticalFrame = (bFrmSelection && rSh.IsFrmVertical(TRUE, bRTL))|| (!bFrmSelection && bVerticalWriting); + BOOL bVerticalFrame( FALSE ); + { + BOOL bRTL; + BOOL bVertL2R; + bVerticalFrame = ( bFrmSelection && + rSh.IsFrmVertical(TRUE, bRTL, bVertL2R) ) || + ( !bFrmSelection && bVerticalWriting); + } long nDeltaX = bVerticalFrame ? rRect.Right() - rPageRect.Right() + aLongLR.GetRight() : rPageRect.Left() + aLongLR.GetLeft() - rRect.Left(); @@ -454,7 +460,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 BOOL bRTL; - if((bFrmSelection && rSh.IsFrmVertical(TRUE, bRTL))|| (!bFrmSelection && bVerticalWriting)) + BOOL bVertL2R; + if ( ( bFrmSelection && + rSh.IsFrmVertical(TRUE, bRTL, bVertL2R ) ) || + ( !bFrmSelection && bVerticalWriting ) ) { SwFmtHoriOrient aHoriOrient(pFmt->GetHoriOrient()); aHoriOrient.SetHoriOrient(text::HoriOrientation::NONE); @@ -1276,8 +1285,13 @@ void SwView::StateTabWin(SfxItemSet& rSet) case SID_RULER_BORDERS_VERTICAL: case SID_RULER_BORDERS: { - BOOL bFrameRTL; - BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection; + BOOL bFrameHasVerticalColumns(FALSE); + { + BOOL bFrameRTL; + BOOL bFrameVertL2R; + bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL, bFrameVertL2R) && + bFrmSelection; + } BOOL bHasTable = ( IsTabColFromDoc() || ( rSh.GetTableFmt() && !bFrmSelection && !(nFrmType & FRMTYPE_COLSECT ) ) ); @@ -1500,8 +1514,13 @@ void SwView::StateTabWin(SfxItemSet& rSet) case SID_RULER_ROWS : case SID_RULER_ROWS_VERTICAL: { - BOOL bFrameRTL; - BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection; + BOOL bFrameHasVerticalColumns(FALSE); + { + BOOL bFrameRTL; + BOOL bFrameVertL2R; + bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL, bFrameVertL2R) && + bFrmSelection; + } if((SID_RULER_ROWS == nWhich) && ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) || -- cgit v1.2.3 From f7016dabf14874375414471571d40b1ed48700a9 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 9 Sep 2009 15:36:32 +0000 Subject: #i91226#: reimplemented cursor travelling; problematic code only for VertLR --- sw/source/core/crsr/crsrsh.cxx | 6 ------ sw/source/core/layout/layact.cxx | 17 ++++++++++++----- sw/source/core/text/frmpaint.cxx | 2 +- sw/source/core/text/txtfrm.cxx | 5 ++++- sw/source/ui/docvw/edtwin.cxx | 19 +++++++++++++++---- 5 files changed, 32 insertions(+), 17 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index b6f27c0917ab..6652cd86dab4 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -459,12 +459,6 @@ void SwCrsrShell::UpdateMarkedListLevel() BOOL SwCrsrShell::UpDown( BOOL bUp, USHORT nCnt ) { - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - SwCntntFrm *pFrm = pCurCrsr->GetCntntNode()->GetFrm( - &pCurCrsr->GetPtPos(), pCurCrsr->GetPoint() ); - if(pFrm->IsVertical() && pFrm->IsVertLR()) - bUp=!bUp; - //End of SCMS SET_CURR_SHELL( this ); SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index dc32cc7bc40c..5223da909000 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1809,15 +1809,22 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) pFly->Calc(); bChanged = aOldRect != pFly->Frm(); - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - if ( IsPaint() && bAddRect && pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) + if ( IsPaint() && (pFly->IsCompletePaint() || bChanged) && + pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) pImp->GetShell()->AddPaintRect( pFly->Frm() ); - //if ( bChanged ) + if ( bChanged ) pFly->Invalidate(); - //else - // pFly->Validate(); + 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/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index 7cd258523903..f6ce848f229e 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -457,7 +457,7 @@ SwRect SwTxtFrm::Paint() SwRepaint *pRepaint = GetPara()->GetRepaint(); long l; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - if ( IsVertical() ) + 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() ) diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 2ae723bbe3e1..38ab871c5107 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -2606,9 +2606,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(); + //InvalidatePage(); } diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index b707286ef49e..098f25cff898 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -1338,11 +1338,22 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) if( ( bVertText && ( !bTblCrsr || bVertTable ) ) || ( bTblCrsr && bVertTable ) ) { - 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( KEY_UP == nKey ) + nKey = KEY_LEFT; + else if( KEY_DOWN == nKey ) + nKey = KEY_RIGHT; + else if ( !rSh.IsInRightToLeftText() ) + { + if( KEY_LEFT == nKey ) nKey = KEY_UP; + else if( KEY_RIGHT == nKey ) nKey = KEY_DOWN; + } + 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; -- cgit v1.2.3 From 8703a2191c49bb1cdb9ac885282d2d39321abbe4 Mon Sep 17 00:00:00 2001 From: "Matthias Huetsch [mhu]" Date: Fri, 18 Jun 2010 19:00:23 +0200 Subject: Update from master repository (DEV300_m82). --- sw/source/filter/ww8/wrtw8nds.cxx | 1 + sw/source/filter/ww8/wrtww8gr.cxx | 2 ++ 2 files changed, 3 insertions(+) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 76ad1dc354ea..6310b7e19782 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -106,6 +106,7 @@ #include #include + #include using namespace ::com::sun::star; diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index 5d96a74b009d..bbb848b60ad5 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -79,6 +79,8 @@ #include "docsh.hxx" #include +#include + using namespace ::com::sun::star; using namespace nsFieldFlags; -- cgit v1.2.3 From 9aab0238e78d474b0b36d70bf65bb95d49bf6a78 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 24 Jun 2010 18:41:43 +0200 Subject: CWS mongolianlayout: resolve conflict in layact.cxx --- sw/source/core/layout/layact.cxx | 259 --------------------------------------- 1 file changed, 259 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 9572e2d0d4b7..eb01f443a269 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1677,242 +1677,6 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) return bChanged || bTabChanged; } -<<<<<<< local -BOOL MA_FASTCALL lcl_AreLowersScrollable( const SwLayoutFrm *pLay ) -{ - const SwFrm *pLow = pLay->Lower(); - while ( pLow ) - { - if ( pLow->IsCompletePaint() || !pLow->IsValid() || pLow->IsCoveredCell() ) - return FALSE; - if ( pLow->IsLayoutFrm() && !::lcl_AreLowersScrollable( (SwLayoutFrm*)pLow )) - return FALSE; - pLow = pLow->GetNext(); - } - return TRUE; -} - -SwLayoutFrm * MA_FASTCALL lcl_IsTabScrollable( SwTabFrm *pTab ) -{ - //returnt die erste unveraenderte Zeile, oder 0 wenn nicht - //gescrollt werden darf. - if ( !pTab->IsCompletePaint() ) - { - SwLayoutFrm *pUnchgdRow = 0; - SwLayoutFrm *pRow = (SwLayoutFrm*)pTab->Lower(); - while ( pRow ) - { - if ( ::lcl_AreLowersScrollable( pRow ) ) - { - if ( !pUnchgdRow ) - pUnchgdRow = pRow; - } - else - { - pUnchgdRow = 0; - } - - pRow = (SwLayoutFrm*)pRow->GetNext(); - } - return pUnchgdRow; - } - return 0; -} - -// OD 2004-05-11 #i28701# -void lcl_ValidateLowerObjs( SwFrm* pFrm, - const SwTwips nOfst, - SwPageFrm *pPage, - bool bResetOnly ); - -// OD 2004-05-11 #i28701# - correction: floating screen objects, which are -// anchored at-fly, have also been to be considered. -void MA_FASTCALL lcl_ValidateLowers( SwLayoutFrm *pLay, const SwTwips nOfst, - SwLayoutFrm *pRow, SwPageFrm *pPage, - BOOL bResetOnly ) -{ - pLay->ResetCompletePaint(); - - // OD 2004-05-11 #i28701# - consider floating screen objects, which are - // anchored at-fly. - if ( pLay->IsFlyFrm() ) - { - ::lcl_ValidateLowerObjs( pLay, nOfst, pPage, bResetOnly ); - } - - SwFrm *pLow = pRow ? pRow : pLay->Lower(); - SwRootFrm *pRootFrm = 0; - - while ( pLow ) - { - if ( !bResetOnly ) - { - SwRect aOldFrm( pLow->Frm() ); - pLow->Frm().Pos().Y() += nOfst; - if( pLow->IsAccessibleFrm() ) - { - if( !pRootFrm ) - pRootFrm = pPage->FindRootFrm(); - if( pRootFrm && pRootFrm->IsAnyShellAccessible() && - pRootFrm->GetCurrShell() ) - { - pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( pLow, aOldFrm ); - } - } - } - if ( pLow->IsLayoutFrm() ) - { - ::lcl_ValidateLowers( (SwLayoutFrm*)pLow, nOfst, 0, pPage, bResetOnly); - } - else - { - pLow->ResetCompletePaint(); - // OD 2004-05-11 #i28701# - use new local helper method - // - ::lcl_ValidateLowerObjs( pLow, nOfst, pPage, bResetOnly); - } - if ( !bResetOnly ) - pLow->Calc(); //#55435# Stabil halten. - pLow = pLow->GetNext(); - } -} - -// OD 2004-05-11 #i28701# - helper method for to -// 'ValidateLowers' for floating screen objects -void lcl_ValidateLowerObjs( SwFrm* pFrm, - const SwTwips nOfst, - SwPageFrm *pPage, - bool bResetOnly ) -{ - if ( pFrm->GetDrawObjs() ) - { - // --> OD 2004-10-15 #i26945# - consider layout direction - SWRECTFN( pFrm ) - // <-- - for ( USHORT i = 0; i < pFrm->GetDrawObjs()->Count(); ++i ) - { - SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i]; - // --> OD 2004-10-08 #i26945# - check, if the anchor frame, which - // contains the anchor position, is the given frame - if ( pAnchoredObj->GetAnchorFrmContainingAnchPos() != pFrm ) - { - continue; - } - if ( pAnchoredObj->ISA(SwFlyFrm) ) - { - SwFlyFrm *pFly = static_cast(pAnchoredObj); - if ( !bResetOnly ) - { - // --> OD 2004-10-15 #i26945# - // - consider layout direction - // - consider condition for direct move - const bool bNoDirectMove = - WEIT_WECH == pFly->Frm().Top() || - pFly->ConsiderObjWrapInfluenceOnObjPos(); - if ( !bNoDirectMove ) - { - (pFly->Frm().*fnRect->fnSubTop)( -nOfst ); - (pFly->Frm().*fnRect->fnAddBottom)( nOfst ); - } - // <-- - pFly->GetVirtDrawObj()->SetRectsDirty(); - // --> OD 2004-08-17 - also notify view of - // instance, which represents the Writer fly frame in the - // drawing layer - pFly->GetVirtDrawObj()->SetChanged(); - // <-- - if ( pFly->IsFlyInCntFrm() ) - ((SwFlyInCntFrm*)pFly)->AddRefOfst( nOfst ); - // --> OD 2004-10-15 #i26945# - consider at-character - // anchored Writer fly frames - else if( pFly->IsAutoPos() ) - { - pFly->AddLastCharY( nOfst ); - // OD 2004-05-18 #i28701# - follow-up of #i22341# - // has also been adjusted. - pFly->AddLastTopOfLineY( nOfst ); - } - // <-- - } - ::lcl_ValidateLowers( pFly, nOfst, 0, pPage, bResetOnly); - } - // --> OD 2004-10-15 #i26945# - consider drawing objects - else - { - if ( !bResetOnly ) - { - pAnchoredObj->AddLastCharY( nOfst ); - pAnchoredObj->AddLastTopOfLineY( nOfst ); - } - } - // <-- - pAnchoredObj->InvalidateObjPos(); - } - } -} - -void MA_FASTCALL lcl_AddScrollRectTab( SwTabFrm *pTab, SwLayoutFrm *pRow, - const SwRect &rRect, - const SwTwips nOfst) -{ - // --> OD 2007-11-27 #notes2# - // if sidebar for notes is present, no scrolling is allowed - const SwPageFrm* pPage = pTab->FindPageFrm(); - ASSERT( pPage, " - no page frame found at table frame -> crash" ); - ViewShell* pSh = pPage->GetShell(); - if ( pSh ) - { - const SwPostItMgr* pPostItMgr = pSh->GetPostItMgr(); - if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) - { - return; - } - } - // <-- - //Wenn altes oder neues Rechteck mit einem Fly ueberlappen, in dem der - //Frm nicht selbst steht, so ist nichts mit Scrollen. - SwRect aRect( rRect ); - // OD 04.11.2002 #104100# - not needed. - - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - if( pTab->IsVertical() && !pTab->IsVertLR() ) - aRect.Pos().X() -= nOfst; - else - aRect.Pos().Y() += nOfst; - if ( pPage->GetSortedObjs() ) - { - if ( ::lcl_IsOverObj( pTab, pPage, rRect, aRect, pTab ) ) - return; - } - if ( pPage->GetFmt()->GetBackground().GetGraphicPos() != GPOS_NONE ) - return; - - if ( pSh ) - pSh->AddScrollRect( pTab, aRect, nOfst ); - ::lcl_ValidateLowers( pTab, nOfst, pRow, pTab->FindPageFrm(), - pTab->IsLowersFormatted() ); -} - -// OD 31.10.2002 #104100# -// NOTE: no adjustments for vertical layout support necessary -BOOL CheckPos( SwFrm *pFrm ) -{ - if ( !pFrm->GetValidPosFlag() ) - { - Point aOld( pFrm->Frm().Pos() ); - pFrm->MakePos(); - if ( aOld != pFrm->Frm().Pos() ) - { - pFrm->Frm().Pos( aOld ); - pFrm->_InvalidatePos(); - return FALSE; - } - } - return TRUE; -} - -======= ->>>>>>> other // OD 31.10.2002 #104100# // Implement vertical layout support BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect ) @@ -2282,31 +2046,8 @@ void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt, (aOldRect.*fnRect->fnGetBottom)() ) < 0 ) { pCntnt->SetRetouche(); -<<<<<<< local - const SwRect aNewRect( pCntnt->UnionFrm() ); - if ( bPosOnly && - (aNewRect.*fnRect->fnGetTop)() != (aOldRect.*fnRect->fnGetTop)() && - !pCntnt->IsInTab() && !pCntnt->IsInSct() && - ( !pCntnt->GetPrev() || !pCntnt->GetPrev()->IsTabFrm() ) && - pOldUp == pCntnt->GetUpper() && - (aNewRect.*fnRect->fnGetLeft)() == (aOldRect.*fnRect->fnGetLeft)() && - aNewRect.SSize() == aOldRect.SSize() - ) - { - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - if ( !bVertL2R ) - _AddScrollRect( pCntnt, pPage, (*fnRect->fnYDiff)( - (pCntnt->Frm().*fnRect->fnGetTop)(), - (aOldRect.*fnRect->fnGetTop)() ), nOldBottom ); - else - PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); - } - else - PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); -======= } PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); ->>>>>>> other } else { -- cgit v1.2.3 From bb2e719893dbfdee7c2fb36ffca5cef8ffefdf8f Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 4 Nov 2010 14:01:00 +0100 Subject: mongolianlayout: #i115359# - method - restore previous mapping of cursor keys to direction keys as the attempt to consider cursor travelling for mongolian layout does not work. --- sw/source/ui/docvw/edtwin.cxx | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index ad865b1732f2..a0349575804e 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -1365,20 +1365,12 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) if( ( bVertText && ( !bTblCrsr || bVertTable ) ) || ( bTblCrsr && bVertTable ) ) { - if( KEY_UP == nKey ) - nKey = KEY_LEFT; - else if( KEY_DOWN == nKey ) - nKey = KEY_RIGHT; - else if ( !rSh.IsInRightToLeftText() ) - { - if( KEY_LEFT == nKey ) nKey = KEY_UP; - else if( KEY_RIGHT == nKey ) nKey = KEY_DOWN; - } - else - { - if( KEY_LEFT == nKey ) nKey = KEY_DOWN; - else if( KEY_RIGHT == nKey ) nKey = KEY_UP; - } + // 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() ) -- cgit v1.2.3 From 0fb59a2a77ee5872461c0825edb2311f5f53757d Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 24 Nov 2010 14:44:09 +0100 Subject: sw34bf03: #i115705# method - correction and refactoring of tab stop at left margin for tabs in hanging indent --- sw/source/core/text/txttab.cxx | 112 ++++++++++++++++++++++------------------- 1 file changed, 61 insertions(+), 51 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index a86589b64851..7f6fc5699ff3 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -84,7 +84,6 @@ USHORT SwLineInfo::NumberOfTabStops() const /************************************************************************* * SwTxtFormatter::NewTabPortion() *************************************************************************/ - SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto ) const { SwTabPortion *pTabPor = 0; @@ -211,63 +210,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); -- cgit v1.2.3 From 6bb9d4a371c58882d12690b5aab7addc527f2958 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 25 Nov 2010 08:44:06 +0100 Subject: sw34bf03: #i115719# - method - assure that the and <description> attributes are not lost on insertion of caption for Writer graphic, embedded object or text frame --- sw/source/core/doc/doclay.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index ceb7d6e3463c..954deb7fbee3 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -1313,6 +1313,17 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co //Erstmal das Format zum Fly besorgen und das Layout entkoppeln. SwFrmFmt *pOldFmt = 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 = MakeFlyFrmFmt( GetUniqueFrameName(), @@ -1450,6 +1461,13 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co //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; -- cgit v1.2.3 From 5391eaa9083b7e724b3e1c4d6912eabc6b5919e9 Mon Sep 17 00:00:00 2001 From: Michael Stahl <mst@openoffice.org> Date: Fri, 17 Dec 2010 10:58:31 +0100 Subject: sw34bf03: SwXText::copyText(): lock solarmutex --- sw/inc/unotext.hxx | 12 ++++----- sw/source/core/unocore/unotext.cxx | 55 ++++++++++++++++++++------------------ 2 files changed, 35 insertions(+), 32 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unotext.hxx b/sw/inc/unotext.hxx index d6ada94d5396..908c48aac4ac 100644 --- a/sw/inc/unotext.hxx +++ b/sw/inc/unotext.hxx @@ -291,6 +291,12 @@ public: throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + // XTextCopy + virtual void SAL_CALL copyText( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextCopy >& xSource ) + throw (::com::sun::star::uno::RuntimeException); + // XTextRangeCompare sal_Int16 SAL_CALL compareRegionStarts( const ::com::sun::star::uno::Reference< @@ -334,12 +340,6 @@ public: ::com::sun::star::text::XTextContent>& xPredecessor) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - // XTextCopy - virtual void SAL_CALL copyText( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextCopy >& xSource ) - throw (::com::sun::star::uno::RuntimeException); }; #endif // SW_UNOTEXT_HXX diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 3ddcfc1d2ed7..b3533c88b32b 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1862,32 +1862,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, @@ -2393,6 +2367,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 ******************************************************************/ -- cgit v1.2.3 From ae6136a94397b4fcbdb278a35a3b30c87b070fb2 Mon Sep 17 00:00:00 2001 From: Michael Stahl <mst@openoffice.org> Date: Fri, 17 Dec 2010 11:00:57 +0100 Subject: sw34bf03: #i93908#: ODF: fix bogus style:num-suffix on bullet lists: Svx{Bullet,Num}PickTabPage, SwAutoFormat, SwWrtShell::NumOrBulletOn(): clear suffix when bullet lists are created. xmlnumi.cxx: ignore style:num-suffix written by defective OOo versions. --- sw/source/core/edit/autofmt.cxx | 3 +++ sw/source/ui/wrtsh/wrtsh1.cxx | 6 ++++++ 2 files changed, 9 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 639bab3c10c5..3e4077147b53 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -1542,6 +1542,9 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT 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/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 919ebbe079ba..f6ab3b915dd6 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -1282,6 +1282,9 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) // <-- aFmt.SetBulletChar( numfunc::GetBulletChar(static_cast<BYTE>(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<USHORT>(nLevel), aFmt); } @@ -1345,6 +1348,9 @@ void SwWrtShell::NumOrBulletOn(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# -- cgit v1.2.3 From 073fdc20778aa6a6f78405f37270903890643a62 Mon Sep 17 00:00:00 2001 From: os <os@openoffice.org> Date: Mon, 20 Dec 2010 12:00:37 +0100 Subject: #i102247# re-introduce export of outline --- sw/source/filter/ww8/rtfexport.cxx | 8 ++++++-- sw/source/filter/ww8/wrtw8nds.cxx | 8 ++++++-- sw/source/filter/ww8/wrtww8.cxx | 1 + sw/source/filter/ww8/wrtww8.hxx | 1 + 4 files changed, 14 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index f899d2160e86..754c48a4f2f1 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -1243,16 +1243,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 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 +1265,7 @@ 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/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 7b97b2fbdbc0..e4cafdc01461 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -2837,8 +2837,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 5c82f67a32f1..1827e1eba4a4 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3389,6 +3389,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 a4ab2c69aaa8..0a6dfb6abbb6 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -554,6 +554,7 @@ public: BYTE bSubstituteBullets : 1; // true: SubstituteBullet() gets called bool mbExportModeRTF; + bool mbOutOutlineOnly; // export outline nodes, only (send outline to clipboard/presentation) SwDoc *pDoc; SwPaM *pCurPam, *pOrigPam; -- cgit v1.2.3 From 16011587ae9487b7cd6a45f4ae6fdf364ef0b185 Mon Sep 17 00:00:00 2001 From: Michael Stahl <mst@openoffice.org> Date: Tue, 21 Dec 2010 16:45:35 +0100 Subject: sw34bf03: #i116192#: SwDoc::SetFixFields must not be called by timer: call it when receiving SFX_EVENT_DOCCREATED, which is synchronously dispatched much earlier, before API clients can access the document. --- sw/source/ui/app/apphdl.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 653208aaf250..ed4d630de6c1 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -701,14 +701,10 @@ 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_DOCCREATED: + OSL_ASSERT(!pWrtSh); + pDocSh->GetDoc()->SetFixFields(false, 0); break; -*/ case SFX_EVENT_CREATEDOC: // alle FIX-Date/Time Felder auf akt. setzen if( pWrtSh ) @@ -717,7 +713,6 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) sal_Bool bUpdateFields = sal_True; if( pUpdateDocItem && pUpdateDocItem->GetValue() == document::UpdateDocMode::NO_UPDATE) bUpdateFields = sal_False; - pWrtSh->SetFixFields(); if(bUpdateFields) { pWrtSh->UpdateInputFlds(); -- cgit v1.2.3 From c6d658988ed10b4bdfe4d66b4deb4e1f79df33ff Mon Sep 17 00:00:00 2001 From: Michael Stahl <mst@openoffice.org> Date: Tue, 21 Dec 2010 16:46:34 +0100 Subject: sw34bf03: #i115315#: make SwTxt{Ref,TOX}Mark parameters const --- sw/inc/txtrfmrk.hxx | 2 +- sw/inc/txttxmrk.hxx | 3 ++- sw/source/core/txtnode/atrref.cxx | 2 +- sw/source/core/txtnode/atrtox.cxx | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/txtrfmrk.hxx b/sw/inc/txtrfmrk.hxx index 75a5305041f0..d5deb2830eac 100644 --- a/sw/inc/txtrfmrk.hxx +++ b/sw/inc/txtrfmrk.hxx @@ -41,7 +41,7 @@ class SwTxtRefMark : public SwTxtAttrEnd public: SwTxtRefMark( SwFmtRefMark& rAttr, - xub_StrLen nStart, xub_StrLen * pEnd = 0 ); + xub_StrLen const nStart, xub_StrLen const*const pEnd = 0); virtual xub_StrLen * GetEnd(); // SwTxtAttr inline const xub_StrLen * GetEnd() const { return m_pEnd; } diff --git a/sw/inc/txttxmrk.hxx b/sw/inc/txttxmrk.hxx index efa88329c73b..311432d9287b 100644 --- a/sw/inc/txttxmrk.hxx +++ b/sw/inc/txttxmrk.hxx @@ -41,7 +41,8 @@ class SwTxtTOXMark : public SwTxtAttrEnd xub_StrLen * m_pEnd; // 0 if SwTOXMark without AlternativeText public: - SwTxtTOXMark( SwTOXMark& rAttr, xub_StrLen nStart, xub_StrLen * pEnd = 0 ); + SwTxtTOXMark( SwTOXMark& rAttr, + xub_StrLen const nStart, xub_StrLen const*const pEnd = 0); virtual ~SwTxtTOXMark(); virtual xub_StrLen *GetEnd(); // SwTxtAttr diff --git a/sw/source/core/txtnode/atrref.cxx b/sw/source/core/txtnode/atrref.cxx index 979a810b018b..ba2c3fce60c6 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 c02478fe1014..c6756409e782 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 ) -- cgit v1.2.3 From f9ab560c8b9bb08d3ad7e6b72ea8a8ecbedcdf47 Mon Sep 17 00:00:00 2001 From: Michael Stahl <mst@openoffice.org> Date: Tue, 21 Dec 2010 16:48:30 +0100 Subject: sw34bf03: #i115315#: refactor the copying of meta/meta-field: no longer delay the call to DoCopy() until after the new hint is inserted, but do it before; this fixes a crash on drag&drop in the same text node. this is also quite a bit less ugly, but there are still some hacks required: DoCopy() is now called by a new factory CreateTxtMeta(). DoCopy() needs to know the text node where the hint will be inserted. so the MakeTxtAttr() function needs to know whether it should insert a copy, and the target text node. this requires a new bit in the SetAttrMode enum: SETATTR_IS_COPY. also, sw::Meta can no longer get the text node from SwTxtMeta, because it is copied before the SwTxtMeta is inserted, so it now has a SwTxtNode* member. furthermore the notification stuff is refactored a bit. --- sw/inc/fmtmeta.hxx | 25 ++++++----- sw/inc/ndhints.hxx | 10 ++++- sw/inc/swtypes.hxx | 2 + sw/inc/txtatr.hxx | 21 ++++++--- sw/source/core/txtnode/fmtatr2.cxx | 85 +++++++++++++++++++------------------ sw/source/core/txtnode/ndtxt.cxx | 26 ++++++------ sw/source/core/txtnode/thints.cxx | 9 ++-- sw/source/core/txtnode/txtatr2.cxx | 18 +++++++- sw/source/core/unocore/unorefmk.cxx | 2 +- 9 files changed, 117 insertions(+), 81 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx index d09df11bb1aa..5a382c36fd56 100755 --- a/sw/inc/fmtmeta.hxx +++ b/sw/inc/fmtmeta.hxx @@ -74,17 +74,13 @@ namespace com { namespace sun { namespace star { * <li>The pool item is cloned (because it is non-poolable); the clone * points to the same metadatable entity, but the metadatable entity's * reverse pointer is unchanged.</li> - * <li>A new text hint is created, taking over the new pool item. - * Unfortunately, this also makes the metadatable entity point at the - * cloned pool item.</li> - * <li>The text hint is inserted into the hints array of some text node.</li> - * <li>The DoCopy() method must be called at the new pool item: - * it will clone the metadatable entity (using RegisterAsCopyOf), - * and fix the reverse pointer of the original to point at the - * original pool item. + * <li>The DoCopy() method is called at the new pool item: + * it will clone the metadatable entity (using RegisterAsCopyOf). * This is necessary, because first, a metadatable entity may * only be inserted once into a document, and second, the copy may be * inserted into a different document than the source document!</li> + * <li>A new text hint is created, taking over the new pool item.</li> + * <li>The text hint is inserted into the hints array of some text node.</li> * </ol> */ @@ -99,7 +95,7 @@ class SwFmtMeta : public SfxPoolItem { private: - friend class SwTxtMeta; // needs SetTxtAttr + friend class SwTxtMeta; // needs SetTxtAttr, DoCopy friend class ::sw::Meta; // needs m_pTxtAttr ::boost::shared_ptr< ::sw::Meta > m_pMeta; @@ -108,6 +104,10 @@ private: SwTxtMeta * GetTxtAttr() { return m_pTxtAttr; } void SetTxtAttr(SwTxtMeta * const i_pTxtAttr); + /// this method <em>must</em> be called when the hint is actually copied + void DoCopy(::sw::MetaFieldManager & i_rTargetDocManager, + SwTxtNode & i_rTargetTxtNode); + explicit SwFmtMeta( const USHORT i_nWhich ); public: @@ -119,14 +119,11 @@ public: // SfxPoolItem virtual int operator==( const SfxPoolItem & ) const; virtual SfxPoolItem * Clone( SfxItemPool *pPool = 0 ) const; -// TYPEINFO(); /// notify clients registered at m_pMeta that this meta is being (re-)moved void NotifyChangeTxtNode(SwTxtNode *const pTxtNode); static SwFmtMeta * CreatePoolDefault( const USHORT i_nWhich ); ::sw::Meta * GetMeta() { return m_pMeta.get(); } - /// this method <em>must</em> be called when the hint is actually copied - void DoCopy( SwFmtMeta & rOriginalMeta ); }; @@ -146,6 +143,7 @@ protected: ::com::sun::star::rdf::XMetadatable> m_wXMeta; SwFmtMeta * m_pFmt; + SwTxtNode * m_pTxtNode; SwTxtMeta * GetTxtAttr() const; SwTxtNode * GetTxtNode() const; // returns 0 if not in document (undo) @@ -153,7 +151,8 @@ protected: SwFmtMeta * GetFmtMeta() const { return m_pFmt; } void SetFmtMeta( SwFmtMeta * const i_pFmt ) { m_pFmt = i_pFmt; }; - void NotifyChangeTxtNode(); + void NotifyChangeTxtNodeImpl(); + void NotifyChangeTxtNode(SwTxtNode *const pTxtNode); ::com::sun::star::uno::WeakReference< ::com::sun::star::rdf::XMetadatable> const& GetXMeta() const diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx index c1d210464eb3..34224539e22b 100644 --- a/sw/inc/ndhints.hxx +++ b/sw/inc/ndhints.hxx @@ -33,7 +33,6 @@ #include "swtypes.hxx" -//#include "numrule.hxx" class SwTxtNode; class SwRegHistory; // steht im RolBck.hxx @@ -44,9 +43,16 @@ class SfxPoolItem; class SfxItemSet; class SwDoc; +typedef enum { + COPY = true, + NEW = false, +} CopyOrNew_t; + +// if COPY then pTxtNode must be given! SW_DLLPRIVATE SwTxtAttr * MakeTxtAttr( SwDoc & rDoc, SfxPoolItem & rNew, - xub_StrLen nStt, xub_StrLen nEnd ); + xub_StrLen const nStt, xub_StrLen const nEnd, + CopyOrNew_t const bIsCopy = NEW, SwTxtNode *const pTxtNode = 0); SW_DLLPRIVATE SwTxtAttr * MakeTxtAttr( SwDoc & rDoc, const SfxItemSet & rSet, xub_StrLen nStt, xub_StrLen nEnd ); diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx index 0d37e63c367d..d754b450b3b4 100644 --- a/sw/inc/swtypes.hxx +++ b/sw/inc/swtypes.hxx @@ -228,6 +228,8 @@ namespace nsSetAttrMode // functionality will be disabled) /// force hint expand (only matters for hints with CH_TXTATR) const SetAttrMode SETATTR_FORCEHINTEXPAND= 0x0080; + /// the inserted item is a copy -- intended for use in ndtxt.cxx + const SetAttrMode SETATTR_IS_COPY = 0x0100; } //Umrechnung Twip<-> 1/100 mm fuer UNO diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx index 65ecd951868c..75be35e44821 100644 --- a/sw/inc/txtatr.hxx +++ b/sw/inc/txtatr.hxx @@ -34,6 +34,11 @@ class SwTxtNode; // fuer SwTxtFld class SwCharFmt; +namespace sw { + class MetaFieldManager; +} + + // ATT_CHARFMT ********************************************* class SwTxtCharFmt : public SwTxtAttrEnd @@ -61,7 +66,7 @@ public: class SwTxtAttrNesting : public SwTxtAttrEnd { -public: +protected: SwTxtAttrNesting( SfxPoolItem & i_rAttr, const xub_StrLen i_nStart, const xub_StrLen i_nEnd ); virtual ~SwTxtAttrNesting(); @@ -70,16 +75,20 @@ public: class SwTxtMeta : public SwTxtAttrNesting { private: - SwTxtNode * m_pTxtNode; - -public: SwTxtMeta( SwFmtMeta & i_rAttr, const xub_StrLen i_nStart, const xub_StrLen i_nEnd ); + +public: + static 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); + virtual ~SwTxtMeta(); void ChgTxtNode(SwTxtNode * const pNode); - SwTxtNode * GetTxtNode() const { return m_pTxtNode; } - }; diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index 245ec916fd4a..76d5b41de943 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 d6a6dfb045ac..66f7ea09d1c7 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1434,15 +1434,10 @@ void lcl_CopyHint( const USHORT 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; } } @@ -1483,7 +1478,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, @@ -1494,7 +1490,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); } } } @@ -1716,9 +1713,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() ); @@ -1726,7 +1723,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 ); @@ -2206,7 +2205,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 4d56942ecef4..4a0132bc7e68 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -995,7 +995,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()) ) { @@ -1076,7 +1077,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"); @@ -1210,7 +1212,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 5499eeab4439..482d7d56a16a 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/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 25ce3ec6c441..c1c003791320 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! -- cgit v1.2.3 From b9cdf2916f3b5bba0e1eaefb176e5e36cf472b00 Mon Sep 17 00:00:00 2001 From: Michael Stahl <mst@openoffice.org> Date: Wed, 22 Dec 2010 12:44:24 +0100 Subject: sw34bf03: #i116192#: fix regression: SwDoc::SetFixFields must be called when creating document from template. apparently the SFX_EVENT_DOCCREATED event is not sent in this case. so use SFX_EVENT_LOADFINISHED and check whether the medium has a template. --- sw/source/ui/app/apphdl.cxx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index ed4d630de6c1..f24f806a3638 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -701,12 +701,22 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) SwWrtShell* pWrtSh = pDocSh ? pDocSh->GetWrtShell() : 0; switch( rEvHint.GetEventId() ) { - case SFX_EVENT_DOCCREATED: + case SFX_EVENT_LOADFINISHED: OSL_ASSERT(!pWrtSh); - pDocSh->GetDoc()->SetFixFields(false, 0); + // 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); -- cgit v1.2.3 From 79824f568195c08d70d07fc579a3b11a83f6c33c Mon Sep 17 00:00:00 2001 From: Michael Stahl <mst@openoffice.org> Date: Wed, 22 Dec 2010 18:19:41 +0100 Subject: sw34bf03: #i115174#: XMLRedlineImportHelper: do not crash if there is a XTextRange that is not a SwXTextRange. --- sw/source/filter/xml/XMLRedlineImportHelper.cxx | 52 ++++++++++++++++++------- 1 file changed, 37 insertions(+), 15 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index 2b9e95d10c26..82c654873d24 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()) -- cgit v1.2.3 From 9f91d52bc964a24c3aec5b14fdb5a61da6869bd2 Mon Sep 17 00:00:00 2001 From: Michael Stahl <mst@openoffice.org> Date: Wed, 22 Dec 2010 18:35:28 +0100 Subject: sw34bf03: #i113655#: patch by cmc: fix possible null pointer in ApplyUsrPref --- sw/source/ui/app/swmodul1.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx index 2b3a5df1391b..4f2ea8ac2b81 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 ); -- cgit v1.2.3 From 62317e72f4883015ccf46fcb01f9e1585a5929f4 Mon Sep 17 00:00:00 2001 From: os <os@openoffice.org> Date: Tue, 28 Dec 2010 12:04:40 +0100 Subject: #i115916# replacements of one character to multiple characters fixed --- sw/source/core/edit/acorrect.cxx | 20 ++++++++++++++++++-- sw/source/core/inc/acorrect.hxx | 1 + 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index b7e92570df42..f38b707c26d5 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -153,6 +153,10 @@ BOOL SwAutoCorrDoc::Insert( xub_StrLen nPos, const String& rTxt ) BOOL SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt ) +{ + return ReplaceRange( nPos, rTxt.Len(), rTxt ); +} +BOOL SwAutoCorrDoc::ReplaceRange( xub_StrLen nPos, xub_StrLen nSourceLength, const String& rTxt ) { SwPaM* pPam = &rCrsr; if( pPam->GetPoint()->nContent.GetIndex() != nPos ) @@ -201,14 +205,26 @@ 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/inc/acorrect.hxx b/sw/source/core/inc/acorrect.hxx index bc2d2d4cb1f3..7d50d90e88a6 100644 --- a/sw/source/core/inc/acorrect.hxx +++ b/sw/source/core/inc/acorrect.hxx @@ -68,6 +68,7 @@ public: virtual BOOL Delete( xub_StrLen nStt, xub_StrLen nEnd ); virtual BOOL Insert( xub_StrLen nPos, const String& rTxt ); virtual BOOL Replace( xub_StrLen nPos, const String& rTxt ); + virtual BOOL ReplaceRange( xub_StrLen nPos, xub_StrLen nLen, const String& rTxt ); virtual BOOL SetAttr( xub_StrLen nStt, xub_StrLen nEnd, USHORT nSlotId, SfxPoolItem& ); -- cgit v1.2.3 From 464ff123b7bea92e8434a534cc16bd78141a9da6 Mon Sep 17 00:00:00 2001 From: os <os@openoffice.org> Date: Tue, 28 Dec 2010 12:53:19 +0100 Subject: #i116193# loop in iteration over bookmarks and attriubtes fixed --- sw/source/filter/ww8/wrtw8nds.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index e4cafdc01461..c1c63215e317 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1650,12 +1650,13 @@ xub_StrLen MSWordExportBase::GetNextPos( SwAttrIter* aAttrIter, const SwTxtNode& { // 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 ); } @@ -1663,9 +1664,9 @@ void MSWordExportBase::UpdatePosition( SwAttrIter* aAttrIter, xub_StrLen nAktPos { 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(); } -- cgit v1.2.3 From 49e2d2c381f2e4ced9e74614bcef60981e8c453b Mon Sep 17 00:00:00 2001 From: os <os@openoffice.org> Date: Wed, 29 Dec 2010 15:01:44 +0100 Subject: #i113790# timer activation of page field bound to up and down, only --- sw/source/ui/utlui/navipi.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 25633a7b691f..9b77ddcc4daf 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -807,7 +807,8 @@ 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->SetUpHdl(LINK(this, SwNavigationPI, PageEditModifyHdl)); + pEdit->SetDownHdl(LINK(this, SwNavigationPI, PageEditModifyHdl)); bPageCtrlsVisible = TRUE; -- cgit v1.2.3 From 72734ea38f49533da6ae1f5d63b393b9608d13bc Mon Sep 17 00:00:00 2001 From: os <os@openoffice.org> Date: Thu, 30 Dec 2010 09:18:24 +0100 Subject: #i114411# enable 'from top' distance also in frame styles --- sw/source/ui/frmdlg/frmpage.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index c1747efaa962..bcb15ec630a7 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -1271,7 +1271,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 ); -- cgit v1.2.3 From ddb95ff3861e3d46e840bb8c83f746754f179072 Mon Sep 17 00:00:00 2001 From: os <os@openoffice.org> Date: Thu, 30 Dec 2010 11:22:06 +0100 Subject: #i116258# auto delete temporary SwCursor* --- sw/source/core/crsr/swcrsr.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 7637df0a67b4..c9c52193cdd9 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -973,7 +973,7 @@ 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 @@ -1005,7 +1005,6 @@ ULONG SwCursor::FindAll( SwFindParas& rParas, return 0; } - delete pSav; if( !( FND_IN_SELALL & eFndRngs )) { // es sollte nur einer gesucht werden, also fuege in dazu @@ -1031,7 +1030,7 @@ 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,9 +1057,6 @@ 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; while( GetNext() != this ) delete GetNext(); -- cgit v1.2.3 From ff16107d1cddab1ec78cffdbb4d6852db18e6be8 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" <Philipp.Lohmann@Oracle.COM> Date: Wed, 19 Jan 2011 16:33:54 +0100 Subject: vcl118: #i115048# revert brochure printing in writer to old behavior taking the paper size form the printer driver, add paper name to print preview --- sw/source/ui/uno/unotxdoc.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'sw/source') diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index b0b95657600c..4398de187871 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2897,6 +2897,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 @@ -2906,6 +2909,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 -- cgit v1.2.3 From a3c0c3a8762e47be72de05ac3ae1fc5032f2a1a9 Mon Sep 17 00:00:00 2001 From: Michael Stahl <mst@openoffice.org> Date: Fri, 21 Jan 2011 13:02:05 +0100 Subject: sw34bf03: #i115495#: patch by cmc: fix 64-bit problem in WW8 RTL table import --- sw/source/filter/ww8/ww8par2.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index f848b6332c38..82eb80b1254f 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(); } -- cgit v1.2.3 From 6ec0a79f441826a97537c13b2c161b6de6aa617d Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" <malte.timmermann@oracle.com> Date: Fri, 21 Jan 2011 15:13:49 +0100 Subject: accfixes: added more accessibility information and fixed tab orders in multiple dialogs (sw module) --- sw/inc/access.hrc | 10 ++++++++- sw/inc/colwd.hxx | 2 +- sw/inc/poolfmt.hrc | 9 +++++++- sw/inc/unomap.hxx | 6 ++++-- sw/source/ui/chrdlg/break.cxx | 3 +++ sw/source/ui/chrdlg/chardlg.cxx | 2 ++ sw/source/ui/chrdlg/numpara.cxx | 2 ++ sw/source/ui/chrdlg/swuiccoll.cxx | 4 ++++ sw/source/ui/config/optpage.cxx | 7 ++++++ sw/source/ui/dialog/uiregionsw.cxx | 10 +++++++++ sw/source/ui/docvw/access.src | 19 +++++++++++++++++ sw/source/ui/envelp/labprt.hxx | 4 ++-- sw/source/ui/envelp/swuilabimp.hxx | 7 +++--- sw/source/ui/fldui/fldfunc.cxx | 14 ++++++++++++ sw/source/ui/frmdlg/column.cxx | 34 +++++++++++++++++++++++++++++ sw/source/ui/frmdlg/column.hrc | 8 ++++++- sw/source/ui/frmdlg/column.src | 10 +++++++++ sw/source/ui/frmdlg/frmpage.cxx | 4 ++++ sw/source/ui/inc/bookmark.hxx | 2 +- sw/source/ui/inc/break.hxx | 2 +- sw/source/ui/inc/column.hxx | 6 +++--- sw/source/ui/inc/docstdlg.hxx | 17 +++++++-------- sw/source/ui/inc/drpcps.hxx | 4 ++-- sw/source/ui/inc/frmpage.hxx | 12 +++++------ sw/source/ui/inc/glosbib.hxx | 7 +++--- sw/source/ui/inc/insfnote.hxx | 4 ++-- sw/source/ui/inc/linenum.hxx | 6 +++--- sw/source/ui/inc/num.hxx | 4 ++-- sw/source/ui/inc/numpara.hxx | 2 +- sw/source/ui/inc/optpage.hxx | 2 +- sw/source/ui/inc/outline.hxx | 4 ++-- sw/source/ui/inc/pgfnote.hxx | 4 ++-- sw/source/ui/inc/rowht.hxx | 2 +- sw/source/ui/inc/split.hxx | 4 ++-- sw/source/ui/inc/srtdlg.hxx | 4 ++-- sw/source/ui/inc/swrenamexnameddlg.hxx | 2 +- sw/source/ui/inc/swuicnttab.hxx | 10 ++++----- sw/source/ui/inc/swuiidxmrk.hxx | 2 +- sw/source/ui/inc/tautofmt.hxx | 2 +- sw/source/ui/index/cnttab.cxx | 27 +++++++++++++++++++++++ sw/source/ui/index/cnttab.hrc | 1 + sw/source/ui/index/cnttab.src | 6 ++++++ sw/source/ui/index/swuiidxmrk.cxx | 2 ++ sw/source/ui/misc/docfnote.cxx | 2 ++ sw/source/ui/misc/glossary.cxx | 4 +++- sw/source/ui/misc/glossary.hrc | 4 +++- sw/source/ui/misc/glossary.src | 6 ++++++ sw/source/ui/misc/impfnote.hxx | 8 +++---- sw/source/ui/misc/insfnote.cxx | 4 ++++ sw/source/ui/misc/insfnote.hrc | 4 ++++ sw/source/ui/misc/insfnote.src | 6 ++++++ sw/source/ui/misc/linenum.cxx | 11 ++++++++++ sw/source/ui/misc/num.cxx | 3 +++ sw/source/ui/misc/outline.cxx | 7 +++++- sw/source/ui/misc/pgfnote.cxx | 1 + sw/source/ui/misc/srtdlg.cxx | 39 ++++++++++++++++++++++++++++++++++ sw/source/ui/table/convert.cxx | 2 ++ sw/source/ui/table/convert.hrc | 3 +++ sw/source/ui/table/convert.src | 6 ++++++ sw/source/ui/table/tabledlg.cxx | 20 ++++++++++++++++- sw/source/ui/table/tabledlg.hrc | 3 +++ sw/source/ui/table/tabledlg.src | 6 ++++++ sw/source/ui/table/tablepg.hxx | 3 +-- sw/source/ui/utlui/content.cxx | 18 ---------------- sw/source/ui/utlui/navipi.cxx | 6 +++++- sw/source/ui/utlui/navipi.hrc | 4 ++++ sw/source/ui/utlui/navipi.src | 12 +++++++++++ sw/source/ui/utlui/poolfmt.src | 23 +++++++++++++++++++- 68 files changed, 404 insertions(+), 94 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc index b6c6bb30086e..94fdfc254e7b 100644 --- a/sw/inc/access.hrc +++ b/sw/inc/access.hrc @@ -52,7 +52,15 @@ #define STR_ACCESS_ANNOTATION_BUTTON_NAME (RC_ACCESS_BEGIN + 20) #define STR_ACCESS_ANNOTATION_BUTTON_DESC (RC_ACCESS_BEGIN + 21) -#define ACCESS_ACT_END STR_ACCESS_ANNOTATION_BUTTON_DESC +//IAccessibility2 Implementation 2009----- +#define STR_ACCESS_PREVIEW_DOC_NAME (RC_ACCESS_BEGIN + 22) +//#define STR_ACCESS_PREVIEW_DOC_DESC (RC_ACCESS_BEGIN + 23) +#define STR_ACCESS_PREVIEW_DOC_SUFFIX (RC_ACCESS_BEGIN + 24) +#define STR_ACCESS_DOC_WORDPROCESSING (RC_ACCESS_BEGIN + 25) +#define STR_ACCESS_DOC_WORDPROCESSING_READONLY (RC_ACCESS_BEGIN + 26) +//-----IAccessibility2 Implementation 2009 + +#define ACCESS_ACT_END STR_ACCESS_DOC_WORDPROCESSING_READONLY #if ACCESS_ACT_END > RC_ACCESS_END #error Resource-Id Ueberlauf in #file, #line diff --git a/sw/inc/colwd.hxx b/sw/inc/colwd.hxx index 3afb1647f4ad..54df3b1b9f24 100644 --- a/sw/inc/colwd.hxx +++ b/sw/inc/colwd.hxx @@ -41,11 +41,11 @@ class SwTableFUNC; class SwTableWidthDlg : public SvxStandardDialog { + FixedLine aWidthFL; FixedText aColFT; NumericField aColEdit; FixedText aWidthFT; MetricField aWidthEdit; - FixedLine aWidthFL; OKButton aOKBtn; CancelButton aCancelBtn; HelpButton aHelpBtn; diff --git a/sw/inc/poolfmt.hrc b/sw/inc/poolfmt.hrc index f191f0fac78c..e68de680c243 100644 --- a/sw/inc/poolfmt.hrc +++ b/sw/inc/poolfmt.hrc @@ -268,7 +268,14 @@ #define STR_POOLNUMRULE_BUL3 (RC_POOLNUMRULE_BEGIN+ 7) #define STR_POOLNUMRULE_BUL4 (RC_POOLNUMRULE_BEGIN+ 8) #define STR_POOLNUMRULE_BUL5 (RC_POOLNUMRULE_BEGIN+ 9) - +//IAccessibility2 Impplementaton 2009----- +//Solution:Define column item's accessible name ID. +#define STR_COLUMN_VALUESET_ITEM0 (RC_POOLNUMRULE_BEGIN + 10 ) +#define STR_COLUMN_VALUESET_ITEM1 (RC_POOLNUMRULE_BEGIN + 11 ) +#define STR_COLUMN_VALUESET_ITEM2 (RC_POOLNUMRULE_BEGIN + 12 ) +#define STR_COLUMN_VALUESET_ITEM3 (RC_POOLNUMRULE_BEGIN + 13 ) +#define STR_COLUMN_VALUESET_ITEM4 (RC_POOLNUMRULE_BEGIN + 14 ) +//-----IAccessibility2 Impplementaton 2009 //----------------- // Paragraph styles //----------------- diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx index abeedbd8a0de..6f085bf0d26a 100644 --- a/sw/inc/unomap.hxx +++ b/sw/inc/unomap.hxx @@ -129,8 +129,10 @@ #define PROPERTY_MAP_PARA_AUTO_STYLE 96 #define PROPERTY_MAP_FLDTYP_DOCINFO_CUSTOM 97 #define PROPERTY_MAP_METAFIELD 98 - -#define PROPERTY_MAP_END 99 +//IAccessibility2 Implementation 2009----- +#define PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE 99 +//-----IAccessibility2 Implementation 2009 +#define PROPERTY_MAP_END 100 //S&E #define WID_WORDS 0 diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index 63d878006f7e..a70cfe90e168 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -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 38b1ba906fdd..d1d415fd2c45 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, FALSE, &pItem) || diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index f80130f475e9..1f1380c69ff2 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -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 44006ef5cab4..c468cb886c51 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 6e6ed773a33d..db86e39bf02b 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1972,6 +1972,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/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 5acc169c4979..83c1b851fbab 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 42081d3ab7e7..d455c01d0cf3 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/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx index 1f8ff491423d..afebc78b4e82 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 2bfcc7e27cae..2bbbc8526f10 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 ae05a35681a7..171e460eb1a5 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(TRUE); bName = 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 = TRUE; + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); } break; @@ -365,18 +371,24 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG ) } bName = bValue = 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 = TRUE; + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); break; case TYP_INPUTFLD: aValueFT.SetText(SW_RESSTR(STR_PROMPT)); bValue = 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 USHORT nLen = aNameED.GetText().Len(); if( !nLen || nLen > MAX_COMBINED_CHARACTERS ) bInsert = 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 0a3c8cc33623..508b69509d08 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -505,6 +505,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 +918,41 @@ void SwColumnPage::SetLabels( USHORT 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_COLUMN_WIDTH ) ; + sColumnWidth.SearchAndReplaceAscii("%1", tmp1); + aEd1.SetAccessibleName(sColumnWidth); + + sColumnWidth = SW_RESSTR( STR_COLUMN_WIDTH ) ; + sColumnWidth.SearchAndReplaceAscii("%1", tmp2); + aEd2.SetAccessibleName(sColumnWidth); + + sColumnWidth = SW_RESSTR( STR_COLUMN_WIDTH ) ; + sColumnWidth.SearchAndReplaceAscii("%1", tmp3); + aEd3.SetAccessibleName(sColumnWidth); + + String sDist = SW_RESSTR( STR_PAGESETUP_SPACING ) ; + String sDist1 = sDist; + sDist1.SearchAndReplaceAscii("%1", tmp1); + sDist1.SearchAndReplaceAscii("%2", tmp2); + aDistEd1.SetAccessibleName(sDist1); + + String sDist2 = sDist; + sDist2.SearchAndReplaceAscii("%1", tmp2); + sDist2.SearchAndReplaceAscii("%2", tmp3); + aDistEd2.SetAccessibleName(sDist2); } /*------------------------------------------------------------------------ diff --git a/sw/source/ui/frmdlg/column.hrc b/sw/source/ui/frmdlg/column.hrc index dd8b81e0c91a..86f23bed3029 100644 --- a/sw/source/ui/frmdlg/column.hrc +++ b/sw/source/ui/frmdlg/column.hrc @@ -79,9 +79,15 @@ #define FT_TEXTDIRECTION 60 #define LB_TEXTDIRECTION 61 #define FL_VERT 62 - +//IAccessibility2 Impplementaton 2009----- +#define STR_PAGESETUP_SPACING 32765 +//-----IAccessibility2 Impplementaton 2009 #define LISTBOX_SELECTION 0 #define LISTBOX_SECTION 1 #define LISTBOX_SECTIONS 2 #define LISTBOX_PAGE 3 #define LISTBOX_FRAME 4 + +//IAccessibility2 Impplementaton 2009----- +#define STR_COLUMN_WIDTH 63 +//-----IAccessibility2 Impplementaton 2009 diff --git a/sw/source/ui/frmdlg/column.src b/sw/source/ui/frmdlg/column.src index 04e91ce3560a..10b602f755d6 100644 --- a/sw/source/ui/frmdlg/column.src +++ b/sw/source/ui/frmdlg/column.src @@ -416,4 +416,14 @@ ModalDialog DLG_COLUMN Text [ en-US ] = "Columns"; }; +//IAccessibility2 Impplementaton 2009----- +String STR_PAGESETUP_SPACING +{ + Text [ en-US ] = "Spacing between %1 and %2"; +}; +String STR_COLUMN_WIDTH +{ + Text [ en-US ] = "Column %1 Width"; +}; +//-----IAccessibility2 Impplementaton 2009 diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index c1747efaa962..56af2292371a 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -685,6 +685,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 ); @@ -2354,6 +2356,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)); diff --git a/sw/source/ui/inc/bookmark.hxx b/sw/source/ui/inc/bookmark.hxx index 29c3173787a9..ba539d3241e8 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 447afd8ca567..cd470e286c19 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 f2a5e37d283b..9bc28ff87508 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 f269693975cc..e0c2056680ab 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 50140443f726..cb15b885bfe0 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/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx index 979f5cf12dd6..9b1f646e6bf7 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; @@ -286,6 +286,7 @@ public: class SwFrmAddPage : public SfxTabPage { + FixedLine aNamesFL; FixedText aNameFT; Edit aNameED; FixedText aAltNameFT; @@ -294,19 +295,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 c96e4177027b..87f1270557c9 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 c9c51301a100..8d8d6feabf3a 100644 --- a/sw/source/ui/inc/insfnote.hxx +++ b/sw/source/ui/inc/insfnote.hxx @@ -50,16 +50,16 @@ class SwInsFootNoteDlg: public SvxStandardDialog char cExtChar; BOOL bExtCharAvailable; 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 62da2e1925ef..5cf50d3182a7 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 2233f9609fe4..be7df96bbd6d 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 f8d748c4473c..a69a29394e90 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 61b8056aa309..0f8fd5ece7c2 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 65f57636c02d..438d704eeccd 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 31bb0c68fc22..8911e3ad22b2 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 e4b497246cd7..6ad4e5f7ab19 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 eafe394d2b27..c23c30035388 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 09d91cf64195..42556ce3d6f4 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 16f3d56852e6..d15c90935c85 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 4a1294187876..1cd72dfc2cdd 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 3f529f91affe..af80795a97e5 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 9c35450eb208..1d8889b8936f 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 a453a46988ee..b7a74a088347 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 ); @@ -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(); @@ -2124,6 +2135,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); @@ -3923,6 +3944,7 @@ SwTOXStylesTabPage::SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrS m_pCurrentForm(0) { FreeResource(); + SetExchangeSupport( sal_True ); aAssignBT.SetModeImage( Image( SW_RES( IMG_ONE_LEFT_HC ) ), BMP_COLOR_HIGHCONTRAST ); @@ -3933,6 +3955,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 c544be2c7a2e..4a3457b3ce81 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 9b97b8931b7f..a21d8920c78d 100644 --- a/sw/source/ui/index/cnttab.src +++ b/sw/source/ui/index/cnttab.src @@ -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 54d1fab4cc0c..b1b3b7031999 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -167,6 +167,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/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 67fc32bcf1c9..6e1c52482339 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -156,6 +156,8 @@ SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, 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/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 2d2c1989d65c..67b5f89d601d 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -152,11 +152,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 * ); @@ -298,6 +298,8 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame, aCategoryBox.GetModel()->SetSortMode(SortAscending); aCategoryBox.SetHighlightRange(); // ueber volle Breite selektieren aCategoryBox.SetNodeDefaultImages( ); + aCategoryBox.SetAccessibleName(SW_RES(STR_SW_CATEGORY)); + aCategoryBox.SetAccessibleRelationLabeledBy(&aInsertTipCB); Init(); } diff --git a/sw/source/ui/misc/glossary.hrc b/sw/source/ui/misc/glossary.hrc index 4ee5aaaa7ede..40c230a2e8c4 100644 --- a/sw/source/ui/misc/glossary.hrc +++ b/sw/source/ui/misc/glossary.hrc @@ -88,4 +88,6 @@ #define FL_NN 9 #define BT_CANCEL 10 #define BT_OKNEW 11 - +//IAccessibility2 Implementation 2009----- +#define STR_SW_CATEGORY 12 +//-----IAccessibility2 Implementation 2009 diff --git a/sw/source/ui/misc/glossary.src b/sw/source/ui/misc/glossary.src index 3dddc5218398..745be55bad00 100644 --- a/sw/source/ui/misc/glossary.src +++ b/sw/source/ui/misc/glossary.src @@ -288,6 +288,12 @@ String STR_GLOSSARY { Text [ en-US ] = "AutoText :" ; }; +/*IAccessibility2 Implementation 2009-----*/ +String STR_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 a1b305b3b7db..ce9f8bd9cd1d 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 5cc82f8473eb..828259a891cd 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -249,6 +249,10 @@ SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, BOOL bEd 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 8ac15b4f9fc3..d8e534f9255a 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 265ee1e095f6..964f174f189b 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 213c0e99e413..a5e64110c91b 100644 --- a/sw/source/ui/misc/linenum.cxx +++ b/sw/source/ui/misc/linenum.cxx @@ -129,6 +129,17 @@ SwLineNumberingPage::SwLineNumberingPage( Window* pParent, aCountFL ( this, SW_RES( FL_COUNT )) { + 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 43c92a72a3f7..60c88a56461b 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -144,6 +144,9 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent, SetExchangeSupport(); aPreviewWIN.SetBackground(Wallpaper(Color(COL_TRANSPARENT))); + aStandardPB.SetAccessibleRelationMemberOf(&aPositionFL); + + aRelativeCB.Check(); aAlignLB.SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl)); // --> OD 2008-02-01 #newlistlevelattrs# diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 5380a00afbaf..ab4dc7484e40 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; @@ -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() ); diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index 9d940b33d332..f569eeb938ea 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -184,6 +184,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 be7622319626..b81c55bf855b 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -185,6 +185,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 +275,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 +448,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 +458,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/table/convert.cxx b/sw/source/ui/table/convert.cxx index 8be2bbdbb498..9b79f73ea15c 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 7f7cbbec768f..b8a29a17c380 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 c15b4ad4456c..911672509611 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/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 5b26b99d012f..c6cd79b9f107 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -852,6 +852,9 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent, FreeResource(); SetExchangeSupport(); + aDownBtn.SetAccessibleRelationMemberOf(&aColFL); + aUpBtn.SetAccessibleRelationMemberOf(&aColFL); + pFieldArr[0] = &aMF1; pFieldArr[1] = &aMF2; pFieldArr[2] = &aMF3; @@ -986,8 +989,16 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox ) for( USHORT 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_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); @@ -1458,6 +1469,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 843bec591d9e..4c858f9fcb98 100644 --- a/sw/source/ui/table/tabledlg.hrc +++ b/sw/source/ui/table/tabledlg.hrc @@ -106,5 +106,8 @@ #define FL_VERT_ORIENT 140 #define RB_FROM_LEFT 144 +//IAccessibility2 Impplementaton 2009----- +#define STR_COLUMN_WIDTH 145 +//-----IAccessibility2 Impplementaton 2009 #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 79300699bd33..4ac846597530 100644 --- a/sw/source/ui/table/tabledlg.src +++ b/sw/source/ui/table/tabledlg.src @@ -787,3 +787,9 @@ InfoBox MSG_WRONG_TABLENAME Message [ en-US ] = "The name of the table must not contain spaces." ; }; +//IAccessibility2 Impplementaton 2009----- +String STR_COLUMN_WIDTH +{ + Text [ en-US ] = "Column %1 Width" ; +}; +//-----IAccessibility2 Impplementaton 2009 diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx index 86eff4a23f08..129c66bf5735 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/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index 6eab64f68a60..851b6793fc0a 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -36,9 +36,7 @@ #include <tools/urlobj.hxx> #include <sfx2/docfile.hxx> #include <sfx2/dispatch.hxx> -#ifndef _HELP_HXX #include <vcl/help.hxx> -#endif #include <sot/formats.hxx> #include <vcl/sound.hxx> #include <uiitems.hxx> @@ -47,13 +45,9 @@ #include <fmtfld.hxx> #include <swmodule.hxx> #include <wrtsh.hxx> -#ifndef _VIEW_HXX #include <view.hxx> -#endif #include <errhdl.hxx> -#ifndef _DOCSH_HXX #include <docsh.hxx> -#endif #include <content.hxx> #include <frmfmt.hxx> #include <fldbas.hxx> @@ -69,24 +63,12 @@ #include <doc.hxx> #include <unotools.hxx> #include <crsskip.hxx> -#ifndef _CMDID_H #include <cmdid.h> -#endif -#ifndef _HELPID_H #include <helpid.h> -#endif -#ifndef _NAVIPI_HRC #include <navipi.hrc> -#endif -#ifndef _UTLUI_HRC #include <utlui.hrc> -#endif -#ifndef _MISC_HRC #include <misc.hrc> -#endif -#ifndef _COMCORE_HRC #include <comcore.hrc> -#endif #include <com/sun/star/text/XTextSectionsSupplier.hpp> #include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp> #include <com/sun/star/text/XTextTablesSupplier.hpp> diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 25633a7b691f..53b8b1aa2e54 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -808,7 +808,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, pEdit->SetActionHdl(LINK(this, SwNavigationPI, EditAction)); pEdit->SetGetFocusHdl(LINK(this, SwNavigationPI, EditGetFocus)); pEdit->SetModifyHdl(LINK(this, SwNavigationPI, PageEditModifyHdl)); - + pEdit->SetAccessibleName(pEdit->GetQuickHelpText()); bPageCtrlsVisible = TRUE; // Rectangle aFirstRect = aContentToolBox.GetItemRect(FN_SHOW_ROOT); @@ -933,6 +933,10 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, UsePage(0); aPageChgTimer.SetTimeoutHdl(LINK(this, SwNavigationPI, ChangePageHdl)); aPageChgTimer.SetTimeout(PAGE_CHANGE_TIMEOUT); + + aContentTree.SetAccessibleName(SW_RESSTR(ST_TL_CONTENT)); + aGlobalTree.SetAccessibleName(SW_RESSTR(ST_TL_GLOBAL)); + aDocListBox.SetAccessibleName(aStatusArr[3]); } /*------------------------------------------------------------------------ diff --git a/sw/source/ui/utlui/navipi.hrc b/sw/source/ui/utlui/navipi.hrc index 8254e2dc92a9..47dfe3ec4bab 100644 --- a/sw/source/ui/utlui/navipi.hrc +++ b/sw/source/ui/utlui/navipi.hrc @@ -89,3 +89,7 @@ #define ST_POSTIT_HIDE (ST_GLOBAL_CONTEXT_FIRST +36) #define ST_POSTIT_DELETE (ST_GLOBAL_CONTEXT_FIRST +37) +//IAccessibility2 Implementation 2009----- +#define ST_TL_GLOBAL ST_GLOBAL_CONTEXT_FIRST +38 +#define ST_TL_CONTENT ST_GLOBAL_CONTEXT_FIRST +39 +//-----IAccessibility2 Implementation 2009 diff --git a/sw/source/ui/utlui/navipi.src b/sw/source/ui/utlui/navipi.src index 0c45e3203df0..e9d07896f321 100644 --- a/sw/source/ui/utlui/navipi.src +++ b/sw/source/ui/utlui/navipi.src @@ -534,3 +534,15 @@ ImageList IMG_NAVI_ENTRYBMPH MaskColor = IMAGE_MASK_COLOR ; NAVI_ENTRY_IDS }; + +//IAccessibility2 Implementation 2009----- +String ST_TL_GLOBAL +{ + Text [ en-US ] = "Global View"; +}; +String ST_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 de3f74fb857d..a1d0fcbcfe76 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"; -- cgit v1.2.3 From 1005caba73b82b7bf272a19ffd2801579941129d Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" <malte.timmermann@oracle.com> Date: Sat, 22 Jan 2011 13:31:45 +0100 Subject: accfixes: global resources need id greater 256, moved global resources to access.hrc --- sw/inc/access.hrc | 9 +++++++-- sw/source/ui/frmdlg/column.cxx | 10 ++++++---- sw/source/ui/frmdlg/column.hrc | 7 ------- sw/source/ui/frmdlg/column.src | 6 ++++-- sw/source/ui/misc/glossary.cxx | 4 +++- sw/source/ui/misc/glossary.hrc | 4 +--- sw/source/ui/misc/glossary.src | 4 +++- sw/source/ui/table/tabledlg.cxx | 4 +++- sw/source/ui/table/tabledlg.hrc | 4 +--- sw/source/ui/table/tabledlg.src | 7 ------- sw/source/ui/utlui/navipi.cxx | 6 ++++-- sw/source/ui/utlui/navipi.hrc | 5 ----- sw/source/ui/utlui/navipi.src | 5 +++-- 13 files changed, 35 insertions(+), 40 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc index 94fdfc254e7b..b33b19b814c7 100644 --- a/sw/inc/access.hrc +++ b/sw/inc/access.hrc @@ -54,13 +54,18 @@ //IAccessibility2 Implementation 2009----- #define STR_ACCESS_PREVIEW_DOC_NAME (RC_ACCESS_BEGIN + 22) -//#define STR_ACCESS_PREVIEW_DOC_DESC (RC_ACCESS_BEGIN + 23) +//#define STR_ACCESS_PREVIEW_DOC_DESC (RC_ACCESS_BEGIN + 23) #define STR_ACCESS_PREVIEW_DOC_SUFFIX (RC_ACCESS_BEGIN + 24) #define STR_ACCESS_DOC_WORDPROCESSING (RC_ACCESS_BEGIN + 25) #define STR_ACCESS_DOC_WORDPROCESSING_READONLY (RC_ACCESS_BEGIN + 26) +#define STR_ACCESS_COLUMN_WIDTH (RC_ACCESS_BEGIN + 27) +#define STR_ACCESS_PAGESETUP_SPACING (RC_ACCESS_BEGIN + 28) +#define STR_ACCESS_SW_CATEGORY (RC_ACCESS_BEGIN + 29) +#define STR_ACCESS_TL_GLOBAL (RC_ACCESS_BEGIN + 30) +#define STR_ACCESS_TL_CONTENT (RC_ACCESS_BEGIN + 31) //-----IAccessibility2 Implementation 2009 -#define ACCESS_ACT_END STR_ACCESS_DOC_WORDPROCESSING_READONLY +#define ACCESS_ACT_END STR_ACCESS_TL_CONTENT #if ACCESS_ACT_END > RC_ACCESS_END #error Resource-Id Ueberlauf in #file, #line diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 508b69509d08..d4b69ffe26d9 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 @@ -931,19 +933,19 @@ void SwColumnPage::SetLabels( USHORT nVis ) String tmp3(sLbl2); sLbl2.Insert(sLbl, sLbl2.Len() - 1); aLbl3.SetText(sLbl2); - String sColumnWidth = SW_RESSTR( STR_COLUMN_WIDTH ) ; + String sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ; sColumnWidth.SearchAndReplaceAscii("%1", tmp1); aEd1.SetAccessibleName(sColumnWidth); - sColumnWidth = SW_RESSTR( STR_COLUMN_WIDTH ) ; + sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ; sColumnWidth.SearchAndReplaceAscii("%1", tmp2); aEd2.SetAccessibleName(sColumnWidth); - sColumnWidth = SW_RESSTR( STR_COLUMN_WIDTH ) ; + sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ; sColumnWidth.SearchAndReplaceAscii("%1", tmp3); aEd3.SetAccessibleName(sColumnWidth); - String sDist = SW_RESSTR( STR_PAGESETUP_SPACING ) ; + String sDist = SW_RESSTR( STR_ACCESS_PAGESETUP_SPACING ) ; String sDist1 = sDist; sDist1.SearchAndReplaceAscii("%1", tmp1); sDist1.SearchAndReplaceAscii("%2", tmp2); diff --git a/sw/source/ui/frmdlg/column.hrc b/sw/source/ui/frmdlg/column.hrc index 86f23bed3029..e46697a8c618 100644 --- a/sw/source/ui/frmdlg/column.hrc +++ b/sw/source/ui/frmdlg/column.hrc @@ -79,15 +79,8 @@ #define FT_TEXTDIRECTION 60 #define LB_TEXTDIRECTION 61 #define FL_VERT 62 -//IAccessibility2 Impplementaton 2009----- -#define STR_PAGESETUP_SPACING 32765 -//-----IAccessibility2 Impplementaton 2009 #define LISTBOX_SELECTION 0 #define LISTBOX_SECTION 1 #define LISTBOX_SECTIONS 2 #define LISTBOX_PAGE 3 #define LISTBOX_FRAME 4 - -//IAccessibility2 Impplementaton 2009----- -#define STR_COLUMN_WIDTH 63 -//-----IAccessibility2 Impplementaton 2009 diff --git a/sw/source/ui/frmdlg/column.src b/sw/source/ui/frmdlg/column.src index 10b602f755d6..c5ba19c9a958 100644 --- a/sw/source/ui/frmdlg/column.src +++ b/sw/source/ui/frmdlg/column.src @@ -30,6 +30,8 @@ #include "frmui.hrc" #include "cmdid.h" #include "helpid.h" +#include "access.hrc" + // #define TP_COLUMN 256 TabPage TP_COLUMN { @@ -417,12 +419,12 @@ ModalDialog DLG_COLUMN }; //IAccessibility2 Impplementaton 2009----- -String STR_PAGESETUP_SPACING +String STR_ACCESS_PAGESETUP_SPACING { Text [ en-US ] = "Spacing between %1 and %2"; }; -String STR_COLUMN_WIDTH +String STR_ACCESS_COLUMN_WIDTH { Text [ en-US ] = "Column %1 Width"; }; diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 67b5f89d601d..4634ac4dc9b2 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 @@ -298,7 +300,7 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame, aCategoryBox.GetModel()->SetSortMode(SortAscending); aCategoryBox.SetHighlightRange(); // ueber volle Breite selektieren aCategoryBox.SetNodeDefaultImages( ); - aCategoryBox.SetAccessibleName(SW_RES(STR_SW_CATEGORY)); + aCategoryBox.SetAccessibleName(SW_RES(STR_ACCESS_SW_CATEGORY)); aCategoryBox.SetAccessibleRelationLabeledBy(&aInsertTipCB); Init(); diff --git a/sw/source/ui/misc/glossary.hrc b/sw/source/ui/misc/glossary.hrc index 40c230a2e8c4..4ee5aaaa7ede 100644 --- a/sw/source/ui/misc/glossary.hrc +++ b/sw/source/ui/misc/glossary.hrc @@ -88,6 +88,4 @@ #define FL_NN 9 #define BT_CANCEL 10 #define BT_OKNEW 11 -//IAccessibility2 Implementation 2009----- -#define STR_SW_CATEGORY 12 -//-----IAccessibility2 Implementation 2009 + diff --git a/sw/source/ui/misc/glossary.src b/sw/source/ui/misc/glossary.src index 745be55bad00..1302f02fbf9a 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 { @@ -289,7 +291,7 @@ String STR_GLOSSARY Text [ en-US ] = "AutoText :" ; }; /*IAccessibility2 Implementation 2009-----*/ -String STR_SW_CATEGORY +String STR_ACCESS_SW_CATEGORY { Text [ en-US ] = "Category" ; }; diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index c6cd79b9f107..f4e5e8d2bb02 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 @@ -994,7 +996,7 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox ) pTextArr[i]->SetText( sEntry ); //IAccessibility2 Impplementaton 2009----- //added by menghu for SODC_5143,12/12/2006 - String sColumnWidth = SW_RESSTR( STR_COLUMN_WIDTH ); + String sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH); sColumnWidth.SearchAndReplace( DEFINE_CONST_UNICODE("%1"), sIndex ); pFieldArr[i]->SetAccessibleName( sColumnWidth ); //end of SODC_5143 diff --git a/sw/source/ui/table/tabledlg.hrc b/sw/source/ui/table/tabledlg.hrc index 4c858f9fcb98..f03aed6afffc 100644 --- a/sw/source/ui/table/tabledlg.hrc +++ b/sw/source/ui/table/tabledlg.hrc @@ -106,8 +106,6 @@ #define FL_VERT_ORIENT 140 #define RB_FROM_LEFT 144 -//IAccessibility2 Impplementaton 2009----- -#define STR_COLUMN_WIDTH 145 -//-----IAccessibility2 Impplementaton 2009 #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 4ac846597530..51248119c5f1 100644 --- a/sw/source/ui/table/tabledlg.src +++ b/sw/source/ui/table/tabledlg.src @@ -786,10 +786,3 @@ InfoBox MSG_WRONG_TABLENAME { Message [ en-US ] = "The name of the table must not contain spaces." ; }; - -//IAccessibility2 Impplementaton 2009----- -String STR_COLUMN_WIDTH -{ - Text [ en-US ] = "Column %1 Width" ; -}; -//-----IAccessibility2 Impplementaton 2009 diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 53b8b1aa2e54..49413fba6e97 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> @@ -934,8 +936,8 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, aPageChgTimer.SetTimeoutHdl(LINK(this, SwNavigationPI, ChangePageHdl)); aPageChgTimer.SetTimeout(PAGE_CHANGE_TIMEOUT); - aContentTree.SetAccessibleName(SW_RESSTR(ST_TL_CONTENT)); - aGlobalTree.SetAccessibleName(SW_RESSTR(ST_TL_GLOBAL)); + 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 47dfe3ec4bab..70fd1dc6e14a 100644 --- a/sw/source/ui/utlui/navipi.hrc +++ b/sw/source/ui/utlui/navipi.hrc @@ -88,8 +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) - -//IAccessibility2 Implementation 2009----- -#define ST_TL_GLOBAL ST_GLOBAL_CONTEXT_FIRST +38 -#define ST_TL_CONTENT ST_GLOBAL_CONTEXT_FIRST +39 -//-----IAccessibility2 Implementation 2009 diff --git a/sw/source/ui/utlui/navipi.src b/sw/source/ui/utlui/navipi.src index e9d07896f321..fde6b82f139b 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 { @@ -536,11 +537,11 @@ ImageList IMG_NAVI_ENTRYBMPH }; //IAccessibility2 Implementation 2009----- -String ST_TL_GLOBAL +String STR_ACCESS_TL_GLOBAL { Text [ en-US ] = "Global View"; }; -String ST_TL_CONTENT +String STR_ACCESS_TL_CONTENT { Text [ en-US ] = "Content View"; }; -- cgit v1.2.3 From b2fb361af3f67dc79cf93cfaf7e7a7bcad4b801a Mon Sep 17 00:00:00 2001 From: Andreas Bregas <ab@openoffice.org> Date: Fri, 11 Feb 2011 15:06:12 +0100 Subject: ab80: Adding changes of cws mib21, ab77, ab77run2, dr77i to dev300 ab77: #163789# Handle class module factories document specific ab77: #163732# Defer removal of documents until XCloseListener::notifyClosing ab77: #163808# make VBA symbols Application.ScreenUpdating and Application.Interactive work globally on all documents ab77: wae ab77: #163840# read UTF-8 BOM ab77: #163732# VBA UserForm_Terminate triggered too late while closing document ab77: minor correction ab77: assertion: do not call ::rtl::OUString::copy() with negative index ab77run2: #163869# do not call Class_Terminate VBA macros when document disposes dr77i: #163941# do not update drawing layer when pasting from clipboard after cut mib21: #163944# ignore trailing whitespace in Basic source lines mib21: #163948# allow to manually pack MSVC DLLs into extensions mib21: #163948# multiprocess build fix Authors: Andreas Bregas <ab@openoffice.org> Daniel Rentz [dr] <daniel.rentz@oracle.com> Eike Rathke [er] <eike.rathke@oracle.com> --- sw/source/filter/ascii/parasc.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 64a261fc8ba0..eb4927a828f7 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -310,7 +310,7 @@ ULONG SwASCIIParser::ReadChars() } else if (pUseMe != &aEmpty) //Already successfully figured out type { - rInput.StartReadingUnicodeText(); + rInput.StartReadingUnicodeText( currentCharSet ); bSwapUnicode = rInput.IsEndianSwap(); } -- cgit v1.2.3 From 79502243dda95bce5731b5f1a5a685277fc593d2 Mon Sep 17 00:00:00 2001 From: os <os@openoffice.org> Date: Fri, 18 Feb 2011 09:54:05 +0100 Subject: os150: #i91166# RTF should exports characters as Unicode --- sw/source/filter/ww8/rtfexport.cxx | 5 +++++ sw/source/filter/ww8/rtfexport.hxx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) mode change 100644 => 100755 sw/source/filter/ww8/rtfexport.cxx mode change 100644 => 100755 sw/source/filter/ww8/rtfexport.hxx (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx old mode 100644 new mode 100755 index 357a7aff1e57..97fce990de86 --- 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 diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx old mode 100644 new mode 100755 index e73cd9b822c5..a6f018cddb7e --- 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 ); -- cgit v1.2.3 From e8a5c93d2367773a4d26c1d05c9bb84cfb6b2778 Mon Sep 17 00:00:00 2001 From: os <os@openoffice.org> Date: Fri, 18 Feb 2011 10:06:26 +0100 Subject: os150: SvxFontItem member access changed to Set<member>-methods --- sw/source/core/doc/tblafmt.cxx | 4 ++-- sw/source/core/txtnode/txtedt.cxx | 10 +++++----- sw/source/filter/ww8/wrtw8nds.cxx | 2 +- sw/source/ui/lingu/hhcwrp.cxx | 10 +++++----- sw/source/ui/shells/textsh.cxx | 8 ++++---- 5 files changed, 17 insertions(+), 17 deletions(-) mode change 100644 => 100755 sw/source/core/doc/tblafmt.cxx mode change 100644 => 100755 sw/source/core/txtnode/txtedt.cxx mode change 100644 => 100755 sw/source/filter/ww8/wrtw8nds.cxx mode change 100644 => 100755 sw/source/ui/lingu/hhcwrp.cxx mode change 100644 => 100755 sw/source/ui/shells/textsh.cxx (limited to 'sw/source') diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx old mode 100644 new mode 100755 index 647acfe9d9a4..3d4a21584f9a --- 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/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx old mode 100644 new mode 100755 index 4b99670b865c..b3d93e8eb0a7 --- 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/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx old mode 100644 new mode 100755 index 7f5e0eaae54e..1f3438634d60 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -575,7 +575,7 @@ void SwAttrIter::OutAttr( xub_StrLen nSwPos ) characters. */ if ( !m_rExport.HackIsWW8OrHigher() ) - aFont.GetCharSet() = GetCharSet(); + aFont.SetCharSet( GetCharSet() ); if ( rParentFont != aFont ) m_rExport.AttrOutput().OutputItem( aFont ); diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx old mode 100644 new mode 100755 index 98280db3f63e..ae84d4b1872f --- 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/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx old mode 100644 new mode 100755 index 6ed0e3050f26..d4c309cf2a2d --- 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, -- cgit v1.2.3 From 6d800fdab09298e4eecc6bc19c7491fda60391da Mon Sep 17 00:00:00 2001 From: os <os@openoffice.org> Date: Fri, 18 Feb 2011 10:44:14 +0100 Subject: os150: #i116585# ::select() fixed --- sw/source/ui/uno/unotxvw.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 sw/source/ui/uno/unotxvw.cxx (limited to 'sw/source') diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx old mode 100644 new mode 100755 index 788fd4cce9cb..b895fd418170 --- 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 // -- cgit v1.2.3 From 3a74c90ca8a7befe0dc812a92c4d482ae99c3d26 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Mon, 21 Feb 2011 18:43:22 +0100 Subject: masterfix DEV300: #i10000# WAE fixes --- sw/source/ui/chrdlg/break.cxx | 2 +- sw/source/ui/chrdlg/drpcps.cxx | 4 ++-- sw/source/ui/chrdlg/numpara.cxx | 4 ++-- sw/source/ui/config/optpage.cxx | 2 +- sw/source/ui/dialog/docstdlg.cxx | 18 ++++++++---------- sw/source/ui/envelp/label1.cxx | 10 +++++----- sw/source/ui/envelp/labprt.cxx | 6 +++--- sw/source/ui/frmdlg/column.cxx | 7 +++---- sw/source/ui/frmdlg/frmpage.cxx | 13 ++++++------- sw/source/ui/index/cnttab.cxx | 11 ++++++----- sw/source/ui/index/swuiidxmrk.cxx | 2 +- sw/source/ui/misc/bookmark.cxx | 3 +-- sw/source/ui/misc/docfnote.cxx | 9 +++++---- sw/source/ui/misc/glosbib.cxx | 7 +++---- sw/source/ui/misc/glossary.cxx | 5 +++-- sw/source/ui/misc/insfnote.cxx | 4 ++-- sw/source/ui/misc/linenum.cxx | 8 ++++---- sw/source/ui/misc/num.cxx | 2 +- sw/source/ui/misc/outline.cxx | 6 +++--- sw/source/ui/misc/pgfnote.cxx | 9 ++++----- sw/source/ui/misc/srtdlg.cxx | 5 +++-- sw/source/ui/table/colwd.cxx | 2 +- sw/source/ui/table/rowht.cxx | 2 +- sw/source/ui/table/tabledlg.cxx | 2 +- sw/source/ui/table/tautofmt.cxx | 2 +- sw/source/ui/utlui/swrenamexnameddlg.cxx | 4 ++-- 26 files changed, 73 insertions(+), 76 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index fe8d152bbc8c..ff4ec261b209 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,7 +168,6 @@ 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)), diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index e4b95c599071..8f02d0cc8796 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -569,6 +569,7 @@ 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,13 +578,12 @@ 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))), diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 5a055de847d3..20b99cc492fb 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 ) ), diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 037d17a5cc5e..84ab51621609 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)), diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx index cb6a9882fac3..08bb7b96e45b 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/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index cacd61a83434..4ee1d3295ddc 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -272,6 +272,7 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& 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 2639109b8079..4341bc9c5b75 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/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 1dec55af8dd7..9859f4875b46 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -453,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)), @@ -474,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 )), diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 35da147aedd6..e64ec62f6c3a 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -654,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)), @@ -666,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)), @@ -691,7 +692,6 @@ 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)), @@ -2935,6 +2935,7 @@ void lcl_Move(Window& rWin, sal_Int32 nDiff) SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) : SfxTabPage(pParent, SW_RES(TP_FRM_ADD), rSet), + aNamesFL (this, SW_RES(FL_NAME)), aNameFT (this, SW_RES(FT_NAME)), aNameED (this, SW_RES(ED_NAME)), aAltNameFT (this, SW_RES(FT_ALT_NAME)), @@ -2943,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/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 6ebaa586e6aa..905caaf6f0ef 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -991,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 )), @@ -999,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 )), @@ -2064,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 )), @@ -2097,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 )), @@ -3933,14 +3934,14 @@ 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(); diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index d4fd6197f496..74fbc4383f96 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 )), diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 77ce091d454b..5df6fc1fca5d 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 0992c1e35562..731e1451bd32 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)), diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 64392b6a6d6f..de1342c91ae9 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 840cbf03c6a1..9835b2f4d681 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -183,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 ); diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index 999a800984da..7e9d4894faaa 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)), diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx index 2e8baa173728..4b03871e9f7d 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,17 +117,16 @@ 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(); diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index e6cb5f2383b5..4b6b48e5ccea 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 )), diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index dbb938df7aae..3f67fb5cdb1a 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -190,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)) @@ -548,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)), @@ -565,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 423f66c8e9ef..593dbebae5ef 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(); diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index a4c45235dbb4..678b0c917e3c 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -133,11 +133,12 @@ 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 )), @@ -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 )), diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx index 70811c670496..d9e3d64b22e2 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/rowht.cxx b/sw/source/ui/table/rowht.cxx index 1fb108276bc1..a1d1770136d7 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 3ca0a5357f91..45eab49d553d 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -827,6 +827,7 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent, 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)), @@ -841,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 ), diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 41aaca4a4f65..e64c5110a942 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/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx index 27b861991e0f..94363dfbbbcf 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)), -- cgit v1.2.3 From 480ed8e16fcf2858edb7a78e0005aef57eddb03a Mon Sep 17 00:00:00 2001 From: os <os@openoffice.org> Date: Tue, 22 Feb 2011 09:25:05 +0100 Subject: #i101353# stop column width balancing in small tables --- sw/source/ui/table/tabledlg.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 38b0e6e54799..f55861fcc1d5 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1098,12 +1098,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); -- cgit v1.2.3 From 0bfc72fa9d01217ae47c88f41591d6b238904366 Mon Sep 17 00:00:00 2001 From: os <os@openoffice.org> Date: Tue, 22 Feb 2011 14:43:45 +0100 Subject: os150: #i115062# invalidate slot FN_VIEW_META_CHARS after printing --- sw/source/ui/uno/unotxdoc.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sw/source') diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 023dabf27043..0629d71698eb 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -3124,6 +3124,7 @@ void SAL_CALL SwXTextDocument::render( pSet->Put( SfxBoolItem( SID_HIDDEN, sal_False ) ); } + pView->GetViewFrame()->GetBindings().Invalidate( FN_VIEW_META_CHARS ); } } } -- cgit v1.2.3 From 1c298e7288a22afb44ef7059131a26154b2257dc Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Tue, 22 Feb 2011 15:23:41 +0100 Subject: masterfix DEV300: #i10000# added missing const --- sw/source/core/frmedt/fews.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 1f7fa08ad242..7ea3d079cc4b 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -1328,7 +1328,7 @@ Size SwFEShell::GetGraphicDefaultSize() const ---------------------------------------------------------------------------*/ // --> OD 2009-08-31 #mongolianlayou# // add output parameter <bVertL2R> -sal_Bool SwFEShell::IsFrmVertical(sal_Bool bEnvironment, sal_Bool& bRTL, sal_Bool& bVertL2R) const +sal_Bool SwFEShell::IsFrmVertical(const sal_Bool bEnvironment, sal_Bool& bRTL, sal_Bool& bVertL2R) const { sal_Bool bVert = sal_False; bRTL = sal_False; -- cgit v1.2.3 From 929609c30dcfb481d1cd5ea46c289992c491ed7c Mon Sep 17 00:00:00 2001 From: os <os@openoffice.org> Date: Tue, 22 Feb 2011 15:38:58 +0100 Subject: os150: #i50869# token control size increased --- sw/source/ui/index/cnttab.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 sw/source/ui/index/cnttab.src (limited to 'sw/source') diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src old mode 100644 new mode 100755 index 9b97b8931b7f..85203ff7b804 --- 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"; -- cgit v1.2.3 From 997518e050e9d7540acc9cdfd8c507ea3efdd4ec Mon Sep 17 00:00:00 2001 From: os <os@openoffice.org> Date: Thu, 24 Feb 2011 08:30:17 +0100 Subject: os150: #i114366# table export fix (patch from vmiklos) --- sw/source/filter/ww8/rtfexport.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 97fce990de86..434b4b67c333 100755 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -485,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() -- cgit v1.2.3 From 7359e482bd5446a9097a3272729f0bd6317c4a0e Mon Sep 17 00:00:00 2001 From: os <os@openoffice.org> Date: Wed, 2 Mar 2011 09:10:02 +0100 Subject: os150: #i115062# slot invalidation moved to d'tor of SwViewOptionsAdjust_Impl --- sw/source/ui/uno/unotxdoc.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 sw/source/ui/uno/unotxdoc.cxx (limited to 'sw/source') diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx old mode 100644 new mode 100755 index 146e58b6b5e5..7b2409152372 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -3141,7 +3141,6 @@ void SAL_CALL SwXTextDocument::render( pSet->Put( SfxBoolItem( SID_HIDDEN, sal_False ) ); } - pView->GetViewFrame()->GetBindings().Invalidate( FN_VIEW_META_CHARS ); } } } @@ -4124,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 ); } -- cgit v1.2.3