summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_view.cc
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2018-12-02 21:31:58 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2018-12-02 21:31:58 +0900
commitf2b042c804e448d0f3d35579de32bd3134733c54 (patch)
tree4b6c2494d3946be3ecde127d01533ad2190c61c3 /kspread/kspread_view.cc
parent25c9b225031f0ea7f3f4cd44cd14256b91bf0bc2 (diff)
downloadkoffice-f2b042c8.tar.gz
koffice-f2b042c8.zip
Adapted to new KPasswordEdit::password() signature. This relates to bug 2961.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
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 );