summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-02-07 17:22:02 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-02-07 20:11:41 +0000
commit40078b3ef32a60852f692d6ed222cb767133d7e0 (patch)
tree74f23ca2d6215fef31bbdf06b438b05a77506a72
parent10da10ee6ba37f4861045d1f8db0022293433cec (diff)
remove the 4 send crash report tabpages
and other logical consequences of officecfg::Office::Recovery::CrashReporter::Enabled == false because we have this disabled by default since the first LibreOffice release and we have no backend infrastucture to handle the submissions anyway and it's blocking conversion of legacy .src dialogs to .ui format Change-Id: Id5481af3ec970032b3728c0e6cc0c6a52d3ed3dc
-rw-r--r--desktop/inc/app.hxx1
-rw-r--r--desktop/source/app/app.cxx28
-rw-r--r--include/svx/dialogs.hrc4
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Recovery.xcs11
-rw-r--r--svx/Library_svx.mk13
-rw-r--r--svx/source/dialog/docrecovery.cxx568
-rw-r--r--svx/source/dialog/docrecovery.hrc2
-rw-r--r--svx/source/dialog/docrecovery.src314
-rw-r--r--svx/source/dialog/sendreportgen.cxx45
-rw-r--r--svx/source/dialog/sendreportunx.cxx261
-rw-r--r--svx/source/dialog/sendreportw32.cxx254
-rw-r--r--svx/source/inc/docrecovery.hxx167
-rw-r--r--svx/source/inc/recoveryui.hxx3
-rw-r--r--svx/source/unodraw/recoveryui.cxx62
14 files changed, 7 insertions, 1726 deletions
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index fb30a7a00502..efe4edc4a4b9 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -169,7 +169,6 @@ class Desktop : public Application
static sal_Bool SaveTasks();
- static void retrieveCrashReporterState();
static sal_Bool isUIOnSessionShutdownAllowed();
// on-demand acceptors
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index e74c3dd99129..74f965054d29 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -156,7 +156,6 @@ namespace desktop
{
static oslSignalHandler pSignalHandler = 0;
-static sal_Bool _bCrashReporterEnabled = sal_True;
namespace {
@@ -1071,12 +1070,6 @@ void Desktop::HandleBootstrapErrors(
}
-void Desktop::retrieveCrashReporterState()
-{
- _bCrashReporterEnabled
- = officecfg::Office::Recovery::CrashReporter::Enabled::get();
-}
-
sal_Bool Desktop::isUIOnSessionShutdownAllowed()
{
return officecfg::Office::Recovery::SessionShutdown::DocumentStoreUIEnabled
@@ -1084,15 +1077,6 @@ sal_Bool Desktop::isUIOnSessionShutdownAllowed()
}
//-----------------------------------------------
-/** @short check if crash reporter feature is enabled or
- disabled.
-*/
-sal_Bool Desktop::isCrashReporterEnabled()
-{
- return _bCrashReporterEnabled;
-}
-
-//-----------------------------------------------
/** @short check if recovery must be started or not.
@param bCrashed [boolean ... out!]
@@ -1129,13 +1113,11 @@ void impl_checkRecoveryState(sal_Bool& bCrashed ,
differs between EMERGENCY_SAVE and RECOVERY
*/
sal_Bool impl_callRecoveryUI(sal_Bool bEmergencySave ,
- sal_Bool bCrashed ,
sal_Bool bExistsRecoveryData)
{
static OUString SERVICENAME_RECOVERYUI("com.sun.star.comp.svx.RecoveryUI");
static OUString COMMAND_EMERGENCYSAVE("vnd.sun.star.autorecovery:/doEmergencySave");
static OUString COMMAND_RECOVERY("vnd.sun.star.autorecovery:/doAutoRecovery");
- static OUString COMMAND_CRASHREPORT("vnd.sun.star.autorecovery:/doCrashReport");
css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
@@ -1151,8 +1133,6 @@ sal_Bool impl_callRecoveryUI(sal_Bool bEmergencySave ,
aURL.Complete = COMMAND_EMERGENCYSAVE;
else if (bExistsRecoveryData)
aURL.Complete = COMMAND_RECOVERY;
- else if (bCrashed && Desktop::isCrashReporterEnabled() )
- aURL.Complete = COMMAND_CRASHREPORT;
else
return false;
@@ -1176,7 +1156,6 @@ sal_Bool Desktop::SaveTasks()
{
return impl_callRecoveryUI(
sal_True , // sal_True => force emergency save
- sal_False, // 2. and 3. param not used if 1. = true!
sal_False);
}
@@ -1475,10 +1454,8 @@ int Desktop::Main()
SetSplashScreenProgress(30);
- // set static variable to enabled/disable crash reporter
- retrieveCrashReporterState();
- const bool bCrashReporterEnabled = isCrashReporterEnabled();
- osl_setErrorReporting( !bCrashReporterEnabled );
+ // set static variable to disable crash reporting
+ osl_setErrorReporting( false );
// create title string
LanguageTag aLocale( LANGUAGE_SYSTEM);
@@ -2369,7 +2346,6 @@ void Desktop::OpenClients()
{
bRecovery = impl_callRecoveryUI(
sal_False , // false => force recovery instead of emergency save
- bCrashed ,
bExistsRecoveryData);
}
catch(const css::uno::Exception& e)
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index cc31b77e504b..65eb7c30145a 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -1019,15 +1019,11 @@
// recycling ids from DBMgr
#define RID_SVX_MDLG_DOCRECOVERY_PROGR ( RID_SVX_START + 11 )
#define RID_SVX_MDLG_DOCRECOVERY_BROKEN ( RID_SVX_START + 12 )
-#define RID_SVX_MDLG_ERR_REP_OPTIONS ( RID_SVX_START + 13 )
-#define RID_SVX_MDLG_ERR_REP_PREVIEW ( RID_SVX_START + 14 )
#define RID_SVX_TABDLG_DOCRECOVERY ( RID_SVX_START + 0 )
#define RID_SVXPAGE_DOCRECOVERY_SAVE ( RID_SVX_START + 8 )
#define RID_SVXPAGE_DOCRECOVERY_RECOVER ( RID_SVX_START + 9 )
-#define RID_SVXPAGE_ERR_REP_WELCOME ( RID_SVX_START + 10 )
-#define RID_SVXPAGE_ERR_REP_SEND ( RID_SVX_START + 11 )
// ----------------------------------------------------------------------------
diff --git a/officecfg/registry/schema/org/openoffice/Office/Recovery.xcs b/officecfg/registry/schema/org/openoffice/Office/Recovery.xcs
index 73d888bc6184..5e7af2d89d64 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Recovery.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Recovery.xcs
@@ -108,17 +108,6 @@
<value>false</value>
</prop>
</group>
- <group oor:name="CrashReporter">
- <info>
- <desc>Settings for the crash reporter.</desc>
- </info>
- <prop oor:name="Enabled" oor:type="xs:boolean" oor:nillable="false">
- <info>
- <desc>Specifies if the crash reporter should be enabled or disabled.</desc>
- </info>
- <value>false</value>
- </prop>
- </group>
<group oor:name="AutoSave">
<info>
<desc> </desc>
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 74b1db5bfa2d..2f0e9a49a89d 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -262,23 +262,10 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
))
endif
-ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS)))
-$(eval $(call gb_Library_add_exception_objects,svx,\
- svx/source/dialog/sendreportunx \
-))
-else
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_system_win32_libs,svx,\
advapi32 \
))
-$(eval $(call gb_Library_add_exception_objects,svx,\
- svx/source/dialog/sendreportw32 \
-))
-else
-$(eval $(call gb_Library_add_exception_objects,svx,\
- svx/source/dialog/sendreportgen \
-))
-endif
endif
# vim: set noet sw=4 ts=4:
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index 5a19440f0640..41744ebcbd5d 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -952,9 +952,7 @@ RecoveryDialog::RecoveryDialog(Window* pParent,
, m_aBottomFL ( this , SVX_RES ( FL_RECOV_BOTTOM ) )
, m_aNextBtn ( this , SVX_RES ( BTN_RECOV_NEXT ) )
, m_aCancelBtn ( this , SVX_RES ( BTN_RECOV_CANCEL ) )
- , m_aNextStr (SVX_RESSTR(STR_RECOVERY_NEXT))
, m_aTitleRecoveryInProgress(SVX_RESSTR(STR_RECOVERY_INPROGRESS))
- , m_aTitleRecoveryReport(SVX_RESSTR(STR_RECOVERY_REPORT))
, m_aRecoveryOnlyFinish (SVX_RESSTR(STR_RECOVERYONLY_FINISH))
, m_aRecoveryOnlyFinishDescr(SVX_RESSTR(STR_RECOVERYONLY_FINISH_DESCR))
, m_pDefButton ( NULL )
@@ -964,7 +962,6 @@ RecoveryDialog::RecoveryDialog(Window* pParent,
, m_bWaitForCore (false)
, m_bUserDecideNext (false)
, m_bWasRecoveryStarted (false)
- , m_bRecoveryOnly (false)
{
static long nTabs[] = { 2, 0, 40*RECOV_CONTROLWIDTH/100 };
m_aFileListLB.SetTabs( &nTabs[0] );
@@ -972,9 +969,6 @@ RecoveryDialog::RecoveryDialog(Window* pParent,
FreeResource();
- bool bCrashRepEnabled(officecfg::Office::Recovery::CrashReporter::Enabled::get(pCore->getComponentContext()));
- m_bRecoveryOnly = !bCrashRepEnabled;
-
PluginProgress* pProgress = new PluginProgress( &m_aProgrParent, pCore->getComponentContext() );
m_xProgress = css::uno::Reference< css::task::XStatusIndicator >(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW);
@@ -1070,20 +1064,10 @@ short RecoveryDialog::execute()
{
// the core finished it's task.
// let the user decide the next step.
- if ( m_bRecoveryOnly )
- {
- m_aDescrFT.SetText(m_aRecoveryOnlyFinishDescr);
- m_aNextBtn.SetText(m_aRecoveryOnlyFinish);
- m_aNextBtn.Enable(true);
- m_aCancelBtn.Enable(false);
- }
- else
- {
- m_aDescrFT.SetText(m_aTitleRecoveryReport);
- m_aNextBtn.SetText(m_aNextStr);
- m_aNextBtn.Enable(true);
- m_aCancelBtn.Enable(true);
- }
+ m_aDescrFT.SetText(m_aRecoveryOnlyFinishDescr);
+ m_aNextBtn.SetText(m_aRecoveryOnlyFinish);
+ m_aNextBtn.Enable(true);
+ m_aCancelBtn.Enable(false);
m_bWaitForUser = true;
while(m_bWaitForUser)
@@ -1494,550 +1478,6 @@ void BrokenRecoveryDialog::impl_askForSavePath()
}
}
-//===============================================
- ///////////////////////////////////////////////////////////////////////
- // Error Report Welcome Dialog
- ///////////////////////////////////////////////////////////////////////
-
- ErrorRepWelcomeDialog::ErrorRepWelcomeDialog( Window* _pParent, sal_Bool _bAllowBack )
- :IExtendedTabPage ( _pParent, SVX_RES( RID_SVXPAGE_ERR_REP_WELCOME ) )
- ,maTitleWin ( this, SVX_RES( WIN_RECOV_TITLE ) )
- ,maTitleFT ( this, SVX_RES( FT_RECOV_TITLE ) )
- ,maTitleFL ( this, SVX_RES( FL_RECOV_TITLE ) )
- ,maDescrFT ( this, SVX_RES( FT_RECOV_DESCR ) )
- ,maBottomFL ( this, SVX_RES( FL_RECOV_BOTTOM ) )
- ,maPrevBtn ( this, SVX_RES( BTN_RECOV_PREV ) )
- ,maNextBtn ( this, SVX_RES( BTN_RECOV_NEXT ) )
- ,maCancelBtn ( this, SVX_RES( BTN_RECOV_CANCEL ) )
- {
- FreeResource();
-
- Wallpaper aBack( GetSettings().GetStyleSettings().GetWindowColor() );
- maTitleWin.SetBackground( aBack );
- maTitleFT.SetBackground( aBack );
-
- Font aFnt( maTitleFT.GetFont() );
- aFnt.SetWeight( WEIGHT_BOLD );
- maTitleFT.SetFont( aFnt );
-
- maPrevBtn.SetClickHdl( LINK( this, ErrorRepWelcomeDialog, PrevBtnHdl ) );
- maPrevBtn.Enable( _bAllowBack );
-
- maNextBtn.SetClickHdl( LINK( this, ErrorRepWelcomeDialog, NextBtnHdl ) );
- maNextBtn.Enable( true );
-
- maCancelBtn.SetClickHdl( LINK( this, ErrorRepWelcomeDialog, CancelBtnHdl ) );
- maCancelBtn.Enable( true );
- }
-
- ErrorRepWelcomeDialog::~ErrorRepWelcomeDialog()
- {
- }
-
- IMPL_LINK_NOARG(ErrorRepWelcomeDialog, PrevBtnHdl)
- {
- m_nResult = DLG_RET_BACK;
- return 0;
- }
-
- IMPL_LINK_NOARG(ErrorRepWelcomeDialog, NextBtnHdl)
- {
- m_nResult = DLG_RET_OK;
- return 0;
- }
-
- IMPL_LINK_NOARG(ErrorRepWelcomeDialog, CancelBtnHdl)
- {
- m_nResult = DLG_RET_CANCEL;
- return 0;
- }
-
- short ErrorRepWelcomeDialog::execute()
- {
- ::SolarMutexGuard aLock;
- Show();
- m_nResult = DLG_RET_UNKNOWN;
- while(m_nResult == DLG_RET_UNKNOWN)
- Application::Yield();
- return m_nResult;
- }
-
- void ErrorRepWelcomeDialog::setDefButton()
- {
- maNextBtn.GrabFocus();
- }
-
- ///////////////////////////////////////////////////////////////////////
- // Error Report Send Dialog and its MultiLineEdit
- ///////////////////////////////////////////////////////////////////////
-
- ErrorDescriptionEdit::ErrorDescriptionEdit( Window* pParent, const ResId& rResId ) :
-
- MultiLineEdit( pParent, rResId )
-
- {
- SetModifyHdl( LINK( this, ErrorDescriptionEdit, ModifyHdl ) );
- if ( GetVScrollBar() )
- GetVScrollBar()->Hide();
- }
-
- ErrorDescriptionEdit::~ErrorDescriptionEdit()
- {
- }
-
- IMPL_LINK_NOARG(ErrorDescriptionEdit, ModifyHdl)
- {
- if ( !GetVScrollBar() )
- return 0;
-
- ExtTextEngine* pTextEngine = GetTextEngine();
- DBG_ASSERT( pTextEngine, "no text engine" );
-
- sal_uIntPtr i, nParaCount = pTextEngine->GetParagraphCount();
- sal_uInt16 nLineCount = 0;
-
- for ( i = 0; i < nParaCount; ++i )
- nLineCount = nLineCount + pTextEngine->GetLineCount(i);
-
- sal_uInt16 nVisCols = 0, nVisLines = 0;
- GetMaxVisColumnsAndLines( nVisCols, nVisLines );
- GetVScrollBar()->Show( nLineCount > nVisLines );
-
- return 0;
- }
-
- ErrorRepSendDialog::ErrorRepSendDialog( Window* _pParent )
- :IExtendedTabPage ( _pParent, SVX_RES( RID_SVXPAGE_ERR_REP_SEND ) )
- ,maTitleWin ( this, SVX_RES( WIN_RECOV_TITLE ) )
- ,maTitleFT ( this, SVX_RES( FT_RECOV_TITLE ) )
- ,maTitleFL ( this, SVX_RES( FL_RECOV_TITLE ) )
- ,maDescrFT ( this, SVX_RES( FT_RECOV_DESCR ) )
-
- ,maDocTypeFT ( this, SVX_RES( FT_ERRSEND_DOCTYPE ) )
- ,maDocTypeED ( this, SVX_RES( ED_ERRSEND_DOCTYPE ) )
- ,maUsingFT ( this, SVX_RES( FT_ERRSEND_USING ) )
- ,maUsingML ( this, SVX_RES( ML_ERRSEND_USING ) )
- ,maShowRepBtn ( this, SVX_RES( BTN_ERRSEND_SHOWREP ) )
- ,maOptBtn ( this, SVX_RES( BTN_ERRSEND_OPT ) )
- ,maContactCB ( this, SVX_RES( CB_ERRSEND_CONTACT ) )
- ,maEMailAddrFT ( this, SVX_RES( FT_ERRSEND_EMAILADDR ) )
- ,maEMailAddrED ( this, SVX_RES( ED_ERRSEND_EMAILADDR ) )
-
- ,maBottomFL ( this, SVX_RES( FL_RECOV_BOTTOM ) )
- ,maPrevBtn ( this, SVX_RES( BTN_RECOV_PREV ) )
- ,maNextBtn ( this, SVX_RES( BTN_RECOV_NEXT ) )
- ,maCancelBtn ( this, SVX_RES( BTN_RECOV_CANCEL ) )
- {
- FreeResource();
-
- initControls();
-
- Wallpaper aBack( GetSettings().GetStyleSettings().GetWindowColor() );
- maTitleWin.SetBackground( aBack );
- maTitleFT.SetBackground( aBack );
-
- Font aFnt( maTitleFT.GetFont() );
- aFnt.SetWeight( WEIGHT_BOLD );
- maTitleFT.SetFont( aFnt );
-
- maShowRepBtn.SetClickHdl( LINK( this, ErrorRepSendDialog, ShowRepBtnHdl ) );
- maOptBtn.SetClickHdl( LINK( this, ErrorRepSendDialog, OptBtnHdl ) );
- maContactCB.SetClickHdl( LINK( this, ErrorRepSendDialog, ContactCBHdl ) );
- maPrevBtn.SetClickHdl( LINK( this, ErrorRepSendDialog, PrevBtnHdl ) );
- maNextBtn.SetClickHdl( LINK( this, ErrorRepSendDialog, SendBtnHdl ) );
- maCancelBtn.SetClickHdl( LINK( this, ErrorRepSendDialog, CancelBtnHdl ) );
-
- ReadParams();
-
- ContactCBHdl( 0 );
- }
-
- ErrorRepSendDialog::~ErrorRepSendDialog()
- {
- }
-
- short ErrorRepSendDialog::execute()
- {
- ::SolarMutexGuard aLock;
- Show();
- m_nResult = DLG_RET_UNKNOWN;
- while(m_nResult == DLG_RET_UNKNOWN)
- Application::Yield();
- return m_nResult;
- }
-
- void ErrorRepSendDialog::setDefButton()
- {
- // set first focus
- maDocTypeED.GrabFocus();
- }
-
- IMPL_LINK_NOARG(ErrorRepSendDialog, PrevBtnHdl)
- {
- m_nResult = DLG_RET_BACK;
- return 0;
- }
-
- IMPL_LINK_NOARG(ErrorRepSendDialog, CancelBtnHdl)
- {
- m_nResult = DLG_RET_CANCEL;
- return 0;
- }
-
- IMPL_LINK_NOARG(ErrorRepSendDialog, SendBtnHdl)
- {
-
- SaveParams();
- SendReport();
-
- m_nResult = DLG_RET_OK;
- return 0;
- }
-
- IMPL_LINK_NOARG(ErrorRepSendDialog, ShowRepBtnHdl)
- {
- ErrorRepPreviewDialog aDlg( this );
- aDlg.Execute();
- return 0;
- }
-
- IMPL_LINK_NOARG(ErrorRepSendDialog, OptBtnHdl)
- {
- ErrorRepOptionsDialog aDlg( this, maParams );
- aDlg.Execute();
- return 0;
- }
-
- IMPL_LINK_NOARG(ErrorRepSendDialog, ContactCBHdl)
- {
- bool bCheck = maContactCB.IsChecked();
- maEMailAddrFT.Enable( bCheck );
- maEMailAddrED.Enable( bCheck );
- return 0;
- }
-
- void ErrorRepSendDialog::initControls()
- {
- // if the text is too short for two lines, insert a newline
- OUString sText = maDocTypeFT.GetText();
- if ( maDocTypeFT.GetCtrlTextWidth( sText ) <= maDocTypeFT.GetSizePixel().Width() )
- {
- sText = "\n" + sText;
- maDocTypeFT.SetText( sText );
- }
-
- // if the button text is too wide, then broaden the button
- sText = maShowRepBtn.GetText();
- long nTxtW = maShowRepBtn.GetCtrlTextWidth( sText );
- long nBtnW = maShowRepBtn.GetSizePixel().Width();
- if ( nTxtW >= nBtnW )
- {
- const long nMinDelta = 10;
- long nDelta = std::max( nTxtW - nBtnW, nMinDelta );
- sal_uInt32 i = 0;
- Window* pWins[] =
- {
- &maShowRepBtn, &maOptBtn,
- &maDescrFT, &maDocTypeFT, &maDocTypeED, &maUsingFT,
- &maUsingML, &maContactCB, &maEMailAddrFT, &maEMailAddrED
- };
- // the first two buttons need a new size (wider) and position (more left)
- Window** pCurrent = pWins;
- const sal_uInt32 nBtnCount = 2;
- for ( ; i < nBtnCount; ++i, ++pCurrent )
- {
- Size aNewSize = (*pCurrent)->GetSizePixel();
- aNewSize.Width() += nDelta;
- (*pCurrent)->SetSizePixel( aNewSize );
- Point aNewPos = (*pCurrent)->GetPosPixel();
- aNewPos.X() -= nDelta;
- (*pCurrent)->SetPosPixel( aNewPos );
- }
-
- // loop through all the other windows and adjust their size
- for ( ; i < sizeof( pWins ) / sizeof( pWins[ 0 ] ); ++i, ++pCurrent )
- {
- Size aSize = (*pCurrent)->GetSizePixel();
- aSize.Width() -= nDelta;
- (*pCurrent)->SetSizePixel( aSize );
- }
- }
- }
-
- OUString ErrorRepSendDialog::GetDocType( void ) const
- {
- return maDocTypeED.GetText();
- }
-
- OUString ErrorRepSendDialog::GetUsing( void ) const
- {
- return maUsingML.GetText();
- }
-
- bool ErrorRepSendDialog::IsContactAllowed( void ) const
- {
- return maContactCB.IsChecked();
- }
-
- OUString ErrorRepSendDialog::GetEMailAddress( void ) const
- {
- return maEMailAddrED.GetText();
- }
-
-
- ///////////////////////////////////////////////////////////////////////
- // Error Report Options Dialog
- ///////////////////////////////////////////////////////////////////////
-
- ErrorRepOptionsDialog::ErrorRepOptionsDialog( Window* _pParent, ErrorRepParams& _rParams )
- :ModalDialog ( _pParent, SVX_RES( RID_SVX_MDLG_ERR_REP_OPTIONS ) )
- ,maProxyFL( this, SVX_RES( FL_ERROPT_PROXY ) )
- ,maSystemBtn( this, SVX_RES( BTN_ERROPT_SYSTEM ) )
- ,maDirectBtn( this, SVX_RES( BTN_ERROPT_DIRECT ) )
- ,maManualBtn( this, SVX_RES( BTN_ERROPT_MANUAL ) )
- ,maProxyServerFT( this, SVX_RES( FT_ERROPT_PROXYSERVER ) )
- ,maProxyServerEd( this, SVX_RES( ED_ERROPT_PROXYSERVER ) )
- ,maProxyPortFT( this, SVX_RES( FT_ERROPT_PROXYPORT ) )
- ,maProxyPortEd( this, SVX_RES( ED_ERROPT_PROXYPORT ) )
- ,maDescriptionFT( this, SVX_RES( FT_ERROPT_DESCRIPTION ) )
- ,maButtonsFL( this, SVX_RES( FL_ERROPT_BUTTONS ) )
- ,maOKBtn( this, SVX_RES( BTN_ERROPT_OK ) )
- ,maCancelBtn( this, SVX_RES( BTN_ERROPT_CANCEL ) )
- ,mrParams( _rParams )
- {
- FreeResource();
-
- maManualBtn.SetToggleHdl( LINK( this, ErrorRepOptionsDialog, ManualBtnHdl ) );
- maCancelBtn.SetClickHdl( LINK( this, ErrorRepOptionsDialog, CancelBtnHdl ) );
- maOKBtn.SetClickHdl( LINK( this, ErrorRepOptionsDialog, OKBtnHdl ) );
-
- maProxyServerEd.SetText( mrParams.maHTTPProxyServer );
- maProxyPortEd.SetText( mrParams.maHTTPProxyPort );
-
-#ifndef WNT
- // no "Use system settings" button on non windows systems
- // so hide this button
- maSystemBtn.Hide();
- long nDelta = maDirectBtn.GetPosPixel().Y() - maSystemBtn.GetPosPixel().Y();
- // and loop through all these controls and adjust their position
- Window* pWins[] =
- {
- &maDirectBtn, &maManualBtn, &maProxyServerFT,
- &maProxyServerEd, &maProxyPortFT, &maProxyPortEd, &maDescriptionFT
- };
- Window** pCurrent = pWins;
- for ( sal_uInt32 i = 0; i < sizeof( pWins ) / sizeof( pWins[ 0 ] ); ++i, ++pCurrent )
- {
- Point aPos = (*pCurrent)->GetPosPixel();
- aPos.Y() -= nDelta;
- (*pCurrent)->SetPosPixel( aPos );
- }
-#endif
-
-
- switch ( mrParams.miHTTPConnectionType )
- {
- default:
-#ifdef WNT
- case 0:
- maSystemBtn.Check( sal_True );
- break;
-#endif
- case 1:
- maDirectBtn.Check( sal_True );
- break;
- case 2:
- maManualBtn.Check( sal_True );
- break;
- }
-
- ManualBtnHdl( 0 );
- }
-
- ErrorRepOptionsDialog::~ErrorRepOptionsDialog()
- {
- }
-
- IMPL_LINK_NOARG(ErrorRepOptionsDialog, ManualBtnHdl)
- {
- bool bCheck = maManualBtn.IsChecked();
- maProxyServerFT.Enable( bCheck );
- maProxyServerEd.Enable( bCheck );
- maProxyPortFT.Enable( bCheck );
- maProxyPortEd.Enable( bCheck );
- return 0;
- }
-
- IMPL_LINK_NOARG(ErrorRepOptionsDialog, OKBtnHdl)
- {
- if ( maManualBtn.IsChecked() )
- mrParams.miHTTPConnectionType = 2;
- else if ( maDirectBtn.IsChecked() )
- mrParams.miHTTPConnectionType = 1;
- else if ( maSystemBtn.IsChecked() )
- mrParams.miHTTPConnectionType = 0;
-
- mrParams.maHTTPProxyServer = maProxyServerEd.GetText();
- mrParams.maHTTPProxyPort = maProxyPortEd.GetText();
-
- EndDialog(DLG_RET_OK);
- return 0;
- }
-
- IMPL_LINK_NOARG(ErrorRepOptionsDialog, CancelBtnHdl)
- {
- EndDialog(DLG_RET_CANCEL);
- return 0;
- }
-
- ///////////////////////////////////////////////////////////////////////
- // Error Report Edit (MultiLineEdit with fixed font)
- ///////////////////////////////////////////////////////////////////////
-
- ErrorRepEdit::ErrorRepEdit( Window* pParent, const ResId& rResId ) :
- ExtMultiLineEdit( pParent, rResId )
- {
- // fixed font for error report
- Color aColor = GetTextColor();
-
- Font aFont = OutputDevice::GetDefaultFont(
- DEFAULTFONT_FIXED, LANGUAGE_SYSTEM, DEFAULTFONT_FLAGS_ONLYONE );
-
- // Set font color because the default font color is transparent !!!
- aFont.SetColor( aColor );
-
- GetTextEngine()->SetFont( aFont );
-
- // no blinking cursor and a little left margin
- EnableCursor( sal_False );
- SetLeftMargin( 4 );
- }
-
- ErrorRepEdit::~ErrorRepEdit()
- {
- }
-
- ///////////////////////////////////////////////////////////////////////
- // Error Report Preview Dialog
- ///////////////////////////////////////////////////////////////////////
-
-
- static OUString GetCrashConfigDir()
- {
-
-#if defined(WNT)
- OUString ustrValue = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/bootstrap.ini:UserInstallation}";
-#elif defined( MACOSX )
- OUString ustrValue = "~";
-#else
- OUString ustrValue = "$SYSUSERCONFIG";
-#endif
- Bootstrap::expandMacros( ustrValue );
-
-#if defined(WNT)
- ustrValue += "/user/crashdata";
-#endif
- return ustrValue;
- }
-
-#if defined(WNT)
-#define PRVFILE "crashdat.prv"
-#else
-#define PRVFILE ".crash_report_preview"
-#endif
-
- static OUString GetPreviewURL()
- {
- OUString aURL = GetCrashConfigDir() + "/" + PRVFILE;
- return aURL;
- }
-
- static OUString LoadCrashFile( const OUString &rURL )
- {
- OUString aFileContent;
- ::osl::File aFile( rURL );
-
- printf( "Loading %s:", OString( rURL.getStr(), rURL.getLength(), osl_getThreadTextEncoding() ).getStr() );
- if ( ::osl::FileBase::E_None == aFile.open( osl_File_OpenFlag_Read ) )
- {
- OString aContent;
- ::osl::FileBase::RC result;
- sal_uInt64 aBytesRead;
-
- do
- {
- sal_Char aBuffer[256];
-
- result = aFile.read( aBuffer, sizeof(aBuffer), aBytesRead );
-
- if ( ::osl::FileBase::E_None == result )
- {
- OString aTemp(aBuffer, static_cast<sal_Size>(aBytesRead));
- aContent += aTemp;
- }
- } while ( ::osl::FileBase::E_None == result && aBytesRead );
-
- OUString ustrContent( aContent.getStr(), aContent.getLength(), RTL_TEXTENCODING_UTF8 );
- aFileContent = ustrContent;
-
- aFile.close();
-
- printf( "SUCCEEDED\n" );
- }
- else
- printf( "FAILED\n" );
-
- return aFileContent;
- }
-
-
-
- ErrorRepPreviewDialog::ErrorRepPreviewDialog( Window* _pParent )
- :ModalDialog ( _pParent, SVX_RES( RID_SVX_MDLG_ERR_REP_PREVIEW ) )
- ,maContentML( this, SVX_RES( ML_ERRPREVIEW_CONTENT ) )
- ,maOKBtn( this, SVX_RES( BTN_ERRPREVIEW_OK ) )
-
- {
- FreeResource();
-
- mnMinHeight = ( maContentML.GetSizePixel().Height() / 2 );
-
- OUString aPreview = LoadCrashFile( GetPreviewURL() );
- ErrorRepSendDialog *pMainDlg = (ErrorRepSendDialog *)_pParent;
-
- OUString aSeparator( "\r\n\r\n================\r\n\r\n" );
-
- OUString aContent = pMainDlg->GetDocType();
- if ( !aContent.isEmpty() )
- aContent += aSeparator;
- aContent += pMainDlg->GetUsing();
- if ( !aContent.isEmpty() )
- aContent += aSeparator;
- aContent += aPreview;
-
- maContentML.SetText( aContent );
- }
-
- ErrorRepPreviewDialog::~ErrorRepPreviewDialog()
- {
- }
-
- void ErrorRepPreviewDialog::Resize()
- {
- Size a3Sz = LogicToPixel( Size( 3, 3 ), MAP_APPFONT );
- Size aWinSz = GetSizePixel();
- Size aBtnSz = maOKBtn.GetSizePixel();
- Point aEditPnt = maContentML.GetPosPixel();
-
- long nNewHeight = std::max( aWinSz.Height() - aEditPnt.Y() - 3 * a3Sz.Height() - aBtnSz.Height(), mnMinHeight );
- long nNewWidth = aWinSz.Width() - 4 * a3Sz.Width();
-
- Size aNewSize( nNewWidth, nNewHeight );
- maContentML.SetSizePixel( aNewSize );
- Point aNewPoint( std::max( aEditPnt.X() + aNewSize.Width() - aBtnSz.Width(), aEditPnt.X() ),
- aEditPnt.Y() + aNewSize.Height() + a3Sz.Height() );
- maOKBtn.SetPosPixel( aNewPoint );
- }
} // namespace DocRecovery
} // namespace svx
diff --git a/svx/source/dialog/docrecovery.hrc b/svx/source/dialog/docrecovery.hrc
index 4991baa5c34c..88269f5a2849 100644
--- a/svx/source/dialog/docrecovery.hrc
+++ b/svx/source/dialog/docrecovery.hrc
@@ -100,9 +100,7 @@
#define STR_RECOVFAILED 22
#define STR_RECOVINPROGR 23
#define STR_NOTRECOVYET 24
-#define STR_RECOVERY_NEXT 25
#define STR_RECOVERY_INPROGRESS 26
-#define STR_RECOVERY_REPORT 27
#define STR_RECOVERYONLY_FINISH_DESCR 28
#define STR_RECOVERYONLY_FINISH 29
diff --git a/svx/source/dialog/docrecovery.src b/svx/source/dialog/docrecovery.src
index 48f9f589e552..1900be6338f4 100644
--- a/svx/source/dialog/docrecovery.src
+++ b/svx/source/dialog/docrecovery.src
@@ -192,10 +192,6 @@ TabPage RID_SVXPAGE_DOCRECOVERY_RECOVER
Text[ en-US ] = "~Start Recovery >";
DefButton = TRUE;
};
- String STR_RECOVERY_NEXT
- {
- Text[ en-US ] = "~Next >";
- };
CancelButton BTN_RECOV_CANCEL
{
Pos = MAP_APPFONT( RECOV_COL_F, RECOV_ROW9 );
@@ -237,10 +233,6 @@ TabPage RID_SVXPAGE_DOCRECOVERY_RECOVER
{
Text[ en-US ] = "%PRODUCTNAME %PRODUCTVERSION will start to recover your documents. Depending on the size of the documents this process can take some time." ;
};
- String STR_RECOVERY_REPORT
- {
- Text[ en-US ] = "A report of the crash was created to help us identify the reason why %PRODUCTNAME crashed. Click 'Next' to get to the Error Report Tool or press 'Cancel' to skip this step." ;
- };
String STR_RECOVERYONLY_FINISH_DESCR
{
Text[ en-US ] = "Recovery of your documents was finished.\nClick 'Finish' to see your documents.";
@@ -327,310 +319,4 @@ ModalDialog RID_SVX_MDLG_DOCRECOVERY_BROKEN
};
};
-TabPage RID_SVXPAGE_ERR_REP_WELCOME
-{
- Size = MAP_APPFONT( RECOV_WIDTH, RECOV_HEIGHT );
- HelpId = HID_SVX_TP_ERR_REP_WELCOME;
- OutputSize = TRUE;
- SVLook = TRUE;
- Hide = TRUE;
- Window WIN_RECOV_TITLE
- {
- Pos = MAP_APPFONT( 0 , 0 );
- Size = MAP_APPFONT( RECOV_WIDTH, RECOV_TITLEWINHEIGHT );
- };
- FixedText FT_RECOV_TITLE
- {
- Pos = MAP_APPFONT( RECOV_COL1, RECOV_ROW0 );
- Size = MAP_APPFONT( RECOV_CONTROLWIDTH, RSC_CD_FIXEDTEXT_HEIGHT );
- Text[ en-US ] = "Welcome to the %PRODUCTNAME %PRODUCTVERSION Error Report";
- };
- FixedLine FL_RECOV_TITLE
- {
- Pos = MAP_APPFONT( 0 , RECOV_TITLEWINHEIGHT );
- Size = MAP_APPFONT( RECOV_WIDTH, 2 );
- };
- FixedText FT_RECOV_DESCR
- {
- Pos = MAP_APPFONT( RECOV_COL1, RECOV_ROW2 );
- Size = MAP_APPFONT( RECOV_CONTROLWIDTH, (RECOV_ROW7-RECOV_ROW2-RSC_SP_CTRL_Y) );
- WordBreak = TRUE;
- Text[ en-US ] = "This error report tool gathers information about how %PRODUCTNAME is working and sends it to The Document Foundation to help improve future versions.\n\nIt's easy - just send the report without any further effort on your part by clicking 'Send' in the next dialog, or you can briefly describe how the error occurred and then click 'Send'. If you want to see the report, click the 'Show Report' button. No data will be sent if you click 'Do Not Send'.\n\nCustomer Privacy\nThe information gathered is limited to data concerning the state of %PRODUCTNAME %PRODUCTVERSION when the error occurred. Other information about passwords or document contents is not collected.\n\nThe information will only be used to improve the quality of %PRODUCTNAME and will not be shared with third parties.\nFor more information on The Document Foundation's privacy policy, visit\nhttp://www.documentfoundation.org/privacy";
- };
- FixedLine FL_RECOV_BOTTOM
- {
- Pos = MAP_APPFONT( 0 , RECOV_ROW8 );
- Size = MAP_APPFONT( RECOV_WIDTH, RSC_CD_FIXEDLINE_HEIGHT );
- };
- PushButton BTN_RECOV_PREV
- {
- HelpID = "svx:PushButton:RID_SVXPAGE_ERR_REP_WELCOME:BTN_RECOV_PREV";
- Pos = MAP_APPFONT( RECOV_COL_C, RECOV_ROW9 );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- Text[ en-US ] = "< ~Back";
- };
- OKButton BTN_RECOV_NEXT
- {
- Pos = MAP_APPFONT( RECOV_COL_D, RECOV_ROW9 );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- Text[ en-US ] = "~Next >";
- DefButton = TRUE;
- };
- CancelButton BTN_RECOV_CANCEL
- {
- Pos = MAP_APPFONT( RECOV_COL_F, RECOV_ROW9 );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- };
-};
-
-TabPage RID_SVXPAGE_ERR_REP_SEND
-{
- Size = MAP_APPFONT( ERRSEND_WIDTH, ERRSEND_HEIGHT );
- HelpId = HID_SVX_TP_ERR_REP_SEND;
- OutputSize = TRUE;
- SVLook = TRUE;
- Hide = TRUE;
- Window WIN_RECOV_TITLE
- {
- Pos = MAP_APPFONT( 0 , 0 );
- Size = MAP_APPFONT( ERRSEND_WIDTH, RECOV_TITLEWINHEIGHT );
- };
- FixedText FT_RECOV_TITLE
- {
- Pos = MAP_APPFONT( ERRSEND_COL0, ERRSEND_ROW0 );
- Size = MAP_APPFONT( ERRSEND_CONTROLWIDTH1, RSC_CD_FIXEDTEXT_HEIGHT );
- Text[ en-US ] = "Sending the Error Report";
- };
- FixedLine FL_RECOV_TITLE
- {
- Pos = MAP_APPFONT( 0 , RECOV_TITLEWINHEIGHT );
- Size = MAP_APPFONT( RECOV_WIDTH, 2 );
- };
- FixedText FT_RECOV_DESCR
- {
- Pos = MAP_APPFONT( ERRSEND_COL0, ERRSEND_ROW2 );
- Size = MAP_APPFONT( ERRSEND_CONTROLWIDTH2, (ERRSEND_ROW3-ERRSEND_ROW2) );
- WordBreak = TRUE;
- Text[ en-US ] = "In the spaces below, you can enter a title for your error report and describe the action you were trying to carry out when the error occurred. Then click 'Send'.";
- };
-
- FixedText FT_ERRSEND_DOCTYPE
- {
- Pos = MAP_APPFONT( ERRSEND_COL0, ERRSEND_ROW4 );
- Size = MAP_APPFONT( ERRSEND_CONTROLWIDTH2, 2*RSC_CD_FIXEDTEXT_HEIGHT );
- WordBreak = TRUE;
- Text[ en-US ] = "~Which type of document (e.g. presentation) were you using when the error occurred?";
- };
- Edit ED_ERRSEND_DOCTYPE
- {
- HelpID = "svx:Edit:RID_SVXPAGE_ERR_REP_SEND:ED_ERRSEND_DOCTYPE";
- Pos = MAP_APPFONT( ERRSEND_COL0, ERRSEND_ROW5 );
- Size = MAP_APPFONT( ERRSEND_CONTROLWIDTH2, RSC_CD_TEXTBOX_HEIGHT );
- Border = TRUE;
- };
- FixedText FT_ERRSEND_USING
- {
- Pos = MAP_APPFONT( ERRSEND_COL0, ERRSEND_ROW7 );
- Size = MAP_APPFONT( ERRSEND_CONTROLWIDTH2, RSC_CD_FIXEDTEXT_HEIGHT );
- Text[ en-US ] = "~How were you using %PRODUCTNAME when the error occurred? (optional)";
- };
- MultiLineEdit ML_ERRSEND_USING
- {
- HelpID = "svx:MultiLineEdit:RID_SVXPAGE_ERR_REP_SEND:ML_ERRSEND_USING";
- Pos = MAP_APPFONT( ERRSEND_COL0, ERRSEND_ROW8 );
- Size = MAP_APPFONT( ERRSEND_CONTROLWIDTH2, (ERRSEND_ROW12-ERRSEND_ROW8-RSC_SP_CTRL_Y) );
- VScroll = TRUE;
- IgnoreTab = TRUE;
- Border = TRUE;
- };
- PushButton BTN_ERRSEND_SHOWREP
- {
- HelpID = "svx:PushButton:RID_SVXPAGE_ERR_REP_SEND:BTN_ERRSEND_SHOWREP";
- Pos = MAP_APPFONT( ERRSEND_COL3, ERRSEND_ROW8 );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- Text[ en-US ] = "Show ~Report";
- };
- PushButton BTN_ERRSEND_OPT
- {
- HelpID = "svx:PushButton:RID_SVXPAGE_ERR_REP_SEND:BTN_ERRSEND_OPT";
- Pos = MAP_APPFONT( ERRSEND_COL3, ERRSEND_ROW10 );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- Text[ en-US ] = "~Options...";
- };
- CheckBox CB_ERRSEND_CONTACT
- {
- HelpID = "svx:CheckBox:RID_SVXPAGE_ERR_REP_SEND:CB_ERRSEND_CONTACT";
- Pos = MAP_APPFONT( ERRSEND_COL0, ERRSEND_ROW12 );
- Size = MAP_APPFONT( ERRSEND_CONTROLWIDTH2, RSC_CD_CHECKBOX_HEIGHT );
- Check = FALSE;
- Text[ en-US ] = "~I allow The Document Foundation to contact me regarding this report.";
- };
- FixedText FT_ERRSEND_EMAILADDR
- {
- Pos = MAP_APPFONT( ERRSEND_COL1, ERRSEND_ROW13 );
- Size = MAP_APPFONT( ERRSEND_CONTROLWIDTH3, RSC_CD_FIXEDTEXT_HEIGHT );
- Text[ en-US ] = "~Please enter your e-mail address";
- };
- Edit ED_ERRSEND_EMAILADDR
- {
- HelpID = "svx:Edit:RID_SVXPAGE_ERR_REP_SEND:ED_ERRSEND_EMAILADDR";
- Pos = MAP_APPFONT( ERRSEND_COL1, ERRSEND_ROW14 );
- Size = MAP_APPFONT( ERRSEND_CONTROLWIDTH3, RSC_CD_TEXTBOX_HEIGHT );
- Border = TRUE;
- };
- FixedLine FL_RECOV_BOTTOM
- {
- Pos = MAP_APPFONT( 0 , ERRSEND_ROW15 );
- Size = MAP_APPFONT( ERRSEND_WIDTH, RSC_CD_FIXEDLINE_HEIGHT );
- };
- PushButton BTN_RECOV_PREV
- {
- HelpID = "svx:PushButton:RID_SVXPAGE_ERR_REP_SEND:BTN_RECOV_PREV";
- Pos = MAP_APPFONT( ERRSEND_COL5, ERRSEND_ROW16 );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- Text[ en-US ] = "< ~Back";
- };
- OKButton BTN_RECOV_NEXT
- {
- Pos = MAP_APPFONT( ERRSEND_COL6, ERRSEND_ROW16 );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- Text[ en-US ] = "S~end";
- DefButton = TRUE;
- };
- CancelButton BTN_RECOV_CANCEL
- {
- Pos = MAP_APPFONT( ERRSEND_COL3, ERRSEND_ROW16 );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- Text[ en-US ] = "Do ~Not Send";
- };
-};
-
-ModalDialog RID_SVX_MDLG_ERR_REP_OPTIONS
-{
- Size = MAP_APPFONT( ERROPT_WIDTH, ERROPT_HEIGHT );
- HelpId = HID_SVX_MDLG_ERR_REP_OPTIONS;
- OutputSize = TRUE;
- SVLook = TRUE;
- Moveable = TRUE;
- Text[ en-US ] = "Options";
-
- FixedLine FL_ERROPT_PROXY
- {
- Pos = MAP_APPFONT( ERROPT_COLA, ERROPT_ROW0 );
- Size = MAP_APPFONT( ERROPT_COLF - ERROPT_COLA, RSC_CD_FIXEDLINE_HEIGHT );
- Text[ en-US ] = "Proxy settings";
- };
-
- RadioButton BTN_ERROPT_SYSTEM
- {
- HelpID = "svx:RadioButton:RID_SVX_MDLG_ERR_REP_OPTIONS:BTN_ERROPT_SYSTEM";
- Pos = MAP_APPFONT( ERROPT_COLB, ERROPT_ROW1 );
- Size = MAP_APPFONT( ERROPT_COLF - ERROPT_COLB, RSC_CD_RADIOBUTTON_HEIGHT );
- Text[ en-US ] = "Use ~system settings";
- };
-
- RadioButton BTN_ERROPT_DIRECT
- {
- HelpID = "svx:RadioButton:RID_SVX_MDLG_ERR_REP_OPTIONS:BTN_ERROPT_DIRECT";
- Pos = MAP_APPFONT( ERROPT_COLB, ERROPT_ROW2 );
- Size = MAP_APPFONT( ERROPT_COLF - ERROPT_COLB, RSC_CD_RADIOBUTTON_HEIGHT );
- Text[ en-US ] = "Use ~direct connection to the Internet";
- };
-
- RadioButton BTN_ERROPT_MANUAL
- {
- HelpID = "svx:RadioButton:RID_SVX_MDLG_ERR_REP_OPTIONS:BTN_ERROPT_MANUAL";
- Pos = MAP_APPFONT( ERROPT_COLB, ERROPT_ROW3 );
- Size = MAP_APPFONT( ERROPT_COLF - ERROPT_COLB, RSC_CD_RADIOBUTTON_HEIGHT );
- Text[ en-US ] = "Use ~manual settings";
- };
-
- FixedText FT_ERROPT_PROXYSERVER
- {
- Pos = MAP_APPFONT( ERROPT_COLC, ERROPT_ROW4 );
- Size = MAP_APPFONT( ERROPT_SERVER_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT );
- Text[ en-US ] = "HT~TP Proxy";
- };
-
- Edit ED_ERROPT_PROXYSERVER
- {
- HelpID = "svx:Edit:RID_SVX_MDLG_ERR_REP_OPTIONS:ED_ERROPT_PROXYSERVER";
- Pos = MAP_APPFONT( ERROPT_COLC, ERROPT_ROW5 );
- Size = MAP_APPFONT( ERROPT_SERVER_WIDTH, RSC_CD_TEXTBOX_HEIGHT );
- Border = TRUE;
- };
-
- FixedText FT_ERROPT_PROXYPORT
- {
- Pos = MAP_APPFONT( ERROPT_COLC + ERROPT_SERVER_WIDTH + RSC_SP_CTRL_GROUP_X, ERROPT_ROW4 );
- Size = MAP_APPFONT( ERROPT_PORT_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT );
- Text[ en-US ] = "~Port";
- };
-
- Edit ED_ERROPT_PROXYPORT
- {
- HelpID = "svx:Edit:RID_SVX_MDLG_ERR_REP_OPTIONS:ED_ERROPT_PROXYPORT";
- Pos = MAP_APPFONT( ERROPT_COLC + ERROPT_SERVER_WIDTH + RSC_SP_CTRL_GROUP_X, ERROPT_ROW5 );
- Size = MAP_APPFONT( ERROPT_PORT_WIDTH, RSC_CD_TEXTBOX_HEIGHT );
- Border = TRUE;
- };
-
- FixedText FT_ERROPT_DESCRIPTION
- {
- Pos = MAP_APPFONT( ERROPT_COLB, ERROPT_ROW6 );
- Size = MAP_APPFONT( ERROPT_COLF - ERROPT_COLB, ERROPT_ROW7 - ERROPT_ROW6 );
- WordBreak = TRUE;
- Text[ en-US ] = "The %PRODUCTNAME Error Report tool needs to be connected to the Internet to be able to send error reports.\nCompanies often use proxy servers in conjunction with a firewall to protect the network.\nIf this applies to your situation, you have to specify the address and port for the server.";
- };
-
- FixedLine FL_ERROPT_BUTTONS
- {
- Pos = MAP_APPFONT( 0, ERROPT_ROW8 );
- Size = MAP_APPFONT( ERROPT_WIDTH, RSC_CD_FIXEDLINE_HEIGHT );
- };
-
- OKButton BTN_ERROPT_OK
- {
- Pos = MAP_APPFONT( ERROPT_COLD, ERROPT_ROW9 );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- DefButton = TRUE;
- };
-
- CancelButton BTN_ERROPT_CANCEL
- {
- Pos = MAP_APPFONT( ERROPT_COLE, ERROPT_ROW9 );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- };
-};
-
-
-ModalDialog RID_SVX_MDLG_ERR_REP_PREVIEW
-{
- Size = MAP_APPFONT( ERRPREVIEW_WIDTH, ERRPREVIEW_HEIGHT );
- HelpId = HID_SVX_MDLG_ERR_REP_PREVIEW;
- OutputSize = TRUE;
- SVLook = TRUE;
- Moveable = TRUE;
- Sizeable = TRUE;
- Text[ en-US ] = "Error Report";
-
- MultiLineEdit ML_ERRPREVIEW_CONTENT
- {
- HelpID = "svx:MultiLineEdit:RID_SVX_MDLG_ERR_REP_PREVIEW:ML_ERRPREVIEW_CONTENT";
- Pos = MAP_APPFONT( ERRPREVIEW_COLA, ERRPREVIEW_ROW0 );
- Size = MAP_APPFONT( ERRPREVIEW_COLC - ERRPREVIEW_COLA, ERRPREVIEW_ROW1 - ERRPREVIEW_ROW0 );
- VScroll = TRUE;
- HScroll = TRUE;
- ReadOnly = TRUE;
- Border = TRUE;
- };
-
- OKButton BTN_ERRPREVIEW_OK
- {
- Pos = MAP_APPFONT( ERRPREVIEW_COLB, ERRPREVIEW_ROW2 );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- DefButton = TRUE;
- };
-};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/sendreportgen.cxx b/svx/source/dialog/sendreportgen.cxx
deleted file mode 100644
index 9b12fe527710..000000000000
--- a/svx/source/dialog/sendreportgen.cxx
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#include "docrecovery.hxx"
-
-namespace svx{
- namespace DocRecovery{
-
- bool ErrorRepSendDialog::ReadParams()
- {
- return false;
- }
-
- bool ErrorRepSendDialog::SaveParams()
- {
- return false;
- }
-
- bool ErrorRepSendDialog::SendReport()
- {
- return false;
- }
-
-
- } // namespace DocRecovery
-} // namespace svx
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/sendreportunx.cxx b/svx/source/dialog/sendreportunx.cxx
deleted file mode 100644
index 7713a7c680dc..000000000000
--- a/svx/source/dialog/sendreportunx.cxx
+++ /dev/null
@@ -1,261 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <config_folders.h>
-
-#include "docrecovery.hxx"
-#include "osl/file.hxx"
-#include "osl/process.h"
-#include "rtl/bootstrap.hxx"
-#include "rtl/strbuf.hxx"
-#include "tools/appendunixshellword.hxx"
-#include <string>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#define RCFILE ".crash_reportrc"
-
-using namespace ::std;
-
-static const char *get_home_dir()
-{
- struct passwd *ppwd = getpwuid( getuid() );
-
- return ppwd ? (ppwd->pw_dir ? ppwd->pw_dir : "/") : "/";
-}
-
-static bool read_line( FILE *fp, string& rLine )
-{
- char szBuffer[1024];
- bool bSuccess = false;
- bool bEOL = false;
- string line;
-
-
- while ( !bEOL && fgets( szBuffer, sizeof(szBuffer), fp ) )
- {
- int len = strlen(szBuffer);
-
- bSuccess = true;
-
- while ( len && szBuffer[len - 1] == '\n' )
- {
- szBuffer[--len] = 0;
- bEOL = true;
- }
-
- line.append( szBuffer );
- }
-
- rLine = line;
- return bSuccess;
-}
-
-static string trim_string( const string& rString )
-{
- string temp = rString;
-
- while ( temp.length() && (temp[0] == ' ' || temp[0] == '\t') )
- temp.erase( 0, 1 );
-
- string::size_type len = temp.length();
-
- while ( len && (temp[len-1] == ' ' || temp[len-1] == '\t') )
- {
- temp.erase( len - 1, 1 );
- len = temp.length();
- }
-
- return temp;
-}
-
-static string get_profile_string( const char *pFileName, const char *pSectionName, const char *pKeyName, const char *pDefault = NULL )
-{
- FILE *fp = fopen( pFileName, "r" );
- string retValue = pDefault ? pDefault : "";
-
- if ( fp )
- {
- string line;
- string section;
-
- while ( read_line( fp, line ) )
- {
- line = trim_string( line );
-
- if ( line.length() && line[0] == '[' )
- {
- line.erase( 0, 1 );
- string::size_type end = line.find( ']', 0 );
-
- if ( string::npos != end )
- section = trim_string( line.substr( 0, end ) );
- }
- else
- {
-
- string::size_type iEqualSign = line.find( '=', 0 );
-
- if ( iEqualSign != string::npos )
- {
- string keyname = line.substr( 0, iEqualSign );
- keyname = trim_string( keyname );
-
- string value = line.substr( iEqualSign + 1, string::npos );
- value = trim_string( value );
-
- if (
- 0 == strcasecmp( section.c_str(), pSectionName ) &&
- 0 == strcasecmp( keyname.c_str(), pKeyName )
- )
- {
- retValue = value;
- break;
- }
- }
- }
- }
-
- fclose( fp );
- }
-
- return retValue;
-}
-
-static bool get_profile_bool( const char *pFileName, const char *pSectionName, const char *pKeyName )
-{
- string str = get_profile_string( pFileName, pSectionName, pKeyName );
-
- if ( !strcasecmp( str.c_str(), "true" ) )
- return true;
- return false;
-}
-
-static OUString get_profile_String( const char *pFileName, const char *pSectionName, const char *pKeyName, const char * = NULL )
-{
- string str = get_profile_string( pFileName, pSectionName, pKeyName );
- OUString result( str.c_str(), str.length(), RTL_TEXTENCODING_UTF8 );
-
- return result;
-}
-
-namespace svx{
- namespace DocRecovery{
-
- bool ErrorRepSendDialog::ReadParams()
- {
- string sRCFile = get_home_dir();
-
- sRCFile += "/";
- sRCFile += string(RCFILE);
-
- maEMailAddrED.SetText( get_profile_String( sRCFile.c_str(), "Options", "ReturnAddress" ) );
- maParams.maHTTPProxyServer = get_profile_String( sRCFile.c_str(), "Options", "ProxyServer" );
- maParams.maHTTPProxyPort = get_profile_String( sRCFile.c_str(), "Options", "ProxyPort" );
- maParams.miHTTPConnectionType = get_profile_bool( sRCFile.c_str(), "Options", "UseProxy" ) ? 2 : 1;
- maContactCB.Check( get_profile_bool( sRCFile.c_str(), "Options", "AllowContact" ) );
-
- return true;
- }
-
- bool ErrorRepSendDialog::SaveParams()
- {
- bool success = false;
- string sRCFile = get_home_dir();
-
- sRCFile += "/";
- sRCFile += string(RCFILE);
-
- FILE *fp = fopen( sRCFile.c_str(), "w" );
-
- if ( fp )
- {
- fprintf( fp, "[Options]\n" );
- fprintf( fp, "UseProxy=%s\n", 2 == maParams.miHTTPConnectionType ? "true" : "false" );
- fprintf( fp, "ProxyServer=%s\n", OUStringToOString( maParams.maHTTPProxyServer, RTL_TEXTENCODING_UTF8 ).getStr() );
- fprintf( fp, "ProxyPort=%s\n", OUStringToOString( maParams.maHTTPProxyPort, RTL_TEXTENCODING_UTF8 ).getStr() );
- fprintf( fp, "ReturnAddress=%s\n", OUStringToOString( GetEMailAddress(), RTL_TEXTENCODING_UTF8 ).getStr() );
- fprintf( fp, "AllowContact=%s\n", IsContactAllowed() ? "true" : "false" );
- fclose( fp );
- }
-
- return success;
- }
-
- bool ErrorRepSendDialog::SendReport()
- {
- OUString sSubEnvVar("ERRORREPORT_SUBJECT");
- OUString strSubject(GetDocType());
- osl_setEnvironment(sSubEnvVar.pData, strSubject.pData);
-
- char szBodyFile[]="/tmp/locrsXXXXXXX";
- mode_t nOrigMode = umask(S_IRWXG | S_IRWXO);
- int nDescriptor = mkstemp(szBodyFile);
- umask(nOrigMode);
-
- FILE *fp = nDescriptor != -1 ? fdopen(nDescriptor, "w") : NULL;
-
- if ( fp )
- {
- OString strUTF8(OUStringToOString(GetUsing(), RTL_TEXTENCODING_UTF8));
-
- size_t nWritten = fwrite(strUTF8.getStr(), 1, strUTF8.getLength(), fp);
- OSL_VERIFY(nWritten == static_cast<size_t>(strUTF8.getLength()));
- fclose( fp );
-
- OUString sBodyEnvVar("ERRORREPORT_BODYFILE");
- OUString strBodyFile(OStringToOUString(OString(szBodyFile),
- osl_getThreadTextEncoding()));
- osl_setEnvironment(sBodyEnvVar.pData, strBodyFile.pData);
- }
-
- int ret = -1;
- OUString path1("$BRAND_BASE_DIR/" LIBO_LIBEXEC_FOLDER "/crashrep");
- rtl::Bootstrap::expandMacros(path1);
- OString path2;
- if ((osl::FileBase::getSystemPathFromFileURL(path1, path1) ==
- osl::FileBase::E_None) &&
- path1.convertToString(
- &path2, osl_getThreadTextEncoding(),
- (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR |
- RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
- {
- OStringBuffer cmd;
- tools::appendUnixShellWord(&cmd, path2);
- cmd.append(" -debug -load -send -noui");
- ret = system(cmd.getStr());
- }
-
- if ( szBodyFile[0] )
- {
- unlink( szBodyFile );
- }
-
- return -1 != ret;
- }
-
-
- } // namespace DocRecovery
-} // namespace svx
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/sendreportw32.cxx b/svx/source/dialog/sendreportw32.cxx
deleted file mode 100644
index b95cb305a15e..000000000000
--- a/svx/source/dialog/sendreportw32.cxx
+++ /dev/null
@@ -1,254 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#define UNICODE
-#define _UNICODE
-
-#include "docrecovery.hxx"
-
-#undef WB_LEFT
-#undef WB_RIGHT
-
-#include <prewin.h>
-#include <postwin.h>
-#include <tchar.h>
-#include <stdio.h>
-#include <systools/win32/uwinapi.h>
-#include <sal/macros.h>
-
-// need to undef min and max macros from MS headers here to make
-// the std::min and std::max from stl visible again
-#ifdef min
-#undef min
-#endif
-#ifdef max
-#undef max
-#endif
-
-//***************************************************************************
-
-static LONG RegReadValue( HKEY hBaseKey, LPCTSTR lpSubKey, LPCTSTR lpValueName, LPVOID lpData, DWORD cbData )
-{
- HKEY hKey = NULL;
- LONG lResult;
-
- lResult = RegOpenKeyEx( hBaseKey, lpSubKey, 0, KEY_QUERY_VALUE, &hKey );
-
- if ( ERROR_SUCCESS == lResult )
- {
- lResult = RegQueryValueEx( hKey, lpValueName, NULL, NULL, (LPBYTE)lpData, &cbData );
- RegCloseKey( hKey );
- }
-
- return lResult;
-}
-
-//***************************************************************************
-
-static LONG RegWriteValue( HKEY hBaseKey, LPCTSTR lpSubKey, LPCTSTR lpValueName, DWORD dwType, LPCVOID lpData, DWORD cbData )
-{
- HKEY hKey = NULL;
- LONG lResult;
-
- lResult = RegCreateKeyEx( hBaseKey, lpSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, NULL );
-
- if ( ERROR_SUCCESS == lResult )
- {
- lResult = RegSetValueEx( hKey, lpValueName, 0, dwType, (CONST sal_uInt8 *)lpData, cbData );
- RegCloseKey( hKey );
- }
-
- return lResult;
-}
-
-//***************************************************************************
-
-namespace svx{
- namespace DocRecovery{
-
- bool ErrorRepSendDialog::ReadParams()
- {
- _TCHAR szBuffer[2048];
-
- if ( ERROR_SUCCESS == RegReadValue(
- HKEY_CURRENT_USER,
- TEXT("SOFTWARE\\LibreOffice\\CrashReport"),
- TEXT("HTTPProxyServer"),
- szBuffer,
- sizeof(szBuffer) ) )
- maParams.maHTTPProxyServer = (sal_Unicode *)szBuffer;
-
- DWORD dwProxyPort;
- if ( ERROR_SUCCESS == RegReadValue(
- HKEY_CURRENT_USER,
- TEXT("SOFTWARE\\LibreOffice\\CrashReport"),
- TEXT("HTTPProxyPort"),
- &dwProxyPort,
- sizeof(dwProxyPort) ) )
- {
- _stprintf( szBuffer, _T("%d"), dwProxyPort );
- maParams.maHTTPProxyPort = (sal_Unicode *)szBuffer;
- }
-
- if ( ERROR_SUCCESS == RegReadValue(
- HKEY_CURRENT_USER,
- TEXT("SOFTWARE\\LibreOffice\\CrashReport"),
- TEXT("ReturnAddress"),
- szBuffer,
- sizeof(szBuffer) ) )
- maEMailAddrED.SetText(OUString((sal_Unicode *)szBuffer));
-
- DWORD fAllowContact = sal_False;
- RegReadValue(
- HKEY_CURRENT_USER,
- TEXT("SOFTWARE\\LibreOffice\\CrashReport"),
- TEXT("AllowContact"),
- &fAllowContact,
- sizeof(fAllowContact) );
- maContactCB.Check( (sal_Bool)fAllowContact );
-
- DWORD uInternetConnection = 0;
- RegReadValue(
- HKEY_CURRENT_USER,
- TEXT("SOFTWARE\\LibreOffice\\CrashReport"),
- TEXT("HTTPConnection"),
- &uInternetConnection,
- sizeof(uInternetConnection) );
- maParams.miHTTPConnectionType = uInternetConnection;
-
- return true;
- }
-
- bool ErrorRepSendDialog::SaveParams()
- {
- const _TCHAR *lpHTTPProxyServer = reinterpret_cast<LPCTSTR>(maParams.maHTTPProxyServer.getStr());
- RegWriteValue(
- HKEY_CURRENT_USER,
- TEXT("SOFTWARE\\LibreOffice\\CrashReport"),
- TEXT("HTTPProxyServer"), REG_SZ,
- lpHTTPProxyServer,
- sizeof(TCHAR) * (_tcslen(lpHTTPProxyServer) + 1) );
-
- _TCHAR* endptr = NULL;
- DWORD dwProxyPort = _tcstoul( reinterpret_cast<LPCTSTR>(maParams.maHTTPProxyPort.getStr()), &endptr, 10 );
-
- RegWriteValue(
- HKEY_CURRENT_USER,
- TEXT("SOFTWARE\\LibreOffice\\CrashReport"),
- TEXT("HTTPProxyPort"), REG_DWORD,
- &dwProxyPort,
- sizeof(DWORD) );
-
- DWORD fAllowContact = IsContactAllowed();
- RegWriteValue(
- HKEY_CURRENT_USER,
- TEXT("SOFTWARE\\LibreOffice\\CrashReport"),
- TEXT("AllowContact"), REG_DWORD,
- &fAllowContact,
- sizeof(DWORD) );
-
-
- DWORD uInternetConnection = maParams.miHTTPConnectionType;
-
- RegWriteValue(
- HKEY_CURRENT_USER,
- TEXT("SOFTWARE\\LibreOffice\\CrashReport"),
- TEXT("HTTPConnection"), REG_DWORD,
- &uInternetConnection,
- sizeof(DWORD) );
-
- const _TCHAR *lpEmail = reinterpret_cast<LPCTSTR>(GetEMailAddress().getStr());
- RegWriteValue(
- HKEY_CURRENT_USER,
- TEXT("SOFTWARE\\LibreOffice\\CrashReport"),
- TEXT("ReturnAddress"), REG_SZ,
- lpEmail,
- sizeof(TCHAR) * (_tcslen(lpEmail) + 1) );
-
- return true;
- }
-
- bool ErrorRepSendDialog::SendReport()
- {
- TCHAR szTempPath[MAX_PATH];
- TCHAR szFileName[MAX_PATH];
-
- GetTempPath( SAL_N_ELEMENTS(szTempPath), szTempPath );
- GetTempFileName( szTempPath, TEXT("DSC"), 0, szFileName );
-
- FILE *fp = _tfopen( szFileName, _T("wb") );
-
- if ( fp )
- {
- OString strUTF8(OUStringToOString(GetUsing(),
- RTL_TEXTENCODING_UTF8));
-
- fwrite( strUTF8.getStr(), 1, strUTF8.getLength(), fp );
- fclose( fp );
- }
-
- SetEnvironmentVariable( TEXT("ERRORREPORT_SUBJECT"), reinterpret_cast<LPCTSTR>(GetDocType().getStr()) );
- SetEnvironmentVariable( TEXT("ERRORREPORT_BODYFILE"), szFileName );
-
- _TCHAR szBuffer[1024];
- TCHAR szPath[MAX_PATH];
- LPTSTR lpFilePart;
- PROCESS_INFORMATION ProcessInfo;
- STARTUPINFO StartupInfo;
-
- if ( SearchPath( NULL, TEXT("crashrep.exe"), NULL, MAX_PATH, szPath, &lpFilePart ) )
- {
- ZeroMemory( &StartupInfo, sizeof(StartupInfo) );
- StartupInfo.cb = sizeof(StartupInfo.cb);
-
- sntprintf( szBuffer, SAL_N_ELEMENTS(szBuffer),
- _T("%s -noui -load -send"),
- szPath );
-
- if (
- CreateProcess(
- NULL,
- szBuffer,
- NULL,
- NULL,
- sal_False,
- 0,
- NULL, NULL, &StartupInfo, &ProcessInfo )
- )
- {
- DWORD dwExitCode;
-
- WaitForSingleObject( ProcessInfo.hProcess, INFINITE );
- if ( GetExitCodeProcess( ProcessInfo.hProcess, &dwExitCode ) && 0 == dwExitCode )
- return true;
-
- }
- }
-
- DeleteFile( szFileName );
-
-
- return false;
- }
-
-
- } // namespace DocRecovery
-} // namespace svx
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx
index 6395e6fe5a68..626a9e648796 100644
--- a/svx/source/inc/docrecovery.hxx
+++ b/svx/source/inc/docrecovery.hxx
@@ -43,7 +43,6 @@
#define RECOVERY_CMDPART_DO_EMERGENCY_SAVE OUString( "/doEmergencySave" )
#define RECOVERY_CMDPART_DO_RECOVERY OUString( "/doAutoRecovery" )
-#define RECOVERY_CMDPART_DO_CRASHREPORT OUString( "/doCrashReport" )
#define RECOVERY_CMD_DO_PREPARE_EMERGENCY_SAVE OUString( "vnd.sun.star.autorecovery:/doPrepareEmergencySave")
#define RECOVERY_CMD_DO_EMERGENCY_SAVE OUString( "vnd.sun.star.autorecovery:/doEmergencySave" )
@@ -612,9 +611,7 @@ class RecoveryDialog : public IExtendedTabPage
FixedLine m_aBottomFL;
PushButton m_aNextBtn;
CancelButton m_aCancelBtn;
- OUString m_aNextStr;
OUString m_aTitleRecoveryInProgress;
- OUString m_aTitleRecoveryReport;
OUString m_aRecoveryOnlyFinish;
OUString m_aRecoveryOnlyFinishDescr;
@@ -637,7 +634,6 @@ class RecoveryDialog : public IExtendedTabPage
bool m_bWaitForCore;
bool m_bUserDecideNext;
bool m_bWasRecoveryStarted;
- bool m_bRecoveryOnly;
//-------------------------------------------
// member
@@ -748,169 +744,6 @@ class BrokenRecoveryDialog : public ModalDialog
/** @short TODO */
void impl_askForSavePath();
};
-
-
-
- class ErrorRepWelcomeDialog : public IExtendedTabPage
- {
- private:
- Window maTitleWin;
- FixedText maTitleFT;
- FixedLine maTitleFL;
- FixedText maDescrFT;
-
- FixedLine maBottomFL;
- PushButton maPrevBtn;
- OKButton maNextBtn;
- CancelButton maCancelBtn;
-
- DECL_LINK( PrevBtnHdl, void* );
- DECL_LINK( NextBtnHdl, void* );
- DECL_LINK( CancelBtnHdl, void* );
- public:
- ErrorRepWelcomeDialog( Window* _pParent, sal_Bool _bAllowBack = sal_True );
- virtual ~ErrorRepWelcomeDialog();
- /** @short TODO*/
- virtual short execute();
-
- //---------------------------------------
- /** @short TODO*/
- virtual void setDefButton();
- };
-
- struct ErrorRepParams
- {
- ErrorRepParams()
-#ifdef WNT
- : miHTTPConnectionType( 0 )
-#else
- : miHTTPConnectionType( 1 )
-#endif
- , mbAllowContact( false )
- {}
-
- OUString maHTTPProxyServer;
- OUString maHTTPProxyPort;
- int miHTTPConnectionType;
- bool mbAllowContact;
- OUString maReturnAddress;
- OUString maSubject;
- OUString maBody;
- };
-
- class ErrorDescriptionEdit : public MultiLineEdit
- {
- private:
- DECL_LINK( ModifyHdl, void* );
-
- public:
- ErrorDescriptionEdit( Window* pParent, const ResId& rResId );
- virtual ~ErrorDescriptionEdit();
- };
-
- class ErrorRepSendDialog : public IExtendedTabPage
- {
- private:
- Window maTitleWin;
- FixedText maTitleFT;
- FixedLine maTitleFL;
- FixedText maDescrFT;
-
- FixedText maDocTypeFT;
- Edit maDocTypeED;
- FixedText maUsingFT;
- ErrorDescriptionEdit maUsingML;
- PushButton maShowRepBtn;
- PushButton maOptBtn;
- CheckBox maContactCB;
- FixedText maEMailAddrFT;
- Edit maEMailAddrED;
-
- FixedLine maBottomFL;
- PushButton maPrevBtn;
- OKButton maNextBtn;
- CancelButton maCancelBtn;
-
- ErrorRepParams maParams;
-
- DECL_LINK( ShowRepBtnHdl, void* );
- DECL_LINK( OptBtnHdl, void* );
- DECL_LINK( ContactCBHdl, void* );
- DECL_LINK( PrevBtnHdl, void* );
- DECL_LINK( SendBtnHdl, void* );
- DECL_LINK( CancelBtnHdl, void* );
-
- void initControls();
-
- public:
- ErrorRepSendDialog( Window* _pParent );
- virtual ~ErrorRepSendDialog();
-
- OUString GetDocType( void ) const;
- OUString GetUsing( void ) const;
- bool IsContactAllowed( void ) const;
- OUString GetEMailAddress( void ) const;
-
- bool ReadParams();
- bool SaveParams();
- bool SendReport();
-
- /** @short TODO*/
- virtual short execute();
-
- //---------------------------------------
- /** @short TODO*/
- virtual void setDefButton();
- };
-
- class ErrorRepOptionsDialog : public ModalDialog
- {
- private:
- FixedLine maProxyFL;
- RadioButton maSystemBtn;
- RadioButton maDirectBtn;
- RadioButton maManualBtn;
- FixedText maProxyServerFT;
- Edit maProxyServerEd;
- FixedText maProxyPortFT;
- Edit maProxyPortEd;
- FixedText maDescriptionFT;
- FixedLine maButtonsFL;
- OKButton maOKBtn;
- CancelButton maCancelBtn;
-
- ErrorRepParams& mrParams;
-
- DECL_LINK( CancelBtnHdl, void* );
- DECL_LINK( OKBtnHdl, void * );
- DECL_LINK( ManualBtnHdl, void * );
-
- public:
- ErrorRepOptionsDialog( Window* _pParent, ErrorRepParams& rParams );
- virtual ~ErrorRepOptionsDialog();
- };
-
- class ErrorRepEdit : public ExtMultiLineEdit
- {
- public:
- ErrorRepEdit( Window* pParent, const ResId& rResId );
- virtual ~ErrorRepEdit();
- };
-
- class ErrorRepPreviewDialog : public ModalDialog
- {
- private:
- ErrorRepEdit maContentML;
- OKButton maOKBtn;
-
- long mnMinHeight;
-
- public:
- ErrorRepPreviewDialog( Window* _pParent );
- virtual ~ErrorRepPreviewDialog();
-
- virtual void Resize();
- };
} // namespace DocRecovery
} // namespace svx
diff --git a/svx/source/inc/recoveryui.hxx b/svx/source/inc/recoveryui.hxx
index 38febbbbf433..bad688cf22f9 100644
--- a/svx/source/inc/recoveryui.hxx
+++ b/svx/source/inc/recoveryui.hxx
@@ -127,9 +127,6 @@ class RecoveryUI : public ::cppu::WeakImplHelper2< css::lang::XServiceInfo
void impl_doRecovery();
void impl_showAllRecoveredDocs();
-
- void impl_doCrashReport();
-
};
} // namespace svx
diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx
index 65033f63fe37..0aa987dafc22 100644
--- a/svx/source/unodraw/recoveryui.cxx
+++ b/svx/source/unodraw/recoveryui.cxx
@@ -57,7 +57,6 @@ class RecoveryUI : public ::cppu::WeakImplHelper2< css::lang::XServiceInfo
E_JOB_UNKNOWN,
E_DO_EMERGENCY_SAVE,
E_DO_RECOVERY,
- E_DO_CRASHREPORT
};
//-------------------------------------------
@@ -131,8 +130,6 @@ class RecoveryUI : public ::cppu::WeakImplHelper2< css::lang::XServiceInfo
void impl_showAllRecoveredDocs();
- void impl_doCrashReport();
-
};
RecoveryUI::RecoveryUI(const css::uno::Reference< css::uno::XComponentContext >& xContext)
@@ -191,10 +188,6 @@ css::uno::Any SAL_CALL RecoveryUI::dispatchWithReturnValue(const css::util::URL&
impl_doRecovery();
break;
- case RecoveryUI::E_DO_CRASHREPORT :
- impl_doCrashReport();
- break;
-
default :
break;
}
@@ -261,21 +254,6 @@ static OUString GetUnsentURL()
//===============================================
-static bool new_crash_pending()
-{
- OUString aUnsentURL = GetUnsentURL();
- File aFile( aUnsentURL );
-
- if ( FileBase::E_None == aFile.open( osl_File_OpenFlag_Read ) )
- {
- aFile.close();
- return true;
- }
-
- return false;
-}
-//===============================================
-
static bool delete_pending_crash()
{
OUString aUnsentURL = GetUnsentURL();
@@ -289,12 +267,8 @@ RecoveryUI::EJob RecoveryUI::impl_classifyJob(const css::util::URL& aURL)
{
if (aURL.Path.equals(RECOVERY_CMDPART_DO_EMERGENCY_SAVE))
m_eJob = RecoveryUI::E_DO_EMERGENCY_SAVE;
- else
- if (aURL.Path.equals(RECOVERY_CMDPART_DO_RECOVERY))
+ else if (aURL.Path.equals(RECOVERY_CMDPART_DO_RECOVERY))
m_eJob = RecoveryUI::E_DO_RECOVERY;
- else
- if (aURL.Path.equals(RECOVERY_CMDPART_DO_CRASHREPORT))
- m_eJob = RecoveryUI::E_DO_CRASHREPORT;
}
return m_eJob;
@@ -325,11 +299,6 @@ sal_Bool RecoveryUI::impl_doEmergencySave()
//===============================================
void RecoveryUI::impl_doRecovery()
{
- bool bRecoveryOnly( false );
-
- bool bCrashRepEnabled(officecfg::Office::Recovery::CrashReporter::Enabled::get(m_xContext));
- bRecoveryOnly = !bCrashRepEnabled;
-
// create core service, which implements the real "emergency save" algorithm.
svxdr::RecoveryCore* pCore = new svxdr::RecoveryCore(m_xContext, false);
css::uno::Reference< css::frame::XStatusListener > xCore(pCore);
@@ -342,13 +311,6 @@ void RecoveryUI::impl_doRecovery()
svxdr::IExtendedTabPage* pPage3 = 0;
xWizard->addTabPage(pPage1);
- if ( !bRecoveryOnly && new_crash_pending() )
- {
- pPage2 = new svxdr::ErrorRepWelcomeDialog(xWizard.get());
- pPage3 = new svxdr::ErrorRepSendDialog(xWizard.get());
- xWizard->addTabPage(pPage2);
- xWizard->addTabPage(pPage3);
- }
// start the wizard
xWizard->Execute();
@@ -364,28 +326,6 @@ void RecoveryUI::impl_doRecovery()
//===============================================
-void RecoveryUI::impl_doCrashReport()
-{
- if ( new_crash_pending() )
- {
- svxdr::TabDialog4Recovery* pWizard = new svxdr::TabDialog4Recovery (m_pParentWindow );
- svxdr::IExtendedTabPage* pPage1 = new svxdr::ErrorRepWelcomeDialog(pWizard, sal_False);
- svxdr::IExtendedTabPage* pPage2 = new svxdr::ErrorRepSendDialog (pWizard );
- pWizard->addTabPage(pPage1);
- pWizard->addTabPage(pPage2);
-
- // start the wizard
- pWizard->Execute();
-
- delete pPage2 ;
- delete pPage1 ;
- delete pWizard;
-
- delete_pending_crash();
- }
-}
-
-//===============================================
void RecoveryUI::impl_showAllRecoveredDocs()
{
css::uno::Reference< css::frame::XDesktop2 > xDesktop = css::frame::Desktop::create( m_xContext );