• Julien Nabet's avatar
    Avoid empty avoid name for SfxPrintingHint · 4b2476b5
    Julien Nabet yazdı
    Create a brand new doc on Writer, click Print then Cancel button
    =>
    warn:legacy.tools:2382:2382:sfx2/source/doc/sfxbasemodel.cxx:3071: Empty event name!
    
    Here's the bt
    0  0x00007ffff1da379c in SfxBaseModel::postEvent_Impl(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::frame::XController2> const&) (this=0x5555578f0630, aName="", xController=empty uno::Reference) at /home/julien/lo/libreoffice/sfx2/source/doc/sfxbasemodel.cxx:3073
    1  0x00007ffff1da134b in SfxBaseModel::Notify(SfxBroadcaster&, SfxHint const&) (this=0x5555578f0630, rBC=..., rHint=...)
        at /home/julien/lo/libreoffice/sfx2/source/doc/sfxbasemodel.cxx:2731
    2  0x00007ffff12768d1 in SfxBroadcaster::Broadcast(SfxHint const&) (this=0x5555578e9420, rHint=...) at /home/julien/lo/libreoffice/svl/source/notify/SfxBroadcaster.cxx:49
    3  0x00007ffff1eec7b6 in SfxPrinterController::jobFinished(com::sun::star::view::PrintableState) (this=0x55555c092d20, nState=com::sun::star::view::PrintableState::PrintableState_JOB_ABORTED) at /home/julien/lo/libreoffice/sfx2/source/view/viewprn.cxx:329
    4  0x00007fffec314318 in Printer::FinishPrintJob(std::shared_ptr<vcl::PrinterController> const&) (xController=std::shared_ptr (count 2, weak 0) 0x55555c092d20)
        at /home/julien/lo/libreoffice/vcl/source/gdi/print3.cxx:519
    5  0x00007fffec3143b1 in Printer::ImplPrintJob(std::shared_ptr<vcl::PrinterController> const&, JobSetup const&) (xController=std::shared_ptr (count 2, weak 0) 0x55555c092d20, i_rInitSetup=...) at /home/julien/lo/libreoffice/vcl/source/gdi/print3.cxx:529
    6  0x00007fffec3128ef in PrintJobAsync::ExecJob(void*) (this=0x55555c09b940) at /home/julien/lo/libreoffice/vcl/source/gdi/print3.cxx:275
    7  0x00007fffec3128c5 in PrintJobAsync::LinkStubExecJob(void*, void*) (instance=0x55555c09b940, data=0x0) at /home/julien/lo/libreoffice/vcl/source/gdi/print3.cxx:273
    
    This behavior has been like this since:
    https://cgit.freedesktop.org/libreoffice/core/commit/?id=87dfa6dd336d596112c0beb6b42f082178461678
    
    This patch will allow SfxBaseModel::postEvent_Impl to not return early
    See https://opengrok.libreoffice.org/xref/core/sfx2/source/doc/sfxbasemodel.cxx#3059
    
    Change-Id: I77ff916c15944693f9f0848bf8f18659f9b519df
    Reviewed-on: https://gerrit.libreoffice.org/48936Tested-by: 's avatarJenkins <ci@libreoffice.org>
    Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
    4b2476b5
event.hxx 5.56 KB