summaryrefslogtreecommitdiff
path: root/sw/source/ui/app
diff options
context:
space:
mode:
authorThomas Lange [tl] <tl@openoffice.org>2010-05-25 11:45:06 +0200
committerThomas Lange [tl] <tl@openoffice.org>2010-05-25 11:45:06 +0200
commitc1a5e74fa9d1a364cd85049cf32f650e92851ee1 (patch)
tree01e6186bdb3ff1ebc051c207825b43b44690ffe1 /sw/source/ui/app
parent9c4d0fbe73cf1311aa82cc986206fdb9ddd9c6c3 (diff)
cws tl79: #i110254# security tab page in 'File/Properties'
Diffstat (limited to 'sw/source/ui/app')
-rwxr-xr-xsw/source/ui/app/docsh.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 6b4473fbee99..538c984c1fc8 100755
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -1364,6 +1364,18 @@ const ::sfx2::IXmlIdRegistry* SwDocShell::GetXmlIdRegistry() const
}
+bool SwDocShell::IsChangeRecording() const
+{
+ return (pWrtShell->GetRedlineMode() & nsRedlineMode_t::REDLINE_ON) != 0;
+}
+
+
+bool SwDocShell::HasChangeRecordProtection() const
+{
+ return pWrtShell->getIDocumentRedlineAccess()->GetRedlinePassword().getLength() > 0;
+}
+
+
void SwDocShell::SetChangeRecording( bool bActivate )
{
USHORT nOn = bActivate ? nsRedlineMode_t::REDLINE_ON : 0;
@@ -1379,10 +1391,9 @@ bool SwDocShell::SetProtectionPassword( const String &rNewPassword )
const SfxPoolItem* pItem = NULL;
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
-
Sequence< sal_Int8 > aPasswd = pIDRA->GetRedlinePassword();
if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, FALSE, &pItem )
- && ((SfxBoolItem*)pItem)->GetValue() == (aPasswd.getLength() != 0))
+ && ((SfxBoolItem*)pItem)->GetValue() == aPasswd.getLength() > 0)
return false;
bool bRes = false;