diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:49:47 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:49:47 +0100 |
commit | 091e4aee3386f3bfee081dc8646494e0eb97f88a (patch) | |
tree | dd79298b4e8729ca7dc874274d4a33ea88fe107d /sfx2/source/appl/fileobj.cxx | |
parent | f0681adbf092e2b455db52535f2df882bc87343a (diff) | |
parent | 224bd63b3fa459baa0a6bb5cd03f5dc2ca475d82 (diff) |
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts:
avmedia/source/framework/mediacontrol.cxx
connectivity/source/commontools/DateConversion.cxx
desktop/source/deployment/registry/component/dp_component.cxx
editeng/inc/editeng/numitem.hxx
editeng/inc/editeng/txtrange.hxx
editeng/source/editeng/editobj.cxx
editeng/source/editeng/editview.cxx
editeng/source/editeng/eehtml.cxx
editeng/source/editeng/impedit3.cxx
editeng/source/editeng/impedit4.cxx
editeng/source/misc/txtrange.cxx
editeng/source/outliner/outlin2.cxx
editeng/source/outliner/outlvw.cxx
framework/source/layoutmanager/layoutmanager.cxx
linguistic/source/lngsvcmgr.hxx
sfx2/source/appl/app.cxx
sfx2/source/appl/app.src
sfx2/source/appl/appbas.cxx
sfx2/source/appl/appcfg.cxx
sfx2/source/appl/appdde.cxx
sfx2/source/appl/appmain.cxx
sfx2/source/appl/appopen.cxx
sfx2/source/appl/appquit.cxx
sfx2/source/appl/appserv.cxx
sfx2/source/appl/childwin.cxx
sfx2/source/appl/fileobj.cxx
sfx2/source/appl/fileobj.hxx
sfx2/source/appl/workwin.cxx
sfx2/source/control/dispatch.cxx
sfx2/source/control/macro.cxx
sfx2/source/control/objface.cxx
sfx2/source/control/request.cxx
sfx2/source/control/shell.cxx
sfx2/source/control/statcach.cxx
sfx2/source/dialog/dinfdlg.cxx
sfx2/source/dialog/dockwin.cxx
sfx2/source/dialog/mailmodel.cxx
sfx2/source/dialog/mailmodelapi.cxx
sfx2/source/dialog/mgetempl.cxx
sfx2/source/dialog/splitwin.cxx
sfx2/source/dialog/styledlg.cxx
sfx2/source/dialog/tabdlg.cxx
sfx2/source/dialog/templdlg.cxx
sfx2/source/dialog/tplcitem.cxx
sfx2/source/dialog/tplpitem.cxx
sfx2/source/doc/doctempl.cxx
sfx2/source/doc/docvor.cxx
sfx2/source/doc/new.cxx
sfx2/source/doc/objcont.cxx
sfx2/source/doc/objserv.cxx
sfx2/source/doc/objxtor.cxx
sfx2/source/inc/appdata.hxx
sfx2/source/inc/helpid.hrc
sfx2/source/inc/sfxlocal.hrc
sfx2/source/inc/statcach.hxx
sfx2/source/inc/templdgi.hxx
sfx2/source/inc/virtmenu.hxx
sfx2/source/inc/workwin.hxx
sfx2/source/menu/mnumgr.cxx
sfx2/source/menu/virtmenu.cxx
sfx2/source/statbar/stbitem.cxx
sfx2/source/view/frame.cxx
sfx2/source/view/frame2.cxx
sfx2/source/view/orgmgr.cxx
sfx2/source/view/printer.cxx
sfx2/source/view/prnmon.cxx
sfx2/source/view/sfxbasecontroller.cxx
sfx2/source/view/viewfrm.cxx
sfx2/source/view/viewfrm2.cxx
sfx2/source/view/viewprn.cxx
sfx2/source/view/viewsh.cxx
svx/inc/svx/svditer.hxx
svx/source/dialog/sdstring.src
svx/source/form/fmpage.cxx
svx/source/form/formcontroller.cxx
svx/source/svdraw/svdcrtv.cxx
svx/source/svdraw/svditer.cxx
svx/source/svdraw/svdview.cxx
xmloff/source/forms/elementimport.cxx
Diffstat (limited to 'sfx2/source/appl/fileobj.cxx')
-rwxr-xr-x[-rw-r--r--] | sfx2/source/appl/fileobj.cxx | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index 0dff92fedf50..b16b673136ec 100644..100755 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -49,7 +49,7 @@ #include <comphelper/processfactory.hxx> #include <sfx2/linkmgr.hxx> #include <sfx2/opengrf.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "fileobj.hxx" #include "app.hrc" @@ -82,9 +82,9 @@ struct Impl_DownLoadData SvFileObject::SvFileObject() : pDownLoadData( NULL ), pOldParent( NULL ), nType( FILETYPE_TEXT ) { - bLoadAgain = TRUE; + bLoadAgain = sal_True; bSynchron = bLoadError = bWaitForData = bDataReady = bNativFormat = - bClearMedium = bStateChangeCalled = bInCallDownLoad = FALSE; + bClearMedium = bStateChangeCalled = bInCallDownLoad = sal_False; } @@ -100,11 +100,11 @@ SvFileObject::~SvFileObject() } -BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData, +sal_Bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData, const String & rMimeType, - BOOL bGetSynchron ) + sal_Bool bGetSynchron ) { - ULONG nFmt = SotExchange::GetFormatStringId( rMimeType ); + sal_uIntPtr nFmt = SotExchange::GetFormatStringId( rMimeType ); switch( nType ) { case FILETYPE_TEXT: @@ -130,7 +130,7 @@ BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData, // If the native format is reqested, has to be reset at the // end of the flag. Is solely in the sw/ndgrf.cxx used when // the link is removed form GraphicNode. - BOOL bOldNativFormat = bNativFormat; + sal_Bool bOldNativFormat = bNativFormat; // If about to print, waiting for the data to be available if( bGetSynchron ) @@ -146,7 +146,7 @@ BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData, Application::Reschedule(); xMed = xTmpMed; - bClearMedium = TRUE; + bClearMedium = sal_True; } } @@ -204,7 +204,7 @@ BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData, if( xMed.Is() && !bSynchron && bClearMedium ) { xMed.Clear(); - bClearMedium = FALSE; + bClearMedium = sal_False; } } } @@ -217,10 +217,10 @@ BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData, return sal_True/*0 != aTypeList.Count()*/; } -BOOL SvFileObject::Connect( sfx2::SvBaseLink* pLink ) +sal_Bool SvFileObject::Connect( sfx2::SvBaseLink* pLink ) { if( !pLink || !pLink->GetLinkManager() ) - return FALSE; + return sal_False; // Test if not another link of the same connection already exists pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sFileNm, 0, &sFilter ); @@ -231,7 +231,7 @@ BOOL SvFileObject::Connect( sfx2::SvBaseLink* pLink ) if( pShell.Is() ) { if( pShell->IsAbortingImport() ) - return FALSE; + return sal_False; if( pShell->GetMedium() ) sReferer = pShell->GetMedium()->GetName(); @@ -255,24 +255,24 @@ BOOL SvFileObject::Connect( sfx2::SvBaseLink* pLink ) break; default: - return FALSE; + return sal_False; } SetUpdateTimeout( 0 ); // and now register by this or other found Pseudo-Object AddDataAdvise( pLink, SotExchange::GetFormatMimeType( pLink->GetContentType()), 0 ); - return TRUE; + return sal_True; } -BOOL SvFileObject::LoadFile_Impl() +sal_Bool SvFileObject::LoadFile_Impl() { // We are still at Loading!! if( bWaitForData || !bLoadAgain || xMed.Is() || pDownLoadData ) - return FALSE; + return sal_False; // at the moment on the current DocShell - xMed = new SfxMedium( sFileNm, STREAM_STD_READ, TRUE ); + xMed = new SfxMedium( sFileNm, STREAM_STD_READ, sal_True ); SvLinkSource::StreamToLoadFrom aStreamToLoadFrom = getStreamToLoadFrom(); xMed->setStreamToLoadFrom( @@ -283,14 +283,14 @@ BOOL SvFileObject::LoadFile_Impl() if( !bSynchron ) { - bLoadAgain = bDataReady = bInNewData = FALSE; - bWaitForData = TRUE; + bLoadAgain = bDataReady = bInNewData = sal_False; + bWaitForData = sal_True; SfxMediumRef xTmpMed = xMed; xMed->SetDataAvailableLink( STATIC_LINK( this, SvFileObject, LoadGrfNewData_Impl ) ); - bInCallDownLoad = TRUE; + bInCallDownLoad = sal_True; xMed->DownLoad( STATIC_LINK( this, SvFileObject, LoadGrfReady_Impl ) ); - bInCallDownLoad = FALSE; + bInCallDownLoad = sal_False; bClearMedium = !xMed.Is(); if( bClearMedium ) @@ -298,24 +298,24 @@ BOOL SvFileObject::LoadFile_Impl() return bDataReady; } - bWaitForData = TRUE; - bDataReady = bInNewData = FALSE; + bWaitForData = sal_True; + bDataReady = bInNewData = sal_False; xMed->DownLoad(); bLoadAgain = !xMed->IsRemote(); - bWaitForData = FALSE; + bWaitForData = sal_False; // Graphic is finished, also send DataChanged of the Status change: SendStateChg_Impl( xMed->GetInStream() && xMed->GetInStream()->GetError() ? sfx2::LinkManager::STATE_LOAD_ERROR : sfx2::LinkManager::STATE_LOAD_OK ); - return TRUE; + return sal_True; } -BOOL SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream ) +sal_Bool SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream ) { GraphicFilter* pGF = GraphicFilter::GetGraphicFilter(); - const USHORT nFilter = sFilter.Len() && pGF->GetImportFormatCount() + const sal_uInt16 nFilter = sFilter.Len() && pGF->GetImportFormatCount() ? pGF->GetImportFormatNumber( sFilter ) : GRFILTER_FORMAT_DONTKNOW; @@ -353,10 +353,10 @@ BOOL SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream ) xMed->SetDataAvailableLink( Link() ); // xMed->SetDoneLink( Link() ); delete pDownLoadData, pDownLoadData = 0; - bDataReady = TRUE; - bWaitForData = FALSE; + bDataReady = sal_True; + bWaitForData = sal_False; } - else if( FALSE ) + else if( sal_False ) { // Set up Timer, to return back pDownLoadData->aTimer.Start(); @@ -506,14 +506,14 @@ void SvFileObject::Edit( Window* pParent, sfx2::SvBaseLink* pLink, const Link& r IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG ) { // When we come form here there it can not be an error no more. - pThis->bLoadError = FALSE; - pThis->bWaitForData = FALSE; - pThis->bInCallDownLoad = FALSE; + pThis->bLoadError = sal_False; + pThis->bWaitForData = sal_False; + pThis->bInCallDownLoad = sal_False; if( !pThis->bInNewData && !pThis->bDataReady ) { // Graphic is finished, also send DataChanged from Status change - pThis->bDataReady = TRUE; + pThis->bDataReady = sal_True; pThis->SendStateChg_Impl( sfx2::LinkManager::STATE_LOAD_OK ); // and then send the data again @@ -522,7 +522,7 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG ) if( pThis->bDataReady ) { - pThis->bLoadAgain = TRUE; + pThis->bLoadAgain = sal_True; if( pThis->xMed.Is() ) { pThis->xMed->SetDataAvailableLink( Link() ); @@ -553,8 +553,8 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG ) if( pThis->bInNewData ) return 0; - pThis->bInNewData = TRUE; - pThis->bLoadError = FALSE; + pThis->bInNewData = sal_True; + pThis->bLoadError = sal_False; if( !pThis->pDownLoadData ) { @@ -583,7 +583,7 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG ) // a DataReady in DataChanged? else if( pThis->bWaitForData && pThis->pDownLoadData ) { - pThis->bLoadError = TRUE; + pThis->bLoadError = sal_True; } } @@ -593,7 +593,7 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG ) pThis->SendStateChg_Impl( pStrm->GetError() ? sfx2::LinkManager::STATE_LOAD_ERROR : sfx2::LinkManager::STATE_LOAD_OK ); } - pThis->bInNewData = FALSE; + pThis->bInNewData = sal_False; return 0; } @@ -632,28 +632,28 @@ IMPL_LINK( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) ERRCODE_SO_PENDING if it has not been completely read ERRCODE_SO_FALSE otherwise */ -BOOL SvFileObject::IsPending() const +sal_Bool SvFileObject::IsPending() const { return FILETYPE_GRF == nType && !bLoadError && ( pDownLoadData || bWaitForData ); } -BOOL SvFileObject::IsDataComplete() const +sal_Bool SvFileObject::IsDataComplete() const { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( FILETYPE_GRF != nType ) - bRet = TRUE; + bRet = sal_True; else if( !bLoadError && ( !bWaitForData && !pDownLoadData )) { SvFileObject* pThis = (SvFileObject*)this; if( bDataReady || ( bSynchron && pThis->LoadFile_Impl() && xMed.Is() ) ) - bRet = TRUE; + bRet = sal_True; else { INetURLObject aUrl( sFileNm ); if( aUrl.HasError() || INET_PROT_NOT_VALID == aUrl.GetProtocol() ) - bRet = TRUE; + bRet = sal_True; } } return bRet; @@ -667,8 +667,8 @@ void SvFileObject::CancelTransfers() if( !bDataReady ) { // Do not set-up again - bLoadAgain = FALSE; - bDataReady = bLoadError = bWaitForData = TRUE; + bLoadAgain = sal_False; + bDataReady = bLoadError = bWaitForData = sal_True; SendStateChg_Impl( sfx2::LinkManager::STATE_LOAD_ABORT ); } } @@ -682,7 +682,7 @@ void SvFileObject::SendStateChg_Impl( sfx2::LinkManager::LinkState nState ) aAny <<= rtl::OUString::valueOf( (sal_Int32)nState ); DataChanged( SotExchange::GetFormatName( sfx2::LinkManager::RegisterStatusInfoId()), aAny ); - bStateChangeCalled = TRUE; + bStateChangeCalled = sal_True; } } |