basctl/source/basicide/baside2.cxx           |    5 -----
 basctl/source/basicide/baside2.hxx           |    1 -
 basctl/source/basicide/basides1.cxx          |   14 --------------
 basctl/source/basicide/basidesh.cxx          |   20 ++------------------
 basctl/source/basicide/bastypes.cxx          |    5 -----
 basctl/source/inc/bastypes.hxx               |    1 -
 compilerplugins/clang/virtualdead.results    |    6 ------
 dbaccess/source/ui/inc/IUpdateHelper.hxx     |    1 -
 dbaccess/source/ui/misc/HtmlReader.cxx       |   14 +-------------
 dbaccess/source/ui/misc/RtfReader.cxx        |   14 --------------
 dbaccess/source/ui/misc/UpdateHelperImpl.hxx |    3 ---
 11 files changed, 3 insertions(+), 81 deletions(-)

New commits:
commit c1e31ee0433232104c73cfa56e24e056833213dc
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Sep 26 13:47:08 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Sep 28 13:46:26 2019 +0200

    loplugin:virtualdead in dbaccess
    
    Change-Id: I030283816185f42f9012c8dfb2d745164abd7234
    Reviewed-on: https://gerrit.libreoffice.org/79644
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

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();
commit 616d47dbbea2ee39e1936e987b26a0d2095f0906
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Sep 26 13:54:49 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Sep 28 13:46:14 2019 +0200

    loplugin:virtualdead in basctl
    
    Change-Id: I6a3f74a3c52f3fb97b26de69b20ffd7502968d5e
    Reviewed-on: https://gerrit.libreoffice.org/79646
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 335a51f1d918..7e0dc2b0288d 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -759,11 +759,6 @@ void ModulWindow::StoreData()
     GetEditorWindow().SetSourceInBasic();
 }
 
-bool ModulWindow::CanClose()
-{
-    return true;
-}
-
 bool ModulWindow::AllowUndo()
 {
     return GetEditorWindow().CanModify();
diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index d46dc4c966c0..81401763c9ae 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -323,7 +323,6 @@ public:
     virtual void    GetState( SfxItemSet& ) override;
     virtual void    StoreData() override;
     virtual void    UpdateData() override;
-    virtual bool    CanClose() override;
     // return number of pages to be printed
     virtual sal_Int32 countPages( Printer* pPrinter ) override;
     // print page
diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index 9a6c1d91cbc0..2486543d1635 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -1380,20 +1380,6 @@ void Shell::Deactivate( bool bMDI )
             if( pXDlgWin->IsModified() )
                 MarkDocumentModified( pXDlgWin->GetDocument() );
         }
-
-        // test CanClose to also test during deactivating the BasicIDE whether
-        // the sourcecode is too large in one of the modules...
-        for (auto const& window : aWindowTable)
-        {
-            BaseWindow* pWin = window.second;
-            if ( /* !pWin->IsSuspended() && */ !pWin->CanClose() )
-            {
-                if ( !m_aCurLibName.isEmpty() && ( pWin->IsDocument( 
m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) )
-                    SetCurLib( ScriptDocument::getApplicationScriptDocument(), 
OUString(), false );
-                SetCurWindow( pWin, true );
-                break;
-            }
-        }
     }
 }
 
diff --git a/basctl/source/basicide/basidesh.cxx 
b/basctl/source/basicide/basidesh.cxx
index e86a03ef5ac9..01d5f4a1d199 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -397,24 +397,8 @@ bool Shell::PrepareClose( bool bUI )
     }
     else
     {
-        bool bCanClose = true;
-        for (auto const& window : aWindowTable)
-        {
-            BaseWindow* pWin = window.second;
-            if ( !pWin->CanClose() )
-            {
-                if ( !m_aCurLibName.isEmpty() && ( pWin->IsDocument( 
m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) )
-                    SetCurLib( ScriptDocument::getApplicationScriptDocument(), 
OUString(), false );
-                SetCurWindow( pWin, true );
-                bCanClose = false;
-                break;
-            }
-        }
-
-        if ( bCanClose )
-            StoreAllWindowData( false );    // don't write on the disk, that 
will be done later automatically
-
-        return bCanClose;
+        StoreAllWindowData( false );    // don't write on the disk, that will 
be done later automatically
+        return true;
     }
 }
 
diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index e78fbd7a7a35..5e642673cf8e 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -148,11 +148,6 @@ void BaseWindow::StoreData()
 {
 }
 
-bool BaseWindow::CanClose()
-{
-    return true;
-}
-
 bool BaseWindow::AllowUndo()
 {
     return true;
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index 6f76e941f0f8..50a9445696cf 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -188,7 +188,6 @@ public:
 
     virtual void    StoreData();
     virtual void    UpdateData();
-    virtual bool    CanClose();
 
     // return number of pages to be printed
     virtual sal_Int32 countPages( Printer* pPrinter ) = 0;
diff --git a/compilerplugins/clang/virtualdead.results 
b/compilerplugins/clang/virtualdead.results
index 740ef0bedbd6..3b6f2193714c 100644
--- a/compilerplugins/clang/virtualdead.results
+++ b/compilerplugins/clang/virtualdead.results
@@ -1,6 +1,3 @@
-basctl/source/inc/bastypes.hxx:191
-    _Bool basctl::BaseWindow::CanClose()
-    1
 basic/source/comp/codegen.cxx:464
     void OffSetAccumulator::start(const unsigned char *,)
     empty
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to