OutputDevice has an enum OutDevType which has OUTDEV_DONTKNOW, OUTDEV_WINDOW, OUTDEV_PRINTER, OUTDEV_VIRDEV. This is used to determine what sort of OutputDevice is being used. This bad design. There are a number of functions in OutputDevice that detect the subclass type and have a conditional on an OutDevType private variable meOutDevType that determines what it should do. This obviously is contrary to go polymorphic construction. We need to remove this enum and move the logic to specific classes out of the base classes. This is a massive task, however. There are about 120 functions that rely on this. They are: * Animation::Draw(...) * Animation::Start(...) * ButtonFrame::Draw(...) * CanvasHelper::flush() * ComboBox::Draw(...) * DbGridColumn::Paint(...) * DecorationView::DrawHighlightFrame(...) * DecorationView::DrawSeparator(...) * DecorationView::DrawSymbol(...) * DrawDocShell::Draw(...) * DrawGraphic(...) in sw/source/core/layout/paintfrm.cxx * Edit::Draw(...) * EditBrowseBox::PaintStatusCell(...) * EditEngine::Draw(...) * FmFormShell::PrepareClose(...) * FmFormView::ChangeDesignMode(...) * FmXFormView::implCreateFieldControl(...) * FmXFormView::implCreateXFormsControl(...) * FmXTextCell::PaintFieldToCell(...) * FontList::FontList(...) constructors * FontList::ImplInsertFonts(...) * GDIMetaFile::Play(...) * GraphicManager::DrawObj(...) * GraphicManager::ImplCreateOutput(...) * GroupBox::ImplDraw(...) * HeaderBar::ImplDrawItem(...) * ImpEditEngine::InsertTextObject(...) * ImpEditEngine::Paint(...) * ImpEditEngine::RecalcFormatterFontMetrics(...) * ImpEditEngine::SeekCursor(...) * ImpGetViewWin(...) in svx/source/toolbars/fontworkbar.cxx * ImplAnimView::ImplDraw(...) * ImplAnimView::ImplRepaint() * ImplAnimView::ImplAnimView() constructor * ImplDbgCheckOutputDevice(...) debug functions in vcl/source/gdi/outdev.cxx * ImplDbgCheckOutputDevice(...) debut functions in vcl/source/gdi/outdev.cxx * ImplDrawButton(...), ImplDrawFrame(...), ImplDrawFrame(...) in vcl/source/window/decoview.cxx * ImplDrawDefault(...) in vcl/source/gdi/graph.cxx * ImplDrawSpinButton(...) in /vcl/source/control/spinfld.cxx * ImplImageBmp::Draw(...) * ImplSmallBorderWindowView::Init(...) * ImplSmallBorderWindowView::DrawWindow(...) * ListBox::Draw(...) * NavigatorTree::MarkViewObj(...) * ObjectContactOfObjListPainter::isOutputToVirtualDevice() * ObjectContactOfPageView::isOutputToPrinter() * ObjectContactOfPageView::isOutputToVirtualDevice() * ObjectContactOfPageView::isOutputWindow() * OutputDevice::DrawImage(...) * OutputDevice::GetActiveClipRegion() * OutputDevice::GetBitmap(...) * OutputDevice::ImplDrawOutDevDirect(...) * OutputDevice::ImplInitClipRegion() * OutputDevice::ImplRefreshFontData(...) * OutputDevice::ImplClearFontData(...) * OutputDevice::ImplDrawWaveLine(...) * OutputDevice::SetMapMode(...) * OverlayManager::getCurrentViewInformation2D() * OverlayManager::invalidateRange(...) * OverlayManagerBuffered::ImpRestoreBackground(...) * SalGraphics::mirror(...) functions * ScColumn::GetNeededSize(...) * ScDrawStringsVars::SetShrinkScale(...) * ScDrawStringsVars::SetAutoText(...) * ScDrawStringsVars::TextChanged() * ScDrawStringsVars::SetPattern(...) * ScDrawView::MarkListHasChanged() * ScOutputData::DrawStrings() * ScPrintFunc::DrawToDev(...) * ScrollBar::ImplDraw(...) * SdXImpressDocument::render(...) * SdrItemBrowser::ImpGetViewWin(...) * SdrObjEditView::AddWindowToPaintView(...) * SdrObjEditView::DeleteWindowFromPaintView(...) * SdrObjEditView::SdrBeginTextEdit(...) * SdrOle2Obj::Connect_Impl() * SdrOle2Obj::GetObjRef_Impl() * SdrPaintView::CompleteRedraw(...) * SdrPaintView::OptimizeDrawLayersRegion(...) * SdrPaintWindow::OutputToPrinter()/OutputToWindow()/OutputToVirtualDevice() * SdrPaintWindow::impCreateOverlayManager() * SdrTextObj::ImpSetCharStretching(...) * SdrView::DoMouseEvent(...) * SdrView::PickAnything(...) * SfxObjectShell::DoDraw_Impl(...) * SmDocShell::DrawFormula(...) * SmGetGlyphBoundRect(...) in starmath/source/rect.cxx * SmRect::BuildRect(...) * SmTmpDevice2::Impl_GetColor(...) * SmTmpDevice::Impl_GetColor(...) * SpinField::Draw(...) * SpinField::ImplCalcButtonAreas(...) * SpriteCanvasHelper::updateScreen(...) * SwColumnFrm::PaintBreak( ) * SwFntObj::DrawText(...) * SwFrm::PaintBackground(...) * SwGrfNumPortion::Paint(...) * SwLayVout::Enter(...) * SwLineRects::ConnectEdges(...) * SwNoTxtFrm::Modify(...) * SwNoTxtFrm::PaintPicture(...) * SwPageFrm::PaintBreak( ) * SwPageFrm::PaintDecorators( ) * SwPageFrm::PaintGrid(...) * SwRootFrm::Paint(...) * SwTxtSizeInfo::CtorInitTxtSizeInfo(...) * SwViewOption::DrawRect(...) * The cairo createSurface(...) functions also rely on it. * VCLXDevice::getInfo(...) * VCLXWindow::draw(...) * VclMultiLineEdit::Draw(...) * View::CompleteRedraw(...) * ViewContactOfUnoControl::CreateObjectSpecificViewObjectContact(...) * ViewObjectContactOfSdrMediaObj::getWindow() * VirtualDevice::ImplInitVirDev(...) * Window::GetDrawPixel(...) * XParaPortionList::XParaPortionList(...) constructor * grindFunc(...) in vcl/workben/outdevgrind.cxx * impBufferDevice::impBufferDevice(...) constructor * lcl_ChgHyperLinkColor(...) in sw/source/core/text/atrstck.cxx * lcl_IsFontAdjustNecessary(...), lcl_IsFontAdjustNecessary(...) and lcl_IsFontAdjustNecessary(...) in fntcache.cxx * lcl_PaintLeftRightLine(...) in sw/source/core/layout/paintfrm.cxx * lcl_SubtractFlys(...) in sw/source/core/layout/paintfrm.cxx * lcl_enableNativeWidget(...) in vcl/source/gdi/outdevnative.cxx
Two more functions in OutputDevice I missed: ImplInitGraphics and ImplReleaseGraphics
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e69615ccb016de1c64864bbc9cf1bbef9f50c1da fdo#74702 Moved ImplInitGraphics into correct classes The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=0d88e15a8a3fa7fba6471c832d7df3cfd61da962 fdo#74702 Return true if graphics is set, cleanup unused variables The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=c16186f1b96ecf0933a16f4c9fb196c5be18d7d9 fdo#74702 Move gradient steps logic into OutputDevice or Printer classes The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=143c059ff7f69a363b3cf736a9f0197a9f25cf9c fdo#74702 Moved ImplReleaseGraphics into correct classes The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=c30fd602521986348ef952b7173ea37a064ee82b fdo#74702 ImplPrintMask() implemented in Printer The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f84e7f573dd88cc814bdbc8c1678ed64f1edbf48 fdo#74702 Move BitmapEx drawing code to seperate functions The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d4855da9e9718b31b371376ee8a469e9e26495af fdo#74702 Moved CopyArea() Window specific function The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=0eb7070e767fd395cf2c8fbb83707e2efda2bf01 fdo#74702 DrawOutDev() and CopyArea() functions now noops in Printer The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=eb5242851d8242fbadca7ac8fde7b633b207ba90 fdo#74702 GetPaintArea protected function introduced The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=ca949408b89c990edb6321d59db9eed6d29d21a7 fdo#74702 ImplDrawBitmap functionality moved to protected function The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=977aae0cdec71577cbdc74baea228a5f267e7fd8 fdo#74702 Moved EnableRTL() logic to specific classes where appropriate The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=03568b2e2405fc44435b95720f3680ab1daea836 fdo#74702 Move GetBitCount() and GetAlphaBitCount into correct classes The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=514d33fa3a409681be93bed3fb33f940a5549d88 fdo#74702 DrawTransformedBitmapEx simplified The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=4d1111aafe4c153ca52d045d726799d4b1753142 fdo#74702 Move device specific bitmap drawing to its own function The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=29bea73595b1c5dc8ee6c311ae3f43e3345448bb fdo#74702 Followup to 4d1111aafe4c1$53ca52d045d726799d4b1753142 The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9153a36b59f2efc2bfb2c9256c39eb5687808deb fdo#74702 Refactor OutputDevice::DrawTransparent() The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=ea7102c93c33884a68d4dba0de7d52f8ed4f4579 fdo#74702 OutputDevice::ImplInitFontList() fails if no fonts on device The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=6d0273b70b228af6b18e0dfdb89759ccad30a03c fdo#74702 New abstract function UsePolyPolygonForComplexGradient() The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=04e08fa4aa419b8d89d80a39e6904bc4cd8883be fdo#74702 Refactor code to use ClipToPaintRegion() The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=65b3a78058e9d8a0e7c62ac9591c3b9e5c25eed7 fdo#74702 update bad advise in comment in DrawTransparentNatively() The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=c8e7bae4da31ca7ed0a30ad476b7733f3c770bf9 fdo#74702 use same gradient steps func. to draw linear and complex grads The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8659d189ec04aca78c8ffff97fcca507ca0a9ec3 fdo#74702 Refactor gradient clipping functions The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=bc3625fce46e3e4529b2eb7daabc5c66d7b1cbcc fdo#74702 Move common mask functionality to ApplyMask The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=948c4654f683e93b757f96e8859e9e91b45298a4 fdo#74702 Seperate ImplDrawGradientWallpaper and rename The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=891e6a0be8e835edb102ecb272debe9c4e00b8e8 fdo#74702 Allow Printer & OutputDevice to handle font orientation The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=588bb542bebdee5a67bd4695253c70646fb8a303 fdo#74702 Only VirtualDevice should handle the Word ext lead bug The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=efbc6ba6af3db201e610abb93ceab61818b98d28 Fix regression introduced in f4e8bca336 when fixing fdo#74702 The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=95711f5b9e7b6a982d1762d37d5a38e0f40b86f9 fdo#74702 Move ImplInitClipRegion Window code out of OutputDevice The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=66b2880ad51b69188ea5c2e56a682ed320c53d1e fdo#74702 Move GetActiveClipRegion code into Window The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.