svx: check SfxObjectShell::Current()

Change-Id: Ie8e504491d350d582620a5c421d6243239d437d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174976
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
Xisco Fauli 2024-10-15 16:06:41 +02:00
parent a5f45b816e
commit 2e2d0a65e3

View file

@ -3932,9 +3932,9 @@ namespace
std::vector<sfx::CurrencyID> aCurrencyIDs;
SfxObjectShell* pDocShell = SfxObjectShell::Current();
if (auto pModelAccessor = pDocShell->GetDocumentModelAccessor())
aCurrencyIDs = pModelAccessor->getDocumentCurrencies();
if (SfxObjectShell* pDocShell = SfxObjectShell::Current())
if (auto pModelAccessor = pDocShell->GetDocumentModelAccessor())
aCurrencyIDs = pModelAccessor->getDocumentCurrencies();
SvxCurrencyToolBoxControl::GetCurrencySymbols(aList, true, aCurrencyList, aCurrencyIDs);