loplugin:mergeclasses

Change-Id: I1ce2e31e4dae780612e51b3806ee6044be9cf4bb
This commit is contained in:
Noel Grandin
2015-10-09 12:20:01 +02:00
parent fcddbf6fa3
commit 48532dfa60
10 changed files with 48 additions and 126 deletions

View File

@@ -112,7 +112,6 @@ merge dbaccess::IPropertyContainer with dbaccess::OColumn
merge dbaccess::IRefreshListener with dbaccess::OConnection
merge dbaui::(anonymous namespace)::IImageProvider with dbaui::(anonymous namespace)::ImageProvider
merge dbaui::(anonymous namespace)::ILabelProvider with dbaui::(anonymous namespace)::LabelProvider
merge dbaui::IApplicationController with dbaui::OApplicationController
merge dbaui::IEntryFilter with dbaui::(anonymous namespace)::FilterByEntryDataId
merge dbaui::OOdbcLibWrapper with dbaui::OOdbcEnumeration
merge dbaui::SbaGridListener with dbaui::SbaXDataBrowserController

View File

@@ -2248,10 +2248,6 @@ void OApplicationController::OnInvalidateClipboard()
InvalidateFeature(SID_DB_APP_PASTE_SPECIAL);
}
void OApplicationController::onCutEntry()
{
}
void OApplicationController::onCopyEntry()
{
Execute(ID_BROWSER_COPY,Sequence<PropertyValue>());
@@ -2344,7 +2340,7 @@ PopupMenu* OApplicationController::getContextMenu( Control& /*_rControl*/ ) cons
IController& OApplicationController::getCommandController()
{
return *static_cast< IApplicationController* >( this );
return *this;
}
::cppu::OInterfaceContainerHelper* OApplicationController::getContextMenuInterceptors()

View File

@@ -20,7 +20,6 @@
#ifndef INCLUDED_DBACCESS_SOURCE_UI_APP_APPCONTROLLER_HXX
#define INCLUDED_DBACCESS_SOURCE_UI_APP_APPCONTROLLER_HXX
#include "IApplicationController.hxx"
#include "AppElementType.hxx"
#include "callbacks.hxx"
#include "commontypes.hxx"
@@ -80,7 +79,8 @@ namespace dbaui
class OApplicationController
:public OGenericUnoController
,public OApplicationController_Base
,public IApplicationController
,public IControlActionListener
,public IContextMenuProvider
{
public:
typedef ::std::vector< css::uno::Reference< css::container::XContainer > > TContainerVector;
@@ -481,18 +481,41 @@ namespace dbaui
*/
void refreshTables();
// IApplicationController
virtual bool onEntryDoubleClick(SvTreeListBox& _rTree) SAL_OVERRIDE;
virtual bool onContainerSelect(ElementType _eType) SAL_OVERRIDE;
virtual void onSelectionChanged() SAL_OVERRIDE;
virtual void onCutEntry() SAL_OVERRIDE;
virtual void onCopyEntry() SAL_OVERRIDE;
virtual void onPasteEntry() SAL_OVERRIDE;
virtual void onDeleteEntry() SAL_OVERRIDE;
virtual void previewChanged( sal_Int32 _nMode) SAL_OVERRIDE;
virtual void containerFound( const css::uno::Reference< css::container::XContainer >& _xContainer) SAL_OVERRIDE;
/** called when an entry in a tree list box has been double-clicked
@param _rTree
The tree list box.
@return
<TRUE/> if the double click event has been handled by the called, and should not
be processed further.
*/
bool onEntryDoubleClick(SvTreeListBox& _rTree);
/** called when a container (category) in the application view has been selected
@param _pTree
The tree list box.
@return
<TRUE/> if the cotainer could be changed otherwise <FALSE/>
*/
bool onContainerSelect(ElementType _eType);
/** called when an entry in a tree view has been selected
@param _pEntry
the selected entry
*/
void onSelectionChanged();
/** called when a "Copy" command is executed in a tree view
*/
void onCopyEntry();
/** called when a "Paste" command is executed in a tree view
*/
void onPasteEntry();
/** called when a "Delete" command is executed in a tree view
*/
void onDeleteEntry();
/// called when the preview mode was changed
void previewChanged( sal_Int32 _nMode);
/// called when an object container of any kind was found during enumerating tree view elements
void containerFound( const css::uno::Reference< css::container::XContainer >& _xContainer);
// IController (base of IApplicationController)
// IController
virtual void executeUnChecked(const css::util::URL& _rCommand, const css::uno::Sequence< css::beans::PropertyValue>& aArgs) SAL_OVERRIDE;
virtual void executeChecked(const css::util::URL& _rCommand, const css::uno::Sequence< css::beans::PropertyValue>& aArgs) SAL_OVERRIDE;
virtual void executeUnChecked(sal_uInt16 _nCommandId, const css::uno::Sequence< css::beans::PropertyValue>& aArgs) SAL_OVERRIDE;
@@ -512,7 +535,7 @@ namespace dbaui
virtual sal_Int8 queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) SAL_OVERRIDE;
virtual sal_Int8 executeDrop( const ExecuteDropEvent& _rEvt ) SAL_OVERRIDE;
// IContextMenuProvider (base of IApplicationController)
// IContextMenuProvider
virtual PopupMenu* getContextMenu( Control& _rControl ) const SAL_OVERRIDE;
virtual IController& getCommandController() SAL_OVERRIDE;
virtual ::cppu::OInterfaceContainerHelper*

View File

@@ -62,8 +62,8 @@
#include <vcl/settings.hxx>
#include <tools/stream.hxx>
#include <rtl/ustrbuf.hxx>
#include "IApplicationController.hxx"
#include "svtools/treelistentry.hxx"
#include "AppController.hxx"
#include <com/sun/star/document/XDocumentProperties.hpp>
@@ -759,7 +759,6 @@ DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, cons
_pTreeView->SetEnterKeyHdl(LINK(this, OAppDetailPageHelper, OnEntryEnterKey));
_pTreeView->SetSelChangeHdl(LINK(this, OAppDetailPageHelper, OnEntrySelChange));
_pTreeView->setCutHandler(LINK(this, OAppDetailPageHelper, OnCutEntry));
_pTreeView->setCopyHandler(LINK(this, OAppDetailPageHelper, OnCopyEntry));
_pTreeView->setPasteHandler(LINK(this, OAppDetailPageHelper, OnPasteEntry));
_pTreeView->setDeleteHandler(LINK(this, OAppDetailPageHelper, OnDeleteEntry));
@@ -920,11 +919,6 @@ IMPL_LINK_NOARG_TYPED(OAppDetailPageHelper, OnEntrySelChange, LinkParamNone*, vo
getBorderWin().getView()->getAppController().onSelectionChanged();
}
IMPL_LINK_NOARG_TYPED( OAppDetailPageHelper, OnCutEntry, LinkParamNone*, void )
{
getBorderWin().getView()->getAppController().onCutEntry();
}
IMPL_LINK_NOARG_TYPED( OAppDetailPageHelper, OnCopyEntry, LinkParamNone*, void )
{
getBorderWin().getView()->getAppController().onCopyEntry();

View File

@@ -155,7 +155,6 @@ namespace dbaui
DECL_LINK_TYPED( OnEntryEnterKey, DBTreeListBox*, void );
DECL_LINK_TYPED( OnEntrySelChange, LinkParamNone*, void );
DECL_LINK_TYPED( OnCutEntry, LinkParamNone*, void );
DECL_LINK_TYPED( OnCopyEntry, LinkParamNone*, void );
DECL_LINK_TYPED( OnPasteEntry, LinkParamNone*, void );
DECL_LINK_TYPED( OnDeleteEntry, LinkParamNone*, void );

View File

@@ -44,9 +44,9 @@
#include "svtools/viewdataentry.hxx"
#include <algorithm>
#include "dbtreelistbox.hxx"
#include "IApplicationController.hxx"
#include "imageprovider.hxx"
#include "comphelper/processfactory.hxx"
#include "AppController.hxx"
using namespace ::dbaui;
using namespace ::com::sun::star::uno;

View File

@@ -27,7 +27,7 @@
#include <vcl/menu.hxx>
#include <vcl/mnemonic.hxx>
#include <vcl/settings.hxx>
#include "IApplicationController.hxx"
#include "AppController.hxx"
using namespace ::dbaui;
using namespace ::com::sun::star::uno;

View File

@@ -43,7 +43,7 @@
#include <dbaccess/IController.hxx>
#include "browserids.hxx"
#include <unotools/pathoptions.hxx>
#include "IApplicationController.hxx"
#include "AppController.hxx"
using namespace ::dbaui;
using namespace ::com::sun::star::uno;
@@ -179,7 +179,7 @@ OApplicationSwapWindow* OAppBorderWindow::getPanel() const
// class OApplicationView
OApplicationView::OApplicationView( vcl::Window* pParent
,const Reference< XComponentContext >& _rxOrb
,IApplicationController& _rAppController
,OApplicationController& _rAppController
,PreviewMode _ePreviewMode
) :
ODataView( pParent, _rAppController, _rxOrb, WB_DIALOGCONTROL )

View File

@@ -37,11 +37,12 @@ class MnemonicGenerator;
namespace dbaui
{
class IApplicationController;
class OApplicationView;
class OApplicationDetailView;
class OApplicationSwapWindow;
class OTitleWindow;
class OApplicationController;
class OAppBorderWindow : public vcl::Window
{
VclPtr<OTitleWindow> m_pPanel;
@@ -81,7 +82,7 @@ namespace dbaui
css::uno::Reference< css::lang::XComponent >
m_xObject;
VclPtr<OAppBorderWindow> m_pWin;
IApplicationController& m_rAppController;
OApplicationController& m_rAppController;
ChildFocusState m_eChildFocus;
IClipboardTest* getActiveChild() const;
@@ -100,7 +101,7 @@ namespace dbaui
public:
OApplicationView( vcl::Window* pParent
,const css::uno::Reference< css::uno::XComponentContext >&
,IApplicationController& _rAppController
,OApplicationController& _rAppController
,PreviewMode _ePreviewMode
);
virtual ~OApplicationView();
@@ -116,7 +117,7 @@ namespace dbaui
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
virtual void GetFocus() SAL_OVERRIDE;
inline IApplicationController& getAppController() const { return m_rAppController; }
inline OApplicationController& getAppController() const { return m_rAppController; }
// IClipboardTest
virtual bool isCutAllowed() SAL_OVERRIDE;

View File

@@ -1,90 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_DBACCESS_SOURCE_UI_APP_IAPPLICATIONCONTROLLER_HXX
#define INCLUDED_DBACCESS_SOURCE_UI_APP_IAPPLICATIONCONTROLLER_HXX
#include <dbaccess/IController.hxx>
#include "AppElementType.hxx"
#include "callbacks.hxx"
class SvTreeListBox;
namespace dbaui
{
class SAL_NO_VTABLE IApplicationController :public IController
,public IControlActionListener
,public IContextMenuProvider
{
public:
/** called when an entry in a tree list box has been double-clicked
@param _rTree
The tree list box.
@return
<TRUE/> if the double click event has been handled by the called, and should not
be processed further.
*/
virtual bool onEntryDoubleClick( SvTreeListBox& _rTree ) = 0;
/** called when a container (category) in the application view has been selected
@param _pTree
The tree list box.
@return
<TRUE/> if the cotainer could be changed otherwise <FALSE/>
*/
virtual bool onContainerSelect(ElementType _eType) = 0;
/** called when an entry in a tree view has been selected
@param _pEntry
the selected entry
*/
virtual void onSelectionChanged() = 0;
/** called when a "Cut" command is executed in a tree view
*/
virtual void onCutEntry() = 0;
/** called when a "Copy" command is executed in a tree view
*/
virtual void onCopyEntry() = 0;
/** called when a "Paste" command is executed in a tree view
*/
virtual void onPasteEntry() = 0;
/** called when a "Delete" command is executed in a tree view
*/
virtual void onDeleteEntry() = 0;
/// called when the preview mode was changed
virtual void previewChanged( sal_Int32 _nMode ) = 0;
/// called when an object container of any kind was found during enumerating tree view elements
virtual void containerFound( const css::uno::Reference< css::container::XContainer >& _xContainer) = 0;
protected:
~IApplicationController() {}
};
} // namespace dbaui
#endif // INCLUDED_DBACCESS_SOURCE_UI_APP_IAPPLICATIONCONTROLLER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */