From fde38e3af0f2e6c909050c74f00adf03da1c9aea Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 18 Dec 2017 10:28:44 +0000 Subject: sal_uLong->sal_Int32 for SfxAcceleratorConfigPage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2ec647b140c6be6c5cb6727873cca4cad16a664e Reviewed-on: https://gerrit.libreoffice.org/46701 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- cui/source/customize/acccfg.cxx | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'cui/source/customize/acccfg.cxx') diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index debb42a0851c..9f1c75341ace 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -963,12 +963,12 @@ void SfxAcceleratorConfigPage::Init(const uno::ReferencegetCommandByKeyEvent(aAWTKey); - OUString sLabel = GetLabel4Command(sCommand); - vcl::KeyCode aKeyCode = svt::AcceleratorExecute::st_AWTKey2VCLKey(aAWTKey); - sal_uLong nPos = MapKeyCodeToPos(aKeyCode); + OUString sCommand = xAccMgr->getCommandByKeyEvent(aAWTKey); + OUString sLabel = GetLabel4Command(sCommand); + vcl::KeyCode aKeyCode = svt::AcceleratorExecute::st_AWTKey2VCLKey(aAWTKey); + sal_Int32 nPos = MapKeyCodeToPos(aKeyCode); - if (nPos == TREELIST_ENTRY_NOTFOUND) + if (nPos == -1) continue; m_pEntriesBox->SetEntryText(sLabel, nPos, nCol); @@ -987,9 +987,9 @@ void SfxAcceleratorConfigPage::Init(const uno::ReferenceFirstSelected(); @@ -1195,7 +1195,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, SvTreeListBox*, pListBox, void ) pU2 = static_cast(pE2->GetUserData()); if (pU2) nP2 = MapKeyCodeToPos(pU2->m_aKey); - if (nP2 != TREELIST_ENTRY_NOTFOUND) + if (nP2 != -1) pE3 = m_pEntriesBox->GetEntry( nullptr, nP2 ); if (pE3) { @@ -1461,12 +1461,11 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet* rSet ) } } - -sal_uLong SfxAcceleratorConfigPage::MapKeyCodeToPos(const vcl::KeyCode& aKey) const +sal_Int32 SfxAcceleratorConfigPage::MapKeyCodeToPos(const vcl::KeyCode& aKey) const { sal_uInt16 nCode1 = aKey.GetCode() + aKey.GetModifier(); SvTreeListEntry* pEntry = m_pEntriesBox->First(); - sal_uLong i = 0; + sal_Int32 i = 0; while (pEntry) { @@ -1481,7 +1480,7 @@ sal_uLong SfxAcceleratorConfigPage::MapKeyCodeToPos(const vcl::KeyCode& aKey) co ++i; } - return TREELIST_ENTRY_NOTFOUND; + return -1; } -- cgit