summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/file/bc.cxx
diff options
context:
space:
mode:
authorAndreas Bille <abi@openoffice.org>2001-01-22 12:15:28 +0000
committerAndreas Bille <abi@openoffice.org>2001-01-22 12:15:28 +0000
commit52ced86d3b46bacaa44e2204047df636339db55c (patch)
tree56933911d45f7424314d8b2a03c41a22c937c85e /ucb/source/ucp/file/bc.cxx
parentfb2576d31e5eb4e49fcc6b0b38688d8505d00034 (diff)
#82939#
Minor modification in file bc.cxx, command transfer, to throw a InteractiveBadTransferURLException, if the scheme of the URL is not "file"
Diffstat (limited to 'ucb/source/ucp/file/bc.cxx')
-rw-r--r--ucb/source/ucp/file/bc.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index 6325b13dec08..19f40cc1ba4d 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bc.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: kso $ $Date: 2000-11-02 15:50:13 $
+ * last change: $Author: abi $ $Date: 2001-01-22 13:15:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1025,7 +1025,7 @@ BaseContent::deleteContent( sal_Int32 nMyCommandIdentifier,
void SAL_CALL
BaseContent::transfer( sal_Int32 nMyCommandIdentifier,
const TransferInfo& aTransferInfo )
- throw( CommandAbortedException )
+ throw( CommandAbortedException,InteractiveBadTransferURLException )
{
if( m_nState & Deleted )
@@ -1035,6 +1035,12 @@ BaseContent::transfer( sal_Int32 nMyCommandIdentifier,
if( m_pMyShell->m_bFaked && m_aUncPath.compareToAscii( "//./" ) == 0 )
throw CommandAbortedException();
+
+ rtl::OUString scheme = aTransferInfo.SourceURL.copy( 0,5 );
+ if( scheme.compareToAscii( "file:" ) != 0 )
+ throw InteractiveBadTransferURLException();
+
+
sal_Unicode slash = '/';
rtl::OUString srcUnc;
sal_Bool err = m_pMyShell->getUnqFromUrl( aTransferInfo.SourceURL,srcUnc );