summaryrefslogtreecommitdiff
path: root/sc
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 /sc
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 'sc')
-rw-r--r--sc/inc/unonames.hxx1
-rw-r--r--sc/source/ui/unoobj/docuno.cxx6
2 files changed, 7 insertions, 0 deletions
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 5bc0fb2752dc..07c9c39ace30 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -529,6 +529,7 @@ inline constexpr OUString SC_UNO_BASICLIBRARIES = u"BasicLibraries"_us
inline constexpr OUString SC_UNO_DIALOGLIBRARIES = u"DialogLibraries"_ustr;
inline constexpr OUString SC_UNO_RUNTIMEUID = u"RuntimeUID"_ustr;
inline constexpr OUString SC_UNO_HASVALIDSIGNATURES = u"HasValidSignatures"_ustr;
+inline constexpr OUString SC_UNO_ALLOWLINKUPDATE = u"AllowLinkUpdate"_ustr;
inline constexpr OUString SC_UNO_ISLOADED = u"IsLoaded"_ustr;
inline constexpr OUString SC_UNO_ISUNDOENABLED = u"IsUndoEnabled"_ustr;
inline constexpr OUString SC_UNO_ISADJUSTHEIGHTENABLED = u"IsAdjustHeightEnabled"_ustr;
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 257002fb704b..aab1e6a0e81f 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -180,6 +180,7 @@ static std::span<const SfxItemPropertyMapEntry> lcl_GetDocOptPropertyMap()
{ SC_UNO_WILDCARDSENABLED, PROP_UNO_WILDCARDSENABLED, cppu::UnoType<bool>::get(), 0, 0},
{ SC_UNO_RUNTIMEUID, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0},
{ SC_UNO_HASVALIDSIGNATURES, 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::READONLY, 0},
+ { SC_UNO_ALLOWLINKUPDATE, 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::READONLY, 0},
{ SC_UNO_ISLOADED, 0, cppu::UnoType<bool>::get(), 0, 0},
{ SC_UNO_ISUNDOENABLED, 0, cppu::UnoType<bool>::get(), 0, 0},
{ SC_UNO_RECORDCHANGES, 0, cppu::UnoType<bool>::get(), 0, 0},
@@ -3006,6 +3007,11 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName )
{
aRet <<= hasValidSignatures();
}
+ else if ( aPropertyName == SC_UNO_ALLOWLINKUPDATE)
+ {
+ comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = pDocShell->getEmbeddedObjectContainer();
+ aRet <<= rEmbeddedObjectContainer.getUserAllowsLinkUpdate();
+ }
else if ( aPropertyName == SC_UNO_ISLOADED )
{
aRet <<= !pDocShell->IsEmpty();