summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kspread/kspread_view.cc')
-rw-r--r--kspread/kspread_view.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/kspread/kspread_view.cc b/kspread/kspread_view.cc
index 0fe4f80d3..519e4425a 100644
--- a/kspread/kspread_view.cc
+++ b/kspread/kspread_view.cc
@@ -5148,10 +5148,10 @@ void View::toggleProtectDoc( bool mode )
if ( !doc() || !doc()->map() )
return;
- TQCString passwd;
+ TQString password;
if ( mode )
{
- int result = KPasswordDialog::getNewPassword( passwd, i18n( "Protect Document" ) );
+ int result = KPasswordDialog::getNewPassword( password, i18n( "Protect Document" ) );
if ( result != KPasswordDialog::Accepted )
{
d->actions->protectDoc->setChecked( false );
@@ -5159,14 +5159,13 @@ void View::toggleProtectDoc( bool mode )
}
TQCString hash( "" );
- TQString password( passwd );
if ( password.length() > 0 )
SHA1::getHash( password, hash );
doc()->map()->setProtected( hash );
}
else
{
- int result = KPasswordDialog::getPassword( passwd, i18n( "Unprotect Document" ) );
+ int result = KPasswordDialog::getPassword( password, i18n( "Unprotect Document" ) );
if ( result != KPasswordDialog::Accepted )
{
d->actions->protectDoc->setChecked( true );
@@ -5174,7 +5173,6 @@ void View::toggleProtectDoc( bool mode )
}
TQCString hash( "" );
- TQString password( passwd );
if ( password.length() > 0 )
SHA1::getHash( password, hash );
if ( !doc()->map()->checkPassword( hash ) )
@@ -5196,10 +5194,10 @@ void View::toggleProtectSheet( bool mode )
if ( !d->activeSheet )
return;
- TQCString passwd;
+ TQString password;
if ( mode )
{
- int result = KPasswordDialog::getNewPassword( passwd, i18n( "Protect Sheet" ) );
+ int result = KPasswordDialog::getNewPassword( password, i18n( "Protect Sheet" ) );
if ( result != KPasswordDialog::Accepted )
{
d->actions->protectSheet->setChecked( false );
@@ -5207,7 +5205,6 @@ void View::toggleProtectSheet( bool mode )
}
TQCString hash( "" );
- TQString password( passwd );
if ( password.length() > 0 )
SHA1::getHash( password, hash );
@@ -5215,7 +5212,7 @@ void View::toggleProtectSheet( bool mode )
}
else
{
- int result = KPasswordDialog::getPassword( passwd, i18n( "Unprotect Sheet" ) );
+ int result = KPasswordDialog::getPassword( password, i18n( "Unprotect Sheet" ) );
if ( result != KPasswordDialog::Accepted )
{
d->actions->protectSheet->setChecked( true );
@@ -5223,7 +5220,6 @@ void View::toggleProtectSheet( bool mode )
}
TQCString hash( "" );
- TQString password( passwd );
if ( password.length() > 0 )
SHA1::getHash( password, hash );