[Libreoffice-commits] core.git: 8 commits - accessibility/inc basctl/source basic/source chart2/source comphelper/source compilerplugins/clang cui/source dbaccess/source
Noel Grandin
noel at peralex.com
Mon Jan 11 00:49:57 PST 2016
accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx | 1
accessibility/inc/accessibility/extended/AccessibleGridControl.hxx | 1
basctl/source/basicide/baside2.cxx | 47 +++-------
basctl/source/basicide/baside2.hxx | 22 ++--
basctl/source/basicide/baside2b.cxx | 10 --
basctl/source/basicide/baside3.cxx | 11 --
basctl/source/basicide/bastype2.cxx | 13 --
basctl/source/basicide/scriptdocument.cxx | 4
basctl/source/dlged/dlgedfunc.cxx | 24 +----
basctl/source/dlged/dlgedobj.cxx | 6 -
basctl/source/inc/baside3.hxx | 4
basctl/source/inc/bastype2.hxx | 2
basctl/source/inc/dlgedfunc.hxx | 12 +-
basctl/source/inc/dlgedobj.hxx | 2
basctl/source/inc/scriptdocument.hxx | 2
basic/source/classes/sbunoobj.cxx | 4
basic/source/comp/buffer.cxx | 25 +----
basic/source/inc/buffer.hxx | 8 -
basic/source/inc/sbunoobj.hxx | 2
basic/source/sbx/sbxdec.cxx | 3
basic/source/sbx/sbxdec.hxx | 2
chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx | 5 -
chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx | 2
chart2/source/controller/dialogs/ChartTypeDialogController.cxx | 3
chart2/source/controller/dialogs/ChartTypeDialogController.hxx | 2
chart2/source/controller/dialogs/DataBrowser.cxx | 6 -
chart2/source/controller/dialogs/DataBrowser.hxx | 3
chart2/source/controller/dialogs/DialogModel.cxx | 7 -
chart2/source/controller/dialogs/DialogModel.hxx | 2
chart2/source/controller/dialogs/res_ErrorBar.cxx | 4
chart2/source/controller/inc/res_ErrorBar.hxx | 2
chart2/source/inc/CloneHelper.hxx | 19 ----
chart2/source/inc/CommonFunctors.hxx | 40 --------
chart2/source/inc/LifeTime.hxx | 2
chart2/source/inc/PropertyHelper.hxx | 27 -----
chart2/source/inc/chartview/DrawModelWrapper.hxx | 1
chart2/source/tools/LifeTime.cxx | 5 -
chart2/source/view/main/DrawModelWrapper.cxx | 4
comphelper/source/misc/instancelocker.cxx | 6 -
comphelper/source/misc/instancelocker.hxx | 2
compilerplugins/clang/plugin.cxx | 6 -
compilerplugins/clang/unusedmethods.cxx | 38 ++++++--
compilerplugins/clang/unusedmethods.py | 47 +++++++++-
cui/source/customize/cfg.cxx | 19 ----
cui/source/dialogs/SpellDialog.cxx | 5 -
cui/source/dialogs/cuihyperdlg.cxx | 3
cui/source/dialogs/hangulhanjadlg.cxx | 6 -
cui/source/dialogs/iconcdlg.cxx | 7 -
cui/source/inc/SpellDialog.hxx | 2
cui/source/inc/cfg.hxx | 10 +-
cui/source/inc/cuihyperdlg.hxx | 2
cui/source/inc/cuitabline.hxx | 4
cui/source/inc/iconcdlg.hxx | 5 -
cui/source/inc/swpossizetabpage.hxx | 2
cui/source/options/dbregistersettings.hxx | 4
cui/source/options/optaboutconfig.cxx | 7 -
cui/source/options/optaboutconfig.hxx | 2
cui/source/tabpages/swpossizetabpage.cxx | 4
cui/source/tabpages/tpline.cxx | 4
cui/source/tabpages/tplneend.cxx | 5 -
dbaccess/source/core/api/RowSet.cxx | 6 -
dbaccess/source/core/api/RowSet.hxx | 9 -
dbaccess/source/core/api/RowSetCache.cxx | 8 -
dbaccess/source/core/api/RowSetCache.hxx | 2
dbaccess/source/core/api/RowSetCacheIterator.cxx | 32 ------
dbaccess/source/core/api/RowSetCacheIterator.hxx | 4
dbaccess/source/core/api/RowSetRow.hxx | 23 ----
dbaccess/source/core/dataaccess/commanddefinition.hxx | 1
dbaccess/source/core/dataaccess/documentdefinition.cxx | 12 +-
dbaccess/source/core/dataaccess/documentdefinition.hxx | 2
dbaccess/source/ext/macromigration/macromigrationpages.cxx | 5 -
dbaccess/source/ext/macromigration/macromigrationpages.hxx | 3
dbaccess/source/ext/macromigration/migrationengine.cxx | 14 +-
dbaccess/source/inc/dsntypes.hxx | 4
dbaccess/source/ui/browser/sbagrid.cxx | 5 -
dbaccess/source/ui/control/RelationControl.cxx | 4
dbaccess/source/ui/dlg/UserAdminDlg.cxx | 4
dbaccess/source/ui/dlg/adminpages.hxx | 12 +-
dbaccess/source/ui/dlg/advancedsettings.cxx | 4
dbaccess/source/ui/dlg/dbadmin.cxx | 4
dbaccess/source/ui/dlg/dbwiz.cxx | 3
dbaccess/source/ui/dlg/dbwizsetup.cxx | 3
dbaccess/source/ui/inc/ConnectionLineData.hxx | 2
dbaccess/source/ui/inc/IItemSetHelper.hxx | 2
dbaccess/source/ui/inc/JoinTableView.hxx | 3
dbaccess/source/ui/inc/RelationControl.hxx | 2
dbaccess/source/ui/inc/TableConnection.hxx | 4
dbaccess/source/ui/inc/TableConnectionData.hxx | 2
dbaccess/source/ui/inc/TableFieldDescription.hxx | 1
dbaccess/source/ui/inc/TypeInfo.hxx | 2
dbaccess/source/ui/inc/UserAdminDlg.hxx | 2
dbaccess/source/ui/inc/advancedsettingsdlg.hxx | 2
dbaccess/source/ui/inc/charsets.hxx | 4
dbaccess/source/ui/inc/dbadmin.hxx | 2
dbaccess/source/ui/inc/dbwiz.hxx | 2
dbaccess/source/ui/inc/dbwizsetup.hxx | 2
dbaccess/source/ui/inc/querycontainerwindow.hxx | 2
dbaccess/source/ui/inc/querycontroller.hxx | 2
dbaccess/source/ui/inc/sbagrid.hxx | 2
dbaccess/source/ui/querydesign/ConnectionLineData.cxx | 3
dbaccess/source/ui/querydesign/JoinTableView.cxx | 6 -
dbaccess/source/ui/querydesign/TableConnection.cxx | 7 -
dbaccess/source/ui/querydesign/TableConnectionData.cxx | 11 +-
dbaccess/source/ui/querydesign/TableFieldDescription.cxx | 15 ---
dbaccess/source/ui/querydesign/querycontroller.cxx | 3
dbaccess/source/ui/tabledesign/TEditControl.cxx | 12 +-
dbaccess/source/ui/tabledesign/TEditControl.hxx | 4
107 files changed, 261 insertions(+), 531 deletions(-)
New commits:
commit 86bb6fdf9cf14342bcf8ee72aa3233dd9dee1b3a
Author: Noel Grandin <noel at peralex.com>
Date: Mon Jan 11 08:41:55 2016 +0200
update unusedmethods loplugin to update unused return values
Change-Id: I825d022d09282bc9b6cffd9178e40e4090d335da
diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx
index 2f45e4f..9beca11 100644
--- a/compilerplugins/clang/plugin.cxx
+++ b/compilerplugins/clang/plugin.cxx
@@ -61,8 +61,8 @@ const Stmt* Plugin::parentStmt( const Stmt* stmt )
{
if( parents.empty())
buildParents( compiler );
-if(parents.count(stmt)!=1)stmt->dump();
- assert( parents.count( stmt ) == 1 );
+ //if(parents.count(stmt)!=1)stmt->dump();
+ //assert( parents.count( stmt ) == 1 );
return parents[ stmt ];
}
@@ -70,7 +70,7 @@ Stmt* Plugin::parentStmt( Stmt* stmt )
{
if( parents.empty())
buildParents( compiler );
- assert( parents.count( stmt ) == 1 );
+ //assert( parents.count( stmt ) == 1 );
return const_cast< Stmt* >( parents[ stmt ] );
}
diff --git a/compilerplugins/clang/unusedmethods.cxx b/compilerplugins/clang/unusedmethods.cxx
index 8df3326..c74bfed 100644
--- a/compilerplugins/clang/unusedmethods.cxx
+++ b/compilerplugins/clang/unusedmethods.cxx
@@ -59,6 +59,7 @@ struct MyFuncInfo
// try to limit the voluminous output a little
static std::set<MyFuncInfo> callSet;
+static std::set<MyFuncInfo> usedReturnSet;
static std::set<MyFuncInfo> definitionSet;
@@ -82,6 +83,8 @@ public:
std::string output;
for (const MyFuncInfo & s : callSet)
output += "call:\t" + s.returnType + "\t" + s.nameAndParams + "\n";
+ for (const MyFuncInfo & s : usedReturnSet)
+ output += "usedReturn:\t" + s.returnType + "\t" + s.nameAndParams + "\n";
for (const MyFuncInfo & s : definitionSet)
{
//treat all UNO interfaces as having been called, since they are part of our external ABI
@@ -100,7 +103,7 @@ public:
bool VisitFunctionDecl( const FunctionDecl* decl );
bool VisitDeclRefExpr( const DeclRefExpr* );
private:
- void logCallToRootMethods(const FunctionDecl* functionDecl);
+ void logCallToRootMethods(const FunctionDecl* functionDecl, std::set<MyFuncInfo>& funcSet);
MyFuncInfo niceName(const FunctionDecl* functionDecl);
std::string fullyQualifiedName(const FunctionDecl* functionDecl);
};
@@ -172,7 +175,7 @@ std::string UnusedMethods::fullyQualifiedName(const FunctionDecl* functionDecl)
return ret;
}
-void UnusedMethods::logCallToRootMethods(const FunctionDecl* functionDecl)
+void UnusedMethods::logCallToRootMethods(const FunctionDecl* functionDecl, std::set<MyFuncInfo>& funcSet)
{
functionDecl = functionDecl->getCanonicalDecl();
bool bCalledSuperMethod = false;
@@ -183,7 +186,7 @@ void UnusedMethods::logCallToRootMethods(const FunctionDecl* functionDecl)
for(CXXMethodDecl::method_iterator it = methodDecl->begin_overridden_methods();
it != methodDecl->end_overridden_methods(); ++it)
{
- logCallToRootMethods(*it);
+ logCallToRootMethods(*it, funcSet);
bCalledSuperMethod = true;
}
}
@@ -191,7 +194,7 @@ void UnusedMethods::logCallToRootMethods(const FunctionDecl* functionDecl)
{
while (functionDecl->getTemplateInstantiationPattern())
functionDecl = functionDecl->getTemplateInstantiationPattern();
- callSet.insert(niceName(functionDecl));
+ funcSet.insert(niceName(functionDecl));
}
}
@@ -227,7 +230,29 @@ gotfunc:
if (traversedFunctionSet.insert(fullyQualifiedName(calleeFunctionDecl)).second)
TraverseFunctionDecl(calleeFunctionDecl);
- logCallToRootMethods(calleeFunctionDecl);
+ logCallToRootMethods(calleeFunctionDecl, callSet);
+
+ if (calleeFunctionDecl->getReturnType()->isVoidType()) {
+ return true;
+ }
+ const Stmt* parent = parentStmt(expr);
+ if (!parent) {
+ return true;
+ }
+ if (isa<Expr>(parent) || isa<ReturnStmt>(parent) || isa<DeclStmt>(parent)
+ || isa<IfStmt>(parent) || isa<SwitchStmt>(parent) || isa<ForStmt>(parent)
+ || isa<WhileStmt>(parent) || isa<DoStmt>(parent)
+ || isa<CXXForRangeStmt>(parent))
+ {
+ logCallToRootMethods(calleeFunctionDecl, usedReturnSet);
+ return true;
+ }
+ if (isa<CompoundStmt>(parent) || isa<DefaultStmt>(parent) || isa<CaseStmt>(parent)
+ || isa<LabelStmt>(parent))
+ {
+ return true;
+ }
+ parent->dump();
return true;
}
@@ -267,7 +292,8 @@ bool UnusedMethods::VisitDeclRefExpr( const DeclRefExpr* declRefExpr )
if (!isa<FunctionDecl>(functionDecl)) {
return true;
}
- logCallToRootMethods(dyn_cast<FunctionDecl>(functionDecl)->getCanonicalDecl());
+ logCallToRootMethods(dyn_cast<FunctionDecl>(functionDecl)->getCanonicalDecl(), callSet);
+ logCallToRootMethods(dyn_cast<FunctionDecl>(functionDecl)->getCanonicalDecl(), usedReturnSet);
return true;
}
diff --git a/compilerplugins/clang/unusedmethods.py b/compilerplugins/clang/unusedmethods.py
index 0c2cdff..aca8591 100755
--- a/compilerplugins/clang/unusedmethods.py
+++ b/compilerplugins/clang/unusedmethods.py
@@ -7,6 +7,7 @@ import io
definitionSet = set()
definitionToSourceLocationMap = dict()
callSet = set()
+returnSet = set()
sourceLocationSet = set()
# things we need to exclude for reasons like :
# - it's a weird template thingy that confuses the plugin
@@ -125,6 +126,9 @@ with io.open(sys.argv[1], "rb", buffering=1024*1024) as txt:
elif line.startswith("call:\t"):
idx1 = line.find("\t",6)
callSet.add((normalizeTypeParams(line[6:idx1]), normalizeTypeParams(line[idx1+1:].strip())))
+ elif line.startswith("usedReturn:\t"):
+ idx1 = line.find("\t",12)
+ returnSet.add((normalizeTypeParams(line[12:idx1]), normalizeTypeParams(line[idx1+1:].strip())))
# Invert the definitionToSourceLocationMap
# If we see more than one method at the same sourceLocation, it's being autogenerated as part of a template
@@ -138,6 +142,10 @@ for k, definitions in sourceLocationToDefinitionMap.iteritems():
for d in definitions:
definitionSet.remove(d)
+# -------------------------------------------
+# Do the "unused methods" part
+# -------------------------------------------
+
tmp1set = set()
for d in definitionSet:
clazz = d[0] + " " + d[1]
@@ -228,11 +236,44 @@ def natural_sort_key(s, _nsre=re.compile('([0-9]+)')):
tmp1list = sorted(tmp1set, key=lambda v: natural_sort_key(v[1]))
# print out the results
-for t in tmp1list:
- print t[1]
- print " ", t[0]
+#for t in tmp1list:
+# print t[1]
+# print " ", t[0]
+
+
+# -------------------------------------------
+# Do the "unused return types" part
+# -------------------------------------------
+
+tmp2set = set()
+for d in definitionSet:
+ clazz = d[0] + " " + d[1]
+ if clazz in exclusionSet:
+ continue
+ if d in returnSet:
+ continue
+ if d[0] == "void":
+ continue
+ # ignore UNO constructor method entrypoints
+ if "_get_implementation" in d[1]:
+ continue
+ # the plugin can't see calls to these
+ if "operator new" in d[1]:
+ continue
+ # unused return type is not a problem here
+ if "operator=(" in d[1]:
+ continue
+ # ignore external code
+ if definitionToSourceLocationMap[d].startswith("external/"):
+ continue
+ tmp2set.add((clazz, definitionToSourceLocationMap[d]))
+# sort results by name and line number
+tmp2list = sorted(tmp2set, key=lambda v: natural_sort_key(v[1]))
+for t in tmp2list:
+ print t[1]
+ print " ", t[0]
# add an empty line at the end to make it easier for the unusedmethodsremove plugin to mmap() the output file
print
commit f7c23897a354d9856ecaa5f7252520a350229bfa
Author: Noel Grandin <noel at peralex.com>
Date: Mon Jan 11 08:40:36 2016 +0200
loplugin:unusedmethods unused return value in dbaccess
Change-Id: Ia7ec0209a635f8482b6ccbaa7ba48a8c6da79090
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 9487dfe..58e4508 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -2269,12 +2269,12 @@ void ORowSet::impl_resetTables_nothrow()
DELETEZ( m_pTables );
}
-bool ORowSet::impl_initComposer_throw( OUString& _out_rCommandToExecute )
+void ORowSet::impl_initComposer_throw( OUString& _out_rCommandToExecute )
{
bool bUseEscapeProcessing = impl_buildActiveCommand_throw( );
_out_rCommandToExecute = m_aActiveCommand;
if ( !bUseEscapeProcessing )
- return bUseEscapeProcessing;
+ return;
if (m_bCommandFacetsDirty)
m_xComposer = nullptr;
@@ -2319,8 +2319,6 @@ bool ORowSet::impl_initComposer_throw( OUString& _out_rCommandToExecute )
_out_rCommandToExecute = m_xComposer->getQueryWithSubstitution();
m_bCommandFacetsDirty = false;
-
- return bUseEscapeProcessing;
}
bool ORowSet::impl_buildActiveCommand_throw()
diff --git a/dbaccess/source/core/api/RowSet.hxx b/dbaccess/source/core/api/RowSet.hxx
index f8d52df..75822a4 100644
--- a/dbaccess/source/core/api/RowSet.hxx
+++ b/dbaccess/source/core/api/RowSet.hxx
@@ -156,13 +156,6 @@ namespace dbaccess
The command which is to be executed, according to the current settings -
it is built from our active command plus our current filter/order criterions.
- @return
- whether we should use escape processing before executing the actual command. This is determined
- from our own EscapeProcessing property, and possibly overruled by the respective property
- of a query we're based on.
- Effectively, this value determines whether or not we actually have an composer (m_xComposer)
- and dependent information (such as the parameters container).
-
@precond
m_xActiveConnection points to a valid SDB-level connection
@@ -172,7 +165,7 @@ namespace dbaccess
@throws css::uno::RuntimeException
if any of the components involved throws a css::uno::RuntimeException
*/
- bool impl_initComposer_throw( OUString& _out_rCommandToExecute );
+ void impl_initComposer_throw( OUString& _out_rCommandToExecute );
/** returns the table container of our active connection
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index 1ba973c..f1b81a1 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -834,7 +834,7 @@ bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos, sal_Int32 &_nNewEndPos)
// If m_nPosition is out of the current window,
// move it and update m_nStartPos and m_nEndPos
// Caller is responsible for updating m_aMatrixIter
-bool ORowSetCache::moveWindow()
+void ORowSetCache::moveWindow()
{
OSL_ENSURE(m_nStartPos >= 0,"ORowSetCache::moveWindow: m_nStartPos is less than 0!");
OSL_ENSURE(m_nEndPos >= m_nStartPos,"ORowSetCache::moveWindow: m_nStartPos not smaller than m_nEndPos");
@@ -870,7 +870,7 @@ bool ORowSetCache::moveWindow()
m_bRowCountFinal = true;
}
}
- return true;
+ return;
}
bool bRet = true;
@@ -958,7 +958,7 @@ bool ORowSetCache::moveWindow()
else
{ // normally this should never happen
OSL_FAIL("What the hell is happen here!");
- return false;
+ return;
}
}
else
@@ -1084,8 +1084,6 @@ bool ORowSetCache::moveWindow()
OSL_ENSURE(m_nStartPos >= 0,"ORowSetCache::moveWindow: m_nStartPos is less than 0!");
OSL_ENSURE(m_nEndPos > m_nStartPos,"ORowSetCache::moveWindow: m_nStartPos not smaller than m_nEndPos");
OSL_ENSURE(m_nEndPos-m_nStartPos <= m_nFetchSize,"ORowSetCache::moveWindow: m_nStartPos and m_nEndPos too far apart");
-
- return bRet;
}
bool ORowSetCache::first( )
diff --git a/dbaccess/source/core/api/RowSetCache.hxx b/dbaccess/source/core/api/RowSetCache.hxx
index a8eeaa0..a41aaf7 100644
--- a/dbaccess/source/core/api/RowSetCache.hxx
+++ b/dbaccess/source/core/api/RowSetCache.hxx
@@ -97,7 +97,7 @@ namespace dbaccess
bool fill(ORowSetMatrix::iterator& _aIter, const ORowSetMatrix::const_iterator& _aEnd, sal_Int32& _nPos, bool _bCheck);
bool reFillMatrix(sal_Int32 _nNewStartPos,sal_Int32 nNewEndPos);
bool fillMatrix(sal_Int32 &_nNewStartPos,sal_Int32 &_nNewEndPos);
- bool moveWindow();
+ void moveWindow();
void rotateCacheIterator(ORowSetMatrix::difference_type _nDist);
void updateValue(sal_Int32 columnIndex
diff --git a/dbaccess/source/core/api/RowSetCacheIterator.cxx b/dbaccess/source/core/api/RowSetCacheIterator.cxx
index dc4bf72..bc1c915 100644
--- a/dbaccess/source/core/api/RowSetCacheIterator.cxx
+++ b/dbaccess/source/core/api/RowSetCacheIterator.cxx
@@ -57,38 +57,11 @@ ORowSetRow& ORowSetCacheIterator::operator *()
return *m_aIter->second.aIterator;
}
-const ORowSetRow& ORowSetCacheIterator::operator *() const
-{
- if ( !m_pRowSet->isInsertRow() && m_aIter->second.aIterator == m_pCache->m_pMatrix->end() )
- {
- OSL_ENSURE(m_aIter->second.aBookmark.hasValue(),"bookmark has no value!");
- OSL_VERIFY(m_pCache->moveToBookmark(m_aIter->second.aBookmark));
- m_aIter->second.aIterator = m_pCache->m_aMatrixIter;
- }
- return *m_aIter->second.aIterator;
-}
-
ORowSetMatrix::iterator& ORowSetCacheIterator::operator ->()
{
return m_aIter->second.aIterator;
}
-const ORowSetMatrix::iterator& ORowSetCacheIterator::operator ->() const
-{
- if ( !m_pRowSet->isInsertRow() && m_aIter->second.aIterator == m_pCache->m_pMatrix->end() )
- {
- OSL_ENSURE(m_aIter->second.aBookmark.hasValue(),"bookmark has no value!");
- OSL_VERIFY(m_pCache->moveToBookmark(m_aIter->second.aBookmark));
- m_aIter->second.aIterator = m_pCache->m_aMatrixIter;
- }
- return m_aIter->second.aIterator;
-}
-
-bool ORowSetCacheIterator::operator <=(const ORowSetMatrix::iterator& _rRH) const
-{
- return m_aIter->second.aIterator <= _rRH;
-}
-
bool ORowSetCacheIterator::operator <(const ORowSetMatrix::iterator& _rRH) const
{
return m_aIter->second.aIterator < _rRH;
@@ -99,11 +72,6 @@ bool ORowSetCacheIterator::operator !=(const ORowSetMatrix::iterator& _rRH) cons
return m_aIter->second.aIterator != _rRH;
}
-bool ORowSetCacheIterator::operator ==(const ORowSetMatrix::iterator& _rRH) const
-{
- return m_aIter->second.aIterator == _rRH;
-}
-
void ORowSetCacheIterator::setBookmark(const css::uno::Any& _rBookmark)
{
m_aIter->second.aBookmark = _rBookmark;
diff --git a/dbaccess/source/core/api/RowSetCacheIterator.hxx b/dbaccess/source/core/api/RowSetCacheIterator.hxx
index 2f386cd..43bc253 100644
--- a/dbaccess/source/core/api/RowSetCacheIterator.hxx
+++ b/dbaccess/source/core/api/RowSetCacheIterator.hxx
@@ -61,15 +61,11 @@ namespace dbaccess
operator ORowSetMatrix::iterator();
ORowSetRow& operator *();
- const ORowSetRow& operator *() const;
ORowSetMatrix::iterator& operator ->();
- const ORowSetMatrix::iterator& operator ->() const;
- bool operator <=(const ORowSetMatrix::iterator& _rRH) const;
bool operator <(const ORowSetMatrix::iterator& _rRH) const;
bool operator !=(const ORowSetMatrix::iterator& _rRH) const;
- bool operator ==(const ORowSetMatrix::iterator& _rRH) const;
void setBookmark(const css::uno::Any& _rBookmark);
diff --git a/dbaccess/source/core/api/RowSetRow.hxx b/dbaccess/source/core/api/RowSetRow.hxx
index 2f23b03..604c1df 100644
--- a/dbaccess/source/core/api/RowSetRow.hxx
+++ b/dbaccess/source/core/api/RowSetRow.hxx
@@ -50,29 +50,6 @@ namespace dbaccess
typedef ::rtl::Reference< ORowSetOldRowHelper > TORowSetOldRowHelperRef;
- class ORowSetValueCompare
- {
- const css::uno::Any& m_rAny;
- public:
- explicit ORowSetValueCompare(const css::uno::Any& _rAny) : m_rAny(_rAny){}
-
- bool operator ()(const ORowSetRow& _rRH)
- {
- switch((_rRH->get())[0].getTypeKind())
- {
- case css::sdbc::DataType::TINYINT:
- case css::sdbc::DataType::SMALLINT:
- case css::sdbc::DataType::INTEGER:
- return comphelper::getINT32(m_rAny) == (sal_Int32)(_rRH->get())[0];
- default:
- {
- css::uno::Sequence<sal_Int8> aSeq;
- m_rAny >>= aSeq;
- return aSeq == (_rRH->get())[0];
- }
- }
- }
- };
}
#endif // INCLUDED_DBACCESS_SOURCE_CORE_API_ROWSETROW_HXX
diff --git a/dbaccess/source/core/dataaccess/commanddefinition.hxx b/dbaccess/source/core/dataaccess/commanddefinition.hxx
index d885b27..60a8563 100644
--- a/dbaccess/source/core/dataaccess/commanddefinition.hxx
+++ b/dbaccess/source/core/dataaccess/commanddefinition.hxx
@@ -58,7 +58,6 @@ class OCommandDefinition : public OComponentDefinition
protected:
virtual ~OCommandDefinition();
- inline const OCommandDefinition_Impl& getCommandDefinition() const { return dynamic_cast< const OCommandDefinition_Impl& >( *m_pImpl.get() ); }
inline OCommandDefinition_Impl& getCommandDefinition() { return dynamic_cast< OCommandDefinition_Impl& >( *m_pImpl.get() ); }
public:
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index c2c496d..9a1732f 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -1299,18 +1299,19 @@ bool ODocumentDefinition::save(bool _bApprove)
return true;
}
-bool ODocumentDefinition::saveAs()
+void ODocumentDefinition::saveAs()
{
// default handling: instantiate an interaction handler and let it handle the parameter request
if ( !m_bOpenInDesign )
- return false;
+ return;
{
osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex );
if ( m_pImpl->m_aProps.aTitle.isEmpty() )
{
aGuard.clear();
- return save(false); // (sal_False) : we don't want an approve dialog
+ save(false); // (sal_False) : we don't want an approve dialog
+ return;
}
}
try
@@ -1340,9 +1341,9 @@ bool ODocumentDefinition::saveAs()
xHandler->handle(xRequest);
if ( pAbort->wasSelected() )
- return false;
+ return;
if ( pDisApprove->wasSelected() )
- return true;
+ return;
if ( pDocuSave->wasSelected() )
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -1403,7 +1404,6 @@ bool ODocumentDefinition::saveAs()
{
OSL_FAIL("ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!");
}
- return true;
}
namespace
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.hxx b/dbaccess/source/core/dataaccess/documentdefinition.hxx
index 33a8fd9..68d19a4 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.hxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.hxx
@@ -142,7 +142,7 @@ public:
getContainerStorage() const;
bool save(bool _bApprove);
- bool saveAs();
+ void saveAs();
void closeObject();
bool isModified();
inline bool isNewReport() const { return !m_bForm && !m_pImpl->m_aProps.bAsTemplate; }
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
index 798c5b2..8577d1c 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
@@ -50,11 +50,6 @@ namespace dbmm
{
}
- const MacroMigrationDialog& MacroMigrationPage::getDialog() const
- {
- return *dynamic_cast< const MacroMigrationDialog* >( GetParentDialog() );
- }
-
MacroMigrationDialog& MacroMigrationPage::getDialog()
{
return *dynamic_cast< MacroMigrationDialog* >( GetParentDialog() );
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.hxx b/dbaccess/source/ext/macromigration/macromigrationpages.hxx
index a48be47..1eb0b39 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.hxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.hxx
@@ -48,8 +48,7 @@ namespace dbmm
MacroMigrationPage(vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription);
protected:
- const MacroMigrationDialog& getDialog() const;
- MacroMigrationDialog& getDialog();
+ MacroMigrationDialog& getDialog();
};
// PreparationPage
diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx
index 219fef7..2aa941c 100644
--- a/dbaccess/source/ext/macromigration/migrationengine.cxx
+++ b/dbaccess/source/ext/macromigration/migrationengine.cxx
@@ -872,13 +872,13 @@ namespace dbmm
/** adjust the document-events which refer to macros/scripts in the document, taking into
account the new names of the moved libraries
*/
- bool impl_adjustDocumentEvents_nothrow(
+ void impl_adjustDocumentEvents_nothrow(
const SubDocument& _rDocument
) const;
/** adjusts the script references bound to form component events
*/
- bool impl_adjustFormComponentEvents_nothrow(
+ void impl_adjustFormComponentEvents_nothrow(
const SubDocument& _rDocument
) const;
@@ -1650,14 +1650,14 @@ namespace dbmm
return true;
}
- bool MigrationEngine_Impl::impl_adjustDocumentEvents_nothrow( const SubDocument& _rDocument ) const
+ void MigrationEngine_Impl::impl_adjustDocumentEvents_nothrow( const SubDocument& _rDocument ) const
{
try
{
Reference< XEventsSupplier > xSuppEvents( _rDocument.xDocument, UNO_QUERY );
if ( !xSuppEvents.is() )
// this is allowed. E.g. new-style reports currently do not support this
- return true;
+ return;
Reference< XNameReplace > xEvents( xSuppEvents->getEvents(), UNO_SET_THROW );
Sequence< OUString > aEventNames = xEvents->getElementNames();
@@ -1687,9 +1687,7 @@ namespace dbmm
lcl_getSubDocumentDescription( _rDocument ),
::cppu::getCaughtException()
) );
- return false;
}
- return true;
}
void MigrationEngine_Impl::impl_adjustDialogElementEvents_throw( const Reference< XInterface >& _rxElement ) const
@@ -1786,7 +1784,7 @@ namespace dbmm
}
}
- bool MigrationEngine_Impl::impl_adjustFormComponentEvents_nothrow( const SubDocument& _rDocument ) const
+ void MigrationEngine_Impl::impl_adjustFormComponentEvents_nothrow( const SubDocument& _rDocument ) const
{
try
{
@@ -1805,9 +1803,7 @@ namespace dbmm
lcl_getSubDocumentDescription( _rDocument ),
::cppu::getCaughtException()
) );
- return false;
}
- return true;
}
bool MigrationEngine_Impl::impl_unprotectPasswordLibrary_throw( const Reference< XLibraryContainerPassword >& _rxPasswordManager,
diff --git a/dbaccess/source/inc/dsntypes.hxx b/dbaccess/source/inc/dsntypes.hxx
index d16d532f..9ce1f7c 100644
--- a/dbaccess/source/inc/dsntypes.hxx
+++ b/dbaccess/source/inc/dsntypes.hxx
@@ -206,13 +206,9 @@ public:
/// prefix increment
const TypeIterator& operator++();
- /// postfix increment
- const TypeIterator operator++(int) { TypeIterator hold(*this); ++*this; return hold; }
/// prefix decrement
const TypeIterator& operator--();
- /// postfix decrement
- const TypeIterator operator--(int) { TypeIterator hold(*this); --*this; return hold; }
protected:
TypeIterator(const ODsnTypeCollection* _pContainer, sal_Int32 _nInitialPos = 0);
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 4505431..47be954 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -583,7 +583,7 @@ void SbaGridHeader::MouseButtonDown( const MouseEvent& _rMEvt )
FmGridHeader::MouseButtonDown(_rMEvt);
}
-bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMousePos)
+void SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMousePos)
{
sal_uInt16 nId = GetItemId(_rMousePos);
bool bResizingCol = false;
@@ -610,10 +610,7 @@ bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMouseP
_rMousePos.Y() - GetSizePixel().Height()
)
);
- return true;
}
-
- return false;
}
void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMenu)
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index 57bfb8a..a6d5c27 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -678,9 +678,9 @@ namespace dbaui
m_pRC_Tables->Invalidate();
}
- bool OTableListBoxControl::SaveModified()
+ void OTableListBoxControl::SaveModified()
{
- return m_pRC_Tables->SaveModified();
+ m_pRC_Tables->SaveModified();
}
TTableWindowData::value_type OTableListBoxControl::getReferencingTable() const
diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
index fc2241f..ec3421f 100644
--- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx
+++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
@@ -172,9 +172,9 @@ namespace dbaui
{
(void)_bEnable;
}
- bool OUserAdminDlg::saveDatasource()
+ void OUserAdminDlg::saveDatasource()
{
- return PrepareLeaveCurrentPage();
+ PrepareLeaveCurrentPage();
}
} // namespace dbaui
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx
index 17d66a9..a3f0232 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -36,8 +36,8 @@ namespace dbaui
{
public:
virtual ~ISaveValueWrapper() = 0;
- virtual bool SaveValue() = 0;
- virtual bool Disable() = 0;
+ virtual void SaveValue() = 0;
+ virtual void Disable() = 0;
};
template < class T > class OSaveValueWrapper : public ISaveValueWrapper
@@ -47,8 +47,8 @@ namespace dbaui
explicit OSaveValueWrapper(T* _pSaveValue) : m_pSaveValue(_pSaveValue)
{ OSL_ENSURE(m_pSaveValue,"Illegal argument!"); }
- virtual bool SaveValue() override { m_pSaveValue->SaveValue(); return true;} // bool return value only for stl
- virtual bool Disable() override { m_pSaveValue->Disable(); return true;} // bool return value only for stl
+ virtual void SaveValue() override { m_pSaveValue->SaveValue(); }
+ virtual void Disable() override { m_pSaveValue->Disable(); }
};
template < class T > class ODisableWrapper : public ISaveValueWrapper
@@ -58,8 +58,8 @@ namespace dbaui
explicit ODisableWrapper(T* _pSaveValue) : m_pSaveValue(_pSaveValue)
{ OSL_ENSURE(m_pSaveValue,"Illegal argument!"); }
- virtual bool SaveValue() override { return true;} // bool return value only for stl
- virtual bool Disable() override { m_pSaveValue->Disable(); return true;} // bool return value only for stl
+ virtual void SaveValue() override {}
+ virtual void Disable() override { m_pSaveValue->Disable(); }
};
// OGenericAdministrationPage
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index d7a0fd7..8cb4310 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -540,9 +540,9 @@ namespace dbaui
(void)_bEnable;
}
- bool AdvancedSettingsDialog::saveDatasource()
+ void AdvancedSettingsDialog::saveDatasource()
{
- return PrepareLeaveCurrentPage();
+ PrepareLeaveCurrentPage();
}
} // namespace dbaui
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index 26a0879..ecf86d5 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -229,9 +229,9 @@ void ODbAdminDialog::enableConfirmSettings( bool _bEnable )
(void)_bEnable;
}
-bool ODbAdminDialog::saveDatasource()
+void ODbAdminDialog::saveDatasource()
{
- return PrepareLeaveCurrentPage();
+ PrepareLeaveCurrentPage();
}
ODbAdminDialog::ApplyResult ODbAdminDialog::implApplyChanges()
diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx
index 85cf0b4..f494471 100644
--- a/dbaccess/source/ui/dlg/dbwiz.cxx
+++ b/dbaccess/source/ui/dlg/dbwiz.cxx
@@ -320,7 +320,7 @@ void ODbTypeWizDialog::enableConfirmSettings( bool _bEnable )
// anormal tab dialog.
}
-bool ODbTypeWizDialog::saveDatasource()
+void ODbTypeWizDialog::saveDatasource()
{
SfxTabPage* pPage = static_cast<SfxTabPage*>(WizardDialog::GetPage(getCurrentState()));
if ( pPage )
@@ -330,7 +330,6 @@ bool ODbTypeWizDialog::saveDatasource()
if ( m_pImpl->getCurrentDataSource().is() )
m_pImpl->getCurrentDataSource()->getPropertyValue(PROPERTY_URL) >>= sOldURL;
DataSourceInfoConverter::convert( getORB(), m_pCollection,sOldURL,m_eType,m_pImpl->getCurrentDataSource());
- return true;
}
IWizardPageController* ODbTypeWizDialog::getPageController( TabPage* _pCurrentPage ) const
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index e8bda3d..776fc95 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -635,12 +635,11 @@ void ODbTypeWizDialogSetup::enterState(WizardState _nState)
}
}
-bool ODbTypeWizDialogSetup::saveDatasource()
+void ODbTypeWizDialogSetup::saveDatasource()
{
SfxTabPage* pPage = static_cast<SfxTabPage*>(WizardDialog::GetPage(getCurrentState()));
if ( pPage )
pPage->FillItemSet(m_pOutSet);
- return true;
}
bool ODbTypeWizDialogSetup::leaveState(WizardState _nState)
diff --git a/dbaccess/source/ui/inc/ConnectionLineData.hxx b/dbaccess/source/ui/inc/ConnectionLineData.hxx
index 0979991..520797e 100644
--- a/dbaccess/source/ui/inc/ConnectionLineData.hxx
+++ b/dbaccess/source/ui/inc/ConnectionLineData.hxx
@@ -70,7 +70,7 @@ namespace dbaui
OUString GetSourceFieldName() const { return GetFieldName(JTCS_FROM); }
OUString GetDestFieldName() const { return GetFieldName(JTCS_TO); }
- bool Reset();
+ void Reset();
OConnectionLineData& operator=( const OConnectionLineData& rConnLineData );
};
diff --git a/dbaccess/source/ui/inc/IItemSetHelper.hxx b/dbaccess/source/ui/inc/IItemSetHelper.hxx
index 17c90f2..9cc898b 100644
--- a/dbaccess/source/ui/inc/IItemSetHelper.hxx
+++ b/dbaccess/source/ui/inc/IItemSetHelper.hxx
@@ -55,7 +55,7 @@ namespace dbaui
virtual css::uno::Reference< css::sdbc::XDriver > getDriver() = 0;
virtual OUString getDatasourceType(const SfxItemSet& _rSet) const = 0;
virtual void clearPassword() = 0;
- virtual bool saveDatasource() = 0;
+ virtual void saveDatasource() = 0;
virtual void setTitle(const OUString& _sTitle) = 0;
/** enables or disables the user's possibility to confirm the settings
diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx
index d59bd58..c503472 100644
--- a/dbaccess/source/ui/inc/JoinTableView.hxx
+++ b/dbaccess/source/ui/inc/JoinTableView.hxx
@@ -178,7 +178,6 @@ namespace dbaui
void SelectConn(OTableConnection* pConn);
OTableWindowMap& GetTabWinMap() { return m_aTableMap; }
- const OTableWindowMap& GetTabWinMap() const { return m_aTableMap; }
/** gives a read only access to the connection vector
*/
@@ -307,7 +306,7 @@ namespace dbaui
private:
void InitColors();
- bool ScrollWhileDragging();
+ void ScrollWhileDragging();
/** opens the context menu to delete a connection
@param _aPos the position where the popup menu should appear
diff --git a/dbaccess/source/ui/inc/RelationControl.hxx b/dbaccess/source/ui/inc/RelationControl.hxx
index fc23f23..fe2191b 100644
--- a/dbaccess/source/ui/inc/RelationControl.hxx
+++ b/dbaccess/source/ui/inc/RelationControl.hxx
@@ -79,7 +79,7 @@ namespace dbaui
void Disable();
void Invalidate();
- bool SaveModified();
+ void SaveModified();
TTableWindowData::value_type getReferencingTable() const;
diff --git a/dbaccess/source/ui/inc/TableConnection.hxx b/dbaccess/source/ui/inc/TableConnection.hxx
index 130cdd7..20ee395 100644
--- a/dbaccess/source/ui/inc/TableConnection.hxx
+++ b/dbaccess/source/ui/inc/TableConnection.hxx
@@ -72,13 +72,13 @@ namespace dbaui
void Deselect();
bool IsSelected() const { return m_bSelected; }
bool CheckHit( const Point& rMousePos ) const;
- bool InvalidateConnection();
+ void InvalidateConnection();
void UpdateLineList();
OTableWindow* GetSourceWin() const;
OTableWindow* GetDestWin() const;
- bool RecalcLines();
+ void RecalcLines();
/** isTableConnection
@param _pTable the table where we should check if we belongs to it
diff --git a/dbaccess/source/ui/inc/TableConnectionData.hxx b/dbaccess/source/ui/inc/TableConnectionData.hxx
index 799ab8f..1e93fb5 100644
--- a/dbaccess/source/ui/inc/TableConnectionData.hxx
+++ b/dbaccess/source/ui/inc/TableConnectionData.hxx
@@ -67,7 +67,7 @@ namespace dbaui
*/
virtual OTableConnectionData* NewInstance() const;
- bool SetConnLine( sal_uInt16 nIndex, const OUString& rSourceFieldName, const OUString& rDestFieldName );
+ void SetConnLine( sal_uInt16 nIndex, const OUString& rSourceFieldName, const OUString& rDestFieldName );
bool AppendConnLine( const OUString& rSourceFieldName, const OUString& rDestFieldName );
/** Deletes list of ConnLines
*/
diff --git a/dbaccess/source/ui/inc/TableFieldDescription.hxx b/dbaccess/source/ui/inc/TableFieldDescription.hxx
index 9ab6078..3f60df8 100644
--- a/dbaccess/source/ui/inc/TableFieldDescription.hxx
+++ b/dbaccess/source/ui/inc/TableFieldDescription.hxx
@@ -73,7 +73,6 @@ namespace dbaui
inline bool IsEmpty() const;
OTableFieldDesc& operator=( const OTableFieldDesc& _aField );
- bool operator==( const OTableFieldDesc& rDesc );
bool IsVisible() const { return m_bVisible;}
bool IsGroupBy() const { return m_bGroupBy;}
diff --git a/dbaccess/source/ui/inc/TypeInfo.hxx b/dbaccess/source/ui/inc/TypeInfo.hxx
index 9d36403..951964b 100644
--- a/dbaccess/source/ui/inc/TypeInfo.hxx
+++ b/dbaccess/source/ui/inc/TypeInfo.hxx
@@ -100,8 +100,6 @@ const sal_uInt16 TYPE_BIT = 31;
,bCaseSensitive(false)
,bUnsigned(false)
{}
- bool operator == (const OTypeInfo& lh) const { return lh.nType == nType; }
- bool operator != (const OTypeInfo& lh) const { return lh.nType != nType; }
inline OUString getDBName() const { return aTypeName; }
};
diff --git a/dbaccess/source/ui/inc/UserAdminDlg.hxx b/dbaccess/source/ui/inc/UserAdminDlg.hxx
index 9e65455..e6e5949 100644
--- a/dbaccess/source/ui/inc/UserAdminDlg.hxx
+++ b/dbaccess/source/ui/inc/UserAdminDlg.hxx
@@ -73,7 +73,7 @@ namespace dbaui
virtual css::uno::Reference< css::sdbc::XDriver > getDriver() override;
virtual OUString getDatasourceType(const SfxItemSet& _rSet) const override;
virtual void clearPassword() override;
- virtual bool saveDatasource() override;
+ virtual void saveDatasource() override;
virtual void setTitle(const OUString& _sTitle) override;
virtual void enableConfirmSettings( bool _bEnable ) override;
};
diff --git a/dbaccess/source/ui/inc/advancedsettingsdlg.hxx b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx
index 1b1c46a..6043660 100644
--- a/dbaccess/source/ui/inc/advancedsettingsdlg.hxx
+++ b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx
@@ -67,7 +67,7 @@ namespace dbaui
virtual css::uno::Reference< css::sdbc::XDriver > getDriver() override;
virtual OUString getDatasourceType(const SfxItemSet& _rSet) const override;
virtual void clearPassword() override;
- virtual bool saveDatasource() override;
+ virtual void saveDatasource() override;
virtual void setTitle(const OUString& _sTitle) override;
virtual void enableConfirmSettings( bool _bEnable ) override;
};
diff --git a/dbaccess/source/ui/inc/charsets.hxx b/dbaccess/source/ui/inc/charsets.hxx
index 6354d6a..763e661 100644
--- a/dbaccess/source/ui/inc/charsets.hxx
+++ b/dbaccess/source/ui/inc/charsets.hxx
@@ -102,13 +102,9 @@ namespace dbaui
/// prefix increment
const ExtendedCharsetIterator& operator++();
- /// postfix increment
- const ExtendedCharsetIterator operator++(int) { ExtendedCharsetIterator hold(*this); ++*this; return hold; }
/// prefix decrement
const ExtendedCharsetIterator& operator--();
- /// postfix decrement
- const ExtendedCharsetIterator operator--(int) { ExtendedCharsetIterator hold(*this); --*this; return hold; }
protected:
ExtendedCharsetIterator( const OCharsetDisplay* _pContainer, const base_iterator& _rPosition );
diff --git a/dbaccess/source/ui/inc/dbadmin.hxx b/dbaccess/source/ui/inc/dbadmin.hxx
index ec6fb37..69db88c 100644
--- a/dbaccess/source/ui/inc/dbadmin.hxx
+++ b/dbaccess/source/ui/inc/dbadmin.hxx
@@ -92,7 +92,7 @@ public:
virtual css::uno::Reference< css::sdbc::XDriver > getDriver() override;
virtual OUString getDatasourceType(const SfxItemSet& _rSet) const override;
virtual void clearPassword() override;
- virtual bool saveDatasource() override;
+ virtual void saveDatasource() override;
virtual void setTitle(const OUString& _sTitle) override;
virtual void enableConfirmSettings( bool _bEnable ) override;
diff --git a/dbaccess/source/ui/inc/dbwiz.hxx b/dbaccess/source/ui/inc/dbwiz.hxx
index 596450f..93046dd 100644
--- a/dbaccess/source/ui/inc/dbwiz.hxx
+++ b/dbaccess/source/ui/inc/dbwiz.hxx
@@ -83,7 +83,7 @@ public:
virtual css::uno::Reference< css::sdbc::XDriver > getDriver() override;
virtual OUString getDatasourceType(const SfxItemSet& _rSet) const override;
virtual void clearPassword() override;
- virtual bool saveDatasource() override;
+ virtual void saveDatasource() override;
virtual void setTitle(const OUString& _sTitle) override;
virtual void enableConfirmSettings( bool _bEnable ) override;
diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx
index b536279..cf007ad 100644
--- a/dbaccess/source/ui/inc/dbwizsetup.hxx
+++ b/dbaccess/source/ui/inc/dbwizsetup.hxx
@@ -112,7 +112,7 @@ public:
virtual void clearPassword() override;
virtual void setTitle(const OUString& _sTitle) override;
virtual void enableConfirmSettings( bool _bEnable ) override;
- virtual bool saveDatasource() override;
+ virtual void saveDatasource() override;
virtual OUString getStateDisplayName( WizardState _nState ) const override;
/** returns <TRUE/> if the database should be opened, otherwise <FALSE/>.
diff --git a/dbaccess/source/ui/inc/querycontainerwindow.hxx b/dbaccess/source/ui/inc/querycontainerwindow.hxx
index e28ba48..89f5310 100644
--- a/dbaccess/source/ui/inc/querycontainerwindow.hxx
+++ b/dbaccess/source/ui/inc/querycontainerwindow.hxx
@@ -84,7 +84,7 @@ namespace dbaui
void initialize() override { m_pViewSwitch->initialize(); }
void SaveUIConfig() { m_pViewSwitch->SaveUIConfig(); }
- bool reset( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { return m_pViewSwitch->reset( _pErrorInfo ); }
+ void reset( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { m_pViewSwitch->reset( _pErrorInfo ); }
bool switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo );
void forceInitialView();
diff --git a/dbaccess/source/ui/inc/querycontroller.hxx b/dbaccess/source/ui/inc/querycontroller.hxx
index fd18022..a16c53b 100644
--- a/dbaccess/source/ui/inc/querycontroller.hxx
+++ b/dbaccess/source/ui/inc/querycontroller.hxx
@@ -219,7 +219,7 @@ namespace dbaui
/** switches to the graphical or SQL view mode, as determined by m_bGraphicalDesign
*/
- bool impl_setViewMode( ::dbtools::SQLExceptionInfo* _pErrorInfo );
+ void impl_setViewMode( ::dbtools::SQLExceptionInfo* _pErrorInfo );
/// sets m_sStatement, and notifies our respective property change listeners
void setStatement_fireEvent( const OUString& _rNewStatement, bool _bFireStatementChange = true );
diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx
index 8a8af67..5565311 100644
--- a/dbaccess/source/ui/inc/sbagrid.hxx
+++ b/dbaccess/source/ui/inc/sbagrid.hxx
@@ -184,7 +184,7 @@ namespace dbaui
// Window overridables
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
- bool ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMousePos);
+ void ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMousePos);
private:
using FmGridHeader::StartDrag;
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx
index 518ffea..df490a8 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx
@@ -59,11 +59,10 @@ OConnectionLineData& OConnectionLineData::operator=( const OConnectionLineData&
return *this;
}
-bool OConnectionLineData::Reset()
+void OConnectionLineData::Reset()
{
m_aDestFieldName.clear();
m_aSourceFieldName.clear();
- return true;
}
namespace dbaui
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index bfff9a8..cd7520c 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -1001,7 +1001,7 @@ void OJoinTableView::ClearAll()
Invalidate();
}
-bool OJoinTableView::ScrollWhileDragging()
+void OJoinTableView::ScrollWhileDragging()
{
OSL_ENSURE(m_pDragWin != nullptr, "OJoinTableView::ScrollWhileDragging must not be called when a window is being dragged !");
@@ -1014,7 +1014,7 @@ bool OJoinTableView::ScrollWhileDragging()
Point aLowerRight(aDragWinPos.X() + aDragWinSize.Width(), aDragWinPos.Y() + aDragWinSize.Height());
if (!m_bTrackingInitiallyMoved && (aDragWinPos == m_pDragWin->GetPosPixel()))
- return true;
+ return;
// avoid illustration errors (when scrolling with active TrackingRect)
HideTracking();
@@ -1073,8 +1073,6 @@ bool OJoinTableView::ScrollWhileDragging()
m_aDragRect = Rectangle(m_ptPrevDraggingPos - m_aDragOffset, m_pDragWin->GetSizePixel());
Update();
ShowTracking( m_aDragRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW );
-
- return bScrolling;
}
IMPL_LINK_NOARG_TYPED(OJoinTableView, OnDragScrollTimer, Idle *, void)
diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx
index 2d43b01..062158e 100644
--- a/dbaccess/source/ui/querydesign/TableConnection.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnection.cxx
@@ -108,12 +108,11 @@ namespace dbaui
return *this;
}
- bool OTableConnection::RecalcLines()
+ void OTableConnection::RecalcLines()
{
// call RecalcLines on each line
for( const auto& pLine : m_vConnLine )
pLine->RecalcLine();
- return true;
}
OTableWindow* OTableConnection::GetSourceWin() const
{
@@ -158,7 +157,7 @@ namespace dbaui
{ return pLine->CheckHit( rMousePos ); } );
}
- bool OTableConnection::InvalidateConnection()
+ void OTableConnection::InvalidateConnection()
{
Rectangle rcBounding = GetBoundingRect();
rcBounding.Bottom() += 1;
@@ -168,8 +167,6 @@ namespace dbaui
// Invalidate records obviously one pixel line less as Draw.
// Or everything works differently ..... in any case it works ....
m_pParent->Invalidate( rcBounding, InvalidateFlags::NoChildren );
-
- return true;
}
Rectangle OTableConnection::GetBoundingRect() const
diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx
index cd42547..3976809 100644
--- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx
@@ -87,23 +87,24 @@ OTableConnectionData& OTableConnectionData::operator=( const OTableConnectionDat
return *this;
}
-bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const OUString& rSourceFieldName, const OUString& rDestFieldName )
+void OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const OUString& rSourceFieldName, const OUString& rDestFieldName )
{
if (sal_uInt16(m_vConnLineData.size()) < nIndex)
- return false;
+ return;
// == still allowed, this corresponds to an Append
if (m_vConnLineData.size() == nIndex)
- return AppendConnLine(rSourceFieldName, rDestFieldName);
+ {
+ AppendConnLine(rSourceFieldName, rDestFieldName);
+ return;
+ }
OConnectionLineDataRef pConnLineData = m_vConnLineData[nIndex];
OSL_ENSURE(pConnLineData != nullptr, "OTableConnectionData::SetConnLine : habe ungueltiges LineData-Objekt");
pConnLineData->SetSourceFieldName( rSourceFieldName );
pConnLineData->SetDestFieldName( rDestFieldName );
-
- return true;
}
bool OTableConnectionData::AppendConnLine( const OUString& rSourceFieldName, const OUString& rDestFieldName )
diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
index 052d5bd..c9d755d 100644
--- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
+++ b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
@@ -98,21 +98,6 @@ OTableFieldDesc& OTableFieldDesc::operator=( const OTableFieldDesc& rRS )
return *this;
}
-bool OTableFieldDesc::operator==( const OTableFieldDesc& rDesc )
-{
-
- return ( m_eOrderDir != rDesc.GetOrderDir() ||
- m_eDataType != rDesc.GetDataType() ||
- m_aAliasName != rDesc.GetAlias() ||
- m_aFunctionName != rDesc.GetFunction() ||
- m_aFieldName != rDesc.GetField() ||
- m_aTableName != rDesc.GetTable() ||
- m_bGroupBy != rDesc.IsGroupBy() ||
- m_aCriteria != rDesc.GetCriteria() ||
- m_bVisible != rDesc.IsVisible() );
-
-}
-
void OTableFieldDesc::SetCriteria( sal_uInt16 nIdx, const OUString& rCrit)
{
if (nIdx < m_aCriteria.size())
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index cc9b7d8..2958e21 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -817,7 +817,7 @@ void OQueryController::impl_showAutoSQLViewError( const css::uno::Any& _rErrorDe
showError( aErrorContext );
}
-bool OQueryController::impl_setViewMode( ::dbtools::SQLExceptionInfo* _pErrorInfo )
+void OQueryController::impl_setViewMode( ::dbtools::SQLExceptionInfo* _pErrorInfo )
{
OSL_PRECOND( getContainer(), "OQueryController::impl_setViewMode: illegal call!" );
@@ -843,7 +843,6 @@ bool OQueryController::impl_setViewMode( ::dbtools::SQLExceptionInfo* _pErrorInf
}
setModified( wasModified );
- return bSuccess;
}
void OQueryController::impl_initialize()
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index acf5bbd..a6e0eff 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -424,17 +424,16 @@ EditBrowseBox::RowStatus OTableEditorCtrl::GetRowStatus(long nRow) const
}
}
-bool OTableEditorCtrl::SaveCurRow()
+void OTableEditorCtrl::SaveCurRow()
{
if (GetFieldDescr(GetCurRow()) == nullptr)
// there is no data in the current row
- return true;
+ return;
if (!SaveModified())
- return false;
+ return;
SetDataPtr(GetCurRow());
pDescrWin->SaveData( pActRow->GetActFieldDescr() );
- return true;
}
void OTableEditorCtrl::DisplayData(long nRow, bool bGrabFocus)
@@ -500,7 +499,7 @@ sal_Int32 OTableEditorCtrl::HasFieldName( const OUString& rFieldName )
return nCount;
}
-bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId)
+void OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId)
{
// Store the cell content
SetDataPtr( nRow == -1 ? GetCurRow() : nRow);
@@ -524,7 +523,7 @@ bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId)
pActFieldDescr = pActRow->GetActFieldDescr();
}
else
- return true;
+ return;
}
if(pActFieldDescr)
pActFieldDescr->SetName( aName );
@@ -584,7 +583,6 @@ bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId)
}
break;
}
- return true;
}
bool OTableEditorCtrl::SaveModified()
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx
index 7ad84ea..729cbff 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx
@@ -130,7 +130,7 @@ namespace dbaui
if (pDescrWin && pActRow)
pDescrWin->DisplayData(pActRow->GetActFieldDescr());
}
- bool SaveCurRow();
+ void SaveCurRow();
void SwitchType( const TOTypeInfoSP& _pType );
/// force displaying of the given row
@@ -182,7 +182,7 @@ namespace dbaui
OUString GenerateName( const OUString& rName );
bool SetDataPtr( long nRow );
- bool SaveData(long nRow, sal_uInt16 nColumnId);
+ void SaveData(long nRow, sal_uInt16 nColumnId);
/** AdjustFieldDescription set the needed values for the description
@param _pFieldDesc the field description where to set the values
@param _rMultiSel contains the positions which changed for undo/redo
commit 889fc93087ae1b57348803014c0a6090fd48c06f
Author: Noel Grandin <noel at peralex.com>
Date: Mon Jan 11 08:39:44 2016 +0200
loplugin:unusedmethods unused return value in cui
Change-Id: Ib65ceeeb5e1be0de5e3808e652e910fff3820bf8
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 89cc606..cd941be 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2580,7 +2580,7 @@ void SvxMenuConfigPage::DeleteSelectedTopLevel()
GetSaveInData()->SetModified( );
}
-bool SvxMenuConfigPage::DeleteSelectedContent()
+void SvxMenuConfigPage::DeleteSelectedContent()
{
SvTreeListEntry *pActEntry = m_pContentsListBox->FirstSelected();
@@ -2610,10 +2610,7 @@ bool SvxMenuConfigPage::DeleteSelectedContent()
GetSaveInData()->SetModified();
pMenu->SetModified();
-
- return true;
}
- return false;
}
short SvxMenuConfigPage::QueryReset()
@@ -3220,7 +3217,7 @@ void SvxToolbarConfigPage::DeleteSelectedTopLevel()
}
}
-bool SvxToolbarConfigPage::DeleteSelectedContent()
+void SvxToolbarConfigPage::DeleteSelectedContent()
{
SvTreeListEntry *pActEntry = m_pContentsListBox->FirstSelected();
@@ -3258,11 +3255,7 @@ bool SvxToolbarConfigPage::DeleteSelectedContent()
DeleteSelectedTopLevel();
}
}
-
- return true;
}
-
- return false;
}
IMPL_LINK_TYPED( SvxToolbarConfigPage, MoveHdl, Button *, pButton, void )
@@ -4403,7 +4396,7 @@ void ToolbarSaveInData::RestoreToolbar( SvxConfigEntry* pToolbar )
}
}
-bool ToolbarSaveInData::LoadToolbar(
+void ToolbarSaveInData::LoadToolbar(
const uno::Reference< container::XIndexAccess >& xToolbarSettings,
SvxConfigEntry* pParentData )
{
@@ -4486,8 +4479,6 @@ bool ToolbarSaveInData::LoadToolbar(
}
}
}
-
- return true;
}
IMPL_LINK_NOARG_TYPED( SvxToolbarConfigPage, SelectToolbarEntry, SvTreeListBox *, void )
@@ -4706,7 +4697,7 @@ IMPL_LINK_NOARG_TYPED( SvxToolbarConfigPage, AddFunctionHdl, SvxScriptSelectorDi
AddFunction();
}
-SvTreeListEntry* SvxToolbarConfigPage::AddFunction(
+void SvxToolbarConfigPage::AddFunction(
SvTreeListEntry* pTarget, bool bFront, bool bAllowDuplicates )
{
SvTreeListEntry* pNewLBEntry =
@@ -4733,8 +4724,6 @@ SvTreeListEntry* SvxToolbarConfigPage::AddFunction(
{
static_cast<ToolbarSaveInData*>( GetSaveInData() )->ApplyToolbar( pToolbar );
}
-
- return pNewLBEntry;
}
SvxToolbarEntriesListBox::SvxToolbarEntriesListBox(vcl::Window* pParent, SvxToolbarConfigPage* pPg)
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index f0e27d1..ee2d520 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -905,7 +905,7 @@ IMPL_LINK_TYPED(SpellDialog, AddToDictSelectHdl, MenuButton*, pButton, void )
}
-int SpellDialog::AddToDictionaryExecute( sal_uInt16 nItemId, PopupMenu *pMenu )
+void SpellDialog::AddToDictionaryExecute( sal_uInt16 nItemId, PopupMenu *pMenu )
{
m_pSentenceED->UndoActionStart( SPELLUNDO_CHANGE_GROUP );
@@ -944,13 +944,12 @@ int SpellDialog::AddToDictionaryExecute( sal_uInt16 nItemId, PopupMenu *pMenu )
if (DictionaryError::NONE != nAddRes)
{
SvxDicError( this, nAddRes );
- return 0; // don't continue
+ return; // don't continue
}
// go on
SpellContinue_Impl();
m_pSentenceED->UndoActionEnd();
- return 0;
}
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index 6e06fd9..8842963 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -305,7 +305,7 @@ IMPL_LINK_NOARG_TYPED(SvxHpLinkDlg, ClickCloseHdl_Impl, Button*, void)
|*
|************************************************************************/
-sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem )
+void SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem )
{
sal_uInt16 nPageId = RID_SVXPAGE_HYPERLINK_INTERNET;
@@ -355,7 +355,6 @@ sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem )
mbGrabFocus = false;
}
}
- return nPageId;
}
/*************************************************************************
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 5665b0d..8ebe2f4 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -1247,7 +1247,7 @@ namespace svx
SuggestionList();
~SuggestionList();
- bool Set( const OUString& _rElement, sal_uInt16 _nNumOfElement );
+ void Set( const OUString& _rElement, sal_uInt16 _nNumOfElement );
bool Reset( sal_uInt16 _nNumOfElement );
const OUString* Get( sal_uInt16 _nNumOfElement ) const;
void Clear();
@@ -1269,7 +1269,7 @@ namespace svx
Clear();
}
- bool SuggestionList::Set( const OUString& _rElement, sal_uInt16 _nNumOfElement )
+ void SuggestionList::Set( const OUString& _rElement, sal_uInt16 _nNumOfElement )
{
bool bRet = _nNumOfElement < m_vElements.size();
if( bRet )
@@ -1282,8 +1282,6 @@ namespace svx
++m_nNumOfEntries;
}
}
-
- return bRet;
}
bool SuggestionList::Reset( sal_uInt16 _nNumOfElement )
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 5750641..99a6755 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -494,7 +494,7 @@ void IconChoiceDialog::ActivatePageImpl ()
-bool IconChoiceDialog::DeActivatePageImpl ()
+void IconChoiceDialog::DeActivatePageImpl ()
{
IconChoicePageData *pData = GetPageData ( mnCurrentPageId );
@@ -551,11 +551,6 @@ bool IconChoiceDialog::DeActivatePageImpl ()
}
}
}
-
- if ( nRet & IconChoicePage::LEAVE_PAGE )
- return true;
- else
- return false;
}
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index 0211781..bae843e 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -197,7 +197,7 @@ private:
DECL_LINK_TYPED( InitHdl, void*, void );
- int AddToDictionaryExecute( sal_uInt16 ItemId, PopupMenu *pMenu );
+ void AddToDictionaryExecute( sal_uInt16 ItemId, PopupMenu *pMenu );
void StartSpellOptDlg_Impl();
int InitUserDicts();
void UpdateBoxes_Impl();
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index a77cbeb..0b47d2c 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -443,7 +443,7 @@ public:
bool FillItemSet( SfxItemSet* ) override;
void Reset( const SfxItemSet* ) override;
- virtual bool DeleteSelectedContent() = 0;
+ virtual void DeleteSelectedContent() = 0;
virtual void DeleteSelectedTopLevel() = 0;
SvxConfigEntry* GetTopLevelSelection()
@@ -481,7 +481,7 @@ private:
void Init() override;
void UpdateButtonStates() override;
short QueryReset() override;
- bool DeleteSelectedContent() override;
+ void DeleteSelectedContent() override;
void DeleteSelectedTopLevel() override;
public:
@@ -574,7 +574,7 @@ private:
void UpdateButtonStates() override;
short QueryReset() override;
void Init() override;
- bool DeleteSelectedContent() override;
+ void DeleteSelectedContent() override;
void DeleteSelectedTopLevel() override;
public:
@@ -582,7 +582,7 @@ public:
virtual ~SvxToolbarConfigPage();
virtual void dispose() override;
- SvTreeListEntry* AddFunction( SvTreeListEntry* pTarget = nullptr,
+ void AddFunction( SvTreeListEntry* pTarget = nullptr,
bool bFront = false,
bool bAllowDuplicates = true );
@@ -607,7 +607,7 @@ private:
css::uno::Reference
< css::container::XNameAccess > m_xPersistentWindowState;
- bool LoadToolbar(
+ void LoadToolbar(
const css::uno::Reference< css::container::XIndexAccess >& xToolBarSettings,
SvxConfigEntry* pParentData );
diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx
index f67e51e..8b47df7 100644
--- a/cui/source/inc/cuihyperdlg.hxx
+++ b/cui/source/inc/cuihyperdlg.hxx
@@ -85,7 +85,7 @@ public:
virtual void PageCreated( sal_uInt16 nId, IconChoicePage& rPage ) override;
- sal_uInt16 SetPage( SvxHyperlinkItem* pItem );
+ void SetPage( SvxHyperlinkItem* pItem );
void SetReadOnlyMode( bool bReadOnly );
inline bool IsHTMLDoc() const { return mbIsHTMLDoc; }
diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index 41ba413e..00b4ce5 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -191,7 +191,7 @@ private:
// LineCaps
DECL_LINK_TYPED( ChangeCapStyleHdl_Impl, ListBox&, void );
- bool FillXLSet_Impl();
+ void FillXLSet_Impl();
void InitSymbols(MenuButton* pButton);
void SymbolSelected(MenuButton* pButton);
@@ -366,7 +366,7 @@ private:
DECL_LINK_TYPED( ClickLoadHdl_Impl, Button*, void );
DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void );
DECL_LINK_TYPED( SelectLineEndHdl_Impl, ListBox&, void );
- long ChangePreviewHdl_Impl( void* p );
+ void ChangePreviewHdl_Impl();
void CheckChanges_Impl();
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index a852d92..76d8d37 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -164,7 +164,7 @@ protected:
static void RefreshInputSet();
void ActivatePageImpl ();
- bool DeActivatePageImpl ();
+ void DeActivatePageImpl ();
void ResetPageImpl ();
short Ok();
@@ -191,11 +191,8 @@ public:
const sal_uInt16* GetInputRanges( const SfxItemPool& );
void SetInputSet( const SfxItemSet* pInSet );
- const OKButton& GetOKButton() const { return *m_pOKBtn; }
OKButton& GetOKButton() { return *m_pOKBtn; }
- const PushButton& GetApplyButton() const { return *m_pApplyBtn; }
PushButton& GetApplyButton() { return *m_pApplyBtn; }
- const CancelButton& GetCancelButton() const { return *m_pCancelBtn; }
CancelButton& GetCancelButton() { return *m_pCancelBtn; }
short Execute() override;
diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx
index 69605d7..b29ccec 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -116,7 +116,7 @@ class SvxSwPosSizeTabPage : public SfxTabPage
static short GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB);
static short GetRelation(FrmMap *pMap, ListBox &rRelationLB);
short GetAnchorType(bool* pbHasChanged = nullptr);
- sal_uLong FillRelLB(FrmMap *pMap, sal_uInt16 nLBSelPos, sal_uInt16 nAlign, sal_uInt16 nRel, ListBox &rLB, FixedText &rFT);
+ void FillRelLB(FrmMap *pMap, sal_uInt16 nLBSelPos, sal_uInt16 nAlign, sal_uInt16 nRel, ListBox &rLB, FixedText &rFT);
sal_uInt16 FillPosLB(FrmMap *pMap, sal_uInt16 nAlign, const sal_uInt16 _nRel, ListBox &rLB);
void UpdateExample();
diff --git a/cui/source/options/dbregistersettings.hxx b/cui/source/options/dbregistersettings.hxx
index 9c85d9b..131cef4 100644
--- a/cui/source/options/dbregistersettings.hxx
+++ b/cui/source/options/dbregistersettings.hxx
@@ -55,10 +55,6 @@ namespace svx
// properly set when filling the struct from the XDatabaseRegistrations data
}
- bool operator!=( const DatabaseRegistration& _rhs ) const
- {
- return !( this->operator==( _rhs ) );
- }
};
typedef ::std::map< OUString, DatabaseRegistration > DatabaseRegistrations;
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index 58838fc..bf59651 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -234,10 +234,8 @@ void CuiAboutConfigTabPage::Reset()
m_pPrefBox->SetUpdateMode(true);
}
-bool CuiAboutConfigTabPage::FillItemSet()
+void CuiAboutConfigTabPage::FillItemSet()
{
- bool bModified = false;
-
std::vector< std::shared_ptr< Prop_Impl > >::iterator pIter;
for( pIter = m_vectorOfModified.begin() ; pIter != m_vectorOfModified.end(); ++pIter )
{
@@ -245,13 +243,10 @@ bool CuiAboutConfigTabPage::FillItemSet()
Reference< XNameReplace > xNameReplace( xUpdateAccess, UNO_QUERY_THROW );
xNameReplace->replaceByName( (*pIter)->Property, (*pIter)->Value );
- bModified = true;
Reference< util::XChangesBatch > xChangesBatch( xUpdateAccess, UNO_QUERY_THROW );
xChangesBatch->commitChanges();
}
-
- return bModified;
}
void CuiAboutConfigTabPage::FillItems(const Reference< XNameAccess >& xNameAccess, SvTreeListEntry *pParentEntry,
diff --git a/cui/source/options/optaboutconfig.hxx b/cui/source/options/optaboutconfig.hxx
index d03d663..db0df56 100644
--- a/cui/source/options/optaboutconfig.hxx
+++ b/cui/source/options/optaboutconfig.hxx
@@ -75,7 +75,7 @@ public:
void FillItems(const css::uno::Reference<css::container::XNameAccess>& xNameAccess,
SvTreeListEntry *pParentEntry = nullptr, int lineage = 0, bool bLoadAll = false);
static css::uno::Reference< css::container::XNameAccess > getConfigAccess( const OUString& sNodePath, bool bUpdate );
- bool FillItemSet();
+ void FillItemSet();
};
class CuiAboutConfigValueDialog : public ModalDialog
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index 2679637..4af228b 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -1668,7 +1668,7 @@ void SvxSwPosSizeTabPage::UpdateExample()
m_pExampleWN->Invalidate();
}
-sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_uInt16 nAlign,
+void SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_uInt16 nAlign,
sal_uInt16 nRel, ListBox &rLB, FixedText &rFT)
{
OUString sSelEntry;
@@ -1810,8 +1810,6 @@ sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_u
rFT.Enable(rLB.GetEntryCount() != 0);
RelHdl(rLB);
-
- return nLBRelations;
}
sal_uInt16 SvxSwPosSizeTabPage::FillPosLB(FrmMap *_pMap,
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index f0add14..3f33c73 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -986,7 +986,7 @@ bool SvxLineTabPage::FillItemSet( SfxItemSet* rAttrs )
-bool SvxLineTabPage::FillXLSet_Impl()
+void SvxLineTabPage::FillXLSet_Impl()
{
sal_Int32 nPos;
@@ -1103,8 +1103,6 @@ bool SvxLineTabPage::FillXLSet_Impl()
m_rXLSet.Put( XLineTransparenceItem( nVal ) );
m_pCtlPreview->SetLineAttributes(m_aXLineAttr.GetItemSet());
-
- return true;
}
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 254fa29..3f29be4 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -311,10 +311,9 @@ IMPL_LINK_NOARG_TYPED(SvxLineEndDefTabPage, SelectLineEndHdl_Impl, ListBox&, voi
-long SvxLineEndDefTabPage::ChangePreviewHdl_Impl( void* )
+void SvxLineEndDefTabPage::ChangePreviewHdl_Impl()
{
m_pCtlPreview->Invalidate();
- return 0L;
}
@@ -534,7 +533,7 @@ IMPL_LINK_NOARG_TYPED(SvxLineEndDefTabPage, ClickDeleteHdl_Impl, Button*, void)
*pnLineEndListState |= ChangeType::MODIFIED;
- ChangePreviewHdl_Impl( this );
+ ChangePreviewHdl_Impl();
}
}
// determine button state
commit db48f40e0777e566627852aeca92588869498adb
Author: Noel Grandin <noel at peralex.com>
Date: Mon Jan 11 08:39:30 2016 +0200
loplugin:unusedmethods unused return value in comphelper
Change-Id: If95e3fa61a2c63c4ffc78ef5c27ea5c59088170d
diff --git a/comphelper/source/misc/instancelocker.cxx b/comphelper/source/misc/instancelocker.cxx
index 0348c3b..131efb7 100644
--- a/comphelper/source/misc/instancelocker.cxx
+++ b/comphelper/source/misc/instancelocker.cxx
@@ -445,12 +445,12 @@ void SAL_CALL OLockListener::notifyTermination( const lang::EventObject& aEvent
// XInitialization
-bool OLockListener::Init()
+void OLockListener::Init()
{
::osl::ResettableMutexGuard aGuard( m_aMutex );
if ( m_bDisposed || m_bInitialized )
- return false;
+ return;
try
{
@@ -481,8 +481,6 @@ bool OLockListener::Init()
}
m_bInitialized = true;
-
- return true;
}
void createRegistryInfo_OInstanceLocker()
diff --git a/comphelper/source/misc/instancelocker.hxx b/comphelper/source/misc/instancelocker.hxx
index 45986d7..de9064d 100644
--- a/comphelper/source/misc/instancelocker.hxx
+++ b/comphelper/source/misc/instancelocker.hxx
@@ -102,7 +102,7 @@ public:
virtual ~OLockListener();
- bool Init();
+ void Init();
void Dispose();
// XEventListener
commit 6fc3fd29a6d08ee85d3ed5a3bad5de754f568314
Author: Noel Grandin <noel at peralex.com>
Date: Mon Jan 11 08:39:18 2016 +0200
loplugin:unusedmethods unused return value in chart2
Change-Id: Ibd8ae8ade2a1037deac1e29ce1b867c2847a9dff
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
index 5b9545b..9741197 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
@@ -136,7 +136,7 @@ uno::Reference< drawing::XDrawPage > Chart2ModelContact::getDrawPage()
return xResult;
}
-bool Chart2ModelContact::getExplicitValuesForAxis(
+void Chart2ModelContact::getExplicitValuesForAxis(
const Reference< XAxis > & xAxis,
ExplicitScaleData & rOutExplicitScale,
ExplicitIncrementData & rOutExplicitIncrement )
@@ -144,10 +144,9 @@ bool Chart2ModelContact::getExplicitValuesForAxis(
ExplicitValueProvider* pProvider( getExplicitValueProvider() );
if( pProvider )
{
- return pProvider->getExplicitValuesForAxis(
+ pProvider->getExplicitValuesForAxis(
xAxis, rOutExplicitScale, rOutExplicitIncrement );
}
- return false;
}
sal_Int32 Chart2ModelContact::getExplicitNumberFormatKeyForAxis(
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
index 56a0c2d..1491c79 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
@@ -70,7 +70,7 @@ public:
/** get the current values calculated for an axis in the current view in
case properties are 'auto'.
*/
- bool getExplicitValuesForAxis(
+ void getExplicitValuesForAxis(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XAxis > & xAxis,
ExplicitScaleData & rOutExplicitScale,
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index 768d923..7b60554 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -332,7 +332,7 @@ uno::Reference< XChartTypeTemplate > ChartTypeDialogController::getCurrentTempla
return xTemplate;
}
-bool ChartTypeDialogController::commitToModel( const ChartTypeParameter& rParameter
+void ChartTypeDialogController::commitToModel( const ChartTypeParameter& rParameter
, const uno::Reference< XChartDocument >& xChartModel )
{
uno::Reference< lang::XMultiServiceFactory > xTemplateManager( xChartModel->getChartTypeManager(), uno::UNO_QUERY );
@@ -360,7 +360,6 @@ bool ChartTypeDialogController::commitToModel( const ChartTypeParameter& rParame
xDiaProp->setPropertyValue(CHART_UNONAME_SORT_BY_XVALUES, uno::makeAny(rParameter.bSortByXValues));
}
}
- return false;
}
void ChartTypeDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ )
{
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
index f3b80ff..6999d50 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
@@ -118,7 +118,7 @@ public:
virtual void adjustParameterToSubType( ChartTypeParameter& rParameter );
virtual void adjustParameterToMainType( ChartTypeParameter& rParameter );
OUString getServiceNameForParameter( const ChartTypeParameter& rParameter ) const;
- bool commitToModel( const ChartTypeParameter& rParameter
+ void commitToModel( const ChartTypeParameter& rParameter
, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartModel );
::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartTypeTemplate > getCurrentTemplate( const ChartTypeParameter& rParameter
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 8ab0d41..8a933ad 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -712,18 +712,14 @@ void DataBrowser::Resize()
SetUpdateMode( bLastUpdateMode );
}
-bool DataBrowser::SetReadOnly( bool bNewState )
+void DataBrowser::SetReadOnly( bool bNewState )
{
- bool bResult = m_bIsReadOnly;
-
if( m_bIsReadOnly != bNewState )
{
m_bIsReadOnly = bNewState;
Invalidate();
DeactivateCell();
}
-
- return bResult;
}
void DataBrowser::SetClean()
diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx
index febd028..be6d2a8 100644
--- a/chart2/source/controller/dialogs/DataBrowser.hxx
+++ b/chart2/source/controller/dialogs/DataBrowser.hxx
@@ -90,8 +90,7 @@ public:
// Window
virtual void Resize() override;
- /// @return old state
- bool SetReadOnly( bool bNewState );
+ void SetReadOnly( bool bNewState );
bool IsReadOnly() const { return m_bIsReadOnly;}
/// reset the dirty status, if changes have been saved
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 9e3d0ae..a6d8dcf 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -705,7 +705,7 @@ void DialogModel::startControllerLockTimer()
m_aTimerTriggeredControllerLock.startTimer();
}
-bool DialogModel::setData(
+void DialogModel::setData(
const Sequence< beans::PropertyValue > & rArguments )
{
m_aTimerTriggeredControllerLock.startTimer();
@@ -716,7 +716,7 @@ bool DialogModel::setData(
! m_xTemplate.is() )
{
OSL_FAIL( "Model objects missing" );
- return false;
+ return;
}
try
@@ -746,10 +746,7 @@ bool DialogModel::setData(
catch( const uno::Exception & ex )
{
ASSERT_EXCEPTION( ex );
- return false;
}
-
- return true;
}
void DialogModel::setTimeBasedRange( bool bTimeBased, sal_Int32 nStart, sal_Int32 nEnd) const
diff --git a/chart2/source/controller/dialogs/DialogModel.hxx b/chart2/source/controller/dialogs/DialogModel.hxx
index 773d257..7f20135 100644
--- a/chart2/source/controller/dialogs/DialogModel.hxx
+++ b/chart2/source/controller/dialogs/DialogModel.hxx
@@ -148,7 +148,7 @@ public:
bool allArgumentsForRectRangeDetected() const;
- bool setData( const ::com::sun::star::uno::Sequence<
+ void setData( const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue > & rArguments );
void setTimeBasedRange( bool bTimeBased, sal_Int32 nStart, sal_Int32 nEnd) const;
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index 2837307..bbd0490 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -719,7 +719,7 @@ void ErrorBarResources::disposingRangeSelection()
m_apRangeSelectionHelper->stopRangeListening( false );
}
-bool ErrorBarResources::isRangeFieldContentValid( Edit & rEdit )
+void ErrorBarResources::isRangeFieldContentValid( Edit & rEdit )
{
OUString aRange( rEdit.GetText());
bool bIsValid = ( aRange.isEmpty() ) ||
@@ -736,8 +736,6 @@ bool ErrorBarResources::isRangeFieldContentValid( Edit & rEdit )
rEdit.SetControlBackground( RANGE_SELECTION_INVALID_RANGE_BACKGROUND_COLOR );
rEdit.SetControlForeground( RANGE_SELECTION_INVALID_RANGE_FOREGROUND_COLOR );
}
-
- return bIsValid;
}
} //namespace chart
diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx
index 8105e92..155b9f9 100644
--- a/chart2/source/controller/inc/res_ErrorBar.hxx
+++ b/chart2/source/controller/inc/res_ErrorBar.hxx
@@ -131,7 +131,7 @@ private:
DECL_LINK_TYPED( RangeChanged, Edit&, void );
void UpdateControlStates();
- bool isRangeFieldContentValid( Edit & rEdit );
+ void isRangeFieldContentValid( Edit & rEdit );
};
} //namespace chart
diff --git a/chart2/source/inc/CloneHelper.hxx b/chart2/source/inc/CloneHelper.hxx
index 24e5f1c..6d1f44f 100644
--- a/chart2/source/inc/CloneHelper.hxx
+++ b/chart2/source/inc/CloneHelper.hxx
@@ -47,25 +47,6 @@ template< class Interface >
}
};
-/// functor that clones a map element with a UNO-Reference as value
-template< typename Key, class Interface >
- struct CreateRefWithKeyClone : public ::std::unary_function<
- ::std::pair< Key, Interface >,
- ::std::pair< Key, Interface > >
-{
- ::std::pair< Key, Interface > operator() (
- const ::std::pair< Key, Interface > & rOther )
- {
- Interface xResult;
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >
- xCloneable( rOther.second, ::com::sun::star::uno::UNO_QUERY );
- if( xCloneable.is())
- xResult.set( xCloneable->createClone(), ::com::sun::star::uno::UNO_QUERY );
-
- return ::std::make_pair< Key, Interface >( rOther.first, xResult );
- }
-};
-
/// clones a vector of UNO-References
template< class Interface >
void CloneRefVector(
diff --git a/chart2/source/inc/CommonFunctors.hxx b/chart2/source/inc/CommonFunctors.hxx
index 01e44d6..4599d0c 100644
--- a/chart2/source/inc/CommonFunctors.hxx
+++ b/chart2/source/inc/CommonFunctors.hxx
@@ -134,46 +134,6 @@ struct OOO_DLLPUBLIC_CHARTTOOLS DoubleToOUString : public ::std::unary_function<
}
};
-/** can be used to find an element with a specific first element in e.g. a
- vector of pairs (for searching keys in maps you will of course use map::find)
- */
-template< typename First, typename Second >
- class FirstOfPairEquals : public ::std::unary_function< ::std::pair< First, Second >, bool >
-{
-public:
- FirstOfPairEquals( const First & aVal )
- : m_aValueToCompareWith( aVal )
- {}
- bool operator() ( const ::std::pair< First, Second > & rElem )
- {
- return rElem.first == m_aValueToCompareWith;
- }
-
-private:
- First m_aValueToCompareWith;
-};
-
-/** can be used to find a certain value in a map
-
- ::std::find_if( aMap.begin(), aMap.end(),
- SecondOfPairEquals< string, int >( 42 ));
- */
-template< typename Key, typename Value >
- class SecondOfPairEquals : public ::std::unary_function< ::std::pair< Key, Value >, bool >
-{
-public:
- SecondOfPairEquals( const Value & aVal )
- : m_aValueToCompareWith( aVal )
- {}
- bool operator() ( const ::std::pair< Key, Value > & rMapElem )
- {
- return rMapElem.second == m_aValueToCompareWith;
- }
-
-private:
- Value m_aValueToCompareWith;
-};
-
} // namespace CommonFunctors
} // namespace chart
diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx
index 83b6b2b..6034027 100644
--- a/chart2/source/inc/LifeTime.hxx
+++ b/chart2/source/inc/LifeTime.hxx
@@ -97,7 +97,7 @@ OOO_DLLPUBLIC_CHARTTOOLS bool g_close_isNeedToCancelLongLastingCalls( bool
throw ( ::com::sun::star::util::CloseVetoException );
OOO_DLLPUBLIC_CHARTTOOLS void g_close_endTryClose(bool bDeliverOwnership, bool bMyVeto );
OOO_DLLPUBLIC_CHARTTOOLS void g_close_endTryClose_doClose();
-OOO_DLLPUBLIC_CHARTTOOLS bool g_addCloseListener( const ::com::sun::star::uno::Reference<
+OOO_DLLPUBLIC_CHARTTOOLS void g_addCloseListener( const ::com::sun::star::uno::Reference<
::com::sun::star::util::XCloseListener > & xListener )
throw(::com::sun::star::uno::RuntimeException);
diff --git a/chart2/source/inc/PropertyHelper.hxx b/chart2/source/inc/PropertyHelper.hxx
index 9d52c07..5e82292 100644
--- a/chart2/source/inc/PropertyHelper.hxx
+++ b/chart2/source/inc/PropertyHelper.hxx
@@ -152,33 +152,6 @@ struct OOO_DLLPUBLIC_CHARTTOOLS PropertyNameLess
}
};
-struct OOO_DLLPUBLIC_CHARTTOOLS PropertyLess : public ::std::binary_function<
- ::com::sun::star::beans::Property,
- ::com::sun::star::beans::Property,
- bool >
-{
- bool operator() ( const ::com::sun::star::beans::Property & rFirst,
- const ::com::sun::star::beans::Property & rSecond )
- {
- return ( rFirst.Name.compareTo( rSecond.Name ) < 0 );
- }
-};
-
-struct OOO_DLLPUBLIC_CHARTTOOLS PropertyValueNameEquals : public ::std::unary_function< ::com::sun::star::beans::PropertyValue, bool >
-{
- explicit PropertyValueNameEquals( const OUString & rName ) :
- m_aName( rName )
- {}
-
- bool operator() ( const ::com::sun::star::beans::PropertyValue & rPropValue )
- {
- return rPropValue.Name.equals( m_aName );
- }
-
-private:
- OUString m_aName;
-};
-
} // namespace chart
// INCLUDED_CHART2_SOURCE_INC_PROPERTYHELPER_HXX
diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx b/chart2/source/inc/chartview/DrawModelWrapper.hxx
index b3d218c..2f43bd5 100644
--- a/chart2/source/inc/chartview/DrawModelWrapper.hxx
+++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx
@@ -68,7 +68,6 @@ public:
OutputDevice* getReferenceDevice() const;
SfxItemPool& GetItemPool();
- SAL_DLLPRIVATE const SfxItemPool& GetItemPool() const;
SAL_DLLPRIVATE virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
createUnoModel() override;
diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx
index bfc62ea..840692b 100644
--- a/chart2/source/tools/LifeTime.cxx
+++ b/chart2/source/tools/LifeTime.cxx
@@ -373,18 +373,17 @@ void CloseableLifeTimeManager::impl_doClose()
//mutex will be reacquired in destructor of aNegativeGuard
}
-bool CloseableLifeTimeManager::g_addCloseListener( const uno::Reference< util::XCloseListener > & xListener )
+void CloseableLifeTimeManager::g_addCloseListener( const uno::Reference< util::XCloseListener > & xListener )
throw(uno::RuntimeException)
{
osl::Guard< osl::Mutex > aGuard( m_aAccessMutex );
//Mutex needs to be acquired exactly ones; will be released inbetween
if( !impl_canStartApiCall() )
- return false;
+ return;
//mutex is acquired
m_aListenerContainer.addInterface( cppu::UnoType<util::XCloseListener>::get(),xListener );
m_bOwnership = false;
- return true;
}
bool CloseableLifeTimeManager::impl_canStartApiCall()
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx
index aac0b9a..6cc2a9d 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -260,10 +260,6 @@ SfxItemPool& DrawModelWrapper::GetItemPool()
{
return this->SdrModel::GetItemPool();
}
-const SfxItemPool& DrawModelWrapper::GetItemPool() const
-{
- return this->SdrModel::GetItemPool();
-}
XColorListRef DrawModelWrapper::GetColorList() const
{
return this->SdrModel::GetColorList();
commit bc80f951c14208eae6060fe2e6a941f9dd2d619c
Author: Noel Grandin <noel at peralex.com>
Date: Mon Jan 11 08:39:01 2016 +0200
loplugin:unusedmethods unused return value in basic
Change-Id: I0ccbf994d2c9be35f43fc3c62e60da90634bacdf
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 5bea517..0038dbc 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -4754,9 +4754,9 @@ Any StructRefInfo::getValue()
return aRet;
}
-bool StructRefInfo::setValue( const Any& rValue )
+void StructRefInfo::setValue( const Any& rValue )
{
- return uno_type_assignData( getInst(),
+ uno_type_assignData( getInst(),
maType.getTypeLibType(),
const_cast<void*>(rValue.getValue()),
rValue.getValueTypeRef(),
diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx
index 1a4405c..bb1be6e 100644
--- a/basic/source/comp/buffer.cxx
+++ b/basic/source/comp/buffer.cxx
@@ -151,17 +151,12 @@ void SbiBuffer::Chain( sal_uInt32 off )
}
}
-bool SbiBuffer::operator +=( sal_Int8 n )
+void SbiBuffer::operator +=( sal_Int8 n )
{
if( Check( 1 ) )
{
*pCur++ = (char) n;
nOff += 1;
- return true;
- }
- else
- {
- return false;
}
}
@@ -179,18 +174,13 @@ bool SbiBuffer::operator +=( sal_uInt8 n )
}
}
-bool SbiBuffer::operator +=( sal_Int16 n )
+void SbiBuffer::operator +=( sal_Int16 n )
{
if( Check( 2 ) )
{
*pCur++ = (char) ( n & 0xFF );
*pCur++ = (char) ( n >> 8 );
nOff += 2;
- return true;
- }
- else
- {
- return false;
}
}
@@ -224,13 +214,13 @@ bool SbiBuffer::operator +=( sal_uInt32 n )
}
}
-bool SbiBuffer::operator +=( sal_Int32 n )
+void SbiBuffer::operator +=( sal_Int32 n )
{
- return operator +=( (sal_uInt32) n );
+ operator +=( (sal_uInt32) n );
}
-bool SbiBuffer::operator +=( const OUString& n )
+void SbiBuffer::operator +=( const OUString& n )
{
sal_uInt32 len = n.getLength() + 1;
if( Check( len ) )
@@ -239,11 +229,6 @@ bool SbiBuffer::operator +=( const OUString& n )
memcpy( pCur, aByteStr.getStr(), len );
pCur += len;
nOff += len;
- return true;
- }
- else
- {
- return false;
}
}
diff --git a/basic/source/inc/buffer.hxx b/basic/source/inc/buffer.hxx
index e94ba15..2faeb2b 100644
--- a/basic/source/inc/buffer.hxx
+++ b/basic/source/inc/buffer.hxx
@@ -37,13 +37,13 @@ public:
~SbiBuffer();
void Patch( sal_uInt32, sal_uInt32 );
void Chain( sal_uInt32 );
- bool operator += (const OUString&); // save basic-string
- bool operator += (sal_Int8); // save character
- bool operator += (sal_Int16); // save integer
+ void operator += (const OUString&); // save basic-string
+ void operator += (sal_Int8); // save character
+ void operator += (sal_Int16); // save integer
bool operator += (sal_uInt8); // save character
bool operator += (sal_uInt16); // save integer
bool operator += (sal_uInt32); // save integer
- bool operator += (sal_Int32); // save integer
+ void operator += (sal_Int32); // save integer
char* GetBuffer(); // give out buffer (delete yourself!)
sal_uInt32 GetSize() { return nOff; }
};
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index 3cec557..f2bd5d5 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -59,7 +59,7 @@ public:
bool isEmpty() { return (mnPos == -1); }
css::uno::Any getValue();
- bool setValue( const css::uno::Any& );
+ void setValue( const css::uno::Any& );
};
class SbUnoStructRefObject: public SbxObject
diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx
index e0e4afa..8938e2f 100644
--- a/basic/source/sbx/sbxdec.cxx
+++ b/basic/source/sbx/sbxdec.cxx
@@ -349,7 +349,7 @@ bool SbxDecimal::getDouble( double& rVal ) { (void)rVal; return false; }
#endif
-bool SbxDecimal::getString( OUString& rString )
+void SbxDecimal::getString( OUString& rString )
{
#ifdef WIN32
static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US );
@@ -390,7 +390,6 @@ bool SbxDecimal::getString( OUString& rString )
return bRet;
#else
(void)rString;
- return false;
#endif
}
diff --git a/basic/source/sbx/sbxdec.hxx b/basic/source/sbx/sbxdec.hxx
index 3014071..957ffd0 100644
--- a/basic/source/sbx/sbxdec.hxx
+++ b/basic/source/sbx/sbxdec.hxx
@@ -90,7 +90,7 @@ public:
bool getULong( sal_uInt32& rVal );
bool getSingle( float& rVal );
bool getDouble( double& rVal );
- bool getString( OUString& rString );
+ void getString( OUString& rString );
bool operator -= ( const SbxDecimal &r );
bool operator += ( const SbxDecimal &r );
commit 1b26a4eb4ba99cb4a47da83c4e6419f2065f9d17
Author: Noel Grandin <noel at peralex.com>
Date: Mon Jan 11 08:38:51 2016 +0200
loplugin:unusedmethods unused return value in basctl
Change-Id: I23590020acbb9a6760edd755affa121a572aaea5
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index d410201..6d4a072 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -363,36 +363,36 @@ bool ModulWindow::BasicExecute()
return bDone;
}
-bool ModulWindow::CompileBasic()
+void ModulWindow::CompileBasic()
{
CheckCompileBasic();
- return XModule().Is() && xModule->IsCompiled();
+ XModule().Is() && xModule->IsCompiled();
}
-bool ModulWindow::BasicRun()
+void ModulWindow::BasicRun()
{
aStatus.nBasicFlags = 0;
- return BasicExecute();
+ BasicExecute();
}
-bool ModulWindow::BasicStepOver()
+void ModulWindow::BasicStepOver()
{
aStatus.nBasicFlags = SbDEBUG_STEPINTO | SbDEBUG_STEPOVER;
- return BasicExecute();
+ BasicExecute();
}
-bool ModulWindow::BasicStepInto()
+void ModulWindow::BasicStepInto()
{
aStatus.nBasicFlags = SbDEBUG_STEPINTO;
- return BasicExecute();
+ BasicExecute();
}
-bool ModulWindow::BasicStepOut()
+void ModulWindow::BasicStepOut()
{
aStatus.nBasicFlags = SbDEBUG_STEPOUT;
- return BasicExecute();
+ BasicExecute();
}
@@ -403,10 +403,8 @@ void ModulWindow::BasicStop()
aStatus.bIsRunning = false;
}
-bool ModulWindow::LoadBasic()
+void ModulWindow::LoadBasic()
{
- bool bDone = false;
-
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILEOPEN_SIMPLE);
@@ -438,20 +436,15 @@ bool ModulWindow::LoadBasic()
sal_uLong nError = aMedium.GetError();
if ( nError )
ErrorHandler::HandleError( nError );
- else
- bDone = true;
}
else
ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_COULDNTREAD))->Execute();
}
- return bDone;
}
-bool ModulWindow::SaveBasicSource()
+void ModulWindow::SaveBasicSource()
{
- bool bDone = false;
-
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD);
@@ -484,21 +477,17 @@ bool ModulWindow::SaveBasicSource()
sal_uLong nError = aMedium.GetError();
if ( nError )
ErrorHandler::HandleError( nError );
- else
- bDone = true;
}
else
ScopedVclPtrInstance<MessageDialog>::Create(this, IDEResId(RID_STR_COULDNTWRITE))->Execute();
}
-
- return bDone;
}
-bool ModulWindow::ImportDialog()
+void ModulWindow::ImportDialog()
{
const ScriptDocument& rDocument = GetDocument();
OUString aLibName = GetLibName();
- return implImportDialog( this, aCurPath, rDocument, aLibName );
+ implImportDialog( this, aCurPath, rDocument, aLibName );
}
bool ModulWindow::ToggleBreakPoint( sal_uLong nLine )
@@ -559,7 +548,7 @@ void ModulWindow::UpdateBreakPoint( const BreakPoint& rBrk )
}
-bool ModulWindow::BasicToggleBreakPoint()
+void ModulWindow::BasicToggleBreakPoint()
{
AssertValidEditEngine();
@@ -567,16 +556,12 @@ bool ModulWindow::BasicToggleBreakPoint()
aSel.GetStart().GetPara()++; // Basic lines start at 1!
aSel.GetEnd().GetPara()++;
- bool bNewBreakPoint = false;
-
for ( sal_uInt32 nLine = aSel.GetStart().GetPara(); nLine <= aSel.GetEnd().GetPara(); ++nLine )
{
- if ( ToggleBreakPoint( nLine ) )
- bNewBreakPoint = true;
+ ToggleBreakPoint( nLine );
}
aXEditorWindow->GetBrkWindow().Invalidate();
- return bNewBreakPoint;
}
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 72e617d..8be5eff 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -152,7 +152,7 @@ public:
void InitScrollBars();
void ForceSyntaxTimeout();
- bool SetSourceInBasic();
+ void SetSourceInBasic();
bool CanModify() { return ImpCanModify(); }
@@ -246,7 +246,7 @@ public:
virtual void dispose() override;
void AddWatch( const OUString& rVName );
- bool RemoveSelectedWatch();
+ void RemoveSelectedWatch();
void UpdateWatches( bool bBasicStopped = false );
};
@@ -351,13 +351,13 @@ public:
void SetSbModule( SbModule* pModule ) { xModule = pModule; }
OUString GetSbModuleName();
- bool CompileBasic();
- bool BasicRun();
- bool BasicStepOver();
- bool BasicStepInto();
- bool BasicStepOut();
+ void CompileBasic();
+ void BasicRun();
+ void BasicStepOver();
+ void BasicStepInto();
+ void BasicStepOut();
void BasicStop();
- bool BasicToggleBreakPoint();
+ void BasicToggleBreakPoint();
void BasicToggleBreakPointEnabled();
void ManageBreakPoints();
void UpdateBreakPoint( const BreakPoint& rBrk );
@@ -367,9 +367,9 @@ public:
long BasicBreakHdl( StarBASIC* pBasic );
void AssertValidEditEngine();
- bool LoadBasic();
- bool SaveBasicSource();
- bool ImportDialog();
+ void LoadBasic();
+ void SaveBasicSource();
+ void ImportDialog();
void EditMacro( const OUString& rMacroName );
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 5935206..2729774 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -929,9 +929,8 @@ void EditorWindow::LoseFocus()
Window::LoseFocus();
}
-bool EditorWindow::SetSourceInBasic()
+void EditorWindow::SetSourceInBasic()
{
- bool bChanged = false;
if ( pEditEngine && pEditEngine->IsModified()
&& !GetEditView()->IsReadOnly() ) // Added for #i60626, otherwise
// any read only bug in the text engine could lead to a crash later
@@ -939,10 +938,8 @@ bool EditorWindow::SetSourceInBasic()
if ( !StarBASIC::IsRunning() ) // Not at runtime!
{
rModulWindow.UpdateModule();
- bChanged = true;
}
}
- return bChanged;
}
// Returns the position of the last character of any of the following
@@ -1763,7 +1760,7 @@ void WatchWindow::AddWatch( const OUString& rVName )
UpdateWatches();
}
-bool WatchWindow::RemoveSelectedWatch()
+void WatchWindow::RemoveSelectedWatch()
{
SvTreeListEntry* pEntry = aTreeListBox->GetCurEntry();
if ( pEntry )
@@ -1776,10 +1773,7 @@ bool WatchWindow::RemoveSelectedWatch()
aXEdit->SetText( OUString() );
if ( !aTreeListBox->GetEntryCount() )
aRemoveWatchButton->Disable();
- return true;
}
- else
- return false;
}
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 09e3c87..9a6cccb 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -675,10 +675,8 @@ void DialogWindow::UpdateBrowser()
rLayout.UpdatePropertyBrowser();
}
-bool DialogWindow::SaveDialog()
+void DialogWindow::SaveDialog()
{
- bool bDone = false;
-
Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() );
Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD);
@@ -733,7 +731,6 @@ bool DialogWindow::SaveDialog()
if (! nRead)
break;
}
- bDone = true;
// With resource?
Reference< beans::XPropertySet > xDialogModelPropSet( xDialogModel, UNO_QUERY );
@@ -832,8 +829,6 @@ bool DialogWindow::SaveDialog()
else
ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_COULDNTWRITE))->Execute();
}
-
- return bDone;
}
std::vector< lang::Locale > implGetLanguagesOnlyContainedInFirstSeq
@@ -1211,11 +1206,11 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script
}
-bool DialogWindow::ImportDialog()
+void DialogWindow::ImportDialog()
{
const ScriptDocument& rDocument = GetDocument();
OUString aLibName = GetLibName();
- return implImportDialog( this, aCurPath, rDocument, aLibName );
+ implImportDialog( this, aCurPath, rDocument, aLibName );
}
DlgEdModel& DialogWindow::GetModel() const
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index e43fa72..652c759 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -160,19 +160,6 @@ EntryDescriptor::EntryDescriptor (
EntryDescriptor::~EntryDescriptor()
{ }
-bool EntryDescriptor::operator == (EntryDescriptor const& rDesc) const
-{
- return
- m_aDocument == rDesc.m_aDocument &&
- m_eLocation == rDesc.m_eLocation &&
- m_aLibName == rDesc.m_aLibName &&
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list