https://bugs.freedesktop.org/show_bug.cgi?id=74702
Priority: medium
Bug ID: 74702
Assignee: [email protected]
Summary: Remove enum OutDevType from OutputDevice
Severity: enhancement
Classification: Unclassified
OS: All
Reporter: [email protected]
Hardware: Other
Status: UNCONFIRMED
Version: Inherited From OOo
Component: Libreoffice
Product: LibreOffice
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
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs