summaryrefslogtreecommitdiff
path: root/basctl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-13 13:21:04 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-04-15 11:35:03 +0000
commitd208cf834f4f191558ae27ea7a8c7a31b8e440a6 (patch)
tree4b318cdb42b9888197247089cb0a7349f122dd99 /basctl/source
parent9782438a5887c40246016c1f2b5fe12401d2c68d (diff)
convert SIGNATURESTATE_ constants to scoped enum
Change-Id: I715e39599464a199a8b78ec274bfe47b90fc4bb7 Reviewed-on: https://gerrit.libreoffice.org/15301 Tested-by: Noel Grandin <noelgrandin@gmail.com> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basctl/source')
-rw-r--r--basctl/source/basicide/basides1.cxx4
-rw-r--r--basctl/source/basicide/basides2.cxx2
-rw-r--r--basctl/source/basicide/docsignature.cxx4
-rw-r--r--basctl/source/inc/docsignature.hxx4
4 files changed, 7 insertions, 7 deletions
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index eabb0a24b03d..4a952cad67ff 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -733,13 +733,13 @@ void Shell::GetState(SfxItemSet &rSet)
break;
case SID_SIGNATURE:
{
- sal_uInt16 nState = 0;
+ SignatureState nState = SignatureState::NOSIGNATURES;
if ( pCurWin )
{
DocumentSignature aSignature( pCurWin->GetDocument() );
nState = aSignature.getScriptingSignatureState();
}
- rSet.Put( SfxUInt16Item( SID_SIGNATURE, nState ) );
+ rSet.Put( SfxUInt16Item( SID_SIGNATURE, static_cast<sal_uInt16>(nState) ) );
}
break;
case SID_BASICIDE_MODULEDLG:
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 874f797f46f3..1801060e581e 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -106,7 +106,7 @@ void Shell::SetMDITitle()
aTitleBuf = IDE_RESSTR(RID_STR_ALL) ;
DocumentSignature aCurSignature( m_aCurDocument );
- if ( aCurSignature.getScriptingSignatureState() == SIGNATURESTATE_SIGNATURES_OK )
+ if ( aCurSignature.getScriptingSignatureState() == SignatureState::OK )
{
aTitleBuf = aTitleBuf + " " + IDE_RESSTR(RID_STR_SIGNED) + " ";
}
diff --git a/basctl/source/basicide/docsignature.cxx b/basctl/source/basicide/docsignature.cxx
index 0212f9e6924b..dd1626a1aead 100644
--- a/basctl/source/basicide/docsignature.cxx
+++ b/basctl/source/basicide/docsignature.cxx
@@ -80,11 +80,11 @@ namespace basctl
m_pImpl->pShell->SignScriptingContent();
}
- sal_uInt16 DocumentSignature::getScriptingSignatureState() const
+ SignatureState DocumentSignature::getScriptingSignatureState() const
{
if ( m_pImpl->pShell )
return m_pImpl->pShell->GetScriptingSignatureState();
- return SIGNATURESTATE_NOSIGNATURES;
+ return SignatureState::NOSIGNATURES;
}
} // namespace basctl
diff --git a/basctl/source/inc/docsignature.hxx b/basctl/source/inc/docsignature.hxx
index bc80115ca7bb..adbefe849b45 100644
--- a/basctl/source/inc/docsignature.hxx
+++ b/basctl/source/inc/docsignature.hxx
@@ -20,8 +20,8 @@
#define INCLUDED_BASCTL_SOURCE_INC_DOCSIGNATURE_HXX
#include <com/sun/star/frame/XModel.hpp>
-
#include <boost/scoped_ptr.hpp>
+#include <sfx2/signaturestate.hxx>
namespace basctl
@@ -62,7 +62,7 @@ namespace basctl
If the instance is not valid, then SIGNATURESTATE_NOSIGNATURES is returned.
*/
- sal_uInt16 getScriptingSignatureState() const;
+ SignatureState getScriptingSignatureState() const;
private:
DocumentSignature(); // not implemented