summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/stbctrls/pszctrl.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index a071173bea90..0f27306cfd78 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -377,9 +377,12 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt )
OUString aStr = GetMetricStr_Impl( pImpl->aPos.X());
aStr += " / ";
aStr += GetMetricStr_Impl( pImpl->aPos.Y());
- pDev->DrawRect(
- Rectangle( aPnt, Point( nSizePosX, rRect.Bottom() ) ) );
- pDev->DrawText( aPnt, aStr );
+ Rectangle aRect(aPnt, Point(nSizePosX, rRect.Bottom()));
+ pDev->DrawRect(aRect);
+ vcl::Region aOrigRegion(pDev->GetClipRegion());
+ pDev->SetClipRegion(vcl::Region(aRect));
+ pDev->DrawText(aPnt, aStr);
+ pDev->SetClipRegion(aOrigRegion);
// draw the size, when available
aPnt.X() = nSizePosX;
@@ -393,8 +396,12 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt )
aStr = GetMetricStr_Impl( pImpl->aSize.Width() );
aStr += " x ";
aStr += GetMetricStr_Impl( pImpl->aSize.Height() );
- pDev->DrawRect( Rectangle( aDrwPnt, rRect.BottomRight() ) );
- pDev->DrawText( aPnt, aStr );
+ aRect = Rectangle(aDrwPnt, rRect.BottomRight());
+ pDev->DrawRect(aRect);
+ aOrigRegion = pDev->GetClipRegion();
+ pDev->SetClipRegion(vcl::Region(aRect));
+ pDev->DrawText(aPnt, aStr);
+ pDev->SetClipRegion(aOrigRegion);
}
else
pDev->DrawRect( Rectangle( aPnt, rRect.BottomRight() ) );