[Libreoffice-commits] core.git: vcl/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jun 4 06:59:59 UTC 2021
vcl/source/window/accessibility.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit fa6e97f08a656a7093f6d9c5ecdb2bdc081b7116
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jun 3 15:20:09 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jun 4 08:59:22 2021 +0200
fix SAL_WARN_IF check
Change-Id: I434eadb8f7a10406dc8d9fc4d880fd5b2f2f179d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116669
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx
index f6cbc9ae28cb..a4e4bde261bd 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -445,8 +445,9 @@ void Window::SetAccessibleDescription( const OUString& rDescription )
if ( ! mpWindowImpl->mpAccessibleInfos )
mpWindowImpl->mpAccessibleInfos.reset( new ImplAccessibleInfos );
- SAL_WARN_IF( mpWindowImpl->mpAccessibleInfos->pAccessibleDescription != rDescription, "vcl", "AccessibleDescription already set!" );
- mpWindowImpl->mpAccessibleInfos->pAccessibleDescription = rDescription;
+ std::optional<OUString>& rCurrentDescription = mpWindowImpl->mpAccessibleInfos->pAccessibleDescription;
+ SAL_WARN_IF( rCurrentDescription && *rCurrentDescription != rDescription, "vcl", "AccessibleDescription already set" );
+ rCurrentDescription = rDescription;
}
OUString Window::GetAccessibleDescription() const
More information about the Libreoffice-commits
mailing list