diff --git a/include/vcl/msgbox.hxx b/include/vcl/msgbox.hxx index 5ac566f435d9..802da7da9706 100644 --- a/include/vcl/msgbox.hxx +++ b/include/vcl/msgbox.hxx @@ -41,7 +41,6 @@ protected: OUString maCheckBoxText; bool mbCheck; - SAL_DLLPRIVATE void ImplInitMessBoxData(); SAL_DLLPRIVATE void ImplInitButtons(); SAL_DLLPRIVATE void ImplPosControls(); @@ -67,9 +66,6 @@ public: class VCL_DLLPUBLIC InfoBox : public MessBox { -private: - SAL_DLLPRIVATE void ImplInitInfoBoxData(); - public: InfoBox( vcl::Window* pParent, const OUString& rMessage ); InfoBox( vcl::Window* pParent, WinBits nStyle, @@ -80,9 +76,6 @@ public: class VCL_DLLPUBLIC WarningBox : public MessBox { -private: - SAL_DLLPRIVATE void ImplInitWarningBoxData(); - public: WarningBox( vcl::Window* pParent, WinBits nStyle, const OUString& rMessage ); @@ -94,9 +87,6 @@ public: class VCL_DLLPUBLIC ErrorBox : public MessBox { -private: - SAL_DLLPRIVATE void ImplInitErrorBoxData(); - public: ErrorBox( vcl::Window* pParent, WinBits nStyle, const OUString& rMessage ); diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index 7fb7f28dd12b..d7b3bf035430 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -51,15 +51,6 @@ static void ImplInitMsgBoxImageList() } } -void MessBox::ImplInitMessBoxData() -{ - mpVCLMultiLineEdit = nullptr; - mpFixedImage = nullptr; - mbHelpBtn = false; - mpCheckBox = nullptr; - mbCheck = false; -} - void MessBox::ImplInitButtons() { WinBits nStyle = GetStyle(); @@ -140,9 +131,10 @@ void MessBox::ImplInitButtons() MessBox::MessBox( vcl::Window* pParent, WinBits nStyle, const OUString& rTitle, const OUString& rMessage ) : ButtonDialog( WINDOW_MESSBOX ), - maMessText( rMessage ) + maMessText( rMessage ), + mbHelpBtn( false ), + mbCheck( false ) { - ImplInitMessBoxData(); ImplInit( pParent, nStyle | WB_MOVEABLE | WB_HORZ | WB_CENTER ); ImplInitButtons(); @@ -379,7 +371,13 @@ Size MessBox::GetOptimalSize() const return Size( 250, 100 ); } -void InfoBox::ImplInitInfoBoxData() +InfoBox::InfoBox( vcl::Window* pParent, const OUString& rMessage ) : + InfoBox( pParent, WB_OK | WB_DEF_OK, rMessage ) +{ +} + +InfoBox::InfoBox( vcl::Window* pParent, WinBits nStyle, const OUString& rMessage ) : + MessBox( pParent, nStyle, OUString(), rMessage ) { // Default Text is the display title from the application if ( GetText().isEmpty() ) @@ -388,25 +386,15 @@ void InfoBox::ImplInitInfoBoxData() SetImage( InfoBox::GetStandardImage() ); } -InfoBox::InfoBox( vcl::Window* pParent, const OUString& rMessage ) : - MessBox( pParent, WB_OK | WB_DEF_OK, OUString(), rMessage ) -{ - ImplInitInfoBoxData(); -} - -InfoBox::InfoBox( vcl::Window* pParent, WinBits nStyle, const OUString& rMessage ) : - MessBox( pParent, nStyle, OUString(), rMessage ) -{ - ImplInitInfoBoxData(); -} - Image InfoBox::GetStandardImage() { ImplInitMsgBoxImageList(); return ImplGetSVData()->maWinData.mpMsgBoxImgList->GetImage( 4 ); } -void WarningBox::ImplInitWarningBoxData() +WarningBox::WarningBox( vcl::Window* pParent, WinBits nStyle, + const OUString& rMessage ) : + MessBox( pParent, nStyle, OUString(), rMessage ) { // Default Text is the display title from the application if ( GetText().isEmpty() ) @@ -415,13 +403,6 @@ void WarningBox::ImplInitWarningBoxData() SetImage( WarningBox::GetStandardImage() ); } -WarningBox::WarningBox( vcl::Window* pParent, WinBits nStyle, - const OUString& rMessage ) : - MessBox( pParent, nStyle, OUString(), rMessage ) -{ - ImplInitWarningBoxData(); -} - void WarningBox::SetDefaultCheckBoxText() { ResMgr* pResMgr = ImplGetResMgr(); @@ -435,7 +416,9 @@ Image WarningBox::GetStandardImage() return ImplGetSVData()->maWinData.mpMsgBoxImgList->GetImage( 3 ); } -void ErrorBox::ImplInitErrorBoxData() +ErrorBox::ErrorBox( vcl::Window* pParent, WinBits nStyle, + const OUString& rMessage ) : + MessBox( pParent, nStyle, OUString(), rMessage ) { // Default Text is the display title from the application if ( GetText().isEmpty() ) @@ -444,13 +427,6 @@ void ErrorBox::ImplInitErrorBoxData() SetImage( ErrorBox::GetStandardImage() ); } -ErrorBox::ErrorBox( vcl::Window* pParent, WinBits nStyle, - const OUString& rMessage ) : - MessBox( pParent, nStyle, OUString(), rMessage ) -{ - ImplInitErrorBoxData(); -} - Image ErrorBox::GetStandardImage() { try @@ -466,7 +442,8 @@ Image ErrorBox::GetStandardImage() return ImplGetSVData()->maWinData.mpMsgBoxImgList->GetImage( 1 ); } -void QueryBox::ImplInitQueryBoxData() +QueryBox::QueryBox( vcl::Window* pParent, WinBits nStyle, const OUString& rMessage ) : + MessBox( pParent, nStyle, OUString(), rMessage ) { // Default Text is the display title from the application if ( GetText().isEmpty() ) @@ -475,12 +452,6 @@ void QueryBox::ImplInitQueryBoxData() SetImage( QueryBox::GetStandardImage() ); } -QueryBox::QueryBox( vcl::Window* pParent, WinBits nStyle, const OUString& rMessage ) : - MessBox( pParent, nStyle, OUString(), rMessage ) -{ - ImplInitQueryBoxData(); -} - void QueryBox::SetDefaultCheckBoxText() { ResMgr* pResMgr = ImplGetResMgr();