summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2000-10-09 09:41:30 +0000
committerMathias Bauer <mba@openoffice.org>2000-10-09 09:41:30 +0000
commit8546018842e3b4c922eeda96382f37d502064e8c (patch)
tree7ab1e051bf59e85ad65309cecd8f83b9f180a3c5
parentb56533d9d4b63e8672b7a43cdd2331cd04e8d31e (diff)
IsStorage exchanged by GetStorage
-rw-r--r--sfx2/source/appl/app.cxx6
-rw-r--r--sfx2/source/appl/appopen.cxx12
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx16
-rw-r--r--sfx2/source/doc/docfile.cxx29
-rw-r--r--sfx2/source/doc/docinf.cxx6
-rw-r--r--sfx2/source/doc/objcont.cxx6
-rw-r--r--sfx2/source/doc/objuno.cxx16
7 files changed, 46 insertions, 45 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 2b3e8017cf59..7227542288d7 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: app.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: mba $ $Date: 2000-10-04 10:50:20 $
+ * last change: $Author: mba $ $Date: 2000-10-09 10:41:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -974,7 +974,7 @@ sal_uInt32 SfxApplication::DetectFilter(
if( !pFilter)
{
- if ( !rMedium.IsRemote() && rMedium.IsStorage() )
+ if ( !rMedium.IsRemote() )
{
SvStorageRef aStor = rMedium.GetStorage();
if ( !aStor.Is() )
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 9da8b73b2dd0..036248644174 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: appopen.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mba $ $Date: 2000-10-04 16:07:22 $
+ * last change: $Author: mba $ $Date: 2000-10-09 10:41:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -342,7 +342,7 @@ ULONG CheckPasswd_Impl
{
ULONG nRet=0;
- if( ( !pFile->GetFilter() || pFile->GetFilter()->UsesStorage() ) && pFile->IsStorage() )
+ if( ( !pFile->GetFilter() || pFile->GetFilter()->UsesStorage() ) )
{
SvStorageRef aRef = pFile->GetStorage();
if(aRef.Is())
@@ -418,9 +418,7 @@ ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFil
const SfxFilter* pFilter = NULL;
SfxMedium aMedium( rFileName, ( STREAM_READ | STREAM_SHARE_DENYNONE ), FALSE );
- if ( aMedium.IsStorage() )
- aMedium.GetStorage();
- else
+ if ( !aMedium.GetStorage() )
aMedium.GetInStream();
if ( aMedium.GetError() )
@@ -510,7 +508,7 @@ ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFil
void SfxApplication::LoadEa_Impl(SfxMedium &rMedium, SfxObjectShell& rObj)
{
- if ( !rMedium.IsStorage() )
+ if ( !rMedium.GetStorage() )
return;
const SfxFilter *pFilter = rMedium.GetFilter();
if ( !pFilter || !pFilter->IsOwnFormat() )
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 9f6aa3094670..9c2769fb2383 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fltfnc.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: mhu $ $Date: 2000-09-28 12:22:53 $
+ * last change: $Author: mba $ $Date: 2000-10-09 10:41:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2316,13 +2316,9 @@ sal_uInt32 SfxFilterMatcher::GuessFilterIgnoringContent(
{
// dann ueber Storage CLSID
// Remote macht das keinen Sinn, wenn der Download noch la"uft
- if( rMedium.IsStorage() )
- {
- SvStorageRef aStor = rMedium.GetStorage();
- if ( !aStor.Is() )
- return ERRCODE_IO_GENERAL;
+ SvStorageRef aStor = rMedium.GetStorage();
+ if ( aStor.Is() )
pFilter = GetFilter4ClipBoardId( aStor->GetFormat(), nMust, nDont );
- }
// Als naechstes ueber Extended Attributes pruefen
String aNewFileName;
@@ -2580,7 +2576,7 @@ sal_uInt32 SfxFilterMatcher::GuessFilter(
if ( !rMedium.IsDownloadDone_Impl() )
return ERRCODE_IO_PENDING;
- rMedium.IsStorage();
+ rMedium.GetStorage();
nErr = rMedium.GetErrorCode();
if( nErr )
return nErr;
@@ -2603,7 +2599,7 @@ sal_uInt32 SfxFilterMatcher::GuessFilter(
//DV !!!! don't close InStream when using the new Medium
//rMedium.CloseInStream();
- rMedium.IsStorage();
+ rMedium.GetStorage();
nErr = GetFilter4Content( rMedium, &pFilter, nMust, nDont );
CHECKERROR();
if( nErr && (nErr != ERRCODE_ABORT && nErr != ERRCODE_SFX_FORCEQUIET ) )
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index b09313fd2b66..49ce442f180a 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docfile.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mba $ $Date: 2000-10-04 11:43:53 $
+ * last change: $Author: mba $ $Date: 2000-10-09 10:41:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -503,7 +503,7 @@ public:
AsynchronLink aAvailableLink;
UCB_Link_HelperRef aLinkList;
- DECL_LINK( Done_Impl, void* );
+ DECL_LINK( Done_Impl, ErrCode );
DECL_LINK( DataAvailable_Impl, void* );
DECL_LINK( Cancel_Impl, void* );
@@ -519,14 +519,15 @@ public:
~SfxMedium_Impl();
};
-IMPL_LINK( SfxMedium_Impl, Done_Impl, void*, pVoid )
+IMPL_LINK( SfxMedium_Impl, Done_Impl, ErrCode, nError )
{
DELETEZ( pCancellable );
bDownloadDone = sal_True;
+ pAntiImpl->SetError( nError );
if ( bStreamReady )
{
aDoneLink.ClearPendingCall();
- aDoneLink.Call( pVoid );
+ aDoneLink.Call( (void*) nError );
}
return 0;
@@ -856,16 +857,19 @@ sal_Bool SfxMedium::Commit()
}
//------------------------------------------------------------------
+#if SUPD<608
sal_Bool SfxMedium::IsStorage() const
{
+/*
if( !aStorage.Is() && !pInStream )
{
(const_cast< SfxMedium* > (this))->GetStorage();
(const_cast< SfxMedium* > (this))->ResetError();
}
-
+*/
return aStorage.Is();
}
+#endif
//------------------------------------------------------------------
Link SfxMedium::GetDataAvailableLink() const
@@ -2120,9 +2124,10 @@ ErrCode SfxMedium::CheckOpenMode_Impl( sal_Bool bSilent, sal_Bool bAllowModeChan
{
// erst der Zugriff auf den Storage erzeugt den Fehlercode
SvStorageRef aStor;
- if ( IsStorage() )
- aStor = GetStorage();
- else
+#if SUPD<508
+ aStor = GetStorage();
+ if ( !aStor.Is() )
+#endif
GetInStream();
if( aStor.Is() && bReadOnly && !bTriesCopy && !pImp->bIsTemp )
@@ -2412,7 +2417,7 @@ void SfxMedium::ResetDataSink()
const SfxVersionTableDtor* SfxMedium::GetVersionList()
{
- if ( !pImp->pVersions && IsStorage() )
+ if ( !pImp->pVersions && GetStorage() )
{
SvStorageStreamRef aStream =
GetStorage()->OpenStream( DEFINE_CONST_UNICODE( "VersionList" ), SFX_STREAM_READONLY | STREAM_NOCREATE );
@@ -2428,7 +2433,7 @@ const SfxVersionTableDtor* SfxMedium::GetVersionList()
sal_uInt16 SfxMedium::AddVersion_Impl( SfxVersionInfo& rInfo )
{
- if ( IsStorage() )
+ if ( GetStorage() )
{
if ( !pImp->pVersions )
pImp->pVersions = new SfxVersionTableDtor;
@@ -2498,7 +2503,7 @@ sal_Bool SfxMedium::TransferVersionList_Impl( SfxMedium& rMedium )
sal_Bool SfxMedium::SaveVersionList_Impl()
{
- if ( IsStorage() )
+ if ( GetStorage() )
{
if ( !pImp->pVersions )
return sal_True;
diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx
index 4ec8e3b2faab..094f40f0b183 100644
--- a/sfx2/source/doc/docinf.cxx
+++ b/sfx2/source/doc/docinf.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docinf.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: mba $ $Date: 2000-10-04 17:37:55 $
+ * last change: $Author: mba $ $Date: 2000-10-09 10:41:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1478,7 +1478,7 @@ void SfxDocumentInfo::SetUseUserData( BOOL bNew )
ErrCode SfxDocumentInfo::Load(const String& rName)
{
SfxMedium aMedium( rName, SFX_STREAM_READONLY_MAKECOPY, TRUE );
- if ( !aMedium.IsStorage() || SVSTREAM_OK != aMedium.GetError() )
+ if ( !aMedium.GetStorage() || SVSTREAM_OK != aMedium.GetError() )
// Datei existiert nicht oder ist kein Storage
return ERRCODE_IO_CANTREAD;
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index b56341196077..56872aa8a9ff 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: objcont.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: mba $ $Date: 2000-09-28 11:45:25 $
+ * last change: $Author: mba $ $Date: 2000-10-09 10:41:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1468,7 +1468,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
DBG_ASSERT( pFile, "cannot UpdateFromTemplate without medium" );
// only for own storage formats
- SvStorageRef xDocStor = pFile && pFile->IsStorage() ? pFile->GetStorage() : 0;
+ SvStorageRef xDocStor = pFile ? pFile->GetStorage() : 0;
if ( !xDocStor.Is() || !pFile->GetFilter() || !pFile->GetFilter()->IsOwnFormat() )
return;
diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx
index 0ea4bb474a7f..172a12231241 100644
--- a/sfx2/source/doc/objuno.cxx
+++ b/sfx2/source/doc/objuno.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: objuno.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: mba $ $Date: 2000-10-04 11:18:10 $
+ * last change: $Author: mba $ $Date: 2000-10-09 10:41:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -114,6 +114,8 @@ using namespace ::com::sun::star::frame;
//=============================================================================
#define PROPERTY_UNBOUND 0
+#define PROPERTY_MAYBEVOID ::com::sun::star::beans::PropertyAttribute::MAYBEVOID
+
SfxItemPropertyMap aDocInfoPropertyMap_Impl[] =
{
{ "Author" , 6 , WID_FROM, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
@@ -122,7 +124,7 @@ SfxItemPropertyMap aDocInfoPropertyMap_Impl[] =
{ "AutoloadURL" , 11, MID_DOCINFO_AUTOLOADURL, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
{ "BlindCopiesTo" , 13, WID_BCC, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
{ "CopyTo" , 6 , WID_CC, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "CreationDate" , 12, WID_DATE_CREATED, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_UNBOUND, 0 },
+ { "CreationDate" , 12, WID_DATE_CREATED, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_MAYBEVOID, 0 },
{ "DefaultTarget" , 13, MID_DOCINFO_DEFAULTTARGET, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
{ "Description" , 11, MID_DOCINFO_DESCRIPTION, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
{ "EditingCycles" , 13, MID_DOCINFO_REVISION, &::getCppuType((const sal_Int16*)0), PROPERTY_UNBOUND, 0 },
@@ -132,10 +134,10 @@ SfxItemPropertyMap aDocInfoPropertyMap_Impl[] =
{ "Keywords" , 8 , WID_KEYWORDS, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
{ "MIMEType" , 8 , WID_CONTENT_TYPE, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND | ::com::sun::star::beans::PropertyAttribute::READONLY, 0 },
{ "ModifiedBy" , 10, MID_DOCINFO_MODIFICATIONAUTHOR, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "ModifyDate" , 10, WID_DATE_MODIFIED, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_UNBOUND, 0 },
+ { "ModifyDate" , 10, WID_DATE_MODIFIED, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_MAYBEVOID, 0 },
{ "Newsgroups" , 10, WID_NEWSGROUPS, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
{ "Original" , 8 , WID_MESSAGE_ID, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "PrintDate" , 9 , MID_DOCINFO_PRINTDATE, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_UNBOUND, 0 },
+ { "PrintDate" , 9 , MID_DOCINFO_PRINTDATE, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_MAYBEVOID, 0 },
{ "PrintedBy" , 9 , MID_DOCINFO_PRINTEDBY, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
{ "Priority" , 8 , WID_PRIORITY, &::getCppuType((const sal_Int16*)0), PROPERTY_UNBOUND, 0 },
{ "Recipient" , 9 , WID_TO, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
@@ -143,7 +145,7 @@ SfxItemPropertyMap aDocInfoPropertyMap_Impl[] =
{ "ReplyTo" , 7 , WID_REPLY_TO, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
{ "Template" , 8 , MID_DOCINFO_TEMPLATE, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
{ "TemplateFileName", 16, SID_TEMPLATE_NAME, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "TemplateDate" , 12, MID_DOCINFO_TEMPLATEDATE, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_UNBOUND, 0 },
+ { "TemplateDate" , 12, MID_DOCINFO_TEMPLATEDATE, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_MAYBEVOID, 0 },
{ "Theme" , 5 , MID_DOCINFO_SUBJECT, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
{ "Title" , 5 , WID_TITLE, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
{0,0,0,0,0}
@@ -795,7 +797,7 @@ SvStorage* SfxStandaloneDocumentInfoObject::GetStorage_Impl( const String& rName
delete _pMedium;
_pMedium = new SfxMedium( rName, bWrite ? SFX_STREAM_READWRITE : SFX_STREAM_READONLY, sal_True );
- if ( !_pMedium->IsStorage() || SVSTREAM_OK != _pMedium->GetError() )
+ if ( !_pMedium->GetStorage() || SVSTREAM_OK != _pMedium->GetError() )
// Datei existiert nicht oder ist kein Storage
return NULL;