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.
Hi Chris, I'm setting this ticket back to NEW as it has been inactive for more than 3 months. Feel free to assign it back to you if you're still working on this. Regards
Hi, I would like to contribute to this bug. Is this bug still open? Can someone help me with some starting pointers if this is still available?
@Chris, git grep reveals that OutDevType enum hasn't been completely removed, there's still a couple places using it, can you please update this ticket with pointers on how to commence from where you left it?
(In reply to Shinnok from comment #33) > @Chris, git grep reveals that OutDevType enum hasn't been completely > removed, there's still a couple places using it, can you please update this > ticket with pointers on how to commence from where you left it? A year has passed with no comment from Chris Sherlock nor any other action on this page. Can you move it forward somehow?
> A year has passed with no comment from Chris Sherlock nor any other > action on this page. Can you move it forward somehow? Its a shame - Chris did some nice work cleaning this up. I guess there is a whole suite of these that probably need the printer device to be special cased via nFlags to the Draw method - and to isolate just one check there. vcl/source/outdev/nativecontrols.cxx-static bool EnableNativeWidget( const OutputDevice& i_rDevice This one should be a virtual bool method on the output device itself I guess. Otherwise some of them look tougher to remove really - but worth having another easy-hacker have a go I think =) Thanks !
Hello everybody, I am working on this bug. I have an idea how to solve this cleanly but there is a lot of work as many files have to be changed: git grep -lE 'OUTDEV_(WINDOW|PRINTER|VIRDEV|PDF)' -- \*.cpp \*.cxx canvas/source/vcl/canvashelper.cxx canvas/source/vcl/spritecanvashelper.cxx drawinglayer/source/processor2d/vclhelperbufferdevice.cxx editeng/source/editeng/editeng.cxx editeng/source/editeng/impedit3.cxx sc/source/core/data/column2.cxx sc/source/ui/view/drawview.cxx sc/source/ui/view/output2.cxx sc/source/ui/view/printfun.cxx sd/source/ui/docshell/docshel2.cxx sd/source/ui/unoidl/unomodel.cxx sd/source/ui/view/sdview.cxx sfx2/source/doc/objembed.cxx starmath/source/document.cxx starmath/source/rect.cxx starmath/source/tmpdevice.cxx svtools/source/brwbox/datwin.cxx svtools/source/brwbox/editbrowsebox.cxx svtools/source/control/ctrltool.cxx svx/source/fmcomp/gridcell.cxx svx/source/form/fmshell.cxx svx/source/form/fmview.cxx svx/source/form/fmvwimp.cxx svx/source/form/navigatortree.cxx svx/source/sdr/contact/objectcontactofobjlistpainter.cxx svx/source/sdr/contact/objectcontactofpageview.cxx svx/source/sdr/contact/viewcontactofunocontrol.cxx svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx svx/source/sdr/overlay/overlaymanager.cxx svx/source/sdr/overlay/overlaymanagerbuffered.cxx svx/source/svdraw/sdrpaintwindow.cxx svx/source/svdraw/svdedxv.cxx svx/source/svdraw/svdibrow.cxx svx/source/svdraw/svdmrkv.cxx svx/source/svdraw/svdotext.cxx svx/source/svdraw/svdpntv.cxx svx/source/svdraw/svdview.cxx svx/source/table/tablecontroller.cxx sw/source/core/doc/notxtfrm.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/layout/virtoutp.cxx sw/source/core/ole/ndole.cxx sw/source/core/text/atrstck.cxx sw/source/core/text/inftxt.cxx sw/source/core/text/porfld.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/view/vnew.cxx sw/source/uibase/config/viewopt.cxx toolkit/source/awt/vclxdevice.cxx toolkit/source/awt/vclxwindow.cxx vcl/source/control/combobox.cxx vcl/source/control/edit.cxx vcl/source/control/listbox.cxx vcl/source/control/scrbar.cxx vcl/source/control/spinfld.cxx vcl/source/edit/vclmedit.cxx vcl/source/gdi/animate.cxx vcl/source/gdi/gdimtf.cxx vcl/source/gdi/graph.cxx vcl/source/gdi/impanmvw.cxx vcl/source/gdi/pdfwriter_impl.cxx vcl/source/gdi/print.cxx vcl/source/gdi/print2.cxx vcl/source/gdi/virdev.cxx vcl/source/outdev/clipping.cxx vcl/source/outdev/font.cxx vcl/source/outdev/hatch.cxx vcl/source/outdev/map.cxx vcl/source/outdev/nativecontrols.cxx vcl/source/outdev/outdev.cxx vcl/source/outdev/text.cxx vcl/source/outdev/textline.cxx vcl/source/toolkit/group.cxx vcl/source/window/brdwin.cxx vcl/source/window/decoview.cxx vcl/source/window/window.cxx vcl/source/window/window2.cxx vcl/unx/generic/gdi/salgdi.cxx vcl/workben/outdevgrind.cxx It will take me several days to change, test compilation and check that there is no regression. At the moment I do not know how I can check that there will be no regression.
work in progress...
(In reply to Adrien Ollier from comment #36) > I am working on this bug. > I have an idea how to solve this cleanly but there is a lot of work as many > files have to be changed: > > git grep -lE 'OUTDEV_(WINDOW|PRINTER|VIRDEV|PDF)' -- \*.cpp \*.cxx a long list... > It will take me several days to change, test compilation and check that > there is no regression. > At the moment I do not know how I can check that there will be no regression. The easy hack is not to finish this in one go, but commit separate patches. A single patch will probably be sufficient as a hack, if it solves a call sites problem in a sensible way. Just look at the other patches already commited. Generally the idea of this change is not to just rip out OutDevType and replacing its test sites with dynamic_cast == nullptr. Quoting the first comment: "We need to remove this enum and move the logic to specific classes out of the base classes. This is a massive task, however." Most times you will make a function virtual or add some virtual function and move the if / switch code branches into the respective class functions.
A more higher level explanation: This bug is about fixing the current state where the type of the OutputDevice matters to the outside user. The type shouldn't matter - when I draw something to a OutputDevice the API behaviour should be the same if I draw to a window, off-screen surface, printer, PDF. All the details and differences of the different types should then be handled internally.
Adrien Ollier committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/0e791f4e59f0288081375d26d281a5aef41b628d%5E%21 tdf#74702 partial cleanup of OutDevType It will be available in 6.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Adrien Ollier committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/01813e6e86709c929f5e545ba206224f0bb25e5f%5E%21 tdf#74702 partial cleanup of OutDevType It will be available in 6.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Adrien Ollier committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/19057bca87abf09ec6701c1d28084faa24ba9c3f%5E%21 tdf#74702 partial cleanup of OutDevType It will be available in 6.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Adrien Ollier committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/3a99d7f6210363cef47641481b82bae6fb1e997c%5E%21 tdf#74702: cleans OutputDevice::InitClipRegion up It will be available in 6.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Adrien Ollier committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/c5e7cba6fe712aecc7131be550de37b93db27b18%5E%21 tdf#74702: cleans OutputDevice::DrawHatchLine up It will be available in 6.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/+/58ef52cf3258030860d34f05bc19e2b42d9503c6%5E%21 tdf#74702: OutputDevice:InitClipRegion followup It will be available in 6.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/+/08995b6a764c9e387c94f6ce5faba2145b5512f9%5E%21 tdf#74702: remove GetOutDevType() from ImplAnimView It will be available in 6.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/+/67950f00989dff4640ba83e540673375a2c60a13%5E%21 tdf#74702: vcl add OutputDevice::Flush() to remove GetOutDevType() It will be available in 6.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Adrien Ollier committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/7e88bc73030c7708f1a8b47491070aae5b73aac1%5E%21 tdf#74702: removes GetOutDevType() from OutputDevice::ImplRefreshFontData It will be available in 6.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/+/41dbf08b99c259b387e95e9143b88b508724d945%5E%21 tdf#74702: use OutputDevice::GetBackgroundColor() It will be available in 6.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/+/78d225f51404d1a98795541bc9c84f7405502411%5E%21 tdf#74702: remove GetOutDevType() from SmTmpDevice It will be available in 6.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Adrien Ollier committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/fcc0fea62a6985699dfa88136f22cb19be6232bd tdf#74702: clean up of OutputDevice::SetMapMode It will be available in 6.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Yusuf Keten committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a68157c88add7a815678155f4d7a743b010d92f5 tdf#74702: Remove enum OutDevType from OutputDevice::drawOutDevDirect It will be available in 7.0.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Yusuf Keten committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ec48d37f574924c66dea4f7adb56944bbe636aa1 tdf#74702 Remove OutDevType from OutputDevice::RemoveTransparenciesFromMetaFile It will be available in 7.0.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/commit/557c6777ad33b54af28541a96bcf91596995b388 tdf#74702 vcl: extract GetOutputBoundsClipRegion() It will be available in 7.0.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/commit/7637547123b00a9b07ef8659bc077be85cba0a89 tdf#74702 vcl: extract IsScreenComp() It will be available in 7.0.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/commit/201651953740edd3e9eb0b4fcbdcd4bf1a79a2c1 tdf#74702 vcl: extract SetMetafileMapMode() It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/commit/e25334e1c1022b4741897a3e659fcbad5cde97c4 tdf#74702 vcl: extract GetSyncCount() It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/commit/bb0039ca67f84d8c46e78f4209c17d2923790140 tdf#74702 vcl: extract GetButtonBorderSize() It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/commit/c39738eabfb9edde552832581bf85e717b00cc79 tdf#74702 vcl: extract GetMonochromeButtonColor() It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Hello I'm not sure this modification is really required. The previous and current code have printing and PDF export different. LO should be WYSIWYG . I will replace this if no one is agaonst. https://git.libreoffice.org/core/+/c39738eabfb9edde552832581bf85e717b00cc79%5E%21
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/f4b4b27af975504fd9b85451eaa333e75b580305 tdf#74702 vcl: extract DrawBorder() It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Arnaud Versini from comment #60) > Hello > > I'm not sure this modification is really required. The previous and current > code have printing and PDF export different. LO should be WYSIWYG . I will > replace this if no one is agaonst. > > https://git.libreoffice.org/core/+/ > c39738eabfb9edde552832581bf85e717b00cc79%5E%21 How are you considering replacing it? As in, remove the code that distinguishes the border width?
(In reply to Chris Sherlock from comment #62) > (In reply to Arnaud Versini from comment #60) > > Hello > > > > I'm not sure this modification is really required. The previous and current > > code have printing and PDF export different. LO should be WYSIWYG . I will > > replace this if no one is agaonst. > > > > https://git.libreoffice.org/core/+/ > > c39738eabfb9edde552832581bf85e717b00cc79%5E%21 > > How are you considering replacing it? As in, remove the code that > distinguishes the border width? Yes it's the idea, but I first need to create a document using this compoment to check the behavior.
Chris Sherlock committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/159d9c30c474c6525643d832a38e640cd442ac7c tdf#74702 - vcl: introduce OutputDevice::CanEnableNativeWidget() It will be available in 7.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/commit/ab2d3462f412d5180e60512df0dfb9c3b13ebf0c tdf#74702 - vcl: introduce OutputDevice::GetDeviceInfo() It will be available in 7.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/commit/9a58ec3f6f65da27e3b26e1173b6661b743e66a4 tdf#74702 vcl: remove GetOutDevType() from ImplNewFont() It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/commit/a2c8195f465a2e4346169d2b586c34e8fbed253c tdf#74702 vcl: introduce GetSystemTextColor() It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/commit/368e21fbc34fa4104f16498a54ab77704f39e6b4 tdf#74702 vcl: make helper funcs for ImplDrawWaveLine() and ImplDrawWavePixel() It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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": https://git.libreoffice.org/core/commit/2284be4f80664c54fa2ef8652030aa14d63c13a2 vcl: followup tdf#74702 vcl: remove GetOutDevType() from ImplNewFont() It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Re-evaluating the EasyHack in 2024 This enhancement is still relevant, as there are many places in the code that need change. For example, see these results: $ git grep -E 'OUTDEV_(WINDOW|PRINTER|VIRDEV|PDF)' *.cxx *.hxx | wc -l 163