2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2001-05-07 09:33:55 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 19:07:59 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2001-05-07 09:33:55 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2001-05-07 09:33:55 +00:00
|
|
|
*
|
2008-04-10 19:07:59 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2001-05-07 09:33:55 +00:00
|
|
|
*
|
2008-04-10 19:07:59 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2001-05-07 09:33:55 +00:00
|
|
|
*
|
2008-04-10 19:07:59 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2001-05-07 09:33:55 +00:00
|
|
|
*
|
2008-04-10 19:07:59 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2001-05-07 09:33:55 +00:00
|
|
|
*
|
2008-04-10 19:07:59 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2001-05-07 09:33:55 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2012-03-12 19:58:09 +01:00
|
|
|
#include "sal/config.h"
|
2006-09-17 13:32:45 +00:00
|
|
|
|
2010-04-16 23:00:12 +02:00
|
|
|
#include <svtools/fileview.hxx>
|
2012-04-25 15:33:16 +01:00
|
|
|
#include <svtools/svtresid.hxx>
|
2010-04-16 23:00:12 +02:00
|
|
|
#include <svtools/imagemgr.hxx>
|
2007-06-27 20:19:11 +00:00
|
|
|
#include <svtools/headbar.hxx>
|
|
|
|
#include <svtools/svtabbx.hxx>
|
2010-04-09 11:05:09 +02:00
|
|
|
#include <svtools/svtools.hrc>
|
2001-07-11 08:56:57 +00:00
|
|
|
#include "fileview.hrc"
|
2012-03-12 19:58:09 +01:00
|
|
|
#include "fileview.hxx"
|
2004-10-22 11:33:22 +00:00
|
|
|
#include "contentenumeration.hxx"
|
2007-06-27 20:19:11 +00:00
|
|
|
#include <svtools/AccessibleBrowseBoxObjType.hxx>
|
2001-05-07 09:33:55 +00:00
|
|
|
#include <com/sun/star/util/DateTime.hpp>
|
|
|
|
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
|
|
|
#include <com/sun/star/task/XInteractionHandler.hpp>
|
|
|
|
#include <com/sun/star/ucb/XProgressHandler.hpp>
|
|
|
|
#include <com/sun/star/sdbc/XResultSet.hpp>
|
|
|
|
#include <com/sun/star/ucb/XAnyCompareFactory.hpp>
|
|
|
|
#include <com/sun/star/ucb/XContentAccess.hpp>
|
|
|
|
#include <com/sun/star/ucb/XDynamicResultSet.hpp>
|
|
|
|
#include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp>
|
|
|
|
#include <com/sun/star/sdbc/XRow.hpp>
|
|
|
|
#include <com/sun/star/container/XChild.hpp>
|
2001-05-08 12:10:04 +00:00
|
|
|
#include <com/sun/star/ucb/CommandAbortedException.hpp>
|
2001-07-17 11:47:56 +00:00
|
|
|
#include <com/sun/star/ucb/ContentCreationException.hpp>
|
2001-09-05 09:29:14 +00:00
|
|
|
#include <vcl/waitobj.hxx>
|
2001-10-19 12:59:02 +00:00
|
|
|
#include <com/sun/star/io/XPersist.hpp>
|
|
|
|
#include <com/sun/star/beans/XPropertySet.hpp>
|
2010-06-07 10:56:29 +02:00
|
|
|
#include <com/sun/star/ucb/XCommandInfo.hpp>
|
|
|
|
#include <com/sun/star/beans/XPropertySetInfo.hpp>
|
|
|
|
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
2001-05-07 09:33:55 +00:00
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
#include <algorithm>
|
2004-10-22 11:33:22 +00:00
|
|
|
#include <memory>
|
2001-05-07 09:33:55 +00:00
|
|
|
#include <tools/urlobj.hxx>
|
|
|
|
#include <comphelper/processfactory.hxx>
|
2011-11-22 23:40:24 +00:00
|
|
|
#include <comphelper/string.hxx>
|
2001-05-07 09:33:55 +00:00
|
|
|
#include <unotools/localfilehelper.hxx>
|
|
|
|
#include <ucbhelper/content.hxx>
|
|
|
|
#include <ucbhelper/commandenvironment.hxx>
|
|
|
|
#include <vcl/msgbox.hxx>
|
2003-03-27 13:40:07 +00:00
|
|
|
#include <rtl/math.hxx>
|
2001-10-19 12:59:02 +00:00
|
|
|
#include <tools/config.hxx>
|
2001-07-18 10:46:38 +00:00
|
|
|
#include <osl/mutex.hxx>
|
2004-10-22 11:33:22 +00:00
|
|
|
#include <osl/conditn.hxx>
|
2010-10-11 20:57:53 -05:00
|
|
|
#include <salhelper/timer.hxx>
|
2001-05-07 09:33:55 +00:00
|
|
|
#include <vcl/svapp.hxx>
|
2001-07-20 09:41:40 +00:00
|
|
|
#include <vcl/sound.hxx>
|
2001-05-07 09:33:55 +00:00
|
|
|
#include <unotools/ucbhelper.hxx>
|
2002-03-14 12:10:32 +00:00
|
|
|
#include <unotools/intlwrapper.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <unotools/syslocale.hxx>
|
|
|
|
#include <svl/urlfilter.hxx>
|
2001-05-07 09:33:55 +00:00
|
|
|
|
|
|
|
using namespace ::com::sun::star::lang;
|
|
|
|
using namespace ::com::sun::star::sdbc;
|
|
|
|
using namespace ::com::sun::star::task;
|
|
|
|
using namespace ::com::sun::star::ucb;
|
|
|
|
using namespace ::com::sun::star::uno;
|
2001-10-19 12:59:02 +00:00
|
|
|
using namespace ::com::sun::star::io;
|
|
|
|
using namespace ::com::sun::star::beans;
|
2001-05-07 09:33:55 +00:00
|
|
|
using namespace ::comphelper;
|
2004-10-22 11:33:22 +00:00
|
|
|
using ::svt::SortingData_Impl;
|
|
|
|
using ::svt::FolderDescriptor;
|
|
|
|
using ::rtl::OUString;
|
2001-05-07 09:33:55 +00:00
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
#define ALL_FILES_FILTER "*.*"
|
|
|
|
|
2001-07-25 09:15:46 +00:00
|
|
|
#define COLUMN_TITLE 1
|
|
|
|
#define COLUMN_TYPE 2
|
|
|
|
#define COLUMN_SIZE 3
|
|
|
|
#define COLUMN_DATE 4
|
|
|
|
|
2012-02-27 19:07:35 +09:00
|
|
|
#define SEPARATOR_STR "----------------------------------"
|
2011-04-27 15:09:42 +02:00
|
|
|
|
2010-06-07 09:49:05 +02:00
|
|
|
#define ROW_HEIGHT 17 // the height of a row has to be a little higher than the bitmap
|
2001-07-20 10:19:02 +00:00
|
|
|
#define QUICK_SEARCH_TIMEOUT 1500 // time in mSec before the quicksearch string will be reseted
|
2001-05-07 09:33:55 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
namespace
|
|
|
|
{
|
|
|
|
//====================================================================
|
|
|
|
//= ITimeoutHandler
|
|
|
|
//====================================================================
|
|
|
|
class CallbackTimer;
|
|
|
|
class ITimeoutHandler
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onTimeout( CallbackTimer* _pInstigator ) = 0;
|
2012-03-14 13:27:56 +01:00
|
|
|
|
|
|
|
protected:
|
|
|
|
~ITimeoutHandler() {}
|
2004-10-22 11:33:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
//= CallbackTimer
|
|
|
|
//====================================================================
|
2010-10-11 20:57:53 -05:00
|
|
|
class CallbackTimer : public ::salhelper::Timer
|
2004-10-22 11:33:22 +00:00
|
|
|
{
|
|
|
|
protected:
|
|
|
|
ITimeoutHandler* m_pTimeoutHandler;
|
|
|
|
|
|
|
|
public:
|
|
|
|
CallbackTimer( ITimeoutHandler* _pHandler ) : m_pTimeoutHandler( _pHandler ) { }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void SAL_CALL onShot();
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
void SAL_CALL CallbackTimer::onShot()
|
|
|
|
{
|
|
|
|
OSL_ENSURE( m_pTimeoutHandler, "CallbackTimer::onShot: nobody interested in?" );
|
|
|
|
ITimeoutHandler* pHandler( m_pTimeoutHandler );
|
|
|
|
if ( pHandler )
|
|
|
|
pHandler->onTimeout( this );
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2002-05-23 13:11:31 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2004-08-02 13:35:15 +00:00
|
|
|
void FilterMatch::createWildCardFilterList(const String& _rFilterList,::std::vector< WildCard >& _rFilters)
|
|
|
|
{
|
|
|
|
if( _rFilterList.Len() )
|
2012-01-02 10:55:27 +00:00
|
|
|
{
|
|
|
|
// filter is given
|
2004-08-02 13:35:15 +00:00
|
|
|
xub_StrLen nIndex = 0;
|
|
|
|
OUString sToken;
|
|
|
|
do
|
|
|
|
{
|
|
|
|
sToken = _rFilterList.GetToken( 0, ';', nIndex );
|
2012-01-13 19:13:55 -02:00
|
|
|
if ( !sToken.isEmpty() )
|
2004-08-02 13:35:15 +00:00
|
|
|
{
|
|
|
|
_rFilters.push_back( WildCard( sToken.toAsciiUpperCase() ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
while ( nIndex != STRING_NOTFOUND );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
// no filter is given -> match all
|
|
|
|
_rFilters.push_back( WildCard( String::CreateFromAscii( "*" ) ) );
|
|
|
|
}
|
2001-07-18 12:42:33 +00:00
|
|
|
// class ViewTabListBox_Impl ---------------------------------------------
|
|
|
|
|
|
|
|
class ViewTabListBox_Impl : public SvHeaderTabListBox
|
|
|
|
{
|
|
|
|
private:
|
2001-07-27 12:28:31 +00:00
|
|
|
Reference< XCommandEnvironment > mxCmdEnv;
|
|
|
|
|
2001-07-20 09:41:40 +00:00
|
|
|
::osl::Mutex maMutex;
|
2001-07-18 12:42:33 +00:00
|
|
|
HeaderBar* mpHeaderBar;
|
|
|
|
SvtFileView_Impl* mpParent;
|
2001-07-20 09:41:40 +00:00
|
|
|
Timer maResetQuickSearch;
|
|
|
|
OUString maQuickSearchText;
|
2002-09-13 11:37:32 +00:00
|
|
|
String msAccessibleDescText;
|
|
|
|
String msFolder;
|
|
|
|
String msFile;
|
2001-07-20 09:41:40 +00:00
|
|
|
sal_uInt32 mnSearchIndex;
|
2001-07-18 12:42:33 +00:00
|
|
|
sal_Bool mbResizeDisabled : 1;
|
|
|
|
sal_Bool mbAutoResize : 1;
|
2001-07-19 09:12:13 +00:00
|
|
|
sal_Bool mbEnableDelete : 1;
|
2010-06-07 10:56:29 +02:00
|
|
|
sal_Bool mbEnableRename : 1;
|
2012-03-14 19:45:08 +01:00
|
|
|
bool mbShowHeader;
|
2001-07-18 12:42:33 +00:00
|
|
|
|
2001-07-19 09:12:13 +00:00
|
|
|
void DeleteEntries();
|
2001-07-20 09:41:40 +00:00
|
|
|
void DoQuickSearch( const xub_Unicode& rChar );
|
2001-07-27 12:28:31 +00:00
|
|
|
sal_Bool Kill( const OUString& rURL );
|
2001-07-18 12:42:33 +00:00
|
|
|
|
2001-12-07 14:39:24 +00:00
|
|
|
protected:
|
2010-11-05 10:31:15 +08:00
|
|
|
virtual sal_Bool DoubleClickHdl();
|
2006-06-19 19:50:20 +00:00
|
|
|
virtual ::rtl::OUString GetAccessibleObjectDescription( ::svt::AccessibleBrowseBoxObjType _eType, sal_Int32 _nPos ) const;
|
2001-12-07 14:39:24 +00:00
|
|
|
|
2001-07-18 12:42:33 +00:00
|
|
|
public:
|
2002-09-13 11:37:32 +00:00
|
|
|
ViewTabListBox_Impl( Window* pParentWin, SvtFileView_Impl* pParent, sal_Int16 nFlags );
|
|
|
|
~ViewTabListBox_Impl();
|
2001-07-18 12:42:33 +00:00
|
|
|
|
|
|
|
virtual void Resize();
|
|
|
|
virtual void KeyInput( const KeyEvent& rKEvt );
|
2012-03-17 10:06:47 +00:00
|
|
|
virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText );
|
2001-07-18 12:42:33 +00:00
|
|
|
|
|
|
|
void ClearAll();
|
|
|
|
HeaderBar* GetHeaderBar() const { return mpHeaderBar; }
|
2001-07-20 09:41:40 +00:00
|
|
|
|
|
|
|
void EnableAutoResize() { mbAutoResize = sal_True; }
|
2001-07-19 09:12:13 +00:00
|
|
|
void EnableDelete( sal_Bool bEnable ) { mbEnableDelete = bEnable; }
|
2010-06-07 10:56:29 +02:00
|
|
|
void EnableRename( sal_Bool bEnable ) { mbEnableRename = bEnable; }
|
2002-03-13 13:28:49 +00:00
|
|
|
sal_Bool IsDeleteOrContextMenuEnabled() { return mbEnableDelete || IsContextMenuHandlingEnabled(); }
|
2001-07-20 09:41:40 +00:00
|
|
|
|
2001-07-27 12:28:31 +00:00
|
|
|
Reference< XCommandEnvironment > GetCommandEnvironment() const { return mxCmdEnv; }
|
|
|
|
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(ResetQuickSearch_Impl, void *);
|
2002-03-13 13:28:49 +00:00
|
|
|
|
2002-09-13 11:37:32 +00:00
|
|
|
virtual PopupMenu* CreateContextMenu( void );
|
2010-11-05 10:31:15 +08:00
|
|
|
virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopentry );
|
2001-07-18 12:42:33 +00:00
|
|
|
};
|
|
|
|
|
2001-10-19 12:59:02 +00:00
|
|
|
// class HashedEntry --------------------------------------------------
|
|
|
|
|
|
|
|
class HashedEntry
|
|
|
|
{ // just a special String which can be compared on equality much faster
|
|
|
|
protected:
|
|
|
|
OUString maName;
|
|
|
|
sal_Int32 mnHashCode;
|
|
|
|
public:
|
|
|
|
inline HashedEntry( const OUString& rName );
|
|
|
|
inline HashedEntry( const INetURLObject& rURL );
|
|
|
|
inline HashedEntry( const HashedEntry& rCopy );
|
|
|
|
virtual ~HashedEntry();
|
|
|
|
|
|
|
|
inline sal_Bool operator ==( const HashedEntry& rRef ) const;
|
|
|
|
inline sal_Bool operator !=( const HashedEntry& rRef ) const;
|
|
|
|
|
|
|
|
inline const OUString& GetName() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
inline HashedEntry::HashedEntry( const OUString& rName ): maName( rName ), mnHashCode( rName.hashCode() )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
inline HashedEntry::HashedEntry( const INetURLObject& rURL ):
|
|
|
|
maName( rURL.GetMainURL( INetURLObject::NO_DECODE ) ),
|
|
|
|
mnHashCode( maName.hashCode() )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
inline HashedEntry::HashedEntry( const HashedEntry& r ): maName( r.maName ), mnHashCode( r.mnHashCode )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
HashedEntry::~HashedEntry()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
inline sal_Bool HashedEntry::operator ==( const HashedEntry& rRef ) const
|
|
|
|
{
|
|
|
|
return mnHashCode == rRef.mnHashCode && maName.reverseCompareTo( rRef.maName ) == 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline sal_Bool HashedEntry::operator !=( const HashedEntry& rRef ) const
|
|
|
|
{
|
|
|
|
return mnHashCode != rRef.mnHashCode || maName.reverseCompareTo( rRef.maName ) != 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline const OUString& HashedEntry::GetName() const
|
|
|
|
{
|
|
|
|
return maName;
|
|
|
|
}
|
|
|
|
|
|
|
|
// class HashedEntryList ----------------------------------------------
|
|
|
|
|
|
|
|
class HashedEntryList : protected List
|
|
|
|
{// provides a list of _unique_ Entries
|
|
|
|
protected:
|
2010-06-07 09:49:05 +02:00
|
|
|
inline HashedEntry* First();
|
|
|
|
inline HashedEntry* Next();
|
|
|
|
inline void Append( HashedEntry* pNewEntry );
|
2001-10-19 12:59:02 +00:00
|
|
|
public:
|
2010-06-07 09:49:05 +02:00
|
|
|
virtual ~HashedEntryList();
|
2001-10-19 12:59:02 +00:00
|
|
|
|
|
|
|
const HashedEntry* Find( const OUString& rNameToSearchFor );
|
|
|
|
const HashedEntry* Find( const HashedEntry& rToSearchFor );
|
|
|
|
// not const, because First()/Next() is used
|
2006-06-19 19:50:20 +00:00
|
|
|
using List::Insert;
|
2001-10-19 12:59:02 +00:00
|
|
|
const HashedEntry& Insert( HashedEntry* pInsertOrDelete );
|
|
|
|
// don't care about pInsertOrDelete after this any more and handle it as invalid!
|
|
|
|
// returns the Entry, which is effectively inserted
|
|
|
|
|
|
|
|
void Clear();
|
|
|
|
};
|
|
|
|
|
|
|
|
inline HashedEntry* HashedEntryList::First()
|
|
|
|
{
|
|
|
|
return ( HashedEntry* ) List::First();
|
|
|
|
}
|
|
|
|
|
|
|
|
inline HashedEntry* HashedEntryList::Next()
|
|
|
|
{
|
|
|
|
return ( HashedEntry* ) List::Next();
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void HashedEntryList::Append( HashedEntry* pNew )
|
|
|
|
{
|
|
|
|
List::Insert( pNew, LIST_APPEND );
|
|
|
|
}
|
|
|
|
|
|
|
|
HashedEntryList::~HashedEntryList()
|
|
|
|
{
|
|
|
|
Clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
const HashedEntry* HashedEntryList::Find( const OUString& rRefName )
|
|
|
|
{ // simple linear search, which should be fast enough for this purpose
|
2010-06-07 09:49:05 +02:00
|
|
|
HashedEntry aRef( rRefName );
|
2001-10-19 12:59:02 +00:00
|
|
|
HashedEntry* pIter = First();
|
|
|
|
while( pIter && *pIter != aRef )
|
|
|
|
pIter = Next();
|
|
|
|
|
|
|
|
return pIter;
|
|
|
|
}
|
|
|
|
|
|
|
|
const HashedEntry* HashedEntryList::Find( const HashedEntry& rRef )
|
|
|
|
{ // simple linear search, which should be fast enough for this purpose
|
|
|
|
HashedEntry* pIter = First();
|
|
|
|
while( pIter && *pIter != rRef )
|
|
|
|
pIter = Next();
|
|
|
|
|
|
|
|
return pIter;
|
|
|
|
}
|
|
|
|
|
|
|
|
const HashedEntry& HashedEntryList::Insert( HashedEntry* pNew )
|
|
|
|
{ // inserts (appends) only, if entry doesn't already exists
|
|
|
|
// if it already exists, pNew is deleted, because the caller must not worry about pNew any more
|
|
|
|
|
|
|
|
DBG_ASSERT( pNew, "HashedEntryList::Insert(): NULL-pointer can't be inserted" );
|
|
|
|
|
|
|
|
const HashedEntry* pSearch = Find( *pNew );
|
|
|
|
if( pSearch )
|
|
|
|
{
|
|
|
|
delete pNew;
|
|
|
|
return *pSearch;
|
|
|
|
}
|
|
|
|
|
|
|
|
Append( pNew );
|
|
|
|
|
|
|
|
return *pNew;
|
|
|
|
}
|
|
|
|
|
|
|
|
void HashedEntryList::Clear()
|
|
|
|
{
|
|
|
|
HashedEntry* p = First();
|
|
|
|
while( p )
|
|
|
|
{
|
|
|
|
delete p;
|
|
|
|
p = Next();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// class NameTranslationEntry -----------------------------------------
|
|
|
|
|
|
|
|
class NameTranslationEntry : public HashedEntry
|
|
|
|
{// a fast compareble String and another String, which is used to get a substitution for a given String
|
|
|
|
protected:
|
|
|
|
OUString maTranslatedName;
|
|
|
|
public:
|
2011-11-07 22:24:39 +00:00
|
|
|
inline NameTranslationEntry( const rtl::OUString& rOriginalName, const rtl::OUString& rTranslatedName );
|
|
|
|
inline NameTranslationEntry( const rtl::OString& rOriginalName, const rtl::OString& rTranslatedName );
|
2001-10-19 12:59:02 +00:00
|
|
|
|
|
|
|
inline const OUString& GetTranslation() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
inline NameTranslationEntry::NameTranslationEntry( const OUString& rOrg, const OUString& rTrans ):
|
|
|
|
HashedEntry( rOrg ),
|
|
|
|
maTranslatedName( rTrans )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2011-11-07 22:24:39 +00:00
|
|
|
inline NameTranslationEntry::NameTranslationEntry( const rtl::OString& rOrg, const rtl::OString& rTrans )
|
|
|
|
: HashedEntry(rtl::OStringToOUString(rOrg, RTL_TEXTENCODING_ASCII_US))
|
|
|
|
, maTranslatedName(rtl::OStringToOUString(rTrans, RTL_TEXTENCODING_UTF8))
|
2001-10-19 12:59:02 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
inline const OUString& NameTranslationEntry::GetTranslation() const
|
|
|
|
{
|
|
|
|
return maTranslatedName;
|
|
|
|
}
|
|
|
|
|
|
|
|
// class NameTranslationList -----------------------------------------
|
|
|
|
|
|
|
|
class NameTranslationList : protected HashedEntryList
|
|
|
|
{ // contains a list of substitutes of strings for a given folder (as URL)
|
|
|
|
// explanation of the circumstances see in remarks for Init();
|
|
|
|
protected:
|
2010-06-07 09:49:05 +02:00
|
|
|
INetURLObject maTransFile; // URL of file with translation entries
|
|
|
|
HashedEntry maHashedURL; // for future purposes when dealing with a set of cached
|
|
|
|
// NameTranslationLists
|
2001-10-19 12:59:02 +00:00
|
|
|
private:
|
2001-10-29 11:47:49 +00:00
|
|
|
const String maTransFileName;
|
2010-06-07 09:49:05 +02:00
|
|
|
void Init(); // reads the translation file and fills the (internal) list
|
2001-10-19 12:59:02 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
NameTranslationList( const INetURLObject& rBaseURL );
|
|
|
|
// rBaseURL: path to folder for which the translation of the entries
|
|
|
|
// should be done
|
|
|
|
|
2006-06-19 19:50:20 +00:00
|
|
|
using List::operator==;
|
2001-10-19 12:59:02 +00:00
|
|
|
inline sal_Bool operator ==( const HashedEntry& rRef ) const;
|
2006-06-19 19:50:20 +00:00
|
|
|
using List::operator!=;
|
2001-10-19 12:59:02 +00:00
|
|
|
inline sal_Bool operator !=( const HashedEntry& rRef ) const;
|
|
|
|
|
2010-06-07 09:49:05 +02:00
|
|
|
const OUString* Translate( const OUString& rName ) const;
|
2001-10-19 12:59:02 +00:00
|
|
|
// returns NULL, if rName can't be found
|
|
|
|
|
2010-06-07 09:49:05 +02:00
|
|
|
inline void Update(); // clears list and init
|
2001-10-29 11:47:49 +00:00
|
|
|
|
2010-06-07 09:49:05 +02:00
|
|
|
inline const String& GetTransTableFileName() const;
|
2001-10-29 11:47:49 +00:00
|
|
|
// returns the name for the file, which contains the translation strings
|
2001-10-19 12:59:02 +00:00
|
|
|
};
|
|
|
|
|
2001-10-29 11:47:49 +00:00
|
|
|
inline const String& NameTranslationList::GetTransTableFileName() const
|
|
|
|
{
|
|
|
|
return maTransFileName;
|
|
|
|
}
|
|
|
|
|
2001-10-19 12:59:02 +00:00
|
|
|
void NameTranslationList::Init()
|
|
|
|
{
|
|
|
|
// Tries to read the file ".nametranslation.table" in the base folder. Complete path/name is in maTransFile.
|
|
|
|
// Further on, the found entries in the section "TRANSLATIONNAMES" are used to replace names in the
|
|
|
|
// base folder by translated ones. The translation must be given in UTF8
|
|
|
|
// See examples of such a files in the samples-folder of an Office installation
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
2008-10-14 05:23:43 +00:00
|
|
|
::ucbhelper::Content aTestContent( maTransFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >() );
|
2001-10-19 12:59:02 +00:00
|
|
|
|
|
|
|
if( aTestContent.isDocument() )
|
2011-11-07 22:24:39 +00:00
|
|
|
{
|
|
|
|
// ... also tests the existence of maTransFile by throwing an Exception
|
2001-10-19 12:59:02 +00:00
|
|
|
String aFsysName( maTransFile.getFSysPath( INetURLObject::FSYS_DETECT ) );
|
|
|
|
Config aConfig( aFsysName );
|
|
|
|
|
2011-11-07 22:24:39 +00:00
|
|
|
aConfig.SetGroup( rtl::OString(RTL_CONSTASCII_STRINGPARAM("TRANSLATIONNAMES")) );
|
2001-10-19 12:59:02 +00:00
|
|
|
|
2010-11-05 10:31:15 +08:00
|
|
|
sal_uInt16 nKeyCnt = aConfig.GetKeyCount();
|
2001-10-19 12:59:02 +00:00
|
|
|
|
2010-11-05 10:31:15 +08:00
|
|
|
for( sal_uInt16 nCnt = 0 ; nCnt < nKeyCnt ; ++nCnt )
|
2001-10-19 12:59:02 +00:00
|
|
|
Insert( new NameTranslationEntry( aConfig.GetKeyName( nCnt ), aConfig.ReadKey( nCnt ) ) );
|
|
|
|
}
|
|
|
|
}
|
2010-06-07 09:49:05 +02:00
|
|
|
catch( Exception const & ) {}
|
2001-10-19 12:59:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
NameTranslationList::NameTranslationList( const INetURLObject& rBaseURL ):
|
|
|
|
maTransFile( rBaseURL ),
|
2001-10-29 11:47:49 +00:00
|
|
|
maHashedURL( rBaseURL ),
|
|
|
|
maTransFileName( String::CreateFromAscii( ".nametranslation.table" ) )
|
2001-10-19 12:59:02 +00:00
|
|
|
{
|
2001-10-29 11:47:49 +00:00
|
|
|
maTransFile.insertName( maTransFileName );
|
2001-10-19 12:59:02 +00:00
|
|
|
Init();
|
|
|
|
}
|
|
|
|
|
|
|
|
inline sal_Bool NameTranslationList::operator ==( const HashedEntry& rRef ) const
|
|
|
|
{
|
|
|
|
return maHashedURL == rRef;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline sal_Bool NameTranslationList::operator !=( const HashedEntry& rRef ) const
|
|
|
|
{
|
|
|
|
return maHashedURL != rRef;
|
|
|
|
}
|
|
|
|
|
|
|
|
const OUString* NameTranslationList::Translate( const OUString& rName ) const
|
|
|
|
{
|
|
|
|
const NameTranslationEntry* pSearch = static_cast< const NameTranslationEntry* >(
|
|
|
|
( const_cast< NameTranslationList* >( this ) )->Find( rName ) );
|
|
|
|
|
|
|
|
return pSearch? &pSearch->GetTranslation() : NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void NameTranslationList::Update()
|
|
|
|
{
|
|
|
|
Clear();
|
|
|
|
Init();
|
|
|
|
}
|
|
|
|
|
|
|
|
// class NameTranslator_Impl ------------------------------------------
|
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
// enables the user to get string substitutions (translations for the content) for a given folder
|
|
|
|
// see more explanations above in the description for NameTranslationList
|
|
|
|
class NameTranslator_Impl : public ::svt::IContentTitleTranslation
|
|
|
|
{
|
2001-10-19 12:59:02 +00:00
|
|
|
private:
|
|
|
|
NameTranslationList* mpActFolder;
|
|
|
|
public:
|
|
|
|
NameTranslator_Impl( const INetURLObject& rActualFolder );
|
2006-06-19 19:50:20 +00:00
|
|
|
virtual ~NameTranslator_Impl();
|
2001-10-19 12:59:02 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
// IContentTitleTranslation
|
|
|
|
virtual sal_Bool GetTranslation( const OUString& rOriginalName, OUString& rTranslatedName ) const;
|
|
|
|
|
2001-10-19 12:59:02 +00:00
|
|
|
void SetActualFolder( const INetURLObject& rActualFolder );
|
2001-10-29 11:47:49 +00:00
|
|
|
const String* GetTransTableFileName() const;
|
|
|
|
// returns the name for the file, which contains the translation strings
|
2001-10-19 12:59:02 +00:00
|
|
|
};
|
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
//====================================================================
|
|
|
|
//= SvtFileView_Impl
|
|
|
|
//====================================================================
|
2001-07-18 12:42:33 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
class SvtFileView_Impl :public ::svt::IEnumerationResultHandler
|
|
|
|
,public ITimeoutHandler
|
2001-07-13 12:41:02 +00:00
|
|
|
{
|
2001-12-07 14:39:24 +00:00
|
|
|
protected:
|
2004-10-22 11:33:22 +00:00
|
|
|
SvtFileView* mpAntiImpl;
|
|
|
|
Link m_aSelectHandler;
|
|
|
|
|
|
|
|
::rtl::Reference< ::svt::FileViewContentEnumerator >
|
|
|
|
m_pContentEnumerator;
|
|
|
|
Link m_aCurrentAsyncActionHandler;
|
|
|
|
::osl::Condition m_aAsyncActionFinished;
|
2010-10-11 20:57:53 -05:00
|
|
|
::rtl::Reference< ::salhelper::Timer > m_pCancelAsyncTimer;
|
2004-10-22 11:33:22 +00:00
|
|
|
::svt::EnumerationResult m_eAsyncActionResult;
|
|
|
|
bool m_bRunningAsyncAction;
|
|
|
|
bool m_bAsyncActionCancelled;
|
2001-12-07 14:39:24 +00:00
|
|
|
|
2009-03-03 10:51:13 +00:00
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
public:
|
|
|
|
|
2001-07-18 10:46:38 +00:00
|
|
|
::std::vector< SortingData_Impl* > maContent;
|
|
|
|
::osl::Mutex maMutex;
|
2001-07-13 12:41:02 +00:00
|
|
|
|
|
|
|
ViewTabListBox_Impl* mpView;
|
2001-10-19 12:59:02 +00:00
|
|
|
NameTranslator_Impl* mpNameTrans;
|
2003-09-29 14:01:07 +00:00
|
|
|
const IUrlFilter* mpUrlFilter;
|
2001-07-13 12:41:02 +00:00
|
|
|
sal_uInt16 mnSortColumn;
|
|
|
|
sal_Bool mbAscending : 1;
|
|
|
|
sal_Bool mbOnlyFolder : 1;
|
2001-10-19 12:59:02 +00:00
|
|
|
sal_Bool mbReplaceNames : 1; // translate folder names or display doc-title instead of file name
|
2004-06-28 16:06:15 +00:00
|
|
|
sal_Int16 mnSuspendSelectCallback : 1;
|
2004-07-06 06:33:26 +00:00
|
|
|
sal_Bool mbIsFirstResort : 1;
|
2001-12-07 14:39:24 +00:00
|
|
|
|
2002-03-14 12:10:32 +00:00
|
|
|
IntlWrapper aIntlWrapper;
|
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
String maViewURL;
|
|
|
|
String maAllFilter;
|
|
|
|
String maCurrentFilter;
|
|
|
|
Image maFolderImage;
|
|
|
|
Link maOpenDoneLink;
|
2008-10-14 05:23:43 +00:00
|
|
|
Reference< XCommandEnvironment > mxCmdEnv;
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2008-10-14 05:23:43 +00:00
|
|
|
SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommandEnvironment > xEnv,
|
2001-07-17 11:47:56 +00:00
|
|
|
sal_Int16 nFlags,
|
|
|
|
sal_Bool bOnlyFolder );
|
2006-06-19 19:50:20 +00:00
|
|
|
virtual ~SvtFileView_Impl();
|
2001-07-13 12:41:02 +00:00
|
|
|
|
|
|
|
void Clear();
|
|
|
|
|
2009-03-03 10:51:13 +00:00
|
|
|
FileViewResult GetFolderContent_Impl(
|
|
|
|
const String& rFolder,
|
|
|
|
const FileViewAsyncAction* pAsyncDescriptor,
|
|
|
|
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList = ::com::sun::star::uno::Sequence< ::rtl::OUString >() );
|
|
|
|
|
|
|
|
FileViewResult GetFolderContent_Impl(
|
|
|
|
const FolderDescriptor& _rFolder,
|
|
|
|
const FileViewAsyncAction* pAsyncDescriptor,
|
|
|
|
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList = ::com::sun::star::uno::Sequence< ::rtl::OUString >());
|
2001-07-13 12:41:02 +00:00
|
|
|
void FilterFolderContent_Impl( const OUString &rFilter );
|
2004-10-22 11:33:22 +00:00
|
|
|
void CancelRunningAsyncAction();
|
2001-07-13 12:41:02 +00:00
|
|
|
|
|
|
|
void OpenFolder_Impl();
|
2002-10-17 14:06:10 +00:00
|
|
|
// #83004# -------
|
2010-06-07 09:49:05 +02:00
|
|
|
void ReplaceTabWithString( OUString& aValue );
|
2001-07-13 12:41:02 +00:00
|
|
|
void CreateDisplayText_Impl();
|
|
|
|
void CreateVector_Impl( const Sequence < OUString > &rList );
|
|
|
|
void SortFolderContent_Impl();
|
|
|
|
|
2001-07-17 11:47:56 +00:00
|
|
|
void EntryRemoved( const OUString& rURL );
|
|
|
|
void EntryRenamed( OUString& rURL,
|
|
|
|
const OUString& rName );
|
2001-12-12 10:07:45 +00:00
|
|
|
String FolderInserted( const OUString& rURL,
|
2001-07-17 11:47:56 +00:00
|
|
|
const OUString& rTitle );
|
|
|
|
|
2011-01-12 15:56:50 +01:00
|
|
|
sal_uLong GetEntryPos( const OUString& rURL );
|
2001-07-19 09:12:13 +00:00
|
|
|
|
2001-10-19 12:59:02 +00:00
|
|
|
inline void EnableContextMenu( sal_Bool bEnable );
|
|
|
|
inline void EnableDelete( sal_Bool bEnable );
|
2001-07-18 10:46:38 +00:00
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
void Resort_Impl( sal_Int16 nColumn, sal_Bool bAscending );
|
2001-07-20 10:19:02 +00:00
|
|
|
sal_Bool SearchNextEntry( sal_uInt32 &nIndex,
|
|
|
|
const OUString& rTitle,
|
|
|
|
sal_Bool bWrapAround );
|
2001-10-19 12:59:02 +00:00
|
|
|
|
|
|
|
inline sal_Bool EnableNameReplacing( sal_Bool bEnable = sal_True ); // returns false, if action wasn't possible
|
|
|
|
void SetActualFolder( const INetURLObject& rActualFolder );
|
|
|
|
|
|
|
|
sal_Bool GetDocTitle( const OUString& rTargetURL, OUString& rDocTitle ) const;
|
2001-12-07 14:39:24 +00:00
|
|
|
|
|
|
|
void SetSelectHandler( const Link& _rHdl );
|
|
|
|
|
|
|
|
void InitSelection();
|
|
|
|
void ResetCursor();
|
|
|
|
|
2006-03-29 07:37:58 +00:00
|
|
|
inline void EndEditing( bool _bCancel );
|
|
|
|
|
2001-12-07 14:39:24 +00:00
|
|
|
protected:
|
|
|
|
DECL_LINK( SelectionMultiplexer, void* );
|
2004-10-22 11:33:22 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
// IEnumerationResultHandler overridables
|
|
|
|
virtual void enumerationDone( ::svt::EnumerationResult _eResult );
|
|
|
|
void implEnumerationSuccess();
|
|
|
|
|
|
|
|
// ITimeoutHandler
|
|
|
|
virtual void onTimeout( CallbackTimer* _pInstigator );
|
2001-07-13 12:41:02 +00:00
|
|
|
};
|
|
|
|
|
2001-10-19 12:59:02 +00:00
|
|
|
inline void SvtFileView_Impl::EnableContextMenu( sal_Bool bEnable )
|
|
|
|
{
|
2002-03-13 13:28:49 +00:00
|
|
|
mpView->EnableContextMenuHandling( bEnable );
|
2001-10-19 12:59:02 +00:00
|
|
|
if( bEnable )
|
|
|
|
mbReplaceNames = sal_False;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void SvtFileView_Impl::EnableDelete( sal_Bool bEnable )
|
|
|
|
{
|
|
|
|
mpView->EnableDelete( bEnable );
|
|
|
|
if( bEnable )
|
|
|
|
mbReplaceNames = sal_False;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline sal_Bool SvtFileView_Impl::EnableNameReplacing( sal_Bool bEnable )
|
|
|
|
{
|
2010-06-07 10:56:29 +02:00
|
|
|
mpView->EnableRename( bEnable );
|
|
|
|
|
2001-10-19 12:59:02 +00:00
|
|
|
sal_Bool bRet;
|
|
|
|
if( mpView->IsDeleteOrContextMenuEnabled() )
|
|
|
|
{
|
|
|
|
DBG_ASSERT( !mbReplaceNames, "SvtFileView_Impl::EnableNameReplacing(): state should be not possible!" );
|
2010-06-07 09:49:05 +02:00
|
|
|
bRet = !bEnable; // only for enabling this is an unsuccessful result
|
2001-10-19 12:59:02 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
mbReplaceNames = bEnable;
|
|
|
|
bRet = sal_True;
|
|
|
|
}
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2001-10-19 12:59:02 +00:00
|
|
|
return bRet;
|
|
|
|
}
|
2006-03-29 07:37:58 +00:00
|
|
|
|
|
|
|
inline void SvtFileView_Impl::EndEditing( bool _bCancel )
|
|
|
|
{
|
|
|
|
if ( mpView->IsEditingActive() )
|
|
|
|
mpView->EndEditing( _bCancel != false );
|
|
|
|
}
|
|
|
|
|
2001-05-07 09:33:55 +00:00
|
|
|
// functions -------------------------------------------------------------
|
|
|
|
|
2012-03-12 19:58:09 +01:00
|
|
|
OUString CreateExactSizeText( sal_Int64 nSize )
|
2001-05-07 09:33:55 +00:00
|
|
|
{
|
2001-09-05 09:29:14 +00:00
|
|
|
double fSize( ( double ) nSize );
|
2001-07-13 12:41:02 +00:00
|
|
|
int nDec;
|
|
|
|
|
2008-12-11 07:05:03 +00:00
|
|
|
long nMega = 1024 * 1024;
|
|
|
|
long nGiga = nMega * 1024;
|
2001-05-07 09:33:55 +00:00
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
String aUnitStr = ' ';
|
|
|
|
|
|
|
|
if ( nSize < 10000 )
|
|
|
|
{
|
|
|
|
aUnitStr += String( SvtResId( STR_SVT_BYTES ) );
|
|
|
|
nDec = 0;
|
|
|
|
}
|
|
|
|
else if ( nSize < nMega )
|
2001-05-07 09:33:55 +00:00
|
|
|
{
|
|
|
|
fSize /= 1024;
|
|
|
|
aUnitStr += String( SvtResId( STR_SVT_KB ) );
|
2001-07-13 12:41:02 +00:00
|
|
|
nDec = 1;
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
2001-07-13 12:41:02 +00:00
|
|
|
else if ( nSize < nGiga )
|
2001-05-07 09:33:55 +00:00
|
|
|
{
|
|
|
|
fSize /= nMega;
|
|
|
|
aUnitStr += String( SvtResId( STR_SVT_MB ) );
|
|
|
|
nDec = 2;
|
|
|
|
}
|
2001-07-13 12:41:02 +00:00
|
|
|
else
|
2001-05-07 09:33:55 +00:00
|
|
|
{
|
|
|
|
fSize /= nGiga;
|
|
|
|
aUnitStr += String( SvtResId( STR_SVT_GB ) );
|
|
|
|
nDec = 3;
|
|
|
|
}
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2003-03-27 13:40:07 +00:00
|
|
|
OUString aSizeStr( ::rtl::math::doubleToUString( fSize,
|
|
|
|
rtl_math_StringFormat_F, nDec,
|
|
|
|
SvtSysLocale().GetLocaleData().getNumDecimalSep().GetChar(0)));
|
2001-05-07 09:33:55 +00:00
|
|
|
aSizeStr += aUnitStr;
|
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
return aSizeStr;
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
|
2001-07-18 12:42:33 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2001-05-07 09:33:55 +00:00
|
|
|
// class ViewTabListBox_Impl ---------------------------------------------
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2001-07-17 11:47:56 +00:00
|
|
|
ViewTabListBox_Impl::ViewTabListBox_Impl( Window* pParentWin,
|
|
|
|
SvtFileView_Impl* pParent,
|
|
|
|
sal_Int16 nFlags ) :
|
2001-09-12 06:59:04 +00:00
|
|
|
|
|
|
|
SvHeaderTabListBox( pParentWin, WB_TABSTOP ),
|
2001-05-07 09:33:55 +00:00
|
|
|
|
2002-09-13 11:37:32 +00:00
|
|
|
mpHeaderBar ( NULL ),
|
|
|
|
mpParent ( pParent ),
|
|
|
|
msAccessibleDescText( SvtResId( STR_SVT_ACC_DESC_FILEVIEW ) ),
|
|
|
|
msFolder ( SvtResId( STR_SVT_ACC_DESC_FOLDER ) ),
|
|
|
|
msFile ( SvtResId( STR_SVT_ACC_DESC_FILE ) ),
|
|
|
|
mnSearchIndex ( 0 ),
|
|
|
|
mbResizeDisabled ( sal_False ),
|
|
|
|
mbAutoResize ( sal_False ),
|
2010-06-07 10:56:29 +02:00
|
|
|
mbEnableDelete ( sal_True ),
|
2012-03-14 19:45:08 +01:00
|
|
|
mbEnableRename ( sal_True ),
|
|
|
|
mbShowHeader ( (nFlags & FILEVIEW_SHOW_NONE) == 0 )
|
2001-05-07 09:33:55 +00:00
|
|
|
{
|
2001-07-17 11:47:56 +00:00
|
|
|
Size aBoxSize = pParentWin->GetSizePixel();
|
|
|
|
mpHeaderBar = new HeaderBar( pParentWin, WB_BUTTONSTYLE | WB_BOTTOMBORDER );
|
2001-05-08 12:10:04 +00:00
|
|
|
mpHeaderBar->SetPosSizePixel( Point( 0, 0 ), mpHeaderBar->CalcWindowSizePixel() );
|
2001-05-07 09:33:55 +00:00
|
|
|
|
2001-07-11 08:56:57 +00:00
|
|
|
HeaderBarItemBits nBits = ( HIB_LEFT | HIB_VCENTER | HIB_CLICKABLE );
|
2011-12-28 20:00:03 +04:00
|
|
|
if (nFlags & FILEVIEW_SHOW_ONLYTITLE)
|
|
|
|
{
|
|
|
|
long pTabs[] = { 2, 20, 600 };
|
|
|
|
SetTabs(&pTabs[0], MAP_PIXEL);
|
|
|
|
|
|
|
|
mpHeaderBar->InsertItem(COLUMN_TITLE, String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE)), 600, nBits | HIB_UPARROW);
|
|
|
|
}
|
2001-07-05 11:50:24 +00:00
|
|
|
else
|
2011-06-13 21:50:18 +01:00
|
|
|
{
|
2011-12-28 20:00:03 +04:00
|
|
|
long pTabs[] = { 5, 20, 180, 320, 400, 600 };
|
|
|
|
SetTabs(&pTabs[0], MAP_PIXEL);
|
|
|
|
SetTabJustify(2, AdjustRight); // column "Size"
|
|
|
|
|
|
|
|
mpHeaderBar->InsertItem(COLUMN_TITLE, String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE)), 180, nBits | HIB_UPARROW);
|
|
|
|
mpHeaderBar->InsertItem(COLUMN_TYPE, String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TYPE)), 140, nBits);
|
|
|
|
mpHeaderBar->InsertItem(COLUMN_SIZE, String(SvtResId(STR_SVT_FILEVIEW_COLUMN_SIZE)), 80, nBits);
|
|
|
|
mpHeaderBar->InsertItem(COLUMN_DATE, String(SvtResId(STR_SVT_FILEVIEW_COLUMN_DATE)), 500, nBits);
|
2011-06-13 21:50:18 +01:00
|
|
|
}
|
2001-05-07 09:33:55 +00:00
|
|
|
|
|
|
|
Size aHeadSize = mpHeaderBar->GetSizePixel();
|
|
|
|
SetPosSizePixel( Point( 0, aHeadSize.Height() ),
|
|
|
|
Size( aBoxSize.Width(), aBoxSize.Height() - aHeadSize.Height() ) );
|
|
|
|
InitHeaderBar( mpHeaderBar );
|
|
|
|
SetHighlightRange();
|
|
|
|
SetEntryHeight( ROW_HEIGHT );
|
2011-12-28 20:00:03 +04:00
|
|
|
if (nFlags & FILEVIEW_MULTISELECTION)
|
|
|
|
SetSelectionMode( MULTIPLE_SELECTION );
|
2001-05-07 09:33:55 +00:00
|
|
|
|
|
|
|
Show();
|
2012-03-14 19:45:08 +01:00
|
|
|
if( mbShowHeader )
|
2011-04-27 15:09:42 +02:00
|
|
|
mpHeaderBar->Show();
|
2001-07-20 09:41:40 +00:00
|
|
|
|
|
|
|
maResetQuickSearch.SetTimeout( QUICK_SEARCH_TIMEOUT );
|
|
|
|
maResetQuickSearch.SetTimeoutHdl( LINK( this, ViewTabListBox_Impl, ResetQuickSearch_Impl ) );
|
2001-07-27 12:28:31 +00:00
|
|
|
|
|
|
|
Reference< XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
|
|
|
|
Reference< XInteractionHandler > xInteractionHandler = Reference< XInteractionHandler > (
|
|
|
|
xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uui.InteractionHandler") ) ), UNO_QUERY );
|
|
|
|
|
2008-10-14 05:23:43 +00:00
|
|
|
mxCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() );
|
2001-07-27 12:28:31 +00:00
|
|
|
|
2002-03-13 13:28:49 +00:00
|
|
|
EnableContextMenuHandling();
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
ViewTabListBox_Impl::~ViewTabListBox_Impl()
|
|
|
|
{
|
2001-07-20 09:41:40 +00:00
|
|
|
maResetQuickSearch.Stop();
|
|
|
|
|
2001-05-07 09:33:55 +00:00
|
|
|
delete mpHeaderBar;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2012-03-01 18:00:32 +01:00
|
|
|
IMPL_LINK_NOARG(ViewTabListBox_Impl, ResetQuickSearch_Impl)
|
2001-07-20 09:41:40 +00:00
|
|
|
{
|
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
|
|
|
|
maQuickSearchText = OUString();
|
|
|
|
mnSearchIndex = 0;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2001-05-07 09:33:55 +00:00
|
|
|
void ViewTabListBox_Impl::Resize()
|
|
|
|
{
|
|
|
|
SvTabListBox::Resize();
|
|
|
|
Size aBoxSize = Control::GetParent()->GetOutputSizePixel();
|
|
|
|
|
|
|
|
if ( mbResizeDisabled || !aBoxSize.Width() )
|
|
|
|
return;
|
|
|
|
|
2012-03-14 19:45:08 +01:00
|
|
|
Size aBarSize;
|
|
|
|
if ( mbShowHeader )
|
|
|
|
{
|
|
|
|
aBarSize = mpHeaderBar->GetSizePixel();
|
|
|
|
aBarSize.Width() = mbAutoResize ? aBoxSize.Width() : GetSizePixel().Width();
|
|
|
|
mpHeaderBar->SetSizePixel( aBarSize );
|
|
|
|
}
|
2001-05-07 09:33:55 +00:00
|
|
|
|
|
|
|
if ( mbAutoResize )
|
|
|
|
{
|
|
|
|
mbResizeDisabled = sal_True;
|
|
|
|
SetPosSizePixel( Point( 0, aBarSize.Height() ),
|
2010-06-07 09:49:05 +02:00
|
|
|
Size( aBoxSize.Width(), aBoxSize.Height() - aBarSize.Height() ) );
|
2001-05-07 09:33:55 +00:00
|
|
|
mbResizeDisabled = sal_False;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2001-07-05 11:50:24 +00:00
|
|
|
void ViewTabListBox_Impl::KeyInput( const KeyEvent& rKEvt )
|
|
|
|
{
|
2002-01-23 14:34:04 +00:00
|
|
|
bool bHandled = false;
|
|
|
|
|
|
|
|
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
|
|
|
|
if ( 0 == rKeyCode.GetModifier() )
|
2001-07-20 09:41:40 +00:00
|
|
|
{
|
2002-01-23 14:34:04 +00:00
|
|
|
if ( rKeyCode.GetCode() == KEY_RETURN )
|
|
|
|
{
|
|
|
|
ResetQuickSearch_Impl( NULL );
|
|
|
|
GetDoubleClickHdl().Call( this );
|
|
|
|
bHandled = true;
|
|
|
|
}
|
|
|
|
else if ( ( rKeyCode.GetCode() == KEY_DELETE ) &&
|
|
|
|
mbEnableDelete )
|
|
|
|
{
|
|
|
|
ResetQuickSearch_Impl( NULL );
|
|
|
|
DeleteEntries();
|
|
|
|
bHandled = true;
|
|
|
|
}
|
|
|
|
else if ( ( rKEvt.GetKeyCode().GetGroup() == KEYGROUP_NUM ) ||
|
|
|
|
( rKEvt.GetKeyCode().GetGroup() == KEYGROUP_ALPHA ) )
|
|
|
|
{
|
|
|
|
DoQuickSearch( rKEvt.GetCharCode() );
|
|
|
|
bHandled = true;
|
|
|
|
}
|
2001-07-20 09:41:40 +00:00
|
|
|
}
|
2002-01-23 14:34:04 +00:00
|
|
|
|
|
|
|
if ( !bHandled )
|
2001-07-20 10:19:02 +00:00
|
|
|
{
|
|
|
|
ResetQuickSearch_Impl( NULL );
|
2001-07-05 11:50:24 +00:00
|
|
|
SvHeaderTabListBox::KeyInput( rKEvt );
|
2001-07-20 10:19:02 +00:00
|
|
|
}
|
2001-07-05 11:50:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2002-03-13 13:28:49 +00:00
|
|
|
PopupMenu* ViewTabListBox_Impl::CreateContextMenu( void )
|
2001-07-11 08:56:57 +00:00
|
|
|
{
|
2010-06-07 10:56:29 +02:00
|
|
|
bool bEnableDelete = mbEnableDelete;
|
|
|
|
bool bEnableRename = mbEnableRename;
|
|
|
|
|
|
|
|
if ( bEnableDelete || bEnableRename )
|
|
|
|
{
|
|
|
|
sal_Int32 nSelectedEntries = GetSelectionCount();
|
|
|
|
bEnableDelete &= nSelectedEntries > 0;
|
|
|
|
bEnableRename &= nSelectedEntries == 1;
|
|
|
|
}
|
2001-10-30 15:15:07 +00:00
|
|
|
|
2010-06-07 10:56:29 +02:00
|
|
|
if ( bEnableDelete || bEnableRename )
|
2002-03-13 13:28:49 +00:00
|
|
|
{
|
2010-06-07 10:56:29 +02:00
|
|
|
SvLBoxEntry* pEntry = FirstSelected();
|
|
|
|
while ( pEntry )
|
|
|
|
{
|
|
|
|
::ucbhelper::Content aCnt;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
OUString aURL( static_cast< SvtContentEntry * >(
|
|
|
|
pEntry->GetUserData() )->maURL );
|
|
|
|
aCnt = ::ucbhelper::Content( aURL, mxCmdEnv );
|
|
|
|
}
|
|
|
|
catch( Exception const & )
|
|
|
|
{
|
|
|
|
bEnableDelete = bEnableRename = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( bEnableDelete )
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Reference< XCommandInfo > aCommands = aCnt.getCommands();
|
|
|
|
if ( aCommands.is() )
|
|
|
|
bEnableDelete
|
|
|
|
= aCommands->hasCommandByName(
|
2010-11-18 18:47:55 -05:00
|
|
|
OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" )) );
|
2010-06-07 10:56:29 +02:00
|
|
|
else
|
|
|
|
bEnableDelete = false;
|
|
|
|
}
|
|
|
|
catch( Exception const & )
|
|
|
|
{
|
|
|
|
bEnableDelete = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( bEnableRename )
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Reference< XPropertySetInfo > aProps = aCnt.getProperties();
|
|
|
|
if ( aProps.is() )
|
|
|
|
{
|
|
|
|
Property aProp
|
|
|
|
= aProps->getPropertyByName(
|
2010-11-18 18:47:55 -05:00
|
|
|
OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" )) );
|
2010-06-07 10:56:29 +02:00
|
|
|
bEnableRename
|
|
|
|
= !( aProp.Attributes & PropertyAttribute::READONLY );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
bEnableRename = false;
|
|
|
|
}
|
|
|
|
catch( Exception const & )
|
|
|
|
{
|
|
|
|
bEnableRename = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pEntry = ( bEnableDelete || bEnableRename )
|
|
|
|
? NextSelected( pEntry )
|
|
|
|
: 0;
|
|
|
|
}
|
|
|
|
}
|
2001-10-30 15:15:07 +00:00
|
|
|
|
2010-06-07 10:56:29 +02:00
|
|
|
if ( bEnableDelete || bEnableRename )
|
2002-03-13 13:28:49 +00:00
|
|
|
{
|
2010-06-07 10:56:29 +02:00
|
|
|
PopupMenu * pRet
|
|
|
|
= new PopupMenu( SvtResId( RID_FILEVIEW_CONTEXTMENU ) );
|
|
|
|
pRet->EnableItem( MID_FILEVIEW_DELETE, bEnableDelete );
|
|
|
|
pRet->EnableItem( MID_FILEVIEW_RENAME, bEnableRename );
|
2002-03-13 13:28:49 +00:00
|
|
|
pRet->RemoveDisabledEntries( sal_True, sal_True );
|
2010-06-07 10:56:29 +02:00
|
|
|
return pRet;
|
2001-07-11 08:56:57 +00:00
|
|
|
}
|
2002-03-13 13:28:49 +00:00
|
|
|
|
2010-06-07 10:56:29 +02:00
|
|
|
return NULL;
|
2002-03-13 13:28:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-11-05 10:31:15 +08:00
|
|
|
void ViewTabListBox_Impl::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
|
2002-03-13 13:28:49 +00:00
|
|
|
{
|
|
|
|
switch ( nSelectedPopupEntry )
|
|
|
|
{
|
|
|
|
case MID_FILEVIEW_DELETE :
|
|
|
|
DeleteEntries();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MID_FILEVIEW_RENAME :
|
|
|
|
EditEntry( FirstSelected() );
|
|
|
|
break;
|
|
|
|
}
|
2001-07-11 08:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2001-05-07 09:33:55 +00:00
|
|
|
void ViewTabListBox_Impl::ClearAll()
|
|
|
|
{
|
2010-11-05 10:31:15 +08:00
|
|
|
for ( sal_uInt16 i = 0; i < GetEntryCount(); ++i )
|
2001-05-07 09:33:55 +00:00
|
|
|
delete (SvtContentEntry*)GetEntry(i)->GetUserData();
|
|
|
|
Clear();
|
|
|
|
}
|
|
|
|
|
2001-07-17 11:47:56 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2001-07-19 09:12:13 +00:00
|
|
|
void ViewTabListBox_Impl::DeleteEntries()
|
2001-07-17 11:47:56 +00:00
|
|
|
{
|
2001-07-19 09:12:13 +00:00
|
|
|
svtools::QueryDeleteResult_Impl eResult = svtools::QUERYDELETE_YES;
|
|
|
|
SvLBoxEntry* pEntry = FirstSelected();
|
2001-07-17 11:47:56 +00:00
|
|
|
String aURL;
|
|
|
|
|
2011-11-07 22:24:39 +00:00
|
|
|
rtl::OString sDialogPosition;
|
2001-07-19 09:12:13 +00:00
|
|
|
while ( pEntry && ( eResult != svtools::QUERYDELETE_CANCEL ) )
|
|
|
|
{
|
|
|
|
SvLBoxEntry *pCurEntry = pEntry;
|
|
|
|
pEntry = NextSelected( pEntry );
|
2001-07-17 11:47:56 +00:00
|
|
|
|
2001-07-19 09:12:13 +00:00
|
|
|
if ( pCurEntry->GetUserData() )
|
|
|
|
aURL = ( (SvtContentEntry*)pCurEntry->GetUserData() )->maURL;
|
2001-07-17 11:47:56 +00:00
|
|
|
|
2001-07-19 09:12:13 +00:00
|
|
|
if ( !aURL.Len() )
|
2010-06-08 16:26:01 +02:00
|
|
|
continue;
|
2001-07-17 11:47:56 +00:00
|
|
|
|
2010-06-08 16:26:01 +02:00
|
|
|
bool canDelete = true;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
::ucbhelper::Content aCnt( aURL, mxCmdEnv );
|
|
|
|
Reference< XCommandInfo > aCommands = aCnt.getCommands();
|
|
|
|
if ( aCommands.is() )
|
|
|
|
canDelete
|
|
|
|
= aCommands->hasCommandByName(
|
2010-11-18 18:47:55 -05:00
|
|
|
OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" )) );
|
2010-06-08 16:26:01 +02:00
|
|
|
else
|
|
|
|
canDelete = false;
|
|
|
|
}
|
|
|
|
catch( Exception const & )
|
|
|
|
{
|
|
|
|
canDelete = false;
|
|
|
|
}
|
2001-07-17 11:47:56 +00:00
|
|
|
|
2010-06-08 16:26:01 +02:00
|
|
|
if (!canDelete)
|
|
|
|
continue; // process next entry
|
2001-07-19 09:12:13 +00:00
|
|
|
|
|
|
|
if ( eResult != svtools::QUERYDELETE_ALL )
|
|
|
|
{
|
2010-06-08 16:26:01 +02:00
|
|
|
INetURLObject aObj( aURL );
|
2001-07-19 09:12:13 +00:00
|
|
|
svtools::QueryDeleteDlg_Impl aDlg( NULL, aObj.GetName( INetURLObject::DECODE_WITH_CHARSET ) );
|
2011-11-07 22:24:39 +00:00
|
|
|
if ( sDialogPosition.getLength() )
|
2001-10-30 15:15:07 +00:00
|
|
|
aDlg.SetWindowState( sDialogPosition );
|
2001-07-19 09:12:13 +00:00
|
|
|
|
|
|
|
if ( GetSelectionCount() > 1 )
|
|
|
|
aDlg.EnableAllButton();
|
|
|
|
|
|
|
|
if ( aDlg.Execute() == RET_OK )
|
|
|
|
eResult = aDlg.GetResult();
|
|
|
|
else
|
|
|
|
eResult = svtools::QUERYDELETE_CANCEL;
|
2001-10-30 15:15:07 +00:00
|
|
|
|
|
|
|
sDialogPosition = aDlg.GetWindowState( );
|
2001-07-19 09:12:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( ( eResult == svtools::QUERYDELETE_ALL ) ||
|
|
|
|
( eResult == svtools::QUERYDELETE_YES ) )
|
2001-07-17 11:47:56 +00:00
|
|
|
{
|
2001-07-27 12:28:31 +00:00
|
|
|
if ( Kill( aURL ) )
|
2001-07-19 09:12:13 +00:00
|
|
|
{
|
2001-07-20 09:41:40 +00:00
|
|
|
delete (SvtContentEntry*)pCurEntry->GetUserData();
|
2001-07-19 09:12:13 +00:00
|
|
|
GetModel()->Remove( pCurEntry );
|
|
|
|
mpParent->EntryRemoved( aURL );
|
|
|
|
}
|
2001-07-17 11:47:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
2010-11-05 10:31:15 +08:00
|
|
|
sal_Bool ViewTabListBox_Impl::EditedEntry( SvLBoxEntry* pEntry,
|
2012-03-17 10:06:47 +00:00
|
|
|
const rtl::OUString& rNewText )
|
2001-07-17 11:47:56 +00:00
|
|
|
{
|
2010-11-05 10:31:15 +08:00
|
|
|
sal_Bool bRet = sal_False;
|
2001-07-17 11:47:56 +00:00
|
|
|
|
|
|
|
OUString aURL;
|
|
|
|
SvtContentEntry* pData = (SvtContentEntry*)pEntry->GetUserData();
|
|
|
|
|
|
|
|
if ( pData )
|
|
|
|
aURL = OUString( pData->maURL );
|
|
|
|
|
2012-01-13 19:13:55 -02:00
|
|
|
if ( aURL.isEmpty() )
|
2001-07-17 11:47:56 +00:00
|
|
|
return bRet;
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
2010-11-18 18:47:55 -05:00
|
|
|
OUString aPropName( RTL_CONSTASCII_USTRINGPARAM( "Title" ));
|
2010-06-08 16:26:01 +02:00
|
|
|
bool canRename = true;
|
2008-10-14 05:23:43 +00:00
|
|
|
::ucbhelper::Content aContent( aURL, mxCmdEnv );
|
2001-07-17 11:47:56 +00:00
|
|
|
|
2010-06-08 16:26:01 +02:00
|
|
|
try
|
|
|
|
{
|
|
|
|
Reference< XPropertySetInfo > aProps = aContent.getProperties();
|
|
|
|
if ( aProps.is() )
|
|
|
|
{
|
|
|
|
Property aProp = aProps->getPropertyByName( aPropName );
|
|
|
|
canRename = !( aProp.Attributes & PropertyAttribute::READONLY );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
canRename = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch ( Exception const & )
|
|
|
|
{
|
|
|
|
canRename = false;
|
|
|
|
}
|
2001-07-17 11:47:56 +00:00
|
|
|
|
2010-06-08 16:26:01 +02:00
|
|
|
if ( canRename )
|
|
|
|
{
|
|
|
|
Any aValue;
|
2012-03-17 10:06:47 +00:00
|
|
|
aValue <<= rNewText;
|
2010-06-08 16:26:01 +02:00
|
|
|
aContent.setPropertyValue( aPropName, aValue );
|
|
|
|
mpParent->EntryRenamed( aURL, rNewText );
|
2001-07-17 11:47:56 +00:00
|
|
|
|
2010-06-08 16:26:01 +02:00
|
|
|
pData->maURL = aURL;
|
|
|
|
pEntry->SetUserData( pData );
|
2001-07-17 11:47:56 +00:00
|
|
|
|
2010-11-10 13:50:33 +08:00
|
|
|
bRet = sal_True;
|
2010-06-08 16:26:01 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
catch( Exception const & )
|
|
|
|
{
|
2001-07-17 11:47:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2001-07-20 09:41:40 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void ViewTabListBox_Impl::DoQuickSearch( const xub_Unicode& rChar )
|
|
|
|
{
|
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
|
|
|
|
maResetQuickSearch.Stop();
|
|
|
|
|
|
|
|
OUString aLastText = maQuickSearchText;
|
|
|
|
sal_uInt32 aLastPos = mnSearchIndex;
|
|
|
|
sal_Bool bFound = sal_False;
|
|
|
|
|
2005-04-13 09:50:55 +00:00
|
|
|
maQuickSearchText += OUString( String( rChar ) ).toAsciiLowerCase();
|
2001-07-20 09:41:40 +00:00
|
|
|
|
2001-07-20 10:19:02 +00:00
|
|
|
bFound = mpParent->SearchNextEntry( mnSearchIndex, maQuickSearchText, sal_False );
|
2001-07-20 09:41:40 +00:00
|
|
|
|
|
|
|
if ( !bFound && ( aLastText.getLength() == 1 ) &&
|
2005-04-13 09:50:55 +00:00
|
|
|
( aLastText == OUString( String( rChar ) ) ) )
|
2001-07-20 09:41:40 +00:00
|
|
|
{
|
|
|
|
mnSearchIndex = aLastPos + 1;
|
|
|
|
maQuickSearchText = aLastText;
|
2001-07-20 10:19:02 +00:00
|
|
|
bFound = mpParent->SearchNextEntry( mnSearchIndex, maQuickSearchText, sal_True );
|
2001-07-20 09:41:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( bFound )
|
|
|
|
{
|
|
|
|
SvLBoxEntry* pEntry = GetEntry( mnSearchIndex );
|
2006-07-26 07:26:20 +00:00
|
|
|
if ( pEntry )
|
|
|
|
{
|
2010-11-05 10:31:15 +08:00
|
|
|
SelectAll( sal_False );
|
2006-07-26 07:26:20 +00:00
|
|
|
Select( pEntry );
|
|
|
|
SetCurEntry( pEntry );
|
|
|
|
MakeVisible( pEntry );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
bFound = sal_False;
|
2001-07-20 09:41:40 +00:00
|
|
|
}
|
2006-07-26 07:26:20 +00:00
|
|
|
|
|
|
|
if ( !bFound )
|
2001-07-20 09:41:40 +00:00
|
|
|
Sound::Beep();
|
|
|
|
|
|
|
|
maResetQuickSearch.Start();
|
|
|
|
}
|
|
|
|
|
2001-12-07 14:39:24 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2010-11-05 10:31:15 +08:00
|
|
|
sal_Bool ViewTabListBox_Impl::DoubleClickHdl()
|
2001-12-07 14:39:24 +00:00
|
|
|
{
|
|
|
|
SvHeaderTabListBox::DoubleClickHdl();
|
2010-11-05 10:31:15 +08:00
|
|
|
return sal_False;
|
2001-12-07 14:39:24 +00:00
|
|
|
// this means "do no additional handling". Especially this means that the SvImpLBox does not
|
|
|
|
// recognize that the entry at the double click position change after the handler call (which is
|
|
|
|
// the case if in the handler, our content was replaced)
|
|
|
|
// If it _would_ recognize this change, it would take this as a reason to select the entry, again
|
|
|
|
// - which is not what in the case of content replace
|
|
|
|
// (I really doubt that this behaviour of the SvImpLBox does make any sense at all, but
|
|
|
|
// who knows ...)
|
|
|
|
}
|
|
|
|
|
2006-06-19 19:50:20 +00:00
|
|
|
::rtl::OUString ViewTabListBox_Impl::GetAccessibleObjectDescription( ::svt::AccessibleBrowseBoxObjType _eType, sal_Int32 _nPos ) const
|
2002-09-13 11:37:32 +00:00
|
|
|
{
|
2006-06-19 19:50:20 +00:00
|
|
|
::rtl::OUString sRet = SvHeaderTabListBox::GetAccessibleObjectDescription( _eType, _nPos );
|
2002-09-13 11:37:32 +00:00
|
|
|
if ( ::svt::BBTYPE_TABLECELL == _eType )
|
|
|
|
{
|
2009-07-16 16:59:45 +00:00
|
|
|
sal_Int32 nRow = -1;
|
|
|
|
const sal_uInt16 nColumnCount = GetColumnCount();
|
|
|
|
if (nColumnCount > 0)
|
|
|
|
nRow = _nPos / nColumnCount;
|
2002-09-13 11:37:32 +00:00
|
|
|
SvLBoxEntry* pEntry = GetEntry( nRow );
|
|
|
|
if ( pEntry )
|
|
|
|
{
|
|
|
|
SvtContentEntry* pData = (SvtContentEntry*)pEntry->GetUserData();
|
|
|
|
if ( pData )
|
|
|
|
{
|
2011-06-01 12:17:33 +01:00
|
|
|
const String sVar1( RTL_CONSTASCII_USTRINGPARAM( "%1" ) );
|
|
|
|
const String sVar2( RTL_CONSTASCII_USTRINGPARAM( "%2" ) );
|
2002-09-13 11:37:32 +00:00
|
|
|
String aText( msAccessibleDescText );
|
|
|
|
aText.SearchAndReplace( sVar1, pData->mbIsFolder ? msFolder : msFile );
|
|
|
|
aText.SearchAndReplace( sVar2, pData->maURL );
|
|
|
|
sRet += ::rtl::OUString( aText );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return sRet;
|
|
|
|
}
|
|
|
|
|
2001-07-27 12:28:31 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
sal_Bool ViewTabListBox_Impl::Kill( const OUString& rContent )
|
|
|
|
{
|
|
|
|
sal_Bool bRet = sal_True;
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
2008-10-14 05:23:43 +00:00
|
|
|
::ucbhelper::Content aCnt( rContent, mxCmdEnv );
|
2010-11-18 18:47:55 -05:00
|
|
|
aCnt.executeCommand( OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" )), makeAny( sal_Bool( sal_True ) ) );
|
2001-07-27 12:28:31 +00:00
|
|
|
}
|
2010-06-07 09:49:05 +02:00
|
|
|
catch( ::com::sun::star::ucb::CommandAbortedException const & )
|
2001-07-27 12:28:31 +00:00
|
|
|
{
|
|
|
|
DBG_WARNING( "CommandAbortedException" );
|
|
|
|
bRet = sal_False;
|
|
|
|
}
|
2010-06-07 09:49:05 +02:00
|
|
|
catch( Exception const & )
|
2001-07-27 12:28:31 +00:00
|
|
|
{
|
|
|
|
DBG_WARNING( "Any other exception" );
|
|
|
|
bRet = sal_False;
|
|
|
|
}
|
|
|
|
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2001-07-20 09:41:40 +00:00
|
|
|
|
|
|
|
|
2001-05-07 09:33:55 +00:00
|
|
|
|
2001-07-20 09:41:40 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
// class SvtFileView -----------------------------------------------------
|
2001-07-13 12:41:02 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
SvtFileView::SvtFileView( Window* pParent, const ResId& rResId,
|
|
|
|
sal_Bool bOnlyFolder, sal_Bool bMultiSelection ) :
|
|
|
|
|
|
|
|
Control( pParent, rResId )
|
2001-05-07 09:33:55 +00:00
|
|
|
{
|
2011-12-28 20:00:03 +04:00
|
|
|
sal_Int8 nFlags = 0;
|
2001-07-13 12:41:02 +00:00
|
|
|
if ( bOnlyFolder )
|
|
|
|
nFlags |= FILEVIEW_ONLYFOLDER;
|
|
|
|
if ( bMultiSelection )
|
|
|
|
nFlags |= FILEVIEW_MULTISELECTION;
|
2001-07-17 11:47:56 +00:00
|
|
|
|
2008-10-14 05:23:43 +00:00
|
|
|
Reference< XInteractionHandler > xInteractionHandler = Reference< XInteractionHandler > (
|
|
|
|
::comphelper::getProcessServiceFactory()->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uui.InteractionHandler") ) ), UNO_QUERY );
|
|
|
|
Reference < XCommandEnvironment > xCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() );
|
|
|
|
|
|
|
|
mpImp = new SvtFileView_Impl( this, xCmdEnv, nFlags, bOnlyFolder );
|
2006-03-29 07:37:58 +00:00
|
|
|
mpImp->mpView->ForbidEmptyText();
|
2011-04-27 15:09:42 +02:00
|
|
|
SetSortColumn( true );
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2002-08-22 10:14:21 +00:00
|
|
|
HeaderBar* pHeaderBar = mpImp->mpView->GetHeaderBar();
|
2001-07-13 12:41:02 +00:00
|
|
|
pHeaderBar->SetSelectHdl( LINK( this, SvtFileView, HeaderSelect_Impl ) );
|
2002-08-22 10:14:21 +00:00
|
|
|
pHeaderBar->SetEndDragHdl( LINK( this, SvtFileView, HeaderEndDrag_Impl ) );
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
|
|
|
|
2011-10-05 17:35:31 +03:00
|
|
|
SvtFileView::SvtFileView( Window* pParent, const ResId& rResId, sal_uInt8 nFlags ) :
|
2001-07-13 12:41:02 +00:00
|
|
|
|
|
|
|
Control( pParent, rResId )
|
|
|
|
{
|
2008-10-14 05:23:43 +00:00
|
|
|
Reference< XInteractionHandler > xInteractionHandler = Reference< XInteractionHandler > (
|
|
|
|
::comphelper::getProcessServiceFactory()->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uui.InteractionHandler") ) ), UNO_QUERY );
|
|
|
|
Reference < XCommandEnvironment > xCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() );
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2011-12-28 20:00:03 +04:00
|
|
|
mpImp = new SvtFileView_Impl( this, xCmdEnv, nFlags, nFlags & FILEVIEW_ONLYFOLDER );
|
|
|
|
|
|
|
|
SetSortColumn( (nFlags & FILEVIEW_SHOW_NONE) == 0 );
|
2001-07-13 12:41:02 +00:00
|
|
|
|
|
|
|
HeaderBar *pHeaderBar = mpImp->mpView->GetHeaderBar();
|
|
|
|
pHeaderBar->SetSelectHdl( LINK( this, SvtFileView, HeaderSelect_Impl ) );
|
2002-08-22 10:14:21 +00:00
|
|
|
pHeaderBar->SetEndDragHdl( LINK( this, SvtFileView, HeaderEndDrag_Impl ) );
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
SvtFileView::~SvtFileView()
|
|
|
|
{
|
2002-09-20 07:50:05 +00:00
|
|
|
// use temp pointer to prevent access of deleted member (GetFocus())
|
|
|
|
SvtFileView_Impl* pTemp = mpImp;
|
|
|
|
mpImp = NULL;
|
|
|
|
delete pTemp;
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2001-05-07 09:33:55 +00:00
|
|
|
String SvtFileView::GetURL( SvLBoxEntry* pEntry ) const
|
|
|
|
{
|
|
|
|
String aURL;
|
|
|
|
if ( pEntry && pEntry->GetUserData() )
|
|
|
|
aURL = ( (SvtContentEntry*)pEntry->GetUserData() )->maURL;
|
|
|
|
return aURL;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
String SvtFileView::GetCurrentURL() const
|
|
|
|
{
|
|
|
|
String aURL;
|
2001-07-13 12:41:02 +00:00
|
|
|
SvLBoxEntry* pEntry = mpImp->mpView->FirstSelected();
|
2001-05-07 09:33:55 +00:00
|
|
|
if ( pEntry && pEntry->GetUserData() )
|
|
|
|
aURL = ( (SvtContentEntry*)pEntry->GetUserData() )->maURL;
|
|
|
|
return aURL;
|
|
|
|
}
|
2004-08-02 13:35:15 +00:00
|
|
|
// -----------------------------------------------------------------------------
|
2001-05-07 09:33:55 +00:00
|
|
|
|
2001-12-04 09:38:29 +00:00
|
|
|
sal_Bool SvtFileView::CreateNewFolder( const String& rNewFolder )
|
2001-05-07 09:33:55 +00:00
|
|
|
{
|
2001-12-04 09:38:29 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2001-07-13 12:41:02 +00:00
|
|
|
INetURLObject aObj( mpImp->maViewURL );
|
2001-12-04 09:38:29 +00:00
|
|
|
aObj.insertName( rNewFolder, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL );
|
2001-12-12 10:07:45 +00:00
|
|
|
String sURL = aObj.GetMainURL( INetURLObject::NO_DECODE );
|
2003-03-27 13:40:07 +00:00
|
|
|
if ( ::utl::UCBContentHelper::MakeFolder( sURL, sal_True ) )
|
2001-05-07 09:33:55 +00:00
|
|
|
{
|
2001-12-12 10:07:45 +00:00
|
|
|
String sTitle = aObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
|
|
|
|
String sEntry = mpImp->FolderInserted( sURL, sTitle );
|
|
|
|
SvLBoxEntry* pEntry = mpImp->mpView->InsertEntry( sEntry, mpImp->maFolderImage, mpImp->maFolderImage );
|
2010-11-05 10:31:15 +08:00
|
|
|
SvtContentEntry* pUserData = new SvtContentEntry( sURL, sal_True );
|
2001-05-07 09:33:55 +00:00
|
|
|
pEntry->SetUserData( pUserData );
|
2001-07-13 12:41:02 +00:00
|
|
|
mpImp->mpView->MakeVisible( pEntry );
|
2001-12-04 09:38:29 +00:00
|
|
|
bRet = sal_True;
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
2001-12-04 09:38:29 +00:00
|
|
|
return bRet;
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
FileViewResult SvtFileView::PreviousLevel( const FileViewAsyncAction* pAsyncDescriptor )
|
|
|
|
{
|
|
|
|
FileViewResult eResult = eFailure;
|
|
|
|
|
|
|
|
String sParentURL;
|
|
|
|
if ( GetParentURL( sParentURL ) )
|
2009-03-03 10:51:13 +00:00
|
|
|
eResult = Initialize( sParentURL, mpImp->maCurrentFilter, pAsyncDescriptor, mpBlackList );
|
2004-10-22 11:33:22 +00:00
|
|
|
|
|
|
|
return eResult;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
sal_Bool SvtFileView::GetParentURL( String& rParentURL ) const
|
2001-05-07 09:33:55 +00:00
|
|
|
{
|
|
|
|
sal_Bool bRet = sal_False;
|
2001-09-12 06:59:04 +00:00
|
|
|
try
|
2001-05-07 09:33:55 +00:00
|
|
|
{
|
2008-10-14 05:23:43 +00:00
|
|
|
::ucbhelper::Content aCnt( mpImp->maViewURL, mpImp->mxCmdEnv );
|
2001-09-12 06:59:04 +00:00
|
|
|
Reference< XContent > xContent( aCnt.get() );
|
|
|
|
Reference< com::sun::star::container::XChild > xChild( xContent, UNO_QUERY );
|
|
|
|
if ( xChild.is() )
|
2001-05-07 09:33:55 +00:00
|
|
|
{
|
2001-09-12 06:59:04 +00:00
|
|
|
Reference< XContent > xParent( xChild->getParent(), UNO_QUERY );
|
|
|
|
if ( xParent.is() )
|
|
|
|
{
|
|
|
|
rParentURL = String( xParent->getIdentifier()->getContentIdentifier() );
|
|
|
|
bRet = ( rParentURL.Len() > 0 && rParentURL != mpImp->maViewURL );
|
|
|
|
}
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
}
|
2010-06-07 09:49:05 +02:00
|
|
|
catch( Exception const & )
|
2001-09-12 06:59:04 +00:00
|
|
|
{
|
2012-03-14 11:35:04 +01:00
|
|
|
// perhaps an unknown url protocol (e.g. "private:newdoc")
|
2001-09-12 06:59:04 +00:00
|
|
|
}
|
2001-05-07 09:33:55 +00:00
|
|
|
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-06-04 13:46:22 +02:00
|
|
|
const rtl::OString& SvtFileView::GetHelpId( ) const
|
2002-10-17 14:06:38 +00:00
|
|
|
{
|
|
|
|
return mpImp->mpView->GetHelpId( );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-06-04 13:46:22 +02:00
|
|
|
void SvtFileView::SetHelpId( const rtl::OString& rHelpId )
|
2001-05-07 09:33:55 +00:00
|
|
|
{
|
2010-06-04 13:46:22 +02:00
|
|
|
mpImp->mpView->SetHelpId( rHelpId );
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SvtFileView::SetSizePixel( const Size& rNewSize )
|
|
|
|
{
|
|
|
|
Control::SetSizePixel( rNewSize );
|
2001-07-13 12:41:02 +00:00
|
|
|
mpImp->mpView->SetSizePixel( rNewSize );
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SvtFileView::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
|
|
|
|
{
|
|
|
|
SetPosPixel( rNewPos );
|
|
|
|
SetSizePixel( rNewSize );
|
|
|
|
}
|
|
|
|
|
2004-08-02 13:35:15 +00:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
sal_Bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent, const String& rFilter )
|
|
|
|
{
|
|
|
|
WaitObject aWaitCursor( this );
|
2001-05-11 07:30:11 +00:00
|
|
|
|
2004-08-02 13:35:15 +00:00
|
|
|
mpImp->Clear();
|
2008-10-14 05:23:43 +00:00
|
|
|
::ucbhelper::Content aContent(_xContent, mpImp->mxCmdEnv );
|
2004-10-22 11:33:22 +00:00
|
|
|
FileViewResult eResult = mpImp->GetFolderContent_Impl( FolderDescriptor( aContent ), NULL );
|
|
|
|
OSL_ENSURE( eResult != eStillRunning, "SvtFileView::Initialize: this was expected to be synchronous!" );
|
|
|
|
if ( eResult != eSuccess )
|
2004-08-02 13:35:15 +00:00
|
|
|
return sal_False;
|
|
|
|
|
|
|
|
mpImp->FilterFolderContent_Impl( rFilter );
|
|
|
|
|
2010-06-07 09:49:05 +02:00
|
|
|
mpImp->SortFolderContent_Impl(); // possibly not necessary!!!!!!!!!!
|
2004-08-02 13:35:15 +00:00
|
|
|
mpImp->CreateDisplayText_Impl();
|
|
|
|
mpImp->OpenFolder_Impl();
|
|
|
|
|
|
|
|
mpImp->maOpenDoneLink.Call( this );
|
|
|
|
return sal_True;
|
|
|
|
}
|
2001-05-11 07:30:11 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2009-03-03 10:51:13 +00:00
|
|
|
FileViewResult SvtFileView::Initialize(
|
|
|
|
const String& rURL,
|
|
|
|
const String& rFilter,
|
|
|
|
const FileViewAsyncAction* pAsyncDescriptor,
|
|
|
|
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList )
|
2001-05-11 07:30:11 +00:00
|
|
|
{
|
2001-09-05 09:29:14 +00:00
|
|
|
WaitObject aWaitCursor( this );
|
2009-03-03 10:51:13 +00:00
|
|
|
mpBlackList = rBlackList;
|
2001-09-05 09:29:14 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
String sPushURL( mpImp->maViewURL );
|
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
mpImp->maViewURL = rURL;
|
2004-10-22 11:33:22 +00:00
|
|
|
FileViewResult eResult = ExecuteFilter( rFilter, pAsyncDescriptor );
|
|
|
|
switch ( eResult )
|
|
|
|
{
|
|
|
|
case eFailure:
|
|
|
|
case eTimeout:
|
|
|
|
mpImp->maViewURL = sPushURL;
|
|
|
|
return eResult;
|
|
|
|
|
|
|
|
case eStillRunning:
|
|
|
|
OSL_ENSURE( pAsyncDescriptor, "SvtFileView::Initialize: we told it to read synchronously!" );
|
|
|
|
case eSuccess:
|
|
|
|
return eResult;
|
|
|
|
}
|
|
|
|
|
2011-03-19 14:11:09 +01:00
|
|
|
OSL_FAIL( "SvtFileView::Initialize: unreachable!" );
|
2004-10-22 11:33:22 +00:00
|
|
|
return eFailure;
|
|
|
|
}
|
|
|
|
|
2009-03-03 10:51:13 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
FileViewResult SvtFileView::Initialize(
|
|
|
|
const String& rURL,
|
|
|
|
const String& rFilter,
|
|
|
|
const FileViewAsyncAction* pAsyncDescriptor )
|
|
|
|
{
|
|
|
|
return Initialize( rURL, rFilter, pAsyncDescriptor, ::com::sun::star::uno::Sequence< ::rtl::OUString >());
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
sal_Bool SvtFileView::Initialize( const Sequence< OUString >& aContents )
|
|
|
|
{
|
|
|
|
WaitObject aWaitCursor( this );
|
|
|
|
|
|
|
|
mpImp->maViewURL = String();
|
2001-07-13 12:41:02 +00:00
|
|
|
mpImp->maCurrentFilter = mpImp->maAllFilter;
|
|
|
|
|
|
|
|
mpImp->Clear();
|
|
|
|
mpImp->CreateVector_Impl( aContents );
|
2011-04-27 15:09:42 +02:00
|
|
|
if( GetSortColumn() )
|
|
|
|
mpImp->SortFolderContent_Impl();
|
2001-07-13 12:41:02 +00:00
|
|
|
|
|
|
|
mpImp->OpenFolder_Impl();
|
|
|
|
|
|
|
|
mpImp->maOpenDoneLink.Call( this );
|
2003-03-27 13:40:07 +00:00
|
|
|
|
|
|
|
return sal_True;
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
FileViewResult SvtFileView::ExecuteFilter( const String& rFilter, const FileViewAsyncAction* pAsyncDescriptor )
|
2001-05-07 09:33:55 +00:00
|
|
|
{
|
2001-07-13 12:41:02 +00:00
|
|
|
mpImp->maCurrentFilter = rFilter;
|
|
|
|
mpImp->maCurrentFilter.ToLowerAscii();
|
|
|
|
|
|
|
|
mpImp->Clear();
|
2009-03-03 10:51:13 +00:00
|
|
|
FileViewResult eResult = mpImp->GetFolderContent_Impl( mpImp->maViewURL, pAsyncDescriptor, mpBlackList );
|
2004-10-22 11:33:22 +00:00
|
|
|
OSL_ENSURE( ( eResult != eStillRunning ) || pAsyncDescriptor, "SvtFileView::ExecuteFilter: we told it to read synchronously!" );
|
|
|
|
return eResult;
|
|
|
|
}
|
2003-03-27 13:40:07 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
void SvtFileView::CancelRunningAsyncAction()
|
|
|
|
{
|
|
|
|
mpImp->CancelRunningAsyncAction();
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SvtFileView::SetNoSelection()
|
|
|
|
{
|
2010-11-05 10:31:15 +08:00
|
|
|
mpImp->mpView->SelectAll( sal_False );
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2001-09-05 09:29:14 +00:00
|
|
|
void SvtFileView::GetFocus()
|
2001-05-07 09:33:55 +00:00
|
|
|
{
|
2001-09-05 09:29:14 +00:00
|
|
|
Control::GetFocus();
|
2002-09-20 07:50:05 +00:00
|
|
|
if ( mpImp && mpImp->mpView )
|
|
|
|
mpImp->mpView->GrabFocus();
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SvtFileView::SetSelectHdl( const Link& rHdl )
|
|
|
|
{
|
2001-12-07 14:39:24 +00:00
|
|
|
mpImp->SetSelectHandler( rHdl );
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SvtFileView::SetDoubleClickHdl( const Link& rHdl )
|
|
|
|
{
|
2001-07-13 12:41:02 +00:00
|
|
|
mpImp->mpView->SetDoubleClickHdl( rHdl );
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2011-01-12 15:56:50 +01:00
|
|
|
sal_uLong SvtFileView::GetSelectionCount() const
|
2001-05-07 09:33:55 +00:00
|
|
|
{
|
2001-07-13 12:41:02 +00:00
|
|
|
return mpImp->mpView->GetSelectionCount();
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
SvLBoxEntry* SvtFileView::FirstSelected() const
|
|
|
|
{
|
2001-07-13 12:41:02 +00:00
|
|
|
return mpImp->mpView->FirstSelected();
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
SvLBoxEntry* SvtFileView::NextSelected( SvLBoxEntry* pEntry ) const
|
|
|
|
{
|
2001-07-13 12:41:02 +00:00
|
|
|
return mpImp->mpView->NextSelected( pEntry );
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SvtFileView::EnableAutoResize()
|
|
|
|
{
|
2001-07-13 12:41:02 +00:00
|
|
|
mpImp->mpView->EnableAutoResize();
|
2001-05-07 09:33:55 +00:00
|
|
|
}
|
|
|
|
|
2001-07-05 11:50:24 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void SvtFileView::SetFocus()
|
|
|
|
{
|
2001-07-13 12:41:02 +00:00
|
|
|
mpImp->mpView->GrabFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
const String& SvtFileView::GetViewURL() const
|
|
|
|
{
|
|
|
|
return mpImp->maViewURL;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView::SetOpenDoneHdl( const Link& rHdl )
|
|
|
|
{
|
|
|
|
mpImp->maOpenDoneLink = rHdl;
|
|
|
|
}
|
|
|
|
|
2001-07-18 12:42:33 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView::EnableContextMenu( sal_Bool bEnable )
|
|
|
|
{
|
|
|
|
mpImp->EnableContextMenu( bEnable );
|
|
|
|
}
|
|
|
|
|
2001-07-19 09:12:13 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView::EnableDelete( sal_Bool bEnable )
|
|
|
|
{
|
|
|
|
mpImp->EnableDelete( bEnable );
|
|
|
|
}
|
|
|
|
|
2001-10-19 12:59:02 +00:00
|
|
|
void SvtFileView::EnableNameReplacing( sal_Bool bEnable )
|
|
|
|
{
|
|
|
|
mpImp->EnableNameReplacing( bEnable );
|
|
|
|
}
|
|
|
|
|
2006-03-29 07:37:58 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView::EndInplaceEditing( bool _bCancel )
|
|
|
|
{
|
|
|
|
return mpImp->EndEditing( _bCancel );
|
|
|
|
}
|
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
IMPL_LINK( SvtFileView, HeaderSelect_Impl, HeaderBar*, pBar )
|
|
|
|
{
|
2002-08-22 10:14:21 +00:00
|
|
|
DBG_ASSERT( pBar, "no headerbar" );
|
2010-11-05 10:31:15 +08:00
|
|
|
sal_uInt16 nItemID = pBar->GetCurItemId();
|
2001-07-13 12:41:02 +00:00
|
|
|
|
|
|
|
HeaderBarItemBits nBits;
|
|
|
|
|
|
|
|
// clear the arrow of the recently used column
|
|
|
|
if ( nItemID != mpImp->mnSortColumn )
|
|
|
|
{
|
2002-08-22 10:14:21 +00:00
|
|
|
if ( !nItemID )
|
|
|
|
{
|
|
|
|
// first call -> remove arrow from title column,
|
|
|
|
// because another column is the sort column
|
|
|
|
nItemID = mpImp->mnSortColumn;
|
|
|
|
mpImp->mnSortColumn = COLUMN_TITLE;
|
|
|
|
}
|
2001-07-13 12:41:02 +00:00
|
|
|
nBits = pBar->GetItemBits( mpImp->mnSortColumn );
|
|
|
|
nBits &= ~( HIB_UPARROW | HIB_DOWNARROW );
|
|
|
|
pBar->SetItemBits( mpImp->mnSortColumn, nBits );
|
|
|
|
}
|
|
|
|
|
|
|
|
nBits = pBar->GetItemBits( nItemID );
|
|
|
|
|
2010-11-05 10:31:15 +08:00
|
|
|
sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
|
2001-07-13 12:41:02 +00:00
|
|
|
|
|
|
|
if ( bUp )
|
|
|
|
{
|
|
|
|
nBits &= ~HIB_UPARROW;
|
|
|
|
nBits |= HIB_DOWNARROW;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
nBits &= ~HIB_DOWNARROW;
|
|
|
|
nBits |= HIB_UPARROW;
|
|
|
|
}
|
|
|
|
|
|
|
|
pBar->SetItemBits( nItemID, nBits );
|
|
|
|
mpImp->Resort_Impl( nItemID, !bUp );
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2002-08-22 10:14:21 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
IMPL_LINK( SvtFileView, HeaderEndDrag_Impl, HeaderBar*, pBar )
|
|
|
|
{
|
|
|
|
if ( !pBar->IsItemMode() )
|
|
|
|
{
|
|
|
|
Size aSize;
|
2010-11-05 10:31:15 +08:00
|
|
|
sal_uInt16 nTabs = pBar->GetItemCount();
|
2002-08-22 10:14:21 +00:00
|
|
|
long nTmpSize = 0;
|
|
|
|
|
2010-11-05 10:31:15 +08:00
|
|
|
for ( sal_uInt16 i = 1; i <= nTabs; ++i )
|
2002-08-22 10:14:21 +00:00
|
|
|
{
|
|
|
|
long nWidth = pBar->GetItemSize(i);
|
|
|
|
aSize.Width() = nWidth + nTmpSize;
|
|
|
|
nTmpSize += nWidth;
|
|
|
|
mpImp->mpView->SetTab( i, aSize.Width(), MAP_PIXEL );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2001-10-19 12:59:02 +00:00
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2002-08-22 10:14:21 +00:00
|
|
|
String SvtFileView::GetConfigString() const
|
|
|
|
{
|
|
|
|
String sRet;
|
|
|
|
HeaderBar* pBar = mpImp->mpView->GetHeaderBar();
|
|
|
|
DBG_ASSERT( pBar, "invalid headerbar" );
|
|
|
|
|
|
|
|
// sort order
|
|
|
|
sRet += String::CreateFromInt32( mpImp->mnSortColumn );
|
|
|
|
sRet += ';';
|
|
|
|
HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn );
|
2010-11-05 10:31:15 +08:00
|
|
|
sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
|
2002-08-22 10:14:21 +00:00
|
|
|
sRet += bUp ? '1' : '0';
|
|
|
|
sRet += ';';
|
|
|
|
|
2010-11-05 10:31:15 +08:00
|
|
|
sal_uInt16 nCount = pBar->GetItemCount();
|
|
|
|
for ( sal_uInt16 i = 0; i < nCount; ++i )
|
2002-08-22 10:14:21 +00:00
|
|
|
{
|
2010-11-05 10:31:15 +08:00
|
|
|
sal_uInt16 nId = pBar->GetItemId(i);
|
2002-08-22 10:14:21 +00:00
|
|
|
sRet += String::CreateFromInt32( nId );
|
|
|
|
sRet += ';';
|
|
|
|
sRet += String::CreateFromInt32( pBar->GetItemSize( nId ) );
|
|
|
|
sRet += ';';
|
|
|
|
}
|
|
|
|
|
2011-11-22 23:40:24 +00:00
|
|
|
sRet = comphelper::string::stripEnd(sRet, ';');
|
2002-08-22 10:14:21 +00:00
|
|
|
return sRet;
|
|
|
|
}
|
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2002-08-22 10:14:21 +00:00
|
|
|
void SvtFileView::SetConfigString( const String& rCfgStr )
|
|
|
|
{
|
|
|
|
HeaderBar* pBar = mpImp->mpView->GetHeaderBar();
|
|
|
|
DBG_ASSERT( pBar, "invalid headerbar" );
|
|
|
|
|
2010-11-05 10:31:15 +08:00
|
|
|
sal_uInt16 nIdx = 0;
|
|
|
|
mpImp->mnSortColumn = (sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
|
|
|
|
sal_Bool bUp = (sal_Bool)(sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
|
2002-08-22 10:14:21 +00:00
|
|
|
HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn );
|
|
|
|
|
|
|
|
if ( bUp )
|
|
|
|
{
|
|
|
|
nBits &= ~HIB_UPARROW;
|
|
|
|
nBits |= HIB_DOWNARROW;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
nBits &= ~HIB_DOWNARROW;
|
|
|
|
nBits |= HIB_UPARROW;
|
|
|
|
}
|
|
|
|
pBar->SetItemBits( mpImp->mnSortColumn, nBits );
|
|
|
|
|
|
|
|
while ( nIdx != STRING_NOTFOUND )
|
|
|
|
{
|
2010-11-05 10:31:15 +08:00
|
|
|
sal_uInt16 nItemId = (sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
|
2002-08-22 10:14:21 +00:00
|
|
|
pBar->SetItemSize( nItemId, rCfgStr.GetToken( 0, ';', nIdx ).ToInt32() );
|
|
|
|
}
|
|
|
|
|
|
|
|
HeaderSelect_Impl( pBar );
|
|
|
|
HeaderEndDrag_Impl( pBar );
|
|
|
|
}
|
|
|
|
|
2003-09-29 14:01:07 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView::SetUrlFilter( const IUrlFilter* _pFilter )
|
|
|
|
{
|
|
|
|
mpImp->mpUrlFilter = _pFilter;
|
|
|
|
}
|
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView::StateChanged( StateChangedType nStateChange )
|
|
|
|
{
|
|
|
|
if ( nStateChange == STATE_CHANGE_ENABLE )
|
|
|
|
Invalidate();
|
|
|
|
Control::StateChanged( nStateChange );
|
|
|
|
}
|
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2002-08-22 10:14:21 +00:00
|
|
|
// class NameTranslator_Impl
|
2001-07-13 12:41:02 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2001-10-19 12:59:02 +00:00
|
|
|
|
|
|
|
NameTranslator_Impl::NameTranslator_Impl( const INetURLObject& rActualFolder )
|
|
|
|
{
|
|
|
|
mpActFolder = new NameTranslationList( rActualFolder );
|
|
|
|
}
|
|
|
|
|
|
|
|
NameTranslator_Impl::~NameTranslator_Impl()
|
|
|
|
{
|
|
|
|
if( mpActFolder )
|
|
|
|
delete mpActFolder;
|
|
|
|
}
|
|
|
|
|
|
|
|
void NameTranslator_Impl::SetActualFolder( const INetURLObject& rActualFolder )
|
|
|
|
{
|
|
|
|
HashedEntry aActFolder( rActualFolder );
|
|
|
|
|
|
|
|
if( mpActFolder )
|
|
|
|
{
|
|
|
|
if( *mpActFolder != aActFolder )
|
|
|
|
{
|
|
|
|
delete mpActFolder;
|
|
|
|
mpActFolder = new NameTranslationList( rActualFolder );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
mpActFolder = new NameTranslationList( rActualFolder );
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool NameTranslator_Impl::GetTranslation( const OUString& rOrg, OUString& rTrans ) const
|
|
|
|
{
|
|
|
|
sal_Bool bRet = sal_False;
|
|
|
|
|
|
|
|
if( mpActFolder )
|
|
|
|
{
|
|
|
|
const OUString* pTrans = mpActFolder->Translate( rOrg );
|
|
|
|
if( pTrans )
|
|
|
|
{
|
|
|
|
rTrans = *pTrans;
|
|
|
|
bRet = sal_True;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2001-10-29 11:47:49 +00:00
|
|
|
const String* NameTranslator_Impl::GetTransTableFileName() const
|
|
|
|
{
|
|
|
|
return mpActFolder? &mpActFolder->GetTransTableFileName() : NULL;
|
|
|
|
}
|
|
|
|
|
2002-08-22 10:14:21 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
// class SvtFileView_Impl
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2008-10-14 05:23:43 +00:00
|
|
|
SvtFileView_Impl::SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommandEnvironment > xEnv, sal_Int16 nFlags, sal_Bool bOnlyFolder )
|
2002-08-22 10:14:21 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
:mpAntiImpl ( pAntiImpl )
|
2006-06-19 19:50:20 +00:00
|
|
|
,m_eAsyncActionResult ( ::svt::ERROR )
|
|
|
|
,m_bRunningAsyncAction ( false )
|
|
|
|
,m_bAsyncActionCancelled ( false )
|
|
|
|
,mpNameTrans ( NULL )
|
|
|
|
,mpUrlFilter ( NULL )
|
2004-10-22 11:33:22 +00:00
|
|
|
,mnSortColumn ( COLUMN_TITLE )
|
2001-12-07 14:39:24 +00:00
|
|
|
,mbAscending ( sal_True )
|
|
|
|
,mbOnlyFolder ( bOnlyFolder )
|
|
|
|
,mbReplaceNames ( sal_False )
|
2004-06-28 16:06:15 +00:00
|
|
|
,mnSuspendSelectCallback ( 0 )
|
2004-07-06 06:33:26 +00:00
|
|
|
,mbIsFirstResort ( sal_True )
|
2006-06-19 19:50:20 +00:00
|
|
|
,aIntlWrapper ( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() )
|
|
|
|
,maFolderImage ( SvtResId( IMG_SVT_FOLDER ) )
|
2008-10-14 05:23:43 +00:00
|
|
|
,mxCmdEnv ( xEnv )
|
2002-08-22 10:14:21 +00:00
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
{
|
|
|
|
maAllFilter = String::CreateFromAscii( "*.*" );
|
2004-10-22 11:33:22 +00:00
|
|
|
mpView = new ViewTabListBox_Impl( mpAntiImpl, this, nFlags );
|
2003-03-27 13:40:07 +00:00
|
|
|
mpView->EnableCellFocus();
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
SvtFileView_Impl::~SvtFileView_Impl()
|
|
|
|
{
|
|
|
|
Clear();
|
|
|
|
|
2002-09-20 07:50:05 +00:00
|
|
|
// use temp pointer to prevent access of deleted member (GetFocus())
|
|
|
|
ViewTabListBox_Impl* pTemp = mpView;
|
|
|
|
mpView = NULL;
|
|
|
|
delete pTemp;
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView_Impl::Clear()
|
|
|
|
{
|
2001-07-18 10:46:38 +00:00
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
std::vector< SortingData_Impl* >::iterator aIt;
|
|
|
|
|
2010-12-23 15:06:30 +00:00
|
|
|
for ( aIt = maContent.begin(); aIt != maContent.end(); ++aIt )
|
2001-07-13 12:41:02 +00:00
|
|
|
delete (*aIt);
|
|
|
|
|
|
|
|
maContent.clear();
|
2001-10-19 12:59:02 +00:00
|
|
|
|
|
|
|
if( mpNameTrans )
|
|
|
|
DELETEZ( mpNameTrans );
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
2009-03-03 10:51:13 +00:00
|
|
|
FileViewResult SvtFileView_Impl::GetFolderContent_Impl(
|
|
|
|
const String& rFolder,
|
|
|
|
const FileViewAsyncAction* pAsyncDescriptor,
|
|
|
|
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList )
|
2001-07-13 12:41:02 +00:00
|
|
|
{
|
2004-10-22 11:33:22 +00:00
|
|
|
::osl::ClearableMutexGuard aGuard( maMutex );
|
2005-01-05 11:45:56 +00:00
|
|
|
INetURLObject aFolderObj( rFolder );
|
|
|
|
DBG_ASSERT( aFolderObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2005-01-05 11:45:56 +00:00
|
|
|
// prepare name translation
|
|
|
|
SetActualFolder( aFolderObj );
|
2004-10-22 11:33:22 +00:00
|
|
|
|
2005-01-05 11:45:56 +00:00
|
|
|
FolderDescriptor aFolder( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ) );
|
2004-10-22 11:33:22 +00:00
|
|
|
|
2005-01-05 11:45:56 +00:00
|
|
|
aGuard.clear();
|
2009-03-03 10:51:13 +00:00
|
|
|
return GetFolderContent_Impl( aFolder, pAsyncDescriptor, rBlackList );
|
2004-08-02 13:35:15 +00:00
|
|
|
}
|
2004-10-22 11:33:22 +00:00
|
|
|
|
2004-08-02 13:35:15 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2009-03-03 10:51:13 +00:00
|
|
|
FileViewResult SvtFileView_Impl::GetFolderContent_Impl(
|
|
|
|
const FolderDescriptor& _rFolder,
|
|
|
|
const FileViewAsyncAction* pAsyncDescriptor,
|
|
|
|
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList )
|
2004-08-02 13:35:15 +00:00
|
|
|
{
|
2004-10-22 11:33:22 +00:00
|
|
|
DBG_TESTSOLARMUTEX();
|
|
|
|
::osl::ClearableMutexGuard aGuard( maMutex );
|
2004-08-02 13:35:15 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
OSL_ENSURE( !m_pContentEnumerator.is(), "SvtFileView_Impl::GetFolderContent_Impl: still running another enumeration!" );
|
|
|
|
m_pContentEnumerator = new ::svt::FileViewContentEnumerator(
|
|
|
|
mpView->GetCommandEnvironment(), maContent, maMutex, mbReplaceNames ? mpNameTrans : NULL );
|
|
|
|
// TODO: should we cache and re-use this thread?
|
2004-08-02 13:35:15 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
if ( !pAsyncDescriptor )
|
2004-08-02 13:35:15 +00:00
|
|
|
{
|
2009-03-03 10:51:13 +00:00
|
|
|
::svt::EnumerationResult eResult = m_pContentEnumerator->enumerateFolderContentSync( _rFolder, mpUrlFilter, rBlackList );
|
2004-10-22 11:33:22 +00:00
|
|
|
if ( ::svt::SUCCESS == eResult )
|
|
|
|
{
|
|
|
|
implEnumerationSuccess();
|
2012-02-23 10:43:29 +01:00
|
|
|
m_pContentEnumerator.clear();
|
2004-10-22 11:33:22 +00:00
|
|
|
return eSuccess;
|
|
|
|
}
|
2012-02-23 10:43:29 +01:00
|
|
|
m_pContentEnumerator.clear();
|
2004-10-22 11:33:22 +00:00
|
|
|
return eFailure;
|
|
|
|
}
|
2001-10-19 12:59:02 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
m_bRunningAsyncAction = true;
|
|
|
|
m_bAsyncActionCancelled = false;
|
|
|
|
m_eAsyncActionResult = ::svt::ERROR;
|
|
|
|
m_aAsyncActionFinished.reset();
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
// don't (yet) set m_aCurrentAsyncActionHandler to pTimeout->aFinishHandler.
|
|
|
|
// By definition, this handler *only* get's called when the result cannot be obtained
|
|
|
|
// during the minimum wait time, so it is only set below, when needed.
|
|
|
|
m_aCurrentAsyncActionHandler = Link();
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
// minimum time to wait
|
|
|
|
::std::auto_ptr< TimeValue > pTimeout( new TimeValue );
|
|
|
|
sal_Int32 nMinTimeout = pAsyncDescriptor->nMinTimeout;
|
|
|
|
OSL_ENSURE( nMinTimeout > 0, "SvtFileView_Impl::GetFolderContent_Impl: invalid minimum timeout!" );
|
|
|
|
if ( nMinTimeout <= 0 )
|
2007-07-10 14:16:16 +00:00
|
|
|
nMinTimeout = sal_Int32( 1000L );
|
2004-10-22 11:33:22 +00:00
|
|
|
pTimeout->Seconds = nMinTimeout / 1000L;
|
|
|
|
pTimeout->Nanosec = ( nMinTimeout % 1000L ) * 1000000L;
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
m_pContentEnumerator->enumerateFolderContent( _rFolder, mpUrlFilter, this );
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
// wait until the enumeration is finished
|
|
|
|
// for this, release our own mutex (which is used by the enumerator thread)
|
|
|
|
aGuard.clear();
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
::osl::Condition::Result eResult = ::osl::Condition::result_ok;
|
|
|
|
{
|
|
|
|
// also release the SolarMutex. Not all code which is needed during the enumeration
|
|
|
|
// is Solar-Thread-Safe, in particular there is some code which needs to access
|
|
|
|
// string resources (and our resource system relies on the SolarMutex :()
|
2010-10-05 15:49:42 +02:00
|
|
|
SolarMutexReleaser aSolarRelease;
|
2001-11-22 13:06:38 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
// now wait. Note that if we didn't get an pAsyncDescriptor, then this is an infinite wait.
|
|
|
|
eResult = m_aAsyncActionFinished.wait( pTimeout.get() );
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
2004-10-22 11:33:22 +00:00
|
|
|
|
|
|
|
::osl::MutexGuard aGuard2( maMutex );
|
|
|
|
if ( ::osl::Condition::result_timeout == eResult )
|
2001-07-13 12:41:02 +00:00
|
|
|
{
|
2004-10-22 11:33:22 +00:00
|
|
|
// maximum time to wait
|
|
|
|
OSL_ENSURE( !m_pCancelAsyncTimer.get(), "SvtFileView_Impl::GetFolderContent_Impl: there's still a previous timer!" );
|
|
|
|
m_pCancelAsyncTimer = new CallbackTimer( this );
|
|
|
|
sal_Int32 nMaxTimeout = pAsyncDescriptor->nMaxTimeout;
|
|
|
|
OSL_ENSURE( nMaxTimeout > nMinTimeout,
|
|
|
|
"SvtFileView_Impl::GetFolderContent_Impl: invalid maximum timeout!" );
|
|
|
|
if ( nMaxTimeout <= nMinTimeout )
|
|
|
|
nMaxTimeout = nMinTimeout + 5000;
|
2010-10-11 20:57:53 -05:00
|
|
|
m_pCancelAsyncTimer->setRemainingTime( salhelper::TTimeValue( nMaxTimeout - nMinTimeout ) );
|
2004-10-22 11:33:22 +00:00
|
|
|
// we already waited for nMinTimeout milliseconds, so take this into account
|
|
|
|
m_pCancelAsyncTimer->start();
|
|
|
|
|
|
|
|
m_aCurrentAsyncActionHandler = pAsyncDescriptor->aFinishHandler;
|
|
|
|
DBG_ASSERT( m_aCurrentAsyncActionHandler.IsSet(), "SvtFileView_Impl::GetFolderContent_Impl: nobody interested when it's finished?" );
|
|
|
|
mpView->ClearAll();
|
|
|
|
return eStillRunning;
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
2004-10-22 11:33:22 +00:00
|
|
|
|
|
|
|
m_bRunningAsyncAction = false;
|
|
|
|
switch ( m_eAsyncActionResult )
|
2001-07-13 12:41:02 +00:00
|
|
|
{
|
2004-10-22 11:33:22 +00:00
|
|
|
case ::svt::SUCCESS:
|
|
|
|
return eSuccess;
|
2003-03-27 13:40:07 +00:00
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
case ::svt::ERROR:
|
|
|
|
return eFailure;
|
2006-06-19 19:50:20 +00:00
|
|
|
|
|
|
|
case ::svt::RUNNING:
|
|
|
|
return eStillRunning;
|
2004-10-22 11:33:22 +00:00
|
|
|
}
|
2003-03-27 13:40:07 +00:00
|
|
|
|
2012-01-16 23:11:06 +01:00
|
|
|
SAL_WARN( "svtools.contnr", "SvtFileView_Impl::GetFolderContent_Impl: unreachable!" );
|
2004-10-22 11:33:22 +00:00
|
|
|
return eFailure;
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
2004-10-22 11:33:22 +00:00
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView_Impl::FilterFolderContent_Impl( const OUString &rFilter )
|
|
|
|
{
|
2001-10-29 11:47:49 +00:00
|
|
|
sal_Bool bHideTransFile = mbReplaceNames && mpNameTrans;
|
|
|
|
|
|
|
|
String sHideEntry;
|
|
|
|
if( bHideTransFile )
|
|
|
|
{
|
|
|
|
const String* pTransTableFileName = mpNameTrans->GetTransTableFileName();
|
|
|
|
if( pTransTableFileName )
|
|
|
|
{
|
|
|
|
sHideEntry = *pTransTableFileName;
|
|
|
|
sHideEntry.ToUpperAscii();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
bHideTransFile = sal_False;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( !bHideTransFile &&
|
2012-01-13 19:13:55 -02:00
|
|
|
( rFilter.isEmpty() || ( rFilter.compareToAscii( ALL_FILES_FILTER ) == COMPARE_EQUAL ) ) )
|
2001-10-29 11:47:49 +00:00
|
|
|
// when replacing names, there is always something to filter (no view of ".nametranslation.table")
|
2001-07-13 12:41:02 +00:00
|
|
|
return;
|
|
|
|
|
2001-07-18 10:46:38 +00:00
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
if ( maContent.empty() )
|
2001-07-19 09:12:13 +00:00
|
|
|
return;
|
|
|
|
|
2001-09-11 12:40:50 +00:00
|
|
|
// count (estimate) the number of filter tokens
|
2001-09-19 14:37:41 +00:00
|
|
|
sal_Int32 nTokens=0;
|
2001-09-11 12:40:50 +00:00
|
|
|
const sal_Unicode* pStart = rFilter.getStr();
|
|
|
|
const sal_Unicode* pEnd = pStart + rFilter.getLength();
|
|
|
|
while ( pStart != pEnd )
|
|
|
|
if ( *pStart++ == ';' )
|
|
|
|
++nTokens;
|
|
|
|
|
|
|
|
// collect the filter tokens
|
|
|
|
::std::vector< WildCard > aFilters;
|
2004-08-02 13:35:15 +00:00
|
|
|
FilterMatch::createWildCardFilterList(rFilter,aFilters);
|
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2001-09-11 12:40:50 +00:00
|
|
|
// do the filtering
|
|
|
|
::std::vector< SortingData_Impl* >::iterator aContentLoop = maContent.begin();
|
|
|
|
String sCompareString;
|
2001-07-13 12:41:02 +00:00
|
|
|
do
|
|
|
|
{
|
2003-03-27 13:40:07 +00:00
|
|
|
if ( (*aContentLoop)->mbIsFolder )
|
2001-09-11 12:40:50 +00:00
|
|
|
++aContentLoop;
|
2001-07-13 12:41:02 +00:00
|
|
|
else
|
|
|
|
{
|
2001-09-11 12:40:50 +00:00
|
|
|
// normalize the content title (we always match case-insensitive)
|
|
|
|
// 91872 - 11.09.2001 - frank.schoenheit@sun.com
|
2010-06-07 09:49:05 +02:00
|
|
|
sCompareString = (*aContentLoop)->GetFileName(); // filter works on file name, not on title!
|
2001-10-29 11:47:49 +00:00
|
|
|
sal_Bool bDelete;
|
|
|
|
|
|
|
|
if( bHideTransFile && sCompareString == sHideEntry )
|
|
|
|
bDelete = sal_True;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// search for the first filter which matches
|
|
|
|
::std::vector< WildCard >::const_iterator pMatchingFilter =
|
|
|
|
::std::find_if(
|
|
|
|
aFilters.begin(),
|
|
|
|
aFilters.end(),
|
|
|
|
FilterMatch( sCompareString )
|
|
|
|
);
|
|
|
|
|
|
|
|
bDelete = aFilters.end() == pMatchingFilter;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( bDelete )
|
2001-07-13 12:41:02 +00:00
|
|
|
{
|
2001-09-11 12:40:50 +00:00
|
|
|
// none of the filters did match
|
|
|
|
delete (*aContentLoop);
|
|
|
|
|
|
|
|
if ( maContent.begin() == aContentLoop )
|
2001-07-13 12:41:02 +00:00
|
|
|
{
|
2001-09-11 12:40:50 +00:00
|
|
|
maContent.erase( aContentLoop );
|
|
|
|
aContentLoop = maContent.begin();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
std::vector< SortingData_Impl* >::iterator aDelete = aContentLoop;
|
|
|
|
--aContentLoop; // move the iterator to a position which is not invalidated by the erase
|
|
|
|
maContent.erase( aDelete );
|
|
|
|
++aContentLoop; // this is now the next one ....
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2001-09-11 12:40:50 +00:00
|
|
|
++aContentLoop;
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
|
|
|
}
|
2001-09-11 12:40:50 +00:00
|
|
|
while ( aContentLoop != maContent.end() );
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
|
|
|
|
2001-12-07 14:39:24 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
IMPL_LINK( SvtFileView_Impl, SelectionMultiplexer, void*, _pSource )
|
|
|
|
{
|
2004-06-28 16:06:15 +00:00
|
|
|
return mnSuspendSelectCallback ? 0L : m_aSelectHandler.Call( _pSource );
|
2001-12-07 14:39:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView_Impl::SetSelectHandler( const Link& _rHdl )
|
|
|
|
{
|
|
|
|
m_aSelectHandler = _rHdl;
|
|
|
|
|
|
|
|
Link aMasterHandler;
|
|
|
|
if ( m_aSelectHandler.IsSet() )
|
|
|
|
aMasterHandler = LINK( this, SvtFileView_Impl, SelectionMultiplexer );
|
|
|
|
|
|
|
|
mpView->SetSelectHdl( aMasterHandler );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView_Impl::InitSelection()
|
|
|
|
{
|
2002-10-31 11:15:21 +00:00
|
|
|
mpView->SelectAll( sal_False );
|
2001-12-07 14:39:24 +00:00
|
|
|
SvLBoxEntry* pFirst = mpView->First();
|
|
|
|
if ( pFirst )
|
|
|
|
mpView->SetCursor( pFirst, sal_True );
|
|
|
|
}
|
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView_Impl::OpenFolder_Impl()
|
|
|
|
{
|
2001-07-18 10:46:38 +00:00
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
|
2010-11-05 10:31:15 +08:00
|
|
|
mpView->SetUpdateMode( sal_False );
|
2001-07-13 12:41:02 +00:00
|
|
|
mpView->ClearAll();
|
|
|
|
|
|
|
|
std::vector< SortingData_Impl* >::iterator aIt;
|
|
|
|
|
2010-12-23 15:06:30 +00:00
|
|
|
for ( aIt = maContent.begin(); aIt != maContent.end(); ++aIt )
|
2001-07-13 12:41:02 +00:00
|
|
|
{
|
|
|
|
if ( mbOnlyFolder && ! (*aIt)->mbIsFolder )
|
|
|
|
continue;
|
|
|
|
|
|
|
|
// insert entry and set user data
|
|
|
|
SvLBoxEntry* pEntry = mpView->InsertEntry( (*aIt)->maDisplayText,
|
|
|
|
(*aIt)->maImage,
|
|
|
|
(*aIt)->maImage );
|
|
|
|
|
|
|
|
SvtContentEntry* pUserData = new SvtContentEntry( (*aIt)->maTargetURL,
|
|
|
|
(*aIt)->mbIsFolder );
|
|
|
|
pEntry->SetUserData( pUserData );
|
|
|
|
}
|
|
|
|
|
2001-12-07 14:39:24 +00:00
|
|
|
InitSelection();
|
2001-07-18 10:46:38 +00:00
|
|
|
|
2004-06-28 16:06:15 +00:00
|
|
|
++mnSuspendSelectCallback;
|
2010-11-05 10:31:15 +08:00
|
|
|
mpView->SetUpdateMode( sal_True );
|
2004-06-28 16:06:15 +00:00
|
|
|
--mnSuspendSelectCallback;
|
2001-12-07 14:39:24 +00:00
|
|
|
|
|
|
|
ResetCursor();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView_Impl::ResetCursor()
|
|
|
|
{
|
|
|
|
// deselect
|
|
|
|
SvLBoxEntry* pEntry = mpView->FirstSelected();
|
|
|
|
if ( pEntry )
|
2010-11-05 10:31:15 +08:00
|
|
|
mpView->Select( pEntry, sal_False );
|
2001-12-07 14:39:24 +00:00
|
|
|
// set cursor to the first entry
|
2010-11-05 10:31:15 +08:00
|
|
|
mpView->SetCursor( mpView->First(), sal_True );
|
2001-12-07 14:39:24 +00:00
|
|
|
mpView->Update();
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
|
|
|
|
2004-10-22 11:33:22 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView_Impl::CancelRunningAsyncAction()
|
|
|
|
{
|
|
|
|
DBG_TESTSOLARMUTEX();
|
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
if ( !m_pContentEnumerator.is() )
|
|
|
|
return;
|
|
|
|
|
|
|
|
m_bAsyncActionCancelled = true;
|
|
|
|
m_pContentEnumerator->cancel();
|
|
|
|
m_bRunningAsyncAction = false;
|
|
|
|
|
2012-02-23 10:43:29 +01:00
|
|
|
m_pContentEnumerator.clear();
|
2004-10-22 11:33:22 +00:00
|
|
|
if ( m_pCancelAsyncTimer.is() && m_pCancelAsyncTimer->isTicking() )
|
|
|
|
m_pCancelAsyncTimer->stop();
|
|
|
|
m_pCancelAsyncTimer = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------
|
2006-06-19 19:50:20 +00:00
|
|
|
void SvtFileView_Impl::onTimeout( CallbackTimer* )
|
2004-10-22 11:33:22 +00:00
|
|
|
{
|
2010-10-13 01:47:23 -05:00
|
|
|
SolarMutexGuard aSolarGuard;
|
2004-10-22 11:33:22 +00:00
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
if ( !m_bRunningAsyncAction )
|
|
|
|
// there might have been a race condition while we waited for the mutex
|
|
|
|
return;
|
|
|
|
|
|
|
|
CancelRunningAsyncAction();
|
|
|
|
|
|
|
|
if ( m_aCurrentAsyncActionHandler.IsSet() )
|
|
|
|
{
|
|
|
|
Application::PostUserEvent( m_aCurrentAsyncActionHandler, reinterpret_cast< void* >( eTimeout ) );
|
|
|
|
m_aCurrentAsyncActionHandler = Link();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------
|
|
|
|
void SvtFileView_Impl::enumerationDone( ::svt::EnumerationResult _eResult )
|
|
|
|
{
|
2010-10-13 01:47:23 -05:00
|
|
|
SolarMutexGuard aSolarGuard;
|
2004-10-22 11:33:22 +00:00
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
|
2012-02-23 10:43:29 +01:00
|
|
|
m_pContentEnumerator.clear();
|
2004-10-22 11:33:22 +00:00
|
|
|
if ( m_pCancelAsyncTimer.is() && m_pCancelAsyncTimer->isTicking() )
|
|
|
|
m_pCancelAsyncTimer->stop();
|
|
|
|
m_pCancelAsyncTimer = NULL;
|
|
|
|
|
|
|
|
if ( m_bAsyncActionCancelled )
|
|
|
|
// this is to prevent race conditions
|
|
|
|
return;
|
|
|
|
|
|
|
|
m_eAsyncActionResult = _eResult;
|
|
|
|
m_bRunningAsyncAction = false;
|
|
|
|
|
|
|
|
m_aAsyncActionFinished.set();
|
|
|
|
|
2006-06-19 19:50:20 +00:00
|
|
|
if ( svt::SUCCESS == _eResult )
|
2004-10-22 11:33:22 +00:00
|
|
|
implEnumerationSuccess();
|
|
|
|
|
|
|
|
if ( m_aCurrentAsyncActionHandler.IsSet() )
|
|
|
|
{
|
|
|
|
Application::PostUserEvent( m_aCurrentAsyncActionHandler, reinterpret_cast< void* >( m_eAsyncActionResult ) );
|
|
|
|
m_aCurrentAsyncActionHandler = Link();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------
|
|
|
|
void SvtFileView_Impl::implEnumerationSuccess()
|
|
|
|
{
|
|
|
|
FilterFolderContent_Impl( maCurrentFilter );
|
|
|
|
SortFolderContent_Impl();
|
|
|
|
CreateDisplayText_Impl();
|
|
|
|
OpenFolder_Impl();
|
|
|
|
maOpenDoneLink.Call( mpAntiImpl );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
2002-10-17 14:06:10 +00:00
|
|
|
void SvtFileView_Impl::ReplaceTabWithString( OUString& aValue )
|
|
|
|
{
|
2010-11-18 18:47:55 -05:00
|
|
|
OUString aTab( RTL_CONSTASCII_USTRINGPARAM( "\t" ));
|
|
|
|
OUString aTabString( RTL_CONSTASCII_USTRINGPARAM( "%09" ));
|
2002-10-17 14:06:10 +00:00
|
|
|
sal_Int32 iPos;
|
|
|
|
|
|
|
|
while ( ( iPos = aValue.indexOf( aTab ) ) >= 0 )
|
|
|
|
aValue = aValue.replaceAt( iPos, 1, aTabString );
|
|
|
|
}
|
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView_Impl::CreateDisplayText_Impl()
|
|
|
|
{
|
2001-07-18 10:46:38 +00:00
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
OUString aValue;
|
2010-11-18 18:47:55 -05:00
|
|
|
OUString aTab( RTL_CONSTASCII_USTRINGPARAM( "\t" ));
|
|
|
|
OUString aDateSep( RTL_CONSTASCII_USTRINGPARAM( ", " ));
|
2001-07-13 12:41:02 +00:00
|
|
|
|
|
|
|
std::vector< SortingData_Impl* >::iterator aIt;
|
|
|
|
|
2010-12-23 15:06:30 +00:00
|
|
|
for ( aIt = maContent.begin(); aIt != maContent.end(); ++aIt )
|
2001-07-13 12:41:02 +00:00
|
|
|
{
|
|
|
|
// title, type, size, date
|
2001-10-29 11:47:49 +00:00
|
|
|
aValue = (*aIt)->GetTitle();
|
2002-10-17 14:06:10 +00:00
|
|
|
// #83004# --------------------
|
|
|
|
ReplaceTabWithString( aValue );
|
2001-07-13 12:41:02 +00:00
|
|
|
aValue += aTab;
|
|
|
|
aValue += (*aIt)->maType;
|
|
|
|
aValue += aTab;
|
|
|
|
// folders don't have a size
|
|
|
|
if ( ! (*aIt)->mbIsFolder )
|
2012-03-12 19:58:09 +01:00
|
|
|
aValue += CreateExactSizeText( (*aIt)->maSize );
|
2001-07-13 12:41:02 +00:00
|
|
|
aValue += aTab;
|
2001-11-22 13:06:38 +00:00
|
|
|
// set the date, but volumes have no date
|
2001-12-11 14:11:43 +00:00
|
|
|
if ( ! (*aIt)->mbIsFolder || ! (*aIt)->mbIsVolume )
|
2001-11-22 13:06:38 +00:00
|
|
|
{
|
2001-12-18 09:25:26 +00:00
|
|
|
SvtSysLocale aSysLocale;
|
|
|
|
const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData();
|
2001-12-11 14:11:43 +00:00
|
|
|
aValue += rLocaleData.getDate( (*aIt)->maModDate );
|
2001-11-22 13:06:38 +00:00
|
|
|
aValue += aDateSep;
|
2001-12-11 14:11:43 +00:00
|
|
|
aValue += rLocaleData.getTime( (*aIt)->maModDate );
|
2001-11-22 13:06:38 +00:00
|
|
|
}
|
2001-07-13 12:41:02 +00:00
|
|
|
(*aIt)->maDisplayText = aValue;
|
|
|
|
|
|
|
|
// detect image
|
2001-12-11 14:11:43 +00:00
|
|
|
if ( (*aIt)->mbIsFolder )
|
|
|
|
{
|
|
|
|
::svtools::VolumeInfo aVolInfo( (*aIt)->mbIsVolume, (*aIt)->mbIsRemote,
|
|
|
|
(*aIt)->mbIsRemoveable, (*aIt)->mbIsFloppy,
|
|
|
|
(*aIt)->mbIsCompactDisc );
|
Merge commit 'ooo/DEV300_m101' into intm101
The following builds for me:
basebmp, basegfx, comphelper, dtrans, i18npool, i18nutil, l10ntools, o3tl,
psprint_config, regexp, rsc, sax, sot, tools, ucbhelper, unotools, vcl
The rest still needs fixing ;-)
Conflicts:
canvas/prj/build.lst
canvas/source/cairo/cairo_textlayout.cxx
canvas/source/directx/dx_winstuff.hxx
canvas/source/tools/image.cxx
canvas/source/vcl/canvashelper.cxx
comphelper/inc/comphelper/documentconstants.hxx
comphelper/inc/comphelper/optionalvalue.hxx
comphelper/inc/comphelper/querydeep.hxx
comphelper/prj/build.lst
comphelper/qa/complex/makefile.mk
comphelper/qa/string/test_string_noadditional.cxx
comphelper/source/misc/componentmodule.cxx
comphelper/source/misc/mimeconfighelper.cxx
comphelper/source/misc/querydeep.cxx
comphelper/source/misc/uieventslogger.cxx
comphelper/source/property/TypeGeneration.cxx
comphelper/test/uno_iterators/uno_iterators.cxx
comphelper/util/makefile.mk
cppcanvas/source/mtfrenderer/implrenderer.cxx
dtrans/prj/build.lst
dtrans/source/generic/dtrans.cxx
dtrans/source/win32/dtobj/FmtFilter.cxx
i18npool/prj/build.lst
i18npool/source/localedata/data/localedata_others.map
i18npool/source/localedata/data/makefile.mk
i18npool/source/localedata/localedata.cxx
i18npool/source/localedata/saxparser.cxx
i18npool/source/registerservices/registerservices.cxx
i18npool/source/search/textsearch.cxx
l10ntools/inc/cfgmerge.hxx
l10ntools/inc/export.hxx
l10ntools/inc/gsicheck.hxx
l10ntools/inc/l10ntools/vosapp.hxx
l10ntools/inc/tagtest.hxx
l10ntools/inc/xmlparse.hxx
l10ntools/layout/layoutparse.cxx
l10ntools/layout/tralay.cxx
l10ntools/source/cfgmerge.cxx
l10ntools/source/export.cxx
l10ntools/source/export2.cxx
l10ntools/source/gsicheck.cxx
l10ntools/source/help/HelpLinker.cxx
l10ntools/source/lngex.cxx
l10ntools/source/lngmerge.cxx
l10ntools/source/merge.cxx
l10ntools/source/tagtest.cxx
l10ntools/source/xmlparse.cxx
padmin/source/fontentry.cxx
padmin/source/padialog.cxx
padmin/source/padialog.src
padmin/source/pamain.cxx
rsc/inc/rscarray.hxx
rsc/inc/rscclass.hxx
rsc/inc/rscclobj.hxx
rsc/inc/rsccont.hxx
rsc/inc/rscdb.hxx
rsc/inc/rscdef.hxx
rsc/inc/rscmgr.hxx
rsc/inc/rscrange.hxx
rsc/inc/rsctop.hxx
rsc/inc/vclrsc.hxx
rsc/source/parser/rscdb.cxx
rsc/source/parser/rscicpx.cxx
rsc/source/parser/rscinit.cxx
rsc/source/prj/start.cxx
rsc/source/res/rscarray.cxx
rsc/source/res/rscclass.cxx
rsc/source/res/rscclobj.cxx
rsc/source/res/rsccont.cxx
rsc/source/res/rscmgr.cxx
rsc/source/res/rscrange.cxx
rsc/source/res/rsctop.cxx
rsc/source/rsc/rsc.cxx
rsc/source/tools/rscdef.cxx
rsc/source/tools/rsctools.cxx
sax/source/expatwrap/sax_expat.cxx
sax/source/fastparser/facreg.cxx
sax/source/tools/fastserializer.cxx
sot/inc/sot/filelist.hxx
sot/inc/sot/object.hxx
sot/source/base/factory.cxx
sot/source/base/filelist.cxx
sot/source/sdstor/stg.cxx
sot/source/sdstor/stgcache.cxx
sot/source/sdstor/stgole.cxx
sot/source/sdstor/stgstrms.cxx
sot/source/sdstor/storage.cxx
sot/source/sdstor/ucbstorage.cxx
svl/inc/svl/cenumitm.hxx
svl/inc/svl/cintitem.hxx
svl/inc/svl/cntwall.hxx
svl/inc/svl/ctypeitm.hxx
svl/inc/svl/custritm.hxx
svl/inc/svl/dateitem.hxx
svl/inc/svl/filerec.hxx
svl/inc/svl/globalnameitem.hxx
svl/inc/svl/ilstitem.hxx
svl/inc/svl/imageitm.hxx
svl/inc/svl/intitem.hxx
svl/inc/svl/itempool.hxx
svl/inc/svl/itemset.hxx
svl/inc/svl/lckbitem.hxx
svl/inc/svl/poolitem.hxx
svl/inc/svl/ptitem.hxx
svl/inc/svl/rectitem.hxx
svl/inc/svl/sfontitm.hxx
svl/inc/svl/slstitm.hxx
svl/inc/svl/srchitem.hxx
svl/inc/svl/svarray.hxx
svl/inc/svl/svdde.hxx
svl/inc/svl/svstdarr.hxx
svl/inc/svl/szitem.hxx
svl/inc/svl/visitem.hxx
svl/inc/svl/zforlist.hxx
svl/inc/svl/zformat.hxx
svl/prj/build.lst
svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx
svl/qa/complex/ConfigItems/helper/makefile.mk
svl/qa/makefile.mk
svl/source/filepicker/pickerhelper.cxx
svl/source/filerec/filerec.cxx
svl/source/items/cenumitm.cxx
svl/source/items/cintitem.cxx
svl/source/items/cntwall.cxx
svl/source/items/ctypeitm.cxx
svl/source/items/custritm.cxx
svl/source/items/dateitem.cxx
svl/source/items/globalnameitem.cxx
svl/source/items/ilstitem.cxx
svl/source/items/imageitm.cxx
svl/source/items/intitem.cxx
svl/source/items/itempool.cxx
svl/source/items/itemprop.cxx
svl/source/items/itemset.cxx
svl/source/items/lckbitem.cxx
svl/source/items/poolio.cxx
svl/source/items/poolitem.cxx
svl/source/items/ptitem.cxx
svl/source/items/rectitem.cxx
svl/source/items/slstitm.cxx
svl/source/items/srchitem.cxx
svl/source/items/style.cxx
svl/source/items/szitem.cxx
svl/source/items/visitem.cxx
svl/source/items/whiter.cxx
svl/source/memtools/svarray.cxx
svl/source/misc/PasswordHelper.cxx
svl/source/misc/adrparse.cxx
svl/source/misc/lngmisc.cxx
svl/source/notify/brdcst.cxx
svl/source/notify/listener.cxx
svl/source/notify/listenerbase.cxx
svl/source/numbers/makefile.mk
svl/source/numbers/nbdll.cxx
svl/source/numbers/zforfind.cxx
svl/source/numbers/zforlist.cxx
svl/source/numbers/zformat.cxx
svl/source/numbers/zforscan.cxx
svl/source/passwordcontainer/passwordcontainer.cxx
svl/source/svdde/ddecli.cxx
svl/source/svdde/ddeimp.hxx
svl/source/svdde/ddemlos2.h
svl/source/svdde/ddesvr.cxx
svl/source/undo/undo.cxx
svl/source/uno/registerservices.cxx
svl/util/makefile.mk
svtools/bmpmaker/bmpsum.cxx
svtools/bmpmaker/g2g.cxx
svtools/bmpmaker/makefile.mk
svtools/inc/borderhelper.hxx
svtools/inc/svtools/accessiblefactory.hxx
svtools/inc/svtools/apearcfg.hxx
svtools/inc/svtools/brwbox.hxx
svtools/inc/svtools/ctrlbox.hxx
svtools/inc/svtools/ctrltool.hxx
svtools/inc/svtools/editbrowsebox.hxx
svtools/inc/svtools/ehdl.hxx
svtools/inc/svtools/embedhlp.hxx
svtools/inc/svtools/filter.hxx
svtools/inc/svtools/ivctrl.hxx
svtools/inc/svtools/parhtml.hxx
svtools/inc/svtools/printdlg.hxx
svtools/inc/svtools/rtftoken.h
svtools/inc/svtools/ruler.hxx
svtools/inc/svtools/svicnvw.hxx
svtools/inc/svtools/svlbitm.hxx
svtools/inc/svtools/svlbox.hxx
svtools/inc/svtools/svtreebx.hxx
svtools/inc/svtools/tabbar.hxx
svtools/inc/svtools/table/abstracttablecontrol.hxx
svtools/inc/svtools/taskbar.hxx
svtools/inc/svtools/textview.hxx
svtools/inc/svtools/valueset.hxx
svtools/source/brwbox/brwbox1.cxx
svtools/source/brwbox/brwbox2.cxx
svtools/source/brwbox/datwin.cxx
svtools/source/brwbox/datwin.hxx
svtools/source/brwbox/makefile.mk
svtools/source/config/apearcfg.cxx
svtools/source/config/htmlcfg.cxx
svtools/source/config/menuoptions.cxx
svtools/source/config/miscopt.cxx
svtools/source/contnr/cont_pch.cxx
svtools/source/contnr/ctrdll.cxx
svtools/source/contnr/fileview.cxx
svtools/source/contnr/imivctl1.cxx
svtools/source/contnr/ivctrl.cxx
svtools/source/contnr/makefile.mk
svtools/source/contnr/svcontnr.src
svtools/source/contnr/svicnvw.cxx
svtools/source/contnr/svimpbox.cxx
svtools/source/contnr/svimpicn.cxx
svtools/source/contnr/svlbitm.cxx
svtools/source/contnr/svtreebx.cxx
svtools/source/contnr/templwin.cxx
svtools/source/contnr/templwin.hxx
svtools/source/control/asynclink.cxx
svtools/source/control/ctrlbox.cxx
svtools/source/control/ctrldll.cxx
svtools/source/control/ctrltool.cxx
svtools/source/control/filectrl.cxx
svtools/source/control/filectrl.src
svtools/source/control/headbar.cxx
svtools/source/control/inettbc.cxx
svtools/source/control/makefile.mk
svtools/source/control/prgsbar.cxx
svtools/source/control/roadmap.cxx
svtools/source/control/ruler.cxx
svtools/source/control/scriptedtext.cxx
svtools/source/control/stdmenu.cxx
svtools/source/control/tabbar.cxx
svtools/source/control/taskbar.cxx
svtools/source/control/taskbox.cxx
svtools/source/control/taskmisc.cxx
svtools/source/control/taskstat.cxx
svtools/source/control/valueacc.cxx
svtools/source/control/valueset.cxx
svtools/source/dialogs/addresstemplate.cxx
svtools/source/dialogs/addresstemplate.src
svtools/source/dialogs/colrdlg.src
svtools/source/dialogs/filedlg2.cxx
svtools/source/dialogs/filedlg2.hxx
svtools/source/dialogs/makefile.mk
svtools/source/dialogs/printdlg.cxx
svtools/source/dialogs/printdlg.src
svtools/source/dialogs/propctrl.cxx
svtools/source/dialogs/propctrl.hxx
svtools/source/dialogs/property.cxx
svtools/source/edit/makefile.mk
svtools/source/edit/sychconv.cxx
svtools/source/edit/syntaxhighlight.cxx
svtools/source/edit/textdoc.cxx
svtools/source/edit/texteng.cxx
svtools/source/edit/textundo.cxx
svtools/source/edit/textview.cxx
svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
svtools/source/filter.vcl/filter/dlgejpg.cxx
svtools/source/filter.vcl/filter/dlgejpg.hxx
svtools/source/filter.vcl/filter/dlgejpg.src
svtools/source/filter.vcl/filter/dlgepng.cxx
svtools/source/filter.vcl/filter/dlgepng.hxx
svtools/source/filter.vcl/filter/dlgepng.src
svtools/source/filter.vcl/filter/dlgexpor.cxx
svtools/source/filter.vcl/filter/dlgexpor.hxx
svtools/source/filter.vcl/filter/dlgexpor.src
svtools/source/filter.vcl/filter/filter2.cxx
svtools/source/filter.vcl/filter/makefile.mk
svtools/source/filter.vcl/filter/sgfbram.cxx
svtools/source/filter.vcl/filter/sgvmain.cxx
svtools/source/filter.vcl/filter/sgvspln.cxx
svtools/source/filter.vcl/filter/strings.src
svtools/source/filter.vcl/jpeg/makefile.mk
svtools/source/filter.vcl/wmf/emfwr.cxx
svtools/source/filter.vcl/wmf/emfwr.hxx
svtools/source/filter.vcl/wmf/enhwmf.cxx
svtools/source/filter.vcl/wmf/winmtf.hxx
svtools/source/filter.vcl/wmf/wmfwr.cxx
svtools/source/filter.vcl/wmf/wmfwr.hxx
svtools/source/graphic/grfcache.cxx
svtools/source/graphic/grfcache.hxx
svtools/source/graphic/grfmgr.cxx
svtools/source/graphic/makefile.mk
svtools/source/inc/accessibletableimp.hxx
svtools/source/inc/svimpbox.hxx
svtools/source/java/patchjavaerror.src
svtools/source/misc/ehdl.cxx
svtools/source/misc/errtxt.src
svtools/source/misc/helpagentwindow.cxx
svtools/source/misc/imagemgr.cxx
svtools/source/misc/imagemgr.src
svtools/source/misc/imageresourceaccess.cxx
svtools/source/misc/imap.cxx
svtools/source/misc/langtab.src
svtools/source/misc/makefile.mk
svtools/source/misc/svtdata.cxx
svtools/source/misc/templatefoldercache.cxx
svtools/source/misc/transfer2.cxx
svtools/source/misc/undo.src
svtools/source/plugapp/commtest.cxx
svtools/source/plugapp/commtest.src
svtools/source/plugapp/makefile.mk
svtools/source/plugapp/testtool.src
svtools/source/productregistration/productregistration.cxx
svtools/source/svhtml/htmlkywd.cxx
svtools/source/svhtml/parhtml.cxx
svtools/source/svrtf/rtfkey2.cxx
svtools/source/svrtf/rtfkeywd.cxx
svtools/source/table/defaultinputhandler.cxx
svtools/source/table/makefile.mk
svtools/source/table/tablecontrol.cxx
svtools/source/table/tablecontrol_impl.cxx
svtools/source/table/tablecontrol_impl.hxx
svtools/source/table/tabledatawindow.cxx
svtools/source/table/tablegeometry.cxx
svtools/source/table/tablegeometry.hxx
svtools/source/toolpanel/makefile.mk
svtools/source/toolpanel/toolpaneldrawer.cxx
svtools/source/uno/addrtempuno.cxx
svtools/source/uno/miscservices.cxx
svtools/source/uno/svtxgridcontrol.cxx
svtools/source/uno/svtxgridcontrol.hxx
svtools/source/uno/toolboxcontroller.cxx
svtools/source/uno/treecontrolpeer.cxx
svtools/source/uno/unocontroltablemodel.cxx
svtools/source/uno/unocontroltablemodel.hxx
svtools/source/uno/unoimap.cxx
svtools/source/urlobj/inetimg.cxx
svtools/util/makefile.mk
svtools/workben/browser.cxx
svtools/workben/cui/makefile.mk
svtools/workben/makefile.mk
svtools/workben/stest.cxx
svtools/workben/toolpanel/makefile.mk
svtools/workben/urange.cxx
toolkit/inc/toolkit/awt/vclxdevice.hxx
toolkit/inc/toolkit/awt/vclxgraphics.hxx
toolkit/inc/toolkit/awt/vclxwindows.hxx
toolkit/inc/toolkit/controls/dialogcontrol.hxx
toolkit/inc/toolkit/helper/property.hxx
toolkit/inc/toolkit/helper/servicenames.hxx
toolkit/inc/toolkit/helper/throbberimpl.hxx
toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java
toolkit/source/awt/asynccallback.cxx
toolkit/source/awt/vclxgraphics.cxx
toolkit/source/awt/vclxtoolkit.cxx
toolkit/source/awt/vclxwindow.cxx
toolkit/source/awt/xsimpleanimation.cxx
toolkit/source/awt/xthrobber.cxx
toolkit/source/controls/dialogcontrol.cxx
toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
toolkit/source/controls/grid/defaultgriddatamodel.cxx
toolkit/source/controls/grid/gridcontrol.cxx
toolkit/source/controls/grid/initguard.hxx
toolkit/source/controls/unocontrol.cxx
toolkit/source/controls/unocontrolcontainer.cxx
toolkit/source/controls/unocontrols.cxx
toolkit/source/helper/listenermultiplexer.cxx
toolkit/source/helper/property.cxx
toolkit/source/helper/registerservices.cxx
toolkit/source/helper/servicenames.cxx
toolkit/source/helper/throbberimpl.cxx
toolkit/source/helper/tkresmgr.cxx
tools/StaticLibrary_ooopathutils.mk
tools/bootstrp/addexes/makefile.mk
tools/bootstrp/addexes2/makefile.mk
tools/bootstrp/addexes2/mkfilt.cxx
tools/bootstrp/command.cxx
tools/bootstrp/cppdep.cxx
tools/bootstrp/iserver.cxx
tools/bootstrp/makefile.mk
tools/bootstrp/mkcreate.cxx
tools/bootstrp/prj.cxx
tools/bootstrp/rscdep.cxx
tools/bootstrp/sstring.cxx
tools/inc/bootstrp/command.hxx
tools/inc/bootstrp/mkcreate.hxx
tools/inc/bootstrp/prj.hxx
tools/inc/bootstrp/sstring.hxx
tools/inc/tools/agapi.hxx
tools/inc/tools/agitem.hxx
tools/inc/tools/chapi.hxx
tools/inc/tools/download.hxx
tools/inc/tools/eacopier.hxx
tools/inc/tools/fract.hxx
tools/inc/tools/fsys.hxx
tools/inc/tools/geninfo.hxx
tools/inc/tools/globname.hxx
tools/inc/tools/inetmime.hxx
tools/inc/tools/multisel.hxx
tools/inc/tools/poly.hxx
tools/inc/tools/postsys.h
tools/inc/tools/postwin.h
tools/inc/tools/presys.h
tools/inc/tools/prewin.h
tools/inc/tools/pstm.hxx
tools/inc/tools/ref.hxx
tools/inc/tools/simplerm.hxx
tools/inc/tools/solar.h
tools/inc/tools/table.hxx
tools/inc/tools/urlkeys.hxx
tools/inc/tools/urlobj.hxx
tools/prj/build.lst
tools/prj/d.lst
tools/qa/makefile.mk
tools/source/communi/geninfo.cxx
tools/source/debug/debug.cxx
tools/source/fsys/dirent.cxx
tools/source/fsys/tdir.cxx
tools/source/fsys/unx.cxx
tools/source/fsys/urlobj.cxx
tools/source/generic/color.cxx
tools/source/generic/config.cxx
tools/source/generic/fract.cxx
tools/source/inet/inetmime.cxx
tools/source/memtools/multisel.cxx
tools/source/memtools/table.cxx
tools/source/rc/resmgr.cxx
tools/source/ref/globname.cxx
tools/source/ref/pstm.cxx
tools/source/solar/solar.c
tools/source/stream/strmos2.cxx
tools/source/stream/strmunx.cxx
tools/source/stream/strmwnt.cxx
tools/source/string/makefile.mk
tools/source/testtoolloader/testtoolloader.cxx
tools/test/makefile.mk
tools/util/makefile.mk
tools/win/inc/dll.hxx
tools/win/inc/parser.hxx
tools/win/inc/shellex.h
tools/win/inc/shutil.h
tools/win/inc/toolsdll.hxx
tools/win/inc/winshell.hxx
tools/workben/makefile.mk
ucbhelper/source/client/proxydecider.cxx
ucbhelper/workben/ucbexplorer/ucbexplorer.hrc
unotools/inc/unotools/unotunnelhelper.hxx
unotools/source/config/fltrcfg.cxx
unotools/source/config/lingucfg.cxx
unotools/source/config/misccfg.cxx
unotools/source/config/pathoptions.cxx
unotools/source/config/searchopt.cxx
unotools/source/i18n/localedatawrapper.cxx
unotools/source/ucbhelper/localfilehelper.cxx
unotools/source/ucbhelper/ucbhelper.cxx
unotools/source/ucbhelper/xtempfile.cxx
vcl/aqua/inc/salbmp.h
vcl/aqua/inc/salgdi.h
vcl/aqua/inc/salinst.h
vcl/aqua/source/app/salinst.cxx
vcl/aqua/source/gdi/aquaprintaccessoryview.mm
vcl/aqua/source/gdi/salgdi.cxx
vcl/aqua/source/gdi/salprn.cxx
vcl/aqua/source/window/salframeview.mm
vcl/aqua/source/window/salobj.cxx
vcl/inc/vcl/bitmap.hxx
vcl/inc/vcl/brdwin.hxx
vcl/inc/vcl/button.hxx
vcl/inc/vcl/cmdevt.hxx
vcl/inc/vcl/cvtgrf.hxx
vcl/inc/vcl/dialog.hxx
vcl/inc/vcl/dockwin.hxx
vcl/inc/vcl/event.hxx
vcl/inc/vcl/fixed.hxx
vcl/inc/vcl/fldunit.hxx
vcl/inc/vcl/floatwin.hxx
vcl/inc/vcl/gdimtf.hxx
vcl/inc/vcl/glyphcache.hxx
vcl/inc/vcl/graphite_adaptors.hxx
vcl/inc/vcl/graphite_features.hxx
vcl/inc/vcl/graphite_layout.hxx
vcl/inc/vcl/ilstbox.hxx
vcl/inc/vcl/image.h
vcl/inc/vcl/imgctrl.hxx
vcl/inc/vcl/impbmpconv.hxx
vcl/inc/vcl/impprn.hxx
vcl/inc/vcl/jobset.h
vcl/inc/vcl/keycodes.hxx
vcl/inc/vcl/lstbox.hxx
vcl/inc/vcl/mapunit.hxx
vcl/inc/vcl/menu.hxx
vcl/inc/vcl/msgbox.hxx
vcl/inc/vcl/outdev.hxx
vcl/inc/vcl/prndlg.hxx
vcl/inc/vcl/salatype.hxx
vcl/inc/vcl/salbmp.hxx
vcl/inc/vcl/salgdi.hxx
vcl/inc/vcl/salinst.hxx
vcl/inc/vcl/seleng.hxx
vcl/inc/vcl/settings.hxx
vcl/inc/vcl/smartid.hxx
vcl/inc/vcl/status.hxx
vcl/inc/vcl/strhelper.hxx
vcl/inc/vcl/svapp.hxx
vcl/inc/vcl/svdata.hxx
vcl/inc/vcl/syschild.hxx
vcl/inc/vcl/sysdata.hxx
vcl/inc/vcl/taskpanelist.hxx
vcl/inc/vcl/toolbox.hxx
vcl/inc/vcl/vclevent.hxx
vcl/inc/vcl/windata.hxx
vcl/inc/vcl/window.hxx
vcl/inc/vcl/wintypes.hxx
vcl/os2/source/app/salinst.cxx
vcl/os2/source/gdi/salgdi.cxx
vcl/os2/source/window/salmenu.cxx
vcl/os2/source/window/salobj.cxx
vcl/prj/build.lst
vcl/source/app/dbggui.cxx
vcl/source/app/help.cxx
vcl/source/app/idlemgr.cxx
vcl/source/app/settings.cxx
vcl/source/app/svapp.cxx
vcl/source/app/svdata.cxx
vcl/source/app/svmain.cxx
vcl/source/app/svmainhook.cxx
vcl/source/app/unohelp.cxx
vcl/source/app/vclevent.cxx
vcl/source/control/button.cxx
vcl/source/control/combobox.cxx
vcl/source/control/edit.cxx
vcl/source/control/field.cxx
vcl/source/control/fixed.cxx
vcl/source/control/ilstbox.cxx
vcl/source/control/imgctrl.cxx
vcl/source/control/makefile.mk
vcl/source/control/tabctrl.cxx
vcl/source/gdi/bitmap.cxx
vcl/source/gdi/bitmap2.cxx
vcl/source/gdi/bitmap4.cxx
vcl/source/gdi/bmpconv.cxx
vcl/source/gdi/cvtsvm.cxx
vcl/source/gdi/font.cxx
vcl/source/gdi/gdimtf.cxx
vcl/source/gdi/image.cxx
vcl/source/gdi/impimage.cxx
vcl/source/gdi/jobset.cxx
vcl/source/gdi/makefile.mk
vcl/source/gdi/metaact.cxx
vcl/source/gdi/outdev.cxx
vcl/source/gdi/outdev3.cxx
vcl/source/gdi/outdev4.cxx
vcl/source/gdi/outdevnative.cxx
vcl/source/gdi/pdfwriter.cxx
vcl/source/gdi/pdfwriter_impl.cxx
vcl/source/gdi/print3.cxx
vcl/source/gdi/salmisc.cxx
vcl/source/glyphs/gcach_ftyp.cxx
vcl/source/glyphs/gcach_ftyp.hxx
vcl/source/glyphs/glyphcache.cxx
vcl/source/glyphs/graphite_cache.cxx
vcl/source/glyphs/graphite_layout.cxx
vcl/source/glyphs/graphite_textsrc.hxx
vcl/source/helper/canvasbitmap.cxx
vcl/source/helper/smartid.cxx
vcl/source/helper/xconnection.cxx
vcl/source/src/btntext.src
vcl/source/src/images.src
vcl/source/src/print.src
vcl/source/window/accel.cxx
vcl/source/window/accmgr.cxx
vcl/source/window/brdwin.cxx
vcl/source/window/btndlg.cxx
vcl/source/window/dlgctrl.cxx
vcl/source/window/javachild.cxx
vcl/source/window/menu.cxx
vcl/source/window/msgbox.cxx
vcl/source/window/printdlg.cxx
vcl/source/window/status.cxx
vcl/source/window/syschild.cxx
vcl/source/window/toolbox.cxx
vcl/source/window/toolbox2.cxx
vcl/source/window/window.cxx
vcl/source/window/window2.cxx
vcl/source/window/wrkwin.cxx
vcl/unx/gtk/app/gtkdata.cxx
vcl/unx/gtk/app/gtkinst.cxx
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
vcl/unx/gtk/window/gtkframe.cxx
vcl/unx/gtk/window/gtkobject.cxx
vcl/unx/headless/svpbmp.hxx
vcl/unx/headless/svpgdi.cxx
vcl/unx/headless/svpgdi.hxx
vcl/unx/headless/svpinst.cxx
vcl/unx/headless/svpinst.hxx
vcl/unx/headless/svpprn.cxx
vcl/unx/headless/svpprn.hxx
vcl/unx/headless/svppspgraphics.cxx
vcl/unx/headless/svppspgraphics.hxx
vcl/unx/headless/svptext.cxx
vcl/unx/inc/dtint.hxx
vcl/unx/inc/plugins/gtk/gtkdata.hxx
vcl/unx/inc/pspgraphics.h
vcl/unx/inc/salbmp.h
vcl/unx/inc/saldata.hxx
vcl/unx/inc/saldisp.hxx
vcl/unx/inc/salgdi.h
vcl/unx/inc/salinst.h
vcl/unx/inc/xfont.hxx
vcl/unx/kde/kdedata.cxx
vcl/unx/kde4/KDESalGraphics.cxx
vcl/unx/source/app/keysymnames.cxx
vcl/unx/source/app/saldata.cxx
vcl/unx/source/app/saldisp.cxx
vcl/unx/source/app/salinst.cxx
vcl/unx/source/app/wmadaptor.cxx
vcl/unx/source/dtrans/X11_selection.cxx
vcl/unx/source/dtrans/X11_service.cxx
vcl/unx/source/gdi/makefile.mk
vcl/unx/source/gdi/pspgraphics.cxx
vcl/unx/source/gdi/salgdi.cxx
vcl/unx/source/gdi/salgdi3.cxx
vcl/unx/source/gdi/salprnpsp.cxx
vcl/unx/source/gdi/xfont.cxx
vcl/unx/source/gdi/xlfd_attr.cxx
vcl/unx/source/gdi/xlfd_attr.hxx
vcl/unx/source/gdi/xlfd_extd.cxx
vcl/unx/source/gdi/xlfd_extd.hxx
vcl/unx/source/gdi/xlfd_smpl.cxx
vcl/unx/source/gdi/xlfd_smpl.hxx
vcl/unx/source/printer/ppdparser.cxx
vcl/unx/source/printer/printerinfomanager.cxx
vcl/unx/source/window/salframe.cxx
vcl/unx/source/window/salmenu.cxx
vcl/unx/source/window/salobj.cxx
vcl/util/makefile2.pmk
vcl/win/inc/salbmp.h
vcl/win/inc/saldata.hxx
vcl/win/inc/salgdi.h
vcl/win/inc/salinst.h
vcl/win/source/app/saldata.cxx
vcl/win/source/app/salinst.cxx
vcl/win/source/gdi/salgdi.cxx
vcl/win/source/gdi/salgdi3.cxx
vcl/win/source/gdi/salprn.cxx
vcl/win/source/gdi/winlayout.cxx
vcl/win/source/window/salframe.cxx
vcl/win/source/window/salobj.cxx
vcl/workben/outdevgrind.cxx
vos/inc/vos/execabl.hxx
vos/inc/vos/macros.hxx
vos/inc/vos/pipe.hxx
vos/inc/vos/process.hxx
vos/inc/vos/refernce.hxx
vos/inc/vos/signal.hxx
vos/inc/vos/socket.hxx
vos/inc/vos/stream.hxx
vos/inc/vos/thread.hxx
vos/source/pipe.cxx
vos/source/process.cxx
vos/source/signal.cxx
vos/source/thread.cxx
vos/source/timer.cxx
2011-03-11 14:24:23 +01:00
|
|
|
(*aIt)->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, sal_False );
|
2001-12-11 14:11:43 +00:00
|
|
|
}
|
|
|
|
else
|
Merge commit 'ooo/DEV300_m101' into intm101
The following builds for me:
basebmp, basegfx, comphelper, dtrans, i18npool, i18nutil, l10ntools, o3tl,
psprint_config, regexp, rsc, sax, sot, tools, ucbhelper, unotools, vcl
The rest still needs fixing ;-)
Conflicts:
canvas/prj/build.lst
canvas/source/cairo/cairo_textlayout.cxx
canvas/source/directx/dx_winstuff.hxx
canvas/source/tools/image.cxx
canvas/source/vcl/canvashelper.cxx
comphelper/inc/comphelper/documentconstants.hxx
comphelper/inc/comphelper/optionalvalue.hxx
comphelper/inc/comphelper/querydeep.hxx
comphelper/prj/build.lst
comphelper/qa/complex/makefile.mk
comphelper/qa/string/test_string_noadditional.cxx
comphelper/source/misc/componentmodule.cxx
comphelper/source/misc/mimeconfighelper.cxx
comphelper/source/misc/querydeep.cxx
comphelper/source/misc/uieventslogger.cxx
comphelper/source/property/TypeGeneration.cxx
comphelper/test/uno_iterators/uno_iterators.cxx
comphelper/util/makefile.mk
cppcanvas/source/mtfrenderer/implrenderer.cxx
dtrans/prj/build.lst
dtrans/source/generic/dtrans.cxx
dtrans/source/win32/dtobj/FmtFilter.cxx
i18npool/prj/build.lst
i18npool/source/localedata/data/localedata_others.map
i18npool/source/localedata/data/makefile.mk
i18npool/source/localedata/localedata.cxx
i18npool/source/localedata/saxparser.cxx
i18npool/source/registerservices/registerservices.cxx
i18npool/source/search/textsearch.cxx
l10ntools/inc/cfgmerge.hxx
l10ntools/inc/export.hxx
l10ntools/inc/gsicheck.hxx
l10ntools/inc/l10ntools/vosapp.hxx
l10ntools/inc/tagtest.hxx
l10ntools/inc/xmlparse.hxx
l10ntools/layout/layoutparse.cxx
l10ntools/layout/tralay.cxx
l10ntools/source/cfgmerge.cxx
l10ntools/source/export.cxx
l10ntools/source/export2.cxx
l10ntools/source/gsicheck.cxx
l10ntools/source/help/HelpLinker.cxx
l10ntools/source/lngex.cxx
l10ntools/source/lngmerge.cxx
l10ntools/source/merge.cxx
l10ntools/source/tagtest.cxx
l10ntools/source/xmlparse.cxx
padmin/source/fontentry.cxx
padmin/source/padialog.cxx
padmin/source/padialog.src
padmin/source/pamain.cxx
rsc/inc/rscarray.hxx
rsc/inc/rscclass.hxx
rsc/inc/rscclobj.hxx
rsc/inc/rsccont.hxx
rsc/inc/rscdb.hxx
rsc/inc/rscdef.hxx
rsc/inc/rscmgr.hxx
rsc/inc/rscrange.hxx
rsc/inc/rsctop.hxx
rsc/inc/vclrsc.hxx
rsc/source/parser/rscdb.cxx
rsc/source/parser/rscicpx.cxx
rsc/source/parser/rscinit.cxx
rsc/source/prj/start.cxx
rsc/source/res/rscarray.cxx
rsc/source/res/rscclass.cxx
rsc/source/res/rscclobj.cxx
rsc/source/res/rsccont.cxx
rsc/source/res/rscmgr.cxx
rsc/source/res/rscrange.cxx
rsc/source/res/rsctop.cxx
rsc/source/rsc/rsc.cxx
rsc/source/tools/rscdef.cxx
rsc/source/tools/rsctools.cxx
sax/source/expatwrap/sax_expat.cxx
sax/source/fastparser/facreg.cxx
sax/source/tools/fastserializer.cxx
sot/inc/sot/filelist.hxx
sot/inc/sot/object.hxx
sot/source/base/factory.cxx
sot/source/base/filelist.cxx
sot/source/sdstor/stg.cxx
sot/source/sdstor/stgcache.cxx
sot/source/sdstor/stgole.cxx
sot/source/sdstor/stgstrms.cxx
sot/source/sdstor/storage.cxx
sot/source/sdstor/ucbstorage.cxx
svl/inc/svl/cenumitm.hxx
svl/inc/svl/cintitem.hxx
svl/inc/svl/cntwall.hxx
svl/inc/svl/ctypeitm.hxx
svl/inc/svl/custritm.hxx
svl/inc/svl/dateitem.hxx
svl/inc/svl/filerec.hxx
svl/inc/svl/globalnameitem.hxx
svl/inc/svl/ilstitem.hxx
svl/inc/svl/imageitm.hxx
svl/inc/svl/intitem.hxx
svl/inc/svl/itempool.hxx
svl/inc/svl/itemset.hxx
svl/inc/svl/lckbitem.hxx
svl/inc/svl/poolitem.hxx
svl/inc/svl/ptitem.hxx
svl/inc/svl/rectitem.hxx
svl/inc/svl/sfontitm.hxx
svl/inc/svl/slstitm.hxx
svl/inc/svl/srchitem.hxx
svl/inc/svl/svarray.hxx
svl/inc/svl/svdde.hxx
svl/inc/svl/svstdarr.hxx
svl/inc/svl/szitem.hxx
svl/inc/svl/visitem.hxx
svl/inc/svl/zforlist.hxx
svl/inc/svl/zformat.hxx
svl/prj/build.lst
svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx
svl/qa/complex/ConfigItems/helper/makefile.mk
svl/qa/makefile.mk
svl/source/filepicker/pickerhelper.cxx
svl/source/filerec/filerec.cxx
svl/source/items/cenumitm.cxx
svl/source/items/cintitem.cxx
svl/source/items/cntwall.cxx
svl/source/items/ctypeitm.cxx
svl/source/items/custritm.cxx
svl/source/items/dateitem.cxx
svl/source/items/globalnameitem.cxx
svl/source/items/ilstitem.cxx
svl/source/items/imageitm.cxx
svl/source/items/intitem.cxx
svl/source/items/itempool.cxx
svl/source/items/itemprop.cxx
svl/source/items/itemset.cxx
svl/source/items/lckbitem.cxx
svl/source/items/poolio.cxx
svl/source/items/poolitem.cxx
svl/source/items/ptitem.cxx
svl/source/items/rectitem.cxx
svl/source/items/slstitm.cxx
svl/source/items/srchitem.cxx
svl/source/items/style.cxx
svl/source/items/szitem.cxx
svl/source/items/visitem.cxx
svl/source/items/whiter.cxx
svl/source/memtools/svarray.cxx
svl/source/misc/PasswordHelper.cxx
svl/source/misc/adrparse.cxx
svl/source/misc/lngmisc.cxx
svl/source/notify/brdcst.cxx
svl/source/notify/listener.cxx
svl/source/notify/listenerbase.cxx
svl/source/numbers/makefile.mk
svl/source/numbers/nbdll.cxx
svl/source/numbers/zforfind.cxx
svl/source/numbers/zforlist.cxx
svl/source/numbers/zformat.cxx
svl/source/numbers/zforscan.cxx
svl/source/passwordcontainer/passwordcontainer.cxx
svl/source/svdde/ddecli.cxx
svl/source/svdde/ddeimp.hxx
svl/source/svdde/ddemlos2.h
svl/source/svdde/ddesvr.cxx
svl/source/undo/undo.cxx
svl/source/uno/registerservices.cxx
svl/util/makefile.mk
svtools/bmpmaker/bmpsum.cxx
svtools/bmpmaker/g2g.cxx
svtools/bmpmaker/makefile.mk
svtools/inc/borderhelper.hxx
svtools/inc/svtools/accessiblefactory.hxx
svtools/inc/svtools/apearcfg.hxx
svtools/inc/svtools/brwbox.hxx
svtools/inc/svtools/ctrlbox.hxx
svtools/inc/svtools/ctrltool.hxx
svtools/inc/svtools/editbrowsebox.hxx
svtools/inc/svtools/ehdl.hxx
svtools/inc/svtools/embedhlp.hxx
svtools/inc/svtools/filter.hxx
svtools/inc/svtools/ivctrl.hxx
svtools/inc/svtools/parhtml.hxx
svtools/inc/svtools/printdlg.hxx
svtools/inc/svtools/rtftoken.h
svtools/inc/svtools/ruler.hxx
svtools/inc/svtools/svicnvw.hxx
svtools/inc/svtools/svlbitm.hxx
svtools/inc/svtools/svlbox.hxx
svtools/inc/svtools/svtreebx.hxx
svtools/inc/svtools/tabbar.hxx
svtools/inc/svtools/table/abstracttablecontrol.hxx
svtools/inc/svtools/taskbar.hxx
svtools/inc/svtools/textview.hxx
svtools/inc/svtools/valueset.hxx
svtools/source/brwbox/brwbox1.cxx
svtools/source/brwbox/brwbox2.cxx
svtools/source/brwbox/datwin.cxx
svtools/source/brwbox/datwin.hxx
svtools/source/brwbox/makefile.mk
svtools/source/config/apearcfg.cxx
svtools/source/config/htmlcfg.cxx
svtools/source/config/menuoptions.cxx
svtools/source/config/miscopt.cxx
svtools/source/contnr/cont_pch.cxx
svtools/source/contnr/ctrdll.cxx
svtools/source/contnr/fileview.cxx
svtools/source/contnr/imivctl1.cxx
svtools/source/contnr/ivctrl.cxx
svtools/source/contnr/makefile.mk
svtools/source/contnr/svcontnr.src
svtools/source/contnr/svicnvw.cxx
svtools/source/contnr/svimpbox.cxx
svtools/source/contnr/svimpicn.cxx
svtools/source/contnr/svlbitm.cxx
svtools/source/contnr/svtreebx.cxx
svtools/source/contnr/templwin.cxx
svtools/source/contnr/templwin.hxx
svtools/source/control/asynclink.cxx
svtools/source/control/ctrlbox.cxx
svtools/source/control/ctrldll.cxx
svtools/source/control/ctrltool.cxx
svtools/source/control/filectrl.cxx
svtools/source/control/filectrl.src
svtools/source/control/headbar.cxx
svtools/source/control/inettbc.cxx
svtools/source/control/makefile.mk
svtools/source/control/prgsbar.cxx
svtools/source/control/roadmap.cxx
svtools/source/control/ruler.cxx
svtools/source/control/scriptedtext.cxx
svtools/source/control/stdmenu.cxx
svtools/source/control/tabbar.cxx
svtools/source/control/taskbar.cxx
svtools/source/control/taskbox.cxx
svtools/source/control/taskmisc.cxx
svtools/source/control/taskstat.cxx
svtools/source/control/valueacc.cxx
svtools/source/control/valueset.cxx
svtools/source/dialogs/addresstemplate.cxx
svtools/source/dialogs/addresstemplate.src
svtools/source/dialogs/colrdlg.src
svtools/source/dialogs/filedlg2.cxx
svtools/source/dialogs/filedlg2.hxx
svtools/source/dialogs/makefile.mk
svtools/source/dialogs/printdlg.cxx
svtools/source/dialogs/printdlg.src
svtools/source/dialogs/propctrl.cxx
svtools/source/dialogs/propctrl.hxx
svtools/source/dialogs/property.cxx
svtools/source/edit/makefile.mk
svtools/source/edit/sychconv.cxx
svtools/source/edit/syntaxhighlight.cxx
svtools/source/edit/textdoc.cxx
svtools/source/edit/texteng.cxx
svtools/source/edit/textundo.cxx
svtools/source/edit/textview.cxx
svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
svtools/source/filter.vcl/filter/dlgejpg.cxx
svtools/source/filter.vcl/filter/dlgejpg.hxx
svtools/source/filter.vcl/filter/dlgejpg.src
svtools/source/filter.vcl/filter/dlgepng.cxx
svtools/source/filter.vcl/filter/dlgepng.hxx
svtools/source/filter.vcl/filter/dlgepng.src
svtools/source/filter.vcl/filter/dlgexpor.cxx
svtools/source/filter.vcl/filter/dlgexpor.hxx
svtools/source/filter.vcl/filter/dlgexpor.src
svtools/source/filter.vcl/filter/filter2.cxx
svtools/source/filter.vcl/filter/makefile.mk
svtools/source/filter.vcl/filter/sgfbram.cxx
svtools/source/filter.vcl/filter/sgvmain.cxx
svtools/source/filter.vcl/filter/sgvspln.cxx
svtools/source/filter.vcl/filter/strings.src
svtools/source/filter.vcl/jpeg/makefile.mk
svtools/source/filter.vcl/wmf/emfwr.cxx
svtools/source/filter.vcl/wmf/emfwr.hxx
svtools/source/filter.vcl/wmf/enhwmf.cxx
svtools/source/filter.vcl/wmf/winmtf.hxx
svtools/source/filter.vcl/wmf/wmfwr.cxx
svtools/source/filter.vcl/wmf/wmfwr.hxx
svtools/source/graphic/grfcache.cxx
svtools/source/graphic/grfcache.hxx
svtools/source/graphic/grfmgr.cxx
svtools/source/graphic/makefile.mk
svtools/source/inc/accessibletableimp.hxx
svtools/source/inc/svimpbox.hxx
svtools/source/java/patchjavaerror.src
svtools/source/misc/ehdl.cxx
svtools/source/misc/errtxt.src
svtools/source/misc/helpagentwindow.cxx
svtools/source/misc/imagemgr.cxx
svtools/source/misc/imagemgr.src
svtools/source/misc/imageresourceaccess.cxx
svtools/source/misc/imap.cxx
svtools/source/misc/langtab.src
svtools/source/misc/makefile.mk
svtools/source/misc/svtdata.cxx
svtools/source/misc/templatefoldercache.cxx
svtools/source/misc/transfer2.cxx
svtools/source/misc/undo.src
svtools/source/plugapp/commtest.cxx
svtools/source/plugapp/commtest.src
svtools/source/plugapp/makefile.mk
svtools/source/plugapp/testtool.src
svtools/source/productregistration/productregistration.cxx
svtools/source/svhtml/htmlkywd.cxx
svtools/source/svhtml/parhtml.cxx
svtools/source/svrtf/rtfkey2.cxx
svtools/source/svrtf/rtfkeywd.cxx
svtools/source/table/defaultinputhandler.cxx
svtools/source/table/makefile.mk
svtools/source/table/tablecontrol.cxx
svtools/source/table/tablecontrol_impl.cxx
svtools/source/table/tablecontrol_impl.hxx
svtools/source/table/tabledatawindow.cxx
svtools/source/table/tablegeometry.cxx
svtools/source/table/tablegeometry.hxx
svtools/source/toolpanel/makefile.mk
svtools/source/toolpanel/toolpaneldrawer.cxx
svtools/source/uno/addrtempuno.cxx
svtools/source/uno/miscservices.cxx
svtools/source/uno/svtxgridcontrol.cxx
svtools/source/uno/svtxgridcontrol.hxx
svtools/source/uno/toolboxcontroller.cxx
svtools/source/uno/treecontrolpeer.cxx
svtools/source/uno/unocontroltablemodel.cxx
svtools/source/uno/unocontroltablemodel.hxx
svtools/source/uno/unoimap.cxx
svtools/source/urlobj/inetimg.cxx
svtools/util/makefile.mk
svtools/workben/browser.cxx
svtools/workben/cui/makefile.mk
svtools/workben/makefile.mk
svtools/workben/stest.cxx
svtools/workben/toolpanel/makefile.mk
svtools/workben/urange.cxx
toolkit/inc/toolkit/awt/vclxdevice.hxx
toolkit/inc/toolkit/awt/vclxgraphics.hxx
toolkit/inc/toolkit/awt/vclxwindows.hxx
toolkit/inc/toolkit/controls/dialogcontrol.hxx
toolkit/inc/toolkit/helper/property.hxx
toolkit/inc/toolkit/helper/servicenames.hxx
toolkit/inc/toolkit/helper/throbberimpl.hxx
toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java
toolkit/source/awt/asynccallback.cxx
toolkit/source/awt/vclxgraphics.cxx
toolkit/source/awt/vclxtoolkit.cxx
toolkit/source/awt/vclxwindow.cxx
toolkit/source/awt/xsimpleanimation.cxx
toolkit/source/awt/xthrobber.cxx
toolkit/source/controls/dialogcontrol.cxx
toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
toolkit/source/controls/grid/defaultgriddatamodel.cxx
toolkit/source/controls/grid/gridcontrol.cxx
toolkit/source/controls/grid/initguard.hxx
toolkit/source/controls/unocontrol.cxx
toolkit/source/controls/unocontrolcontainer.cxx
toolkit/source/controls/unocontrols.cxx
toolkit/source/helper/listenermultiplexer.cxx
toolkit/source/helper/property.cxx
toolkit/source/helper/registerservices.cxx
toolkit/source/helper/servicenames.cxx
toolkit/source/helper/throbberimpl.cxx
toolkit/source/helper/tkresmgr.cxx
tools/StaticLibrary_ooopathutils.mk
tools/bootstrp/addexes/makefile.mk
tools/bootstrp/addexes2/makefile.mk
tools/bootstrp/addexes2/mkfilt.cxx
tools/bootstrp/command.cxx
tools/bootstrp/cppdep.cxx
tools/bootstrp/iserver.cxx
tools/bootstrp/makefile.mk
tools/bootstrp/mkcreate.cxx
tools/bootstrp/prj.cxx
tools/bootstrp/rscdep.cxx
tools/bootstrp/sstring.cxx
tools/inc/bootstrp/command.hxx
tools/inc/bootstrp/mkcreate.hxx
tools/inc/bootstrp/prj.hxx
tools/inc/bootstrp/sstring.hxx
tools/inc/tools/agapi.hxx
tools/inc/tools/agitem.hxx
tools/inc/tools/chapi.hxx
tools/inc/tools/download.hxx
tools/inc/tools/eacopier.hxx
tools/inc/tools/fract.hxx
tools/inc/tools/fsys.hxx
tools/inc/tools/geninfo.hxx
tools/inc/tools/globname.hxx
tools/inc/tools/inetmime.hxx
tools/inc/tools/multisel.hxx
tools/inc/tools/poly.hxx
tools/inc/tools/postsys.h
tools/inc/tools/postwin.h
tools/inc/tools/presys.h
tools/inc/tools/prewin.h
tools/inc/tools/pstm.hxx
tools/inc/tools/ref.hxx
tools/inc/tools/simplerm.hxx
tools/inc/tools/solar.h
tools/inc/tools/table.hxx
tools/inc/tools/urlkeys.hxx
tools/inc/tools/urlobj.hxx
tools/prj/build.lst
tools/prj/d.lst
tools/qa/makefile.mk
tools/source/communi/geninfo.cxx
tools/source/debug/debug.cxx
tools/source/fsys/dirent.cxx
tools/source/fsys/tdir.cxx
tools/source/fsys/unx.cxx
tools/source/fsys/urlobj.cxx
tools/source/generic/color.cxx
tools/source/generic/config.cxx
tools/source/generic/fract.cxx
tools/source/inet/inetmime.cxx
tools/source/memtools/multisel.cxx
tools/source/memtools/table.cxx
tools/source/rc/resmgr.cxx
tools/source/ref/globname.cxx
tools/source/ref/pstm.cxx
tools/source/solar/solar.c
tools/source/stream/strmos2.cxx
tools/source/stream/strmunx.cxx
tools/source/stream/strmwnt.cxx
tools/source/string/makefile.mk
tools/source/testtoolloader/testtoolloader.cxx
tools/test/makefile.mk
tools/util/makefile.mk
tools/win/inc/dll.hxx
tools/win/inc/parser.hxx
tools/win/inc/shellex.h
tools/win/inc/shutil.h
tools/win/inc/toolsdll.hxx
tools/win/inc/winshell.hxx
tools/workben/makefile.mk
ucbhelper/source/client/proxydecider.cxx
ucbhelper/workben/ucbexplorer/ucbexplorer.hrc
unotools/inc/unotools/unotunnelhelper.hxx
unotools/source/config/fltrcfg.cxx
unotools/source/config/lingucfg.cxx
unotools/source/config/misccfg.cxx
unotools/source/config/pathoptions.cxx
unotools/source/config/searchopt.cxx
unotools/source/i18n/localedatawrapper.cxx
unotools/source/ucbhelper/localfilehelper.cxx
unotools/source/ucbhelper/ucbhelper.cxx
unotools/source/ucbhelper/xtempfile.cxx
vcl/aqua/inc/salbmp.h
vcl/aqua/inc/salgdi.h
vcl/aqua/inc/salinst.h
vcl/aqua/source/app/salinst.cxx
vcl/aqua/source/gdi/aquaprintaccessoryview.mm
vcl/aqua/source/gdi/salgdi.cxx
vcl/aqua/source/gdi/salprn.cxx
vcl/aqua/source/window/salframeview.mm
vcl/aqua/source/window/salobj.cxx
vcl/inc/vcl/bitmap.hxx
vcl/inc/vcl/brdwin.hxx
vcl/inc/vcl/button.hxx
vcl/inc/vcl/cmdevt.hxx
vcl/inc/vcl/cvtgrf.hxx
vcl/inc/vcl/dialog.hxx
vcl/inc/vcl/dockwin.hxx
vcl/inc/vcl/event.hxx
vcl/inc/vcl/fixed.hxx
vcl/inc/vcl/fldunit.hxx
vcl/inc/vcl/floatwin.hxx
vcl/inc/vcl/gdimtf.hxx
vcl/inc/vcl/glyphcache.hxx
vcl/inc/vcl/graphite_adaptors.hxx
vcl/inc/vcl/graphite_features.hxx
vcl/inc/vcl/graphite_layout.hxx
vcl/inc/vcl/ilstbox.hxx
vcl/inc/vcl/image.h
vcl/inc/vcl/imgctrl.hxx
vcl/inc/vcl/impbmpconv.hxx
vcl/inc/vcl/impprn.hxx
vcl/inc/vcl/jobset.h
vcl/inc/vcl/keycodes.hxx
vcl/inc/vcl/lstbox.hxx
vcl/inc/vcl/mapunit.hxx
vcl/inc/vcl/menu.hxx
vcl/inc/vcl/msgbox.hxx
vcl/inc/vcl/outdev.hxx
vcl/inc/vcl/prndlg.hxx
vcl/inc/vcl/salatype.hxx
vcl/inc/vcl/salbmp.hxx
vcl/inc/vcl/salgdi.hxx
vcl/inc/vcl/salinst.hxx
vcl/inc/vcl/seleng.hxx
vcl/inc/vcl/settings.hxx
vcl/inc/vcl/smartid.hxx
vcl/inc/vcl/status.hxx
vcl/inc/vcl/strhelper.hxx
vcl/inc/vcl/svapp.hxx
vcl/inc/vcl/svdata.hxx
vcl/inc/vcl/syschild.hxx
vcl/inc/vcl/sysdata.hxx
vcl/inc/vcl/taskpanelist.hxx
vcl/inc/vcl/toolbox.hxx
vcl/inc/vcl/vclevent.hxx
vcl/inc/vcl/windata.hxx
vcl/inc/vcl/window.hxx
vcl/inc/vcl/wintypes.hxx
vcl/os2/source/app/salinst.cxx
vcl/os2/source/gdi/salgdi.cxx
vcl/os2/source/window/salmenu.cxx
vcl/os2/source/window/salobj.cxx
vcl/prj/build.lst
vcl/source/app/dbggui.cxx
vcl/source/app/help.cxx
vcl/source/app/idlemgr.cxx
vcl/source/app/settings.cxx
vcl/source/app/svapp.cxx
vcl/source/app/svdata.cxx
vcl/source/app/svmain.cxx
vcl/source/app/svmainhook.cxx
vcl/source/app/unohelp.cxx
vcl/source/app/vclevent.cxx
vcl/source/control/button.cxx
vcl/source/control/combobox.cxx
vcl/source/control/edit.cxx
vcl/source/control/field.cxx
vcl/source/control/fixed.cxx
vcl/source/control/ilstbox.cxx
vcl/source/control/imgctrl.cxx
vcl/source/control/makefile.mk
vcl/source/control/tabctrl.cxx
vcl/source/gdi/bitmap.cxx
vcl/source/gdi/bitmap2.cxx
vcl/source/gdi/bitmap4.cxx
vcl/source/gdi/bmpconv.cxx
vcl/source/gdi/cvtsvm.cxx
vcl/source/gdi/font.cxx
vcl/source/gdi/gdimtf.cxx
vcl/source/gdi/image.cxx
vcl/source/gdi/impimage.cxx
vcl/source/gdi/jobset.cxx
vcl/source/gdi/makefile.mk
vcl/source/gdi/metaact.cxx
vcl/source/gdi/outdev.cxx
vcl/source/gdi/outdev3.cxx
vcl/source/gdi/outdev4.cxx
vcl/source/gdi/outdevnative.cxx
vcl/source/gdi/pdfwriter.cxx
vcl/source/gdi/pdfwriter_impl.cxx
vcl/source/gdi/print3.cxx
vcl/source/gdi/salmisc.cxx
vcl/source/glyphs/gcach_ftyp.cxx
vcl/source/glyphs/gcach_ftyp.hxx
vcl/source/glyphs/glyphcache.cxx
vcl/source/glyphs/graphite_cache.cxx
vcl/source/glyphs/graphite_layout.cxx
vcl/source/glyphs/graphite_textsrc.hxx
vcl/source/helper/canvasbitmap.cxx
vcl/source/helper/smartid.cxx
vcl/source/helper/xconnection.cxx
vcl/source/src/btntext.src
vcl/source/src/images.src
vcl/source/src/print.src
vcl/source/window/accel.cxx
vcl/source/window/accmgr.cxx
vcl/source/window/brdwin.cxx
vcl/source/window/btndlg.cxx
vcl/source/window/dlgctrl.cxx
vcl/source/window/javachild.cxx
vcl/source/window/menu.cxx
vcl/source/window/msgbox.cxx
vcl/source/window/printdlg.cxx
vcl/source/window/status.cxx
vcl/source/window/syschild.cxx
vcl/source/window/toolbox.cxx
vcl/source/window/toolbox2.cxx
vcl/source/window/window.cxx
vcl/source/window/window2.cxx
vcl/source/window/wrkwin.cxx
vcl/unx/gtk/app/gtkdata.cxx
vcl/unx/gtk/app/gtkinst.cxx
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
vcl/unx/gtk/window/gtkframe.cxx
vcl/unx/gtk/window/gtkobject.cxx
vcl/unx/headless/svpbmp.hxx
vcl/unx/headless/svpgdi.cxx
vcl/unx/headless/svpgdi.hxx
vcl/unx/headless/svpinst.cxx
vcl/unx/headless/svpinst.hxx
vcl/unx/headless/svpprn.cxx
vcl/unx/headless/svpprn.hxx
vcl/unx/headless/svppspgraphics.cxx
vcl/unx/headless/svppspgraphics.hxx
vcl/unx/headless/svptext.cxx
vcl/unx/inc/dtint.hxx
vcl/unx/inc/plugins/gtk/gtkdata.hxx
vcl/unx/inc/pspgraphics.h
vcl/unx/inc/salbmp.h
vcl/unx/inc/saldata.hxx
vcl/unx/inc/saldisp.hxx
vcl/unx/inc/salgdi.h
vcl/unx/inc/salinst.h
vcl/unx/inc/xfont.hxx
vcl/unx/kde/kdedata.cxx
vcl/unx/kde4/KDESalGraphics.cxx
vcl/unx/source/app/keysymnames.cxx
vcl/unx/source/app/saldata.cxx
vcl/unx/source/app/saldisp.cxx
vcl/unx/source/app/salinst.cxx
vcl/unx/source/app/wmadaptor.cxx
vcl/unx/source/dtrans/X11_selection.cxx
vcl/unx/source/dtrans/X11_service.cxx
vcl/unx/source/gdi/makefile.mk
vcl/unx/source/gdi/pspgraphics.cxx
vcl/unx/source/gdi/salgdi.cxx
vcl/unx/source/gdi/salgdi3.cxx
vcl/unx/source/gdi/salprnpsp.cxx
vcl/unx/source/gdi/xfont.cxx
vcl/unx/source/gdi/xlfd_attr.cxx
vcl/unx/source/gdi/xlfd_attr.hxx
vcl/unx/source/gdi/xlfd_extd.cxx
vcl/unx/source/gdi/xlfd_extd.hxx
vcl/unx/source/gdi/xlfd_smpl.cxx
vcl/unx/source/gdi/xlfd_smpl.hxx
vcl/unx/source/printer/ppdparser.cxx
vcl/unx/source/printer/printerinfomanager.cxx
vcl/unx/source/window/salframe.cxx
vcl/unx/source/window/salmenu.cxx
vcl/unx/source/window/salobj.cxx
vcl/util/makefile2.pmk
vcl/win/inc/salbmp.h
vcl/win/inc/saldata.hxx
vcl/win/inc/salgdi.h
vcl/win/inc/salinst.h
vcl/win/source/app/saldata.cxx
vcl/win/source/app/salinst.cxx
vcl/win/source/gdi/salgdi.cxx
vcl/win/source/gdi/salgdi3.cxx
vcl/win/source/gdi/salprn.cxx
vcl/win/source/gdi/winlayout.cxx
vcl/win/source/window/salframe.cxx
vcl/win/source/window/salobj.cxx
vcl/workben/outdevgrind.cxx
vos/inc/vos/execabl.hxx
vos/inc/vos/macros.hxx
vos/inc/vos/pipe.hxx
vos/inc/vos/process.hxx
vos/inc/vos/refernce.hxx
vos/inc/vos/signal.hxx
vos/inc/vos/socket.hxx
vos/inc/vos/stream.hxx
vos/inc/vos/thread.hxx
vos/source/pipe.cxx
vos/source/process.cxx
vos/source/signal.cxx
vos/source/thread.cxx
vos/source/timer.cxx
2011-03-11 14:24:23 +01:00
|
|
|
(*aIt)->maImage = SvFileInformationManager::GetFileImage( INetURLObject( (*aIt)->maTargetURL ), sal_False );
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
// this function converts the sequence of strings into a vector of SortingData
|
|
|
|
// the string should have the form :
|
|
|
|
// title \t type \t size \t date \t target url \t is folder \t image url
|
|
|
|
|
|
|
|
void SvtFileView_Impl::CreateVector_Impl( const Sequence < OUString > &rList )
|
|
|
|
{
|
2001-07-18 10:46:38 +00:00
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
|
2010-11-18 18:47:55 -05:00
|
|
|
OUString aTab( RTL_CONSTASCII_USTRINGPARAM( "\t" ));
|
2001-07-13 12:41:02 +00:00
|
|
|
|
|
|
|
sal_uInt32 nCount = (sal_uInt32) rList.getLength();
|
|
|
|
|
|
|
|
for( sal_uInt32 i = 0; i < nCount; i++ )
|
|
|
|
{
|
2001-07-18 10:46:38 +00:00
|
|
|
SortingData_Impl* pEntry = new SortingData_Impl;
|
2001-07-13 12:41:02 +00:00
|
|
|
OUString aValue = rList[i];
|
|
|
|
OUString aDisplayText;
|
|
|
|
sal_Int32 nIndex = 0;
|
|
|
|
|
|
|
|
// get the title
|
2001-10-29 11:47:49 +00:00
|
|
|
pEntry->SetNewTitle( aValue.getToken( 0, '\t', nIndex ) );
|
|
|
|
aDisplayText = pEntry->GetTitle();
|
2002-10-17 14:06:10 +00:00
|
|
|
ReplaceTabWithString( aDisplayText );
|
2001-07-13 12:41:02 +00:00
|
|
|
aDisplayText += aTab;
|
|
|
|
|
|
|
|
// get the type
|
|
|
|
if ( nIndex >= 0 )
|
|
|
|
{
|
|
|
|
pEntry->maType = aValue.getToken( 0, '\t', nIndex );
|
|
|
|
aDisplayText += pEntry->maType;
|
|
|
|
}
|
|
|
|
aDisplayText += aTab;
|
|
|
|
|
|
|
|
// get the size
|
|
|
|
if ( nIndex >= 0 )
|
|
|
|
{
|
|
|
|
OUString aSize = aValue.getToken( 0, '\t', nIndex );
|
|
|
|
aDisplayText += aSize;
|
|
|
|
|
2012-01-13 19:13:55 -02:00
|
|
|
if ( !aSize.isEmpty() )
|
2001-07-13 12:41:02 +00:00
|
|
|
pEntry->maSize = aSize.toInt64();
|
|
|
|
}
|
|
|
|
aDisplayText += aTab;
|
|
|
|
|
|
|
|
// get the date
|
|
|
|
if ( nIndex >= 0 )
|
|
|
|
{
|
|
|
|
OUString aDate = aValue.getToken( 0, '\t', nIndex );
|
|
|
|
aDisplayText += aDate;
|
|
|
|
|
2012-01-13 19:13:55 -02:00
|
|
|
if ( !aDate.isEmpty() )
|
2001-07-13 12:41:02 +00:00
|
|
|
{
|
2012-01-16 23:11:06 +01:00
|
|
|
SAL_WARN( "svtools.contnr", "Don't know, how to convert date" );
|
2001-07-13 12:41:02 +00:00
|
|
|
;// convert date string to date
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// get the target url
|
|
|
|
if ( nIndex >= 0 )
|
|
|
|
{
|
|
|
|
pEntry->maTargetURL = aValue.getToken( 0, '\t', nIndex );
|
|
|
|
}
|
|
|
|
// get the size
|
|
|
|
if ( nIndex >= 0 )
|
|
|
|
{
|
|
|
|
OUString aBool = aValue.getToken( 0, '\t', nIndex );
|
2012-01-13 19:13:55 -02:00
|
|
|
if ( !aBool.isEmpty() )
|
2001-07-13 12:41:02 +00:00
|
|
|
pEntry->mbIsFolder = aBool.toBoolean();
|
|
|
|
}
|
|
|
|
// get the image url
|
|
|
|
if ( nIndex >= 0 )
|
|
|
|
{
|
|
|
|
pEntry->maImageURL = aValue.getToken( 0, '\t', nIndex );
|
|
|
|
}
|
|
|
|
|
|
|
|
// set the display text
|
|
|
|
pEntry->maDisplayText = aDisplayText;
|
|
|
|
|
|
|
|
// detect the image
|
2012-04-06 19:49:53 +02:00
|
|
|
if( aValue != SEPARATOR_STR )
|
2011-04-27 15:09:42 +02:00
|
|
|
{
|
2012-01-13 19:13:55 -02:00
|
|
|
INetURLObject aObj( !pEntry->maImageURL.isEmpty() ? pEntry->maImageURL : pEntry->maTargetURL );
|
2011-04-27 15:09:42 +02:00
|
|
|
pEntry->maImage = SvFileInformationManager::GetImage( aObj, sal_False );
|
|
|
|
}
|
2001-07-13 12:41:02 +00:00
|
|
|
maContent.push_back( pEntry );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView_Impl::Resort_Impl( sal_Int16 nColumn, sal_Bool bAscending )
|
|
|
|
{
|
2001-07-18 10:46:38 +00:00
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
if ( ( nColumn == mnSortColumn ) &&
|
|
|
|
( bAscending == mbAscending ) )
|
|
|
|
return;
|
|
|
|
|
2001-07-20 09:41:40 +00:00
|
|
|
// reset the quick search index
|
|
|
|
mpView->ResetQuickSearch_Impl( NULL );
|
|
|
|
|
2001-07-18 10:46:38 +00:00
|
|
|
String aEntryURL;
|
|
|
|
SvLBoxEntry* pEntry = mpView->GetCurEntry();
|
|
|
|
if ( pEntry && pEntry->GetUserData() )
|
|
|
|
aEntryURL = ( (SvtContentEntry*)pEntry->GetUserData() )->maURL;
|
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
mnSortColumn = nColumn;
|
|
|
|
mbAscending = bAscending;
|
|
|
|
|
|
|
|
SortFolderContent_Impl();
|
|
|
|
OpenFolder_Impl();
|
2001-07-18 10:46:38 +00:00
|
|
|
|
2004-07-06 06:33:26 +00:00
|
|
|
if ( !mbIsFirstResort )
|
2001-07-18 10:46:38 +00:00
|
|
|
{
|
2011-01-12 15:56:50 +01:00
|
|
|
sal_uLong nPos = GetEntryPos( aEntryURL );
|
2001-07-18 10:46:38 +00:00
|
|
|
if ( nPos < mpView->GetEntryCount() )
|
|
|
|
{
|
|
|
|
pEntry = mpView->GetEntry( nPos );
|
2004-06-28 16:06:15 +00:00
|
|
|
|
2011-03-04 00:11:02 +01:00
|
|
|
++mnSuspendSelectCallback; // #i15668#
|
2001-07-18 10:46:38 +00:00
|
|
|
mpView->SetCurEntry( pEntry );
|
2004-06-28 16:06:15 +00:00
|
|
|
--mnSuspendSelectCallback;
|
2001-07-18 10:46:38 +00:00
|
|
|
}
|
|
|
|
}
|
2004-07-06 06:33:26 +00:00
|
|
|
else
|
|
|
|
mbIsFirstResort = sal_False;
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
2002-03-14 12:10:32 +00:00
|
|
|
static sal_Bool gbAscending = sal_True;
|
|
|
|
static sal_Int16 gnColumn = COLUMN_TITLE;
|
|
|
|
static const CollatorWrapper* pCollatorWrapper = NULL;
|
2001-07-13 12:41:02 +00:00
|
|
|
|
|
|
|
/* this functions returns true, if aOne is less then aTwo
|
|
|
|
*/
|
2002-03-14 12:10:32 +00:00
|
|
|
sal_Bool CompareSortingData_Impl( SortingData_Impl* const aOne, SortingData_Impl* const aTwo )
|
2001-07-13 12:41:02 +00:00
|
|
|
{
|
2002-03-14 12:10:32 +00:00
|
|
|
DBG_ASSERT( pCollatorWrapper, "*CompareSortingData_Impl(): Can't work this way!" );
|
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
sal_Int32 nComp;
|
2004-09-08 14:21:52 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2001-07-13 12:41:02 +00:00
|
|
|
sal_Bool bEqual = sal_False;
|
|
|
|
|
|
|
|
if ( aOne->mbIsFolder != aTwo->mbIsFolder )
|
2002-06-26 10:26:56 +00:00
|
|
|
{
|
2001-07-13 12:41:02 +00:00
|
|
|
if ( aOne->mbIsFolder )
|
|
|
|
bRet = sal_True;
|
|
|
|
else
|
|
|
|
bRet = sal_False;
|
2002-06-26 10:26:56 +00:00
|
|
|
|
|
|
|
// !!! pb: #100376# folder always on top
|
|
|
|
if ( !gbAscending )
|
|
|
|
bRet = !bRet;
|
|
|
|
}
|
2001-07-13 12:41:02 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
switch ( gnColumn )
|
|
|
|
{
|
2002-03-14 12:10:32 +00:00
|
|
|
case COLUMN_TITLE:
|
2012-03-14 11:35:04 +01:00
|
|
|
// compare case insensitive first
|
2002-03-14 12:10:32 +00:00
|
|
|
nComp = pCollatorWrapper->compareString( aOne->GetLowerTitle(), aTwo->GetLowerTitle() );
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2002-03-14 12:10:32 +00:00
|
|
|
if ( nComp == 0 )
|
|
|
|
nComp = pCollatorWrapper->compareString( aOne->GetTitle(), aTwo->GetTitle() );
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2002-03-14 12:10:32 +00:00
|
|
|
if ( nComp < 0 )
|
|
|
|
bRet = sal_True;
|
|
|
|
else if ( nComp > 0 )
|
|
|
|
bRet = sal_False;
|
|
|
|
else
|
|
|
|
bEqual = sal_True;
|
|
|
|
break;
|
|
|
|
case COLUMN_TYPE:
|
|
|
|
nComp = pCollatorWrapper->compareString( aOne->maType, aTwo->maType );
|
|
|
|
if ( nComp < 0 )
|
|
|
|
bRet = sal_True;
|
|
|
|
else if ( nComp > 0 )
|
|
|
|
bRet = sal_False;
|
|
|
|
else
|
|
|
|
bEqual = sal_True;
|
|
|
|
break;
|
|
|
|
case COLUMN_SIZE:
|
|
|
|
if ( aOne->maSize < aTwo->maSize )
|
|
|
|
bRet = sal_True;
|
|
|
|
else if ( aOne->maSize > aTwo->maSize )
|
|
|
|
bRet = sal_False;
|
|
|
|
else
|
|
|
|
bEqual = sal_True;
|
|
|
|
break;
|
|
|
|
case COLUMN_DATE:
|
|
|
|
if ( aOne->maModDate < aTwo->maModDate )
|
|
|
|
bRet = sal_True;
|
|
|
|
else if ( aOne->maModDate > aTwo->maModDate )
|
|
|
|
bRet = sal_False;
|
|
|
|
else
|
|
|
|
bEqual = sal_True;
|
|
|
|
break;
|
2004-09-08 14:21:52 +00:00
|
|
|
default:
|
|
|
|
DBG_WARNING( "CompareSortingData_Impl: Compare unknown type!" );
|
|
|
|
bRet = sal_False;
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-11-05 10:31:15 +08:00
|
|
|
// when the two elements are equal, we must not return sal_True (which would
|
2001-07-13 12:41:02 +00:00
|
|
|
// happen if we just return ! ( a < b ) when not sorting ascending )
|
|
|
|
if ( bEqual )
|
|
|
|
return sal_False;
|
|
|
|
|
2002-06-26 10:26:56 +00:00
|
|
|
return gbAscending ? bRet : !bRet;
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
|
|
|
|
2001-07-17 11:47:56 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2001-07-13 12:41:02 +00:00
|
|
|
void SvtFileView_Impl::SortFolderContent_Impl()
|
|
|
|
{
|
2001-07-18 10:46:38 +00:00
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
|
2001-07-13 12:41:02 +00:00
|
|
|
sal_uInt32 nSize = maContent.size();
|
|
|
|
|
|
|
|
if ( nSize > 1 )
|
|
|
|
{
|
|
|
|
gbAscending = mbAscending;
|
|
|
|
gnColumn = mnSortColumn;
|
2002-03-14 12:10:32 +00:00
|
|
|
pCollatorWrapper = aIntlWrapper.getCaseCollator();
|
|
|
|
|
|
|
|
std::stable_sort( maContent.begin(), maContent.end(), CompareSortingData_Impl );
|
2001-07-13 12:41:02 +00:00
|
|
|
|
2002-03-14 12:10:32 +00:00
|
|
|
pCollatorWrapper = NULL;
|
2001-07-13 12:41:02 +00:00
|
|
|
}
|
2001-07-05 11:50:24 +00:00
|
|
|
}
|
|
|
|
|
2001-07-17 11:47:56 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView_Impl::EntryRemoved( const OUString& rURL )
|
|
|
|
{
|
2001-07-18 10:46:38 +00:00
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
|
2001-07-17 11:47:56 +00:00
|
|
|
std::vector< SortingData_Impl* >::iterator aIt;
|
|
|
|
|
2010-12-23 15:06:30 +00:00
|
|
|
for ( aIt = maContent.begin(); aIt != maContent.end(); ++aIt )
|
2001-07-17 11:47:56 +00:00
|
|
|
{
|
|
|
|
if ( (*aIt)->maTargetURL == rURL )
|
|
|
|
{
|
|
|
|
maContent.erase( aIt );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView_Impl::EntryRenamed( OUString& rURL,
|
|
|
|
const OUString& rTitle )
|
|
|
|
{
|
2001-07-18 10:46:38 +00:00
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
|
2001-07-17 11:47:56 +00:00
|
|
|
std::vector< SortingData_Impl* >::iterator aIt;
|
|
|
|
|
2010-12-23 15:06:30 +00:00
|
|
|
for ( aIt = maContent.begin(); aIt != maContent.end(); ++aIt )
|
2001-07-17 11:47:56 +00:00
|
|
|
{
|
|
|
|
if ( (*aIt)->maTargetURL == rURL )
|
|
|
|
{
|
2001-10-29 11:47:49 +00:00
|
|
|
(*aIt)->SetNewTitle( rTitle );
|
2001-07-17 11:47:56 +00:00
|
|
|
OUString aDisplayText = (*aIt)->maDisplayText;
|
|
|
|
sal_Int32 nIndex = aDisplayText.indexOf( '\t' );
|
|
|
|
|
|
|
|
if ( nIndex > 0 )
|
|
|
|
(*aIt)->maDisplayText = aDisplayText.replaceAt( 0, nIndex, rTitle );
|
|
|
|
|
|
|
|
INetURLObject aURLObj( rURL );
|
|
|
|
aURLObj.SetName( rTitle, INetURLObject::ENCODE_ALL );
|
|
|
|
|
|
|
|
rURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE );
|
|
|
|
|
|
|
|
(*aIt)->maTargetURL = rURL;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
2001-12-12 10:07:45 +00:00
|
|
|
String SvtFileView_Impl::FolderInserted( const OUString& rURL, const OUString& rTitle )
|
2001-07-17 11:47:56 +00:00
|
|
|
{
|
2001-07-18 10:46:38 +00:00
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
|
2001-07-17 11:47:56 +00:00
|
|
|
SortingData_Impl* pData = new SortingData_Impl;
|
|
|
|
|
2001-10-29 11:47:49 +00:00
|
|
|
pData->SetNewTitle( rTitle );
|
2001-07-17 11:47:56 +00:00
|
|
|
pData->maSize = 0;
|
|
|
|
pData->mbIsFolder = sal_True;
|
|
|
|
pData->maTargetURL = rURL;
|
|
|
|
|
|
|
|
INetURLObject aURLObj( rURL );
|
|
|
|
|
2001-12-11 14:11:43 +00:00
|
|
|
::svtools::VolumeInfo aVolInfo;
|
|
|
|
pData->maType = SvFileInformationManager::GetFolderDescription( aVolInfo );
|
Merge commit 'ooo/DEV300_m101' into intm101
The following builds for me:
basebmp, basegfx, comphelper, dtrans, i18npool, i18nutil, l10ntools, o3tl,
psprint_config, regexp, rsc, sax, sot, tools, ucbhelper, unotools, vcl
The rest still needs fixing ;-)
Conflicts:
canvas/prj/build.lst
canvas/source/cairo/cairo_textlayout.cxx
canvas/source/directx/dx_winstuff.hxx
canvas/source/tools/image.cxx
canvas/source/vcl/canvashelper.cxx
comphelper/inc/comphelper/documentconstants.hxx
comphelper/inc/comphelper/optionalvalue.hxx
comphelper/inc/comphelper/querydeep.hxx
comphelper/prj/build.lst
comphelper/qa/complex/makefile.mk
comphelper/qa/string/test_string_noadditional.cxx
comphelper/source/misc/componentmodule.cxx
comphelper/source/misc/mimeconfighelper.cxx
comphelper/source/misc/querydeep.cxx
comphelper/source/misc/uieventslogger.cxx
comphelper/source/property/TypeGeneration.cxx
comphelper/test/uno_iterators/uno_iterators.cxx
comphelper/util/makefile.mk
cppcanvas/source/mtfrenderer/implrenderer.cxx
dtrans/prj/build.lst
dtrans/source/generic/dtrans.cxx
dtrans/source/win32/dtobj/FmtFilter.cxx
i18npool/prj/build.lst
i18npool/source/localedata/data/localedata_others.map
i18npool/source/localedata/data/makefile.mk
i18npool/source/localedata/localedata.cxx
i18npool/source/localedata/saxparser.cxx
i18npool/source/registerservices/registerservices.cxx
i18npool/source/search/textsearch.cxx
l10ntools/inc/cfgmerge.hxx
l10ntools/inc/export.hxx
l10ntools/inc/gsicheck.hxx
l10ntools/inc/l10ntools/vosapp.hxx
l10ntools/inc/tagtest.hxx
l10ntools/inc/xmlparse.hxx
l10ntools/layout/layoutparse.cxx
l10ntools/layout/tralay.cxx
l10ntools/source/cfgmerge.cxx
l10ntools/source/export.cxx
l10ntools/source/export2.cxx
l10ntools/source/gsicheck.cxx
l10ntools/source/help/HelpLinker.cxx
l10ntools/source/lngex.cxx
l10ntools/source/lngmerge.cxx
l10ntools/source/merge.cxx
l10ntools/source/tagtest.cxx
l10ntools/source/xmlparse.cxx
padmin/source/fontentry.cxx
padmin/source/padialog.cxx
padmin/source/padialog.src
padmin/source/pamain.cxx
rsc/inc/rscarray.hxx
rsc/inc/rscclass.hxx
rsc/inc/rscclobj.hxx
rsc/inc/rsccont.hxx
rsc/inc/rscdb.hxx
rsc/inc/rscdef.hxx
rsc/inc/rscmgr.hxx
rsc/inc/rscrange.hxx
rsc/inc/rsctop.hxx
rsc/inc/vclrsc.hxx
rsc/source/parser/rscdb.cxx
rsc/source/parser/rscicpx.cxx
rsc/source/parser/rscinit.cxx
rsc/source/prj/start.cxx
rsc/source/res/rscarray.cxx
rsc/source/res/rscclass.cxx
rsc/source/res/rscclobj.cxx
rsc/source/res/rsccont.cxx
rsc/source/res/rscmgr.cxx
rsc/source/res/rscrange.cxx
rsc/source/res/rsctop.cxx
rsc/source/rsc/rsc.cxx
rsc/source/tools/rscdef.cxx
rsc/source/tools/rsctools.cxx
sax/source/expatwrap/sax_expat.cxx
sax/source/fastparser/facreg.cxx
sax/source/tools/fastserializer.cxx
sot/inc/sot/filelist.hxx
sot/inc/sot/object.hxx
sot/source/base/factory.cxx
sot/source/base/filelist.cxx
sot/source/sdstor/stg.cxx
sot/source/sdstor/stgcache.cxx
sot/source/sdstor/stgole.cxx
sot/source/sdstor/stgstrms.cxx
sot/source/sdstor/storage.cxx
sot/source/sdstor/ucbstorage.cxx
svl/inc/svl/cenumitm.hxx
svl/inc/svl/cintitem.hxx
svl/inc/svl/cntwall.hxx
svl/inc/svl/ctypeitm.hxx
svl/inc/svl/custritm.hxx
svl/inc/svl/dateitem.hxx
svl/inc/svl/filerec.hxx
svl/inc/svl/globalnameitem.hxx
svl/inc/svl/ilstitem.hxx
svl/inc/svl/imageitm.hxx
svl/inc/svl/intitem.hxx
svl/inc/svl/itempool.hxx
svl/inc/svl/itemset.hxx
svl/inc/svl/lckbitem.hxx
svl/inc/svl/poolitem.hxx
svl/inc/svl/ptitem.hxx
svl/inc/svl/rectitem.hxx
svl/inc/svl/sfontitm.hxx
svl/inc/svl/slstitm.hxx
svl/inc/svl/srchitem.hxx
svl/inc/svl/svarray.hxx
svl/inc/svl/svdde.hxx
svl/inc/svl/svstdarr.hxx
svl/inc/svl/szitem.hxx
svl/inc/svl/visitem.hxx
svl/inc/svl/zforlist.hxx
svl/inc/svl/zformat.hxx
svl/prj/build.lst
svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx
svl/qa/complex/ConfigItems/helper/makefile.mk
svl/qa/makefile.mk
svl/source/filepicker/pickerhelper.cxx
svl/source/filerec/filerec.cxx
svl/source/items/cenumitm.cxx
svl/source/items/cintitem.cxx
svl/source/items/cntwall.cxx
svl/source/items/ctypeitm.cxx
svl/source/items/custritm.cxx
svl/source/items/dateitem.cxx
svl/source/items/globalnameitem.cxx
svl/source/items/ilstitem.cxx
svl/source/items/imageitm.cxx
svl/source/items/intitem.cxx
svl/source/items/itempool.cxx
svl/source/items/itemprop.cxx
svl/source/items/itemset.cxx
svl/source/items/lckbitem.cxx
svl/source/items/poolio.cxx
svl/source/items/poolitem.cxx
svl/source/items/ptitem.cxx
svl/source/items/rectitem.cxx
svl/source/items/slstitm.cxx
svl/source/items/srchitem.cxx
svl/source/items/style.cxx
svl/source/items/szitem.cxx
svl/source/items/visitem.cxx
svl/source/items/whiter.cxx
svl/source/memtools/svarray.cxx
svl/source/misc/PasswordHelper.cxx
svl/source/misc/adrparse.cxx
svl/source/misc/lngmisc.cxx
svl/source/notify/brdcst.cxx
svl/source/notify/listener.cxx
svl/source/notify/listenerbase.cxx
svl/source/numbers/makefile.mk
svl/source/numbers/nbdll.cxx
svl/source/numbers/zforfind.cxx
svl/source/numbers/zforlist.cxx
svl/source/numbers/zformat.cxx
svl/source/numbers/zforscan.cxx
svl/source/passwordcontainer/passwordcontainer.cxx
svl/source/svdde/ddecli.cxx
svl/source/svdde/ddeimp.hxx
svl/source/svdde/ddemlos2.h
svl/source/svdde/ddesvr.cxx
svl/source/undo/undo.cxx
svl/source/uno/registerservices.cxx
svl/util/makefile.mk
svtools/bmpmaker/bmpsum.cxx
svtools/bmpmaker/g2g.cxx
svtools/bmpmaker/makefile.mk
svtools/inc/borderhelper.hxx
svtools/inc/svtools/accessiblefactory.hxx
svtools/inc/svtools/apearcfg.hxx
svtools/inc/svtools/brwbox.hxx
svtools/inc/svtools/ctrlbox.hxx
svtools/inc/svtools/ctrltool.hxx
svtools/inc/svtools/editbrowsebox.hxx
svtools/inc/svtools/ehdl.hxx
svtools/inc/svtools/embedhlp.hxx
svtools/inc/svtools/filter.hxx
svtools/inc/svtools/ivctrl.hxx
svtools/inc/svtools/parhtml.hxx
svtools/inc/svtools/printdlg.hxx
svtools/inc/svtools/rtftoken.h
svtools/inc/svtools/ruler.hxx
svtools/inc/svtools/svicnvw.hxx
svtools/inc/svtools/svlbitm.hxx
svtools/inc/svtools/svlbox.hxx
svtools/inc/svtools/svtreebx.hxx
svtools/inc/svtools/tabbar.hxx
svtools/inc/svtools/table/abstracttablecontrol.hxx
svtools/inc/svtools/taskbar.hxx
svtools/inc/svtools/textview.hxx
svtools/inc/svtools/valueset.hxx
svtools/source/brwbox/brwbox1.cxx
svtools/source/brwbox/brwbox2.cxx
svtools/source/brwbox/datwin.cxx
svtools/source/brwbox/datwin.hxx
svtools/source/brwbox/makefile.mk
svtools/source/config/apearcfg.cxx
svtools/source/config/htmlcfg.cxx
svtools/source/config/menuoptions.cxx
svtools/source/config/miscopt.cxx
svtools/source/contnr/cont_pch.cxx
svtools/source/contnr/ctrdll.cxx
svtools/source/contnr/fileview.cxx
svtools/source/contnr/imivctl1.cxx
svtools/source/contnr/ivctrl.cxx
svtools/source/contnr/makefile.mk
svtools/source/contnr/svcontnr.src
svtools/source/contnr/svicnvw.cxx
svtools/source/contnr/svimpbox.cxx
svtools/source/contnr/svimpicn.cxx
svtools/source/contnr/svlbitm.cxx
svtools/source/contnr/svtreebx.cxx
svtools/source/contnr/templwin.cxx
svtools/source/contnr/templwin.hxx
svtools/source/control/asynclink.cxx
svtools/source/control/ctrlbox.cxx
svtools/source/control/ctrldll.cxx
svtools/source/control/ctrltool.cxx
svtools/source/control/filectrl.cxx
svtools/source/control/filectrl.src
svtools/source/control/headbar.cxx
svtools/source/control/inettbc.cxx
svtools/source/control/makefile.mk
svtools/source/control/prgsbar.cxx
svtools/source/control/roadmap.cxx
svtools/source/control/ruler.cxx
svtools/source/control/scriptedtext.cxx
svtools/source/control/stdmenu.cxx
svtools/source/control/tabbar.cxx
svtools/source/control/taskbar.cxx
svtools/source/control/taskbox.cxx
svtools/source/control/taskmisc.cxx
svtools/source/control/taskstat.cxx
svtools/source/control/valueacc.cxx
svtools/source/control/valueset.cxx
svtools/source/dialogs/addresstemplate.cxx
svtools/source/dialogs/addresstemplate.src
svtools/source/dialogs/colrdlg.src
svtools/source/dialogs/filedlg2.cxx
svtools/source/dialogs/filedlg2.hxx
svtools/source/dialogs/makefile.mk
svtools/source/dialogs/printdlg.cxx
svtools/source/dialogs/printdlg.src
svtools/source/dialogs/propctrl.cxx
svtools/source/dialogs/propctrl.hxx
svtools/source/dialogs/property.cxx
svtools/source/edit/makefile.mk
svtools/source/edit/sychconv.cxx
svtools/source/edit/syntaxhighlight.cxx
svtools/source/edit/textdoc.cxx
svtools/source/edit/texteng.cxx
svtools/source/edit/textundo.cxx
svtools/source/edit/textview.cxx
svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
svtools/source/filter.vcl/filter/dlgejpg.cxx
svtools/source/filter.vcl/filter/dlgejpg.hxx
svtools/source/filter.vcl/filter/dlgejpg.src
svtools/source/filter.vcl/filter/dlgepng.cxx
svtools/source/filter.vcl/filter/dlgepng.hxx
svtools/source/filter.vcl/filter/dlgepng.src
svtools/source/filter.vcl/filter/dlgexpor.cxx
svtools/source/filter.vcl/filter/dlgexpor.hxx
svtools/source/filter.vcl/filter/dlgexpor.src
svtools/source/filter.vcl/filter/filter2.cxx
svtools/source/filter.vcl/filter/makefile.mk
svtools/source/filter.vcl/filter/sgfbram.cxx
svtools/source/filter.vcl/filter/sgvmain.cxx
svtools/source/filter.vcl/filter/sgvspln.cxx
svtools/source/filter.vcl/filter/strings.src
svtools/source/filter.vcl/jpeg/makefile.mk
svtools/source/filter.vcl/wmf/emfwr.cxx
svtools/source/filter.vcl/wmf/emfwr.hxx
svtools/source/filter.vcl/wmf/enhwmf.cxx
svtools/source/filter.vcl/wmf/winmtf.hxx
svtools/source/filter.vcl/wmf/wmfwr.cxx
svtools/source/filter.vcl/wmf/wmfwr.hxx
svtools/source/graphic/grfcache.cxx
svtools/source/graphic/grfcache.hxx
svtools/source/graphic/grfmgr.cxx
svtools/source/graphic/makefile.mk
svtools/source/inc/accessibletableimp.hxx
svtools/source/inc/svimpbox.hxx
svtools/source/java/patchjavaerror.src
svtools/source/misc/ehdl.cxx
svtools/source/misc/errtxt.src
svtools/source/misc/helpagentwindow.cxx
svtools/source/misc/imagemgr.cxx
svtools/source/misc/imagemgr.src
svtools/source/misc/imageresourceaccess.cxx
svtools/source/misc/imap.cxx
svtools/source/misc/langtab.src
svtools/source/misc/makefile.mk
svtools/source/misc/svtdata.cxx
svtools/source/misc/templatefoldercache.cxx
svtools/source/misc/transfer2.cxx
svtools/source/misc/undo.src
svtools/source/plugapp/commtest.cxx
svtools/source/plugapp/commtest.src
svtools/source/plugapp/makefile.mk
svtools/source/plugapp/testtool.src
svtools/source/productregistration/productregistration.cxx
svtools/source/svhtml/htmlkywd.cxx
svtools/source/svhtml/parhtml.cxx
svtools/source/svrtf/rtfkey2.cxx
svtools/source/svrtf/rtfkeywd.cxx
svtools/source/table/defaultinputhandler.cxx
svtools/source/table/makefile.mk
svtools/source/table/tablecontrol.cxx
svtools/source/table/tablecontrol_impl.cxx
svtools/source/table/tablecontrol_impl.hxx
svtools/source/table/tabledatawindow.cxx
svtools/source/table/tablegeometry.cxx
svtools/source/table/tablegeometry.hxx
svtools/source/toolpanel/makefile.mk
svtools/source/toolpanel/toolpaneldrawer.cxx
svtools/source/uno/addrtempuno.cxx
svtools/source/uno/miscservices.cxx
svtools/source/uno/svtxgridcontrol.cxx
svtools/source/uno/svtxgridcontrol.hxx
svtools/source/uno/toolboxcontroller.cxx
svtools/source/uno/treecontrolpeer.cxx
svtools/source/uno/unocontroltablemodel.cxx
svtools/source/uno/unocontroltablemodel.hxx
svtools/source/uno/unoimap.cxx
svtools/source/urlobj/inetimg.cxx
svtools/util/makefile.mk
svtools/workben/browser.cxx
svtools/workben/cui/makefile.mk
svtools/workben/makefile.mk
svtools/workben/stest.cxx
svtools/workben/toolpanel/makefile.mk
svtools/workben/urange.cxx
toolkit/inc/toolkit/awt/vclxdevice.hxx
toolkit/inc/toolkit/awt/vclxgraphics.hxx
toolkit/inc/toolkit/awt/vclxwindows.hxx
toolkit/inc/toolkit/controls/dialogcontrol.hxx
toolkit/inc/toolkit/helper/property.hxx
toolkit/inc/toolkit/helper/servicenames.hxx
toolkit/inc/toolkit/helper/throbberimpl.hxx
toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java
toolkit/source/awt/asynccallback.cxx
toolkit/source/awt/vclxgraphics.cxx
toolkit/source/awt/vclxtoolkit.cxx
toolkit/source/awt/vclxwindow.cxx
toolkit/source/awt/xsimpleanimation.cxx
toolkit/source/awt/xthrobber.cxx
toolkit/source/controls/dialogcontrol.cxx
toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
toolkit/source/controls/grid/defaultgriddatamodel.cxx
toolkit/source/controls/grid/gridcontrol.cxx
toolkit/source/controls/grid/initguard.hxx
toolkit/source/controls/unocontrol.cxx
toolkit/source/controls/unocontrolcontainer.cxx
toolkit/source/controls/unocontrols.cxx
toolkit/source/helper/listenermultiplexer.cxx
toolkit/source/helper/property.cxx
toolkit/source/helper/registerservices.cxx
toolkit/source/helper/servicenames.cxx
toolkit/source/helper/throbberimpl.cxx
toolkit/source/helper/tkresmgr.cxx
tools/StaticLibrary_ooopathutils.mk
tools/bootstrp/addexes/makefile.mk
tools/bootstrp/addexes2/makefile.mk
tools/bootstrp/addexes2/mkfilt.cxx
tools/bootstrp/command.cxx
tools/bootstrp/cppdep.cxx
tools/bootstrp/iserver.cxx
tools/bootstrp/makefile.mk
tools/bootstrp/mkcreate.cxx
tools/bootstrp/prj.cxx
tools/bootstrp/rscdep.cxx
tools/bootstrp/sstring.cxx
tools/inc/bootstrp/command.hxx
tools/inc/bootstrp/mkcreate.hxx
tools/inc/bootstrp/prj.hxx
tools/inc/bootstrp/sstring.hxx
tools/inc/tools/agapi.hxx
tools/inc/tools/agitem.hxx
tools/inc/tools/chapi.hxx
tools/inc/tools/download.hxx
tools/inc/tools/eacopier.hxx
tools/inc/tools/fract.hxx
tools/inc/tools/fsys.hxx
tools/inc/tools/geninfo.hxx
tools/inc/tools/globname.hxx
tools/inc/tools/inetmime.hxx
tools/inc/tools/multisel.hxx
tools/inc/tools/poly.hxx
tools/inc/tools/postsys.h
tools/inc/tools/postwin.h
tools/inc/tools/presys.h
tools/inc/tools/prewin.h
tools/inc/tools/pstm.hxx
tools/inc/tools/ref.hxx
tools/inc/tools/simplerm.hxx
tools/inc/tools/solar.h
tools/inc/tools/table.hxx
tools/inc/tools/urlkeys.hxx
tools/inc/tools/urlobj.hxx
tools/prj/build.lst
tools/prj/d.lst
tools/qa/makefile.mk
tools/source/communi/geninfo.cxx
tools/source/debug/debug.cxx
tools/source/fsys/dirent.cxx
tools/source/fsys/tdir.cxx
tools/source/fsys/unx.cxx
tools/source/fsys/urlobj.cxx
tools/source/generic/color.cxx
tools/source/generic/config.cxx
tools/source/generic/fract.cxx
tools/source/inet/inetmime.cxx
tools/source/memtools/multisel.cxx
tools/source/memtools/table.cxx
tools/source/rc/resmgr.cxx
tools/source/ref/globname.cxx
tools/source/ref/pstm.cxx
tools/source/solar/solar.c
tools/source/stream/strmos2.cxx
tools/source/stream/strmunx.cxx
tools/source/stream/strmwnt.cxx
tools/source/string/makefile.mk
tools/source/testtoolloader/testtoolloader.cxx
tools/test/makefile.mk
tools/util/makefile.mk
tools/win/inc/dll.hxx
tools/win/inc/parser.hxx
tools/win/inc/shellex.h
tools/win/inc/shutil.h
tools/win/inc/toolsdll.hxx
tools/win/inc/winshell.hxx
tools/workben/makefile.mk
ucbhelper/source/client/proxydecider.cxx
ucbhelper/workben/ucbexplorer/ucbexplorer.hrc
unotools/inc/unotools/unotunnelhelper.hxx
unotools/source/config/fltrcfg.cxx
unotools/source/config/lingucfg.cxx
unotools/source/config/misccfg.cxx
unotools/source/config/pathoptions.cxx
unotools/source/config/searchopt.cxx
unotools/source/i18n/localedatawrapper.cxx
unotools/source/ucbhelper/localfilehelper.cxx
unotools/source/ucbhelper/ucbhelper.cxx
unotools/source/ucbhelper/xtempfile.cxx
vcl/aqua/inc/salbmp.h
vcl/aqua/inc/salgdi.h
vcl/aqua/inc/salinst.h
vcl/aqua/source/app/salinst.cxx
vcl/aqua/source/gdi/aquaprintaccessoryview.mm
vcl/aqua/source/gdi/salgdi.cxx
vcl/aqua/source/gdi/salprn.cxx
vcl/aqua/source/window/salframeview.mm
vcl/aqua/source/window/salobj.cxx
vcl/inc/vcl/bitmap.hxx
vcl/inc/vcl/brdwin.hxx
vcl/inc/vcl/button.hxx
vcl/inc/vcl/cmdevt.hxx
vcl/inc/vcl/cvtgrf.hxx
vcl/inc/vcl/dialog.hxx
vcl/inc/vcl/dockwin.hxx
vcl/inc/vcl/event.hxx
vcl/inc/vcl/fixed.hxx
vcl/inc/vcl/fldunit.hxx
vcl/inc/vcl/floatwin.hxx
vcl/inc/vcl/gdimtf.hxx
vcl/inc/vcl/glyphcache.hxx
vcl/inc/vcl/graphite_adaptors.hxx
vcl/inc/vcl/graphite_features.hxx
vcl/inc/vcl/graphite_layout.hxx
vcl/inc/vcl/ilstbox.hxx
vcl/inc/vcl/image.h
vcl/inc/vcl/imgctrl.hxx
vcl/inc/vcl/impbmpconv.hxx
vcl/inc/vcl/impprn.hxx
vcl/inc/vcl/jobset.h
vcl/inc/vcl/keycodes.hxx
vcl/inc/vcl/lstbox.hxx
vcl/inc/vcl/mapunit.hxx
vcl/inc/vcl/menu.hxx
vcl/inc/vcl/msgbox.hxx
vcl/inc/vcl/outdev.hxx
vcl/inc/vcl/prndlg.hxx
vcl/inc/vcl/salatype.hxx
vcl/inc/vcl/salbmp.hxx
vcl/inc/vcl/salgdi.hxx
vcl/inc/vcl/salinst.hxx
vcl/inc/vcl/seleng.hxx
vcl/inc/vcl/settings.hxx
vcl/inc/vcl/smartid.hxx
vcl/inc/vcl/status.hxx
vcl/inc/vcl/strhelper.hxx
vcl/inc/vcl/svapp.hxx
vcl/inc/vcl/svdata.hxx
vcl/inc/vcl/syschild.hxx
vcl/inc/vcl/sysdata.hxx
vcl/inc/vcl/taskpanelist.hxx
vcl/inc/vcl/toolbox.hxx
vcl/inc/vcl/vclevent.hxx
vcl/inc/vcl/windata.hxx
vcl/inc/vcl/window.hxx
vcl/inc/vcl/wintypes.hxx
vcl/os2/source/app/salinst.cxx
vcl/os2/source/gdi/salgdi.cxx
vcl/os2/source/window/salmenu.cxx
vcl/os2/source/window/salobj.cxx
vcl/prj/build.lst
vcl/source/app/dbggui.cxx
vcl/source/app/help.cxx
vcl/source/app/idlemgr.cxx
vcl/source/app/settings.cxx
vcl/source/app/svapp.cxx
vcl/source/app/svdata.cxx
vcl/source/app/svmain.cxx
vcl/source/app/svmainhook.cxx
vcl/source/app/unohelp.cxx
vcl/source/app/vclevent.cxx
vcl/source/control/button.cxx
vcl/source/control/combobox.cxx
vcl/source/control/edit.cxx
vcl/source/control/field.cxx
vcl/source/control/fixed.cxx
vcl/source/control/ilstbox.cxx
vcl/source/control/imgctrl.cxx
vcl/source/control/makefile.mk
vcl/source/control/tabctrl.cxx
vcl/source/gdi/bitmap.cxx
vcl/source/gdi/bitmap2.cxx
vcl/source/gdi/bitmap4.cxx
vcl/source/gdi/bmpconv.cxx
vcl/source/gdi/cvtsvm.cxx
vcl/source/gdi/font.cxx
vcl/source/gdi/gdimtf.cxx
vcl/source/gdi/image.cxx
vcl/source/gdi/impimage.cxx
vcl/source/gdi/jobset.cxx
vcl/source/gdi/makefile.mk
vcl/source/gdi/metaact.cxx
vcl/source/gdi/outdev.cxx
vcl/source/gdi/outdev3.cxx
vcl/source/gdi/outdev4.cxx
vcl/source/gdi/outdevnative.cxx
vcl/source/gdi/pdfwriter.cxx
vcl/source/gdi/pdfwriter_impl.cxx
vcl/source/gdi/print3.cxx
vcl/source/gdi/salmisc.cxx
vcl/source/glyphs/gcach_ftyp.cxx
vcl/source/glyphs/gcach_ftyp.hxx
vcl/source/glyphs/glyphcache.cxx
vcl/source/glyphs/graphite_cache.cxx
vcl/source/glyphs/graphite_layout.cxx
vcl/source/glyphs/graphite_textsrc.hxx
vcl/source/helper/canvasbitmap.cxx
vcl/source/helper/smartid.cxx
vcl/source/helper/xconnection.cxx
vcl/source/src/btntext.src
vcl/source/src/images.src
vcl/source/src/print.src
vcl/source/window/accel.cxx
vcl/source/window/accmgr.cxx
vcl/source/window/brdwin.cxx
vcl/source/window/btndlg.cxx
vcl/source/window/dlgctrl.cxx
vcl/source/window/javachild.cxx
vcl/source/window/menu.cxx
vcl/source/window/msgbox.cxx
vcl/source/window/printdlg.cxx
vcl/source/window/status.cxx
vcl/source/window/syschild.cxx
vcl/source/window/toolbox.cxx
vcl/source/window/toolbox2.cxx
vcl/source/window/window.cxx
vcl/source/window/window2.cxx
vcl/source/window/wrkwin.cxx
vcl/unx/gtk/app/gtkdata.cxx
vcl/unx/gtk/app/gtkinst.cxx
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
vcl/unx/gtk/window/gtkframe.cxx
vcl/unx/gtk/window/gtkobject.cxx
vcl/unx/headless/svpbmp.hxx
vcl/unx/headless/svpgdi.cxx
vcl/unx/headless/svpgdi.hxx
vcl/unx/headless/svpinst.cxx
vcl/unx/headless/svpinst.hxx
vcl/unx/headless/svpprn.cxx
vcl/unx/headless/svpprn.hxx
vcl/unx/headless/svppspgraphics.cxx
vcl/unx/headless/svppspgraphics.hxx
vcl/unx/headless/svptext.cxx
vcl/unx/inc/dtint.hxx
vcl/unx/inc/plugins/gtk/gtkdata.hxx
vcl/unx/inc/pspgraphics.h
vcl/unx/inc/salbmp.h
vcl/unx/inc/saldata.hxx
vcl/unx/inc/saldisp.hxx
vcl/unx/inc/salgdi.h
vcl/unx/inc/salinst.h
vcl/unx/inc/xfont.hxx
vcl/unx/kde/kdedata.cxx
vcl/unx/kde4/KDESalGraphics.cxx
vcl/unx/source/app/keysymnames.cxx
vcl/unx/source/app/saldata.cxx
vcl/unx/source/app/saldisp.cxx
vcl/unx/source/app/salinst.cxx
vcl/unx/source/app/wmadaptor.cxx
vcl/unx/source/dtrans/X11_selection.cxx
vcl/unx/source/dtrans/X11_service.cxx
vcl/unx/source/gdi/makefile.mk
vcl/unx/source/gdi/pspgraphics.cxx
vcl/unx/source/gdi/salgdi.cxx
vcl/unx/source/gdi/salgdi3.cxx
vcl/unx/source/gdi/salprnpsp.cxx
vcl/unx/source/gdi/xfont.cxx
vcl/unx/source/gdi/xlfd_attr.cxx
vcl/unx/source/gdi/xlfd_attr.hxx
vcl/unx/source/gdi/xlfd_extd.cxx
vcl/unx/source/gdi/xlfd_extd.hxx
vcl/unx/source/gdi/xlfd_smpl.cxx
vcl/unx/source/gdi/xlfd_smpl.hxx
vcl/unx/source/printer/ppdparser.cxx
vcl/unx/source/printer/printerinfomanager.cxx
vcl/unx/source/window/salframe.cxx
vcl/unx/source/window/salmenu.cxx
vcl/unx/source/window/salobj.cxx
vcl/util/makefile2.pmk
vcl/win/inc/salbmp.h
vcl/win/inc/saldata.hxx
vcl/win/inc/salgdi.h
vcl/win/inc/salinst.h
vcl/win/source/app/saldata.cxx
vcl/win/source/app/salinst.cxx
vcl/win/source/gdi/salgdi.cxx
vcl/win/source/gdi/salgdi3.cxx
vcl/win/source/gdi/salprn.cxx
vcl/win/source/gdi/winlayout.cxx
vcl/win/source/window/salframe.cxx
vcl/win/source/window/salobj.cxx
vcl/workben/outdevgrind.cxx
vos/inc/vos/execabl.hxx
vos/inc/vos/macros.hxx
vos/inc/vos/pipe.hxx
vos/inc/vos/process.hxx
vos/inc/vos/refernce.hxx
vos/inc/vos/signal.hxx
vos/inc/vos/socket.hxx
vos/inc/vos/stream.hxx
vos/inc/vos/thread.hxx
vos/source/pipe.cxx
vos/source/process.cxx
vos/source/signal.cxx
vos/source/thread.cxx
vos/source/timer.cxx
2011-03-11 14:24:23 +01:00
|
|
|
pData->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, sal_False );
|
2001-07-17 11:47:56 +00:00
|
|
|
|
|
|
|
OUString aValue;
|
2010-11-18 18:47:55 -05:00
|
|
|
OUString aTab( RTL_CONSTASCII_USTRINGPARAM( "\t" ));
|
|
|
|
OUString aDateSep( RTL_CONSTASCII_USTRINGPARAM( ", " ));
|
2001-07-17 11:47:56 +00:00
|
|
|
|
|
|
|
// title, type, size, date
|
2001-10-29 11:47:49 +00:00
|
|
|
aValue = pData->GetTitle();
|
2002-10-17 14:06:10 +00:00
|
|
|
ReplaceTabWithString( aValue );
|
|
|
|
aValue += aTab;
|
2001-07-17 11:47:56 +00:00
|
|
|
aValue += pData->maType;
|
|
|
|
aValue += aTab;
|
|
|
|
// folders don't have a size
|
|
|
|
aValue += aTab;
|
|
|
|
// set the date
|
2001-12-18 09:25:26 +00:00
|
|
|
SvtSysLocale aSysLocale;
|
|
|
|
const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData();
|
2001-12-11 14:11:43 +00:00
|
|
|
aValue += rLocaleData.getDate( pData->maModDate );
|
2001-07-17 11:47:56 +00:00
|
|
|
aValue += aDateSep;
|
2001-12-11 14:11:43 +00:00
|
|
|
aValue += rLocaleData.getTime( pData->maModDate );
|
2001-07-17 11:47:56 +00:00
|
|
|
|
|
|
|
pData->maDisplayText = aValue;
|
|
|
|
maContent.push_back( pData );
|
2001-12-12 10:07:45 +00:00
|
|
|
|
|
|
|
return String( aValue );
|
2001-07-17 11:47:56 +00:00
|
|
|
}
|
|
|
|
|
2001-07-18 10:46:38 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2011-01-12 15:56:50 +01:00
|
|
|
sal_uLong SvtFileView_Impl::GetEntryPos( const OUString& rURL )
|
2001-07-18 10:46:38 +00:00
|
|
|
{
|
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
|
|
|
|
std::vector< SortingData_Impl* >::iterator aIt;
|
2011-01-12 15:56:50 +01:00
|
|
|
sal_uLong nPos = 0;
|
2001-07-18 10:46:38 +00:00
|
|
|
|
2010-12-23 15:06:30 +00:00
|
|
|
for ( aIt = maContent.begin(); aIt != maContent.end(); ++aIt )
|
2001-07-18 10:46:38 +00:00
|
|
|
{
|
|
|
|
if ( (*aIt)->maTargetURL == rURL )
|
|
|
|
return nPos;
|
|
|
|
nPos += 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return nPos;
|
|
|
|
}
|
|
|
|
|
2001-07-20 09:41:40 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2001-12-04 13:00:23 +00:00
|
|
|
sal_Bool SvtFileView_Impl::SearchNextEntry( sal_uInt32& nIndex, const OUString& rTitle, sal_Bool bWrapAround )
|
2001-07-20 09:41:40 +00:00
|
|
|
{
|
|
|
|
::osl::MutexGuard aGuard( maMutex );
|
|
|
|
|
|
|
|
sal_uInt32 nEnd = maContent.size();
|
2001-07-20 10:19:02 +00:00
|
|
|
sal_uInt32 nStart = nIndex;
|
2001-07-20 09:41:40 +00:00
|
|
|
while ( nIndex < nEnd )
|
|
|
|
{
|
|
|
|
SortingData_Impl* pData = maContent[ nIndex ];
|
2001-10-29 11:47:49 +00:00
|
|
|
if ( rTitle.compareTo( pData->GetLowerTitle(), rTitle.getLength() ) == 0 )
|
2001-07-20 09:41:40 +00:00
|
|
|
return sal_True;
|
|
|
|
nIndex += 1;
|
|
|
|
}
|
|
|
|
|
2001-07-20 10:19:02 +00:00
|
|
|
if ( bWrapAround )
|
|
|
|
{
|
|
|
|
nIndex = 0;
|
2001-12-04 13:00:23 +00:00
|
|
|
while ( nIndex < nEnd && nIndex <= nStart )
|
2001-07-20 10:19:02 +00:00
|
|
|
{
|
|
|
|
SortingData_Impl* pData = maContent[ nIndex ];
|
2001-10-29 11:47:49 +00:00
|
|
|
if ( rTitle.compareTo( pData->GetLowerTitle(), rTitle.getLength() ) == 0 )
|
2001-07-20 10:19:02 +00:00
|
|
|
return sal_True;
|
|
|
|
nIndex += 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-07-20 09:41:40 +00:00
|
|
|
return sal_False;
|
|
|
|
}
|
|
|
|
|
2001-10-19 12:59:02 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void SvtFileView_Impl::SetActualFolder( const INetURLObject& rActualFolder )
|
|
|
|
{
|
2002-09-25 07:56:06 +00:00
|
|
|
if( mbReplaceNames )
|
|
|
|
{
|
|
|
|
if( mpNameTrans )
|
|
|
|
mpNameTrans->SetActualFolder( rActualFolder );
|
|
|
|
else
|
|
|
|
mpNameTrans = new NameTranslator_Impl( rActualFolder );
|
|
|
|
}
|
2001-10-19 12:59:02 +00:00
|
|
|
}
|
|
|
|
|
2001-07-17 11:47:56 +00:00
|
|
|
namespace svtools {
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
// QueryDeleteDlg_Impl
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
QueryDeleteDlg_Impl::QueryDeleteDlg_Impl
|
|
|
|
(
|
|
|
|
Window* pParent,
|
2012-03-14 11:35:04 +01:00
|
|
|
const String& rName // entry name
|
2001-07-17 11:47:56 +00:00
|
|
|
) :
|
|
|
|
|
|
|
|
ModalDialog( pParent, SvtResId( DLG_SVT_QUERYDELETE ) ),
|
|
|
|
|
2010-06-07 09:49:05 +02:00
|
|
|
_aEntryLabel ( this, SvtResId( TXT_ENTRY ) ),
|
|
|
|
_aEntry ( this, SvtResId( TXT_ENTRYNAME ) ),
|
|
|
|
_aQueryMsg ( this, SvtResId( TXT_QUERYMSG ) ),
|
|
|
|
_aYesButton ( this, SvtResId( BTN_YES ) ),
|
|
|
|
_aAllButton ( this, SvtResId( BTN_ALL ) ),
|
|
|
|
_aNoButton ( this, SvtResId( BTN_NO ) ),
|
2007-04-26 08:42:01 +00:00
|
|
|
_aCancelButton( this, SvtResId( BTN_CANCEL ) )
|
2001-07-17 11:47:56 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
FreeResource();
|
|
|
|
|
|
|
|
// Handler
|
|
|
|
Link aLink( STATIC_LINK( this, QueryDeleteDlg_Impl, ClickLink ) );
|
|
|
|
_aYesButton.SetClickHdl( aLink );
|
2001-07-19 09:12:13 +00:00
|
|
|
_aAllButton.SetClickHdl( aLink );
|
2001-07-17 11:47:56 +00:00
|
|
|
_aNoButton.SetClickHdl( aLink );
|
|
|
|
|
2012-03-14 11:35:04 +01:00
|
|
|
// display specified texts
|
2001-07-17 11:47:56 +00:00
|
|
|
|
|
|
|
WinBits nTmpStyle = _aEntry.GetStyle();
|
|
|
|
nTmpStyle |= WB_PATHELLIPSIS;
|
|
|
|
_aEntry.SetStyle( nTmpStyle );
|
|
|
|
_aEntry.SetText( rName );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
IMPL_STATIC_LINK( QueryDeleteDlg_Impl, ClickLink, PushButton*, pBtn )
|
|
|
|
{
|
|
|
|
if ( pBtn == &pThis->_aYesButton )
|
2001-07-19 09:12:13 +00:00
|
|
|
pThis->_eResult = QUERYDELETE_YES;
|
|
|
|
else if ( pBtn == &pThis->_aNoButton )
|
|
|
|
pThis->_eResult = QUERYDELETE_NO;
|
|
|
|
else if ( pBtn == &pThis->_aAllButton )
|
|
|
|
pThis->_eResult = QUERYDELETE_ALL;
|
|
|
|
else if ( pBtn == &pThis->_aCancelButton )
|
|
|
|
pThis->_eResult = QUERYDELETE_CANCEL;
|
|
|
|
|
|
|
|
pThis->EndDialog( RET_OK );
|
2001-07-17 11:47:56 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2001-09-18 07:13:57 +00:00
|
|
|
}
|
2001-10-19 12:59:02 +00:00
|
|
|
|
2010-10-14 08:27:31 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|