diff options
author | Uray M. János <uray.janos@gmail.com> | 2012-08-25 12:43:27 +0200 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-08-29 20:48:28 +0000 |
commit | c20f15c1ebf648c3ed71de0ac4771029c9bb59bb (patch) | |
tree | da9f3dddc80492e7ea2435aa6e0bf02e8d40153e /basctl/source/basicide/brkdlg.cxx | |
parent | cda156257003df673fa853a0a5ffcd1cb4848d43 (diff) |
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
Diffstat (limited to 'basctl/source/basicide/brkdlg.cxx')
-rw-r--r-- | basctl/source/basicide/brkdlg.cxx | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx index 2fbc61f70bb4..5ee425e6dc37 100644 --- a/basctl/source/basicide/brkdlg.cxx +++ b/basctl/source/basicide/brkdlg.cxx @@ -29,9 +29,15 @@ #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> +namespace basctl +{ + // FIXME Why does BreakPointDialog allow only sal_uInt16 for break-point line // numbers, whereas BreakPoint supports sal_uLong? +namespace +{ + bool lcl_ParseText(rtl::OUString const &rText, size_t& rLineNr ) { // aText should look like "# n" where @@ -54,6 +60,8 @@ bool lcl_ParseText(rtl::OUString const &rText, size_t& rLineNr ) return true; } +} // namespace + BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList ) : ModalDialog( pParent, IDEResId( RID_BASICIDE_BREAKPOINTDLG ) ), aComboBox( this, IDEResId( RID_CB_BRKPOINTS ) ), @@ -130,7 +138,7 @@ void BreakPointDialog::CheckButtons() } } -IMPL_LINK_INLINE_START( BreakPointDialog, CheckBoxHdl, CheckBox *, pChkBx ) +IMPL_LINK_INLINE_START( BreakPointDialog, CheckBoxHdl, ::CheckBox *, pChkBx ) { BreakPoint* pBrk = GetSelectedBreakPoint(); if ( pBrk ) @@ -138,7 +146,7 @@ IMPL_LINK_INLINE_START( BreakPointDialog, CheckBoxHdl, CheckBox *, pChkBx ) return 0; } -IMPL_LINK_INLINE_END( BreakPointDialog, CheckBoxHdl, CheckBox *, pChkBx ) +IMPL_LINK_INLINE_END( BreakPointDialog, CheckBoxHdl, ::CheckBox *, pChkBx ) @@ -195,13 +203,8 @@ IMPL_LINK( BreakPointDialog, ButtonHdl, Button *, pButton ) String aEntryStr( RTL_CONSTASCII_USTRINGPARAM( "# " ) ); aEntryStr += String::CreateFromInt32( pBrk->nLine ); aComboBox.InsertEntry( aEntryStr, COMBOBOX_APPEND ); - BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell(); - SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL; - SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL; - if( pDispatcher ) - { + if (SfxDispatcher* pDispatcher = GetDispatcher()) pDispatcher->Execute( SID_BASICIDE_BRKPNTSCHANGED ); - } } else { @@ -221,14 +224,8 @@ IMPL_LINK( BreakPointDialog, ButtonHdl, Button *, pButton ) if ( nEntry && !( nEntry < aComboBox.GetEntryCount() ) ) nEntry--; aComboBox.SetText( aComboBox.GetEntry( nEntry ) ); - BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell(); - SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL; - SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL; - - if( pDispatcher ) - { + if (SfxDispatcher* pDispatcher = GetDispatcher()) pDispatcher->Execute( SID_BASICIDE_BRKPNTSCHANGED ); - } } CheckButtons(); } @@ -256,6 +253,6 @@ BreakPoint* BreakPointDialog::GetSelectedBreakPoint() return pBrk; } - +} // namespace basctl /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |