summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/appuno.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/appl/appuno.cxx')
-rw-r--r--sfx2/source/appl/appuno.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index b076b5c59a19..8a5fa22cbb06 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -173,6 +173,7 @@ static char const sLockContentExtraction[] = "LockContentExtraction";
static char const sLockExport[] = "LockExport";
static char const sLockPrint[] = "LockPrint";
static char const sLockSave[] = "LockSave";
+static char const sLockEditDoc[] = "LockEditDoc";
static bool isMediaDescriptor( sal_uInt16 nSlotId )
{
@@ -888,6 +889,14 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
if (bOK)
rSet.Put( SfxBoolItem( SID_LOCK_SAVE, bVal ) );
}
+ else if (aName == sLockEditDoc)
+ {
+ bool bVal = false;
+ bool bOK = (rProp.Value >>= bVal);
+ DBG_ASSERT( bOK, "invalid type for LockEditDoc" );
+ if (bOK)
+ rSet.Put( SfxBoolItem( SID_LOCK_EDITDOC, bVal ) );
+ }
#ifdef DBG_UTIL
else
--nFoundArgs;
@@ -1117,6 +1126,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
nAdditional++;
if ( rSet.GetItemState( SID_LOCK_SAVE ) == SfxItemState::SET )
nAdditional++;
+ if ( rSet.GetItemState( SID_LOCK_EDITDOC ) == SfxItemState::SET )
+ nAdditional++;
// consider additional arguments
nProps += nAdditional;
@@ -1282,6 +1293,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
continue;
if ( nId == SID_LOCK_SAVE )
continue;
+ if ( nId == SID_LOCK_EDITDOC )
+ continue;
}
OStringBuffer aDbg("Unknown item detected: ");
@@ -1697,6 +1710,11 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
pValue[nActProp].Name = sLockSave;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue() ;
}
+ if ( rSet.GetItemState( SID_LOCK_EDITDOC, false, &pItem ) == SfxItemState::SET )
+ {
+ pValue[nActProp].Name = sLockEditDoc;
+ pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue();
+ }
}
rArgs = aSequ;