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/localizationmgr.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/localizationmgr.cxx')
-rw-r--r-- | basctl/source/basicide/localizationmgr.cxx | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx index 8df518bd3f25..c4c55b25ff61 100644 --- a/basctl/source/basicide/localizationmgr.cxx +++ b/basctl/source/basicide/localizationmgr.cxx @@ -29,25 +29,25 @@ #include <com/sun/star/frame/XLayoutManager.hpp> #include <sfx2/dispatch.hxx> +namespace basctl +{ + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::resource; -using basctl::DialogWindow; -using basctl::ModulWindow; - static ::rtl::OUString aDot( RTL_CONSTASCII_USTRINGPARAM( "." )); static ::rtl::OUString aEsc( RTL_CONSTASCII_USTRINGPARAM( "&" )); static ::rtl::OUString aSemi( RTL_CONSTASCII_USTRINGPARAM( ";" )); -LocalizationMgr::LocalizationMgr( BasicIDEShell* pIDEShell, +LocalizationMgr::LocalizationMgr( Shell* pShell, const ScriptDocument& rDocument, ::rtl::OUString aLibName, const Reference< XStringResourceManager >& xStringResourceManager ) : m_xStringResourceManager( xStringResourceManager ) - , m_pIDEShell( pIDEShell ) + , m_pShell( pShell ) , m_aDocument( rDocument ) , m_aLibName( aLibName ) { @@ -70,7 +70,7 @@ void LocalizationMgr::handleTranslationbar( void ) static ::rtl::OUString aToolBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/translationbar" )); Reference< beans::XPropertySet > xFrameProps - ( m_pIDEShell->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY ); + ( m_pShell->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY ); if ( xFrameProps.is() ) { Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager; @@ -139,7 +139,7 @@ void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResou for( sal_Int32 i = 0 ; i < nDlgCount ; i++ ) { String aDlgName = pDlgNames[ i ]; - if (DialogWindow* pWin = m_pIDEShell->FindDlgWin(m_aDocument, m_aLibName, aDlgName)) + if (DialogWindow* pWin = m_pShell->FindDlgWin(m_aDocument, m_aLibName, aDlgName)) { Reference< container::XNameContainer > xDialog = pWin->GetDialog(); if( xDialog.is() ) @@ -670,11 +670,10 @@ void LocalizationMgr::handleAddLocales( Sequence< Locale > aLocaleSeq ) enableResourceForAllLibraryDialogs(); } - BasicIDE::MarkDocumentModified( m_aDocument ); + MarkDocumentModified( m_aDocument ); // update locale toolbar - SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); - if ( pBindings ) + if (SfxBindings* pBindings = GetBindingsPtr()) pBindings->Invalidate( SID_BASICIDE_CURRENT_LANG ); handleTranslationbar(); @@ -725,11 +724,10 @@ void LocalizationMgr::handleRemoveLocales( Sequence< Locale > aLocaleSeq ) } if( bModified ) { - BasicIDE::MarkDocumentModified( m_aDocument ); + MarkDocumentModified( m_aDocument ); // update slots - SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); - if ( pBindings ) + if (SfxBindings* pBindings = GetBindingsPtr()) { pBindings->Invalidate( SID_BASICIDE_CURRENT_LANG ); pBindings->Invalidate( SID_BASICIDE_MANAGE_LANG ); @@ -757,8 +755,7 @@ void LocalizationMgr::handleSetDefaultLocale( Locale aLocale ) } // update locale toolbar - SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); - if ( pBindings ) + if (SfxBindings* pBindings = GetBindingsPtr()) pBindings->Invalidate( SID_BASICIDE_CURRENT_LANG ); } } @@ -777,11 +774,10 @@ void LocalizationMgr::handleSetCurrentLocale( ::com::sun::star::lang::Locale aLo } // update locale toolbar - SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); - if ( pBindings ) + if (SfxBindings* pBindings = GetBindingsPtr()) pBindings->Invalidate( SID_BASICIDE_CURRENT_LANG ); - if (DialogWindow* pDlgWin = dynamic_cast<DialogWindow*>(m_pIDEShell->GetCurWindow())) + if (DialogWindow* pDlgWin = dynamic_cast<DialogWindow*>(m_pShell->GetCurWindow())) if (!pDlgWin->IsSuspended()) if (DlgEditor* pWinEditor = pDlgWin->GetEditor()) pWinEditor->UpdatePropertyBrowserDelayed(); @@ -809,11 +805,10 @@ void LocalizationMgr::handleBasicStopped( void ) DialogWindow* FindDialogWindowForEditor( DlgEditor* pEditor ) { - BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell(); - IDEWindowTable& aIDEWindowTable = pIDEShell->GetIDEWindowTable(); - for( IDEWindowTable::const_iterator it = aIDEWindowTable.begin(); it != aIDEWindowTable.end(); ++it ) + Shell::WindowTable const& aWindowTable = GetShell()->GetWindowTable(); + for (Shell::WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it ) { - IDEBaseWindow* pWin = it->second; + BaseWindow* pWin = it->second; if (!pWin->IsSuspended()) if (DialogWindow* pDlgWin = dynamic_cast<DialogWindow*>(pWin)) { @@ -853,7 +848,7 @@ void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor* pEdito xDummyStringResolver, SET_IDS ); if( nChangedCount ) - BasicIDE::MarkDocumentModified( aDocument ); + MarkDocumentModified( aDocument ); } void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor* pEditor, @@ -907,7 +902,7 @@ void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor* xDummyStringResolver, REMOVE_IDS_FROM_RESOURCE ); if( nChangedCount ) - BasicIDE::MarkDocumentModified( aDocument ); + MarkDocumentModified( aDocument ); } void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument, const ::rtl::OUString& aLibName, @@ -1159,4 +1154,6 @@ Reference< XStringResourceManager > LocalizationMgr::getStringResourceFromDialog return xStringResourceManager; } +} // namespace basctl + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |