summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/securitypage.cxx
blob: 2ac8f6a43feecb6cdf6375c5f2e064d5c9dcbab7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
/*************************************************************************
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * Copyright 2000, 2010 Oracle and/or its affiliates.
 *
 * OpenOffice.org - a multi-platform office productivity suite
 *
 * This file is part of OpenOffice.org.
 *
 * OpenOffice.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3
 * only, as published by the Free Software Foundation.
 *
 * OpenOffice.org is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License version 3 for more details
 * (a copy is included in the LICENSE file that accompanied this code).
 *
 * You should have received a copy of the GNU Lesser General Public License
 * version 3 along with OpenOffice.org.  If not, see
 * <http://www.openoffice.org/license.html>
 * for a copy of the LGPLv3 License.
 *
 ************************************************************************/

// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"

#include "sfx2/securitypage.hxx"

#include "securitypage.hrc"
#include "sfxresid.hxx"

#include <sfx2/sfx.hrc>
#include <sfx2/sfxsids.hrc>
#include <sfx2/objsh.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/passwd.hxx>

#include <vcl/button.hxx>
#include <vcl/edit.hxx>
#include <vcl/fixed.hxx>
#include <vcl/msgbox.hxx>
#include <svl/eitem.hxx>
#include <svl/poolitem.hxx>
#include <svl/intitem.hxx>
#include <svl/PasswordHelper.hxx>
#include <svtools/xwindowitem.hxx>


using namespace ::com::sun::star;

//////////////////////////////////////////////////////////////////////


namespace
{
    enum RedliningMode  { RL_NONE, RL_WRITER, RL_CALC };
    enum RedlineFunc    { RF_ON, RF_PROTECT };

/*
    bool QueryIsEnabled( USHORT _nSlot )
    {
        bool bRes = false;
        SfxViewShell* pViewSh = SfxViewShell::Current();
        if (pViewSh)
        {
            const SfxPoolItem* pItem;
            SfxDispatcher* pDisp = pViewSh->GetDispatcher();
            SfxItemState eState = pDisp->QueryState( _nSlot, pItem );
            bRes = (eState & SFX_ITEM_DISABLED) == 0;
        }
        return bRes;
    }
*/

    bool QueryState( USHORT _nSlot, bool& _rValue )
    {
        bool bRet = false;
        SfxViewShell* pViewSh = SfxViewShell::Current();
        if (pViewSh)
        {
            const SfxPoolItem* pItem;
            SfxDispatcher* pDisp = pViewSh->GetDispatcher();
            SfxItemState nState = pDisp->QueryState( _nSlot, pItem );
            bRet = SFX_ITEM_AVAILABLE <= nState;
            if (bRet)
                _rValue = ( static_cast< const SfxBoolItem* >( pItem ) )->GetValue();
        }
        return bRet;
    }


    bool QueryRecordChangesProtectionState( RedliningMode _eMode, bool& _rValue )
    {
        bool bRet = false;
        if (_eMode != RL_NONE)
        {
            USHORT nSlot = _eMode == RL_WRITER ? FN_REDLINE_PROTECT : SID_CHG_PROTECT;
            bRet = QueryState( nSlot, _rValue );
        }
        return bRet;
    }


    bool QueryRecordChangesState( RedliningMode _eMode, bool& _rValue )
    {
        bool bRet = false;
        if (_eMode != RL_NONE)
        {
            USHORT nSlot = _eMode == RL_WRITER ? FN_REDLINE_ON : FID_CHG_RECORD;
            bRet = QueryState( nSlot, _rValue );
        }
        return bRet;
    }
}


//////////////////////////////////////////////////////////////////////


static short lcl_GetPassword(
    Window *pParent,
    bool bProtect,
    /*out*/String &rPassword )
{
    bool bRes = false;
    SfxPasswordDialog aPasswdDlg( pParent );
    const String aTitle( SfxResId( bProtect ? RID_SFX_PROTECT_RECORDS : RID_SFX_UNPROTECT_RECORDS ) );
    aPasswdDlg.SetText( aTitle );
    aPasswdDlg.SetMinLen( 1 );
    if (bProtect)
        aPasswdDlg.ShowExtras( SHOWEXTRAS_CONFIRM );
    if (RET_OK == aPasswdDlg.Execute() && aPasswdDlg.GetPassword().Len() > 0)
    {
        rPassword = aPasswdDlg.GetPassword();
        bRes = true;
    }
    return bRes;
}


