From 362d4f0cd4e50111edfae9d30c90602c37ed65a2 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 1 Apr 2014 19:18:35 +0200 Subject: Explicitly mark overriding destructors as "virtual" It appears that the C++ standard allows overriding destructors to be marked "override," but at least some MSVC versions complain about it, so at least make sure such destructors are explicitly marked "virtual." Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1 --- basctl/source/basicide/basdoc.hxx | 2 +- basctl/source/basicide/basicbox.hxx | 10 +++++----- basctl/source/basicide/baside2.hxx | 16 ++++++++-------- basctl/source/basicide/basidesh.cxx | 2 +- basctl/source/basicide/bastype2.hxx | 2 +- basctl/source/basicide/doceventnotifier.cxx | 2 +- basctl/source/basicide/linenumberwindow.hxx | 2 +- basctl/source/basicide/macrodlg.hxx | 2 +- basctl/source/basicide/moduldlg.hxx | 6 +++--- basctl/source/basicide/scriptdocument.cxx | 2 +- basctl/source/basicide/tbxctl.hxx | 2 +- basctl/source/inc/accessibledialogwindow.hxx | 2 +- basctl/source/inc/baside3.hxx | 4 ++-- basctl/source/inc/basidesh.hxx | 2 +- basctl/source/inc/dlged.hxx | 2 +- basctl/source/inc/managelang.hxx | 2 +- 16 files changed, 30 insertions(+), 30 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/basdoc.hxx b/basctl/source/basicide/basdoc.hxx index 58dabe4cd3f3..baf7a48a119c 100644 --- a/basctl/source/basicide/basdoc.hxx +++ b/basctl/source/basicide/basdoc.hxx @@ -54,7 +54,7 @@ public: SFX_DECL_OBJECTFACTORY(); SFX_DECL_INTERFACE( SVX_INTERFACE_BASIDE_DOCSH ) DocShell(); - ~DocShell(); + virtual ~DocShell(); SfxPrinter* GetPrinter( bool bCreate ); void SetPrinter( SfxPrinter* pPrinter ); diff --git a/basctl/source/basicide/basicbox.hxx b/basctl/source/basicide/basicbox.hxx index ed658d146d90..5981e6030921 100644 --- a/basctl/source/basicide/basicbox.hxx +++ b/basctl/source/basicide/basicbox.hxx @@ -35,7 +35,7 @@ public: SFX_DECL_TOOLBOX_CONTROL(); LibBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); - ~LibBoxControl(); + virtual ~LibBoxControl(); virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; @@ -50,7 +50,7 @@ class DocListenerBox :public ListBox { protected: DocListenerBox( Window* pParent ); - ~DocListenerBox(); + virtual ~DocListenerBox(); protected: virtual void FillBox() = 0; @@ -97,7 +97,7 @@ protected: public: LibBox( Window* pParent, const com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); - ~LibBox(); + virtual ~LibBox(); using Window::Update; void Update( const SfxStringItem* pItem ); @@ -109,7 +109,7 @@ public: SFX_DECL_TOOLBOX_CONTROL(); LanguageBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); - ~LanguageBoxControl(); + virtual ~LanguageBoxControl(); virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; virtual Window* CreateItemWindow( Window *pParent ) SAL_OVERRIDE; @@ -136,7 +136,7 @@ protected: public: LanguageBox( Window* pParent ); - ~LanguageBox(); + virtual ~LanguageBox(); using Window::Update; void Update( const SfxStringItem* pItem ); diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index f4cf468c0bd6..3305b14cb160 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -148,7 +148,7 @@ protected: public: EditorWindow (Window* pParent, ModulWindow*); - ~EditorWindow(); + virtual ~EditorWindow(); ExtTextEngine* GetEditEngine() const { return pEditEngine.get(); } ExtTextView* GetEditView() const { return pEditView.get(); } @@ -196,7 +196,7 @@ protected: public: BreakPointWindow (Window* pParent, ModulWindow*); - ~BreakPointWindow(); + virtual ~BreakPointWindow(); void SetMarkerPos( sal_uInt16 nLine, bool bErrorMarker = false ); void SetNoMarker (); @@ -220,7 +220,7 @@ protected: public: WatchTreeListBox( Window* pParent, WinBits nWinBits ); - ~WatchTreeListBox(); + virtual ~WatchTreeListBox(); void RequestingChildren( SvTreeListEntry * pParent ) SAL_OVERRIDE; void UpdateWatches( bool bBasicStopped = false ); @@ -252,7 +252,7 @@ protected: public: WatchWindow (Layout* pParent); - ~WatchWindow(); + virtual ~WatchWindow(); void AddWatch( const OUString& rVName ); bool RemoveSelectedWatch(); @@ -274,7 +274,7 @@ protected: public: StackWindow (Layout* pParent); - ~StackWindow(); + virtual ~StackWindow(); void UpdateCalls(); }; @@ -337,7 +337,7 @@ public: ModulWindow( ModulWindowLayout* pParent, const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aName, OUString& aModule ); - ~ModulWindow(); + virtual ~ModulWindow(); virtual void ExecuteCommand (SfxRequest& rReq) SAL_OVERRIDE; virtual void ExecuteGlobal (SfxRequest& rReq) SAL_OVERRIDE; @@ -462,7 +462,7 @@ private: { public: SyntaxColors (); - ~SyntaxColors (); + virtual ~SyntaxColors (); public: void SetActiveEditor (EditorWindow* pEditor_) { pEditor = pEditor_; } void SettingsChanged (); @@ -522,7 +522,7 @@ private: public: CodeCompleteWindow( EditorWindow* pPar ); - ~CodeCompleteWindow(){ delete pListBox; } + virtual ~CodeCompleteWindow(){ delete pListBox; } void InsertEntry( const OUString& aStr ); void ClearListBox(); diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 0059ff3ed30f..7a69e025d4cb 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -74,7 +74,7 @@ public: ContainerListenerImpl (Shell* pShell) : mpShell(pShell) { } - ~ContainerListenerImpl() + virtual ~ContainerListenerImpl() { } void addContainerListener( const ScriptDocument& rScriptDocument, const OUString& aLibName ) diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx index d4214e5cc5a5..d2266af46b27 100644 --- a/basctl/source/basicide/bastype2.hxx +++ b/basctl/source/basicide/bastype2.hxx @@ -206,7 +206,7 @@ protected: public: TreeListBox(Window* pParent, const ResId& rRes); TreeListBox(Window* pParent, WinBits nStyle); - ~TreeListBox(); + virtual ~TreeListBox(); void ScanEntry( const ScriptDocument& rDocument, LibraryLocation eLocation ); void ScanAllEntries(); diff --git a/basctl/source/basicide/doceventnotifier.cxx b/basctl/source/basicide/doceventnotifier.cxx index b51853bfb654..0d2bb88ffe76 100644 --- a/basctl/source/basicide/doceventnotifier.cxx +++ b/basctl/source/basicide/doceventnotifier.cxx @@ -71,7 +71,7 @@ namespace basctl { public: Impl (DocumentEventListener&, Reference const& rxDocument); - ~Impl (); + virtual ~Impl (); // XDocumentEventListener virtual void SAL_CALL documentEventOccured( const DocumentEvent& Event ) throw (RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/basctl/source/basicide/linenumberwindow.hxx b/basctl/source/basicide/linenumberwindow.hxx index 6c6cbaceb065..c15a7fd885b5 100644 --- a/basctl/source/basicide/linenumberwindow.hxx +++ b/basctl/source/basicide/linenumberwindow.hxx @@ -31,7 +31,7 @@ protected: public: LineNumberWindow (Window* pParent, ModulWindow* pModulWin); - ~LineNumberWindow(); + virtual ~LineNumberWindow(); void DoScroll( long nHorzScroll, long nVertScroll ); diff --git a/basctl/source/basicide/macrodlg.hxx b/basctl/source/basicide/macrodlg.hxx index 17a7cc8a5d8b..5c16009199b8 100644 --- a/basctl/source/basicide/macrodlg.hxx +++ b/basctl/source/basicide/macrodlg.hxx @@ -90,7 +90,7 @@ private: public: MacroChooser( Window* pParent, bool bCreateEntries = true ); - ~MacroChooser(); + virtual ~MacroChooser(); SbMethod* GetMacro(); void DeleteMacro(); diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx index f3487bfa9de8..aa5d6512a8a8 100644 --- a/basctl/source/basicide/moduldlg.hxx +++ b/basctl/source/basicide/moduldlg.hxx @@ -112,7 +112,7 @@ protected: public: ExtTreeListBox(Window* pParent, WinBits nStyle); - ~ExtTreeListBox(); + virtual ~ExtTreeListBox(); }; class CheckBox : public SvTabListBox @@ -125,7 +125,7 @@ private: public: CheckBox(Window* pParent, WinBits nStyle); - ~CheckBox(); + virtual ~CheckBox(); SvTreeListEntry* DoInsertEntry( const OUString& rStr, sal_uLong nPos = LISTBOX_APPEND ); SvTreeListEntry* FindEntry( const OUString& rName ); @@ -172,7 +172,7 @@ private: public: OrganizeDialog( Window* pParent, sal_Int16 tabId, EntryDescriptor& rDesc ); - ~OrganizeDialog(); + virtual ~OrganizeDialog(); virtual short Execute() SAL_OVERRIDE; diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index 02a128646e64..8e3b0ac984ca 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -207,7 +207,7 @@ namespace basctl public: Impl (); Impl (Reference const& rxDocument); - ~Impl (); + virtual ~Impl (); /** determines whether the instance refers to a valid "document" with script and dialog libraries diff --git a/basctl/source/basicide/tbxctl.hxx b/basctl/source/basicide/tbxctl.hxx index 7058a6cf0196..bdd2ed531d98 100644 --- a/basctl/source/basicide/tbxctl.hxx +++ b/basctl/source/basicide/tbxctl.hxx @@ -44,7 +44,7 @@ public: SFX_DECL_TOOLBOX_CONTROL(); TbxControls(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); - ~TbxControls() {} + virtual ~TbxControls() {} virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; diff --git a/basctl/source/inc/accessibledialogwindow.hxx b/basctl/source/inc/accessibledialogwindow.hxx index 26ba11000e47..e905b35b52ae 100644 --- a/basctl/source/inc/accessibledialogwindow.hxx +++ b/basctl/source/inc/accessibledialogwindow.hxx @@ -110,7 +110,7 @@ protected: public: AccessibleDialogWindow (basctl::DialogWindow*); - ~AccessibleDialogWindow(); + virtual ~AccessibleDialogWindow(); // SfxListener virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index b2326a4fd9dc..50c68e7ba50e 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -80,7 +80,7 @@ public: TYPEINFO_OVERRIDE(); DialogWindow (DialogWindowLayout* pParent, ScriptDocument const& rDocument, const OUString& aLibName, const OUString& aName, com::sun::star::uno::Reference const& xDialogModel); DialogWindow( DialogWindow* pCurView ); // never implemented - ~DialogWindow(); + virtual ~DialogWindow(); virtual void ExecuteCommand( SfxRequest& rReq ) SAL_OVERRIDE; virtual void GetState( SfxItemSet& ) SAL_OVERRIDE; @@ -126,7 +126,7 @@ class DialogWindowLayout : public Layout { public: DialogWindowLayout (Window* pParent, ObjectCatalog&); - ~DialogWindowLayout(); + virtual ~DialogWindowLayout(); public: void ShowPropertyBrowser (); void UpdatePropertyBrowser (); diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx index fc251d16cc18..fa5d4c65c3ac 100644 --- a/basctl/source/inc/basidesh.hxx +++ b/basctl/source/inc/basidesh.hxx @@ -153,7 +153,7 @@ public: SFX_DECL_VIEWFACTORY(Shell); Shell( SfxViewFrame *pFrame, SfxViewShell *pOldSh ); - ~Shell(); + virtual ~Shell(); BaseWindow* GetCurWindow() const { return pCurWin; } ScriptDocument const& GetCurDocument() const { return m_aCurDocument; } diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx index 3975cb9ebbc7..b6db056a6f67 100644 --- a/basctl/source/inc/dlged.hxx +++ b/basctl/source/inc/dlged.hxx @@ -142,7 +142,7 @@ public: com::sun::star::uno::Reference const& xModel, com::sun::star::uno::Reference xDialogModel ); - ~DlgEditor(); + virtual ~DlgEditor(); Window& GetWindow() const { return rWindow; } diff --git a/basctl/source/inc/managelang.hxx b/basctl/source/inc/managelang.hxx index 6fa0c62e9229..15332a85bb95 100644 --- a/basctl/source/inc/managelang.hxx +++ b/basctl/source/inc/managelang.hxx @@ -74,7 +74,7 @@ private: public: ManageLanguageDialog( Window* pParent, boost::shared_ptr _pLMgr ); - ~ManageLanguageDialog(); + virtual ~ManageLanguageDialog(); }; class SetDefaultLanguageDialog : public ModalDialog -- cgit