summaryrefslogtreecommitdiff
path: root/dbaccess/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-24 08:38:42 +0200
committerNoel Grandin <noel@peralex.com>2015-03-24 09:09:32 +0200
commit61831eb81661db2572eaa6cabf7d8eba2c4d842c (patch)
tree0c8403a28e77eff95b478d0ef86b73f97152b92e /dbaccess/source
parent18ef0c66f027440c2d34488f83c02fcfb0a1e75e (diff)
loplugin:constantfunction: dbaccess
Change-Id: I896f2716cb91169e30f555943174b5aa67e74b20
Diffstat (limited to 'dbaccess/source')
-rw-r--r--dbaccess/source/core/dataaccess/bookmarkcontainer.cxx15
-rw-r--r--dbaccess/source/core/dataaccess/bookmarkcontainer.hxx8
-rw-r--r--dbaccess/source/core/misc/DatabaseDataProvider.cxx1
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx27
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.hxx7
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx15
-rw-r--r--dbaccess/source/ui/inc/ConnectionLineAccess.hxx2
-rw-r--r--dbaccess/source/ui/inc/JoinTableView.hxx1
-rw-r--r--dbaccess/source/ui/inc/QueryTextView.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/JoinTableView.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryTextView.cxx16
-rw-r--r--dbaccess/source/ui/querydesign/QueryViewSwitch.cxx6
-rw-r--r--dbaccess/source/ui/uno/dbinteraction.hxx3
14 files changed, 9 insertions, 108 deletions
diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
index 17f28f8ecc34..881fe8b832e0 100644
--- a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
@@ -101,7 +101,6 @@ Sequence< OUString > SAL_CALL OBookmarkContainer::getSupportedServiceNames( ) t
void SAL_CALL OBookmarkContainer::insertByName( const OUString& _rName, const Any& aElement ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException, std::exception)
{
MutexGuard aGuard(m_rMutex);
- checkValid(true);
if (checkExistence(_rName))
throw ElementExistException();
@@ -131,7 +130,6 @@ void SAL_CALL OBookmarkContainer::removeByName( const OUString& _rName ) throw(N
OUString sOldBookmark;
{
MutexGuard aGuard(m_rMutex);
- checkValid(true);
// check the arguments
if (_rName.isEmpty())
@@ -161,7 +159,6 @@ void SAL_CALL OBookmarkContainer::removeByName( const OUString& _rName ) throw(N
void SAL_CALL OBookmarkContainer::replaceByName( const OUString& _rName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException, std::exception)
{
ClearableMutexGuard aGuard(m_rMutex);
- checkValid(true);
// check the arguments
if (_rName.isEmpty())
@@ -211,14 +208,12 @@ void SAL_CALL OBookmarkContainer::removeContainerListener( const Reference< XCon
Type SAL_CALL OBookmarkContainer::getElementType( ) throw (RuntimeException, std::exception)
{
MutexGuard aGuard(m_rMutex);
- checkValid(false);
return ::cppu::UnoType<OUString>::get();
}
sal_Bool SAL_CALL OBookmarkContainer::hasElements( ) throw (RuntimeException, std::exception)
{
MutexGuard aGuard(m_rMutex);
- checkValid(false);
return !m_aBookmarks.empty();
}
@@ -226,7 +221,6 @@ sal_Bool SAL_CALL OBookmarkContainer::hasElements( ) throw (RuntimeException, st
Reference< XEnumeration > SAL_CALL OBookmarkContainer::createEnumeration( ) throw(RuntimeException, std::exception)
{
MutexGuard aGuard(m_rMutex);
- checkValid(false);
return new ::comphelper::OEnumerationByIndex(static_cast<XIndexAccess*>(this));
}
@@ -234,14 +228,12 @@ Reference< XEnumeration > SAL_CALL OBookmarkContainer::createEnumeration( ) thr
sal_Int32 SAL_CALL OBookmarkContainer::getCount( ) throw(RuntimeException, std::exception)
{
MutexGuard aGuard(m_rMutex);
- checkValid(false);
return m_aBookmarks.size();
}
Any SAL_CALL OBookmarkContainer::getByIndex( sal_Int32 _nIndex ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception)
{
MutexGuard aGuard(m_rMutex);
- checkValid(false);
if ((_nIndex < 0) || (_nIndex >= (sal_Int32)m_aBookmarksIndexed.size()))
throw IndexOutOfBoundsException();
@@ -252,7 +244,6 @@ Any SAL_CALL OBookmarkContainer::getByIndex( sal_Int32 _nIndex ) throw(IndexOutO
Any SAL_CALL OBookmarkContainer::getByName( const OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException, std::exception)
{
MutexGuard aGuard(m_rMutex);
- checkValid(false);
if (!checkExistence(_rName))
throw NoSuchElementException();
@@ -263,7 +254,6 @@ Any SAL_CALL OBookmarkContainer::getByName( const OUString& _rName ) throw(NoSuc
Sequence< OUString > SAL_CALL OBookmarkContainer::getElementNames( ) throw(RuntimeException, std::exception)
{
MutexGuard aGuard(m_rMutex);
- checkValid(false);
Sequence< OUString > aNames(m_aBookmarks.size());
OUString* pNames = aNames.getArray();
@@ -282,7 +272,6 @@ Sequence< OUString > SAL_CALL OBookmarkContainer::getElementNames( ) throw(Runt
sal_Bool SAL_CALL OBookmarkContainer::hasByName( const OUString& _rName ) throw(RuntimeException, std::exception)
{
MutexGuard aGuard(m_rMutex);
- checkValid(false);
return checkExistence(_rName);
}
@@ -332,10 +321,6 @@ void OBookmarkContainer::implReplace(const OUString& _rName, const OUString& _rN
m_aBookmarks[_rName] = _rNewLink;
}
-void OBookmarkContainer::checkValid(bool /*_bIntendWriteAccess*/) const throw (RuntimeException, DisposedException)
-{
-}
-
Reference< XInterface > SAL_CALL OBookmarkContainer::getParent( ) throw (RuntimeException, std::exception)
{
return m_rParent;
diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx
index f9c44648fe9b..b14bfbd9b24e 100644
--- a/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx
+++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx
@@ -130,14 +130,6 @@ public:
void dispose();
protected:
- /** checks whether the object is basically alive, i.e. it has been fully initialized (@see initialize) and
- not disposed (@see dispose)
- @param _bIntendWriteAccess determines whether or not the caller intends to modify the configuration.
- if sal_True and the configuration is readonly, a runtime exception with
- a description string is thrown.
- */
- void checkValid(bool _bIntendWriteAccess) const throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::DisposedException);
-
/** quickly checks if there already is an element with a given name. No access to the configuration occurs, i.e.
if there is such an object which is not already loaded, it won't be loaded now.
@param _rName the object name to check
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index d0309308be96..1b256dc3e4cd 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -88,7 +88,6 @@ DatabaseDataProvider::DatabaseDataProvider(uno::Reference< uno::XComponentContex
void SAL_CALL DatabaseDataProvider::disposing()
{
lang::EventObject aEvt(static_cast<XWeak*>(this));
- m_aParameterManager.disposing( aEvt );
m_aParameterManager.dispose(); // (to free any references it may have to me)
m_aFilterManager.dispose(); // (dito)
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 5ce1a69806dc..31b2691f2dd6 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -512,33 +512,6 @@ sal_Int32 OAppDetailPageHelper::getElementCount()
return nCount;
}
-bool OAppDetailPageHelper::isCutAllowed()
-{
- return false;
-}
-
-bool OAppDetailPageHelper::isCopyAllowed()
-{
- return true;
-}
-
-bool OAppDetailPageHelper::isPasteAllowed()
-{
- return true;
-}
-
-void OAppDetailPageHelper::copy()
-{
-}
-
-void OAppDetailPageHelper::cut()
-{
-}
-
-void OAppDetailPageHelper::paste()
-{
-}
-
bool OAppDetailPageHelper::isLeaf(SvTreeListEntry* _pEntry) const
{
if ( !_pEntry )
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
index e4ad394d5f7b..fb86bdd3f050 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
@@ -174,13 +174,6 @@ namespace dbaui
virtual void Resize() SAL_OVERRIDE;
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
- bool isCutAllowed();
- bool isCopyAllowed();
- bool isPasteAllowed();
- void copy();
- void cut();
- void paste();
-
/** creates the tables page
@param _xConnection
The connection to get the table names
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index 59095b637a38..9d15ea495e8f 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -818,24 +818,21 @@ SvTreeListEntry* OApplicationDetailView::getEntry( const Point& _aPoint ) const
bool OApplicationDetailView::isCutAllowed()
{
- return m_pControlHelper->isCutAllowed();
+ return false;
}
bool OApplicationDetailView::isCopyAllowed()
{
- return m_pControlHelper->isCopyAllowed();
+ return true;
}
-bool OApplicationDetailView::isPasteAllowed() { return m_pControlHelper->isPasteAllowed(); }
+bool OApplicationDetailView::isPasteAllowed() { return true; }
-void OApplicationDetailView::copy() { m_pControlHelper->copy(); }
+void OApplicationDetailView::copy() { }
-void OApplicationDetailView::cut() { m_pControlHelper->cut(); }
+void OApplicationDetailView::cut() { }
-void OApplicationDetailView::paste()
-{
- m_pControlHelper->paste();
-}
+void OApplicationDetailView::paste() { }
SvTreeListEntry* OApplicationDetailView::elementAdded(ElementType _eType,const OUString& _rName, const Any& _rObject )
{
diff --git a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
index f74c18b11bdb..ce3451097408 100644
--- a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
+++ b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
@@ -86,8 +86,6 @@ namespace dbaui
virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
bool SAL_CALL isShowing( ) throw (::com::sun::star::uno::RuntimeException);
- bool SAL_CALL isVisible( ) throw (::com::sun::star::uno::RuntimeException);
- bool SAL_CALL isFocusTraversable( ) throw (::com::sun::star::uno::RuntimeException);
// XAccessibleRelationSet
virtual sal_Int32 SAL_CALL getRelationCount( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx
index 39c6fb3ffed4..f43cdd254baf 100644
--- a/dbaccess/source/ui/inc/JoinTableView.hxx
+++ b/dbaccess/source/ui/inc/JoinTableView.hxx
@@ -226,7 +226,6 @@ namespace dbaui
virtual bool PreNotify(NotifyEvent& rNEvt) SAL_OVERRIDE;
// DnD stuff
- void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) SAL_OVERRIDE;
virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/inc/QueryTextView.hxx b/dbaccess/source/ui/inc/QueryTextView.hxx
index 8155cc188fa2..a45eefb93a12 100644
--- a/dbaccess/source/ui/inc/QueryTextView.hxx
+++ b/dbaccess/source/ui/inc/QueryTextView.hxx
@@ -36,8 +36,6 @@ namespace dbaui
virtual void GetFocus() SAL_OVERRIDE;
bool isCutAllowed();
- bool isPasteAllowed();
- bool isCopyAllowed();
void copy();
void cut();
void paste();
@@ -45,8 +43,6 @@ namespace dbaui
void clear();
// set the view readonly or not
void setReadOnly(bool _bReadOnly);
- // check if the statement is correct when not returning false
- bool checkStatement();
// set the statement for representation
void setStatement(const OUString& _rsStatement);
OUString getStatement();
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
index 335ff098515c..0ea77ec75f26 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
@@ -144,14 +144,6 @@ namespace dbaui
::osl::MutexGuard aGuard( m_aMutex );
return m_pLine ? m_pLine->GetParent()->GetWindowRegionPixel().IsInside(m_pLine->GetBoundingRect()) : sal_False;
}
- bool SAL_CALL OConnectionLineAccess::isVisible( ) throw (RuntimeException)
- {
- return true;
- }
- bool SAL_CALL OConnectionLineAccess::isFocusTraversable( ) throw (RuntimeException)
- {
- return true;
- }
// XAccessibleRelationSet
sal_Int32 SAL_CALL OConnectionLineAccess::getRelationCount( ) throw (RuntimeException, std::exception)
{
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index a84153ce5594..fda33fa98feb 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -1500,10 +1500,6 @@ void OJoinTableView::dragFinished( )
{
}
-void OJoinTableView::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ )
-{
-}
-
void OJoinTableView::clearLayoutInformation()
{
m_pLastFocusTabWin = NULL;
diff --git a/dbaccess/source/ui/querydesign/QueryTextView.cxx b/dbaccess/source/ui/querydesign/QueryTextView.cxx
index eca9e830f14a..162eb9b93502 100644
--- a/dbaccess/source/ui/querydesign/QueryTextView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTextView.cxx
@@ -68,12 +68,6 @@ void OQueryTextView::Resize()
m_pEdit->SetSizePixel( GetOutputSizePixel() );
}
-// check if the statement is correct when not returning false
-bool OQueryTextView::checkStatement()
-{
- return true;
-}
-
OUString OQueryTextView::getStatement()
{
return m_pEdit->GetText();
@@ -110,16 +104,6 @@ bool OQueryTextView::isCutAllowed()
return !m_pEdit->GetSelected().isEmpty();
}
-bool OQueryTextView::isPasteAllowed()
-{
- return true;
-}
-
-bool OQueryTextView::isCopyAllowed()
-{
- return true;
-}
-
void OQueryTextView::cut()
{
if(!m_pEdit->IsInAccelAct() )
diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
index e506dbeddbbd..dd450117a89d 100644
--- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
+++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
@@ -77,7 +77,7 @@ void OQueryViewSwitch::resizeDocumentView(Rectangle& _rPlayground)
bool OQueryViewSwitch::checkStatement()
{
if(m_pTextView->IsVisible())
- return m_pTextView->checkStatement();
+ return true;
return m_pDesignView->checkStatement();
}
@@ -138,14 +138,14 @@ bool OQueryViewSwitch::isCutAllowed()
bool OQueryViewSwitch::isCopyAllowed()
{
if(m_pTextView->IsVisible())
- return m_pTextView->isCopyAllowed();
+ return true;
return m_pDesignView->isCopyAllowed();
}
bool OQueryViewSwitch::isPasteAllowed()
{
if(m_pTextView->IsVisible())
- return m_pTextView->isPasteAllowed();
+ return true;
return m_pDesignView->isPasteAllowed();
}
diff --git a/dbaccess/source/ui/uno/dbinteraction.hxx b/dbaccess/source/ui/uno/dbinteraction.hxx
index 0b698c74b640..56685e970a97 100644
--- a/dbaccess/source/ui/uno/dbinteraction.hxx
+++ b/dbaccess/source/ui/uno/dbinteraction.hxx
@@ -73,9 +73,6 @@ namespace dbaui
const bool i_bFallbackToGeneric
);
- // XInitialization
- void SAL_CALL initialize( com::sun::star::uno::Sequence< com::sun::star::uno::Any > const & /*rArguments*/) throw (com::sun::star::uno::Exception) {}
-
// XInteractionHandler2
virtual sal_Bool SAL_CALL handleInteractionRequest( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& Request ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;