static bool lcl_IsPasswordCorrect( const String &rPassword )
{
    bool bRes = false;

    SfxObjectShell* pCurDocShell = SfxObjectShell::Current();
    uno::Sequence< sal_Int8 >   aPasswordHash;
    pCurDocShell->GetProtectionHash( aPasswordHash );

    // check if supplied password was correct
    uno::Sequence< sal_Int8 > aNewPasswd( aPasswordHash );
    SvPasswordHelper::GetHashPassword( aNewPasswd, rPassword );
    if (SvPasswordHelper::CompareHashPassword( aPasswordHash, rPassword ))
        bRes = true;    // password was correct
    else
        InfoBox( NULL, String( SfxResId( RID_SFX_INCORRECT_PASSWORD ) ) ).Execute();

    return bRes;
}


//////////////////////////////////////////////////////////////////////


struct SfxSecurityPage_Impl
{
    SfxSecurityPage &   m_rMyTabPage;

    FixedLine           m_aNewPasswordToOpenFL;
    FixedText           m_aNewPasswordToOpenFT;
    Edit                m_aNewPasswordToOpenED;
    FixedText           m_aConfirmPasswordToOpenFT;
    Edit                m_aConfirmPasswordToOpenED;
    FixedText           m_aNewPasswordInfoFT;

    FixedLine           m_aNewPasswordToModifyFL;
    FixedText           m_aNewPasswordToModifyFT;
    Edit                m_aNewPasswordToModifyED;
    FixedText           m_aConfirmPasswordToModifyFT;
    Edit                m_aConfirmPasswordToModifyED;

    FixedLine           m_aOptionsFL;
    CheckBox            m_aOpenReadonlyCB;
    CheckBox            m_aRecordChangesCB;         // for record changes
    PushButton          m_aChangeProtectionPB;      // for record changes
    String              m_aProtectSTR;              // for record changes
    String              m_aUnProtectSTR;            // for record changes
    RedliningMode       m_eRedlingMode;             // for record changes

    bool                m_bOrigPasswordIsConfirmed;
    bool                m_bNewPasswordIsValid;
    String              m_aNewPassword;

    String              m_aEndRedliningWarning;
    bool                m_bEndRedliningWarningDone;

    DECL_LINK( RecordChangesCBToggleHdl, void* );
    DECL_LINK( ChangeProtectionPBHdl, void* );

    SfxSecurityPage_Impl( SfxSecurityPage &rDlg, const SfxItemSet &rItemSet );
    ~SfxSecurityPage_Impl();

    BOOL    FillItemSet_Impl( SfxItemSet & );
    void    Reset_Impl( const SfxItemSet & );
};


