diff options
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/file/bc.cxx | 16 | ||||
-rw-r--r-- | ucb/source/ucp/file/filtask.cxx | 37 | ||||
-rw-r--r-- | ucb/source/ucp/file/filtask.hxx | 21 |
3 files changed, 30 insertions, 44 deletions
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx index f42cdf84fd76..d72191b7c144 100644 --- a/ucb/source/ucp/file/bc.cxx +++ b/ucb/source/ucp/file/bc.cxx @@ -457,9 +457,9 @@ BaseContent::getContentType() if( m_nState & JustInserted ) { if ( m_bFolder ) - return m_pMyShell->FolderContentType; + return TaskManager::FolderContentType; else - return m_pMyShell->FileContentType; + return TaskManager::FileContentType; } else { @@ -477,9 +477,9 @@ BaseContent::getContentType() if ( !xRow->wasNull() ) { if ( IsDocument ) - return m_pMyShell->FileContentType; + return TaskManager::FileContentType; else - return m_pMyShell->FolderContentType; + return TaskManager::FolderContentType; } else { @@ -569,10 +569,10 @@ BaseContent::createNewContent( const ContentInfo& Info ) if ( Info.Type.isEmpty() ) return Reference< XContent >(); - bool bFolder = Info.Type == m_pMyShell->FolderContentType; + bool bFolder = Info.Type == TaskManager::FolderContentType; if ( !bFolder ) { - if ( Info.Type != m_pMyShell->FileContentType ) + if ( Info.Type != TaskManager::FileContentType ) { // Neither folder nor file to create! return Reference< XContent >(); @@ -733,8 +733,8 @@ BaseContent::getPropertyValues( if ( rProp.Name == "ContentType" ) { - rValue <<= m_bFolder ? m_pMyShell->FolderContentType - : m_pMyShell->FileContentType; + rValue <<= OUString(m_bFolder ? TaskManager::FolderContentType + : TaskManager::FileContentType); } else if ( rProp.Name == "IsFolder" ) { diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx index 4ae6cc06e15a..474942bb6040 100644 --- a/ucb/source/ucp/file/filtask.cxx +++ b/ucb/source/ucp/file/filtask.cxx @@ -116,28 +116,31 @@ TaskManager::MyProperty::~MyProperty() #include "filinl.hxx" + // Default properties + +static const OUStringLiteral Title( "Title" ); +static const OUStringLiteral CasePreservingURL( "CasePreservingURL" ); +static const OUStringLiteral IsDocument( "IsDocument" ); +static const OUStringLiteral IsFolder( "IsFolder" ); +static const OUStringLiteral DateModified( "DateModified" ); +static const OUStringLiteral Size( "Size" ); +static const OUStringLiteral IsVolume( "IsVolume" ); +static const OUStringLiteral IsRemoveable( "IsRemoveable" ); +static const OUStringLiteral IsRemote( "IsRemote" ); +static const OUStringLiteral IsCompactDisc( "IsCompactDisc" ); +static const OUStringLiteral IsFloppy( "IsFloppy" ); +static const OUStringLiteral IsHidden( "IsHidden" ); +static const OUStringLiteral ContentType( "ContentType" ); +static const OUStringLiteral IsReadOnly( "IsReadOnly" ); +static const OUStringLiteral CreatableContentsInfo( "CreatableContentsInfo" ); +const OUStringLiteral TaskManager::FolderContentType( "application/vnd.sun.staroffice.fsys-folder" ); +const OUStringLiteral TaskManager::FileContentType( "application/vnd.sun.staroffice.fsys-file" ); + TaskManager::TaskManager( const uno::Reference< uno::XComponentContext >& rxContext, FileProvider* pProvider, bool bWithConfig ) : m_nCommandId( 0 ), m_pProvider( pProvider ), m_xContext( rxContext ), - Title( "Title" ), - CasePreservingURL( "CasePreservingURL" ), - IsDocument( "IsDocument" ), - IsFolder( "IsFolder" ), - DateModified( "DateModified" ), - Size( "Size" ), - IsVolume( "IsVolume" ), - IsRemoveable( "IsRemoveable" ), - IsRemote( "IsRemote" ), - IsCompactDisc( "IsCompactDisc" ), - IsFloppy( "IsFloppy" ), - IsHidden( "IsHidden" ), - ContentType( "ContentType" ), - IsReadOnly( "IsReadOnly" ), - CreatableContentsInfo( "CreatableContentsInfo" ), - FolderContentType( "application/vnd.sun.staroffice.fsys-folder" ), - FileContentType( "application/vnd.sun.staroffice.fsys-file" ), m_sCommandInfo( 9 ) { // Title diff --git a/ucb/source/ucp/file/filtask.hxx b/ucb/source/ucp/file/filtask.hxx index d50400f082de..6b151c2d45f3 100644 --- a/ucb/source/ucp/file/filtask.hxx +++ b/ucb/source/ucp/file/filtask.hxx @@ -645,28 +645,11 @@ namespace fileaccess // General ContentMap m_aContent; - // Default properties - - const OUString Title; - const OUString CasePreservingURL; - const OUString IsDocument; - const OUString IsFolder; - const OUString DateModified; - const OUString Size; - const OUString IsVolume; - const OUString IsRemoveable; - const OUString IsRemote; - const OUString IsCompactDisc; - const OUString IsFloppy; - const OUString IsHidden; - const OUString ContentType; - const OUString IsReadOnly; - const OUString CreatableContentsInfo; public: - const OUString FolderContentType; - const OUString FileContentType; + static const OUStringLiteral FolderContentType; + static const OUStringLiteral FileContentType; private: |