summaryrefslogtreecommitdiffstats
path: root/sfx2/source/doc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 05:03:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 05:03:24 +0000
commite3cf16e6fbf8d39cad8762f002b6db1d4f61ed36 (patch)
tree3c1753125149dcf36ba42a57f1574369e8524225 /sfx2/source/doc
parentAdding debian version 4:24.2.2-3. (diff)
downloadlibreoffice-e3cf16e6fbf8d39cad8762f002b6db1d4f61ed36.tar.xz
libreoffice-e3cf16e6fbf8d39cad8762f002b6db1d4f61ed36.zip
Merging upstream version 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.cxx6
-rw-r--r--sfx2/source/doc/objstor.cxx6
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);