diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-01-11 13:52:32 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-01-14 10:23:27 +0100 |
commit | aa10a9965146864ac368ab78231303717b035e24 (patch) | |
tree | 0688380eb6cacbef5fbec079bda83a2ac2549fe1 /svx/source/tbxctrls/fontworkgallery.cxx | |
parent | e87119a3a9bca74274cf7ec46eda550c14929dc0 (diff) |
Make Fontwork gallery dialog async
Change-Id: I156dc1b505b01dc7520ccfe80bbf97eba881d653
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109092
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109258
Tested-by: Jenkins
Diffstat (limited to 'svx/source/tbxctrls/fontworkgallery.cxx')
-rw-r--r-- | svx/source/tbxctrls/fontworkgallery.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
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 { |