sw/source/uibase/shells/basesh.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 7da45f1ba0e5062426919c87c13fdeffa7e61102
Author:     Aron Budea <aron.bu...@collabora.com>
AuthorDate: Fri Nov 12 08:51:00 2021 +0100
Commit:     Aron Budea <aron.bu...@collabora.com>
CommitDate: Fri Nov 12 13:22:05 2021 +0100

    Fix -Werror=shadow in basesh.cxx
    
    sw/source/uibase/shells/basesh.cxx:
     In member function ‘void SwBaseShell::ExecUndo(SfxRequest&)’:
    sw/source/uibase/shells/basesh.cxx:564:29: error: declaration
     of ‘rView’ shadows a member of ‘SwBaseShell’ [-Werror=shadow]
      564 |                     SwView& rView = rWrtShell.GetView();
          |                             ^~~~~
    In file included from sw/source/uibase/shells/basesh.cxx:63:
    sw/source/uibase/inc/basesh.hxx:41:18: note: shadowed declaration
     is here
       41 |     SwView      &rView;
          |                  ^~~~~
    
    Since c72e500ccaf0ce2261c5233b80fba9342778f810.
    
    Change-Id: I5fda3ad4805dc59a9e0e01dd262c09952a2bc97e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125077
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Aron Budea <aron.bu...@collabora.com>

diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index fc7c5daf8ce4..ed6dd8883b57 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -561,10 +561,10 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
                 {
                     sw::UndoManager& rManager = 
rWrtShell.GetDoc()->GetUndoManager();
                     const SfxUndoAction* pAction = rManager.GetUndoAction();
-                    SwView& rView = rWrtShell.GetView();
-                    ViewShellId nViewShellId = rView.GetViewShellId();
+                    SwView& rSwView = rWrtShell.GetView();
+                    ViewShellId nViewShellId = rSwView.GetViewShellId();
                     if (pAction->GetViewShellId() != nViewShellId
-                        && rManager.IsViewUndoActionIndependent(&rView))
+                        && rManager.IsViewUndoActionIndependent(&rSwView))
                     {
                         // Execute the undo with an offset: don't undo the top 
action, but an
                         // earlier one, since it's independent and that 
belongs to our view.

Reply via email to