summaryrefslogtreecommitdiff
path: root/ucb/source
diff options
context:
space:
mode:
authorAndreas Bille <abi@openoffice.org>2001-12-05 11:10:16 +0000
committerAndreas Bille <abi@openoffice.org>2001-12-05 11:10:16 +0000
commit1fa7112bb9298efa147ce8f726217b2a889d3fb7 (patch)
tree567ba36d7110e40efeb28a31f935db07f1f6ee48 /ucb/source
parentfe79573ff975f9b13940421a1147b77cb420ca21 (diff)
#95399#Properties IsFloppy, IsCompactDisc
Diffstat (limited to 'ucb/source')
-rw-r--r--ucb/source/ucp/file/shell.cxx63
-rw-r--r--ucb/source/ucp/file/shell.hxx6
2 files changed, 63 insertions, 6 deletions
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx
index 89aab8eeace3..75307257ae06 100644
--- a/ucb/source/ucp/file/shell.cxx
+++ b/ucb/source/ucp/file/shell.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: shell.cxx,v $
*
- * $Revision: 1.66 $
+ * $Revision: 1.67 $
*
- * last change: $Author: abi $ $Date: 2001-11-27 12:24:50 $
+ * last change: $Author: abi $ $Date: 2001-12-05 12:10:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -271,6 +271,8 @@ shell::shell( const uno::Reference< lang::XMultiServiceFactory >& xMultiServiceF
IsVolume( rtl::OUString::createFromAscii( "IsVolume" ) ),
IsRemoveable( rtl::OUString::createFromAscii( "IsRemoveable" ) ),
IsRemote( rtl::OUString::createFromAscii( "IsRemote" ) ),
+ IsCompactDisc( rtl::OUString::createFromAscii( "IsCompactDisc" ) ),
+ IsFloppy( rtl::OUString::createFromAscii( "IsFloppy" ) ),
IsHidden( rtl::OUString::createFromAscii( "IsHidden" ) ),
ContentType( rtl::OUString::createFromAscii( "ContentType" ) ),
IsReadOnly( rtl::OUString::createFromAscii( "IsReadOnly" ) ),
@@ -345,6 +347,28 @@ shell::shell( const uno::Reference< lang::XMultiServiceFactory >& xMultiServiceF
| beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::READONLY ) );
+ // CompactDisc
+ m_aDefaultProperties.insert( MyProperty( true,
+ IsCompactDisc,
+ -1 ,
+ getCppuType( static_cast< sal_Bool* >( 0 ) ),
+ uno::Any(),
+ beans::PropertyState_DEFAULT_VALUE,
+ beans::PropertyAttribute::MAYBEVOID
+ | beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ // Floppy
+ m_aDefaultProperties.insert( MyProperty( true,
+ IsFloppy,
+ -1 ,
+ getCppuType( static_cast< sal_Bool* >( 0 ) ),
+ uno::Any(),
+ beans::PropertyState_DEFAULT_VALUE,
+ beans::PropertyAttribute::MAYBEVOID
+ | beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
// Remote
m_aDefaultProperties.insert( MyProperty( true,
IsHidden,
@@ -2140,7 +2164,7 @@ shell::commit( const shell::ContentMap::iterator& it,
}
- sal_Bool isDirectory,isFile,isVolume,isRemoveable,isRemote;
+ sal_Bool isDirectory,isFile,isVolume,isRemoveable,isRemote,isFloppy,isCompactDisc;
if( aFileStatus.isValid( FileStatusMask_Type ) )
{
@@ -2200,13 +2224,25 @@ shell::commit( const shell::ContentMap::iterator& it,
{
// Retrieve the flags;
isRemote = aVolumeInfo.getRemoteFlag();
- sal_Bool isRemoveable = aVolumeInfo.getRemoveableFlag();
+ isRemoveable = aVolumeInfo.getRemoveableFlag();
+ isCompactDisc = aVolumeInfo.getCompactDiscFlag();
+ isFloppy = aVolumeInfo.getFloppyDiskFlag();
+
aAny <<= isRemote;
it1 = properties.find( MyProperty( IsRemote ) );
if( it1 != properties.end() ) it1->setValue( aAny );
+
aAny <<= isRemoveable;
it1 = properties.find( MyProperty( IsRemoveable ) );
if( it1 != properties.end() ) it1->setValue( aAny );
+
+ aAny <<= isCompactDisc;
+ it1 = properties.find( MyProperty( IsCompactDisc ) );
+ if( it1 != properties.end() ) it1->setValue( aAny );
+
+ aAny <<= isFloppy;
+ it1 = properties.find( MyProperty( IsFloppy ) );
+ if( it1 != properties.end() ) it1->setValue( aAny );
}
else
{
@@ -2216,6 +2252,10 @@ shell::commit( const shell::ContentMap::iterator& it,
if( it1 != properties.end() ) it1->setValue( aAny );
it1 = properties.find( MyProperty( IsRemoveable ) );
if( it1 != properties.end() ) it1->setValue( aAny );
+ it1 = properties.find( MyProperty( IsCompactDisc ) );
+ if( it1 != properties.end() ) it1->setValue( aAny );
+ it1 = properties.find( MyProperty( IsFloppy ) );
+ if( it1 != properties.end() ) it1->setValue( aAny );
}
}
else
@@ -2234,6 +2274,12 @@ shell::commit( const shell::ContentMap::iterator& it,
it1 = properties.find( MyProperty( IsRemoveable ) );
if( it1 != properties.end() ) it1->setValue( emptyAny );
+
+ it1 = properties.find( MyProperty( IsCompactDisc ) );
+ if( it1 != properties.end() ) it1->setValue( emptyAny );
+
+ it1 = properties.find( MyProperty( IsFloppy ) );
+ if( it1 != properties.end() ) it1->setValue( emptyAny );
}
@@ -2242,6 +2288,7 @@ shell::commit( const shell::ContentMap::iterator& it,
isFile = false;
isVolume = isDirectory = true;
isRemoveable = isRemote = false;
+ isFloppy = isCompactDisc = false;
aAny <<= isDirectory;
it1 = properties.find( MyProperty( IsFolder ) );
@@ -2262,6 +2309,14 @@ shell::commit( const shell::ContentMap::iterator& it,
aAny <<= isRemote;
it1 = properties.find( MyProperty( IsRemote ) );
if( it1 != properties.end() ) it1->setValue( aAny );
+
+ aAny <<= isCompactDisc;
+ it1 = properties.find( MyProperty( IsCompactDisc ) );
+ if( it1 != properties.end() ) it1->setValue( aAny );
+
+ aAny <<= isFloppy;
+ it1 = properties.find( MyProperty( IsFloppy ) );
+ if( it1 != properties.end() ) it1->setValue( aAny );
}
diff --git a/ucb/source/ucp/file/shell.hxx b/ucb/source/ucp/file/shell.hxx
index 434edf1d5563..f347cf41b920 100644
--- a/ucb/source/ucp/file/shell.hxx
+++ b/ucb/source/ucp/file/shell.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: shell.hxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: abi $ $Date: 2001-11-27 12:24:50 $
+ * last change: $Author: abi $ $Date: 2001-12-05 12:10:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -672,6 +672,8 @@ namespace fileaccess {
const rtl::OUString IsVolume;
const rtl::OUString IsRemoveable;
const rtl::OUString IsRemote;
+ const rtl::OUString IsCompactDisc;
+ const rtl::OUString IsFloppy;
const rtl::OUString IsHidden;
const rtl::OUString ContentType;
const rtl::OUString IsReadOnly;