diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-26 13:11:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-26 22:15:19 +0100 |
commit | cc92324bed7f039e91d07d241f958ad773582c48 (patch) | |
tree | 0f93a0dea97c9110cbbf88b15a6108500658b62f | |
parent | 28488c94d697f169baaf4c67bf2c71287b503c43 (diff) |
split out GetStandardWarningBoxImage
Change-Id: I2c8315c7223adac2d7e0e2aa403db0f865bdc48e
Reviewed-on: https://gerrit.libreoffice.org/50377
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | cui/source/customize/cfg.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tplnedef.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/sqlmessage.cxx | 2 | ||||
-rw-r--r-- | include/vcl/msgbox.hxx | 6 | ||||
-rw-r--r-- | sd/source/filter/html/htmlex.cxx | 1 | ||||
-rw-r--r-- | svtools/source/graphic/provider.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dialog/swmessdialog.cxx | 2 | ||||
-rw-r--r-- | uui/source/secmacrowarnings.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/layout.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/msgbox.cxx | 8 |
10 files changed, 15 insertions, 16 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 7d5ce9d4da6b..f26bbd6ff085 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -3426,7 +3426,7 @@ SvxIconReplacementDialog::SvxIconReplacementDialog( MessBox( pWindow, MessBoxStyle::DefaultYes, 0, CuiResId( RID_SVXSTR_REPLACE_ICON_CONFIRM ), CuiResId( RID_SVXSTR_REPLACE_ICON_WARNING ) ) { - SetImage( WarningBox::GetStandardImage() ); + SetImage( GetStandardWarningBoxImage() ); SetMessText( ReplaceIconName( aMessage ) ); RemoveButton( 1 ); AddButton( StandardButtonType::Yes, 2); @@ -3439,7 +3439,7 @@ SvxIconReplacementDialog::SvxIconReplacementDialog( vcl::Window *pWindow, const OUString& aMessage ) : MessBox( pWindow, MessBoxStyle::YesNoCancel, 0, CuiResId( RID_SVXSTR_REPLACE_ICON_CONFIRM ), CuiResId( RID_SVXSTR_REPLACE_ICON_WARNING ) ) { - SetImage( WarningBox::GetStandardImage() ); + SetImage( GetStandardWarningBoxImage() ); SetMessText( ReplaceIconName( aMessage )); } diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 4c2ba2cd428e..ae5981659394 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -239,7 +239,7 @@ void SvxLineDefTabPage::CheckChanges_Impl() m_pLbType2->IsValueChangedFromSaved() || m_pMtrDistance->IsValueChangedFromSaved() ) { - Image aWarningBoxImage = WarningBox::GetStandardImage(); + Image aWarningBoxImage = GetStandardWarningBoxImage(); ScopedVclPtrInstance<SvxMessDialog> aMessDlg( GetParentDialog(), SvxResId( RID_SVXSTR_LINESTYLE ), CuiResId(RID_SVXSTR_ASK_CHANGE_LINESTYLE), diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 5981fcb33ebe..e7f8811da03e 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -625,7 +625,7 @@ void OSQLMessageBox::Construct( MessBoxStyle _nStyle, MessageType _eImage ) m_aInfoImage->SetImage(GetStandardInfoBoxImage()); break; case Warning: - m_aInfoImage->SetImage(WarningBox::GetStandardImage()); + m_aInfoImage->SetImage(GetStandardWarningBoxImage()); break; case Error: m_aInfoImage->SetImage(GetStandardErrorBoxImage()); diff --git a/include/vcl/msgbox.hxx b/include/vcl/msgbox.hxx index 16fa979015b7..39b63d3e8a23 100644 --- a/include/vcl/msgbox.hxx +++ b/include/vcl/msgbox.hxx @@ -91,11 +91,11 @@ public: const OUString& rMessage ); WarningBox( vcl::Window* pParent, MessBoxStyle nStyle, WinBits n, const OUString& rMessage ); - - static Image const & GetStandardImage(); - static OUString GetStandardText(); }; +VCL_DLLPUBLIC Image const & GetStandardWarningBoxImage(); +VCL_DLLPUBLIC OUString GetStandardWarningBoxText(); + VCL_DLLPUBLIC Image const & GetStandardErrorBoxImage(); VCL_DLLPUBLIC OUString GetStandardErrorBoxText(); diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index ffd17fd09389..55cfc04e9266 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -3098,7 +3098,6 @@ bool HtmlExport::checkForExistingFiles() OUString aMsg(SdResId(STR_OVERWRITE_WARNING)); aMsg = aMsg.replaceFirst( "%FILENAME", aSystemPath ); ScopedVclPtrInstance< WarningBox > aWarning( nullptr, MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, aMsg ); - aWarning->SetImage( WarningBox::GetStandardImage() ); bFound = ( RET_NO == aWarning->Execute() ); } } diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index 2afef15a646f..9e8c8b636d2b 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -202,7 +202,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadStandardImage( co } else if ( sImageName == "warning" ) { - xRet = Graphic(WarningBox::GetStandardImage().GetBitmapEx()).GetXGraphic(); + xRet = Graphic(GetStandardWarningBoxImage().GetBitmapEx()).GetXGraphic(); } else if ( sImageName == "error" ) { diff --git a/sw/source/ui/dialog/swmessdialog.cxx b/sw/source/ui/dialog/swmessdialog.cxx index c57f23534eb8..85ad95643832 100644 --- a/sw/source/ui/dialog/swmessdialog.cxx +++ b/sw/source/ui/dialog/swmessdialog.cxx @@ -26,7 +26,7 @@ SwMessageAndEditDialog::SwMessageAndEditDialog(vcl::Window* pParent, const OUStr m_pSecondaryMessage->SetPaintTransparent(true); MessageDialog::SetMessagesWidths(this, m_pPrimaryMessage, m_pSecondaryMessage); get(m_pImageIM, "image"); - m_pImageIM->SetImage(WarningBox::GetStandardImage()); + m_pImageIM->SetImage(GetStandardWarningBoxImage()); get(m_pEdit, "edit"); } diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index 1641a3a59ef7..6c2ae03f53d6 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -164,7 +164,7 @@ IMPL_LINK_NOARG(MacroWarning, AlwaysTrustCheckHdl, Button*, void) void MacroWarning::InitControls() { // set warning image - Image aImg( WarningBox::GetStandardImage() ); + Image aImg(GetStandardWarningBoxImage()); mpSymbolImg->SetImage( aImg ); mpSymbolImg->SetSizePixel( aImg.GetSizePixel() ); // set bold font and path ellipsis for docname fixedtext diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index bf6918c1b426..ae3663c9c75f 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2170,7 +2170,7 @@ void MessageDialog::create_message_area() m_pImage->SetImage(GetStandardInfoBoxImage()); break; case VclMessageType::Warning: - m_pImage->SetImage(WarningBox::GetStandardImage()); + m_pImage->SetImage(GetStandardWarningBoxImage()); break; case VclMessageType::Question: m_pImage->SetImage(GetStandardQueryBoxImage()); diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index 2e85b5e7679f..1b8f9d7d47fe 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -326,18 +326,18 @@ WarningBox::WarningBox( vcl::Window* pParent, MessBoxStyle nStyle, WinBits nWinB { // Default Text is the display title from the application if ( GetText().isEmpty() ) - SetText( GetStandardText() ); + SetText(GetStandardWarningBoxText()); - SetImage( WarningBox::GetStandardImage() ); + SetImage(GetStandardWarningBoxImage() ); } -Image const & WarningBox::GetStandardImage() +Image const & GetStandardWarningBoxImage() { ImplInitMsgBoxImageList(); return ImplGetSVData()->maWinData.maMsgBoxImgList[2]; } -OUString WarningBox::GetStandardText() +OUString GetStandardWarningBoxText() { return VclResId(SV_MSGBOX_WARNING); } |