[Libreoffice-commits] .: basctl/source
Stephan Bergmann
sbergmann at kemper.freedesktop.org
Wed Nov 30 05:52:03 PST 2011
basctl/source/basicide/basides1.cxx | 18 +++++++++---------
basctl/source/basicide/basidesh.cxx | 6 +++---
basctl/source/basicide/basobj2.cxx | 2 +-
basctl/source/basicide/basobj3.cxx | 2 +-
basctl/source/basicide/bastype3.cxx | 10 +++++-----
basctl/source/basicide/moduldl2.cxx | 2 +-
basctl/source/basicide/moduldlg.cxx | 4 ++--
basctl/source/inc/basidesh.hxx | 2 +-
basctl/source/inc/sbxitem.hxx | 12 ++++++------
9 files changed, 29 insertions(+), 29 deletions(-)
New commits:
commit 08b921ef07ff2f5089b1e55c9fa11325a594ab22
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Nov 30 14:51:39 2011 +0100
Enum member names live in the outer name scope.
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 2aff96e..62cb0c6 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -615,9 +615,9 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
String aName( rSbxItem.GetName() );
if ( !m_aCurLibName.Len() || ( aDocument == m_aCurDocument && aLibName == m_aCurLibName ) )
{
- if ( rSbxItem.GetType() == BasicIDEType::Module )
+ if ( rSbxItem.GetType() == BASICIDE_TYPE_MODULE )
FindBasWin( aDocument, aLibName, aName, sal_True );
- else if ( rSbxItem.GetType() == BasicIDEType::Dialog )
+ else if ( rSbxItem.GetType() == BASICIDE_TYPE_DIALOG )
FindDlgWin( aDocument, aLibName, aName, sal_True );
}
}
@@ -641,15 +641,15 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
String aName( rSbxItem.GetName() );
SetCurLib( aDocument, aLibName );
IDEBaseWindow* pWin = 0;
- if ( rSbxItem.GetType() == BasicIDEType::Dialog )
+ if ( rSbxItem.GetType() == BASICIDE_TYPE_DIALOG )
{
pWin = FindDlgWin( aDocument, aLibName, aName, sal_True );
}
- else if ( rSbxItem.GetType() == BasicIDEType::Module )
+ else if ( rSbxItem.GetType() == BASICIDE_TYPE_MODULE )
{
pWin = FindBasWin( aDocument, aLibName, aName, sal_True );
}
- else if ( rSbxItem.GetType() == BasicIDEType::Method )
+ else if ( rSbxItem.GetType() == BASICIDE_TYPE_METHOD )
{
pWin = FindBasWin( aDocument, aLibName, aName, sal_True );
((ModulWindow*)pWin)->EditMacro( rSbxItem.GetMethodName() );
@@ -1137,7 +1137,7 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, sal_Bool bUpdateTabBar
BasicIDEData* pData = BasicIDEGlobals::GetExtraData();
if ( pData )
{
- sal_uInt16 nCurrentType = pCurWin->IsA( TYPE( ModulWindow ) ) ? BasicIDEType::Module : BasicIDEType::Dialog;
+ sal_uInt16 nCurrentType = pCurWin->IsA( TYPE( ModulWindow ) ) ? BASICIDE_TYPE_MODULE : BASICIDE_TYPE_DIALOG;
LibInfoItem* pLibInfoItem = new LibInfoItem( pCurWin->GetDocument(), pCurWin->GetLibName(), pCurWin->GetName(), nCurrentType );
pData->GetLibInfos().InsertInfo( pLibInfoItem );
}
@@ -1247,14 +1247,14 @@ IDEBaseWindow* BasicIDEShell::FindWindow( const ScriptDocument& rDocument, const
{
if ( !pWin->IsSuspended() || bFindSuspended )
{
- if ( !rLibName.Len() || !rName.Len() || nType == BasicIDEType::Unknown )
+ if ( !rLibName.Len() || !rName.Len() || nType == BASICIDE_TYPE_UNKNOWN )
{
// return any non-suspended window
return pWin;
}
else if ( pWin->IsDocument( rDocument ) && pWin->GetLibName() == rLibName && pWin->GetName() == rName &&
- ( ( pWin->IsA( TYPE( ModulWindow ) ) && nType == BasicIDEType::Module ) ||
- ( pWin->IsA( TYPE( DialogWindow ) ) && nType == BasicIDEType::Dialog ) ) )
+ ( ( pWin->IsA( TYPE( ModulWindow ) ) && nType == BASICIDE_TYPE_MODULE ) ||
+ ( pWin->IsA( TYPE( DialogWindow ) ) && nType == BASICIDE_TYPE_DIALOG ) ) )
{
return pWin;
}
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 0e77823..65c92d6 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -131,7 +131,7 @@ public:
rtl::OUString sModuleName;
if( mpShell && ( Event.Accessor >>= sModuleName ) )
{
- IDEBaseWindow* pWin = mpShell->FindWindow( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, BasicIDEType::Module, sal_True );
+ IDEBaseWindow* pWin = mpShell->FindWindow( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, BASICIDE_TYPE_MODULE, sal_True );
if( pWin )
mpShell->RemoveWindow( pWin, sal_True, sal_True );
}
@@ -804,7 +804,7 @@ void BasicIDEShell::UpdateWindows()
if ( !pWin )
pWin = CreateBasWin( *doc, aLibName, aModName );
if ( !pNextActiveWindow && pLibInfoItem && pLibInfoItem->GetCurrentName() == aModName &&
- pLibInfoItem->GetCurrentType() == BasicIDEType::Module )
+ pLibInfoItem->GetCurrentType() == BASICIDE_TYPE_MODULE )
{
pNextActiveWindow = (IDEBaseWindow*)pWin;
}
@@ -835,7 +835,7 @@ void BasicIDEShell::UpdateWindows()
if ( !pWin )
pWin = CreateDlgWin( *doc, aLibName, aDlgName );
if ( !pNextActiveWindow && pLibInfoItem && pLibInfoItem->GetCurrentName() == aDlgName &&
- pLibInfoItem->GetCurrentType() == BasicIDEType::Dialog )
+ pLibInfoItem->GetCurrentType() == BASICIDE_TYPE_DIALOG )
{
pNextActiveWindow = (IDEBaseWindow*)pWin;
}
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index 373b91f..af7e904 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -197,7 +197,7 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const
BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell();
if ( pIDEShell )
{
- IDEBaseWindow* pWin = pIDEShell->FindWindow( rDocument, rLibName, rNewName, BasicIDEType::Module, sal_True );
+ IDEBaseWindow* pWin = pIDEShell->FindWindow( rDocument, rLibName, rNewName, BASICIDE_TYPE_MODULE, sal_True );
if ( pWin )
{
// set new name in window
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index f4f18e0..437569a 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -197,7 +197,7 @@ bool RenameDialog( Window* pErrorParent, const ScriptDocument& rDocument, const
}
BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell();
- IDEBaseWindow* pWin = pIDEShell ? pIDEShell->FindWindow( rDocument, rLibName, rOldName, BasicIDEType::Dialog, sal_False ) : NULL;
+ IDEBaseWindow* pWin = pIDEShell ? pIDEShell->FindWindow( rDocument, rLibName, rOldName, BASICIDE_TYPE_DIALOG, sal_False ) : NULL;
Reference< XNameContainer > xExistingDialog;
if ( pWin )
xExistingDialog = ((DialogWindow*)pWin)->GetEditor()->GetDialog();
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index 2324c4d..ab353b3 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -383,27 +383,27 @@ BasicIDEType BasicTreeListBox::ConvertType( BasicEntryType eType )
{
case OBJ_TYPE_DOCUMENT:
{
- nType = BasicIDEType::Shell;
+ nType = BASICIDE_TYPE_SHELL;
}
break;
case OBJ_TYPE_LIBRARY:
{
- nType = BasicIDEType::Library;
+ nType = BASICIDE_TYPE_LIBRARY;
}
break;
case OBJ_TYPE_MODULE:
{
- nType = BasicIDEType::Module;
+ nType = BASICIDE_TYPE_MODULE;
}
break;
case OBJ_TYPE_DIALOG:
{
- nType = BasicIDEType::Dialog;
+ nType = BASICIDE_TYPE_DIALOG;
}
break;
case OBJ_TYPE_METHOD:
{
- nType = BasicIDEType::Method;
+ nType = BASICIDE_TYPE_METHOD;
}
break;
default: ;
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 68b6a01..5777fe8 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1681,7 +1681,7 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
if ( !rDocument.createModule( aLibName, aModName, sal_True, sModuleCode ) )
throw Exception();
- SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, BasicIDEType::Module );
+ SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, BASICIDE_TYPE_MODULE );
BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell();
SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL;
SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL;
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 57f8939..c63e6a6 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -838,7 +838,7 @@ void ObjectPage::NewDialog()
if ( !aDocument.createDialog( aLibName, aDlgName, xISP ) )
return;
- SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDocument, aLibName, aDlgName, BasicIDEType::Dialog );
+ SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDocument, aLibName, aDlgName, BASICIDE_TYPE_DIALOG );
BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell();
SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL;
SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL;
@@ -1000,7 +1000,7 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
StarBASIC* pBasic = pBasMgr? pBasMgr->GetLib( aLibName ) : 0;
if ( pBasic )
pModule = pBasic->FindModule( aModName );
- SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, BasicIDEType::Module );
+ SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, BASICIDE_TYPE_MODULE );
BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell();
SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL;
SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL;
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index 7241341..0c10e83 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -211,7 +211,7 @@ public:
ModulWindowLayout* GetLayoutWindow() const { return pModulLayout; }
- IDEBaseWindow* FindWindow( const ScriptDocument& rDocument, const String& rLibName = String(), const String& rName = String(), BasicIDEType nType = BasicIDEType::Unknown, sal_Bool bFindSuspended = sal_False );
+ IDEBaseWindow* FindWindow( const ScriptDocument& rDocument, const String& rLibName = String(), const String& rName = String(), BasicIDEType nType = BASICIDE_TYPE_UNKNOWN, sal_Bool bFindSuspended = sal_False );
DialogWindow* FindDlgWin( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName, sal_Bool bCreateIfNotExist, sal_Bool bFindSuspended = sal_False );
IDEBaseWindow* FindApplicationWindow();
sal_Bool NextPage( sal_Bool bPrev = sal_False );
diff --git a/basctl/source/inc/sbxitem.hxx b/basctl/source/inc/sbxitem.hxx
index f80e049..effd879 100644
--- a/basctl/source/inc/sbxitem.hxx
+++ b/basctl/source/inc/sbxitem.hxx
@@ -33,12 +33,12 @@
enum BasicIDEType
{
- Unknown,
- Shell,
- Library,
- Module,
- Dialog,
- Method
+ BASICIDE_TYPE_UNKNOWN,
+ BASICIDE_TYPE_SHELL,
+ BASICIDE_TYPE_LIBRARY,
+ BASICIDE_TYPE_MODULE,
+ BASICIDE_TYPE_DIALOG,
+ BASICIDE_TYPE_METHOD
};
class SbxItem : public SfxPoolItem
More information about the Libreoffice-commits
mailing list