SfxSecurityPage_Impl::SfxSecurityPage_Impl( SfxSecurityPage &rTabPage, const SfxItemSet & ) :
    m_rMyTabPage                    (rTabPage),
    m_aNewPasswordToOpenFL          (&rTabPage, SfxResId( PASSWORD_TO_OPEN_FL ) ),
    m_aNewPasswordToOpenFT          (&rTabPage, SfxResId( PASSWORD_TO_OPEN_FT ) ),
    m_aNewPasswordToOpenED          (&rTabPage, SfxResId( PASSWORD_TO_OPEN_ED ) ),
    m_aConfirmPasswordToOpenFT      (&rTabPage, SfxResId( CONFIRM_PASSWORD_TO_OPEN_FT ) ),
    m_aConfirmPasswordToOpenED      (&rTabPage, SfxResId( CONFIRM_PASSWORD_TO_OPEN_ED ) ),
    m_aNewPasswordInfoFT            (&rTabPage, SfxResId( PASSWORD_INFO_FT ) ),
    m_aNewPasswordToModifyFL        (&rTabPage, SfxResId( PASSWORD_TO_MODIFY_FL ) ),
    m_aNewPasswordToModifyFT        (&rTabPage, SfxResId( PASSWORD_TO_MODIFY_FT ) ),
    m_aNewPasswordToModifyED        (&rTabPage, SfxResId( PASSWORD_TO_MODIFY_ED ) ),
    m_aConfirmPasswordToModifyFT    (&rTabPage, SfxResId( CONFIRM_PASSWORD_TO_MODIFY_FT ) ),
    m_aConfirmPasswordToModifyED    (&rTabPage, SfxResId( CONFIRM_PASSWORD_TO_MODIFY_ED ) ),
    m_aOptionsFL                    (&rTabPage, SfxResId( OPTIONS_FL ) ),
    m_aOpenReadonlyCB               (&rTabPage, SfxResId( OPEN_READONLY_CB ) ),
    m_aRecordChangesCB              (&rTabPage, SfxResId( RECORD_CHANGES_CB ) ),
    m_aChangeProtectionPB           (&rTabPage, SfxResId( CHANGE_PROTECTION_PB ) ),
    m_aProtectSTR                   ( SfxResId( STR_PROTECT ) ),
    m_aUnProtectSTR                 ( SfxResId( STR_UNPROTECT ) ),
    m_eRedlingMode                  ( RL_NONE ),
    m_bOrigPasswordIsConfirmed      ( false ),
    m_bNewPasswordIsValid           ( false ),
    m_aEndRedliningWarning          ( SfxResId( STR_END_REDLINING_WARNING ) ),
    m_bEndRedliningWarningDone      ( false )
{
    m_aChangeProtectionPB.SetText( m_aProtectSTR );
    // adjust button width if necessary
    long nBtnTextWidth = 0;
    long nTemp = m_aChangeProtectionPB.GetCtrlTextWidth( m_aChangeProtectionPB.GetText() );
    if (nTemp > nBtnTextWidth)
        nBtnTextWidth = nTemp;

    // force toggle hdl called before visual change of checkbox
    m_aRecordChangesCB.SetStyle( m_aRecordChangesCB.GetStyle() | WB_EARLYTOGGLE );
    m_aRecordChangesCB.SetToggleHdl( LINK( this, SfxSecurityPage_Impl, RecordChangesCBToggleHdl ) );
    m_aChangeProtectionPB.SetClickHdl( LINK( this, SfxSecurityPage_Impl, ChangeProtectionPBHdl ) );


    // #i112277: for the time being (OOO 3.3) the following options should not
    // be available. In the long run however it is planned to implement the yet
    // missing functionality. Thus now we hide them and move the remaining ones up.
    m_aNewPasswordToOpenFL.Hide();
    m_aNewPasswordToOpenFT.Hide();
    m_aNewPasswordToOpenED.Hide();
    m_aConfirmPasswordToOpenFT.Hide();
    m_aConfirmPasswordToOpenED.Hide();
    m_aNewPasswordInfoFT.Hide();
    m_aNewPasswordToModifyFL.Hide();
    m_aNewPasswordToModifyFT.Hide();
    m_aNewPasswordToModifyED.Hide();
    m_aConfirmPasswordToModifyFT.Hide();
    m_aConfirmPasswordToModifyED.Hide();
    const long nDelta = m_aOptionsFL.GetPosPixel().Y() - m_aNewPasswordToOpenFL.GetPosPixel().Y();
    Point aPos;
    aPos = m_aOptionsFL.GetPosPixel();
    aPos.Y() -= nDelta;
    m_aOptionsFL.SetPosPixel( aPos );
    aPos = m_aOpenReadonlyCB.GetPosPixel();
    aPos.Y() -= nDelta;
    m_aOpenReadonlyCB.SetPosPixel( aPos );
    aPos = m_aRecordChangesCB.GetPosPixel();
    aPos.Y() -= nDelta;
    m_aRecordChangesCB.SetPosPixel( aPos );
    aPos = m_aChangeProtectionPB.GetPosPixel();
    aPos.Y() -= nDelta;
    m_aChangeProtectionPB.SetPosPixel( aPos );
}


SfxSecurityPage_Impl::~SfxSecurityPage_Impl()
{
}


BOOL SfxSecurityPage_Impl::FillItemSet_Impl( SfxItemSet & )
{
    bool bModified = false;

    SfxObjectShell* pCurDocShell = SfxObjectShell::Current();
    if (pCurDocShell&& !pCurDocShell->IsReadOnly())
    {
        if (m_eRedlingMode != RL_NONE )
        {
            const bool bDoRecordChanges     = m_aRecordChangesCB.IsChecked();
            const bool bDoChangeProtection  = m_aChangeProtectionPB.GetText() != m_aProtectSTR;

            // sanity checks
            DBG_ASSERT( bDoRecordChanges || !bDoChangeProtection, "no change recording should imply no change protection" );
            DBG_ASSERT( bDoChangeProtection || !bDoRecordChanges, "no change protection should imply no change recording" );
            DBG_ASSERT( !bDoChangeProtection || m_aNewPassword.Len() > 0, "change protection should imply password length is > 0" );
            DBG_ASSERT( bDoChangeProtection || m_aNewPassword.Len() == 0, "no change protection should imply password length is 0" );

            // change recording
            if (bDoRecordChanges != pCurDocShell->IsChangeRecording())
            {
                pCurDocShell->SetChangeRecording( bDoRecordChanges );
                bModified = true;
            }

            // change record protection
            if (m_bNewPasswordIsValid &&
                bDoChangeProtection != pCurDocShell->HasChangeRecordProtection())
            {
                DBG_ASSERT( !bDoChangeProtection || bDoRecordChanges,
                        "change protection requires record changes to be active!" );
                pCurDocShell->SetProtectionPassword( m_aNewPassword );
                bModified = true;
            }
        }

        // open read-only?
        const sal_Bool bDoOpenReadonly = m_aOpenReadonlyCB.IsChecked();
        if (pCurDocShell->HasSecurityOptOpenReadOnly() &&
            bDoOpenReadonly != pCurDocShell->IsSecurityOptOpenReadOnly())
        {
            pCurDocShell->SetSecurityOptOpenReadOnly( bDoOpenReadonly );
            bModified = true;
        }
    }

    return bModified;
}


