summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/formatcontentcontrol.hxx12
-rw-r--r--sw/inc/unoprnms.hxx1
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index 94399d6818e8..e561fa6e23fb 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -179,6 +179,9 @@ class SW_DLLPUBLIC SwContentControl : public sw::BroadcastingModify
/// The id: just remembered.
sal_Int32 m_nId = 0;
+ /// The control and content locks: mostly just remembered.
+ OUString m_aLock;
+
/// Stores a list item index, in case the doc model is not yet updated.
// i.e. temporarily store the selected item until the text is inserted by GotoContentControl.
std::optional<size_t> m_oSelectedListItem;
@@ -359,8 +362,17 @@ public:
sal_Int32 GetId() const { return m_nId; }
+ // At the design level, define how the control should be locked. No effect at implementation lvl
+ void SetLock(bool bLockContent, bool bLockControl);
+ void SetLock(const OUString& rLock) { m_aLock = rLock; }
+
+ // At the design level, get how the control is locked. Does not reflect actual implementation.
+ std::optional<bool> GetLock(bool bControl) const;
+ const OUString& GetLock() const { return m_aLock; }
+
void SetReadWrite(bool bReadWrite) { m_bReadWrite = bReadWrite; }
+ // At the implementation level, define whether the user can directly modify the contents.
bool GetReadWrite() const { return m_bReadWrite; }
SwContentControlType GetType() const;
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 199f4847c930..2e7158fac97e 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -917,6 +917,7 @@ inline constexpr OUStringLiteral UNO_NAME_COLOR = u"Color";
inline constexpr OUStringLiteral UNO_NAME_ALIAS = u"Alias";
inline constexpr OUStringLiteral UNO_NAME_TAG = u"Tag";
inline constexpr OUStringLiteral UNO_NAME_ID = u"Id";
+inline constexpr OUStringLiteral UNO_NAME_LOCK = u"Lock";
inline constexpr OUStringLiteral UNO_NAME_DATE_STRING = u"DateString";
#endif