[Libreoffice-commits] core.git: 2 commits - dbaccess/source vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Oct 21 16:18:14 UTC 2018


 dbaccess/source/ui/querydesign/QueryDesignView.cxx |    4 ++--
 vcl/source/control/edit.cxx                        |    7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit e8db509ee41369c9f805a8ed1a4447b5c03962be
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 20 19:57:55 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Oct 21 18:18:02 2018 +0200

    pvs-studio: _pView was already dereferenced
    
    Change-Id: I72511a46524d02007c7b8e8b0e6486d62cbc7fa0
    Reviewed-on: https://gerrit.libreoffice.org/62103
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index fd7599d788fd..ba7fb22d0946 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -735,7 +735,7 @@ namespace
                             // only show the messagebox the first time
                             if (!bCritsOnAsterikWarning)
                             {
-                                std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(_pView ? _pView->GetFrameWeld() : nullptr,
+                                std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(_pView->GetFrameWeld(),
                                                                           VclMessageType::Warning, VclButtonsType::Ok,
                                                                           DBA_RES(STR_QRY_CRITERIA_ON_ASTERISK)));
                                 xBox->run();
@@ -891,7 +891,7 @@ namespace
                         // only show the  MessageBox the first time
                         if (!bCritsOnAsterikWarning)
                         {
-                            std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(_pView ? _pView->GetFrameWeld() : nullptr,
+                            std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(_pView->GetFrameWeld(),
                                                                       VclMessageType::Warning, VclButtonsType::Ok,
                                                                       DBA_RES(STR_QRY_ORDERBY_ON_ASTERISK)));
                             xBox->run();
commit 6837fbb1884cd8ad928ac028f9a94fad54dc1827
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 20 21:29:38 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Oct 21 18:17:49 2018 +0200

    pvs-studio: silence bogus V656
    
    Change-Id: Ib54677e4172b8d2b789cf49ab964fbcc112869f8
    Reviewed-on: https://gerrit.libreoffice.org/62110
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 895d35cef5e7..e92c2639b23d 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -727,9 +727,10 @@ void Edit::ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uI
         }
     }
 
-    maText.remove( static_cast<sal_Int32>(aSelection.Min()), static_cast<sal_Int32>(aSelection.Len()) );
-    maSelection.Min() = aSelection.Min();
-    maSelection.Max() = aSelection.Min();
+    const auto nSelectionMin = aSelection.Min();
+    maText.remove( static_cast<sal_Int32>(nSelectionMin), static_cast<sal_Int32>(aSelection.Len()) );
+    maSelection.Min() = nSelectionMin;
+    maSelection.Max() = nSelectionMin;
     ImplAlignAndPaint();
     mbInternModified = true;
 }


More information about the Libreoffice-commits mailing list