diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-15 21:09:53 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-15 21:09:53 -0500 |
commit | 7ba7cbae11b8850b56edd638894554883c5d3b08 (patch) | |
tree | 799a409fe49a2282bf8434963711bd02fcff280d /sc/source/ui/docshell/docsh4.cxx | |
parent | daf480d62303155b9c490760f3a21ed8e94acdc0 (diff) |
Cleaned up ScDocShell a bit.
Diffstat (limited to 'sc/source/ui/docshell/docsh4.cxx')
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 4b79ecdda909..8bd4782ad69e 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1153,15 +1153,15 @@ void UpdateAcceptChangesDialog() //------------------------------------------------------------------ -sal_Bool ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, sal_Bool bJustQueryIfProtected ) +bool ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, sal_Bool bJustQueryIfProtected ) { - sal_Bool bDone = false; + bool bDone = false; ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack(); if ( pChangeTrack ) { sal_Bool bProtected = pChangeTrack->IsProtected(); if ( bJustQueryIfProtected && !bProtected ) - return sal_True; + return true; String aTitle( ScResId( bProtected ? SCSTR_CHG_UNPROTECT : SCSTR_CHG_PROTECT ) ); String aText( ScResId( SCSTR_PASSWORD ) ); @@ -1186,7 +1186,7 @@ sal_Bool ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, sal_Bool b if ( SvPasswordHelper::CompareHashPassword(pChangeTrack->GetProtection(), aPassword) ) { if ( bJustQueryIfProtected ) - bDone = sal_True; + bDone = true; else pChangeTrack->SetProtection( com::sun::star::uno::Sequence< sal_Int8 > (0) ); @@ -1207,12 +1207,12 @@ sal_Bool ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, sal_Bool b if ( bProtected != pChangeTrack->IsProtected() ) { UpdateAcceptChangesDialog(); - bDone = sal_True; + bDone = true; } } } else if ( bJustQueryIfProtected ) - bDone = sal_True; + bDone = true; return bDone; } @@ -1425,9 +1425,9 @@ void ScDocShell::SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages } } -sal_Bool ScDocShell::AdjustPrintZoom( const ScRange& rRange ) +bool ScDocShell::AdjustPrintZoom( const ScRange& rRange ) { - sal_Bool bChange = false; + bool bChange = false; SCTAB nTab = rRange.aStart.Tab(); String aStyleName = aDocument.GetPageStyle( nTab ); @@ -1786,7 +1786,6 @@ void ScDocShell::GetStatePageStyle( SfxViewShell& /* rCaller */, if ( pStyleSheet ) { SfxItemSet& rStyleSet = pStyleSheet->GetItemSet(); - GetPageOnFromPageStyleSet( &rStyleSet, nCurTab, bHeaderOn, bFooterOn ); if ( !bHeaderOn && !bFooterOn ) @@ -1976,8 +1975,8 @@ Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet, SCTAB nCurTab, - sal_Bool& rbHeader, - sal_Bool& rbFooter ) + bool& rbHeader, + bool& rbFooter ) { if ( !pStyleSet ) { |