summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/file/prov.cxx
diff options
context:
space:
mode:
authorKai Sommerfeld <kso@openoffice.org>2001-04-05 08:52:01 +0000
committerKai Sommerfeld <kso@openoffice.org>2001-04-05 08:52:01 +0000
commiteb72cd638395a2d09ff134d040ac85a5c0f14a7a (patch)
treedad438a7df1fe059e40b4e02b0f39f78fa20485a /ucb/source/ucp/file/prov.cxx
parent5b114841094f95d78f286b61fe0de1a7d47115a0 (diff)
#85714# - Prefixed all component implementation names with "com.sun.star.comp"
(UDK naming recommandation - required for automatic testing).
Diffstat (limited to 'ucb/source/ucp/file/prov.cxx')
-rw-r--r--ucb/source/ucp/file/prov.cxx141
1 files changed, 71 insertions, 70 deletions
diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx
index 95cd573684..c59e246134 100644
--- a/ucb/source/ucp/file/prov.cxx
+++ b/ucb/source/ucp/file/prov.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: prov.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: hro $ $Date: 2001-03-15 12:54:03 $
+ * last change: $Author: kso $ $Date: 2001-04-05 09:49:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -185,6 +185,11 @@ extern "C" void * SAL_CALL component_getFactory(
{
xFactory = FileProvider::createServiceFactory( xSMgr );
}
+ else if ( rtl_str_compare( pImplName, "FileProvider" ) == 0 )
+ {
+ // Backward compatibility... :-/
+ xFactory = FileProvider::createServiceFactory( xSMgr );
+ }
//////////////////////////////////////////////////////////////////////
@@ -498,11 +503,7 @@ FileProvider::createServiceFactory(
fileaccess::shell::getSupportedServiceNames_static() ) );
}
-#if SUPD > 583
uno::Reference< uno::XInterface > SAL_CALL
-#else
-uno::Reference< uno::XInterface >
-#endif
FileProvider::CreateInstance(
const uno::Reference< lang::XMultiServiceFactory >& xMultiServiceFactory )
{
@@ -610,40 +611,40 @@ class XPropertySetInfoImpl2
public:
XPropertySetInfoImpl2();
~XPropertySetInfoImpl2();
-
+
// XInterface
virtual uno::Any SAL_CALL
- queryInterface(
- const uno::Type& aType )
+ queryInterface(
+ const uno::Type& aType )
throw( uno::RuntimeException);
-
+
virtual void SAL_CALL
- acquire(
- void )
+ acquire(
+ void )
throw( uno::RuntimeException);
-
+
virtual void SAL_CALL
release(
- void )
+ void )
throw( uno::RuntimeException );
-
-
+
+
virtual uno::Sequence< beans::Property > SAL_CALL
- getProperties(
- void )
+ getProperties(
+ void )
throw( uno::RuntimeException );
-
+
virtual beans::Property SAL_CALL
- getPropertyByName(
- const rtl::OUString& aName )
- throw( beans::UnknownPropertyException,
+ getPropertyByName(
+ const rtl::OUString& aName )
+ throw( beans::UnknownPropertyException,
uno::RuntimeException);
-
+
virtual sal_Bool SAL_CALL
- hasPropertyByName( const rtl::OUString& Name )
+ hasPropertyByName( const rtl::OUString& Name )
throw( uno::RuntimeException );
-
+
private:
uno::Sequence< beans::Property > m_seq;
};
@@ -656,7 +657,7 @@ XPropertySetInfoImpl2::XPropertySetInfoImpl2()
-1,
getCppuType( static_cast< rtl::OUString* >( 0 ) ),
beans::PropertyAttribute::READONLY );
-
+
m_seq[1] = beans::Property( rtl::OUString::createFromAscii( "FileSystemNotation" ),
-1,
getCppuType( static_cast< sal_Int32* >( 0 ) ),
@@ -704,11 +705,11 @@ XPropertySetInfoImpl2::getPropertyByName(
const rtl::OUString& aName )
throw( beans::UnknownPropertyException,
uno::RuntimeException)
-{
+{
for( sal_Int32 i = 0; i < m_seq.getLength(); ++i )
- if( m_seq[i].Name == aName )
+ if( m_seq[i].Name == aName )
return m_seq[i];
-
+
throw beans::UnknownPropertyException();
}
@@ -729,7 +730,7 @@ XPropertySetInfoImpl2::hasPropertyByName(
throw( uno::RuntimeException )
{
for( sal_Int32 i = 0; i < m_seq.getLength(); ++i )
- if( m_seq[i].Name == aName )
+ if( m_seq[i].Name == aName )
return true;
return false;
}
@@ -749,14 +750,14 @@ void SAL_CALL FileProvider::initProperties( void )
#elif defined( WNT )
m_FileSystemNotation = FileSystemNotation::DOS_NOTATION;
#else
- m_FileSystemNotation = FileSystemNotation::UNKNOWN_NOTATION;
+ m_FileSystemNotation = FileSystemNotation::UNKNOWN_NOTATION;
#endif
-
+
// static const sal_Int32 UNKNOWN_NOTATION = (sal_Int32)0;
// static const sal_Int32 UNIX_NOTATION = (sal_Int32)1;
// static const sal_Int32 DOS_NOTATION = (sal_Int32)2;
// static const sal_Int32 MAC_NOTATION = (sal_Int32)3;
-
+
XPropertySetInfoImpl2* p = new XPropertySetInfoImpl2();
m_xPropertySetInfo = uno::Reference< beans::XPropertySetInfo >( p );
}
@@ -765,8 +766,8 @@ void SAL_CALL FileProvider::initProperties( void )
// XPropertySet
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
-FileProvider::getPropertySetInfo( )
+uno::Reference< beans::XPropertySetInfo > SAL_CALL
+FileProvider::getPropertySetInfo( )
throw( uno::RuntimeException )
{
initProperties();
@@ -774,13 +775,13 @@ FileProvider::getPropertySetInfo( )
}
-void SAL_CALL
-FileProvider::setPropertyValue( const rtl::OUString& aPropertyName,
- const uno::Any& aValue )
- throw( beans::UnknownPropertyException,
- beans::PropertyVetoException,
- lang::IllegalArgumentException,
- lang::WrappedTargetException,
+void SAL_CALL
+FileProvider::setPropertyValue( const rtl::OUString& aPropertyName,
+ const uno::Any& aValue )
+ throw( beans::UnknownPropertyException,
+ beans::PropertyVetoException,
+ lang::IllegalArgumentException,
+ lang::WrappedTargetException,
uno::RuntimeException )
{
if( aPropertyName.compareToAscii( "FileSystemNotation" ) == 0 ||
@@ -792,11 +793,11 @@ FileProvider::setPropertyValue( const rtl::OUString& aPropertyName,
-uno::Any SAL_CALL
-FileProvider::getPropertyValue(
- const rtl::OUString& aPropertyName )
- throw( beans::UnknownPropertyException,
- lang::WrappedTargetException,
+uno::Any SAL_CALL
+FileProvider::getPropertyValue(
+ const rtl::OUString& aPropertyName )
+ throw( beans::UnknownPropertyException,
+ lang::WrappedTargetException,
uno::RuntimeException )
{
initProperties();
@@ -815,14 +816,14 @@ FileProvider::getPropertyValue(
else
throw beans::UnknownPropertyException();
}
-
+
void SAL_CALL
-FileProvider::addPropertyChangeListener(
- const rtl::OUString& aPropertyName,
- const uno::Reference< beans::XPropertyChangeListener >& xListener )
- throw( beans::UnknownPropertyException,
- lang::WrappedTargetException,
+FileProvider::addPropertyChangeListener(
+ const rtl::OUString& aPropertyName,
+ const uno::Reference< beans::XPropertyChangeListener >& xListener )
+ throw( beans::UnknownPropertyException,
+ lang::WrappedTargetException,
uno::RuntimeException)
{
return;
@@ -830,10 +831,10 @@ FileProvider::addPropertyChangeListener(
void SAL_CALL
-FileProvider::removePropertyChangeListener(
- const rtl::OUString& aPropertyName,
+FileProvider::removePropertyChangeListener(
+ const rtl::OUString& aPropertyName,
const uno::Reference< beans::XPropertyChangeListener >& aListener )
- throw( beans::UnknownPropertyException,
+ throw( beans::UnknownPropertyException,
lang::WrappedTargetException,
uno::RuntimeException )
{
@@ -841,11 +842,11 @@ FileProvider::removePropertyChangeListener(
}
void SAL_CALL
-FileProvider::addVetoableChangeListener(
+FileProvider::addVetoableChangeListener(
const rtl::OUString& PropertyName,
- const uno::Reference< beans::XVetoableChangeListener >& aListener )
- throw( beans::UnknownPropertyException,
- lang::WrappedTargetException,
+ const uno::Reference< beans::XVetoableChangeListener >& aListener )
+ throw( beans::UnknownPropertyException,
+ lang::WrappedTargetException,
uno::RuntimeException )
{
return;
@@ -853,11 +854,11 @@ FileProvider::addVetoableChangeListener(
void SAL_CALL
-FileProvider::removeVetoableChangeListener(
- const rtl::OUString& PropertyName,
- const uno::Reference< beans::XVetoableChangeListener >& aListener )
- throw( beans::UnknownPropertyException,
- lang::WrappedTargetException,
+FileProvider::removeVetoableChangeListener(
+ const rtl::OUString& PropertyName,
+ const uno::Reference< beans::XVetoableChangeListener >& aListener )
+ throw( beans::UnknownPropertyException,
+ lang::WrappedTargetException,
uno::RuntimeException)
{
return;
@@ -895,12 +896,12 @@ rtl::OUString SAL_CALL FileProvider::getFileURLFromSystemPath( const rtl::OUStri
sal_Bool success = m_pMyShell->uncheckMountPoint( aNormalizedPath,aRed );
if( ! success )
return rtl::OUString();
-
+
rtl::OUString aUrl;
sal_Bool err = m_pMyShell->getUrlFromUnq( aRed,aUrl );
if( err )
return rtl::OUString();
-
+
return aUrl;
}
@@ -911,12 +912,12 @@ rtl::OUString SAL_CALL FileProvider::getSystemPathFromFileURL( const rtl::OUStri
sal_Bool err = m_pMyShell->getUnqFromUrl( URL,aUnq );
if( err )
return rtl::OUString();
-
+
rtl::OUString aRed;
sal_Bool success = m_pMyShell->checkMountPoint( aUnq,aRed );
- if( ! success )
+ if( ! success )
return rtl::OUString();
-
+
rtl::OUString aSystemPath;
if (osl::FileBase::getSystemPathFromNormalizedPath( aRed,aSystemPath ) != osl::FileBase::E_None )
return rtl::OUString();