summaryrefslogtreecommitdiffstats
path: root/cui/source/dialogs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:27:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:27:54 +0000
commitadb203bc05e3e36173cbd46b9951f79821a81799 (patch)
tree6e6739df9b3f0a567330a0dd7ee0e03ae70876a3 /cui/source/dialogs
parentAdding debian version 4:24.2.0-3. (diff)
downloadlibreoffice-adb203bc05e3e36173cbd46b9951f79821a81799.tar.xz
libreoffice-adb203bc05e3e36173cbd46b9951f79821a81799.zip
Merging upstream version 4:24.2.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r--cui/source/dialogs/cuicharmap.cxx1
-rw-r--r--cui/source/dialogs/tipofthedaydlg.cxx28
2 files changed, 11 insertions, 18 deletions
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index 03d1e8c90b..0d0b809b0e 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -523,6 +523,7 @@ IMPL_LINK(SvxCharacterMap, CharClickHdl, SvxCharView*, rView, void)
{
rView->GrabFocus();
+ SetCharFont(rView->GetFont());
m_aShowChar.SetText( rView->GetText() );
m_aShowChar.SetFont(rView->GetFont());
m_aShowChar.Invalidate();
diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx
index f1cb7afc2c..bbb26a054b 100644
--- a/cui/source/dialogs/tipofthedaydlg.cxx
+++ b/cui/source/dialogs/tipofthedaydlg.cxx
@@ -50,7 +50,7 @@ const Size ThumbSize(150, 150);
TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent)
: GenericDialogController(pParent, "cui/ui/tipofthedaydialog.ui", "TipOfTheDayDialog")
- , m_pParent(pParent)
+ , m_xParent(pParent ? pParent->GetXWindow() : nullptr)
, m_pText(m_xBuilder->weld_label("lbText"))
, m_pShowTip(m_xBuilder->weld_check_button("cbShowTip"))
, m_pNext(m_xBuilder->weld_button("btnNext"))
@@ -62,15 +62,11 @@ TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent)
m_nCurrentTip = officecfg::Office::Common::Misc::LastTipOfTheDayID::get();
m_pPreview->set_size_request(ThumbSize.Width(), ThumbSize.Height());
- if (pParent != nullptr)
+ if (m_xParent.is())
{
- css::uno::Reference<css::awt::XWindow> xWindow = pParent->GetXWindow();
- if (xWindow.is())
- {
- VclPtr<vcl::Window> xVclWin(VCLUnoHelper::GetWindow(xWindow));
- if (xVclWin != nullptr)
- xVclWin->AddEventListener(LINK(this, TipOfTheDayDialog, Terminated));
- }
+ VclPtr<vcl::Window> xVclWin(VCLUnoHelper::GetWindow(m_xParent));
+ if (xVclWin != nullptr)
+ xVclWin->AddEventListener(LINK(this, TipOfTheDayDialog, Terminated));
}
const auto t0 = std::chrono::system_clock::now().time_since_epoch();
@@ -94,7 +90,7 @@ IMPL_LINK(TipOfTheDayDialog, Terminated, VclWindowEvent&, rEvent, void)
{
if (rEvent.GetId() == VclEventId::ObjectDying)
{
- m_pParent = nullptr;
+ m_xParent.clear();
TipOfTheDayDialog::response(RET_OK);
}
}
@@ -107,15 +103,11 @@ TipOfTheDayDialog::~TipOfTheDayDialog()
officecfg::Office::Common::Misc::ShowTipOfTheDay::set(m_pShowTip->get_active(), xChanges);
xChanges->commit();
- if (m_pParent != nullptr)
+ if (m_xParent.is())
{
- css::uno::Reference<css::awt::XWindow> xWindow = m_pParent->GetXWindow();
- if (xWindow.is())
- {
- VclPtr<vcl::Window> xVclWin(VCLUnoHelper::GetWindow(xWindow));
- if (xVclWin != nullptr)
- xVclWin->RemoveEventListener(LINK(this, TipOfTheDayDialog, Terminated));
- }
+ VclPtr<vcl::Window> xVclWin(VCLUnoHelper::GetWindow(m_xParent));
+ if (xVclWin != nullptr)
+ xVclWin->RemoveEventListener(LINK(this, TipOfTheDayDialog, Terminated));
}
}