CWS-TOOLING: integrate CWS os139_DEV300
This commit is contained in:
commit
244c79ea93
2 changed files with 47 additions and 14 deletions
|
@ -1418,7 +1418,7 @@ void SwDoc::Paste( const SwDoc& rSource )
|
|||
SwFmtAnchor aAnchor( rCpyFmt.GetAnchor() );
|
||||
if( FLY_PAGE == aAnchor.GetAnchorId() )
|
||||
{
|
||||
aAnchor.SetPageNum( aAnchor.GetPageNum() + /*nStartPageNumber - */1 );
|
||||
aAnchor.SetPageNum( aAnchor.GetPageNum() /*+ nStartPageNumber - */);
|
||||
}
|
||||
else
|
||||
continue;
|
||||
|
|
|
@ -776,16 +776,32 @@ SwDoc * ViewShell::CreatePrtDoc( SfxPrinter* pPrt, SfxObjectShellRef &rDocShellR
|
|||
pActCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetPrev());
|
||||
}
|
||||
|
||||
// Die Y-Position der ersten Selektion
|
||||
const Point aSelPoint = pFESh->IsTableMode() ?
|
||||
pFESh->GetTableCrsr()->GetSttPos() :
|
||||
pFirstCrsr->GetSttPos();
|
||||
Point aSelPoint;
|
||||
if( pFESh->IsTableMode() )
|
||||
{
|
||||
SwShellTableCrsr* pShellTblCrsr = pFESh->GetTableCrsr();
|
||||
|
||||
const SwCntntNode* pCntntNode = pShellTblCrsr->GetNode()->GetCntntNode();
|
||||
const SwCntntFrm *pCntntFrm = pCntntNode ? pCntntNode->GetFrm( 0, pShellTblCrsr->Start() ) : 0;
|
||||
if( pCntntFrm )
|
||||
{
|
||||
SwRect aCharRect;
|
||||
SwCrsrMoveState aTmpState( MV_NONE );
|
||||
pCntntFrm->GetCharRect( aCharRect, *pShellTblCrsr->Start(), &aTmpState );
|
||||
aSelPoint = Point( aCharRect.Left(), aCharRect.Top() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
aSelPoint = pFirstCrsr->GetSttPos();
|
||||
}
|
||||
|
||||
const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aSelPoint );
|
||||
ASSERT( pPage, "no page found!" );
|
||||
|
||||
// und ihren Seitendescribtor
|
||||
const SwPageDesc* pPageDesc = pPrtDoc->FindPageDescByName(
|
||||
pPage->GetPageDesc()->GetName() );
|
||||
// get page descriptor - fall back to the first one if pPage could not be found
|
||||
const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDescByName(
|
||||
pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 );
|
||||
|
||||
if( !pFESh->IsTableMode() && pActCrsr->HasMark() )
|
||||
{ // Am letzten Absatz die Absatzattribute richten:
|
||||
|
@ -868,15 +884,32 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
|
|||
|
||||
// Die Y-Position der ersten Selektion
|
||||
// Die Y-Position der ersten Selektion
|
||||
const Point aSelPoint = pFESh->IsTableMode() ?
|
||||
pFESh->GetTableCrsr()->GetSttPos() :
|
||||
pFirstCrsr->GetSttPos();
|
||||
Point aSelPoint;
|
||||
if( pFESh->IsTableMode() )
|
||||
{
|
||||
SwShellTableCrsr* pShellTblCrsr = pFESh->GetTableCrsr();
|
||||
|
||||
const SwCntntNode* pCntntNode = pShellTblCrsr->GetNode()->GetCntntNode();
|
||||
const SwCntntFrm *pCntntFrm = pCntntNode ? pCntntNode->GetFrm( 0, pShellTblCrsr->Start() ) : 0;
|
||||
if( pCntntFrm )
|
||||
{
|
||||
SwRect aCharRect;
|
||||
SwCrsrMoveState aTmpState( MV_NONE );
|
||||
pCntntFrm->GetCharRect( aCharRect, *pShellTblCrsr->Start(), &aTmpState );
|
||||
aSelPoint = Point( aCharRect.Left(), aCharRect.Top() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
aSelPoint = pFirstCrsr->GetSttPos();
|
||||
}
|
||||
|
||||
const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aSelPoint );
|
||||
ASSERT( pPage, "no page found!" );
|
||||
|
||||
// und ihren Seitendescribtor
|
||||
const SwPageDesc* pPageDesc = pPrtDoc->FindPageDescByName(
|
||||
pPage->GetPageDesc()->GetName() );
|
||||
// get page descriptor - fall back to the first one if pPage could not be found
|
||||
const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDescByName(
|
||||
pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 );
|
||||
|
||||
if( !pFESh->IsTableMode() && pActCrsr->HasMark() )
|
||||
{ // Am letzten Absatz die Absatzattribute richten:
|
||||
|
|
Loading…
Reference in a new issue