From ef7971f80c1f07c02afd9e318a7ff80d2673d05a Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 27 Aug 2026 19:12:36 +0200 Subject: [PATCH] Use QueryDialog directly instead of via cui abstraction Now that previous commit Change-Id: I57bdade32c21c7ab40c5a4c90bd86e8dea5d2fad Author: Michael Weghorn Date: Thu Aug 27 19:00:42 2026 +0200 Move QueryDialog to svtools moved QueryDialog to svtools, use it directly instead of via the extra AbstractQueryDialog abstraction. This simplifies the code and rules out one potential cause for the crash seen in crash reports like [1] (see backtrace below). From looking at the backtrace and code, I don't currently see anything that looks problematic to me and could result in a null dialog or button in a proper installation. Simplifying this seems a good idea anyway, and rules out a null dialog. Related discussion: [2] The dialog can e.g. be triggered like this: * start Writer * Ctrl+Shift+S for "Save As" * select "Text (.txt)" for the file type * press OK (Resetting the profile ensures the dialog gets shown in case the "Don't show again" checkbox has been ticked previously.) Backtrace from [1]: 0 mergedlo.dll static void `anonymous namespace'::AbstractQueryDialog_Impl::SetYesLabel(const class rtl::OUString & const) cui/source/factory/dlgfact.cxx:1562 1 mergedlo.dll static void `anonymous namespace'::AbstractQueryDialog_Impl::SetYesLabel(const class rtl::OUString & const) cui/source/factory/dlgfact.cxx:1562 2 mergedlo.dll ConfirmationDlg::Query(weld::Window *,rtl::OUString const &,rtl::OUString const &,rtl::OUString const &,rtl::OUString const &,rtl::OUString const &) include/svtools/confirmationdlg.hxx:32 3 mergedlo.dll ConfirmationDlg::Query(weld::Window *,rtl::OUString const &,rtl::OUString const &,rtl::OUString const &,rtl::OUString const &,rtl::OUString const &) include/svtools/confirmationdlg.hxx:24 4 mergedlo.dll SfxStoringHelper::WarnUnacceptableFormat(com::sun::star::uno::Reference const &,std::basic_string_view >,std::basic_string_view >,rtl::OUString const &,bool) sfx2/source/doc/guisaveas.cxx:2114 5 mergedlo.dll ModelData_Impl::CheckFilter(rtl::OUString const &) sfx2/source/doc/guisaveas.cxx:861 6 mergedlo.dll com::sun::star::uno::cppu_detail_getUnoType(com::sun::star::uno::RuntimeException const *) E:/build/workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/RuntimeException.hpp:89 7 ntdll.dll 0x3c3a0 8 mergedlo.dll ModelData_Impl::CheckFilter(rtl::OUString const &) sfx2/source/doc/guisaveas.cxx:781 9 mergedlo.dll SfxStoringHelper::FinishGUIStoreModel(std::_List_const_iterator > > > &,ModelData_Impl &,bool,short,com::sun::star::uno::Sequence const &,bool,bool,bool,std::basic_string_view >,std::basic_string_view >,com::sun::star::uno::Sequence &,rtl::OUString,SignatureState) sfx2/source/doc/guisaveas.cxx:1680 10 cppu3.dll typelib_typedescriptionreference_release cppu/source/typelib/typelib.cxx:2145 11 cppu3.dll cppu::_destructData(void *,_typelib_TypeDescriptionReference *,_typelib_TypeDescription *,void (*)(void *)) cppu/source/uno/destr.hxx:312 12 cppu3.dll cppu::_destructData(void *,_typelib_TypeDescriptionReference *,_typelib_TypeDescription *,void (*)(void *)) cppu/source/uno/destr.hxx:308 13 ucrtbase.dll 0x1364b 14 sal3.dll rtl_uString_assign sal/rtl/ustring.cxx:1169 15 sal3.dll rtl_uString_release sal/rtl/ustring.cxx:1118 16 mergedlo.dll SfxStoringHelper::FinishGUIStoreModel(std::_List_const_iterator > > > &,ModelData_Impl &,bool,short,com::sun::star::uno::Sequence const &,bool,bool,bool,std::basic_string_view >,std::basic_string_view >,com::sun::star::uno::Sequence &,rtl::OUString,SignatureState) sfx2/source/doc/guisaveas.cxx:1620 17 mergedlo.dll SfxStoringHelper::GUIStoreModel(com::sun::star::uno::Reference const &,std::basic_string_view >,com::sun::star::uno::Sequence &,bool,SignatureState,SignatureState,bool) sfx2/source/doc/guisaveas.cxx:1605 18 mergedlo.dll SvtSecurityOptions::SetTrustedAuthors(std::vector > const &) unotools/source/config/securityoptions.cxx:283 19 ntdll.dll 0x3ccea 20 ucrtbase.dll 0x1f038 21 ntdll.dll 0x3b041 22 cppu3.dll uno_type_sequence_construct cppu/source/uno/sequence.cxx:668 23 mergedlo.dll SfxObjectShell::ExecFile_Impl(SfxRequest &) sfx2/source/doc/objserv.cxx:1150 24 mergedlo.dll static lo_initialize$catch$194() desktop/source/lib/init.cxx:8401 25 mergedlo.dll static lo_initialize$catch$194() desktop/source/lib/init.cxx:8401 26 cppu3.dll cppu::icopyConstructSequence(_sal_Sequence *,_typelib_TypeDescriptionReference *,void (*)(void *),_uno_Mapping *) cppu/source/uno/copy.hxx:398 27 cppu3.dll cppu::_copyConstructAnyFromData(_uno_Any *,void *,_typelib_TypeDescriptionReference *,_typelib_TypeDescription *,void (*)(void *),_uno_Mapping *) cppu/source/uno/copy.hxx:231 28 cppu3.dll cppu::_copyConstructAny(_uno_Any *,void *,_typelib_TypeDescriptionReference *,_typelib_TypeDescription *,void (*)(void *),_uno_Mapping *) cppu/source/uno/copy.hxx:284 29 cppu3.dll uno_type_any_assign cppu/source/uno/any.cxx:38 30 salhelper3MSC.dll salhelper::SimpleReferenceObject::release() include/salhelper/simplereferenceobject.hxx:80 31 mergedlo.dll configmgr::Access::getByNameFast(rtl::OUString const &,com::sun::star::uno::Any &) configmgr/source/access.cxx:393 32 ntdll.dll 0x3b041 33 ucrtbase.dll 0x1364b 34 cppu3.dll cppu::_type_equals(_typelib_TypeDescriptionReference const *,_typelib_TypeDescriptionReference const *) cppu/source/uno/prim.hxx:144 35 cppu3.dll cppu::_assignData(void *,_typelib_TypeDescriptionReference *,_typelib_TypeDescription *,void *,_typelib_TypeDescriptionReference *,_typelib_TypeDescription *,void * (*)(void *,_typelib_TypeDescriptionReference *),void (*)(void *),void (*)(void *)) cppu/source/uno/assign.hxx:387 36 sal3.dll rtl_uString_release sal/rtl/ustring.cxx:1118 37 cppu3.dll typelib_typedescription_release cppu/source/typelib/typelib.cxx:1313 38 cppu3.dll typelib_typedescriptionreference_release cppu/source/typelib/typelib.cxx:2145 39 ntdll.dll 0x3d6da 40 ntdll.dll 0x3ccea 41 mergedlo.dll FontMetricData::ShouldNotUseUnderlineMetrics() vcl/source/font/fontmetric.cxx:186 42 mergedlo.dll OutputDevice::InitFont() vcl/source/outdev/font.cxx:668 43 ntdll.dll 0x3c3a0 44 i18nlangtag.dll LanguageTag::LanguageTag(LanguageTag const &) include/i18nlangtag/languagetag.hxx:142 45 mergedlo.dll o3tl::cow_wrapper >::make_unique() include/o3tl/cow_wrapper.hxx:298 46 ucrtbase.dll 0x276aa 47 mergedlo.dll vcl::Font::SetFontSize(Size const &) vcl/source/font/font.cxx:156 48 ucrtbase.dll 0x1364b 49 sal3.dll rtl_uString_release sal/rtl/ustring.cxx:1118 50 mergedlo.dll o3tl::cow_wrapper >::release() include/o3tl/cow_wrapper.hxx:201 51 mergedlo.dll o3tl::cow_wrapper >::release() include/o3tl/cow_wrapper.hxx:198 52 mergedlo.dll ImpEditEngine::RecalcFormatterFontMetrics(FormatterFontMetric &,SvxFont &) editeng/source/editeng/impedit3.cxx:3182 53 ucrtbase.dll 0x272e4 54 mergedlo.dll SfxItemSet::Get(unsigned short,bool) svl/source/items/itemset.cxx:965 55 ucrtbase.dll 0x27691 56 mergedlo.dll ImpEditEngine::GetJustification(long) editeng/source/editeng/impedit2.cxx:2077 57 mergedlo.dll o3tl::cow_wrapper >::release() include/o3tl/cow_wrapper.hxx:198 58 mergedlo.dll ImpEditEngine::CreateAndInsertEmptyLine(ParaPortion &) editeng/source/editeng/impedit3.cxx:1994 59 mergedlo.dll SfxItemPool::GetUserOrPoolDefaultItem(unsigned short) svl/source/items/itempool.cxx:723 60 mergedlo.dll SfxItemSet::Get(unsigned short,bool) svl/source/items/itemset.cxx:965 61 mergedlo.dll ParaPortionList::GetPos(ParaPortion const *) editeng/source/editeng/editdoc.cxx:496 62 mergedlo.dll ImpEditEngine::CalcHeight(ParaPortion &) editeng/source/editeng/impedit2.cxx:4791 63 mergedlo.dll ImpEditEngine::FinishCreateLines(ParaPortion &) editeng/source/editeng/impedit3.cxx:2003 64 mergedlo.dll ImpEditEngine::FinishCreateLines(ParaPortion &) editeng/source/editeng/impedit3.cxx:1999 65 mergedlo.dll ImpEditEngine::CreateLines(long,unsigned long) editeng/source/editeng/impedit3.cxx:670 66 mergedlo.dll static lo_initialize$catch$194() desktop/source/lib/init.cxx:8401 67 mergedlo.dll static lo_destroy$dtor$0() 68 mergedlo.dll boost::locale::gnu_gettext::mo_file::value(unsigned int) E:/build/workdir/UnpackedTarball/boost/libs/locale/src/shared/message.cpp:196 69 mergedlo.dll boost::locale::gnu_gettext::mo_file::find(char const *,char const *) E:/build/workdir/UnpackedTarball/boost/libs/locale/src/shared/message.cpp:145 70 ucrtbase.dll 0x11966 71 sal3.dll rtl_uString_ImplAlloc(long) sal/rtl/ustring.cxx:1109 72 mergedlo.dll static lo_initialize$catch$194() desktop/source/lib/init.cxx:8401 73 ntdll.dll 0x3d6da 74 ntdll.dll 0x3d6da 75 mergedlo.dll SfxItemPool::GetUserOrPoolDefaultItem(unsigned short) svl/source/items/itempool.cxx:723 76 mergedlo.dll SfxItemSet::Get(unsigned short,bool) svl/source/items/itemset.cxx:965 77 mergedlo.dll SfxItemSet::Get(unsigned short,bool) svl/source/items/itemset.cxx:935 78 mergedlo.dll ImpEditEngine::CalcVertLineSpacing(Point &) editeng/source/editeng/impedit3.cxx:4436 79 mergedlo.dll SfxItemPool::GetUserOrPoolDefaultItem(unsigned short) svl/source/items/itempool.cxx:723 80 mergedlo.dll SfxItemSet::Get(unsigned short,bool) svl/source/items/itemset.cxx:965 81 mergedlo.dll SfxItemSet::Get(unsigned short,bool) svl/source/items/itemset.cxx:935 82 mergedlo.dll ImpEditEngine::IterateLineAreas(std::function const &,ImpEditEngine::IterFlag) editeng/source/editeng/impedit2.cxx:3417 83 mergedlo.dll _std_minmax_8i D:/a/_work/1/s/src/vctools/crt/github/stl/src/vector_algorithms.cpp:2451 84 mergedlo.dll SfxItemSet::Get(unsigned short,bool) svl/source/items/itemset.cxx:965 85 mergedlo.dll RectangleTemplateBase::Union(RectangleTemplateBase const &) tools/source/generic/gen.cxx:88 86 mergedlo.dll ImpEditEngine::CalcVertLineSpacing(Point &) editeng/source/editeng/impedit3.cxx:4436 87 mergedlo.dll SfxItemSet::Get(unsigned short,bool) svl/source/items/itemset.cxx:965 88 ntdll.dll 0x3c3a0 89 mergedlo.dll ImpEditEngine::IterateLineAreas(std::function const &,ImpEditEngine::IterFlag) editeng/source/editeng/impedit2.cxx:3417 90 ntdll.dll 0x3b041 91 ucrtbase.dll 0x1364b 92 mergedlo.dll std::allocator::deallocate(long * const,unsigned __int64) C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/include/xmemory:985 93 mergedlo.dll std::allocator::deallocate(long * const,unsigned __int64) C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/include/xmemory:982 94 mergedlo.dll ImpEditEngine::FormatDoc() editeng/source/editeng/impedit3.cxx:412 95 mergedlo.dll ImpEditEngine::CallStatusHdl() editeng/source/editeng/impedit3.cxx:4368 96 mergedlo.dll ImpEditEngine::UpdateViews(EditView *) editeng/source/editeng/impedit3.cxx:188 97 mergedlo.dll ImpEditEngine::UpdateViews(EditView *) editeng/source/editeng/impedit3.cxx:155 98 mergedlo.dll ImpEditEngine::SetUpdateLayout(bool,EditView *,bool) editeng/source/editeng/impedit3.cxx:4247 99 mergedlo.dll EditEngine::SetUpdateLayout(bool,bool) editeng/source/editeng/editeng.cxx:800 100 sal3.dll rtl_uString_release sal/rtl/ustring.cxx:1118 101 sclo.dll ScInputHandler::EnterHandler2(ScEnterMode,bool,rtl::OUString,rtl::OUString const &) sc/source/ui/app/inputhdl.cxx:3646 102 mergedlo.dll static lo_initialize$catch$194() desktop/source/lib/init.cxx:8401 103 mergedlo.dll static lo_initialize$catch$194() desktop/source/lib/init.cxx:8401 104 mergedlo.dll static lo_initialize$catch$194() desktop/source/lib/init.cxx:8401 105 ucrtbase.dll 0x11966 106 ntdll.dll 0x633f2 107 ntdll.dll 0x3c3a0 108 ucrtbase.dll 0x1364b 109 mergedlo.dll static lo_initialize$catch$194() desktop/source/lib/init.cxx:8401 110 mergedlo.dll ContentNode::GetExpandedText(long,long) editeng/source/editeng/ContentNode.cxx:472 111 sal3.dll rtl_uString_release sal/rtl/ustring.cxx:1118 112 mergedlo.dll EditEngine::GetText(long) editeng/source/editeng/editeng.cxx:946 113 ntdll.dll 0x3b041 114 mergedlo.dll static lo_initialize$catch$194() desktop/source/lib/init.cxx:8401 115 ucrtbase.dll 0x1364b 116 sclo.dll ScInputHandler::EnterHandler2(ScEnterMode,bool,rtl::OUString,rtl::OUString const &) sc/source/ui/app/inputhdl.cxx:3333 117 sal3.dll rtl_uString_release sal/rtl/ustring.cxx:1119 118 sal3.dll rtl_uString_release sal/rtl/ustring.cxx:1118 119 sclo.dll ScInputHandler::EnterHandler(ScEnterMode,bool) sc/source/ui/app/inputhdl.cxx:3329 120 mergedlo.dll static void xmloff::token::`dynamic initializer for 'aTokenList''() xmloff/source/core/xmltoken.cxx:3474 121 ntdll.dll 0x53850 122 KERNELBASE.dll 0x2931b 123 VCRUNTIME140.dll 0x48a9 124 ntdll.dll 0x53850 125 ucrtbase.dll 0x1f038 126 mergedlo.dll SfxInterface::GetSlot(unsigned short) sfx2/source/control/objface.cxx:163 127 mergedlo.dll SfxInterface::GetSlot(unsigned short) sfx2/source/control/objface.cxx:157 128 mergedlo.dll SfxObjectShell::ExecFile_Impl(SfxRequest &) sfx2/source/doc/objserv.cxx:557 129 mergedlo.dll SfxShell::ExecuteSlot(SfxRequest &,SfxInterface const *) sfx2/source/control/shell.cxx:475 130 sclo.dll SfxStubScTabViewShellExecuteSave(SfxShell *,SfxRequest &) E:/build/workdir/SdiTarget/sc/sdi/scslots.hxx:1584 131 sclo.dll SfxStubScTabViewShellExecuteSave(SfxShell *,SfxRequest &) E:/build/workdir/SdiTarget/sc/sdi/scslots.hxx:1584 132 mergedlo.dll SfxDispatcher::Call_Impl(SfxShell &,SfxSlot const &,SfxRequest &,bool) sfx2/source/control/dispatch.cxx:258 133 mergedlo.dll SfxDispatcher::Call_Impl(SfxShell &,SfxSlot const &,SfxRequest &,bool) sfx2/source/control/dispatch.cxx:219 134 mergedlo.dll SfxBindings::Execute_Impl(SfxRequest &,SfxSlot const *,SfxShell &) sfx2/source/control/bindings.cxx:1051 135 mergedlo.dll operator new(unsigned __int64) D:/a/_work/1/s/src/vctools/crt/vcstartup/src/heap/new_scalar.cpp:36 136 mergedlo.dll cppu::PartialWeakComponentImplHelper::acquire() include/cppuhelper/compbase.hxx:83 137 mergedlo.dll SfxUnoFrameItem::SfxUnoFrameItem(SfxUnoFrameItem const &) 138 mergedlo.dll struct std::pair,void *> *,bool> std::_Hash,std::equal_to >,std::allocator >,0> >::_Try_emplace(const unsigned short & const) C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/include/xhash:707 139 mergedlo.dll SfxUnoFrameItem::SfxUnoFrameItem(SfxUnoFrameItem const &) 140 mergedlo.dll SfxItemSet::SfxItemSet(SfxItemSet const &) svl/source/items/itemset.cxx:270 141 mergedlo.dll SfxBindings::Execute_Impl(SfxRequest &,SfxSlot const *,SfxShell &) sfx2/source/control/bindings.cxx:965 142 mergedlo.dll SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const &,com::sun::star::uno::Sequence const &,com::sun::star::uno::Reference const &) sfx2/source/control/unoctitm.cxx:737 143 cppu3.dll cppu::_copyConstructAnyFromData(_uno_Any *,void *,_typelib_TypeDescriptionReference *,_typelib_TypeDescription *,void (*)(void *),_uno_Mapping *) cppu/source/uno/copy.hxx:250 144 cppu3.dll cppu::_assignData(void *,_typelib_TypeDescriptionReference *,_typelib_TypeDescription *,void *,_typelib_TypeDescriptionReference *,_typelib_TypeDescription *,void * (*)(void *,_typelib_TypeDescriptionReference *),void (*)(void *),void (*)(void *)) cppu/source/uno/assign.hxx:417 145 cppu3.dll static void typelib_typedescription_destructExtendedMembers(struct _typelib_TypeDescription *) cppu/source/typelib/typelib.cxx:1308 146 mergedlo.dll static class std::unique_ptr > `anonymous namespace'::EnsureJavaContext() sfx2/source/control/unoctitm.cxx:229 147 mergedlo.dll SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const &,com::sun::star::uno::Sequence const &,com::sun::star::uno::Reference const &) sfx2/source/control/unoctitm.cxx:572 148 mergedlo.dll static class std::unique_ptr > `anonymous namespace'::EnsureJavaContext() sfx2/source/control/unoctitm.cxx:229 149 mergedlo.dll SfxOfficeDispatch::dispatch(com::sun::star::util::URL const &,com::sun::star::uno::Sequence const &) sfx2/source/control/unoctitm.cxx:256 150 mergedlo.dll static void framework::`anonymous namespace'::AsyncMenuExecute(void *, void *) framework/source/uielement/menubarmanager.cxx:793 151 mergedlo.dll static void framework::`anonymous namespace'::AsyncMenuExecute(void *, void *) framework/source/uielement/menubarmanager.cxx:789 152 mergedlo.dll ImplWindowFrameProc(vcl::Window *,SalEvent,void const *) vcl/source/window/winproc.cxx:2871 153 vclplug_winlo.dll static bool ImplHandleMouseMsg(struct HWND__ *, unsigned int, unsigned __int64, __int64) vcl/win/window/salframe.cxx:3311 154 ntdll.dll 0x3365b 155 ntdll.dll 0x3d809 156 user32.dll 0x1b5e9 157 mergedlo.dll SalFrame::CallCallback(SalEvent,void const *) vcl/inc/salframe.hxx:311 158 mergedlo.dll SalFrame::CallCallback(SalEvent,void const *) vcl/inc/salframe.hxx:311 159 vclplug_winlo.dll static __int64 SalFrameWndProc(struct HWND__ *, unsigned int, unsigned __int64, __int64, bool & const) vcl/win/window/salframe.cxx:6136 160 user32.dll 0x13b04 161 skialo.dll static void `anonymous namespace'::RasterWindowContext_win::onSwapBuffers(const struct SkIRect *) E:/build/workdir/UnpackedTarball/skia/tools/window/win/RasterWindowContext_win.cpp:89 162 mergedlo.dll static lo_initialize$catch$194() desktop/source/lib/init.cxx:8401 163 ntdll.dll 0x2e71a 164 ntdll.dll 0x28b33 165 vclplug_winlo.dll static __int64 SalFrameWndProc(struct HWND__ *, unsigned int, unsigned __int64, __int64, bool & const) vcl/win/window/salframe.cxx:5738 166 vclplug_winlo.dll SalFrameWndProcW(HWND__ *,unsigned int,unsigned __int64,__int64) vcl/win/window/salframe.cxx:6145 167 vclplug_winlo.dll SalFrameWndProcW(HWND__ *,unsigned int,unsigned __int64,__int64) vcl/win/window/salframe.cxx:6140 168 user32.dll 0x18eb8 169 vclplug_winlo.dll WinSalYieldMutex::doRelease(bool) vcl/win/app/salinst.cxx:150 170 msvcp140.dll 0x1285b 171 user32.dll 0x18bec 172 vclplug_winlo.dll static __int64 SalFrameWndProc(struct HWND__ *, unsigned int, unsigned __int64, __int64, bool & const) vcl/win/window/salframe.cxx:6137 173 user32.dll 0x18771 174 vclplug_winlo.dll static __int64 SalFrameWndProc(struct HWND__ *, unsigned int, unsigned __int64, __int64, bool & const) vcl/win/window/salframe.cxx:6137 175 mergedlo.dll OpenGLContext::prepareForYield() vcl/source/opengl/OpenGLContext.cxx:377 176 vclplug_winlo.dll ImplSalYield(bool,bool) vcl/win/app/salinst.cxx:409 177 mergedlo.dll static lo_initialize$catch$194() desktop/source/lib/init.cxx:8401 178 sal3.dll osl_setCondition sal/osl/w32/conditn.cxx:55 179 vclplug_winlo.dll WinSalInstance::DoYield(bool,bool) vcl/win/app/salinst.cxx:484 180 vclplug_winlo.dll WinSalInstance::DoYield(bool,bool) vcl/win/app/salinst.cxx:468 181 mergedlo.dll static bool InnerYield(bool, bool) vcl/source/app/svapp.cxx:389 182 mergedlo.dll static lo_initialize$catch$194() desktop/source/lib/init.cxx:8401 183 mergedlo.dll static bool InnerYield(bool, bool) vcl/source/app/svapp.cxx:376 184 mergedlo.dll Application::Execute() vcl/source/app/svapp.cxx:364 185 mergedlo.dll desktop::Desktop::Main() desktop/source/app/app.cxx:1679 186 mergedlo.dll static lo_initialize$catch$194() desktop/source/lib/init.cxx:8401 187 MSVCP140_1.dll 0x11ef 188 ucrtbase.dll 0x20475 189 mergedlo.dll operator<< >(std::basic_ostream > &,FontMetric const &) include/vcl/metric.hxx:107 190 mergedlo.dll static lo_initialize$catch$194() desktop/source/lib/init.cxx:8401 191 sal3.dll rtl_uString_release sal/rtl/ustring.cxx:1118 192 mergedlo.dll InitVCL() vcl/source/app/svmain.cxx:371 193 mergedlo.dll desktop::Desktop::Main() desktop/source/app/app.cxx:1304 194 mergedlo.dll ImplSVMainRun() vcl/source/app/svmain.cxx:234 195 mergedlo.dll soffice_main desktop/source/app/sofficemain.cxx:122 196 ntdll.dll 0x53850 197 ucrtbase.dll 0x20400 198 mergedlo.dll static `desktop::CallbackFlushHandler::CallbackData::CallbackData'::`1'::dtor$0() 199 mergedlo.dll soffice_main desktop/source/app/sofficemain.cxx:59 200 soffice.bin main desktop/source/app/main.c:49 201 soffice.bin static int __scrt_common_main_seh() D:/a/_work/1/s/src/vctools/crt/vcstartup/src/startup/exe_common.inl:288 202 soffice.bin mainCRTStartup D:/a/_work/1/s/src/vctools/crt/vcstartup/src/startup/exe_main.cpp:16 203 kernel32.dll 0x1259d 204 ntdll.dll 0x5af78 [1] https://crashreport.libreoffice.org/stats/crash_details/6812315d-e79b-46ce-893d-688d6908c41c [2] https://gerrit.libreoffice.org/c/core/+/203572/comment/95fcd0be_db5a3d02/ Change-Id: Ia30eecd2667d15220b9f7824faea5adc04c94e93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210137 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- cui/source/factory/dlgfact.cxx | 24 ------------------------ cui/source/factory/dlgfact.hxx | 5 ----- include/svtools/confirmationdlg.hxx | 15 +++++++-------- include/vcl/abstdlg.hxx | 16 ---------------- sc/source/ui/view/tabvwshh.cxx | 15 +++++++-------- sw/source/ui/index/swuiidxmrk.cxx | 14 ++++---------- 6 files changed, 18 insertions(+), 71 deletions(-) diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index d76e1589a727..5d61574e02a8 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1551,28 +1551,4 @@ AbstractDialogFactory_Impl::CreateFileExtCheckDialog(weld::Window* pParent, cons } #endif -namespace -{ -class AbstractQueryDialog_Impl final - : public vcl::AbstractDialogImpl_Async -{ -public: - using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE; - bool DontShowAgain() const override { return m_pDlg->DontShowAgain(); } - void SetYesLabel(const OUString& sLabel) override { m_pDlg->SetYesLabel(sLabel); } - void SetNoLabel(const OUString& sLabel) override { m_pDlg->SetNoLabel(sLabel); } - void SetTypeWarn() override { m_pDlg->SetTypeWarn(); } -}; -} - -VclPtr -AbstractDialogFactory_Impl::CreateQueryDialog( - weld::Window* pParent, - const OUString& sTitle, const OUString& sText, const OUString& sQuestion, - bool bShowAgain) -{ - return VclPtr::Create(pParent, sTitle, sText, sQuestion, bShowAgain); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 4a2c0f26916c..16b9b9e32f26 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -224,11 +224,6 @@ public: weld::Window* pParent, SdrObjGroup& rDiagram) override; - virtual VclPtr CreateQueryDialog( - weld::Window* pParent, - const OUString& sTitle, const OUString& sText, const OUString& sQuestion, - bool bShowAgain) override; - #ifdef _WIN32 virtual VclPtr CreateFileExtCheckDialog(weld::Window* pParent, const OUString& sTitle, diff --git a/include/svtools/confirmationdlg.hxx b/include/svtools/confirmationdlg.hxx index bb29419aa4b4..412cee594add 100644 --- a/include/svtools/confirmationdlg.hxx +++ b/include/svtools/confirmationdlg.hxx @@ -11,9 +11,10 @@ #include #include -#include +#include #include #include + class SVT_DLLPUBLIC ConfirmationDlg { public: @@ -26,16 +27,15 @@ public: if (ConfigurationLocalizedProperty::get()) { - VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); - auto pDlg = pFact->CreateQueryDialog(pParent, rTitle, rText, rQuestion, bHideShowAgain); + QueryDialog aDialog(pParent, rTitle, rText, rQuestion, bHideShowAgain); if (!rYesLabel.isEmpty()) - pDlg->SetYesLabel(rYesLabel); + aDialog.SetYesLabel(rYesLabel); if (!rNoLabel.isEmpty()) - pDlg->SetNoLabel(rNoLabel); + aDialog.SetNoLabel(rNoLabel); - short nResult = pDlg->Execute(); + short nResult = aDialog.run(); - if (pDlg->DontShowAgain() && !bHideShowAgain) + if (aDialog.DontShowAgain() && !bHideShowAgain) { std::shared_ptr aBatch( comphelper::ConfigurationChanges::create()); @@ -43,7 +43,6 @@ public: aBatch->commit(); } - pDlg->disposeOnce(); return nResult == RET_YES; } else diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx index fc072c8c8511..8c96979fbc96 100644 --- a/include/vcl/abstdlg.hxx +++ b/include/vcl/abstdlg.hxx @@ -157,17 +157,6 @@ protected: virtual ~AbstractDiagramDialog() override = default; }; -class VCL_DLLPUBLIC AbstractQueryDialog : public VclAbstractDialog -{ -protected: - virtual ~AbstractQueryDialog() override = default; -public: - virtual bool DontShowAgain() const = 0; - virtual void SetYesLabel(const OUString& sLabel) = 0; - virtual void SetNoLabel(const OUString& sLabel) = 0; - virtual void SetTypeWarn() = 0; -}; - class VCL_DLLPUBLIC VclAbstractDialogFactory { public: @@ -211,11 +200,6 @@ public: weld::Window* pParent, SdrObjGroup& rDiagram) = 0; - virtual VclPtr CreateQueryDialog( - weld::Window* pParent, - const OUString& sTitle, const OUString& sText, const OUString& sQuestion, - bool bShowAgain) = 0; - #ifdef _WIN32 virtual VclPtr CreateFileExtCheckDialog(weld::Window* _pParent, const OUString& sTitle, const OUString& sMsg) diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx index 33f8eec4d761..4f137c5b8785 100644 --- a/sc/source/ui/view/tabvwshh.cxx +++ b/sc/source/ui/view/tabvwshh.cxx @@ -25,10 +25,10 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -265,17 +265,16 @@ bool ScTabViewShell::ExecuteRetypePassDlg(ScPasswordHash eDesiredHash) void ScTabViewShell::ExecuteOnlyActiveSheetSavedDlg() { - VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); - auto pDlg(pFact->CreateQueryDialog( + QueryDialog aQueryDialog( GetFrameWeld(), ScResId(STR_WARN_ONLYACTIVESHEET_TITLE), - ScResId(STR_WARN_ONLYACTIVESHEET_TEXT), ScResId(STR_WARN_ONLYACTIVESHEET_QUEST), true)); + ScResId(STR_WARN_ONLYACTIVESHEET_TEXT), ScResId(STR_WARN_ONLYACTIVESHEET_QUEST), true); OUString sLabel; sLabel.clear(); - pDlg->SetNoLabel(sLabel); //empty to hide the button + aQueryDialog.SetNoLabel(sLabel); //empty to hide the button sLabel = ScResId(STR_WARN_ONLYACTIVESHEET_BUTTON); - pDlg->SetYesLabel(sLabel); - pDlg->SetTypeWarn(); - pDlg->Execute(); + aQueryDialog.SetYesLabel(sLabel); + aQueryDialog.SetTypeWarn(); + aQueryDialog.run(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index e4a58195a503..c5914b15579b 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -62,8 +63,6 @@ #include #include -#include - #define POS_CONTENT 0 #define POS_INDEX 1 @@ -757,14 +756,9 @@ IMPL_LINK(SwIndexMarkPane, ModifyEditHdl, weld::TextWidget&, rEdit, void) short SwIndexMarkPane::ShowWarning4Modifications() { - short nresult = RET_NO; - VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); - ScopedVclPtr pDlg(pFact->CreateQueryDialog( - m_xDialog.get(), SwResId(STR_QUERY_CLOSE_TITLE), SwResId(STR_QUERY_CLOSE_TEXT), - SwResId(STR_QUERY_CLOSE_QUESTION), true)); - nresult = pDlg->Execute(); - - return nresult; + QueryDialog aQueryDialog(m_xDialog.get(), SwResId(STR_QUERY_CLOSE_TITLE), SwResId(STR_QUERY_CLOSE_TEXT), + SwResId(STR_QUERY_CLOSE_QUESTION), true); + return aQueryDialog.run(); } void SwIndexMarkPane::ModifyHdl(const weld::Widget& rBox)