must changes (file access)
This commit is contained in:
parent
f0a3767248
commit
c92ca12ec0
19 changed files with 165 additions and 189 deletions
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: anminfo.cxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-19 00:16:46 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:41:38 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -323,7 +323,7 @@ void SdAnimationInfo::ReadData(SvStream& rIn)
|
|||
INetURLObject aURLObj(::URIHelper::SmartRelToAbs( aSoundFileRel, FALSE,
|
||||
INetURLObject::WAS_ENCODED,
|
||||
INetURLObject::DECODE_UNAMBIGUOUS ));
|
||||
aSoundFile = aURLObj.PathToFileName();
|
||||
aSoundFile = aURLObj.GetMainURL();
|
||||
}
|
||||
|
||||
// ab hier werden Daten der Versionen > 1 eingelesen
|
||||
|
@ -363,10 +363,7 @@ void SdAnimationInfo::ReadData(SvStream& rIn)
|
|||
INetURLObject aURLObj(::URIHelper::SmartRelToAbs(aBookmarkRel, FALSE,
|
||||
INetURLObject::WAS_ENCODED,
|
||||
INetURLObject::DECODE_UNAMBIGUOUS));
|
||||
if (eClickAction == presentation::ClickAction_DOCUMENT || eClickAction == presentation::ClickAction_PROGRAM)
|
||||
aBookmark = aURLObj.GetMainURL();
|
||||
else
|
||||
aBookmark = aURLObj.PathToFileName();
|
||||
aBookmark = aURLObj.GetMainURL();
|
||||
}
|
||||
else
|
||||
rIn.ReadByteString( aBookmark, eTextEnc );
|
||||
|
@ -376,7 +373,7 @@ void SdAnimationInfo::ReadData(SvStream& rIn)
|
|||
INetURLObject aURLObjSound(::URIHelper::SmartRelToAbs(aSecondSoundFileRel, FALSE,
|
||||
INetURLObject::WAS_ENCODED,
|
||||
INetURLObject::DECODE_UNAMBIGUOUS));
|
||||
aSecondSoundFile = aURLObjSound.PathToFileName();
|
||||
aSecondSoundFile = aURLObjSound.GetMainURL();
|
||||
|
||||
rIn >> nTemp; bInvisibleInPresentation = (BOOL)nTemp;
|
||||
rIn >> nTemp; nVerb = (USHORT)nTemp;
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: drawdoc.cxx,v $
|
||||
*
|
||||
* $Revision: 1.9 $
|
||||
* $Revision: 1.10 $
|
||||
*
|
||||
* last change: $Author: dl $ $Date: 2000-10-25 10:32:36 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:41:38 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -102,9 +102,6 @@
|
|||
#ifndef _SVX_FONTITEM_HXX //autogen
|
||||
#include <svx/fontitem.hxx>
|
||||
#endif
|
||||
#ifndef _SFXINIMGR_HXX //autogen
|
||||
#include <svtools/iniman.hxx>
|
||||
#endif
|
||||
#ifndef _SFXFLAGITEM_HXX //autogen
|
||||
#include <svtools/flagitem.hxx>
|
||||
#endif
|
||||
|
@ -215,7 +212,7 @@ SdDrawDocument* SdDrawDocument::pDocLockedInsertingLinks = NULL;
|
|||
SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) :
|
||||
FmFormModel(
|
||||
#ifndef SVX_LIGHT
|
||||
SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ),
|
||||
SvtPathOptions().GetPalettePath(),
|
||||
#else
|
||||
String(),
|
||||
#endif
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: sdpage2.cxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-19 00:16:46 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:42:28 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -543,7 +543,7 @@ void __EXPORT SdPage::ReadData(const SdrIOHeader& rHead, SvStream& rIn)
|
|||
INetURLObject aURLObj(::URIHelper::SmartRelToAbs(aSoundFileRel, FALSE,
|
||||
INetURLObject::WAS_ENCODED,
|
||||
INetURLObject::DECODE_UNAMBIGUOUS));
|
||||
aSoundFile = aURLObj.PathToFileName();
|
||||
aSoundFile = aURLObj.GetMainURL();
|
||||
}
|
||||
|
||||
// ab hier werden Daten der Versionen >=4 eingelesen
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: pptin.cxx,v $
|
||||
*
|
||||
* $Revision: 1.6 $
|
||||
* $Revision: 1.7 $
|
||||
*
|
||||
* last change: $Author: ka $ $Date: 2000-10-30 12:41:29 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:45:00 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -61,6 +61,9 @@
|
|||
|
||||
#include <svx/numitem.hxx>
|
||||
|
||||
#ifndef _UNOTOOLS_UCBSTREAMHELPER_HXX
|
||||
#include <unotools/ucbstreamhelper.hxx>
|
||||
#endif
|
||||
#ifndef _SV_WRKWIN_HXX
|
||||
#include <vcl/wrkwin.hxx>
|
||||
#endif
|
||||
|
@ -144,10 +147,6 @@
|
|||
#include <svx/tstpitem.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _SFX_INIMGR_HXX
|
||||
#include <sfx2/inimgr.hxx>
|
||||
#endif
|
||||
|
||||
#pragma hdrstop
|
||||
|
||||
#include "glob.hrc"
|
||||
|
@ -1496,10 +1495,10 @@ String SdPPTImport::ReadSound(UINT32 nSoundRef) const
|
|||
|
||||
for( ULONG n = 0; ( n < pSoundList->Count() ) && !bSoundExists; n++ )
|
||||
{
|
||||
INetURLObject aURL;
|
||||
aURL.SetSmartURL( *(String*)pSoundList->GetObject( n ) );
|
||||
String aSoundName( aURL.GetName() );
|
||||
if ( aSoundName == aRetval )
|
||||
INetURLObject aURL( *(String*)pSoundList->GetObject( n ) );
|
||||
String aSoundName( aURL.GetName() );
|
||||
|
||||
if( aSoundName == aRetval )
|
||||
{
|
||||
aRetval = *(String*)pSoundList->GetObject( n );
|
||||
bSoundExists = TRUE;
|
||||
|
@ -1517,24 +1516,30 @@ String SdPPTImport::ReadSound(UINT32 nSoundRef) const
|
|||
DffRecordHeader aSoundDataRecHd;
|
||||
if ( SeekToRec( rStCtrl, PPT_PST_SoundData, nStrLen, &aSoundDataRecHd, 0 ) )
|
||||
{
|
||||
String aGalleryDir( SFX_INIMANAGER()->Get( SFX_KEY_GALLERY_DIR ) );
|
||||
INetURLObject aGalleryUserSound;
|
||||
aGalleryUserSound.SetSmartURL( aGalleryDir.GetToken( aGalleryDir.GetTokenCount( ';' ) - 1 ) );
|
||||
String aGalleryDir( SvtPathOptions().GetGalleryPath() );
|
||||
INetURLObject aGalleryUserSound( aGalleryDir.GetToken( aGalleryDir.GetTokenCount( ';' ) - 1 ) );
|
||||
|
||||
aGalleryUserSound.Append( aRetval );
|
||||
UINT32 nSoundLen = aSoundDataRecHd.nRecLen;
|
||||
UINT8* pBuf = new UINT8[ nSoundLen ];
|
||||
|
||||
rStCtrl.Read( pBuf, nSoundLen );
|
||||
SvFileStream aOStm( aGalleryUserSound.PathToFileName(), STREAM_WRITE | STREAM_TRUNC );
|
||||
aOStm.Write( pBuf, nSoundLen );
|
||||
UINT32 nFileError = aOStm.GetError();
|
||||
aOStm.Close();
|
||||
delete[] pBuf;
|
||||
// Hat das Schreiben in die Gallery geklappt?
|
||||
if ( nFileError == ERRCODE_NONE )
|
||||
SvStream* pOStm = ::utl::UcbStreamHelper::CreateStream( aGalleryUserSound.GetMainURL(), STREAM_WRITE | STREAM_TRUNC );
|
||||
|
||||
if( pOStm )
|
||||
{
|
||||
GalleryExplorer::InsertURL( GALLERY_THEME_USERSOUNDS, aGalleryUserSound.PathToFileName() );
|
||||
aRetval = aGalleryUserSound.GetFull();
|
||||
pOStm->Write( pBuf, nSoundLen );
|
||||
|
||||
if( pOStm->GetError() == ERRCODE_NONE )
|
||||
{
|
||||
GalleryExplorer::InsertURL( GALLERY_THEME_USERSOUNDS, aGalleryUserSound.GetMainURL() );
|
||||
aRetval = aGalleryUserSound.GetMainURL();
|
||||
}
|
||||
|
||||
delete pOStm;
|
||||
}
|
||||
|
||||
delete[] pBuf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: sdmod.cxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: ka $ $Date: 2000-09-28 17:59:52 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:45:32 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -59,6 +59,12 @@
|
|||
*
|
||||
************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX
|
||||
#include <svtools/pathoptions.hxx>
|
||||
#endif
|
||||
#ifndef _UNOTOOLS_UCBSTREAMHELPER_HXX
|
||||
#include <unotools/ucbstreamhelper.hxx>
|
||||
#endif
|
||||
#ifndef _URLOBJ_HXX
|
||||
#include <tools/urlobj.hxx>
|
||||
#endif
|
||||
|
@ -357,11 +363,14 @@ SvStorageStreamRef SdModule::GetOptionStream( const String& rOptionName,
|
|||
|
||||
if( !xOptionStorage.Is() )
|
||||
{
|
||||
INetURLObject aURL;
|
||||
INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
|
||||
|
||||
aURL.SetSmartURL( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_USERCONFIG_PATH ) );
|
||||
aURL.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "drawing.cfg" ) ) );
|
||||
xOptionStorage = new SvStorage( aURL.PathToFileName() );
|
||||
|
||||
SvStream* pStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL(), STREAM_READWRITE );
|
||||
|
||||
if( pStm )
|
||||
xOptionStorage = new SvStorage( pStm, TRUE );
|
||||
}
|
||||
|
||||
if( DOCUMENT_TYPE_DRAW == eType )
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: sdmod1.cxx,v $
|
||||
*
|
||||
* $Revision: 1.4 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
* last change: $Author: cl $ $Date: 2000-10-11 08:29:45 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:45:32 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -59,7 +59,6 @@
|
|||
*
|
||||
************************************************************************/
|
||||
|
||||
#include <svtools/iniman.hxx>
|
||||
#include <svtools/lckbitem.hxx>
|
||||
#ifndef _SFXFRAME_HXX //autogen
|
||||
#include <sfx2/frame.hxx>
|
||||
|
@ -83,9 +82,6 @@
|
|||
#ifndef _SV_MSGBOX_HXX //autogen
|
||||
#include <vcl/msgbox.hxx>
|
||||
#endif
|
||||
#ifndef _SFX_INIMGR_HXX //autogen
|
||||
#include <sfx2/inimgr.hxx>
|
||||
#endif
|
||||
#ifndef _SVX_SVXENUM_HXX //autogen
|
||||
#include <svx/svxenum.hxx>
|
||||
#endif
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: sdmod2.cxx,v $
|
||||
*
|
||||
* $Revision: 1.5 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
* last change: $Author: pw $ $Date: 2000-10-25 15:44:37 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:45:32 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -64,17 +64,13 @@
|
|||
#endif
|
||||
|
||||
#define ITEMID_FIELD EE_FEATURE_FIELD
|
||||
|
||||
#ifndef _SVX_FLDITEM_HXX //autogen
|
||||
#include <svx/flditem.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _SFX_PRINTER_HXX //autogen
|
||||
#include <sfx2/printer.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _SFX_INIMGR_HXX //autogen
|
||||
#include <sfx2/inimgr.hxx>
|
||||
#endif
|
||||
#ifndef _INETHIST_HXX //autogen
|
||||
#include <svtools/inethist.hxx>
|
||||
#endif
|
||||
|
@ -103,6 +99,7 @@
|
|||
#include <sfx2/request.hxx>
|
||||
#endif
|
||||
|
||||
#include <sfx2/inimgr.hxx>
|
||||
#include <svx/svdfield.hxx>
|
||||
|
||||
#define ITEMID_SPELLCHECK 0
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: animobjs.cxx,v $
|
||||
*
|
||||
* $Revision: 1.5 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
* last change: $Author: hjs $ $Date: 2000-11-09 12:18:45 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:48:33 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -103,6 +103,7 @@
|
|||
#include "drawdoc.hxx"
|
||||
#include "sdpage.hxx"
|
||||
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: dlgass.cxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: ka $ $Date: 2000-09-21 16:11:35 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:48:33 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -1818,10 +1818,10 @@ void AssistentDlgImpl::DeletePassords()
|
|||
|
||||
BOOL AssistentDlgImpl::IsOwnFormat( const String& rPath )
|
||||
{
|
||||
INetURLObject aURL;
|
||||
aURL.SetSmartURL( rPath );
|
||||
INetURLObject aURL( rPath );
|
||||
String aExt( aURL.GetFileExtension() );
|
||||
|
||||
String aExt( aURL.GetFileExtension() );
|
||||
DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
|
||||
|
||||
return !aExt.EqualsIgnoreCaseAscii( "ppt" );
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: dlgassim.cxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: dl $ $Date: 2000-10-13 11:33:20 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:48:33 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -59,14 +59,9 @@
|
|||
*
|
||||
************************************************************************/
|
||||
|
||||
#ifndef _SFX_INIMGR_HXX
|
||||
#include <sfx2/inimgr.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _SFXDOCFILE_HXX //autogen
|
||||
#include <sfx2/docfile.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _URLOBJ_HXX //autogen
|
||||
#include <tools/urlobj.hxx>
|
||||
#endif
|
||||
|
@ -348,16 +343,11 @@ void TemplateCache::Clear()
|
|||
|
||||
void TemplateCache::Load()
|
||||
{
|
||||
INetURLObject aURL;
|
||||
|
||||
aURL.SetSmartURL( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_USERCONFIG_PATH ) );
|
||||
aURL.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "template.sod" ) ) );
|
||||
|
||||
SfxMedium aMedium( aURL.GetMainURL(),
|
||||
STREAM_READ | STREAM_NOCREATE,
|
||||
TRUE ); // Download
|
||||
|
||||
INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
|
||||
aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM( "template.sod" ) ) );
|
||||
SfxMedium aMedium( aURL.GetMainURL(), STREAM_READ | STREAM_NOCREATE, TRUE ); // Download
|
||||
SvStream* pStream = aMedium.GetInStream();
|
||||
|
||||
if( !pStream )
|
||||
return;
|
||||
|
||||
|
@ -397,16 +387,11 @@ void TemplateCache::Load()
|
|||
|
||||
void TemplateCache::Save()
|
||||
{
|
||||
INetURLObject aURL;
|
||||
|
||||
aURL.SetSmartURL( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_USERCONFIG_PATH ) );
|
||||
aURL.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "template.sod" ) ) );
|
||||
|
||||
SfxMedium aMedium( aURL.GetMainURL(),
|
||||
STREAM_WRITE | STREAM_TRUNC,
|
||||
FALSE ); // Download
|
||||
|
||||
INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
|
||||
aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM( "template.sod" ) ) );
|
||||
SfxMedium aMedium( aURL.GetMainURL(), STREAM_WRITE | STREAM_TRUNC, FALSE ); // Download
|
||||
SvStream* pStream = aMedium.GetInStream();
|
||||
|
||||
if( !pStream )
|
||||
return;
|
||||
|
||||
|
@ -451,11 +436,14 @@ TemplateCacheDirEntry* TemplateCache::GetDirEntry( const String& rPath )
|
|||
|
||||
TemplateCacheInfo* TemplateCache::GetFileInfo( const String& rPath )
|
||||
{
|
||||
INetURLObject aUrl; aUrl.SetSmartURL( rPath );
|
||||
INetURLObject aUrl( rPath );
|
||||
String aPath( aUrl.GetPath() );
|
||||
String aName( aUrl.GetName( INetURLObject::DECODE_UNAMBIGUOUS ) );
|
||||
|
||||
DBG_ASSERT( aUrl.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
|
||||
|
||||
TemplateCacheDirEntry* pDir = GetDirEntry( aPath );
|
||||
|
||||
if( NULL != pDir )
|
||||
{
|
||||
for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() )
|
||||
|
@ -470,9 +458,11 @@ TemplateCacheInfo* TemplateCache::GetFileInfo( const String& rPath )
|
|||
|
||||
TemplateCacheInfo* TemplateCache::AddFileInfo( const String& rPath )
|
||||
{
|
||||
INetURLObject aUrl; aUrl.SetSmartURL( rPath );
|
||||
String aPath( aUrl.GetPath() );
|
||||
String aName( aUrl.GetName( INetURLObject::DECODE_UNAMBIGUOUS ) );
|
||||
INetURLObject aUrl( rPath );
|
||||
String aPath( aUrl.GetPath() );
|
||||
String aName( aUrl.GetName( INetURLObject::DECODE_UNAMBIGUOUS ) );
|
||||
|
||||
DBG_ASSERT( aUrl.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
|
||||
|
||||
TemplateCacheDirEntry* pDir = GetDirEntry( aPath );
|
||||
TemplateCacheInfo* pEntry = NULL;
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: morphdlg.cxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: aw $ $Date: 2000-10-30 11:41:01 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:48:33 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -67,34 +67,24 @@
|
|||
#include "morphdlg.hxx"
|
||||
#include "morphdlg.hrc"
|
||||
|
||||
#ifndef _SFX_INIMGR_HXX //autogen
|
||||
#include <sfx2/inimgr.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _SV_CONFIG_HXX //autogen
|
||||
#include <vcl/config.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef SVX_XFILLIT0_HXX //autogen
|
||||
#include <svx/xfillit0.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _SVX_XLINEIT0_HXX //autogen
|
||||
#include <svx/xlineit0.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _XENUM_HXX //autogen
|
||||
#include <svx/xenum.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _SVDOBJ_HXX //autogen
|
||||
#include <svx/svdobj.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _SFXITEMSET_HXX //autogen
|
||||
#include <svtools/itemset.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _SFXITEMPOOL_HXX //autogen
|
||||
#include <svtools/itempool.hxx>
|
||||
#endif
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: tpaction.cxx,v $
|
||||
*
|
||||
* $Revision: 1.3 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
* last change: $Author: ka $ $Date: 2000-10-30 12:51:38 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:49:34 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -81,15 +81,15 @@
|
|||
|
||||
#include <sfx2/app.hxx>
|
||||
#include <tools/urlobj.hxx>
|
||||
#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX
|
||||
#include <svtools/pathoptions.hxx>
|
||||
#endif
|
||||
#ifndef _SVDPAGV_HXX //autogen
|
||||
#include <svx/svdpagv.hxx>
|
||||
#endif
|
||||
#ifndef _AEITEM_HXX //autogen
|
||||
#include <svtools/aeitem.hxx>
|
||||
#endif
|
||||
#ifndef _SFXINIMGR_HXX //autogen
|
||||
#include <svtools/iniman.hxx>
|
||||
#endif
|
||||
#ifndef _SVX_COLRITEM_HXX //autogen
|
||||
#include <svx/colritem.hxx>
|
||||
#endif
|
||||
|
@ -705,8 +705,7 @@ void SdTPAction::OpenFileDialog()
|
|||
|
||||
if( bSound )
|
||||
{
|
||||
pFileDialog = new SfxSimpleFileDialog ( this, WB_OPEN | WB_3DLOOK | WB_STDMODAL );
|
||||
|
||||
pFileDialog = new SfxFileDialog ( this, WB_OPEN | WB_3DLOOK | WB_STDMODAL );
|
||||
pBtnPreview = new PushButton( pFileDialog, SdResId( RID_PREVIEW_BUTTON ) );
|
||||
pBtnPreview->SetClickHdl( LINK( this, SdTPAnimation, ClickPreviewHdl ) );
|
||||
pBtnPreview->Show();
|
||||
|
@ -732,9 +731,8 @@ void SdTPAction::OpenFileDialog()
|
|||
#endif
|
||||
|
||||
if( !aFile.Len() )
|
||||
{
|
||||
aFile = SFX_APP()->GetAppIniManager()->Get( SFX_KEY_GRAPHICS_PATH );
|
||||
}
|
||||
aFile = SvtPathOptions().GetGraphicPath();
|
||||
|
||||
pFileDialog->SetPath( aFile );
|
||||
|
||||
if ( pFileDialog->Execute() )
|
||||
|
@ -785,9 +783,7 @@ void SdTPAction::OpenFileDialog()
|
|||
SfxFileDialog* pSfxFileDlg = new SfxFileDialog ( this, WB_OPEN | WB_3DLOOK | WB_STDMODAL );
|
||||
|
||||
if (bDocument && !aFile.Len())
|
||||
{
|
||||
aFile = SFX_APP()->GetAppIniManager()->Get( SFX_KEY_WORK_PATH );
|
||||
}
|
||||
aFile = SvtPathOptions().GetWorkPath();
|
||||
|
||||
pSfxFileDlg->SetPath( aFile );
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: vectdlg.cxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-18 16:48:34 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:49:34 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -75,9 +75,6 @@
|
|||
#include "vectdlg.hxx"
|
||||
#include "vectdlg.hrc"
|
||||
|
||||
#ifndef _SFX_INIMGR_HXX //autogen
|
||||
#include <sfx2/inimgr.hxx>
|
||||
#endif
|
||||
#ifndef _SV_CONFIG_HXX //autogen
|
||||
#include <vcl/config.hxx>
|
||||
#endif
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: docshel2.cxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-18 16:48:34 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:50:07 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -152,20 +152,25 @@ void __EXPORT SdDrawDocShell::Draw(OutputDevice* pOut, const JobSetup& rSetup,
|
|||
|
||||
delete pView;
|
||||
|
||||
// Fuer Testzwecke: Bitte nicht entfernen!
|
||||
// Fuer Testzwecke: Bitte nicht entfernen!
|
||||
//
|
||||
// GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
|
||||
// GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
|
||||
//
|
||||
// if (pMtf)
|
||||
// {
|
||||
// String aFile("d:\\sd\\winmsci.pro\\bin\\gdi.mtf");
|
||||
// SvFileStream aFStream(aFile, STREAM_WRITE);
|
||||
// if( pMtf )
|
||||
// {
|
||||
// String aURLStr;
|
||||
//
|
||||
// pMtf->WindStart();
|
||||
// aFStream << *pMtf;
|
||||
// if( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( String( RTL_CONSTASCII_USTRINGPARAM( "d:\\gdi.mtf" ) ), aURLStr ) )
|
||||
// {
|
||||
// SvStream* pOStm = ::utl::UcbStreamHelper::CreateStream( aURLStr, STREAM_WRITE | STREAM_TRUNC );
|
||||
//
|
||||
// aFStream.Close();
|
||||
// }
|
||||
// if( pOStm )
|
||||
// {
|
||||
// *pOStm << *pMtf;
|
||||
// delete pOStm;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: fuinsert.cxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-18 16:48:35 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:52:00 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -66,13 +66,14 @@
|
|||
#endif
|
||||
|
||||
#include <so3/plugin.hxx>
|
||||
|
||||
#include <svx/pfiledlg.hxx>
|
||||
|
||||
#include <svx/impgrf.hxx>
|
||||
#include <svx/dialogs.hrc>
|
||||
#include <svx/linkmgr.hxx>
|
||||
#include <svx/svdetc.hxx>
|
||||
#ifndef _UNOTOOLS_UCBSTREAMHELPER_HXX
|
||||
#include <unotools/ucbstreamhelper.hxx>
|
||||
#endif
|
||||
#ifndef _SV_CLIP_HXX //autogen
|
||||
#include <vcl/clip.hxx>
|
||||
#endif
|
||||
|
@ -176,23 +177,26 @@ FuInsertGraphic::FuInsertGraphic(SdViewShell* pViewSh, SdWindow* pWin, SdView* p
|
|||
{
|
||||
case RET_OK:
|
||||
{
|
||||
USHORT nError = 0;
|
||||
Graphic aGraphic;
|
||||
Graphic* pGraphic = pDlg->GetGraphic();
|
||||
String aPath = pDlg->GetPath();
|
||||
USHORT nError = 0;
|
||||
Graphic aGraphic;
|
||||
Graphic* pGraphic = pDlg->GetGraphic();
|
||||
String aPath( pDlg->GetPath() );
|
||||
|
||||
if (pGraphic)
|
||||
if( pGraphic )
|
||||
{
|
||||
aGraphic = *pGraphic;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Graphik noch nicht ueber Preview vorhanden: also laden
|
||||
GraphicFilter& rFilter = pDlg->GetFilter();
|
||||
FilterProgress aFilterProgress(&rFilter, pViewSh->GetDocSh());
|
||||
SvFileStream aIStm( aPath, STREAM_READ | STREAM_SHARE_DENYNONE );
|
||||
FilterProgress aFilterProgress( &rFilter, pViewSh->GetDocSh() );
|
||||
SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aPath, STREAM_READ | STREAM_SHARE_DENYNONE );
|
||||
|
||||
nError = rFilter.ImportGraphic( aGraphic, aPath, aIStm );
|
||||
if( pIStm )
|
||||
{
|
||||
nError = rFilter.ImportGraphic( aGraphic, aPath, *pIStm );
|
||||
delete pIStm;
|
||||
}
|
||||
}
|
||||
|
||||
if ( nError == 0 && pViewSh->ISA(SdDrawViewShell) )
|
||||
|
@ -545,17 +549,16 @@ FuInsertOLE::FuInsertOLE(SdViewShell* pViewSh, SdWindow* pWin, SdView* pView,
|
|||
INetURLObject::WAS_ENCODED,
|
||||
INetURLObject::DECODE_UNAMBIGUOUS );
|
||||
|
||||
INetURLObject* pURL = new INetURLObject();
|
||||
pURL->SetSmartProtocol( INET_PROT_FILE );
|
||||
INetURLObject aURL( aStrURL );
|
||||
|
||||
if ( pURL->SetURL( aStrURL ) )
|
||||
if( aURL.GetProtocol() != INET_PROT_NOT_VALID )
|
||||
{
|
||||
// create plugin, initialize, etc.
|
||||
SvFactory * pPlugIn = SvFactory::GetDefaultPlugInFactory();
|
||||
SvStorageRef aStor = new SvStorage( aEmptyStr, STREAM_STD_READWRITE );
|
||||
SvPlugInObjectRef xObj = &pPlugIn->CreateAndInit( *pPlugIn, aStor );
|
||||
xObj->SetPlugInMode( (USHORT)PLUGIN_EMBEDED );
|
||||
xObj->SetURL( *pURL );
|
||||
xObj->SetURL( aURL );
|
||||
aIPObj = (SvInPlaceObject*)&xObj;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: fusel.cxx,v $
|
||||
*
|
||||
* $Revision: 1.5 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
* last change: $Author: tbe $ $Date: 2000-11-10 16:28:08 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:52:00 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -1326,13 +1326,11 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
|
|||
{
|
||||
// Execute application
|
||||
String aStrApplication = pInfo->aBookmark;
|
||||
INetURLObject aURLObj( ::URIHelper::SmartRelToAbs( aStrApplication, FALSE,
|
||||
INetURLObject::WAS_ENCODED,
|
||||
INetURLObject::DECODE_UNAMBIGUOUS ) );
|
||||
aStrApplication = aURLObj.PathToFileName();
|
||||
|
||||
NAMESPACE_VOS(OProcess) aApp( aStrApplication);
|
||||
NAMESPACE_VOS(OArgumentList) aParameters;
|
||||
INetURLObject aURL( ::URIHelper::SmartRelToAbs( aStrApplication, FALSE,
|
||||
INetURLObject::WAS_ENCODED,
|
||||
INetURLObject::DECODE_UNAMBIGUOUS ) );
|
||||
NAMESPACE_VOS(OProcess) aApp( aURL.GetMainURL() );
|
||||
NAMESPACE_VOS(OArgumentList) aParameters;
|
||||
|
||||
aApp.execute( (NAMESPACE_VOS(OProcess)::TProcessOption)
|
||||
(NAMESPACE_VOS(OProcess)::TOption_SearchPath |
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: drviews9.cxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: ka $ $Date: 2000-09-21 16:12:20 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:53:19 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -297,18 +297,17 @@ void SdDrawViewShell::ExecGallery(SfxRequest& rReq)
|
|||
// Soll nur ein Link benutzt werden?
|
||||
if( pGrafObj && pGal->IsLinkage() )
|
||||
{
|
||||
pGrafObj->SetGraphicLink( pGal->GetURL().PathToFileName(), pGal->GetFilterName() );
|
||||
pGrafObj->SetGraphicLink( pGal->GetURL().GetMainURL(), pGal->GetFilterName() );
|
||||
}
|
||||
}
|
||||
// Sound als OLE-Objekt einfuegen
|
||||
else if (nFormats & SGA_FORMAT_SOUND)
|
||||
{
|
||||
const String aFile( pGal->GetURL().PathToFileName() );
|
||||
SvInPlaceObjectRef aIPObj;
|
||||
SvStorageRef aStor = new SvStorage( String(), STREAM_STD_READWRITE );
|
||||
String aName;
|
||||
|
||||
aIPObj = &((SvFactory*)SvInPlaceObject::ClassFactory())->CreateAndInit(aFile, aStor);
|
||||
aIPObj = &((SvFactory*)SvInPlaceObject::ClassFactory())->CreateAndInit( pGal->GetURL().GetMainURL(), aStor );
|
||||
if (aIPObj.Is())
|
||||
{
|
||||
Size aSize(aIPObj->GetVisArea(ASPECT_CONTENT).GetSize());
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: sdview3.cxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: aw $ $Date: 2000-10-30 11:50:43 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:53:19 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -69,8 +69,9 @@
|
|||
#ifndef _SV_EXCHANGE_HXX //autogen
|
||||
#include <vcl/exchange.hxx>
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX
|
||||
#include <svtools/pathoptions.hxx>
|
||||
#endif
|
||||
#ifndef _EDITDATA_HXX
|
||||
#include <svx/editdata.hxx>
|
||||
#endif
|
||||
|
@ -120,9 +121,6 @@
|
|||
#ifndef _SFXAPP_HXX //autogen
|
||||
#include <sfx2/app.hxx>
|
||||
#endif
|
||||
#ifndef _SFXINIMGR_HXX //autogen
|
||||
#include <svtools/iniman.hxx>
|
||||
#endif
|
||||
#ifndef _SFXITEMPOOL_HXX //autogen
|
||||
#include <svtools/itempool.hxx>
|
||||
#endif
|
||||
|
@ -491,8 +489,7 @@ BOOL SdView::InsertData(SvDataObjectRef pDataObject, const Point& rPos,
|
|||
if ( aData.GetData(xStream) ) // Setzt auch die BufferSize
|
||||
{
|
||||
xStream->SetVersion(SOFFICE_FILEFORMAT_NOW);
|
||||
FmFormModel* pModel = new FmFormModel(SFX_APP()->GetAppIniManager()
|
||||
->Get(SFX_KEY_PALETTE_PATH), NULL, pDocSh);
|
||||
FmFormModel* pModel = new FmFormModel( SvtPathOptions().GetPalettePath(), NULL, pDocSh );
|
||||
xStream->Seek(0);
|
||||
pModel->SetStreamingSdrModel(TRUE);
|
||||
pModel->GetItemPool().Load(*xStream);
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: sdview5.cxx,v $
|
||||
*
|
||||
* $Revision: 1.3 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
* last change: $Author: aw $ $Date: 2000-10-30 11:50:43 $
|
||||
* last change: $Author: ka $ $Date: 2000-11-10 16:53:19 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -334,16 +334,16 @@ IMPL_LINK_INLINE_START( SdView, DropInsertFileHdl, Timer*, pTimer )
|
|||
BOOL bOK = FALSE;
|
||||
const SfxFilter* pFilter = NULL;
|
||||
|
||||
SfxMedium aSfxMedium(aDropFile, (STREAM_READ | STREAM_SHARE_DENYNONE), FALSE);
|
||||
SfxMedium aSfxMedium( aDropFile, STREAM_READ | STREAM_SHARE_DENYNONE, FALSE );
|
||||
ErrCode nErr = SFX_APP()->GetFilterMatcher().
|
||||
GuessFilter(aSfxMedium, &pFilter, SFX_FILTER_IMPORT,
|
||||
SFX_FILTER_NOTINSTALLED | SFX_FILTER_EXECUTABLE );
|
||||
|
||||
if (pFilter && !nErr)
|
||||
{
|
||||
GraphicFilter* pGraphicFilter = GetGrfFilter();
|
||||
String aFilterName = pFilter->GetFilterName();
|
||||
USHORT nFormat = pGraphicFilter->GetImportFormatNumber(aFilterName);
|
||||
GraphicFilter* pGraphicFilter = GetGrfFilter();
|
||||
String aFilterName( pFilter->GetFilterName() );
|
||||
USHORT nFormat = pGraphicFilter->GetImportFormatNumber(aFilterName);
|
||||
|
||||
if (aFilterName.EqualsAscii( "Text" ) ||
|
||||
aFilterName.EqualsAscii( "Rich Text Format" ) ||
|
||||
|
@ -365,28 +365,27 @@ IMPL_LINK_INLINE_START( SdView, DropInsertFileHdl, Timer*, pTimer )
|
|||
pDoc, aReq);
|
||||
delete pFunc;
|
||||
}
|
||||
else if (nFormat != GRFILTER_FORMAT_DONTKNOW)
|
||||
else if( nFormat != GRFILTER_FORMAT_DONTKNOW )
|
||||
{
|
||||
/******************************************************************
|
||||
* Graphik-Format
|
||||
******************************************************************/
|
||||
FilterProgress aFilterProgress(pGraphicFilter, pViewSh->GetDocSh());
|
||||
Graphic aGraphic;
|
||||
Graphic aGraphic;
|
||||
|
||||
// keine native Tempdatei anlegen (DummyLink setzen)
|
||||
aGraphic.SetLink( GfxLink() );
|
||||
|
||||
SvFileStream aIStm( aDropFile, STREAM_READ | STREAM_SHARE_DENYNONE );
|
||||
SvStream* pIStm = aSfxMedium.GetInStream();
|
||||
|
||||
if( !pGraphicFilter->ImportGraphic(aGraphic, aDropFile, aIStm, nFormat ) )
|
||||
if( pIStm && !pGraphicFilter->ImportGraphic( aGraphic, aDropFile, *pIStm, nFormat ) )
|
||||
{
|
||||
bOK = TRUE;
|
||||
|
||||
SdrGrafObj* pGrafObj = InsertGraphic(aGraphic, eAction, aDropPos, NULL, NULL);
|
||||
|
||||
if (pGrafObj)
|
||||
{
|
||||
pGrafObj->SetGraphicLink(aDropFile, aFilterName);
|
||||
}
|
||||
if( pGrafObj )
|
||||
pGrafObj->SetGraphicLink( aDropFile, aFilterName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue