diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2024-05-09 13:09:43 +0200 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-09 14:59:53 +0200 |
commit | 0f7127aa6019363d15a167ab492ba06e0347174a (patch) | |
tree | 69356b9e43bcdf2ab4ff082d41e7cee183d25ff1 | |
parent | 943913f74c26210ebf3ed04f36412e3c45b76f0e (diff) |
sw: fix -Wshadow warnings
/home/vmiklos/git/libreoffice/co-24.04/sw/source/uibase/shells/drwbassh.cxx: In lambda function:
/home/vmiklos/git/libreoffice/co-24.04/sw/source/uibase/shells/drwbassh.cxx:656:38: error: declaration of ‘aTitle’ shadows a previous local [-Werror=shadow]
656 | OUString aTitle;
| ^~~~~~
/home/vmiklos/git/libreoffice/co-24.04/sw/source/uibase/shells/drwbassh.cxx:643:26: note: shadowed declaration is here
643 | OUString aTitle(pSelected->GetTitle());
| ^~~~~~
/home/vmiklos/git/libreoffice/co-24.04/sw/source/uibase/shells/drwbassh.cxx:657:38: error: declaration of ‘aDescription’ shadows a previous local [-Werror=shadow]
657 | OUString aDescription;
| ^~~~~~~~~~~~
/home/vmiklos/git/libreoffice/co-24.04/sw/source/uibase/shells/drwbassh.cxx:644:26: note: shadowed declaration is here
644 | OUString aDescription(pSelected->GetDescription());
| ^~~~~~~~~~~~
/home/vmiklos/git/libreoffice/co-24.04/sw/source/uibase/shells/drwbassh.cxx:658:34: error: declaration of ‘isDecorative’ shadows a previous local [-Werror=shadow]
658 | bool isDecorative;
| ^~~~~~~~~~~~
/home/vmiklos/git/libreoffice/co-24.04/sw/source/uibase/shells/drwbassh.cxx:645:22: note: shadowed declaration is here
645 | bool isDecorative(pSelected->IsDecorative());
| ^~~~~~~~~~~~
cc1plus: all warnings being treated as errors
Change-Id: I9f62f028d29a4014628435163f8ff9174251bfb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167382
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | sw/source/uibase/shells/drwbassh.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index ebd1eb3ce705..c98e97eb7aba 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -653,17 +653,17 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq) { if (nResult == RET_OK) { - OUString aTitle; - OUString aDescription; - bool isDecorative; + OUString aNewTitle; + OUString aNewDescription; + bool newIsDecorative; - pDlg->GetTitle(aTitle); - pDlg->GetDescription(aDescription); - pDlg->IsDecorative(isDecorative); + pDlg->GetTitle(aNewTitle); + pDlg->GetDescription(aNewDescription); + pDlg->IsDecorative(newIsDecorative); - pSelected->SetTitle(aTitle); - pSelected->SetDescription(aDescription); - pSelected->SetDecorative(isDecorative); + pSelected->SetTitle(aNewTitle); + pSelected->SetDescription(aNewDescription); + pSelected->SetDecorative(newIsDecorative); pSh->SetModified(); } |