summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/QuerySaveDocument.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-05-01 13:39:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-05-01 14:42:05 +0100
commitcd841115fa28f8be5778e540819f963407b4c05b (patch)
treea16307a9ded8350912e128d7896a559e4ab8a596 /sfx2/source/doc/QuerySaveDocument.cxx
parent9e5c35454d07f880a2cb52d9a808633b908bb859 (diff)
use new MessageDialog
Change-Id: I4fdc54d5a6e0f133c53588e255274b9f103269b4
Diffstat (limited to 'sfx2/source/doc/QuerySaveDocument.cxx')
-rw-r--r--sfx2/source/doc/QuerySaveDocument.cxx26
1 files changed, 9 insertions, 17 deletions
diff --git a/sfx2/source/doc/QuerySaveDocument.cxx b/sfx2/source/doc/QuerySaveDocument.cxx
index 7b24f7d55e15..9c073d07c279 100644
--- a/sfx2/source/doc/QuerySaveDocument.cxx
+++ b/sfx2/source/doc/QuerySaveDocument.cxx
@@ -17,29 +17,21 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "sfx2/QuerySaveDocument.hxx"
-
-#include <sfx2/sfx.hrc>
-#include "sfx2/sfxresid.hxx"
-#include <sfx2/sfxuno.hxx>
-#include "doc.hrc"
-#include <vcl/msgbox.hxx>
+#include <sfx2/QuerySaveDocument.hxx>
+#include <vcl/layout.hxx>
#include <vcl/svapp.hxx>
-// -----------------------------------------------------------------------------
-short ExecuteQuerySaveDocument(Window* _pParent,const String& _rTitle)
+
+short ExecuteQuerySaveDocument(Window* _pParent, const OUString& _rTitle)
{
if (Application::IsHeadlessModeEnabled())
- { // don't block Desktop::terminate() if there's no user to ask
+ {
+ // don't block Desktop::terminate() if there's no user to ask
return RET_NO;
}
- OUString aText( SfxResId(STR_QUERY_SAVE_DOCUMENT).toString() );
- aText = aText.replaceFirst( "$(DOC)", _rTitle );
- QueryBox aQBox( _pParent, WB_YES_NO_CANCEL | WB_DEF_YES, aText );
- aQBox.SetText(SfxResId(STR_QUERY_SAVE_DOCUMENT_TITLE).toString()); // Window title
- aQBox.SetButtonText( BUTTONID_NO, SfxResId(STR_NOSAVEANDCLOSE).toString() );
- aQBox.SetButtonText( BUTTONID_YES, SfxResId(STR_SAVEDOC).toString() );
+
+ MessageDialog aQBox(_pParent, "QuerySaveDialog", "sfx/ui/querysavedialog.ui");
+ aQBox.set_primary_text(aQBox.get_primary_text().replaceFirst("$(DOC)", _rTitle));
return aQBox.Execute();
}
-// -----------------------------------------------------------------------------
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */