From c20f15c1ebf648c3ed71de0ac4771029c9bb59bb Mon Sep 17 00:00:00 2001 From: "Uray M. János" Date: Sat, 25 Aug 2012 12:43:27 +0200 Subject: 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 Tested-by: Andras Timar --- basctl/source/basicide/moduldlg.hxx | 55 ++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 25 deletions(-) (limited to 'basctl/source/basicide/moduldlg.hxx') diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx index 81fff6afd922..cef214336345 100644 --- a/basctl/source/basicide/moduldlg.hxx +++ b/basctl/source/basicide/moduldlg.hxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef _MODULDLG_HXX -#define _MODULDLG_HXX +#ifndef BASCTL_MODULDLG_HXX +#define BASCTL_MODULDLG_HXX #include @@ -35,6 +35,11 @@ #include #include +class SvxPasswordDialog; + +namespace basctl +{ + enum NewObjectMode { NEWOBJECTMODE_LIB = 1, @@ -93,7 +98,7 @@ public: }; -class ExtBasicTreeListBox : public BasicTreeListBox +class ExtTreeListBox : public TreeListBox { protected: virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel ); @@ -110,14 +115,14 @@ protected: SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos, sal_Bool bMove ); public: - ExtBasicTreeListBox( Window* pParent, const ResId& rRes ); - ~ExtBasicTreeListBox(); + ExtTreeListBox( Window* pParent, const ResId& rRes ); + ~ExtTreeListBox(); }; #define LIBMODE_CHOOSER 1 #define LIBMODE_MANAGER 2 -class BasicCheckBox : public SvTabListBox +class CheckBox : public SvTabListBox { private: NewObjectMode nMode; @@ -126,8 +131,8 @@ private: void Init(); public: - BasicCheckBox( Window* pParent, const ResId& rResId ); - ~BasicCheckBox(); + CheckBox( Window* pParent, const ResId& rResId ); + ~CheckBox(); SvLBoxEntry* DoInsertEntry( const String& rStr, sal_uLong nPos = LISTBOX_APPEND ); SvLBoxEntry* FindEntry( const String& rName ); @@ -151,10 +156,10 @@ private: OKButton aOKButton; CancelButton aCancelButton; FixedText aStorageName; - BasicCheckBox aLibBox; + CheckBox aLibBox; FixedLine aFixedLine; - CheckBox aReferenceBox; - CheckBox aReplaceBox; + ::CheckBox aReferenceBox; + ::CheckBox aReplaceBox; public: LibDialog( Window* pParent ); @@ -162,7 +167,7 @@ public: void SetStorageName( const ::rtl::OUString& rName ); - BasicCheckBox& GetLibBox() { return aLibBox; } + CheckBox& GetLibBox() { return aLibBox; } bool IsReference() const { return aReferenceBox.IsChecked(); } bool IsReplace() const { return aReplaceBox.IsChecked(); } @@ -174,12 +179,12 @@ public: class OrganizeDialog : public TabDialog { private: - TabControl aTabCtrl; - BasicEntryDescriptor m_aCurEntry; + TabControl aTabCtrl; + EntryDescriptor m_aCurEntry; public: - OrganizeDialog( Window* pParent, sal_Int16 tabId, BasicEntryDescriptor& rDesc ); - ~OrganizeDialog(); + OrganizeDialog( Window* pParent, sal_Int16 tabId, EntryDescriptor& rDesc ); + ~OrganizeDialog(); virtual short Execute(); @@ -190,14 +195,14 @@ class ObjectPage: public TabPage { protected: FixedText aLibText; - ExtBasicTreeListBox aBasicBox; + ExtTreeListBox aBasicBox; PushButton aEditButton; CancelButton aCloseButton; PushButton aNewModButton; PushButton aNewDlgButton; PushButton aDelButton; - DECL_LINK( BasicBoxHighlightHdl, BasicTreeListBox * ); + DECL_LINK( BasicBoxHighlightHdl, TreeListBox * ); DECL_LINK( ButtonHdl, Button * ); void CheckButtons(); bool GetSelection( ScriptDocument& rDocument, ::rtl::OUString& rLibName ); @@ -214,20 +219,18 @@ protected: public: ObjectPage( Window* pParent, const ResId& rResId, sal_uInt16 nMode ); - void SetCurrentEntry( BasicEntryDescriptor& rDesc ); + void SetCurrentEntry( EntryDescriptor& rDesc ); void SetTabDlg( TabDialog* p ) { pTabDlg = p;} }; -class SvxPasswordDialog; - class LibPage: public TabPage { protected: FixedText aBasicsText; ListBox aBasicsBox; FixedText aLibText; - BasicCheckBox aLibBox; + CheckBox aLibBox; PushButton aEditButton; CancelButton aCloseButton; PushButton aPasswordButton; @@ -271,10 +274,12 @@ public: // Helper functions SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument, - BasicTreeListBox& rBasicBox, const ::rtl::OUString& rLibName, ::rtl::OUString aModName, bool bMain = false ); + TreeListBox& rBasicBox, const ::rtl::OUString& rLibName, ::rtl::OUString aModName, bool bMain = false ); void createLibImpl( Window* pWin, const ScriptDocument& rDocument, - BasicCheckBox* pLibBox, BasicTreeListBox* pBasicBox ); + CheckBox* pLibBox, TreeListBox* pBasicBox ); + +} // namespace basctl -#endif // _MODULDLG_HXX +#endif // BASCTL_MODULDLG_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3