diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 05:03:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 05:03:13 +0000 |
commit | 26f6ae4122fcce6bafa71c064f5e645c39022082 (patch) | |
tree | b0e0916f682785b3a983b71950c4623988ca6eef /sfx2/source/doc | |
parent | Adding upstream version 4:24.2.2. (diff) | |
download | libreoffice-26f6ae4122fcce6bafa71c064f5e645c39022082.tar.xz libreoffice-26f6ae4122fcce6bafa71c064f5e645c39022082.zip |
Adding upstream version 4:24.2.3.upstream/4%24.2.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index fedbfb205d..90ef2ee232 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -453,6 +453,10 @@ static void sendErrorToLOK(ErrCodeMsg error) if (error.GetCode().GetClass() == ErrCodeClass::NONE) return; + SfxViewShell* pNotifier = SfxViewShell::Current(); + if (!pNotifier) + return; + boost::property_tree::ptree aTree; aTree.put("code", error); aTree.put("kind", ""); @@ -465,7 +469,7 @@ static void sendErrorToLOK(ErrCodeMsg error) std::stringstream aStream; boost::property_tree::write_json(aStream, aTree); - SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_CALLBACK_ERROR, OString(aStream.str())); + pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_ERROR, OString(aStream.str())); } namespace diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 17ee6bf621..a6aaee75ea 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2428,7 +2428,11 @@ bool SfxObjectShell::ImportFrom(SfxMedium& rMedium, uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo(); if (xPropertySetInfo.is() && xPropertySetInfo->hasPropertyByName("_MarkAsFinal")) { - if (xPropertySet->getPropertyValue("_MarkAsFinal").get<bool>()) + Any anyMarkAsFinal = xPropertySet->getPropertyValue("_MarkAsFinal"); + if ( + ( (anyMarkAsFinal.getValueType() == cppu::UnoType<bool>::get()) && (anyMarkAsFinal.get<bool>()) ) || + ( (anyMarkAsFinal.getValueType() == cppu::UnoType<OUString>::get()) && (anyMarkAsFinal.get<OUString>() == "true") ) + ) { uno::Reference< lang::XMultiServiceFactory > xFactory(GetModel(), uno::UNO_QUERY); uno::Reference< beans::XPropertySet > xSettings(xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY); |