diff options
Diffstat (limited to 'sc/source/ui/view/viewutil.cxx')
-rw-r--r-- | sc/source/ui/view/viewutil.cxx | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index 953270ce1803..c89d9dac1455 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -65,7 +65,7 @@ //================================================================== void ScViewUtil::PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSet, - USHORT nWhichId, USHORT nScript ) + sal_uInt16 nWhichId, sal_uInt16 nScript ) { // take the effective item from rCoreSet according to nScript // and put in rShellSet under the (base) nWhichId @@ -82,12 +82,12 @@ void ScViewUtil::PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSe rShellSet.InvalidateItem( nWhichId ); } -USHORT ScViewUtil::GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos ) +sal_uInt16 ScViewUtil::GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos ) { // used for thesaurus - BYTE nScript = pDoc->GetScriptType( rPos.Col(), rPos.Row(), rPos.Tab() ); - USHORT nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? ATTR_CJK_FONT_LANGUAGE : + sal_uInt8 nScript = pDoc->GetScriptType( rPos.Col(), rPos.Row(), rPos.Tab() ); + sal_uInt16 nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? ATTR_CJK_FONT_LANGUAGE : ( ( nScript == SCRIPTTYPE_COMPLEX ) ? ATTR_CTL_FONT_LANGUAGE : ATTR_FONT_LANGUAGE ); const SfxPoolItem* pItem = pDoc->GetAttr( rPos.Col(), rPos.Row(), rPos.Tab(), nWhich); SvxLanguageItem* pLangIt = PTR_CAST( SvxLanguageItem, pItem ); @@ -111,7 +111,7 @@ USHORT ScViewUtil::GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos ) return eLnge; } -sal_Int32 ScViewUtil::GetTransliterationType( USHORT nSlotID ) +sal_Int32 ScViewUtil::GetTransliterationType( sal_uInt16 nSlotID ) { sal_Int32 nType = 0; switch ( nSlotID ) @@ -147,7 +147,7 @@ sal_Int32 ScViewUtil::GetTransliterationType( USHORT nSlotID ) return nType; } -BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction, +sal_Bool ScViewUtil::IsActionShown( const ScChangeAction& rAction, const ScChangeViewSettings& rSettings, ScDocument& rDocument ) { @@ -155,10 +155,10 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction, // die Reihenfolge von ShowRejected/ShowAccepted ist deswegen wichtig if ( !rSettings.IsShowRejected() && rAction.IsRejecting() ) - return FALSE; + return false; if ( !rSettings.IsShowAccepted() && rAction.IsAccepted() && !rAction.IsRejecting() ) - return FALSE; + return false; if ( rSettings.HasAuthor() ) { @@ -167,10 +167,10 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction, // GetUser() am ChangeTrack ist der aktuelle Benutzer ScChangeTrack* pTrack = rDocument.GetChangeTrack(); if ( !pTrack || rAction.GetUser() == pTrack->GetUser() ) - return FALSE; + return false; } else if ( rAction.GetUser() != rSettings.GetTheAuthorToShow() ) - return FALSE; + return false; } if ( rSettings.HasComment() ) @@ -181,12 +181,12 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction, aComStr+=')'; if(!rSettings.IsValidComment(&aComStr)) - return FALSE; + return false; } if ( rSettings.HasRange() ) if ( !rSettings.GetTheRangeList().Intersects( rAction.GetBigRange().MakeRange() ) ) - return FALSE; + return false; if ( rSettings.HasDate() && rSettings.GetTheDateMode() != SCDM_NO_DATEMODE ) { @@ -197,23 +197,23 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction, { // korrespondiert mit ScHighlightChgDlg::OKBtnHdl case SCDM_DATE_BEFORE: if ( aDateTime > rFirst ) - return FALSE; + return false; break; case SCDM_DATE_SINCE: if ( aDateTime < rFirst ) - return FALSE; + return false; break; case SCDM_DATE_EQUAL: case SCDM_DATE_BETWEEN: if ( aDateTime < rFirst || aDateTime > rLast ) - return FALSE; + return false; break; case SCDM_DATE_NOTEQUAL: if ( aDateTime >= rFirst && aDateTime <= rLast ) - return FALSE; + return false; break; case SCDM_DATE_SAVE: @@ -221,7 +221,7 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction, ScChangeTrack* pTrack = rDocument.GetChangeTrack(); if ( !pTrack || pTrack->GetLastSavedActionNumber() >= rAction.GetActionNumber() ) - return FALSE; + return false; } break; @@ -234,17 +234,17 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction, if ( rSettings.HasActionRange() ) { - ULONG nAction = rAction.GetActionNumber(); - ULONG nFirstAction; - ULONG nLastAction; + sal_uLong nAction = rAction.GetActionNumber(); + sal_uLong nFirstAction; + sal_uLong nLastAction; rSettings.GetTheActionRange( nFirstAction, nLastAction ); if ( nAction < nFirstAction || nAction > nLastAction ) { - return FALSE; + return false; } } - return TRUE; + return sal_True; } void ScViewUtil::UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc ) @@ -312,7 +312,7 @@ bool ScViewUtil::HasFiltered( const ScRange& rRange, ScDocument* pDoc ) return false; } -void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, USHORT nSlotId ) +void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, sal_uInt16 nSlotId ) { SvtCJKOptions aCJKOptions; SvtCTLOptions aCTLOptions; @@ -351,28 +351,28 @@ void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, USH //================================================================== -BOOL ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont, +sal_Bool ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont, SfxViewFrame& rFrame, SvxFontItem& rNewFont, String& rString ) { - BOOL bRet = FALSE; + sal_Bool bRet = false; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { SfxAllItemSet aSet( rFrame.GetObjectShell()->GetPool() ); - aSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) ); + aSet.Put( SfxBoolItem( FN_PARAM_1, false ) ); aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) ); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( &rFrame.GetWindow(), aSet, rFrame.GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if ( pDlg->Execute() == RET_OK ) { - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE ); - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, false ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, false ); if ( pItem ) rString = pItem->GetValue(); if ( pFontItem ) rNewFont = SvxFontItem( pFontItem->GetFamily(), pFontItem->GetFamilyName(), pFontItem->GetStyleName(), pFontItem->GetPitch(), pFontItem->GetCharSet(), rNewFont.Which() ); - bRet = TRUE; + bRet = sal_True; } delete pDlg; } @@ -423,7 +423,7 @@ void ScUpdateRect::SetNew( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 ) nNewEndY = nY2; } -BOOL ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ) +sal_Bool ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ) { if ( nNewStartX == nOldStartX && nNewEndX == nOldEndX && nNewStartY == nOldStartY && nNewEndY == nOldEndY ) @@ -432,7 +432,7 @@ BOOL ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ) rY1 = nNewStartY; rX2 = nNewStartX; rY2 = nNewStartY; - return FALSE; + return false; } rX1 = Min(nNewStartX,nOldStartX); @@ -467,7 +467,7 @@ BOOL ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ) } } - return TRUE; + return sal_True; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |