loplugin:unusedenumconstants in basctl
drop UNKNOWN constant and convert to scoped enum Change-Id: Iffeb27193cd0df47c781f2b84144d6f85a6b49e0 Reviewed-on: https://gerrit.libreoffice.org/33888 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -715,11 +715,11 @@ void TreeListBox::SetEntryBitmaps( SvTreeListEntry * pEntry, const Image& rImage
|
||||
|
||||
LibraryType TreeListBox::GetLibraryType() const
|
||||
{
|
||||
LibraryType eType = LIBRARY_TYPE_ALL;
|
||||
LibraryType eType = LibraryType::All;
|
||||
if ( ( nMode & BROWSEMODE_MODULES ) && !( nMode & BROWSEMODE_DIALOGS ) )
|
||||
eType = LIBRARY_TYPE_MODULE;
|
||||
eType = LibraryType::Module;
|
||||
else if ( !( nMode & BROWSEMODE_MODULES ) && ( nMode & BROWSEMODE_DIALOGS ) )
|
||||
eType = LIBRARY_TYPE_DIALOG;
|
||||
eType = LibraryType::Dialog;
|
||||
return eType;
|
||||
}
|
||||
|
||||
|
@@ -1486,9 +1486,9 @@ namespace basctl
|
||||
{
|
||||
switch ( _eType )
|
||||
{
|
||||
case LIBRARY_TYPE_MODULE: aTitle = IDE_RESSTR(RID_STR_USERMACROS); break;
|
||||
case LIBRARY_TYPE_DIALOG: aTitle = IDE_RESSTR(RID_STR_USERDIALOGS); break;
|
||||
case LIBRARY_TYPE_ALL: aTitle = IDE_RESSTR(RID_STR_USERMACROSDIALOGS); break;
|
||||
case LibraryType::Module: aTitle = IDE_RESSTR(RID_STR_USERMACROS); break;
|
||||
case LibraryType::Dialog: aTitle = IDE_RESSTR(RID_STR_USERDIALOGS); break;
|
||||
case LibraryType::All: aTitle = IDE_RESSTR(RID_STR_USERMACROSDIALOGS); break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1497,9 +1497,9 @@ namespace basctl
|
||||
{
|
||||
switch ( _eType )
|
||||
{
|
||||
case LIBRARY_TYPE_MODULE: aTitle = IDE_RESSTR(RID_STR_SHAREMACROS); break;
|
||||
case LIBRARY_TYPE_DIALOG: aTitle = IDE_RESSTR(RID_STR_SHAREDIALOGS); break;
|
||||
case LIBRARY_TYPE_ALL: aTitle = IDE_RESSTR(RID_STR_SHAREMACROSDIALOGS); break;
|
||||
case LibraryType::Module: aTitle = IDE_RESSTR(RID_STR_SHAREMACROS); break;
|
||||
case LibraryType::Dialog: aTitle = IDE_RESSTR(RID_STR_SHAREDIALOGS); break;
|
||||
case LibraryType::All: aTitle = IDE_RESSTR(RID_STR_SHAREMACROSDIALOGS); break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -50,12 +50,11 @@ namespace basctl
|
||||
LIBRARY_LOCATION_DOCUMENT
|
||||
};
|
||||
|
||||
enum LibraryType
|
||||
enum class LibraryType
|
||||
{
|
||||
LIBRARY_TYPE_UNKNOWN,
|
||||
LIBRARY_TYPE_MODULE,
|
||||
LIBRARY_TYPE_DIALOG,
|
||||
LIBRARY_TYPE_ALL
|
||||
Module,
|
||||
Dialog,
|
||||
All
|
||||
};
|
||||
|
||||
class ScriptDocument;
|
||||
@@ -463,7 +462,7 @@ namespace basctl
|
||||
getLibraryLocation( const OUString& _rLibName ) const;
|
||||
|
||||
/// returns the title for the document
|
||||
OUString getTitle( LibraryLocation _eLocation, LibraryType _eType = LIBRARY_TYPE_ALL ) const;
|
||||
OUString getTitle( LibraryLocation _eLocation, LibraryType _eType = LibraryType::All ) const;
|
||||
|
||||
/** returns the title of the document
|
||||
|
||||
|
Reference in New Issue
Block a user