diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-01-21 12:43:33 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-01-21 12:43:33 +0000 |
commit | 457e59fbe5a6ff754bdcea72408225ccc577e307 (patch) | |
tree | a33c3f0f4e56d58d570ec891f32fee4e0da1745a /extensions/source/plugin | |
parent | 8aa7eddd317f6702651bc727d0c30eef72d8060a (diff) |
INTEGRATION: CWS vcl33 (1.15.160); FILE MERGED
2004/12/10 16:12:02 pl 1.15.160.1: #i36600# do not pass a URL to NPP_StreamAsFile but a filename
Diffstat (limited to 'extensions/source/plugin')
-rw-r--r-- | extensions/source/plugin/base/xplugin.cxx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx index 52358bdcdf51..8aaceb9b5b32 100644 --- a/extensions/source/plugin/base/xplugin.cxx +++ b/extensions/source/plugin/base/xplugin.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xplugin.cxx,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: obo $ $Date: 2004-03-17 10:14:07 $ + * last change: $Author: kz $ $Date: 2005-01-21 13:43:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -812,10 +812,21 @@ sal_Bool XPlugin_Impl::provideNewStream(const OUString& mimetype, fprintf( stderr, "Plugin wants it in Mode %s\n", pType ); #endif if( isfile && stype == NP_ASFILEONLY ) + { + OString aFileName; + if( url.compareToAscii( "file:", 5 ) == 0 ) + { + OUString aSysName; + osl_getSystemPathFromFileURL( url.pData, &aSysName.pData ); + aFileName = OUStringToOString( aSysName, m_aEncoding ); + } + else + aFileName = OUStringToOString( url, m_aEncoding ); m_pPluginComm-> NPP_StreamAsFile( &m_aInstance, pStream->getStream(), - pStream->getStream()->url ); + aFileName.getStr() ); + } else { pStream->setMode( stype ); |