summaryrefslogtreecommitdiff
path: root/svx/source/dialog/docrecovery.cxx
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 /svx/source/dialog/docrecovery.cxx
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
Diffstat (limited to 'svx/source/dialog/docrecovery.cxx')
-rw-r--r--svx/source/dialog/docrecovery.cxx568
1 files changed, 4 insertions, 564 deletions
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