summaryrefslogtreecommitdiff
path: root/svtools/source/contnr
diff options
context:
space:
mode:
authorKai Sommerfeld <kso@openoffice.org>2010-06-07 09:49:05 +0200
committerKai Sommerfeld <kso@openoffice.org>2010-06-07 09:49:05 +0200
commit996674302efa782dc956e173b222f810aa3a4c00 (patch)
treea0bc2ce60bea20f75250f3f34f6c3bfa057d90dd /svtools/source/contnr
parent203e36a696b8ebfa3aa7587f23d68de2680a7045 (diff)
cleanup (whitespace & exceptions).
Diffstat (limited to 'svtools/source/contnr')
-rw-r--r--svtools/source/contnr/fileview.cxx76
1 files changed, 35 insertions, 41 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 8538e344bdc1..1d80461b060f 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -100,7 +100,7 @@ using ::rtl::OUString;
DECLARE_LIST( StringList_Impl, OUString* )
-#define ROW_HEIGHT 17 // the height of a row has to be a little higher than the bitmap
+#define ROW_HEIGHT 17 // the height of a row has to be a little higher than the bitmap
#define QUICK_SEARCH_TIMEOUT 1500 // time in mSec before the quicksearch string will be reseted
namespace
@@ -204,7 +204,7 @@ private:
Timer maResetQuickSearch;
OUString maQuickSearchText;
String msAccessibleDescText;
- String msFolder;
+ Strin msFolder;
String msFile;
sal_uInt32 mnSearchIndex;
sal_Bool mbResizeDisabled : 1;
@@ -299,11 +299,11 @@ inline const OUString& HashedEntry::GetName() const
class HashedEntryList : protected List
{// provides a list of _unique_ Entries
protected:
- inline HashedEntry* First();
- inline HashedEntry* Next();
- inline void Append( HashedEntry* pNewEntry );
+ inline HashedEntry* First();
+ inline HashedEntry* Next();
+ inline void Append( HashedEntry* pNewEntry );
public:
- virtual ~HashedEntryList();
+ virtual ~HashedEntryList();
const HashedEntry* Find( const OUString& rNameToSearchFor );
const HashedEntry* Find( const HashedEntry& rToSearchFor );
@@ -338,7 +338,7 @@ HashedEntryList::~HashedEntryList()
const HashedEntry* HashedEntryList::Find( const OUString& rRefName )
{ // simple linear search, which should be fast enough for this purpose
- HashedEntry aRef( rRefName );
+ HashedEntry aRef( rRefName );
HashedEntry* pIter = First();
while( pIter && *pIter != aRef )
pIter = Next();
@@ -419,12 +419,12 @@ 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:
- INetURLObject maTransFile; // URL of file with translation entries
- HashedEntry maHashedURL; // for future purposes when dealing with a set of cached
- // NameTranslationLists
+ INetURLObject maTransFile; // URL of file with translation entries
+ HashedEntry maHashedURL; // for future purposes when dealing with a set of cached
+ // NameTranslationLists
private:
const String maTransFileName;
- void Init(); // reads the translation file and fills the (internal) list
+ void Init(); // reads the translation file and fills the (internal) list
public:
NameTranslationList( const INetURLObject& rBaseURL );
@@ -436,12 +436,12 @@ public:
using List::operator!=;
inline sal_Bool operator !=( const HashedEntry& rRef ) const;
- const OUString* Translate( const OUString& rName ) const;
+ const OUString* Translate( const OUString& rName ) const;
// returns NULL, if rName can't be found
- inline void Update(); // clears list and init
+ inline void Update(); // clears list and init
- inline const String& GetTransTableFileName() const;
+ inline const String& GetTransTableFileName() const;
// returns the name for the file, which contains the translation strings
};
@@ -463,7 +463,7 @@ void NameTranslationList::Init()
if( aTestContent.isDocument() )
{// ... also tests the existence of maTransFile by throwing an Exception
- const sal_Char* pSection = "TRANSLATIONNAMES";
+ const sal_Char* pSection = "TRANSLATIONNAMES";
String aFsysName( maTransFile.getFSysPath( INetURLObject::FSYS_DETECT ) );
Config aConfig( aFsysName );
@@ -475,7 +475,7 @@ void NameTranslationList::Init()
Insert( new NameTranslationEntry( aConfig.GetKeyName( nCnt ), aConfig.ReadKey( nCnt ) ) );
}
}
- catch( Exception& ) {}
+ catch( Exception const & ) {}
}
NameTranslationList::NameTranslationList( const INetURLObject& rBaseURL ):
@@ -527,7 +527,7 @@ public:
// IContentTitleTranslation
virtual sal_Bool GetTranslation( const OUString& rOriginalName, OUString& rTranslatedName ) const;
- void UpdateTranslationTable(); // reads the translation file again
+ void UpdateTranslationTable(); // reads the translation file again
void SetActualFolder( const INetURLObject& rActualFolder );
const String* GetTransTableFileName() const;
@@ -600,7 +600,7 @@ public:
void OpenFolder_Impl();
// #83004# -------
- void ReplaceTabWithString( OUString& aValue );
+ void ReplaceTabWithString( OUString& aValue );
void CreateDisplayText_Impl();
void CreateVector_Impl( const Sequence < OUString > &rList );
void SortFolderContent_Impl();
@@ -613,7 +613,7 @@ public:
ULONG GetEntryPos( const OUString& rURL );
- inline void EnableContextMenu( sal_Bool bEnable );
+ inline voi EnableContextMenu( sal_Bool bEnable );
inline void EnableDelete( sal_Bool bEnable );
void Resort_Impl( sal_Int16 nColumn, sal_Bool bAscending );
@@ -665,7 +665,7 @@ inline sal_Bool SvtFileView_Impl::EnableNameReplacing( sal_Bool bEnable )
if( mpView->IsDeleteOrContextMenuEnabled() )
{
DBG_ASSERT( !mbReplaceNames, "SvtFileView_Impl::EnableNameReplacing(): state should be not possible!" );
- bRet = !bEnable; // only for enabling this is an unsuccessful result
+ bRet = !bEnable; // only for enabling this is an unsuccessful result
}
else
{
@@ -824,7 +824,7 @@ void ViewTabListBox_Impl::Resize()
mbResizeDisabled = sal_True;
Point aPos = GetPosPixel();
SetPosSizePixel( Point( 0, aBarSize.Height() ),
- Size( aBoxSize.Width(), aBoxSize.Height() - aBarSize.Height() ) );
+ Size( aBoxSize.Width(), aBoxSize.Height() - aBarSize.Height() ) );
mbResizeDisabled = sal_False;
}
}
@@ -992,9 +992,9 @@ BOOL ViewTabListBox_Impl::EditedEntry( SvLBoxEntry* pEntry,
bRet = TRUE;
}
- catch( ::com::sun::star::ucb::ContentCreationException ) {}
- catch( ::com::sun::star::ucb::CommandAbortedException ) {}
- catch( ::com::sun::star::uno::Exception ) {}
+ //catch( ::com::sun::star::ucb::ContentCreationException const & ) {}
+ //catch( ::com::sun::star::ucb::CommandAbortedException const & ) {}
+ catch( Exception const & ) {}
return bRet;
}
@@ -1095,12 +1095,12 @@ sal_Bool ViewTabListBox_Impl::Kill( const OUString& rContent )
::ucbhelper::Content aCnt( rContent, mxCmdEnv );
aCnt.executeCommand( OUString::createFromAscii( "delete" ), makeAny( sal_Bool( sal_True ) ) );
}
- catch( ::com::sun::star::ucb::CommandAbortedException& )
+ catch( ::com::sun::star::ucb::CommandAbortedException const & )
{
DBG_WARNING( "CommandAbortedException" );
bRet = sal_False;
}
- catch( ::com::sun::star::uno::Exception& )
+ catch( Exception const & )
{
DBG_WARNING( "Any other exception" );
bRet = sal_False;
@@ -1314,7 +1314,7 @@ sal_Bool SvtFileView::GetParentURL( String& rParentURL ) const
}
}
}
- catch( ::com::sun::star::uno::Exception )
+ catch( Exception const & )
{
// perhaps an unkown url protocol (e.g. "private:newdoc")
}
@@ -1366,7 +1366,7 @@ sal_Bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com:
mpImp->FilterFolderContent_Impl( rFilter );
- mpImp->SortFolderContent_Impl(); // possibly not necessary!!!!!!!!!!
+ mpImp->SortFolderContent_Impl(); // possibly not necessary!!!!!!!!!!
mpImp->CreateDisplayText_Impl();
mpImp->OpenFolder_Impl();
@@ -1999,7 +1999,7 @@ void SvtFileView_Impl::FilterFolderContent_Impl( const OUString &rFilter )
{
// normalize the content title (we always match case-insensitive)
// 91872 - 11.09.2001 - frank.schoenheit@sun.com
- sCompareString = (*aContentLoop)->GetFileName(); // filter works on file name, not on title!
+ sCompareString = (*aContentLoop)->GetFileName(); // filter works on file name, not on title!
sal_Bool bDelete;
if( bHideTransFile && sCompareString == sHideEntry )
@@ -2643,12 +2643,12 @@ QueryDeleteDlg_Impl::QueryDeleteDlg_Impl
ModalDialog( pParent, SvtResId( DLG_SVT_QUERYDELETE ) ),
- _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 ) ),
+ _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 ) ),
_aCancelButton( this, SvtResId( BTN_CANCEL ) )
{
@@ -2671,12 +2671,6 @@ QueryDeleteDlg_Impl::QueryDeleteDlg_Impl
// -----------------------------------------------------------------------
IMPL_STATIC_LINK( QueryDeleteDlg_Impl, ClickLink, PushButton*, pBtn )
-
-/* [Beschreibung]
-
- Die Methode wertet das Resultat der Abfrage aus.
-*/
-
{
if ( pBtn == &pThis->_aYesButton )
pThis->_eResult = QUERYDELETE_YES;