summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-26 13:47:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-28 13:46:26 +0200
commitc1e31ee0433232104c73cfa56e24e056833213dc (patch)
tree077e5e728519e030baba1d2f3e7e5e4a81f13aca
parent616d47dbbea2ee39e1936e987b26a0d2095f0906 (diff)
loplugin:virtualdead in dbaccess
Change-Id: I030283816185f42f9012c8dfb2d745164abd7234 Reviewed-on: https://gerrit.libreoffice.org/79644 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--compilerplugins/clang/virtualdead.results3
-rw-r--r--dbaccess/source/ui/inc/IUpdateHelper.hxx1
-rw-r--r--dbaccess/source/ui/misc/HtmlReader.cxx14
-rw-r--r--dbaccess/source/ui/misc/RtfReader.cxx14
-rw-r--r--dbaccess/source/ui/misc/UpdateHelperImpl.hxx3
5 files changed, 1 insertions, 34 deletions
diff --git a/compilerplugins/clang/virtualdead.results b/compilerplugins/clang/virtualdead.results
index 3b6f2193714c..119fde6bb849 100644
--- a/compilerplugins/clang/virtualdead.results
+++ b/compilerplugins/clang/virtualdead.results
@@ -13,9 +13,6 @@ chart2/source/controller/dialogs/ChartTypeDialogController.hxx:99
chart2/source/controller/sidebar/ChartSidebarSelectionListener.hxx:30
void chart::sidebar::ChartSidebarSelectionListenerParent::SelectionInvalid()
empty
-dbaccess/source/ui/inc/IUpdateHelper.hxx:38
- void dbaui::IUpdateHelper::moveToInsertRow()
- empty
desktop/source/deployment/registry/inc/dp_backenddb.hxx:119
class rtl::OUString dp_registry::backend::BackendDb::getDbNSName()
"http://openoffi
diff --git a/dbaccess/source/ui/inc/IUpdateHelper.hxx b/dbaccess/source/ui/inc/IUpdateHelper.hxx
index 93491a2989d6..975eef75c442 100644
--- a/dbaccess/source/ui/inc/IUpdateHelper.hxx
+++ b/dbaccess/source/ui/inc/IUpdateHelper.hxx
@@ -35,7 +35,6 @@ namespace dbaui
virtual void updateDate(sal_Int32 _nPos,const css::util::Date& _nValue) = 0;
virtual void updateTime(sal_Int32 _nPos,const css::util::Time& _nValue) = 0;
virtual void updateTimestamp(sal_Int32 _nPos,const css::util::DateTime& _nValue) = 0;
- virtual void moveToInsertRow() = 0;
virtual void insertRow() = 0;
protected:
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index 3dc3c38b558b..310361483932 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -156,19 +156,7 @@ void OHTMLReader::NextToken( HtmlTokenId nToken )
}
break;
case HtmlTokenId::TABLEROW_ON:
- if ( m_pUpdateHelper.get() )
- {
- try
- {
- m_pUpdateHelper->moveToInsertRow(); // otherwise append new line
- }
- catch(SQLException& e)
- // handling update failure
- {
- showErrorDialog(e);
- }
- }
- else
+ if ( !m_pUpdateHelper.get() )
m_bError = true;
break;
case HtmlTokenId::TEXTTOKEN:
diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx
index 1d71e1b81c78..aaae01c33a96 100644
--- a/dbaccess/source/ui/misc/RtfReader.cxx
+++ b/dbaccess/source/ui/misc/RtfReader.cxx
@@ -134,31 +134,17 @@ void ORTFReader::NextToken( int nToken )
case RTF_TROWD:
{
- bool bInsertRow = true;
if ( !m_xTable.is() ) // use first line as header
{
sal_uInt64 const nTell = rInput.Tell(); // perhaps alters position of the stream
m_bError = !CreateTable(nToken);
- bInsertRow = m_bAppendFirstLine;
if ( m_bAppendFirstLine )
{
rInput.Seek(nTell);
rInput.ResetError();
}
}
- if ( bInsertRow && !m_bError)
- {
- try
- {
- m_pUpdateHelper->moveToInsertRow(); // otherwise append new line
- }
- catch(SQLException& e)
- // handling update failure
- {
- showErrorDialog(e);
- }
- }
}
break;
case RTF_INTBL:
diff --git a/dbaccess/source/ui/misc/UpdateHelperImpl.hxx b/dbaccess/source/ui/misc/UpdateHelperImpl.hxx
index 40eb1fd1afb1..766a4cefc139 100644
--- a/dbaccess/source/ui/misc/UpdateHelperImpl.hxx
+++ b/dbaccess/source/ui/misc/UpdateHelperImpl.hxx
@@ -69,9 +69,6 @@ namespace dbaui
{
m_xParameters->setNull(_nPos,sqlType);
}
- virtual void moveToInsertRow() override
- {
- }
virtual void insertRow() override
{
m_xPrepared->executeUpdate();