[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 23 15:08:01 UTC 2021
svx/source/form/fmview.cxx | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
New commits:
commit 0e5099beaa424938d4254e3998b61e94990fd01c
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Mar 19 15:32:53 2021 +0000
Commit: Thorsten Behrens <thorsten.behrens at allotropia.de>
CommitDate: Fri Apr 23 17:07:27 2021 +0200
cid#1474166 Deference null return value
Change-Id: I725eff105f963b139ae8646cd1cb193ce737d313
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112760
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 229558c0bf257e4e559cc1b84bd2918b04c68305)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114366
Tested-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 806b9cade78c..5d121a5ca602 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -516,24 +516,26 @@ bool FmFormView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
// tdf#139804 Allow selecting form controls with Alt-<Mnemonic>
if (rKeyCode.IsMod2() && rKeyCode.GetCode())
{
- FmFormPage* pCurPage = GetCurPage();
- for (size_t a = 0; a < pCurPage->GetObjCount(); ++a)
+ if (FmFormPage* pCurPage = GetCurPage())
{
- SdrObject* pObj = pCurPage->GetObj(a);
- FmFormObj* pFormObject = FmFormObj::GetFormObject(pObj);
- if (!pFormObject)
- continue;
-
- Reference<awt::XControl> xControl = pFormObject->GetUnoControl(*this, *pWin);
- if (!xControl.is())
- continue;
- const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper();
- VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xControl->getPeer());
- if (rI18nHelper.MatchMnemonic(pWindow->GetText(), rKEvt.GetCharCode()))
+ for (size_t a = 0; a < pCurPage->GetObjCount(); ++a)
{
- pWindow->GrabFocus();
- bDone = true;
- break;
+ SdrObject* pObj = pCurPage->GetObj(a);
+ FmFormObj* pFormObject = FmFormObj::GetFormObject(pObj);
+ if (!pFormObject)
+ continue;
+
+ Reference<awt::XControl> xControl = pFormObject->GetUnoControl(*this, *pWin);
+ if (!xControl.is())
+ continue;
+ const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper();
+ VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xControl->getPeer());
+ if (rI18nHelper.MatchMnemonic(pWindow->GetText(), rKEvt.GetCharCode()))
+ {
+ pWindow->GrabFocus();
+ bDone = true;
+ break;
+ }
}
}
}
More information about the Libreoffice-commits
mailing list