void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & )
{
    SfxObjectShell* pCurDocShell = SfxObjectShell::Current();

    String sNewText = m_aProtectSTR;
    if (!pCurDocShell)
    {
        // no doc -> hide document settings
        m_aOpenReadonlyCB.Disable();
        m_aRecordChangesCB.Disable();
        m_aChangeProtectionPB.Disable();
    }
    else
    {
        bool bIsHTMLDoc = false;
        SfxViewShell* pViewSh = SfxViewShell::Current();
        if (pViewSh)
        {
            const SfxPoolItem* pItem;
            SfxDispatcher* pDisp = pViewSh->GetDispatcher();
            if (SFX_ITEM_AVAILABLE <= pDisp->QueryState( SID_HTML_MODE, pItem ))
            {
                USHORT nMode = static_cast< const SfxUInt16Item* >( pItem )->GetValue();
                bIsHTMLDoc = ( ( nMode & HTMLMODE_ON ) != 0 );
            }
        }

        sal_Bool bIsReadonly = pCurDocShell->IsReadOnly();
        if (pCurDocShell->HasSecurityOptOpenReadOnly() && !bIsHTMLDoc)
        {
            m_aOpenReadonlyCB.Check( pCurDocShell->IsSecurityOptOpenReadOnly() );
            m_aOpenReadonlyCB.Enable( !bIsReadonly );
        }
        else
            m_aOpenReadonlyCB.Disable();

        bool bRecordChanges;
        if (QueryRecordChangesState( RL_WRITER, bRecordChanges ) && !bIsHTMLDoc)
            m_eRedlingMode = RL_WRITER;
        else if (QueryRecordChangesState( RL_CALC, bRecordChanges ))
            m_eRedlingMode = RL_CALC;
        else
            m_eRedlingMode = RL_NONE;

        if (m_eRedlingMode != RL_NONE)
        {
            bool bProtection;
            QueryRecordChangesProtectionState( m_eRedlingMode, bProtection );

            m_aChangeProtectionPB.Enable( !bIsReadonly );
            // set the right text
            if (bProtection)
                sNewText = m_aUnProtectSTR;

            m_aRecordChangesCB.Check( bRecordChanges );
            m_aRecordChangesCB.Enable( /*!bProtection && */!bIsReadonly );

            m_bOrigPasswordIsConfirmed = true;   // default case if no password is set
            uno::Sequence< sal_Int8 > aPasswordHash;
            // check if password is available
            if (pCurDocShell->GetProtectionHash( aPasswordHash ) &&
                aPasswordHash.getLength() > 0)
                m_bOrigPasswordIsConfirmed = false;  // password found, needs to be confirmed later on
        }
        else
        {
            // A Calc document that is shared will have 'm_eRedlingMode == RL_NONE'
            // In shared documents change recording and protection must be disabled,
            // similar to documents that do not support change recording at all.
            m_aRecordChangesCB.Check( FALSE );
            m_aRecordChangesCB.Disable();
            m_aChangeProtectionPB.Check( FALSE );
            m_aChangeProtectionPB.Disable();
        }
    }

    m_aChangeProtectionPB.SetText( sNewText );
}


IMPL_LINK( SfxSecurityPage_Impl, RecordChangesCBToggleHdl, void*, EMPTYARG )
{
    // when change recording gets disabled protection must be disabled as well
    if (!m_aRecordChangesCB.IsChecked())    // the new check state is already present, thus the '!'
    {
        bool bAlreadyDone = false;
        if (!m_bEndRedliningWarningDone)
        {
            WarningBox aBox( m_rMyTabPage.GetParent(), WinBits(WB_YES_NO | WB_DEF_NO),
                    m_aEndRedliningWarning );
            if (aBox.Execute() != RET_YES)
                bAlreadyDone = true;
            else
                m_bEndRedliningWarningDone = true;
        }

        const bool bNeedPasssword = !m_bOrigPasswordIsConfirmed
                && m_aChangeProtectionPB.GetText() != m_aProtectSTR;
        if (!bAlreadyDone && bNeedPasssword)
        {
            String aPasswordText;

            // dialog canceled or no password provided
            if (!lcl_GetPassword( m_rMyTabPage.GetParent(), false, aPasswordText ))
                bAlreadyDone = true;

            // ask for password and if dialog is canceled or no password provided return
            if (lcl_IsPasswordCorrect( aPasswordText ))
                m_bOrigPasswordIsConfirmed = true;
            else
                bAlreadyDone = true;
        }

        if (bAlreadyDone)
            m_aRecordChangesCB.Check( true );     // restore original state
        else
        {
            // remember required values to change protection and change recording in
            // FillItemSet_Impl later on if password was correct.
            m_bNewPasswordIsValid = true;
            m_aNewPassword = String();

            m_aChangeProtectionPB.SetText( m_aProtectSTR );
        }
    }

    return 0;
}


IMPL_LINK( SfxSecurityPage_Impl, ChangeProtectionPBHdl, void*, EMPTYARG )
{
    if (m_eRedlingMode == RL_NONE)
        return 0;

    // the push button text is always the opposite of the current state. Thus:
    const bool bCurrentProtection = m_aChangeProtectionPB.GetText() != m_aProtectSTR;

    // ask user for password (if still necessary)
    String aPasswordText;
    bool bNewProtection = !bCurrentProtection;
    const bool bNeedPassword = bNewProtection || !m_bOrigPasswordIsConfirmed;
    if (bNeedPassword)
    {
        // ask for password and if dialog is canceled or no password provided return
        if (!lcl_GetPassword( m_rMyTabPage.GetParent(), bNewProtection, aPasswordText ))
            return 0;

        // provided password still needs to be checked?
        if (!bNewProtection && !m_bOrigPasswordIsConfirmed)
        {
            if (lcl_IsPasswordCorrect( aPasswordText ))
                m_bOrigPasswordIsConfirmed = true;
            else
                return 0;
        }
    }
    DBG_ASSERT( m_bOrigPasswordIsConfirmed, "ooops... this should not have happened!" );

    // remember required values to change protection and change recording in
    // FillItemSet_Impl later on if password was correct.
    m_bNewPasswordIsValid = true;
    m_aNewPassword = bNewProtection? aPasswordText : String();

//    // RecordChangesCB is enabled if protection is off
//    m_aRecordChangesCB.Enable( !bNewProtection );
    m_aRecordChangesCB.Check( bNewProtection );
    // toggle text of button "Protect" <-> "Unprotect"
    m_aChangeProtectionPB.SetText( bNewProtection ? m_aUnProtectSTR : m_aProtectSTR );

    return 0;
}


//////////////////////////////////////////////////////////////////////


SfxTabPage* SfxSecurityPage::Create( Window * pParent, const SfxItemSet & rItemSet )
{
    return new SfxSecurityPage( pParent, rItemSet );
}


SfxSecurityPage::SfxSecurityPage( Window* pParent, const SfxItemSet& rItemSet ) :
    SfxTabPage( pParent, SfxResId( TP_DOCINFOSECURITY ), rItemSet )
{
    m_pImpl = std::auto_ptr< SfxSecurityPage_Impl >(new SfxSecurityPage_Impl( *this, rItemSet ));

    FreeResource();
}


SfxSecurityPage::~SfxSecurityPage()
{
}


BOOL SfxSecurityPage::FillItemSet( SfxItemSet & rItemSet )
{
    bool bModified = false;
    DBG_ASSERT( m_pImpl.get(), "implementation pointer is 0. Still in c-tor?" );
    if (m_pImpl.get() != 0)
        bModified =  m_pImpl->FillItemSet_Impl( rItemSet );
    return bModified;
}


void SfxSecurityPage::Reset( const SfxItemSet & rItemSet )
{
    DBG_ASSERT( m_pImpl.get(), "implementation pointer is 0. Still in c-tor?" );
    if (m_pImpl.get() != 0)
        m_pImpl->Reset_Impl( rItemSet );
}


//////////////////////////////////////////////////////////////////////