From aa10a9965146864ac368ab78231303717b035e24 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Mon, 11 Jan 2021 13:52:32 +0100 Subject: Make Fontwork gallery dialog async MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I156dc1b505b01dc7520ccfe80bbf97eba881d653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109092 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109258 Tested-by: Jenkins --- svx/source/tbxctrls/fontworkgallery.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'svx/source/tbxctrls/fontworkgallery.cxx') diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index efef6f786e0d..b9ad40f80dbe 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -52,6 +52,7 @@ FontWorkGalleryDialog::FontWorkGalleryDialog(weld::Window* pParent, SdrView& rSd : GenericDialogController(pParent, "svx/ui/fontworkgallerydialog.ui", "FontworkGalleryDialog") , mnThemeId(0xffff) , mrSdrView(rSdrView) + , mbInsertIntoPage(true) , mppSdrObject(nullptr) , mpDestModel(nullptr) , maCtlFavorites(m_xBuilder->weld_icon_view("ctlFavoriteswin")) @@ -131,9 +132,9 @@ void FontWorkGalleryDialog::fillFavorites(sal_uInt16 nThemeId) maCtlFavorites->select(0); } -void FontWorkGalleryDialog::SetSdrObjectRef( SdrObject** ppSdrObject, SdrModel* pModel ) +void FontWorkGalleryDialog::SetSdrObjectRef( SdrModel* pModel, bool bInsertIntoPage ) { - mppSdrObject = ppSdrObject; + mbInsertIntoPage = bInsertIntoPage; mpDestModel = pModel; } @@ -164,7 +165,7 @@ void FontWorkGalleryDialog::insertSelectedFontwork() // If this is not used, the correct SdrModel seems to be the one from // the mrSdrView that is used to insert (InsertObjectAtView below) the // cloned SdrObject. - const bool bUseSpecialCalcMode(nullptr != mppSdrObject && nullptr != mpDestModel); + const bool bUseSpecialCalcMode(!mbInsertIntoPage && nullptr != mpDestModel); // center shape on current view OutputDevice* pOutDev(mrSdrView.GetFirstOutputDevice()); @@ -201,7 +202,7 @@ void FontWorkGalleryDialog::insertSelectedFontwork() if (bUseSpecialCalcMode) { - *mppSdrObject = pNewObject; + mppSdrObject = pNewObject; } else { -- cgit