summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-03 16:01:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-06 05:48:26 +0000
commit3211dbd1b6d214b93fc944434d577a62745d749d (patch)
treeb2f4de4032d7c653b7154f02e726ba1ef7e9d2db /basctl
parent8b2ffb280b494253dbdb8abd4230fbb6f1d78db0 (diff)
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>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/bastype2.cxx6
-rw-r--r--basctl/source/basicide/scriptdocument.cxx12
-rw-r--r--basctl/source/inc/scriptdocument.hxx11
3 files changed, 14 insertions, 15 deletions
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 4238ebd357c7..926cdaf53776 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -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;
}
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index c5966a49f1da..49a0f271b2d4 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -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;
}
diff --git a/basctl/source/inc/scriptdocument.hxx b/basctl/source/inc/scriptdocument.hxx
index 65467998b4b8..68835bf3d074 100644
--- a/basctl/source/inc/scriptdocument.hxx
+++ b/basctl/source/inc/scriptdocument.hxx
@@ -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