summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-12-21 11:34:30 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-12-21 21:14:07 +0100
commitb45f360fcffe076ccec7be790604665c80f7380e (patch)
tree3bbcc14dcdc83adc983af517b537a4448cb1f4db /sw
parent789a737ac92c4f2b0eb9820b99c43cc8253c8b29 (diff)
export UserAllowsLinkUpdate via AllowLinkUpdate property
Change-Id: I3dca61490ba9ad2912faf0bb431fb643f248c247 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161123 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/unomap.hxx2
-rw-r--r--sw/inc/unoprnms.hxx1
-rw-r--r--sw/source/core/unocore/unomap.cxx1
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx6
4 files changed, 10 insertions, 0 deletions
diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx
index c4299ea2ffcf..7c123f489593 100644
--- a/sw/inc/unomap.hxx
+++ b/sw/inc/unomap.hxx
@@ -299,6 +299,8 @@ class SfxItemPropertySet;
#define WID_DOC_DIALOG_LIBRARIES 1105
#define WID_DOC_VBA_DOCOBJ 1106
+#define WID_DOC_ALLOW_LINK_UPDATE 1107
+
// AutoText
#define WID_GROUP_PATH 0
#define WID_GROUP_TITLE 1
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 360c2c1953d0..396e8e3d7e29 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -804,6 +804,7 @@ inline constexpr OUString UNO_NAME_PARA_STYLE_CONDITIONS = u"ParaStyleConditions
inline constexpr OUString UNO_NAME_ROLE = u"Role"_ustr;
inline constexpr OUString UNO_NAME_FIELD_CODE = u"FieldCode"_ustr;
inline constexpr OUString UNO_NAME_HAS_VALID_SIGNATURES = u"HasValidSignatures"_ustr;
+inline constexpr OUString UNO_NAME_ALLOW_LINK_UPDATE = u"AllowLinkUpdate"_ustr;
inline constexpr OUString UNO_NAME_CHAR_AUTO_STYLE_NAME = u"CharAutoStyleName"_ustr;
inline constexpr OUString UNO_NAME_PARA_AUTO_STYLE_NAME = u"ParaAutoStyleName"_ustr;
inline constexpr OUString UNO_NAME_LAYOUT_SIZE = u"LayoutSize"_ustr;
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index 8be847e1031e..c8b1c1ed26be 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -668,6 +668,7 @@ std::span<const SfxItemPropertyMapEntry> SwUnoPropertyMapProvider::GetPropertyMa
{ UNO_NAME_LOCK_UPDATES, WID_DOC_LOCK_UPDATES, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0},
{ u"UndocumentedWriterfilterHack"_ustr, WID_DOC_WRITERFILTER, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0},
{ UNO_NAME_HAS_VALID_SIGNATURES, WID_DOC_HAS_VALID_SIGNATURES, cppu::UnoType<bool>::get(), PropertyAttribute::READONLY, 0},
+ { UNO_NAME_ALLOW_LINK_UPDATE, WID_DOC_ALLOW_LINK_UPDATE, cppu::UnoType<bool>::get(), PropertyAttribute::READONLY, 0},
{ UNO_NAME_BUILDID, WID_DOC_BUILDID, cppu::UnoType<OUString>::get(), 0, 0},
{ UNO_NAME_DOC_INTEROP_GRAB_BAG, WID_DOC_INTEROP_GRAB_BAG, cppu::UnoType< cppu::UnoSequenceType<css::beans::PropertyValue> >::get(), PROPERTY_NONE, 0 },
{ UNO_NAME_DEFAULT_PAGE_MODE, WID_DOC_DEFAULT_PAGE_MODE, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0},
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 8e1a5847b22e..4da5bc3adbb1 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2133,6 +2133,12 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
case WID_DOC_INTEROP_GRAB_BAG:
getGrabBagItem(aAny);
break;
+ case WID_DOC_ALLOW_LINK_UPDATE:
+ {
+ comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = m_pDocShell->getEmbeddedObjectContainer();
+ aAny <<= rEmbeddedObjectContainer.getUserAllowsLinkUpdate();
+ }
+ break;
default:
{