summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/basobj3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basctl/source/basicide/basobj3.cxx')
-rw-r--r--basctl/source/basicide/basobj3.cxx59
1 files changed, 29 insertions, 30 deletions
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index f71bbb206378..5d5bacf0e88d 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -48,7 +48,6 @@
namespace basctl
{
-using namespace comphelper;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::container;
@@ -74,7 +73,7 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName )
OUString aMacroName( rMacroName );
if ( aMacroName.isEmpty() )
{
- if ( !pModule->GetMethods()->Count32() )
+ if (!pModule->GetMethods()->Count())
aMacroName = "Main" ;
else
{
@@ -105,9 +104,7 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName )
aOUSource = aOUSource.copy( 0, nSourceLen-1 );
}
- OUString aSubStr = "Sub " + aMacroName + "\n\nEnd Sub";
-
- aOUSource += aSubStr;
+ aOUSource += "Sub " + aMacroName + "\n\nEnd Sub";
// update module in library
StarBASIC* pBasic = dynamic_cast<StarBASIC*>(pModule->GetParent());
@@ -180,24 +177,24 @@ bool RenameDialog (
if ( !rDocument.renameDialog( rLibName, rOldName, rNewName, xExistingDialog ) )
return false;
- if (pWin && pShell)
- {
- // set new name in window
- pWin->SetName( rNewName );
+ if (!pWin || !pShell)
+ return true;
- // update property browser
- pWin->UpdateBrowser();
+ // set new name in window
+ pWin->SetName( rNewName );
- // update tabwriter
- sal_uInt16 nId = pShell->GetWindowId( pWin );
- DBG_ASSERT( nId, "No entry in Tabbar!" );
- if ( nId )
- {
- TabBar& rTabBar = pShell->GetTabBar();
- rTabBar.SetPageText( nId, rNewName );
- rTabBar.Sort();
- rTabBar.MakeVisible( rTabBar.GetCurPageId() );
- }
+ // update property browser
+ pWin->UpdateBrowser();
+
+ // update tabwriter
+ sal_uInt16 nId = pShell->GetWindowId( pWin );
+ DBG_ASSERT( nId, "No entry in Tabbar!" );
+ if ( nId )
+ {
+ TabBar& rTabBar = pShell->GetTabBar();
+ rTabBar.SetPageText( nId, rNewName );
+ rTabBar.Sort();
+ rTabBar.MakeVisible( rTabBar.GetCurPageId() );
}
return true;
}
@@ -323,19 +320,19 @@ void BasicStopped(
if (Shell* pShell = GetShell())
{
sal_uInt16 nWait = 0;
- while ( pShell->GetViewFrame()->GetWindow().IsWait() )
+ while ( pShell->GetViewFrame().GetWindow().IsWait() )
{
- pShell->GetViewFrame()->GetWindow().LeaveWait();
+ pShell->GetViewFrame().GetWindow().LeaveWait();
nWait++;
}
if ( pnWaitCount )
*pnWaitCount = nWait;
}
- vcl::Window* pDefParent = Application::GetDefDialogParent();
- if ( pDefParent && !pDefParent->IsEnabled() )
+ weld::Window* pDefParent = Application::GetDefDialogParent();
+ if (pDefParent && !pDefParent->get_sensitive())
{
- pDefParent->Enable();
+ pDefParent->set_sensitive(true);
if ( pbAppWindowDisabled )
*pbAppWindowDisabled = true;
}
@@ -432,7 +429,7 @@ SfxBindings* GetBindingsPtr()
SfxViewFrame* pFrame = nullptr;
if (Shell* pShell = GetShell())
{
- pFrame = pShell->GetViewFrame();
+ pFrame = &pShell->GetViewFrame();
}
else
{
@@ -456,9 +453,11 @@ SfxBindings* GetBindingsPtr()
SfxDispatcher* GetDispatcher ()
{
if (Shell* pShell = GetShell())
- if (SfxViewFrame* pViewFrame = pShell->GetViewFrame())
- if (SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher())
- return pDispatcher;
+ {
+ SfxViewFrame& rViewFrame = pShell->GetViewFrame();
+ if (SfxDispatcher* pDispatcher = rViewFrame.GetDispatcher())
+ return pDispatcher;
+ }
return nullptr;
}
} // namespace basctl