diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-23 12:31:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-24 08:05:55 +0200 |
commit | 06dd5b9c9e34ad932b0a111c0ecb9f1e99008a19 (patch) | |
tree | eb0b6b1a7fca8a1747745541a048cacfd2fb092e /basctl | |
parent | b367c81d06f64e500063ebb814eda5e8d55309ca (diff) |
convert SbDEBUG constants to o3tl::typed_flags
Change-Id: Ifcada5684bacae46ec90c5ce3e58980860fee29f
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 16 | ||||
-rw-r--r-- | basctl/source/basicide/baside2.hxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/basides1.cxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/iderdll.cxx | 6 | ||||
-rw-r--r-- | basctl/source/basicide/iderdll2.hxx | 2 | ||||
-rw-r--r-- | basctl/source/inc/basidesh.hxx | 2 | ||||
-rw-r--r-- | basctl/source/inc/bastypes.hxx | 5 |
7 files changed, 19 insertions, 18 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index fdd837ecbccc..dbfe9ca19987 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -314,7 +314,7 @@ void ModulWindow::BasicExecute() if ( XModule().Is() && m_xModule->IsCompiled() && !m_aStatus.bError ) { if ( GetBreakPoints().size() ) - m_aStatus.nBasicFlags = m_aStatus.nBasicFlags | SbDEBUG_BREAK; + m_aStatus.nBasicFlags = m_aStatus.nBasicFlags | BasicDebugFlags::Break; if ( !m_aStatus.bIsRunning ) { @@ -369,26 +369,26 @@ void ModulWindow::CompileBasic() void ModulWindow::BasicRun() { - m_aStatus.nBasicFlags = 0; + m_aStatus.nBasicFlags = BasicDebugFlags::NONE; BasicExecute(); } void ModulWindow::BasicStepOver() { - m_aStatus.nBasicFlags = SbDEBUG_STEPINTO | SbDEBUG_STEPOVER; + m_aStatus.nBasicFlags = BasicDebugFlags::StepInto | BasicDebugFlags::StepOver; BasicExecute(); } void ModulWindow::BasicStepInto() { - m_aStatus.nBasicFlags = SbDEBUG_STEPINTO; + m_aStatus.nBasicFlags = BasicDebugFlags::StepInto; BasicExecute(); } void ModulWindow::BasicStepOut() { - m_aStatus.nBasicFlags = SbDEBUG_STEPOUT; + m_aStatus.nBasicFlags = BasicDebugFlags::StepOut; BasicExecute(); } @@ -515,7 +515,7 @@ void ModulWindow::ToggleBreakPoint( sal_uLong nLine ) { SbMethod* pMethod = static_cast<SbMethod*>(m_xModule->GetMethods()->Get( nMethod )); assert(pMethod && "Methode nicht gefunden! (NULL)"); - pMethod->SetDebugFlags( pMethod->GetDebugFlags() | SbDEBUG_BREAK ); + pMethod->SetDebugFlags( pMethod->GetDebugFlags() | BasicDebugFlags::Break ); } } } @@ -626,7 +626,7 @@ bool ModulWindow::BasicErrorHdl( StarBASIC * pBasic ) return false; } -long ModulWindow::BasicBreakHdl( StarBASIC* pBasic ) +BasicDebugFlags ModulWindow::BasicBreakHdl( StarBASIC* pBasic ) { // #i69280 Required in Window despite normal usage in next command! (void)pBasic; @@ -1280,7 +1280,7 @@ void ModulWindow::BasicStarted() { SbMethod* pMethod = static_cast<SbMethod*>(m_xModule->GetMethods()->Get( nMethod )); assert(pMethod && "Methode nicht gefunden! (NULL)"); - pMethod->SetDebugFlags( pMethod->GetDebugFlags() | SbDEBUG_BREAK ); + pMethod->SetDebugFlags( pMethod->GetDebugFlags() | BasicDebugFlags::Break ); } } } diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index e631d8ee8987..3463fbb73a6f 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -360,7 +360,7 @@ public: void BasicAddWatch(); bool BasicErrorHdl( StarBASIC* pBasic ); - long BasicBreakHdl( StarBASIC* pBasic ); + BasicDebugFlags BasicBreakHdl( StarBASIC* pBasic ); void AssertValidEditEngine(); void LoadBasic(); diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 3f8f34c48624..251c91652598 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -1109,9 +1109,9 @@ bool Shell::CallBasicErrorHdl( StarBASIC* pBasic ) return bRet; } -long Shell::CallBasicBreakHdl( StarBASIC* pBasic ) +BasicDebugFlags Shell::CallBasicBreakHdl( StarBASIC* pBasic ) { - long nRet = 0; + BasicDebugFlags nRet = BasicDebugFlags::NONE; VclPtr<ModulWindow> pModWin = ShowActiveModuleWindow( pBasic ); if ( pModWin ) { diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx index eb0e6ddce679..b301ef73742b 100644 --- a/basctl/source/basicide/iderdll.cxx +++ b/basctl/source/basicide/iderdll.cxx @@ -170,9 +170,9 @@ void ExtraData::SetSearchItem (const SvxSearchItem& rItem) pSearchItem.reset(static_cast<SvxSearchItem*>(rItem.Clone())); } -IMPL_STATIC_LINK(ExtraData, GlobalBasicBreakHdl, StarBASIC *, pBasic, sal_uInt16) +IMPL_STATIC_LINK(ExtraData, GlobalBasicBreakHdl, StarBASIC *, pBasic, BasicDebugFlags) { - sal_uInt16 nRet = 0; + BasicDebugFlags nRet = BasicDebugFlags::NONE; if (Shell* pShell = GetShell()) { if (BasicManager* pBasMgr = FindBasicManager(pBasic)) @@ -193,7 +193,7 @@ IMPL_STATIC_LINK(ExtraData, GlobalBasicBreakHdl, StarBASIC *, pBasic, sal_uInt16 if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) ) { // a step-out should get me out of the protected area... - nRet = SbDEBUG_STEPOUT; + nRet = BasicDebugFlags::StepOut; } else { diff --git a/basctl/source/basicide/iderdll2.hxx b/basctl/source/basicide/iderdll2.hxx index 1409dc4cd958..cd2484011039 100644 --- a/basctl/source/basicide/iderdll2.hxx +++ b/basctl/source/basicide/iderdll2.hxx @@ -48,7 +48,7 @@ private: bool bShellInCriticalSection; protected: - DECL_STATIC_LINK( ExtraData, GlobalBasicBreakHdl, StarBASIC *, sal_uInt16 ); + DECL_STATIC_LINK( ExtraData, GlobalBasicBreakHdl, StarBASIC *, BasicDebugFlags ); public: ExtraData(); diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx index aa41e8bba462..d6f02ea6468c 100644 --- a/basctl/source/inc/basidesh.hxx +++ b/basctl/source/inc/basidesh.hxx @@ -178,7 +178,7 @@ public: virtual bool HasUIFeature(SfxShellFeature nFeature) const override; bool CallBasicErrorHdl( StarBASIC* pBasic ); - long CallBasicBreakHdl( StarBASIC* pBasic ); + BasicDebugFlags CallBasicBreakHdl( StarBASIC* pBasic ); VclPtr<BaseWindow> FindWindow( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rName, ItemType nType, bool bFindSuspended = false ); VclPtr<DialogWindow> FindDlgWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rName, bool bCreateIfNotExist = false, bool bFindSuspended = false ); diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index 20f9f8f1471f..b487d40153f4 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -25,6 +25,7 @@ #include <iderid.hxx> #include <svtools/tabbar.hxx> #include <vcl/toolbox.hxx> +#include <basic/sbdef.hxx> #include <unordered_map> @@ -63,13 +64,13 @@ struct BasicStatus bool bIsRunning : 1; bool bError : 1; bool bIsInReschedule : 1; - sal_uInt16 nBasicFlags; + BasicDebugFlags nBasicFlags; BasicStatus(): bIsRunning(false), bError(false), bIsInReschedule(false), - nBasicFlags(0) { } + nBasicFlags(BasicDebugFlags::NONE) { } }; |