[Libreoffice-commits] core.git: sw/source
Arkadiy Illarionov (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jul 7 15:13:36 UTC 2019
sw/source/uibase/docvw/edtwin.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 1e4fa857873c0bc728143087ec692c4b75aaf820
Author: Arkadiy Illarionov <qarkai at gmail.com>
AuthorDate: Sun Jul 7 16:36:30 2019 +0300
Commit: Arkadiy Illarionov <qarkai at gmail.com>
CommitDate: Sun Jul 7 17:12:58 2019 +0200
Iterate over explicit array of sequences in QuickHelpData::FillStrArr
Change-Id: Ibce0ce85c8447b9b0d0f464f062306fde7e4a07a
Reviewed-on: https://gerrit.libreoffice.org/75177
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai at gmail.com>
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 5ed8668e2e0b..efd52d8ab2c9 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -5967,8 +5967,11 @@ void QuickHelpData::FillStrArr( SwWrtShell const & rSh, const OUString& rWord )
(*pCalendar)->LoadDefaultCalendar( rSh.GetCurLang() );
// Add matching calendar month and day names
- uno::Sequence< i18n::CalendarItem2 > aNames( (*pCalendar)->getMonths() );
- for ( sal_uInt16 i = 0; i < 2; ++i )
+ const std::array<uno::Sequence<i18n::CalendarItem2>, 2> aCalendarItems = {
+ (*pCalendar)->getMonths(),
+ (*pCalendar)->getDays()
+ };
+ for ( const auto& aNames : aCalendarItems )
{
for ( const auto& rName : aNames )
{
@@ -5996,9 +5999,6 @@ void QuickHelpData::FillStrArr( SwWrtShell const & rSh, const OUString& rWord )
m_aHelpStrings.push_back( rStr );
}
}
- // Data for second loop iteration
- if ( i == 0 )
- aNames = (*pCalendar)->getDays();
}
// Add matching current date in ISO 8601 format, for example 2016-01-30
More information about the Libreoffice-commits
mailing list