summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2021-11-12 08:51:00 +0100
committerAron Budea <aron.budea@collabora.com>2021-11-12 13:22:05 +0100
commit7da45f1ba0e5062426919c87c13fdeffa7e61102 (patch)
tree8709bb613edb06217c9be23294b54c4ab8205c08
parentc33f23598f9bc5ed80c95b18e373c91b68b2511e (diff)
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 <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
-rw-r--r--sw/source/uibase/shells/basesh.cxx6
1 files changed, 3 insertions, 3 deletions
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.