From 97ac77f067910fa5e8206d75160fa63546a9358d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 07:03:24 +0200 Subject: Merging upstream version 4:24.2.3. Signed-off-by: Daniel Baumann --- sw/source/ui/index/cnttab.cxx | 4 ++-- sw/source/ui/index/swuiidxmrk.cxx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'sw/source/ui/index') diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index a5d3bf92dd..535dc298dd 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -2933,7 +2933,7 @@ SwTOXWidget* SwTokenWindow::InsertItem(const OUString& rText, const SwFormToken& //use the first two chars as symbol OUString sTmp(SwAuthorityFieldType::GetAuthFieldName( static_cast(rToken.nAuthorityField))); - pButton->SetText(sTmp.copy(0, 2)); + pButton->SetText(sTmp.copy(0, std::min(sTmp.getLength(), sal_Int32(2)))); } sal_uInt32 nIndex = GetControlIndex( rToken.eTokenType ); @@ -3140,7 +3140,7 @@ void SwTokenWindow::InsertAtSelection(const SwFormToken& rToken) //use the first two chars as symbol OUString sTmp(SwAuthorityFieldType::GetAuthFieldName( static_cast(aToInsertToken.nAuthorityField))); - pButton->SetText(sTmp.copy(0, 2)); + pButton->SetText(sTmp.copy(0, std::min(sTmp.getLength(), sal_Int32(2)))); } pButton->Check(); diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 8a6f74b86e..03d5733a87 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -441,6 +441,7 @@ IMPL_LINK_NOARG(SwIndexMarkPane, SyncSelectionHdl, weld::Button&, void) m_xApplyToAllCB->show(); m_xSearchCaseSensitiveCB->show(); m_xSearchCaseWordOnlyCB->show(); + m_xDialog->resize_to_request(); m_xApplyToAllCB->set_sensitive(!m_aOrgStr.isEmpty() && !(nFrameType & ( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER | FrameTypeFlags::FLY_ANY ))); SearchTypeHdl(*m_xApplyToAllCB); -- cgit v1.2.3