Lines 305-311
Link Here
|
305 |
aClipRec = pView->pImpEditView->GetWindowPos( aClipRec ); |
305 |
aClipRec = pView->pImpEditView->GetWindowPos( aClipRec ); |
306 |
|
306 |
|
307 |
if ( ( pView == pCurView ) ) |
307 |
if ( ( pView == pCurView ) ) |
308 |
Paint( pView->pImpEditView, aClipRec, sal_True ); |
308 |
Paint( pView->pImpEditView, aClipRec, 0, sal_True ); |
309 |
else |
309 |
else |
310 |
pView->GetWindow()->Invalidate( aClipRec ); |
310 |
pView->GetWindow()->Invalidate( aClipRec ); |
311 |
} |
311 |
} |
Lines 3589-3595
Link Here
|
3589 |
pOutDev->SetFont( aOldFont ); |
3589 |
pOutDev->SetFont( aOldFont ); |
3590 |
} |
3590 |
} |
3591 |
|
3591 |
|
3592 |
void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool bUseVirtDev ) |
3592 |
void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, OutputDevice* pTargetDevice, sal_Bool bUseVirtDev ) |
3593 |
{ |
3593 |
{ |
3594 |
DBG_ASSERT( pView, "Keine View - Kein Paint!" ); |
3594 |
DBG_ASSERT( pView, "Keine View - Kein Paint!" ); |
3595 |
DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 ); |
3595 |
DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 ); |
Lines 3601-3611
Link Here
|
3601 |
Rectangle aClipRec( pView->GetOutputArea() ); |
3601 |
Rectangle aClipRec( pView->GetOutputArea() ); |
3602 |
aClipRec.Intersection( rRec ); |
3602 |
aClipRec.Intersection( rRec ); |
3603 |
|
3603 |
|
3604 |
Window* pOutWin = pView->GetWindow(); |
3604 |
OutputDevice* pTarget = pTargetDevice ? pTargetDevice : pView->GetWindow(); |
3605 |
|
3605 |
|
3606 |
if ( bUseVirtDev ) |
3606 |
if ( bUseVirtDev ) |
3607 |
{ |
3607 |
{ |
3608 |
Rectangle aClipRecPixel( pOutWin->LogicToPixel( aClipRec ) ); |
3608 |
Rectangle aClipRecPixel( pTarget->LogicToPixel( aClipRec ) ); |
3609 |
if ( !IsVertical() ) |
3609 |
if ( !IsVertical() ) |
3610 |
{ |
3610 |
{ |
3611 |
// etwas mehr, falls abgerundet! |
3611 |
// etwas mehr, falls abgerundet! |
Lines 3620-3626
Link Here
|
3620 |
|
3620 |
|
3621 |
// Wenn aClipRecPixel > XXXX, dann invalidieren ?! |
3621 |
// Wenn aClipRecPixel > XXXX, dann invalidieren ?! |
3622 |
|
3622 |
|
3623 |
VirtualDevice* pVDev = GetVirtualDevice( pOutWin->GetMapMode(), pOutWin->GetDrawMode() ); |
3623 |
VirtualDevice* pVDev = GetVirtualDevice( pTarget->GetMapMode(), pTarget->GetDrawMode() ); |
3624 |
pVDev->SetDigitLanguage( GetRefDevice()->GetDigitLanguage() ); |
3624 |
pVDev->SetDigitLanguage( GetRefDevice()->GetDigitLanguage() ); |
3625 |
|
3625 |
|
3626 |
{ |
3626 |
{ |
Lines 3683-3689
Link Here
|
3683 |
// da sonst die Zeile darunter auch ausgegeben werden muss: |
3683 |
// da sonst die Zeile darunter auch ausgegeben werden muss: |
3684 |
Rectangle aTmpRec( Point( 0, 0 ), aClipRec.GetSize() ); |
3684 |
Rectangle aTmpRec( Point( 0, 0 ), aClipRec.GetSize() ); |
3685 |
|
3685 |
|
3686 |
aClipRec = pOutWin->PixelToLogic( aClipRecPixel ); |
3686 |
aClipRec = pTarget->PixelToLogic( aClipRecPixel ); |
3687 |
Point aStartPos; |
3687 |
Point aStartPos; |
3688 |
if ( !IsVertical() ) |
3688 |
if ( !IsVertical() ) |
3689 |
{ |
3689 |
{ |
Lines 3708-3745
Link Here
|
3708 |
if ( GetTextRanger() ) |
3708 |
if ( GetTextRanger() ) |
3709 |
{ |
3709 |
{ |
3710 |
// Some problems here with push/pop, why?! |
3710 |
// Some problems here with push/pop, why?! |
3711 |
// pOutWin->Push( PUSH_CLIPREGION|PUSH_MAPMODE ); |
3711 |
// pTarget->Push( PUSH_CLIPREGION|PUSH_MAPMODE ); |
3712 |
bClipRegion = pOutWin->IsClipRegion(); |
3712 |
bClipRegion = pTarget->IsClipRegion(); |
3713 |
aOldRegion = pOutWin->GetClipRegion(); |
3713 |
aOldRegion = pTarget->GetClipRegion(); |
3714 |
// Wie bekomme ich das Polygon an die richtige Stelle???? |
3714 |
// Wie bekomme ich das Polygon an die richtige Stelle???? |
3715 |
// Das Polygon bezieht sich auf die View, nicht auf das Window |
3715 |
// Das Polygon bezieht sich auf die View, nicht auf das Window |
3716 |
// => Origin umsetzen... |
3716 |
// => Origin umsetzen... |
3717 |
aOldMapMode = pOutWin->GetMapMode(); |
3717 |
aOldMapMode = pTarget->GetMapMode(); |
3718 |
Point aOrigin = aOldMapMode.GetOrigin(); |
3718 |
Point aOrigin = aOldMapMode.GetOrigin(); |
3719 |
Point aViewPos = pView->GetOutputArea().TopLeft(); |
3719 |
Point aViewPos = pView->GetOutputArea().TopLeft(); |
3720 |
aOrigin.Move( aViewPos.X(), aViewPos.Y() ); |
3720 |
aOrigin.Move( aViewPos.X(), aViewPos.Y() ); |
3721 |
aClipRec.Move( -aViewPos.X(), -aViewPos.Y() ); |
3721 |
aClipRec.Move( -aViewPos.X(), -aViewPos.Y() ); |
3722 |
MapMode aNewMapMode( aOldMapMode ); |
3722 |
MapMode aNewMapMode( aOldMapMode ); |
3723 |
aNewMapMode.SetOrigin( aOrigin ); |
3723 |
aNewMapMode.SetOrigin( aOrigin ); |
3724 |
pOutWin->SetMapMode( aNewMapMode ); |
3724 |
pTarget->SetMapMode( aNewMapMode ); |
3725 |
pOutWin->SetClipRegion( Region( GetTextRanger()->GetPolyPolygon() ) ); |
3725 |
pTarget->SetClipRegion( Region( GetTextRanger()->GetPolyPolygon() ) ); |
3726 |
} |
3726 |
} |
3727 |
|
3727 |
|
3728 |
pOutWin->DrawOutDev( aClipRec.TopLeft(), aClipRec.GetSize(), |
3728 |
pTarget->DrawOutDev( aClipRec.TopLeft(), aClipRec.GetSize(), |
3729 |
Point(0,0), aClipRec.GetSize(), *pVDev ); |
3729 |
Point(0,0), aClipRec.GetSize(), *pVDev ); |
3730 |
|
3730 |
|
3731 |
if ( GetTextRanger() ) |
3731 |
if ( GetTextRanger() ) |
3732 |
{ |
3732 |
{ |
3733 |
// pOutWin->Pop(); |
3733 |
// pTarget->Pop(); |
3734 |
if ( bClipRegion ) |
3734 |
if ( bClipRegion ) |
3735 |
pOutWin->SetClipRegion( aOldRegion ); |
3735 |
pTarget->SetClipRegion( aOldRegion ); |
3736 |
else |
3736 |
else |
3737 |
pOutWin->SetClipRegion(); |
3737 |
pTarget->SetClipRegion(); |
3738 |
pOutWin->SetMapMode( aOldMapMode ); |
3738 |
pTarget->SetMapMode( aOldMapMode ); |
3739 |
} |
3739 |
} |
3740 |
|
3740 |
|
3741 |
|
3741 |
|
3742 |
pView->DrawSelection(); |
3742 |
pView->DrawSelection(pView->GetEditSelection(), 0, pTarget); |
3743 |
} |
3743 |
} |
3744 |
else |
3744 |
else |
3745 |
{ |
3745 |
{ |
Lines 3769-3786
Link Here
|
3769 |
aClipRec.Right() = nMaxX; |
3769 |
aClipRec.Right() = nMaxX; |
3770 |
} |
3770 |
} |
3771 |
|
3771 |
|
3772 |
sal_Bool bClipRegion = pOutWin->IsClipRegion(); |
3772 |
sal_Bool bClipRegion = pTarget->IsClipRegion(); |
3773 |
Region aOldRegion = pOutWin->GetClipRegion(); |
3773 |
Region aOldRegion = pTarget->GetClipRegion(); |
3774 |
pOutWin->IntersectClipRegion( aClipRec ); |
3774 |
pTarget->IntersectClipRegion( aClipRec ); |
3775 |
|
3775 |
|
3776 |
Paint( pOutWin, aClipRec, aStartPos ); |
3776 |
Paint( pTarget, aClipRec, aStartPos ); |
3777 |
|
3777 |
|
3778 |
if ( bClipRegion ) |
3778 |
if ( bClipRegion ) |
3779 |
pOutWin->SetClipRegion( aOldRegion ); |
3779 |
pTarget->SetClipRegion( aOldRegion ); |
3780 |
else |
3780 |
else |
3781 |
pOutWin->SetClipRegion(); |
3781 |
pTarget->SetClipRegion(); |
3782 |
|
3782 |
|
3783 |
pView->DrawSelection(); |
3783 |
pView->DrawSelection(pView->GetEditSelection(), 0, pTarget); |
3784 |
} |
3784 |
} |
3785 |
|
3785 |
|
3786 |
} |
3786 |
} |