summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-07-29 10:49:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-07-29 10:49:30 +0100
commit3a0aad2f5de3c78d0a3f0d6977903fbd41aa1d8f (patch)
treebbb87a70e0801b47a2b802d2874bdcb3984c9f90
parent4b73aff7d2e4af7d3a1359df52133cd2c59058c5 (diff)
Related: tdf#90450 don't overwrite text in size/pos statusbar item
there still isn't enough space for it in writer, but at least what is there can be read. I'd love to get this info out of the status bar and into some overlay shown in the selection when moving the object. Change-Id: I688690a57253d3774c06f5edcb0931503c6d2ac6
-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() ) );