update dev300-m58
[ooovba.git] / svx / source / svxlink / fileobj.cxx
bloba97efb3d705953a5dfbe66a1fafdf58a5dad5130
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fileobj.cxx,v $
10 * $Revision: 1.24 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_svx.hxx"
33 #include <vcl/wrkwin.hxx>
34 #include <vcl/msgbox.hxx>
35 #include <tools/urlobj.hxx>
36 #include <tools/stream.hxx>
37 #include <sot/formats.hxx>
38 #include <svtools/filter.hxx>
39 #include <sfx2/lnkbase.hxx>
40 #include <sfx2/app.hxx>
41 #include <sfx2/progress.hxx>
42 #ifndef _SFX_INTERNO_HXX
43 //#include <sfx2/interno.hxx>
44 #endif
45 #include <sfx2/docfilt.hxx>
46 #include <sfx2/filedlghelper.hxx>
47 #include <sot/exchange.hxx>
48 #include <com/sun/star/uno/Any.hxx>
49 #include <com/sun/star/uno/Sequence.hxx>
50 #include <sfx2/docfac.hxx>
51 #include <com/sun/star/document/XTypeDetection.hpp>
52 #include <comphelper/mediadescriptor.hxx>
53 #include <comphelper/processfactory.hxx>
55 #include "fileobj.hxx"
56 #include "linkmgr.hxx"
57 #include <svx/dialmgr.hxx>
58 #include <svx/dialogs.hrc>
59 #include "xoutbmp.hxx"
60 #include "opengrf.hxx"
61 #include "impgrf.hxx"
63 namespace css = ::com::sun::star;
65 #define FILETYPE_TEXT 1
66 #define FILETYPE_GRF 2
67 #define FILETYPE_OBJECT 3
69 struct Impl_DownLoadData
71 Graphic aGrf;
72 Timer aTimer;
74 Impl_DownLoadData( const Link& rLink )
76 aTimer.SetTimeout( 100 );
77 aTimer.SetTimeoutHdl( rLink );
78 aGrf.SetDefaultType();
80 ~Impl_DownLoadData()
82 aTimer.Stop();
86 // --------------------------------------------------------------------------
89 SvFileObject::SvFileObject() :
90 pDownLoadData( NULL ), pOldParent( NULL ), nType( FILETYPE_TEXT )
92 bLoadAgain = TRUE;
93 bSynchron = bLoadError = bWaitForData = bDataReady = bNativFormat =
94 bClearMedium = bStateChangeCalled = bInCallDownLoad = FALSE;
98 SvFileObject::~SvFileObject()
100 if ( xMed.Is() )
102 xMed->SetDataAvailableLink( Link() );
103 xMed->SetDoneLink( Link() );
104 xMed.Clear();
106 delete pDownLoadData;
110 BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
111 const String & rMimeType,
112 BOOL bGetSynchron )
114 ULONG nFmt = SotExchange::GetFormatStringId( rMimeType );
115 switch( nType )
117 case FILETYPE_TEXT:
118 if( FORMAT_FILE == nFmt )
120 // das Medium muss in der Applikation geoffnet werden, um die
121 // relativen Datei Links aufzuloesen!!!! Wird ueber den
122 // LinkManager und damit von dessen Storage erledigt.
123 rData <<= rtl::OUString( sFileNm );
126 ===========================================================================
127 JP 28.02.96: noch eine Baustelle:
128 Idee: hier das Medium und die DocShell anlegen, Doc laden
129 und ueber OLE-SS (GetObj(...)) den Bereich als
130 PseudoObject erfragen. Dieses mit den Daten oder
131 dessen Daten verschicken.
133 ===========================================================================
135 SfxMedium aMed( aFileNm.GetFull(), STREAM_READ, TRUE );
136 aMed.DownLoad(); // nur mal das Medium anfassen (DownLoaden)
138 if( aMed.IsStorage() )
139 pSvData->SetData( SvStorageRef( aMed.GetStorage() ),
140 TRANSFER_COPY );
141 else
143 SvStream* pStream = aMed.GetInStream();
144 if( !pStream )
145 return FALSE;
147 UINT32 nLen = pStream->Seek( STREAM_SEEK_TO_END );
148 pStream->Seek( STREAM_SEEK_TO_BEGIN );
150 void* pData = SvMemAlloc( nLen );
151 pStream->Read( pData, nLen );
152 pSvData->SetData( pData, nLen, TRANSFER_MOVE );
156 break;
158 case FILETYPE_GRF:
159 if( !bLoadError )
161 SfxMediumRef xTmpMed;
163 if( FORMAT_GDIMETAFILE == nFmt || FORMAT_BITMAP == nFmt ||
164 SOT_FORMATSTR_ID_SVXB == nFmt )
166 Graphic aGrf;
168 //JP 15.07.98: Bug 52959
169 // falls das Nativformat doch erwuenscht ist, muss am
170 // Ende das Flag zurueckgesetzt werden.
171 // wird einzig und allein im sw/ndgrf.cxx benutzt, wenn der Link vom
172 // GraphicNode entfernt wird.
173 BOOL bOldNativFormat = bNativFormat;
174 //!!?? bNativFormat = 0 != (ASPECT_ICON & pSvData->GetAspect());
176 // falls gedruckt werden soll, warten wir bis die
177 // Daten vorhanden sind
178 if( bGetSynchron )
180 // testhalber mal ein LoadFile rufen um das nach-
181 // laden ueberahaupt anzustossen
182 if( !xMed.Is() )
183 LoadFile_Impl();
185 if( !bInCallDownLoad )
187 xTmpMed = xMed;
188 while( bWaitForData )
189 Application::Reschedule();
191 xMed = xTmpMed;
192 bClearMedium = TRUE;
196 if( pDownLoadData ||
197 ( !bWaitForData && ( xMed.Is() || // wurde als URL geladen
198 ( bSynchron && LoadFile_Impl() && xMed.Is() ) )) )
200 // falls
202 // falls es uebers Internet gesogen wurde, nicht
203 // wieder versuchen
204 if( !bGetSynchron )
205 bLoadAgain = !xMed->IsRemote();
206 bLoadError = !GetGraphic_Impl( aGrf, xMed->GetInStream() );
208 else if( !LoadFile_Impl() ||
209 !GetGraphic_Impl( aGrf, xMed.Is() ? xMed->GetInStream() : 0 ))
211 if( !xMed.Is() )
212 break;
213 aGrf.SetDefaultType();
216 if( SOT_FORMATSTR_ID_SVXB != nFmt )
217 nFmt = (bLoadError || GRAPHIC_BITMAP == aGrf.GetType())
218 ? FORMAT_BITMAP
219 : FORMAT_GDIMETAFILE;
221 SvMemoryStream aMemStm( 0, 65535 );
222 switch ( nFmt )
224 case SOT_FORMATSTR_ID_SVXB:
225 if( GRAPHIC_NONE != aGrf.GetType() )
227 aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
228 aMemStm << aGrf;
230 break;
232 case FORMAT_BITMAP:
233 if( !aGrf.GetBitmap().IsEmpty())
234 aMemStm << aGrf.GetBitmap();
235 break;
237 default:
238 if( aGrf.GetGDIMetaFile().GetActionCount() )
240 GDIMetaFile aMeta( aGrf.GetGDIMetaFile() );
241 aMeta.Write( aMemStm );
244 rData <<= css::uno::Sequence< sal_Int8 >( (sal_Int8*) aMemStm.GetData(),
245 aMemStm.Seek( STREAM_SEEK_TO_END ) );
247 bNativFormat = bOldNativFormat;
249 // alles fertig?
250 if( xMed.Is() && !bSynchron && bClearMedium )
252 xMed.Clear();
253 bClearMedium = FALSE;
257 break;
258 case FILETYPE_OBJECT:
259 // TODO/LATER: possibility to insert a new object
260 rData <<= rtl::OUString( sFileNm );
261 break;
263 return sal_True/*0 != aTypeList.Count()*/;
269 BOOL SvFileObject::Connect( sfx2::SvBaseLink* pLink )
271 if( !pLink || !pLink->GetLinkManager() )
272 return FALSE;
274 // teste doch mal, ob nicht ein anderer Link mit der gleichen
275 // Verbindung schon existiert
276 pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sFileNm, 0, &sFilter );
278 if( OBJECT_CLIENT_GRF == pLink->GetObjType() )
280 SfxObjectShellRef pShell = pLink->GetLinkManager()->GetPersist();
281 if( pShell.Is() )
283 if( pShell->IsAbortingImport() )
284 return FALSE;
286 if( pShell->GetMedium() )
287 sReferer = pShell->GetMedium()->GetName();
291 switch( pLink->GetObjType() )
293 case OBJECT_CLIENT_GRF:
294 nType = FILETYPE_GRF;
295 bSynchron = pLink->IsSynchron();
296 break;
298 case OBJECT_CLIENT_FILE:
299 nType = FILETYPE_TEXT;
300 break;
302 case OBJECT_CLIENT_OLE:
303 nType = FILETYPE_OBJECT;
304 // TODO/LATER: introduce own type to be used for exchanging
305 break;
307 default:
308 return FALSE;
311 SetUpdateTimeout( 0 );
313 // und jetzt bei diesem oder gefundenem Pseudo-Object anmelden
314 AddDataAdvise( pLink, SotExchange::GetFormatMimeType( pLink->GetContentType()), 0 );
315 return TRUE;
319 BOOL SvFileObject::LoadFile_Impl()
321 // wir sind noch im Laden!!
322 if( bWaitForData || !bLoadAgain || xMed.Is() || pDownLoadData )
323 return FALSE;
325 // z.Z. nur auf die aktuelle DocShell
326 xMed = new SfxMedium( sFileNm, STREAM_STD_READ, TRUE );
327 SvLinkSource::StreamToLoadFrom aStreamToLoadFrom =
328 getStreamToLoadFrom();
329 xMed->setStreamToLoadFrom(
330 aStreamToLoadFrom.m_xInputStreamToLoadFrom,
331 aStreamToLoadFrom.m_bIsReadOnly);
332 // setStreamToLoadFrom(0,0);
333 // Keinen Eintrag im Roter Button Menu
334 xMed->SetDontCreateCancellable();
335 if( sReferer.Len() )
336 xMed->SetReferer( sReferer );
338 if( !bSynchron )
340 bLoadAgain = bDataReady = bInNewData = FALSE;
341 bWaitForData = TRUE;
343 SfxMediumRef xTmpMed = xMed;
344 xMed->SetDataAvailableLink( STATIC_LINK( this, SvFileObject, LoadGrfNewData_Impl ) );
345 bInCallDownLoad = TRUE;
346 xMed->DownLoad( STATIC_LINK( this, SvFileObject, LoadGrfReady_Impl ) );
347 bInCallDownLoad = FALSE;
349 bClearMedium = !xMed.Is();
350 if( bClearMedium )
351 xMed = xTmpMed; // falls gleich im DownLoad schon schluss ist
352 return bDataReady;
355 bWaitForData = TRUE;
356 bDataReady = bInNewData = FALSE;
357 xMed->DownLoad();
358 bLoadAgain = !xMed->IsRemote();
359 bWaitForData = FALSE;
361 // Grafik ist fertig, also DataChanged von der Statusaederung schicken:
362 SendStateChg_Impl( xMed->GetInStream() && xMed->GetInStream()->GetError()
363 ? STATE_LOAD_ERROR : STATE_LOAD_OK );
365 return TRUE;
369 BOOL SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream )
371 GraphicFilter* pGF = GetGrfFilter();
373 const USHORT nFilter = sFilter.Len() && pGF->GetImportFormatCount()
374 ? pGF->GetImportFormatNumber( sFilter )
375 : GRFILTER_FORMAT_DONTKNOW;
377 String aEmptyStr;
378 int nRes;
380 // vermeiden, dass ein native Link angelegt wird
381 if( ( !pStream || !pDownLoadData ) && !rGrf.IsLink() &&
382 !rGrf.GetContext() && !bNativFormat )
383 rGrf.SetLink( GfxLink() );
385 if( !pStream )
386 nRes = xMed.Is() ? GRFILTER_OPENERROR
387 : pGF->ImportGraphic( rGrf, INetURLObject(sFileNm),
388 nFilter );
389 else if( !pDownLoadData )
391 pStream->Seek( STREAM_SEEK_TO_BEGIN );
392 nRes = pGF->ImportGraphic( rGrf, aEmptyStr, *pStream, nFilter );
394 else
396 nRes = pGF->ImportGraphic( pDownLoadData->aGrf, aEmptyStr,
397 *pStream, nFilter );
399 if( pDownLoadData )
401 rGrf = pDownLoadData->aGrf;
402 if( GRAPHIC_NONE == rGrf.GetType() )
403 rGrf.SetDefaultType();
406 if( !pDownLoadData->aGrf.GetContext() )
408 xMed->SetDataAvailableLink( Link() );
409 // xMed->SetDoneLink( Link() );
410 delete pDownLoadData, pDownLoadData = 0;
411 bDataReady = TRUE;
412 bWaitForData = FALSE;
414 else if( FALSE )
416 // Timer aufsetzen, um zurueck zukehren
417 pDownLoadData->aTimer.Start();
422 if( pStream && ERRCODE_IO_PENDING == pStream->GetError() )
423 pStream->ResetError();
425 #ifndef PRODUCT
426 if( nRes )
428 if( xMed.Is() && !pStream )
430 DBG_WARNING3( "GrafikFehler [%d] - [%s] URL[%s]",
431 nRes,
432 xMed->GetPhysicalName().GetBuffer(),
433 sFileNm.GetBuffer() );
435 else
437 DBG_WARNING2( "GrafikFehler [%d] - [%s]",
438 nRes, sFileNm.GetBuffer() );
441 #endif
443 return GRFILTER_OK == nRes;
446 /** detect the filter of the given file
448 @param _rURL
449 specifies the URL of the file which filter is to detected.<br/>
450 If the URL doesn't denote a valid (existent and accessible) file, the
451 request is silently dropped.
453 String impl_getFilter( const String& _rURL )
455 String sFilter;
456 if ( _rURL.Len() == 0 )
457 return sFilter;
461 css::uno::Reference< ::com::sun::star::document::XTypeDetection > xTypeDetection(
462 ::comphelper::getProcessServiceFactory()->createInstance(
463 ::rtl::OUString::createFromAscii("com.sun.star.document.TypeDetection") ),
464 css::uno::UNO_QUERY );
465 if ( xTypeDetection.is() )
467 ::comphelper::MediaDescriptor aDescr;
468 aDescr[ ::comphelper::MediaDescriptor::PROP_URL() ] <<= ::rtl::OUString( _rURL );
469 css::uno::Sequence< css::beans::PropertyValue > aDescrList =
470 aDescr.getAsConstPropertyValueList();
471 ::rtl::OUString sType = xTypeDetection->queryTypeByDescriptor( aDescrList, sal_True );
472 if ( sType.getLength() )
474 css::uno::Reference< css::container::XNameAccess > xTypeCont( xTypeDetection,
475 css::uno::UNO_QUERY );
476 if ( xTypeCont.is() )
478 ::comphelper::SequenceAsHashMap lTypeProps( xTypeCont->getByName( sType ) );
479 sFilter = lTypeProps.getUnpackedValueOrDefault(
480 ::rtl::OUString::createFromAscii("PreferredFilter"), ::rtl::OUString() );
485 catch( const css::uno::Exception& )
489 return sFilter;
492 void SvFileObject::Edit( Window* pParent, sfx2::SvBaseLink* pLink, const Link& rEndEditHdl )
494 aEndEditLink = rEndEditHdl;
495 String sFile, sRange, sTmpFilter;
496 if( pLink && pLink->GetLinkManager() )
498 pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sFile, &sRange, &sTmpFilter );
500 switch( pLink->GetObjType() )
502 case OBJECT_CLIENT_GRF:
504 nType = FILETYPE_GRF; // falls noch nicht gesetzt
506 SvxOpenGraphicDialog aDlg(ResId(RID_SVXSTR_EDITGRFLINK, DIALOG_MGR()));
507 aDlg.EnableLink(sal_False);
508 aDlg.SetPath( sFile, sal_True );
509 aDlg.SetCurrentFilter( sTmpFilter );
511 if( !aDlg.Execute() )
513 sFile = aDlg.GetPath();
514 sFile += ::sfx2::cTokenSeperator;
515 sFile += ::sfx2::cTokenSeperator;
516 sFile += aDlg.GetCurrentFilter();
518 if ( aEndEditLink.IsSet() )
519 aEndEditLink.Call( &sFile );
521 else
522 sFile.Erase();
524 break;
526 case OBJECT_CLIENT_OLE:
528 nType = FILETYPE_OBJECT; // if not set already
529 pOldParent = Application::GetDefDialogParent();
530 Application::SetDefDialogParent( pParent );
532 ::sfx2::FileDialogHelper* pFileDlg =
533 pLink->GetFileDialog( (SFXWB_INSERT | WB_3DLOOK), String() );
534 pFileDlg->StartExecuteModal( LINK( this, SvFileObject, DialogClosedHdl ) );
536 break;
538 case OBJECT_CLIENT_FILE:
540 nType = FILETYPE_TEXT; // if not set already
541 pOldParent = Application::GetDefDialogParent();
542 Application::SetDefDialogParent( pParent );
544 String sFactory;
545 SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist();
546 if ( pShell )
547 sFactory = pShell->GetFactory().GetFactoryName();
549 ::sfx2::FileDialogHelper* pFileDlg =
550 pLink->GetFileDialog( (SFXWB_INSERT | WB_3DLOOK), sFactory );
551 pFileDlg->StartExecuteModal( LINK( this, SvFileObject, DialogClosedHdl ) );
553 break;
555 default:
556 sFile.Erase();
561 IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG )
563 // wenn wir von hier kommen, kann es kein Fehler mehr sein
564 pThis->bLoadError = FALSE;
565 pThis->bWaitForData = FALSE;
566 pThis->bInCallDownLoad = FALSE;
568 if( !pThis->bInNewData && !pThis->bDataReady )
570 // Grafik ist fertig, also DataChanged von der Status-
571 // aederung schicken:
572 pThis->bDataReady = TRUE;
573 pThis->SendStateChg_Impl( STATE_LOAD_OK );
575 // und dann nochmal die Daten senden
576 pThis->NotifyDataChanged();
579 if( pThis->bDataReady )
581 pThis->bLoadAgain = TRUE;
582 if( pThis->xMed.Is() )
584 pThis->xMed->SetDataAvailableLink( Link() );
585 pThis->xMed->SetDoneLink( Link() );
587 Application::PostUserEvent(
588 STATIC_LINK( pThis, SvFileObject, DelMedium_Impl ),
589 new SfxMediumRef( pThis->xMed ));
590 pThis->xMed.Clear();
592 if( pThis->pDownLoadData )
593 delete pThis->pDownLoadData, pThis->pDownLoadData = 0;
596 return 0;
599 IMPL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef*, pDelMed )
601 (void)pThis;
602 delete pDelMed;
603 return 0;
606 IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
608 // wenn wir von hier kommen, kann es kein Fehler mehr sein
609 if( pThis->bInNewData )
610 return 0;
612 pThis->bInNewData = TRUE;
613 pThis->bLoadError = FALSE;
615 if( !pThis->pDownLoadData )
617 pThis->pDownLoadData = new Impl_DownLoadData(
618 STATIC_LINK( pThis, SvFileObject, LoadGrfNewData_Impl ) );
620 // Null-Link setzen, damit keine temporaeren Grafiken
621 // rausgeswapt werden; der Filter prueft, ob schon
622 // ein Link gesetzt ist => falls dies zutrifft, wird
623 // _kein_ neuer Link gesetzt; der Link muss hier gesetzt werden,
624 // (bevor das erste Mal gefiltert wird), um zu verhindern,
625 // dass der Kontext zurueckgesetzt wird (aynchrones Laden)
626 if( !pThis->bNativFormat )
628 static GfxLink aDummyLink;
629 pThis->pDownLoadData->aGrf.SetLink( aDummyLink );
633 pThis->NotifyDataChanged();
635 SvStream* pStrm = pThis->xMed.Is() ? pThis->xMed->GetInStream() : 0;
636 if( pStrm && pStrm->GetError() )
638 if( ERRCODE_IO_PENDING == pStrm->GetError() )
639 pStrm->ResetError();
641 // im DataChanged ein DataReady?
642 else if( pThis->bWaitForData && pThis->pDownLoadData )
644 pThis->bLoadError = TRUE;
648 if( pThis->bDataReady )
650 // Grafik ist fertig, also DataChanged von der Status-
651 // aederung schicken:
652 pThis->SendStateChg_Impl( pStrm->GetError() ? STATE_LOAD_ERROR
653 : STATE_LOAD_OK );
656 pThis->bInNewData = FALSE;
657 return 0;
660 IMPL_LINK( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
662 String sFile;
663 Application::SetDefDialogParent( pOldParent );
665 if ( FILETYPE_TEXT == nType || FILETYPE_OBJECT == nType )
667 if ( _pFileDlg && _pFileDlg->GetError() == ERRCODE_NONE )
669 String sURL( _pFileDlg->GetPath() );
670 sFile = sURL;
671 sFile += ::sfx2::cTokenSeperator;
672 sFile += ::sfx2::cTokenSeperator;
673 sFile += impl_getFilter( sURL );
676 else
678 DBG_ERRORFILE( "SvFileObject::DialogClosedHdl(): wrong file type" );
681 if ( aEndEditLink.IsSet() )
682 aEndEditLink.Call( &sFile );
683 return 0;
686 /* [Beschreibung]
688 Die Methode stellt fest, ob aus einem DDE-Object die Daten gelesen
689 werden kann.
690 Zurueckgegeben wird:
691 ERRCODE_NONE wenn sie komplett gelesen wurde
692 ERRCODE_SO_PENDING wenn sie noch nicht komplett gelesen wurde
693 ERRCODE_SO_FALSE sonst
695 BOOL SvFileObject::IsPending() const
697 return FILETYPE_GRF == nType && !bLoadError &&
698 ( pDownLoadData || bWaitForData );
700 BOOL SvFileObject::IsDataComplete() const
702 BOOL bRet = FALSE;
703 if( FILETYPE_GRF != nType )
704 bRet = TRUE;
705 else if( !bLoadError && ( !bWaitForData && !pDownLoadData ))
707 SvFileObject* pThis = (SvFileObject*)this;
708 if( bDataReady ||
709 ( bSynchron && pThis->LoadFile_Impl() && xMed.Is() ) )
710 bRet = TRUE;
711 else
713 INetURLObject aUrl( sFileNm );
714 if( aUrl.HasError() ||
715 INET_PROT_NOT_VALID == aUrl.GetProtocol() )
716 bRet = TRUE;
719 return bRet;
724 void SvFileObject::CancelTransfers()
726 if( xMed.Is() )
727 xMed->CancelTransfers();
729 // und aus dem Cache austragen, wenn man mitten im Laden ist
730 if( !bDataReady )
732 // nicht noch mal aufsetzen
733 bLoadAgain = FALSE;
734 bDataReady = bLoadError = bWaitForData = TRUE;
735 SendStateChg_Impl( STATE_LOAD_ABORT );
740 void SvFileObject::SetTransferPriority( USHORT )
745 void SvFileObject::SendStateChg_Impl( LinkState nState )
747 if( !bStateChangeCalled && HasDataLinks() )
749 css::uno::Any aAny;
750 aAny <<= rtl::OUString::valueOf( (sal_Int32)nState );
751 DataChanged( SotExchange::GetFormatName(
752 SvxLinkManager::RegisterStatusInfoId()), aAny );
753 bStateChangeCalled = TRUE;