Kaydet (Commit) 76f7bc12 authored tarafından Thomas Arnhold's avatar Thomas Arnhold

InfoBox to String final

Change-Id: I42f97a12052f4a173b05173fdd2c3079c517f78e
üst 8807796e
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <unotools/tempfile.hxx> #include <unotools/tempfile.hxx>
#include <tools/urlobj.hxx> #include <tools/urlobj.hxx>
#include <vcl/layout.hxx>
#include <vcl/print.hxx> #include <vcl/print.hxx>
#include <vcl/msgbox.hxx> #include <vcl/msgbox.hxx>
#include <vcl/wrkwin.hxx> #include <vcl/wrkwin.hxx>
...@@ -828,7 +829,7 @@ void SwSrcView::Load(SwDocShell* pDocShell) ...@@ -828,7 +829,7 @@ void SwSrcView::Load(SwDocShell* pDocShell)
else else
{ {
Window *pTmpWindow = &GetViewFrame()->GetWindow(); Window *pTmpWindow = &GetViewFrame()->GetWindow();
InfoBox(pTmpWindow, SW_RES(MSG_ERR_SRCSTREAM)).Execute(); MessageDialog(pTmpWindow, SW_RES(STR_ERR_SRCSTREAM), VCL_MESSAGE_INFO).Execute();
} }
} }
else else
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
#include <vcl/layout.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx> #include <vcl/wrkwin.hxx>
#include <vcl/msgbox.hxx> #include <vcl/msgbox.hxx>
...@@ -182,7 +183,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq ) ...@@ -182,7 +183,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
if( !bDone ) if( !bDone )
{ {
InfoBox( 0, SW_RES(MSG_SCAN_NOSOURCE) ).Execute(); MessageDialog( 0, SW_RES(STR_SCAN_NOSOURCE), VCL_MESSAGE_INFO ).Execute();
rReq.Ignore(); rReq.Ignore();
} }
else else
......
...@@ -31,13 +31,13 @@ ...@@ -31,13 +31,13 @@
#define STR_EDIT_FOOTNOTE (RC_VIEW_BEGIN + 14) #define STR_EDIT_FOOTNOTE (RC_VIEW_BEGIN + 14)
#define STR_NB_REPLACED (RC_VIEW_BEGIN + 20) #define STR_NB_REPLACED (RC_VIEW_BEGIN + 20)
#define MSG_SCAN_NOSOURCE (RC_VIEW_BEGIN + 21) #define STR_SCAN_NOSOURCE (RC_VIEW_BEGIN + 21)
#define STR_SRCVIEW_ROW (RC_VIEW_BEGIN + 22) #define STR_SRCVIEW_ROW (RC_VIEW_BEGIN + 22)
#define STR_SRCVIEW_COL (RC_VIEW_BEGIN + 23) #define STR_SRCVIEW_COL (RC_VIEW_BEGIN + 23)
#define STR_SAVEAS_SRC (RC_VIEW_BEGIN + 24) #define STR_SAVEAS_SRC (RC_VIEW_BEGIN + 24)
#define MSG_NO_MERGE_ENTRY (RC_VIEW_BEGIN + 25) #define STR_NO_MERGE_ENTRY (RC_VIEW_BEGIN + 25)
#define STR_PRINT_TITLE (RC_VIEW_BEGIN + 26) #define STR_PRINT_TITLE (RC_VIEW_BEGIN + 26)
#define STR_PRINT_MSG (RC_VIEW_BEGIN + 27) #define STR_PRINT_MSG (RC_VIEW_BEGIN + 27)
...@@ -51,11 +51,8 @@ ...@@ -51,11 +51,8 @@
#define STR_SAVEACOPY_SRC (RC_VIEW_BEGIN + 34) #define STR_SAVEACOPY_SRC (RC_VIEW_BEGIN + 34)
#define STR_ERR_INSERT_GLOS (RC_VIEW_BEGIN + 35) #define STR_ERR_INSERT_GLOS (RC_VIEW_BEGIN + 35)
#define STR_ERR_NO_FAX (RC_VIEW_BEGIN + 36)
// MSG #define STR_ERR_SRCSTREAM (RC_VIEW_BEGIN + 37)
#define MSG_ERR_NO_FAX (RC_VIEW_BEGIN + 5)
#define MSG_ERR_SRCSTREAM (RC_VIEW_BEGIN + 6)
// DLG // DLG
......
...@@ -32,21 +32,21 @@ QueryBox DLG_SPECIAL_FORCED ...@@ -32,21 +32,21 @@ QueryBox DLG_SPECIAL_FORCED
DEFBUTTON = WB_DEF_NO ; DEFBUTTON = WB_DEF_NO ;
Message [ en-US ] = "Check special regions is deactivated. Check anyway?" ; Message [ en-US ] = "Check special regions is deactivated. Check anyway?" ;
}; };
InfoBox MSG_NO_MERGE_ENTRY String STR_NO_MERGE_ENTRY
{ {
Message [ en-US ] = "Could not merge documents." ; Text [ en-US ] = "Could not merge documents." ;
}; };
String STR_ERR_INSERT_GLOS String STR_ERR_INSERT_GLOS
{ {
Text [ en-US ] = "AutoText could not be created." ; Text [ en-US ] = "AutoText could not be created." ;
}; };
InfoBox MSG_ERR_SRCSTREAM String STR_ERR_SRCSTREAM
{ {
Message [ en-US ] = "The source cannot be loaded." ; Text [ en-US ] = "The source cannot be loaded." ;
}; };
InfoBox MSG_ERR_NO_FAX String STR_ERR_NO_FAX
{ {
Message [ en-US ] = "No fax printer has been set under Tools/Options/%1/Print." ; Text [ en-US ] = "No fax printer has been set under Tools/Options/%1/Print." ;
}; };
String STR_WEBOPTIONS String STR_WEBOPTIONS
{ {
...@@ -56,9 +56,9 @@ String STR_TEXTOPTIONS ...@@ -56,9 +56,9 @@ String STR_TEXTOPTIONS
{ {
Text [ en-US ] = "Text document"; Text [ en-US ] = "Text document";
}; };
InfoBox MSG_SCAN_NOSOURCE String STR_SCAN_NOSOURCE
{ {
Message [ en-US ] = "Source not specified." ; Text [ en-US ] = "Source not specified." ;
}; };
String STR_NUM_LEVEL String STR_NUM_LEVEL
{ {
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
#include <editeng/lrspitem.hxx> #include <editeng/lrspitem.hxx>
#include <unotools/textsearch.hxx> #include <unotools/textsearch.hxx>
#include <editeng/unolingu.hxx> #include <editeng/unolingu.hxx>
#include <vcl/layout.hxx>
#include <vcl/msgbox.hxx> #include <vcl/msgbox.hxx>
#include <editeng/tstpitem.hxx> #include <editeng/tstpitem.hxx>
#include <sfx2/event.hxx> #include <sfx2/event.hxx>
...@@ -500,7 +501,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) ...@@ -500,7 +501,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
{ {
if( bShowError ) if( bShowError )
{ {
InfoBox aInfoBox( GetWindow(), SW_RESSTR( nResId )); MessageDialog aInfoBox( GetWindow(), SW_RESSTR( nResId ), VCL_MESSAGE_INFO);
aInfoBox.Execute(); aInfoBox.Execute();
} }
rReq.Ignore(); rReq.Ignore();
...@@ -2265,7 +2266,7 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe ...@@ -2265,7 +2266,7 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe
if (!bCompare && !nFound) if (!bCompare && !nFound)
{ {
Window* pWin = &GetEditWin(); Window* pWin = &GetEditWin();
InfoBox(pWin, SW_RES(MSG_NO_MERGE_ENTRY)).Execute(); MessageDialog(pWin, SW_RES(STR_NO_MERGE_ENTRY), VCL_MESSAGE_INFO).Execute();
} }
if( nRet==2 && xDocSh.Is() ) if( nRet==2 && xDocSh.Is() )
xDocSh->DoClose(); xDocSh->DoClose();
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <sfx2/request.hxx> #include <sfx2/request.hxx>
#include <sfx2/progress.hxx> #include <sfx2/progress.hxx>
#include <sfx2/app.hxx> #include <sfx2/app.hxx>
#include <vcl/layout.hxx>
#include <vcl/msgbox.hxx> #include <vcl/msgbox.hxx>
#include <vcl/oldprintadaptor.hxx> #include <vcl/oldprintadaptor.hxx>
#include <sfx2/printer.hxx> #include <sfx2/printer.hxx>
...@@ -175,11 +176,9 @@ void SwView::ExecutePrint(SfxRequest& rReq) ...@@ -175,11 +176,9 @@ void SwView::ExecutePrint(SfxRequest& rReq)
} }
else else
{ {
InfoBox aInfoBox(&GetEditWin(), SW_RES(MSG_ERR_NO_FAX)); MessageDialog aInfoBox(&GetEditWin(), SW_RES(STR_ERR_NO_FAX), VCL_MESSAGE_INFO);
OUString sMsg = aInfoBox.GetMessText();
sal_uInt16 nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS; sal_uInt16 nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS;
sMsg = sMsg.replaceFirst("%1", OUString(SW_RES(nResNo))); aInfoBox.set_primary_text(aInfoBox.get_primary_text().replaceFirst("%1", OUString(SW_RES(nResNo))));
aInfoBox.SetMessText(sMsg);
aInfoBox.Execute(); aInfoBox.Execute();
SfxUInt16Item aDefPage(SID_SW_EDITOPTIONS, TP_OPTPRINT_PAGE); SfxUInt16Item aDefPage(SID_SW_EDITOPTIONS, TP_OPTPRINT_PAGE);
GetViewFrame()->GetDispatcher()->Execute(SID_SW_EDITOPTIONS, GetViewFrame()->GetDispatcher()->Execute(SID_SW_EDITOPTIONS,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment