summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorThomas Lange [tl] <tl@openoffice.org>2010-03-04 16:14:56 +0100
committerThomas Lange [tl] <tl@openoffice.org>2010-03-04 16:14:56 +0100
commit7cd3ea794099e257d99748908855e61aa9df89eb (patch)
tree4395ce632e89661cba0c0cbb34e0f398d3836965 /cui
parent5d80039860ebc67494e489137138fbc935089cc0 (diff)
#i109634# password to open/modify dialog
Diffstat (limited to 'cui')
-rwxr-xr-xcui/source/dialogs/passwdomdlg.cxx117
-rwxr-xr-xcui/source/dialogs/passwdomdlg.hrc1
-rwxr-xr-xcui/source/dialogs/passwdomdlg.src56
-rwxr-xr-xcui/source/factory/dlgfact.cxx10
-rwxr-xr-xcui/source/factory/dlgfact.hxx3
-rwxr-xr-xcui/source/inc/passwdomdlg.hxx8
6 files changed, 111 insertions, 84 deletions
diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx
index 42a930febd89..b43d077bde3f 100755
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -50,25 +50,22 @@
class PasswordReenterEdit_Impl : public Edit
{
String m_aDefaultTxt;
- bool m_bForceNonEmptyPasswd;
// disallow use of copy c-tor and assignment operator
PasswordReenterEdit_Impl( const PasswordReenterEdit_Impl & );
PasswordReenterEdit_Impl & operator = ( const PasswordReenterEdit_Impl & );
public:
- PasswordReenterEdit_Impl( Window * pParent, const ResId &rResId, bool bForceNonEmptyPasswd );
+ PasswordReenterEdit_Impl( Window * pParent, const ResId &rResId );
virtual ~PasswordReenterEdit_Impl();
// Edit
-// virtual void Modify();
virtual void Paint( const Rectangle& rRect );
};
-PasswordReenterEdit_Impl::PasswordReenterEdit_Impl( Window * pParent, const ResId &rResId, bool bForceNonEmptyPasswd ) :
- Edit( pParent, rResId ),
- m_bForceNonEmptyPasswd( bForceNonEmptyPasswd )
+PasswordReenterEdit_Impl::PasswordReenterEdit_Impl( Window * pParent, const ResId &rResId ) :
+ Edit( pParent, rResId )
{
m_aDefaultTxt = String( CUI_RES( STR_PASSWD_MUST_BE_CONFIRMED ) );
}
@@ -78,28 +75,22 @@ PasswordReenterEdit_Impl::~PasswordReenterEdit_Impl()
{
}
-/*
-void PasswordReenterEdit_Impl::Modify()
-{
- Edit::Modify();
- SetModifyFlag();
- if (m_bForceNonEmptyPasswd && GetText().Len() == 0)
- Invalidate(); // get the m_aDefaultTxt displayed again
-}
-*/
void PasswordReenterEdit_Impl::Paint( const Rectangle& rRect )
{
- if (!IsEnabled() || !IsModified() || (m_bForceNonEmptyPasswd && GetText().Len() == 0))
+ if (GetText().Len() == 0)
{
- Push( PUSH_FILLCOLOR | PUSH_TEXTFILLCOLOR );
-
+ Push( /*PUSH_FILLCOLOR | PUSH_TEXTFILLCOLOR |*/ PUSH_TEXTCOLOR );
+/*
Color aFillColor( GetParent()->GetBackground().GetColor() );
- SetLineColor();
+ SetLineColor(); // don't draw a border when painting the Edit field rectangle with the new background color
SetFillColor( aFillColor );
SetTextFillColor( aFillColor );
+ SetTextColor( GetParent()->GetTextColor() ); // use plain text color even if the Edit field is disabled (it is hard to read the text otherwise)
DrawRect( Rectangle( Point(), GetOutputSizePixel() ) );
+*/
+ SetTextColor( Color( COL_GRAY ) );
DrawText( Point(), m_aDefaultTxt );
Pop();
@@ -131,24 +122,25 @@ struct PasswordToOpenModifyDialog_Impl
FixedText m_aReenterPasswdToModifyFT;
PasswordReenterEdit_Impl m_aReenterPasswdToModifyED;
FixedImage m_aPasswdToModifyMatchFI;
-
- bool m_bReenterPasswdToOpenEdited;
- bool m_bReenterPasswdToModifyEdited;
+ CheckBox m_aOpenReadonlyCB;
DECL_LINK( ModifyHdl, Edit * );
- PasswordToOpenModifyDialog_Impl( Window * pParent );
+ PasswordToOpenModifyDialog_Impl( Window * pParent, sal_uInt16 nMinPasswdLen, sal_uInt16 nMaxPasswdLen );
~PasswordToOpenModifyDialog_Impl();
};
-PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl( Window * pParent ) :
+PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl(
+ Window * pParent,
+ sal_uInt16 nMinPasswdLen,
+ sal_uInt16 nMaxPasswdLen ) :
m_pParent( pParent ),
m_aPasswdToOpenFT ( pParent, CUI_RES( FT_PASSWD_TO_OPEN ) ),
m_aPasswdToOpenED ( pParent, CUI_RES( ED_PASSWD_TO_OPEN ) ),
m_aReenterPasswdToOpenFT ( pParent, CUI_RES( FT_REENTER_PASSWD_TO_OPEN ) ),
- m_aReenterPasswdToOpenED ( pParent, CUI_RES( ED_REENTER_PASSWD_TO_OPEN ), true ),
+ m_aReenterPasswdToOpenED ( pParent, CUI_RES( ED_REENTER_PASSWD_TO_OPEN ) ),
m_aPasswdToOpenMatchFI ( pParent, CUI_RES( FI_PASSWD_TO_OPEN_MATCH ) ),
m_aPasswdNoteFT ( pParent, CUI_RES( FT_PASSWD_NOTE ) ),
m_aButtonsFL ( pParent, CUI_RES( FL_BUTTONS ) ),
@@ -159,10 +151,9 @@ PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl( Window * pPare
m_aPasswdToModifyFT ( pParent, CUI_RES( FT_PASSWD_TO_MODIFY ) ),
m_aPasswdToModifyED ( pParent, CUI_RES( ED_PASSWD_TO_MODIFY ) ),
m_aReenterPasswdToModifyFT ( pParent, CUI_RES( FT_REENTER_PASSWD_TO_MODIFY ) ),
- m_aReenterPasswdToModifyED ( pParent, CUI_RES( ED_REENTER_PASSWD_TO_MODIFY ), false ),
+ m_aReenterPasswdToModifyED ( pParent, CUI_RES( ED_REENTER_PASSWD_TO_MODIFY ) ),
m_aPasswdToModifyMatchFI ( pParent, CUI_RES( FI_PASSWD_TO_MODIFY_MATCH ) ),
- m_bReenterPasswdToOpenEdited ( false ),
- m_bReenterPasswdToModifyEdited ( false )
+ m_aOpenReadonlyCB ( pParent, CUI_RES( CB_OPEN_READONLY ) )
{
const sal_Bool bHighContrast = pParent->GetSettings().GetStyleSettings().GetHighContrastMode();
const Image aImage( CUI_RES( bHighContrast ? IMG_PASSWD_MATCH_HC : IMG_PASSWD_MATCH ) );
@@ -178,10 +169,20 @@ PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl( Window * pPare
m_aPasswdToModifyED.SetModifyHdl( aModifyLink );
m_aReenterPasswdToModifyED.SetModifyHdl( aModifyLink );
- m_aReenterPasswdToOpenED.Enable( FALSE );
- m_aReenterPasswdToModifyED.Enable( FALSE );
m_aOk.Enable( FALSE );
+ if (nMaxPasswdLen)
+ {
+ m_aPasswdToOpenED.SetMaxTextLen( nMaxPasswdLen );
+ m_aReenterPasswdToOpenED.SetMaxTextLen( nMaxPasswdLen );
+ m_aPasswdToModifyED.SetMaxTextLen( nMaxPasswdLen );
+ m_aReenterPasswdToModifyED.SetMaxTextLen( nMaxPasswdLen );
+ }
+
+ (void) nMinPasswdLen; // currently not supported
+
+ m_aPasswdToOpenED.GrabFocus();
+
ModifyHdl( NULL );
}
@@ -193,26 +194,23 @@ PasswordToOpenModifyDialog_Impl::~PasswordToOpenModifyDialog_Impl()
IMPL_LINK( PasswordToOpenModifyDialog_Impl, ModifyHdl, Edit *, pEdit )
{
- if (pEdit == &m_aReenterPasswdToOpenED)
- m_bReenterPasswdToOpenEdited = true;
- if (pEdit == &m_aReenterPasswdToModifyED)
- m_bReenterPasswdToModifyEdited = true;
+ // force repaints to get the m_aDefaultTxt displayed again
+ if (m_aReenterPasswdToOpenED.GetText().Len() == 0)
+ m_aReenterPasswdToOpenED.Invalidate();
+ if (m_aReenterPasswdToModifyED.GetText().Len() == 0)
+ m_aReenterPasswdToModifyED.Invalidate();
- m_aReenterPasswdToOpenED.Enable( m_aPasswdToOpenED.GetText().Len() > 0 );
- m_aReenterPasswdToModifyED.Enable( m_aPasswdToModifyED.GetText().Len() > 0 );
+ const sal_Int32 nPasswdToOpenLen = m_aPasswdToOpenED.GetText().Len();
+ const sal_Int32 nPasswdToModifyLen = m_aPasswdToModifyED.GetText().Len();
- const bool bToOpenEqual = m_aPasswdToOpenED.GetText() == m_aReenterPasswdToOpenED.GetText();
- const bool bToModifyEqual = m_aPasswdToModifyED.GetText() == m_aReenterPasswdToModifyED.GetText();
- const BOOL bEnableOk =
- m_bReenterPasswdToOpenEdited && m_aPasswdToOpenED.GetText().Len() > 0 &&
- bToOpenEqual && (!m_bReenterPasswdToModifyEdited || bToModifyEqual);
- m_aOk.Enable( bEnableOk );
+ const bool bBothEmpty = nPasswdToOpenLen == 0 && nPasswdToModifyLen == 0;
+ const bool bToOpenMatch = m_aPasswdToOpenED.GetText() == m_aReenterPasswdToOpenED.GetText();
+ const bool bToModifyMatch = m_aPasswdToModifyED.GetText() == m_aReenterPasswdToModifyED.GetText();
- m_aPasswdToOpenMatchFI.Enable( bToOpenEqual && m_aPasswdToOpenED.GetText().Len() > 0 );
- m_aPasswdToModifyMatchFI.Enable( bToModifyEqual );
+ m_aOk.Enable( bToOpenMatch && bToModifyMatch && !bBothEmpty );
- if (m_aReenterPasswdToOpenED.GetText().Len() == 0)
- m_aReenterPasswdToOpenED.Invalidate(); // get the m_aDefaultTxt displayed again
+ m_aPasswdToOpenMatchFI.Enable( bToOpenMatch && !bBothEmpty );
+ m_aPasswdToModifyMatchFI.Enable( bToModifyMatch && !bBothEmpty );
return 0;
}
@@ -221,10 +219,14 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, ModifyHdl, Edit *, pEdit )
//////////////////////////////////////////////////////////////////////
-PasswordToOpenModifyDialog::PasswordToOpenModifyDialog( Window * pParent ) :
+PasswordToOpenModifyDialog::PasswordToOpenModifyDialog(
+ Window * pParent,
+ sal_uInt16 nMinPasswdLen,
+ sal_uInt16 nMaxPasswdLen ) :
SfxModalDialog( pParent, CUI_RES( RID_DLG_PASSWORD_TO_OPEN_MODIFY ) )
{
- m_pImpl = boost::shared_ptr< PasswordToOpenModifyDialog_Impl >( new PasswordToOpenModifyDialog_Impl( this ) );
+ m_pImpl = std::auto_ptr< PasswordToOpenModifyDialog_Impl >(
+ new PasswordToOpenModifyDialog_Impl( this, nMinPasswdLen, nMaxPasswdLen ) );
FreeResource();
}
@@ -237,20 +239,27 @@ PasswordToOpenModifyDialog::~PasswordToOpenModifyDialog()
String PasswordToOpenModifyDialog::GetPasswordToOpen() const
{
- const bool bPasswdEditedAndOk =
- m_pImpl->m_bReenterPasswdToOpenEdited && m_pImpl->m_aPasswdToOpenED.GetText().Len() > 0 &&
+ const bool bPasswdOk =
+ m_pImpl->m_aPasswdToOpenED.GetText().Len() > 0 &&
m_pImpl->m_aPasswdToOpenED.GetText() == m_pImpl->m_aReenterPasswdToOpenED.GetText();
- return bPasswdEditedAndOk ? m_pImpl->m_aPasswdToOpenED.GetText() : String();
+ return bPasswdOk ? m_pImpl->m_aPasswdToOpenED.GetText() : String();
}
String PasswordToOpenModifyDialog::GetPasswordToModify() const
{
- const bool bPasswdEditedAndOk =
- m_pImpl->m_bReenterPasswdToModifyEdited && m_pImpl->m_aPasswdToModifyED.GetText().Len() > 0 &&
+ const bool bPasswdOk =
+ m_pImpl->m_aPasswdToModifyED.GetText().Len() > 0 &&
m_pImpl->m_aPasswdToModifyED.GetText() == m_pImpl->m_aReenterPasswdToModifyED.GetText();
- return bPasswdEditedAndOk ? m_pImpl->m_aPasswdToModifyED.GetText() : String();
+ return bPasswdOk ? m_pImpl->m_aPasswdToModifyED.GetText() : String();
}
+
+bool PasswordToOpenModifyDialog::IsRecommendToOpenReadonly() const
+{
+ return m_pImpl->m_aOpenReadonlyCB.IsChecked();
+}
+
+
//////////////////////////////////////////////////////////////////////
diff --git a/cui/source/dialogs/passwdomdlg.hrc b/cui/source/dialogs/passwdomdlg.hrc
index 7c1f0d86fa5a..f61de3303e06 100755
--- a/cui/source/dialogs/passwdomdlg.hrc
+++ b/cui/source/dialogs/passwdomdlg.hrc
@@ -46,6 +46,7 @@
#define ED_REENTER_PASSWD_TO_MODIFY 26
#define FI_PASSWD_TO_OPEN_MATCH 27
#define FI_PASSWD_TO_MODIFY_MATCH 28
+#define CB_OPEN_READONLY 29
#define STR_MORE_OPTIONS 51
#define STR_FEWER_OPTIONS 52
diff --git a/cui/source/dialogs/passwdomdlg.src b/cui/source/dialogs/passwdomdlg.src
index 08652e8f345b..3c26e9f2b23d 100755
--- a/cui/source/dialogs/passwdomdlg.src
+++ b/cui/source/dialogs/passwdomdlg.src
@@ -32,7 +32,7 @@
ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY
{
- Size = MAP_APPFONT( 201, 135 );
+ Size = MAP_APPFONT( 171, 135 );
Text [ en-US ] = "Password";
// HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY;
Border = TRUE ;
@@ -43,7 +43,7 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY
FixedText FT_PASSWD_TO_OPEN
{
Pos = MAP_APPFONT( 3, 3 );
- Size = MAP_APPFONT( 175, 8 );
+ Size = MAP_APPFONT( 145, 8 );
Text [ en-US ] = "~Enter password to open";
WordBreak = TRUE;
};
@@ -51,7 +51,7 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY
Edit ED_PASSWD_TO_OPEN
{
Pos = MAP_APPFONT( 3, 14 );
- Size = MAP_APPFONT( 175, 12 );
+ Size = MAP_APPFONT( 145, 12 );
Border = TRUE ;
PassWord = TRUE ;
};
@@ -59,7 +59,7 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY
FixedText FT_REENTER_PASSWD_TO_OPEN
{
Pos = MAP_APPFONT( 3, 31 );
- Size = MAP_APPFONT( 175, 8 );
+ Size = MAP_APPFONT( 145, 8 );
Text [ en-US ] = "~Reenter password to open";
WordBreak = TRUE;
};
@@ -67,21 +67,21 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY
Edit ED_REENTER_PASSWD_TO_OPEN
{
Pos = MAP_APPFONT( 3, 42 );
- Size = MAP_APPFONT( 175, 12 );
+ Size = MAP_APPFONT( 145, 12 );
Border = TRUE ;
PassWord = TRUE ;
};
FixedImage FI_PASSWD_TO_OPEN_MATCH
{
- Pos = MAP_APPFONT ( 180, 42 ) ;
+ Pos = MAP_APPFONT ( 150, 42 ) ;
Size = MAP_APPFONT ( 12 , 12 ) ;
};
FixedText FT_PASSWD_NOTE
{
Pos = MAP_APPFONT( 3, 66 );
- Size = MAP_APPFONT( 195, 4*8 ); // some extra space for translation in other languages
+ Size = MAP_APPFONT( 165, 4*8 ); // some extra space for translation in other languages
Text [ en-US ] = "Note: If you lose or forget the password, it can not be recovered. "\
"It is advisable to keep passwords in a safe place. Passwords are "\
"case-sensitive.";
@@ -91,75 +91,83 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY
FixedLine FL_BUTTONS
{
Pos = MAP_APPFONT( 0, 103 );
- Size = MAP_APPFONT( 201, 8 );
+ Size = MAP_APPFONT( 171, 8 );
};
MoreButton BTN_MORE_FEWER_OPTIONS
{
Pos = MAP_APPFONT( 3 , 116 ) ;
- Size = MAP_APPFONT( 60 , 14 ) ;
- Delta = 124+5 ;
+ Size = MAP_APPFONT( 50 , 14 ) ;
+ Delta = 146 ;
State = FALSE ;
};
OKButton BTN_OK
{
- Pos = MAP_APPFONT( 73, 116 );
- Size = MAP_APPFONT( 60, 14 );
+ Pos = MAP_APPFONT( 63, 116 );
+ Size = MAP_APPFONT( 50, 14 );
DefButton = TRUE ;
};
CancelButton BTN_CANCEL
{
- Pos = MAP_APPFONT( 138, 116 );
- Size = MAP_APPFONT( 60, 14 );
+ Pos = MAP_APPFONT( 118, 116 );
+ Size = MAP_APPFONT( 50, 14 );
};
FixedLine FL_FILE_SHARING_OPTIONS
{
Pos = MAP_APPFONT( 3, 140 );
- Size = MAP_APPFONT( 195, 8 );
+ Size = MAP_APPFONT( 165, 8 );
Text [ en-US ] = "File sharing options";
};
FixedText FT_PASSWD_TO_MODIFY
{
- Pos = MAP_APPFONT( 8, 151+5 );
- Size = MAP_APPFONT( 170, 8 );
+ Pos = MAP_APPFONT( 8, 156 );
+ Size = MAP_APPFONT( 140, 8 );
Text [ en-US ] = "Enter password to modify";
WordBreak = TRUE;
};
Edit ED_PASSWD_TO_MODIFY
{
- Pos = MAP_APPFONT( 8, 162+5 );
- Size = MAP_APPFONT( 170, 12 );
+ Pos = MAP_APPFONT( 8, 166 );
+ Size = MAP_APPFONT( 140, 12 );
Border = TRUE ;
PassWord = TRUE ;
};
FixedText FT_REENTER_PASSWD_TO_MODIFY
{
- Pos = MAP_APPFONT( 8, 180+5 );
- Size = MAP_APPFONT( 170, 8 );
+ Pos = MAP_APPFONT( 8, 184 );
+ Size = MAP_APPFONT( 140, 8 );
Text [ en-US ] = "Reenter password to modify";
WordBreak = TRUE;
};
Edit ED_REENTER_PASSWD_TO_MODIFY
{
- Pos = MAP_APPFONT( 8, 191+5 );
- Size = MAP_APPFONT( 170, 12 );
+ Pos = MAP_APPFONT( 8, 194 );
+ Size = MAP_APPFONT( 140, 12 );
Border = TRUE ;
PassWord = TRUE ;
};
FixedImage FI_PASSWD_TO_MODIFY_MATCH
{
- Pos = MAP_APPFONT ( 180, 191+5 ) ;
+ Pos = MAP_APPFONT ( 150, 194 ) ;
Size = MAP_APPFONT ( 12 , 12 ) ;
};
+ CheckBox CB_OPEN_READONLY
+ {
+ Pos = MAP_APPFONT( 8, 212 );
+ Size = MAP_APPFONT( 140, 8 );
+
+ Text [ en-US ] = "Recommend to open file read-only";
+ };
+
String STR_PASSWD_MUST_BE_CONFIRMED
{
Text [ en-US ] = "Password must be confirmed" ;
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 6102a91da836..a1db7ce1bcd4 100755
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -962,6 +962,10 @@ String AbstractPasswordToOpenModifyDialog_Impl::GetPasswordToModify() const
{
return pDlg->GetPasswordToModify();
}
+bool AbstractPasswordToOpenModifyDialog_Impl::IsRecommendToOpenReadonly() const
+{
+ return pDlg->IsRecommendToOpenReadonly();
+}
// Create dialogs with simplest interface
VclAbstractDialog* AbstractDialogFactory_Impl::CreateVclDialog( Window* pParent, sal_uInt32 nResId )
@@ -1916,9 +1920,11 @@ SvxAbstractInsRowColDlg* AbstractDialogFactory_Impl::CreateSvxInsRowColDlg( Wind
return new SvxInsRowColDlg( pParent, bCol, nHelpId );
}
-AbstractPasswordToOpenModifyDialog * AbstractDialogFactory_Impl::CreatePasswordToOpenModifyDialog( Window * pParent )
+AbstractPasswordToOpenModifyDialog * AbstractDialogFactory_Impl::CreatePasswordToOpenModifyDialog(
+ Window * pParent,
+ sal_uInt16 nMinPasswdLen, sal_uInt16 nMaxPasswdLen )
{
- PasswordToOpenModifyDialog * pDlg = new PasswordToOpenModifyDialog( pParent );
+ PasswordToOpenModifyDialog * pDlg = new PasswordToOpenModifyDialog( pParent, nMinPasswdLen, nMaxPasswdLen );
return new AbstractPasswordToOpenModifyDialog_Impl( pDlg );
}
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 092458ff4027..8b00780feb06 100755
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -583,6 +583,7 @@ class AbstractPasswordToOpenModifyDialog_Impl : public AbstractPasswordToOpenMod
virtual String GetPasswordToOpen() const;
virtual String GetPasswordToModify() const;
+ virtual bool IsRecommendToOpenReadonly() const;
};
//for PasswordToOpenModifyDialog end
@@ -789,7 +790,7 @@ public:
virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId );
- virtual AbstractPasswordToOpenModifyDialog * CreatePasswordToOpenModifyDialog( Window * pParent );
+ virtual AbstractPasswordToOpenModifyDialog * CreatePasswordToOpenModifyDialog( Window * pParent, sal_uInt16 nMinPasswdLen, sal_uInt16 nMaxPasswdLen );
};
#endif
diff --git a/cui/source/inc/passwdomdlg.hxx b/cui/source/inc/passwdomdlg.hxx
index 5fe47f37b75f..d28cc4548a59 100755
--- a/cui/source/inc/passwdomdlg.hxx
+++ b/cui/source/inc/passwdomdlg.hxx
@@ -27,10 +27,10 @@
#ifndef _CUI_PASSWDOMDLG_HXX_
#define _CUI_PASSWDOMDLG_HXX_
-#include <boost/shared_ptr.hpp>
#include <sfx2/basedlgs.hxx>
+#include <memory>
//////////////////////////////////////////////////////////////////////
@@ -38,18 +38,20 @@ struct PasswordToOpenModifyDialog_Impl;
class PasswordToOpenModifyDialog : public SfxModalDialog
{
- boost::shared_ptr< PasswordToOpenModifyDialog_Impl > m_pImpl;
+ std::auto_ptr< PasswordToOpenModifyDialog_Impl > m_pImpl;
// disallow use of copy c-tor and assignment operator
PasswordToOpenModifyDialog( const PasswordToOpenModifyDialog & );
PasswordToOpenModifyDialog & operator = ( const PasswordToOpenModifyDialog & );
public:
- PasswordToOpenModifyDialog( Window * pParent );
+ PasswordToOpenModifyDialog( Window * pParent, sal_uInt16 nMinPasswdLen, sal_uInt16 nMaxPasswdLen /* 0 -> no max len enforced */);
virtual ~PasswordToOpenModifyDialog();
+ // AbstractPasswordToOpenModifyDialog
virtual String GetPasswordToOpen() const;
virtual String GetPasswordToModify() const;
+ virtual bool IsRecommendToOpenReadonly() const;
};
//////////////////////////////////////////////////////////////////////