summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-06-19 17:52:26 +0200
committerJan Holesovsky <kendy@collabora.com>2015-06-19 18:08:09 +0200
commit16ed2b5c74ebde8a74284f56689db1662424a078 (patch)
tree602654f76c8c1b268443014d7e87a6da71aa8bb0 /sfx2
parentfab1dbe9a04e8925b35571f3ad6a27b45dcee84e (diff)
rendercontext: Fix crash with double-buffering in the Styles combo box.
Decouple the actual window from rendercontext in UserDrawEvent. Change-Id: Ic440c4e7f59fcffb7800c578146e8eb528cbb7b4
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/newhelp.cxx4
-rw-r--r--sfx2/source/statbar/stbitem.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 70d287e7a7d8..53d7614c8b9b 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -503,10 +503,10 @@ void IndexBox_Impl::UserDraw( const UserDrawEvent& rUDEvt )
// indent sub entries
Point aPos( rUDEvt.GetRect().TopLeft() );
aPos.X() += 8;
- aPos.Y() += ( rUDEvt.GetRect().GetHeight() - rUDEvt.GetDevice()->GetTextHeight() ) / 2;
+ aPos.Y() += (rUDEvt.GetRect().GetHeight() - rUDEvt.GetRenderContext()->GetTextHeight()) / 2;
OUString aEntry( GetEntry( rUDEvt.GetItemId() ) );
sal_Int32 nPos = aEntry.indexOf( ';' );
- rUDEvt.GetDevice()->DrawText( aPos, ( nPos !=-1 ) ? aEntry.copy( nPos + 1 ) : aEntry );
+ rUDEvt.GetRenderContext()->DrawText(aPos, (nPos !=-1) ? aEntry.copy(nPos + 1) : aEntry);
}
else
DrawEntry( rUDEvt, false, true, true );
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index c0ded64c7da3..f61f06093179 100644
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -396,7 +396,7 @@ throw ( ::uno::RuntimeException, std::exception )
if ( pOutDev )
{
::Rectangle aRect = VCLRectangle( rOutputRectangle );
- UserDrawEvent aUserDrawEvent( pOutDev, aRect, pBar->GetCurItemId(), (sal_uInt16)nStyle );
+ UserDrawEvent aUserDrawEvent(nullptr, pOutDev, aRect, pBar->GetCurItemId(), static_cast<sal_uInt16>(nStyle));
Paint( aUserDrawEvent );
}
}