Kaydet (Commit) 17ce9a25 authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Noel Grandin

remove unneeded static_casts

found thanks to old comment

Change-Id: I9dbdd8c2f17243ce0d89468c18abd852c0e5eb78
Reviewed-on: https://gerrit.libreoffice.org/32420Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 850e89ad
......@@ -71,7 +71,7 @@ AccessibleDocumentViewBase::AccessibleDocumentViewBase (
mxModel (nullptr),
maViewForwarder (
static_cast<SdrPaintView*>(pViewShell->GetView()),
*static_cast<OutputDevice*>(pSdWindow))
*pSdWindow)
{
if (mxController.is())
mxModel = mxController->getModel();
......
......@@ -52,7 +52,7 @@ void VclComplexTextTest::testArabic()
ScopedVclPtrInstance<WorkWindow> pWin(static_cast<vcl::Window *>(nullptr));
CPPUNIT_ASSERT( pWin );
OutputDevice *pOutDev = static_cast< OutputDevice * >( pWin.get() );
OutputDevice *pOutDev = pWin.get();
vcl::Font aFont = OutputDevice::GetDefaultFont(
DefaultFontType::CTL_SPREADSHEET,
......@@ -97,7 +97,7 @@ void VclComplexTextTest::testTdf95650()
ScopedVclPtrInstance<WorkWindow> pWin(static_cast<vcl::Window *>(nullptr));
CPPUNIT_ASSERT(pWin);
OutputDevice *pOutDev = static_cast< OutputDevice * >(pWin.get());
OutputDevice *pOutDev = pWin.get();
// Check that the following executes without failing assertion
pOutDev->ImplLayout(aTxt, 9, 1, Point(), 0, nullptr, SalLayoutFlags::BiDiRtl);
}
......
......@@ -75,7 +75,7 @@ void VclOutdevTest::testVirtualDevice()
#if 0
VclPtr<vcl::Window> pWin = VclPtr<WorkWindow>::Create( (vcl::Window *)nullptr );
CPPUNIT_ASSERT( pWin );
OutputDevice *pOutDev = static_cast< OutputDevice * >( pWin );
OutputDevice *pOutDev = pWin.get();
#endif
}
......
......@@ -436,7 +436,7 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
if ( aVDev->SetOutputSizePixel( aRect.GetSize() ) )
{
if ( static_cast<OutputDevice*>(aVDev.get())->mpGraphics || static_cast<OutputDevice*>(aVDev.get())->AcquireGraphics() )
if ( aVDev.get()->mpGraphics || aVDev.get()->AcquireGraphics() )
{
if ( (nWidth > 0) && (nHeight > 0) )
{
......@@ -444,7 +444,7 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
(aRect.Left() < mnOutOffX) ? (mnOutOffX - aRect.Left()) : 0L,
(aRect.Top() < mnOutOffY) ? (mnOutOffY - aRect.Top()) : 0L,
nWidth, nHeight);
(static_cast<OutputDevice*>(aVDev.get())->mpGraphics)->CopyBits( aPosAry, mpGraphics, this, this );
aVDev.get()->mpGraphics->CopyBits( aPosAry, mpGraphics, this, this );
}
else
{
......
......@@ -606,8 +606,7 @@ void OutputDevice::ImplClearAllFontData(bool bNewFontLists)
{
if ( pFrame->AcquireGraphics() )
{
// Stupid typecast here and somewhere ((OutputDevice*)&aVDev)->, because bug in .NET2002 compiler
OutputDevice *pDevice = static_cast<OutputDevice*>(pFrame);
OutputDevice *pDevice = pFrame;
pDevice->mpGraphics->ClearDevFontCache();
pDevice->mpGraphics->GetDevFontList(pFrame->mpWindowImpl->mpFrameData->mpFontCollection);
}
......
......@@ -242,7 +242,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
// draw text into upper left corner
rSalLayout.DrawBase() -= aBoundRect.TopLeft();
rSalLayout.DrawText( *static_cast<OutputDevice*>(pVDev)->mpGraphics );
rSalLayout.DrawText( *pVDev->mpGraphics );
Bitmap aBmp = pVDev->GetBitmap( Point(), aBoundRect.GetSize() );
if ( !aBmp || !aBmp.Rotate( mpFontInstance->mnOwnOrientation, COL_WHITE ) )
......
......@@ -699,8 +699,8 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
{
ScopedVclPtrInstance< VirtualDevice > xVDev;
static_cast<OutputDevice*>(xVDev.get())->mnDPIX = mnDPIX;
static_cast<OutputDevice*>(xVDev.get())->mnDPIY = mnDPIY;
xVDev.get()->mnDPIX = mnDPIX;
xVDev.get()->mnDPIY = mnDPIY;
if( xVDev->SetOutputSizePixel( aDstRect.GetSize() ) )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment