Kaydet (Commit) 0231617f authored tarafından Michael Stahl's avatar Michael Stahl

sw: tweak translation 60c8a970

üst a1e4a112
...@@ -292,12 +292,11 @@ sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, ...@@ -292,12 +292,11 @@ sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
{ {
sal_Bool bRet = sal_True; sal_Bool bRet = sal_True;
// The list should be copied, while new objects below // The list should be copied, because below new objects will be selected
// were selected
const SdrMarkList aMrkList( Imp()->GetDrawView()->GetMarkedObjectList() ); const SdrMarkList aMrkList( Imp()->GetDrawView()->GetMarkedObjectList() );
sal_uLong nMarkCount = aMrkList.GetMarkCount(); sal_uLong nMarkCount = aMrkList.GetMarkCount();
if( !pDestShell->Imp()->GetDrawView() ) if( !pDestShell->Imp()->GetDrawView() )
// should be generated // should create it now
pDestShell->MakeDrawView(); pDestShell->MakeDrawView();
else if( bSelectInsert ) else if( bSelectInsert )
pDestShell->Imp()->GetDrawView()->UnmarkAll(); pDestShell->Imp()->GetDrawView()->UnmarkAll();
...@@ -322,7 +321,7 @@ sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, ...@@ -322,7 +321,7 @@ sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
if( pDestDrwView->IsGroupEntered() ) if( pDestDrwView->IsGroupEntered() )
{ {
// insert into the group, when it belongs to an entered group // insert into the group, when it belongs to an entered group
// or when the object is not coupled to a character // or when the object is not anchored as a character
if( pSrcDrwView->IsGroupEntered() || if( pSrcDrwView->IsGroupEntered() ||
(FLY_AS_CHAR != rAnchor.GetAnchorId()) ) (FLY_AS_CHAR != rAnchor.GetAnchorId()) )
...@@ -470,14 +469,14 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, ...@@ -470,14 +469,14 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
// Shift references // Shift references
sal_Bool bCopyIsMove = pDoc->IsCopyIsMove(); sal_Bool bCopyIsMove = pDoc->IsCopyIsMove();
if( bIsMove ) if( bIsMove )
// set a flag in Doc, therefore in TextNodes // set a flag in Doc, handled in TextNodes
pDoc->SetCopyIsMove( sal_True ); pDoc->SetCopyIsMove( sal_True );
RedlineMode_t eOldRedlMode = pDestShell->GetDoc()->GetRedlineMode(); RedlineMode_t eOldRedlMode = pDestShell->GetDoc()->GetRedlineMode();
pDestShell->GetDoc()->SetRedlineMode_intern( (RedlineMode_t)(eOldRedlMode | nsRedlineMode_t::REDLINE_DELETE_REDLINES)); pDestShell->GetDoc()->SetRedlineMode_intern( (RedlineMode_t)(eOldRedlMode | nsRedlineMode_t::REDLINE_DELETE_REDLINES));
// Are there table formulas in the area, then display the table first // If there are table formulas in the area, then display the table first
// such that the table formula can calculate a new value first // so that the table formula can calculate a new value first
// (individual boxes in the area are retrieved via the layout) // (individual boxes in the area are retrieved via the layout)
SwFieldType* pTblFldTyp = pDestShell->GetDoc()->GetSysFldType( RES_TABLEFLD ); SwFieldType* pTblFldTyp = pDestShell->GetDoc()->GetSysFldType( RES_TABLEFLD );
...@@ -699,8 +698,8 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) ...@@ -699,8 +698,8 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
SwNodeIndex aIdx( pClpDoc->GetNodes().GetEndOfExtras(), 2 ); SwNodeIndex aIdx( pClpDoc->GetNodes().GetEndOfExtras(), 2 );
SwPaM aCpyPam( aIdx ); //DocStart SwPaM aCpyPam( aIdx ); //DocStart
// Are there table formulas in the area, then display the table first // If there are table formulas in the area, then display the table first
// such that the table formula can calculate a new value first // so that the table formula can calculate a new value first
// (individual boxes in the area are retrieved via the layout) // (individual boxes in the area are retrieved via the layout)
SwFieldType* pTblFldTyp = GetDoc()->GetSysFldType( RES_TABLEFLD ); SwFieldType* pTblFldTyp = GetDoc()->GetSysFldType( RES_TABLEFLD );
...@@ -899,7 +898,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) ...@@ -899,7 +898,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
else if( *aCpyPam.GetPoint() == *aCpyPam.GetMark() && else if( *aCpyPam.GetPoint() == *aCpyPam.GetMark() &&
pClpDoc->GetSpzFrmFmts()->Count() ) pClpDoc->GetSpzFrmFmts()->Count() )
{ {
// draw a DrawView this slow // we need a DrawView
if( !Imp()->GetDrawView() ) if( !Imp()->GetDrawView() )
MakeDrawView(); MakeDrawView();
...@@ -994,7 +993,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) ...@@ -994,7 +993,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
if( pFlyFrm ) if( pFlyFrm )
SelectFlyFrm( *pFlyFrm, sal_True ); SelectFlyFrm( *pFlyFrm, sal_True );
// always pick the first FlyFrame only; the others // always pick the first FlyFrame only; the others
// were via Fly in Fly copied to the clipboard // were copied to the clipboard via Fly in Fly
break; break;
} }
else else
...@@ -1036,7 +1035,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) ...@@ -1036,7 +1035,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
pBoxNd->GetIndex() && pBoxNd->GetIndex() &&
aCpyPam.GetPoint()->nNode != aCpyPam.GetMark()->nNode ) aCpyPam.GetPoint()->nNode != aCpyPam.GetMark()->nNode )
{ {
// Copy more as 1 node in the current box. But // Copy more than 1 node in the current box. But
// then the BoxAttribute should be removed // then the BoxAttribute should be removed
GetDoc()->ClearBoxNumAttrs( rInsPos.nNode ); GetDoc()->ClearBoxNumAttrs( rInsPos.nNode );
} }
...@@ -1275,8 +1274,8 @@ sal_Bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const ...@@ -1275,8 +1274,8 @@ sal_Bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const
else else
{ {
// fix(23806): not the origial size, but the current one. // fix(23806): not the origial size, but the current one.
// Otherwise it could occur the for vectorgraphics // Otherwise it could happen that for vector graphics
// many MB's are requested // many MB's of memory are allocated.
const Size aSz( FindFlyFrm()->Prt().SSize() ); const Size aSz( FindFlyFrm()->Prt().SSize() );
VirtualDevice aVirtDev( *GetWin() ); VirtualDevice aVirtDev( *GetWin() );
......
...@@ -202,7 +202,7 @@ void SwFEShell::ParkCursorInTab() ...@@ -202,7 +202,7 @@ void SwFEShell::ParkCursorInTab()
#***********************************************************************/ #***********************************************************************/
sal_Bool SwFEShell::InsertRow( sal_uInt16 nCnt, sal_Bool bBehind ) sal_Bool SwFEShell::InsertRow( sal_uInt16 nCnt, sal_Bool bBehind )
{ {
// check if Spoint/Mark of current cursor are in a table // check if Point/Mark of current cursor are in a table
SwFrm *pFrm = GetCurrFrm(); SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() ) if( !pFrm || !pFrm->IsInTab() )
return sal_False; return sal_False;
...@@ -233,7 +233,7 @@ sal_Bool SwFEShell::InsertRow( sal_uInt16 nCnt, sal_Bool bBehind ) ...@@ -233,7 +233,7 @@ sal_Bool SwFEShell::InsertRow( sal_uInt16 nCnt, sal_Bool bBehind )
sal_Bool SwFEShell::InsertCol( sal_uInt16 nCnt, sal_Bool bBehind ) sal_Bool SwFEShell::InsertCol( sal_uInt16 nCnt, sal_Bool bBehind )
{ {
// check if Spoint/Mark of current cursor are in a table // check if Point/Mark of current cursor are in a table
SwFrm *pFrm = GetCurrFrm(); SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() ) if( !pFrm || !pFrm->IsInTab() )
return sal_False; return sal_False;
...@@ -295,7 +295,7 @@ sal_Bool SwFEShell::IsLastCellInRow() const ...@@ -295,7 +295,7 @@ sal_Bool SwFEShell::IsLastCellInRow() const
sal_Bool SwFEShell::DeleteCol() sal_Bool SwFEShell::DeleteCol()
{ {
// check if Spoint/Mark of current cursor are in a table // check if Point/Mark of current cursor are in a table
SwFrm *pFrm = GetCurrFrm(); SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() ) if( !pFrm || !pFrm->IsInTab() )
return sal_False; return sal_False;
...@@ -341,7 +341,7 @@ sal_Bool SwFEShell::DeleteCol() ...@@ -341,7 +341,7 @@ sal_Bool SwFEShell::DeleteCol()
sal_Bool SwFEShell::DeleteRow() sal_Bool SwFEShell::DeleteRow()
{ {
// check if Spoint/Mark of current cursor are in a table // check if Point/Mark of current cursor are in a table
SwFrm *pFrm = GetCurrFrm(); SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() ) if( !pFrm || !pFrm->IsInTab() )
return sal_False; return sal_False;
...@@ -365,11 +365,11 @@ sal_Bool SwFEShell::DeleteRow() ...@@ -365,11 +365,11 @@ sal_Bool SwFEShell::DeleteRow()
{ {
TblWait( aBoxes.size(), pFrm, *GetDoc()->GetDocShell() ); TblWait( aBoxes.size(), pFrm, *GetDoc()->GetDocShell() );
// Delete crsr from the deletion area. // Delete cursors from the deletion area.
// Then the cursor is: // Then the cursor is:
// - there is one line next to this // 1. the following row, if there is another row after this
// - there is one line previous to this // 2. the preceding row, if there is another row before this
// - otherwise always next // 3. otherwise below the table
{ {
SwTableNode* pTblNd = ((SwCntntFrm*)pFrm)->GetNode()->FindTableNode(); SwTableNode* pTblNd = ((SwCntntFrm*)pFrm)->GetNode()->FindTableNode();
...@@ -430,7 +430,7 @@ sal_Bool SwFEShell::DeleteRow() ...@@ -430,7 +430,7 @@ sal_Bool SwFEShell::DeleteRow()
sal_uLong nIdx; sal_uLong nIdx;
if( pNextBox ) // put cursor here if( pNextBox ) // put cursor here
nIdx = pNextBox->GetSttIdx() + 1; nIdx = pNextBox->GetSttIdx() + 1;
else // otherwise behind the table else // otherwise below the table
nIdx = pTblNd->EndOfSectionIndex() + 1; nIdx = pTblNd->EndOfSectionIndex() + 1;
SwNodeIndex aIdx( GetDoc()->GetNodes(), nIdx ); SwNodeIndex aIdx( GetDoc()->GetNodes(), nIdx );
...@@ -467,7 +467,7 @@ sal_Bool SwFEShell::DeleteRow() ...@@ -467,7 +467,7 @@ sal_Bool SwFEShell::DeleteRow()
sal_uInt16 SwFEShell::MergeTab() sal_uInt16 SwFEShell::MergeTab()
{ {
// check if Spoint/Mark of current cursor are in a table // check if Point/Mark of current cursor are in a table
sal_uInt16 nRet = TBLMERGE_NOSELECTION; sal_uInt16 nRet = TBLMERGE_NOSELECTION;
if( IsTableMode() ) if( IsTableMode() )
{ {
...@@ -498,7 +498,7 @@ sal_uInt16 SwFEShell::MergeTab() ...@@ -498,7 +498,7 @@ sal_uInt16 SwFEShell::MergeTab()
sal_Bool SwFEShell::SplitTab( sal_Bool bVert, sal_uInt16 nCnt, sal_Bool bSameHeight ) sal_Bool SwFEShell::SplitTab( sal_Bool bVert, sal_uInt16 nCnt, sal_Bool bSameHeight )
{ {
// check if Spoint/Mark of current cursor are in a table // check if Point/Mark of current cursor are in a table
SwFrm *pFrm = GetCurrFrm(); SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() ) if( !pFrm || !pFrm->IsInTab() )
return sal_False; return sal_False;
...@@ -549,7 +549,6 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const ...@@ -549,7 +549,6 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const
const SwTabFrm *pTab = pBox->FindTabFrm(); const SwTabFrm *pTab = pBox->FindTabFrm();
if ( pLastCols ) if ( pLastCols )
{ {
// assure few small things
sal_Bool bDel = sal_True; sal_Bool bDel = sal_True;
if ( pColumnCacheLastTable == pTab->GetTable() ) if ( pColumnCacheLastTable == pTab->GetTable() )
{ {
...@@ -627,7 +626,6 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const ...@@ -627,7 +626,6 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const
const SwTabFrm *pTab = pBox->FindTabFrm(); const SwTabFrm *pTab = pBox->FindTabFrm();
if ( pLastRows ) if ( pLastRows )
{ {
// assure few things
sal_Bool bDel = sal_True; sal_Bool bDel = sal_True;
if ( pRowCacheLastTable == pTab->GetTable() ) if ( pRowCacheLastTable == pTab->GetTable() )
{ {
...@@ -1223,7 +1221,7 @@ void SwFEShell::AdjustCellWidth( sal_Bool bBalance ) ...@@ -1223,7 +1221,7 @@ void SwFEShell::AdjustCellWidth( sal_Bool bBalance )
sal_Bool SwFEShell::IsAdjustCellWidthAllowed( sal_Bool bBalance ) const sal_Bool SwFEShell::IsAdjustCellWidthAllowed( sal_Bool bBalance ) const
{ {
// at least one line with content should be contained in the selection // at least one row with content should be contained in the selection
SwFrm *pFrm = GetCurrFrm(); SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() ) if( !pFrm || !pFrm->IsInTab() )
...@@ -1266,7 +1264,7 @@ sal_Bool SwFEShell::IsAdjustCellWidthAllowed( sal_Bool bBalance ) const ...@@ -1266,7 +1264,7 @@ sal_Bool SwFEShell::IsAdjustCellWidthAllowed( sal_Bool bBalance ) const
return sal_False; return sal_False;
} }
// AutoFormat for the table/tables selections // AutoFormat for the table/table selection
sal_Bool SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew ) sal_Bool SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew )
{ {
SwTableNode *pTblNd = (SwTableNode*)IsCrsrInTbl(); SwTableNode *pTblNd = (SwTableNode*)IsCrsrInTbl();
...@@ -1352,7 +1350,7 @@ sal_Bool SwFEShell::DeleteTblSel() ...@@ -1352,7 +1350,7 @@ sal_Bool SwFEShell::DeleteTblSel()
SET_CURR_SHELL( this ); SET_CURR_SHELL( this );
StartAllAction(); StartAllAction();
// search boxes via the layout // search boxes via the layout
sal_Bool bRet; sal_Bool bRet;
SwSelBoxes aBoxes; SwSelBoxes aBoxes;
GetTblSelCrs( *this, aBoxes ); GetTblSelCrs( *this, aBoxes );
......
...@@ -457,8 +457,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const ...@@ -457,8 +457,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const
const String& rCharacterStyle, const String& rCharacterStyle,
const sal_Bool bCpyBrd ) const sal_Bool bCpyBrd )
{ {
// get CrsrPosition of NodeIndex, remaining stuff can // get node index of cursor position, SwDoc can do everything else itself
// be done by the document self
SwCntntFrm *pCnt = LTYPE_DRAW==eType ? 0 : GetCurrFrm( sal_False ); SwCntntFrm *pCnt = LTYPE_DRAW==eType ? 0 : GetCurrFrm( sal_False );
if( LTYPE_DRAW==eType || pCnt ) if( LTYPE_DRAW==eType || pCnt )
{ {
...@@ -524,7 +523,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const ...@@ -524,7 +523,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const
} }
break; break;
default: default:
OSL_ENSURE( !this, "Crsr both not in table nor in fly." ); OSL_ENSURE( !this, "Crsr neither in table nor in fly." );
} }
if( nIdx ) if( nIdx )
...@@ -557,7 +556,7 @@ sal_Bool SwFEShell::Sort(const SwSortOptions& rOpt) ...@@ -557,7 +556,7 @@ sal_Bool SwFEShell::Sort(const SwSortOptions& rOpt)
if(IsTableMode()) if(IsTableMode())
{ {
// Sort table // Sort table
// check if SPoint/Mark of current Crsr are in one table // check if Point/Mark of current Crsr are in one table
SwFrm *pFrm = GetCurrFrm( sal_False ); SwFrm *pFrm = GetCurrFrm( sal_False );
OSL_ENSURE( pFrm->FindTabFrm(), "Crsr not in table." ); OSL_ENSURE( pFrm->FindTabFrm(), "Crsr not in table." );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment