summaryrefslogtreecommitdiffstats
path: root/ucb
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-05-10 13:21:42 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-05-10 13:21:42 +0000
commitba966e4b41649a25e4aef1104b366b55e1beb4db (patch)
treeab1db4e24c894b161213adae9c0167f3417b65c1 /ucb
parentINTEGRATION: CWS relocinst (1.4.156); FILE MERGED (diff)
downloadcore-ba966e4b41649a25e4aef1104b366b55e1beb4db.tar.gz
core-ba966e4b41649a25e4aef1104b366b55e1beb4db.zip
INTEGRATION: CWS relocinst (1.15.156); FILE MERGED
2004/04/22 11:31:17 kso 1.15.156.1: #116448# - Does no longer use ooSetupInstallPath and OfficeInstall config items. - removed mountpoints support (not needed any longer). CVS: ----------------------------------------------------------------------
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/file/filrset.cxx165
1 files changed, 12 insertions, 153 deletions
diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx
index 50f5757c6b59..3e99a5b9144d 100644
--- a/ucb/source/ucp/file/filrset.cxx
+++ b/ucb/source/ucp/file/filrset.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: filrset.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: hr $ $Date: 2001-10-24 16:20:07 $
+ * last change: $Author: hr $ $Date: 2004-05-10 14:21:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -129,25 +129,17 @@ XResultSet_impl::XResultSet_impl( shell* pMyShell,
m_nErrorCode( TASKHANDLER_NO_ERROR ),
m_nMinorErrorCode( TASKHANDLER_NO_ERROR )
{
- m_bFaked = m_pMyShell->m_bFaked && m_aBaseDirectory.compareToAscii( "//./" ) == 0;
- if( m_bFaked )
+ osl::FileBase::RC err = m_aFolder.open();
+ if( err != osl::FileBase::E_None )
{
- m_nIsOpen = true;
- }
- else
- {
- osl::FileBase::RC err = m_aFolder.open();
- if( err != osl::FileBase::E_None )
- {
- m_nIsOpen = false;
- m_aFolder.close();
+ m_nIsOpen = false;
+ m_aFolder.close();
- m_nErrorCode = TASKHANDLING_OPEN_FOR_DIRECTORYLISTING;
- m_nMinorErrorCode = err;
- }
- else
- m_nIsOpen = true;
+ m_nErrorCode = TASKHANDLING_OPEN_FOR_DIRECTORYLISTING;
+ m_nMinorErrorCode = err;
}
+ else
+ m_nIsOpen = true;
m_pMyShell->registerNotifier( m_aBaseDirectory,this );
}
@@ -157,7 +149,7 @@ XResultSet_impl::~XResultSet_impl()
{
m_pMyShell->deregisterNotifier( m_aBaseDirectory,this );
- if( m_nIsOpen && ! m_bFaked )
+ if( m_nIsOpen )
m_aFolder.close();
delete m_pDisposeEventListeners;
@@ -346,32 +338,6 @@ void XResultSet_impl::isFinalChanged()
sal_Bool SAL_CALL
-XResultSet_impl::OneMoreFaked( void )
- throw( sdbc::SQLException,
- RuntimeException )
-{
- sal_uInt32 k = m_aItems.size();
- if( k < m_pMyShell->m_vecMountPoint.size() &&
- ( m_nOpenMode == OpenMode::ALL || m_nOpenMode == OpenMode::FOLDERS ) )
- {
- sal_Bool IsRegular;
- rtl::OUString aUnqPath = m_pMyShell->m_vecMountPoint[k].m_aDirectory;
- osl::DirectoryItem aDirItem;
- osl::DirectoryItem::get( aUnqPath,aDirItem );
- Reference< sdbc::XRow > aRow = m_pMyShell->getv( -1,this,m_sProperty,aDirItem,aUnqPath,IsRegular );
- vos::OGuard aGuard( m_aMutex );
- m_aItems.push_back( aRow );
- m_aIdents.push_back( Reference< XContentIdentifier >() );
- m_aUnqPath.push_back( aUnqPath );
- rowCountChanged();
- return true;
- }
-
- return false;
-}
-
-
-sal_Bool SAL_CALL
XResultSet_impl::OneMore(
void )
throw( sdbc::SQLException,
@@ -379,9 +345,6 @@ XResultSet_impl::OneMore(
{
if( ! m_nIsOpen ) return false;
- if( m_bFaked )
- return OneMoreFaked();
-
osl::FileBase::RC err;
sal_Bool IsRegular;
rtl::OUString aUnqPath;
@@ -450,84 +413,6 @@ XResultSet_impl::OneMore(
-/*
- sal_Bool SAL_CALL
- XResultSet_impl::OneMore(
- void )
- throw( sdbc::SQLException,
- RuntimeException )
- {
- if( m_bFaked )
- return OneMoreFaked();
-
- osl::DirectoryItem m_aDirIte;
-
- if( ! m_nIsOpen ) return false;
-
- osl::FileBase::RC err = m_aFolder.getNextItem( m_aDirIte );
-
- if( err == osl::FileBase::E_NOENT || err == osl::FileBase::E_INVAL )
- {
- m_aFolder.close();
- isFinalChanged();
- return ( m_nIsOpen = false );
- }
- else if( err == osl::FileBase::E_None )
- {
- sal_Bool IsRegular;
- rtl::OUString aUnqPath;
- Reference< sdbc::XRow > aRow = m_pMyShell->getv( -1,this,m_sProperty,m_aDirIte,aUnqPath,IsRegular );
-
- if( m_nOpenMode == OpenMode::DOCUMENTS )
- {
- if( IsRegular )
- {
- vos::OGuard aGuard( m_aMutex );
- m_aItems.push_back( aRow );
- m_aIdents.push_back( Reference< XContentIdentifier >() );
- m_aUnqPath.push_back( aUnqPath );
- rowCountChanged();
- return true;
- }
- else
- {
- return OneMore();
- }
- }
- else if( m_nOpenMode == OpenMode::FOLDERS )
- {
- if( ! IsRegular )
- {
- vos::OGuard aGuard( m_aMutex );
- m_aItems.push_back( aRow );
- m_aIdents.push_back( Reference< XContentIdentifier >() );
- m_aUnqPath.push_back( aUnqPath );
- rowCountChanged();
- return true;
- }
- else
- {
- return OneMore();
- }
- }
- else
- {
- vos::OGuard aGuard( m_aMutex );
- m_aItems.push_back( aRow );
- m_aIdents.push_back( Reference< XContentIdentifier >() );
- m_aUnqPath.push_back( aUnqPath );
- rowCountChanged();
- return true;
- }
- }
- else
- {
- throw sdbc::SQLException();
- return false;
- }
- }
-*/
-
sal_Bool SAL_CALL
XResultSet_impl::next(
@@ -645,30 +530,6 @@ XResultSet_impl::getRow(
}
-// sal_Bool SAL_CALL
-// XResultSet_impl::absolute(
-// sal_Int32 row )
-// throw( sdbc::SQLException,
-// RuntimeException)
-// {
-// if( !row )
-// throw sdbc::SQLException();
-
-// if( row >= 0 )
-// {
-// m_nRow = -1;
-// while( row-- ) next();
-// }
-// else
-// {
-// row = - row - 1;
-// last();
-// while( row-- ) --m_nRow;
-// }
-
-// return 0<= m_nRow && m_nRow < m_aItems.size();
-// }
-
sal_Bool SAL_CALL XResultSet_impl::absolute( sal_Int32 row )
throw( sdbc::SQLException, RuntimeException)
@@ -786,9 +647,7 @@ XResultSet_impl::close(
{
if( m_nIsOpen )
{
- if( ! m_bFaked )
- m_aFolder.close();
-
+ m_aFolder.close();
isFinalChanged();
vos::OGuard aGuard( m_aMutex );
m_nIsOpen = false;