diff options
Diffstat (limited to 'sc/source/ui/view/formatsh.cxx')
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 242 |
1 files changed, 121 insertions, 121 deletions
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 12a1bb87211b..8d8452bc9d83 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -112,7 +112,7 @@ namespace { -SvxCellHorJustify lclConvertSlotToHAlign( USHORT nSlot ) +SvxCellHorJustify lclConvertSlotToHAlign( sal_uInt16 nSlot ) { SvxCellHorJustify eHJustify = SVX_HOR_JUSTIFY_STANDARD; switch( nSlot ) @@ -127,7 +127,7 @@ SvxCellHorJustify lclConvertSlotToHAlign( USHORT nSlot ) return eHJustify; } -SvxCellVerJustify lclConvertSlotToVAlign( USHORT nSlot ) +SvxCellVerJustify lclConvertSlotToVAlign( sal_uInt16 nSlot ) { SvxCellVerJustify eVJustify = SVX_VER_JUSTIFY_STANDARD; switch( nSlot ) @@ -183,15 +183,15 @@ void __EXPORT ScFormatShell::GetStyleState( SfxItemSet& rSet ) ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); SfxStyleSheetBasePool* pStylePool = pDoc->GetStyleSheetPool(); - BOOL bProtected = FALSE; + sal_Bool bProtected = sal_False; SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB i=0; i<nTabCount; i++) if (pDoc->IsTabProtected(i)) // ueberhaupt eine Tabelle geschuetzt? - bProtected = TRUE; + bProtected = sal_True; SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); - USHORT nSlotId = 0; + sal_uInt16 nWhich = aIter.FirstWhich(); + sal_uInt16 nSlotId = 0; while ( nWhich ) { @@ -242,7 +242,7 @@ void __EXPORT ScFormatShell::GetStyleState( SfxItemSet& rSet ) { ISfxTemplateCommon* pDesigner = SFX_APP()-> GetCurrentTemplateCommon(pTabViewShell->GetViewFrame()->GetBindings()); - BOOL bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily(); + sal_Bool bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily(); if ( bProtected || bPage ) rSet.DisableItem( nSlotId ); @@ -254,7 +254,7 @@ void __EXPORT ScFormatShell::GetStyleState( SfxItemSet& rSet ) { ISfxTemplateCommon* pDesigner = SFX_APP()-> GetCurrentTemplateCommon(pTabViewShell->GetViewFrame()->GetBindings()); - BOOL bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily(); + sal_Bool bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily(); if ( bProtected && !bPage ) rSet.DisableItem( nSlotId ); @@ -283,7 +283,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) //-------------------------------------------------------------------- SfxBindings& rBindings = pViewData->GetBindings(); const SfxItemSet* pArgs = rReq.GetArgs(); - const USHORT nSlotId = rReq.GetSlot(); + const sal_uInt16 nSlotId = rReq.GetSlot(); const SCTAB nCurTab = GetViewData()->GetTabNo(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScTabViewShell* pTabViewShell= GetViewData()->GetViewShell(); @@ -291,7 +291,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) ScMarkData& rMark = GetViewData()->GetMarkData(); ScModule* pScMod = SC_MOD(); String aRefName; - BOOL bUndo = pDoc->IsUndoEnabled(); + sal_Bool bUndo = pDoc->IsUndoEnabled(); if ( (nSlotId == SID_STYLE_NEW) || (nSlotId == SID_STYLE_EDIT) @@ -305,18 +305,18 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) SfxStyleSheetBasePool* pStylePool = pDoc->GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet = NULL; - BOOL bStyleToMarked = FALSE; - BOOL bListAction = FALSE; - BOOL bAddUndo = FALSE; // add ScUndoModifyStyle (style modified) + sal_Bool bStyleToMarked = sal_False; + sal_Bool bListAction = sal_False; + sal_Bool bAddUndo = sal_False; // add ScUndoModifyStyle (style modified) ScStyleSaveData aOldData; // for undo/redo ScStyleSaveData aNewData; SfxStyleFamily eFamily = SFX_STYLE_FAMILY_PARA; const SfxPoolItem* pFamItem; - if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, TRUE, &pFamItem ) ) + if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, sal_True, &pFamItem ) ) eFamily = (SfxStyleFamily)((const SfxUInt16Item*)pFamItem)->GetValue(); else - if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, TRUE, &pFamItem ) ) + if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, sal_True, &pFamItem ) ) { String sFamily = ((const SfxStringItem*)pFamItem)->GetValue(); if (sFamily.CompareToAscii("CellStyles") == COMPARE_EQUAL) @@ -327,9 +327,9 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) } String aStyleName; - USHORT nRetMask = 0xffff; + sal_uInt16 nRetMask = 0xffff; // #96983# only stylist sends focus to sheet -// BOOL bGrabFocus = ( SID_STYLE_APPLY == nSlotId ); +// sal_Bool bGrabFocus = ( SID_STYLE_APPLY == nSlotId ); pStylePool->SetSearchMask( eFamily, SFXSTYLEBIT_ALL ); @@ -338,11 +338,11 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) case SID_STYLE_NEW: { const SfxPoolItem* pNameItem; - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, TRUE, &pNameItem )) + if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, sal_True, &pNameItem )) aStyleName = ((const SfxStringItem*)pNameItem)->GetValue(); const SfxPoolItem* pRefItem=NULL; - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE, TRUE, &pRefItem )) + if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE, sal_True, &pRefItem )) { if(pRefItem!=NULL) aRefName = ((const SfxStringItem*)pRefItem)->GetValue(); @@ -385,7 +385,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) case SID_STYLE_NEW_BY_EXAMPLE: { const SfxPoolItem* pNameItem; - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, TRUE, &pNameItem )) + if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, sal_True, &pNameItem )) aStyleName = ((const SfxStringItem*)pNameItem)->GetValue(); pStyleSheet = pStylePool->Find( aStyleName, eFamily ); @@ -395,14 +395,14 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) case SID_STYLE_WATERCAN: { - BOOL bWaterCan = pScMod->GetIsWaterCan(); + sal_Bool bWaterCan = pScMod->GetIsWaterCan(); if( !bWaterCan ) { const SfxPoolItem* pItem; if ( SFX_ITEM_SET == - pArgs->GetItemState( nSlotId, TRUE, &pItem ) ) + pArgs->GetItemState( nSlotId, sal_True, &pItem ) ) { const SfxStringItem* pStrItem = PTR_CAST(SfxStringItem,pItem); if ( pStrItem ) @@ -422,13 +422,13 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) if ( !bWaterCan && pStyleSheet ) { - pScMod->SetWaterCan( TRUE ); + pScMod->SetWaterCan( sal_True ); pTabViewShell->SetActivePointer( Pointer(POINTER_FILL) ); rReq.Done(); } else { - pScMod->SetWaterCan( FALSE ); + pScMod->SetWaterCan( sal_False ); pTabViewShell->SetActivePointer( Pointer(POINTER_ARROW) ); rReq.Done(); } @@ -456,12 +456,12 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) pTabViewShell->RemoveStyleSheetInUse( (SfxStyleSheet*)pStyleSheet ); pStylePool->Remove( pStyleSheet ); pTabViewShell->InvalidateAttribs(); - nRetMask = TRUE; - bAddUndo = TRUE; + nRetMask = sal_True; + bAddUndo = sal_True; rReq.Done(); } else - nRetMask = FALSE; + nRetMask = sal_False; } break; @@ -512,10 +512,10 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) { String aUndo = ScGlobal::GetRscString( STR_UNDO_EDITCELLSTYLE ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo ); - bListAction = TRUE; + bListAction = sal_True; } - BOOL bConvertBack = FALSE; + sal_Bool bConvertBack = sal_False; SfxStyleSheet* pSheetInUse = (SfxStyleSheet*) pTabViewShell->GetStyleSheetFromMarked(); @@ -535,7 +535,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) //!!! bei Gelenheit mal eine Methode, die // das fuer einen bestimmten Style macht pDoc->StylesToNames(); - bConvertBack = TRUE; + bConvertBack = sal_True; pStylePool->Remove(pStyleSheet); } @@ -560,7 +560,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) // call SetStyleSheetToMarked after adding the ScUndoModifyStyle // (pStyleSheet pointer is used!) - bStyleToMarked = TRUE; + bStyleToMarked = sal_True; } else // ( nSlotId == SID_STYLE_UPDATE_BY_EXAMPLE ) { @@ -574,7 +574,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) { String aUndo = ScGlobal::GetRscString( STR_UNDO_EDITCELLSTYLE ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo ); - bListAction = TRUE; + bListAction = sal_True; } pStyleSheet->GetItemSet().Put( aAttrSet ); @@ -582,12 +582,12 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) // call SetStyleSheetToMarked after adding the ScUndoModifyStyle // (pStyleSheet pointer is used!) - bStyleToMarked = TRUE; + bStyleToMarked = sal_True; } } aNewData.InitFromStyle( pStyleSheet ); - bAddUndo = TRUE; + bAddUndo = sal_True; rReq.Done(); } break; @@ -609,14 +609,14 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) { if ( pDoc->RemovePageStyleInUse( pStyleSheet->GetName() ) ) { - ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(TRUE), nCurTab ).UpdatePages(); + ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(sal_True), nCurTab ).UpdatePages(); rBindings.Invalidate( SID_STATUS_PAGESTYLE ); rBindings.Invalidate( FID_RESET_PRINTZOOM ); } pStylePool->Remove( pStyleSheet ); rBindings.Invalidate( SID_STYLE_FAMILY4 ); pDocSh->SetDocumentModified(); - bAddUndo = TRUE; + bAddUndo = sal_True; rReq.Done(); } } @@ -636,7 +636,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) if ( aOldName != aStyleName ) { pDoc->SetPageStyle( nTab, aStyleName ); - ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(TRUE), nTab ).UpdatePages(); + ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(sal_True), nTab ).UpdatePages(); if( !pUndoAction ) pUndoAction = new ScUndoApplyPageStyle( pDocSh, aStyleName ); pUndoAction->AddSheetAction( nTab, aOldName ); @@ -665,7 +665,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) SfxStyleSheetBase* pCurStyle = pStylePool->Find( rStrCurStyle, eFamily ); SfxItemSet aAttrSet = pCurStyle->GetItemSet(); SCTAB nInTab; - BOOL bUsed = pDoc->IsPageStyleInUse( aStyleName, &nInTab ); + sal_Bool bUsed = pDoc->IsPageStyleInUse( aStyleName, &nInTab ); // wenn bereits vorhanden, erstmal entfernen... if ( pStyleSheet ) @@ -681,12 +681,12 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) // wenn in Verwendung -> Update if ( bUsed ) - ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(TRUE), nInTab ).UpdatePages(); + ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(sal_True), nInTab ).UpdatePages(); aNewData.InitFromStyle( pStyleSheet ); - bAddUndo = TRUE; + bAddUndo = sal_True; rReq.Done(); - nRetMask = TRUE; + nRetMask = sal_True; } } break; @@ -713,7 +713,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) // ScDocShell* pDocSh = GetViewData()->GetDocShell(); //CHINA001 ScStyleDlg* pDlg = NULL; SfxAbstractTabDialog* pDlg = NULL; //CHINA001 - USHORT nRsc = 0; + sal_uInt16 nRsc = 0; // #37034#/#37245# alte Items aus der Vorlage merken SfxItemSet aOldSet = pStyleSheet->GetItemSet(); @@ -732,16 +732,16 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) const SfxPoolItem* pItem; if ( rSet.GetItemState( ATTR_VALUE_FORMAT, - FALSE, &pItem ) == SFX_ITEM_SET ) + sal_False, &pItem ) == SFX_ITEM_SET ) { // NumberFormat Value aus Value und Language // erzeugen und eintueten - ULONG nFormat = + sal_uLong nFormat = ((SfxUInt32Item*)pItem)->GetValue(); LanguageType eLang = ((SvxLanguageItem*)&rSet.Get( ATTR_LANGUAGE_FORMAT ))->GetLanguage(); - ULONG nLangFormat = pDoc->GetFormatTable()-> + sal_uLong nLangFormat = pDoc->GetFormatTable()-> GetFormatForLanguageIfBuiltIn( nFormat, eLang ); if ( nLangFormat != nFormat ) { @@ -757,16 +757,16 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) pDocSh->PutItem( *pNumberInfoItem ); nRsc = RID_SCDLG_STYLES_PAR; - // auf jeden Fall ein SvxBoxInfoItem mit Table = FALSE im Set: + // auf jeden Fall ein SvxBoxInfoItem mit Table = sal_False im Set: // (wenn gar kein Item da ist, loescht der Dialog auch das // BORDER_OUTER SvxBoxItem aus dem Vorlagen-Set) - if ( rSet.GetItemState( ATTR_BORDER_INNER, FALSE ) != SFX_ITEM_SET ) + if ( rSet.GetItemState( ATTR_BORDER_INNER, sal_False ) != SFX_ITEM_SET ) { SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER ); - aBoxInfoItem.SetTable(FALSE); // keine inneren Linien - aBoxInfoItem.SetDist(TRUE); - aBoxInfoItem.SetMinDist(FALSE); + aBoxInfoItem.SetTable(sal_False); // keine inneren Linien + aBoxInfoItem.SetDist(sal_True); + aBoxInfoItem.SetMinDist(sal_False); rSet.Put( aBoxInfoItem ); } } @@ -791,7 +791,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) pParent = pTabViewShell->GetDialogParent(); } - pTabViewShell->SetInFormatDialog(TRUE); + pTabViewShell->SetInFormatDialog(sal_True); //CHINA001 pDlg = new ScStyleDlg( pParent, *pStyleSheet, nRsc ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); @@ -800,7 +800,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) pDlg = pFact->CreateScStyleDlg( pParent, *pStyleSheet, nRsc, nRsc ); DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001 short nResult = pDlg->Execute(); - pTabViewShell->SetInFormatDialog(FALSE); + pTabViewShell->SetInFormatDialog(sal_False); if ( nResult == RET_OK ) { @@ -818,7 +818,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) // pDoc->CellStyleChanged( *pStyleSheet, aOldSet ); SfxItemSet& rNewSet = pStyleSheet->GetItemSet(); - BOOL bNumFormatChanged; + sal_Bool bNumFormatChanged; if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged, aOldSet, rNewSet ) ) pDoc->InvalidateTextWidth( NULL, NULL, bNumFormatChanged ); @@ -826,11 +826,11 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTab<nTabCount; nTab++) if (pDoc->IsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_False); - ULONG nOldFormat = ((const SfxUInt32Item&)aOldSet. + sal_uLong nOldFormat = ((const SfxUInt32Item&)aOldSet. Get( ATTR_VALUE_FORMAT )).GetValue(); - ULONG nNewFormat = ((const SfxUInt32Item&)rNewSet. + sal_uLong nNewFormat = ((const SfxUInt32Item&)rNewSet. Get( ATTR_VALUE_FORMAT )).GetValue(); if ( nNewFormat != nOldFormat ) { @@ -873,7 +873,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) } aNewData.InitFromStyle( pStyleSheet ); - bAddUndo = TRUE; + bAddUndo = sal_True; } } else @@ -924,7 +924,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) ScModule* pScMod = SC_MOD(); ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox @@ -988,11 +988,11 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) rReq.Done(); break; case SID_NUMBER_INCDEC: - pTabViewShell->ChangeNumFmtDecimals( TRUE ); + pTabViewShell->ChangeNumFmtDecimals( sal_True ); rReq.Done(); break; case SID_NUMBER_DECDEC: - pTabViewShell->ChangeNumFmtDecimals( FALSE ); + pTabViewShell->ChangeNumFmtDecimals( sal_False ); rReq.Done(); break; @@ -1000,7 +1000,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) if ( pReqArgs ) { const SfxPoolItem* pItem; - if(pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET) + if(pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET) { String aCode = ((const SfxStringItem*)pItem)->GetValue(); pTabViewShell->SetNumFmtByStr( aCode ); @@ -1012,7 +1012,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) if ( pReqArgs ) { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( ATTR_VALUE_FORMAT, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( ATTR_VALUE_FORMAT, sal_True, &pItem ) == SFX_ITEM_SET ) { // We have to accomplish this using ApplyAttributes() // because we also need the language information to be @@ -1022,7 +1022,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) SfxItemPool* pDocPool = GetViewData()->GetDocument()->GetPool(); SfxItemSet aNewSet( *pDocPool, ATTR_PATTERN_START, ATTR_PATTERN_END ); aNewSet.Put( *pItem ); - pTabViewShell->ApplyAttributes( &aNewSet, &rOldSet, TRUE ); + pTabViewShell->ApplyAttributes( &aNewSet, &rOldSet, sal_True ); } } break; @@ -1057,7 +1057,7 @@ void ScFormatShell::ExecuteAlignment( SfxRequest& rReq ) ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); SfxBindings& rBindings = pViewData->GetBindings(); const SfxItemSet* pSet = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox @@ -1082,7 +1082,7 @@ void ScFormatShell::ExecuteAlignment( SfxRequest& rReq ) if( pSet ) { const SfxPoolItem* pItem = NULL; - if( pSet->GetItemState(GetPool().GetWhich(nSlot), TRUE, &pItem ) == SFX_ITEM_SET ) + if( pSet->GetItemState(GetPool().GetWhich(nSlot), sal_True, &pItem ) == SFX_ITEM_SET ) { switch ( nSlot ) @@ -1148,7 +1148,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) SfxBindings& rBindings = pViewData->GetBindings(); const ScPatternAttr* pAttrs = pTabViewShell->GetSelectionPattern(); const SfxItemSet* pSet = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); SfxAllItemSet* pNewSet = 0; pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox @@ -1168,7 +1168,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) case SID_ATTR_CHAR_WEIGHT: { // #i78017 establish the same behaviour as in Writer - BYTE nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; + sal_uInt8 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; SfxItemPool& rPool = GetPool(); SvxScriptSetItem aSetItem( nSlot, rPool ); @@ -1180,7 +1180,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) FontWeight eWeight = WEIGHT_BOLD; SvxScriptSetItem aOldSetItem( nSlot, rPool ); - aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), FALSE ); + aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), sal_False ); const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript ); if ( pCore && ((const SvxWeightItem*)pCore)->GetWeight() == WEIGHT_BOLD ) eWeight = WEIGHT_NORMAL; @@ -1188,14 +1188,14 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) aSetItem.PutItemForScriptType( nScript, SvxWeightItem( eWeight, ATTR_FONT_WEIGHT ) ); } pTabViewShell->ApplyUserItemSet( aSetItem.GetItemSet() ); - pNewSet->Put( aSetItem.GetItemSet(), FALSE ); + pNewSet->Put( aSetItem.GetItemSet(), sal_False ); } break; case SID_ATTR_CHAR_POSTURE: { // #i78017 establish the same behaviour as in Writer - BYTE nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; + sal_uInt8 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; SfxItemPool& rPool = GetPool(); SvxScriptSetItem aSetItem( nSlot, rPool ); @@ -1207,7 +1207,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) FontItalic eItalic = ITALIC_NORMAL; SvxScriptSetItem aOldSetItem( nSlot, rPool ); - aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), FALSE ); + aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), sal_False ); const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript ); if ( pCore && ((const SvxPostureItem*)pCore)->GetPosture() == ITALIC_NORMAL ) eItalic = ITALIC_NONE; @@ -1215,7 +1215,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) aSetItem.PutItemForScriptType( nScript, SvxPostureItem( eItalic, ATTR_FONT_POSTURE ) ); } pTabViewShell->ApplyUserItemSet( aSetItem.GetItemSet() ); - pNewSet->Put( aSetItem.GetItemSet(), FALSE ); + pNewSet->Put( aSetItem.GetItemSet(), sal_False ); } break; @@ -1294,12 +1294,12 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) SvxCellHorJustify eHorJustify = SVX_HOR_JUSTIFY_STANDARD; SvxCellVerJustify eVerJustify = SVX_VER_JUSTIFY_STANDARD; - if (rAttrSet.GetItemState(ATTR_HOR_JUSTIFY, TRUE,&pItem ) == SFX_ITEM_SET) + if (rAttrSet.GetItemState(ATTR_HOR_JUSTIFY, sal_True,&pItem ) == SFX_ITEM_SET) { pHorJustify = (const SvxHorJustifyItem*)pItem; eHorJustify = SvxCellHorJustify( pHorJustify->GetValue() ); } - if (rAttrSet.GetItemState(ATTR_VER_JUSTIFY, TRUE,&pItem ) == SFX_ITEM_SET) + if (rAttrSet.GetItemState(ATTR_VER_JUSTIFY, sal_True,&pItem ) == SFX_ITEM_SET) { pVerJustify = (const SvxVerJustifyItem*)pItem; eVerJustify = SvxCellVerJustify( pVerJustify->GetValue() ); @@ -1413,7 +1413,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) if ( !pNewAttrs ) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { @@ -1425,7 +1425,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) case SID_ATTR_ALIGN_LINEBREAK: // ohne Parameter als Toggle { const ScPatternAttr* pAttrs = pTabViewShell->GetSelectionPattern(); - BOOL bOld = ((const SfxBoolItem&)pAttrs->GetItem(ATTR_LINEBREAK)).GetValue(); + sal_Bool bOld = ((const SfxBoolItem&)pAttrs->GetItem(ATTR_LINEBREAK)).GetValue(); SfxBoolItem aBreakItem( ATTR_LINEBREAK, !bOld ); pTabViewShell->ApplyAttr( aBreakItem ); @@ -1454,7 +1454,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) } else { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { @@ -1475,13 +1475,13 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) case SID_ATTR_CHAR_FONTHEIGHT: { // #i78017 establish the same behaviour as in Writer - BYTE nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; + sal_uInt8 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; if (nSlot == SID_ATTR_CHAR_FONT) nScript = pTabViewShell->GetSelectionScriptType(); SfxItemPool& rPool = GetPool(); SvxScriptSetItem aSetItem( nSlot, rPool ); - USHORT nWhich = rPool.GetWhich( nSlot ); + sal_uInt16 nWhich = rPool.GetWhich( nSlot ); aSetItem.PutItemForScriptType( nScript, pNewAttrs->Get( nWhich ) ); pTabViewShell->ApplyUserItemSet( aSetItem.GetItemSet() ); @@ -1508,13 +1508,13 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) pDefLine->SetOutWidth( pLine->GetOutWidth() ); pDefLine->SetInWidth ( pLine->GetInWidth() ); pDefLine->SetDistance( pLine->GetDistance() ); - pTabViewShell->SetSelectionFrameLines( pDefLine, FALSE ); + pTabViewShell->SetSelectionFrameLines( pDefLine, sal_False ); } else { pTabViewShell->SetDefaultFrameLine( pLine ); pTabViewShell->GetDefaultFrameLine()->SetColor( COL_BLACK ); - pTabViewShell->SetSelectionFrameLines( pLine, FALSE ); + pTabViewShell->SetSelectionFrameLines( pLine, sal_False ); } } else @@ -1522,7 +1522,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) Color aColorBlack( COL_BLACK ); SvxBorderLine aDefLine( &aColorBlack, 20, 0, 0 ); pTabViewShell->SetDefaultFrameLine( &aDefLine ); - pTabViewShell->SetSelectionFrameLines( NULL, FALSE ); + pTabViewShell->SetSelectionFrameLines( NULL, sal_False ); } } break; @@ -1538,13 +1538,13 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) if ( pDefLine ) { pDefLine->SetColor( rColor ); - pTabViewShell->SetSelectionFrameLines( pDefLine, TRUE ); + pTabViewShell->SetSelectionFrameLines( pDefLine, sal_True ); } else { SvxBorderLine aDefLine( &rColor, 20, 0, 0 ); pTabViewShell->SetDefaultFrameLine( &aDefLine ); - pTabViewShell->SetSelectionFrameLines( &aDefLine, FALSE ); + pTabViewShell->SetSelectionFrameLines( &aDefLine, sal_False ); } } break; @@ -1572,7 +1572,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) // Border-Items vom Controller auswerten: const SfxPoolItem* pItem = 0; - if ( pNewAttrs->GetItemState( ATTR_BORDER, TRUE, &pItem ) + if ( pNewAttrs->GetItemState( ATTR_BORDER, sal_True, &pItem ) == SFX_ITEM_SET ) { // #100959# The SvxFrameToolBoxControl toolbox controller uses a default @@ -1593,7 +1593,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) rReq.AppendItem( aBoxItem ); } - if ( pNewAttrs->GetItemState( ATTR_BORDER_INNER, TRUE, &pItem ) + if ( pNewAttrs->GetItemState( ATTR_BORDER_INNER, sal_True, &pItem ) == SFX_ITEM_SET ) { SvxBoxInfoItem aBoxInfoItem( *(const SvxBoxInfoItem*)pItem ); @@ -1674,12 +1674,12 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet ) const SvxBorderLine* pLine = pTabViewShell->GetDefaultFrameLine(); const SvxBrushItem& rBrushItem = (const SvxBrushItem&)rAttrSet.Get( ATTR_BACKGROUND ); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); - rSet.Put( rAttrSet, FALSE ); + rSet.Put( rAttrSet, sal_False ); // choose font info according to selection script type - BYTE nScript = 0; // GetSelectionScriptType never returns 0 + sal_uInt8 nScript = 0; // GetSelectionScriptType never returns 0 if ( rSet.GetItemState( ATTR_FONT ) != SFX_ITEM_UNKNOWN ) { if (!nScript) nScript = pTabViewShell->GetSelectionScriptType(); @@ -1728,10 +1728,10 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) { ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); - rSet.Put( rAttrSet, FALSE ); // ItemStates mitkopieren + rSet.Put( rAttrSet, sal_False ); // ItemStates mitkopieren // choose font info according to selection script type - BYTE nScript = 0; // GetSelectionScriptType never returns 0 + sal_uInt8 nScript = 0; // GetSelectionScriptType never returns 0 if ( rSet.GetItemState( ATTR_FONT_WEIGHT ) != SFX_ITEM_UNKNOWN ) { if (!nScript) nScript = pTabViewShell->GetSelectionScriptType(); @@ -1752,7 +1752,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) // Unterstreichung //------------------------ - eState = rAttrSet.GetItemState( ATTR_FONT_UNDERLINE, TRUE ); + eState = rAttrSet.GetItemState( ATTR_FONT_UNDERLINE, sal_True ); if ( eState == SFX_ITEM_DONTCARE ) { rSet.InvalidateItem( SID_ULINE_VAL_NONE ); @@ -1764,7 +1764,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) { FontUnderline eUnderline = ((const SvxUnderlineItem&) rAttrSet.Get(ATTR_FONT_UNDERLINE)).GetLineStyle(); - USHORT nId = SID_ULINE_VAL_NONE; + sal_uInt16 nId = SID_ULINE_VAL_NONE; switch (eUnderline) { case UNDERLINE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break; @@ -1773,7 +1773,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) default: break; } - rSet.Put( SfxBoolItem( nId, TRUE ) ); + rSet.Put( SfxBoolItem( nId, sal_True ) ); } //------------------------ @@ -1784,11 +1784,11 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) const SvxVerJustifyItem* pVerJustify = NULL; SvxCellHorJustify eHorJustify = SVX_HOR_JUSTIFY_STANDARD; SvxCellVerJustify eVerJustify = SVX_VER_JUSTIFY_STANDARD; - USHORT nWhich = 0; - BOOL bJustifyStd = FALSE; - SfxBoolItem aBoolItem ( 0, TRUE ); + sal_uInt16 nWhich = 0; + sal_Bool bJustifyStd = sal_False; + SfxBoolItem aBoolItem ( 0, sal_True ); - eState = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY, TRUE, + eState = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY, sal_True, (const SfxPoolItem**)&pHorJustify ); switch ( eState ) { @@ -1819,7 +1819,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) case SVX_HOR_JUSTIFY_REPEAT: default: - bJustifyStd = TRUE; + bJustifyStd = sal_True; break; } } @@ -1833,7 +1833,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) break; default: - bJustifyStd = TRUE; + bJustifyStd = sal_True; break; } @@ -1844,12 +1844,12 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) } else if ( bJustifyStd ) { - aBoolItem.SetValue( FALSE ); + aBoolItem.SetValue( sal_False ); aBoolItem.SetWhich( SID_ALIGNLEFT ); rSet.Put( aBoolItem ); aBoolItem.SetWhich( SID_ALIGNRIGHT ); rSet.Put( aBoolItem ); aBoolItem.SetWhich( SID_ALIGNCENTERHOR ); rSet.Put( aBoolItem ); aBoolItem.SetWhich( SID_ALIGNBLOCK ); rSet.Put( aBoolItem ); - bJustifyStd = FALSE; + bJustifyStd = sal_False; } //------------------------ @@ -1857,9 +1857,9 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) //------------------------ nWhich = 0; - aBoolItem.SetValue( TRUE ); + aBoolItem.SetValue( sal_True ); - eState = rAttrSet.GetItemState( ATTR_VER_JUSTIFY, TRUE, + eState = rAttrSet.GetItemState( ATTR_VER_JUSTIFY, sal_True, (const SfxPoolItem**)&pVerJustify ); switch ( eState ) @@ -1884,7 +1884,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) case SVX_VER_JUSTIFY_STANDARD: default: - bJustifyStd = TRUE; + bJustifyStd = sal_True; break; } } @@ -1897,7 +1897,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) break; default: - bJustifyStd = TRUE; + bJustifyStd = sal_True; break; } @@ -1908,7 +1908,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) } else if ( bJustifyStd ) { - aBoolItem.SetValue( FALSE ); + aBoolItem.SetValue( sal_False ); aBoolItem.SetWhich( SID_ALIGNTOP ); rSet.Put( aBoolItem ); aBoolItem.SetWhich( SID_ALIGNBOTTOM ); rSet.Put( aBoolItem ); aBoolItem.SetWhich( SID_ALIGNCENTERVER ); rSet.Put( aBoolItem ); @@ -1939,7 +1939,7 @@ void ScFormatShell::GetAlignState( SfxItemSet& rSet ) ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); SvxCellHorJustify eHAlign = SVX_HOR_JUSTIFY_STANDARD; bool bHasHAlign = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY ) != SFX_ITEM_DONTCARE; @@ -1991,7 +1991,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet ) ScDocument* pDoc = pViewData->GetDocument(); SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch ( nWhich ) @@ -2003,7 +2003,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet ) const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); if ( rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) != SFX_ITEM_DONTCARE ) { - ULONG nNumberFormat = ((const SfxUInt32Item&)rAttrSet.Get( + sal_uLong nNumberFormat = ((const SfxUInt32Item&)rAttrSet.Get( ATTR_VALUE_FORMAT )).GetValue(); SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); @@ -2032,13 +2032,13 @@ void ScFormatShell::ExecuteTextDirection( SfxRequest& rReq ) pTabViewShell->UpdateInputHandler(); } - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch( nSlot ) { case SID_TEXTDIRECTION_LEFT_TO_RIGHT: case SID_TEXTDIRECTION_TOP_TO_BOTTOM: { - BOOL bVert = (nSlot == SID_TEXTDIRECTION_TOP_TO_BOTTOM); + sal_Bool bVert = (nSlot == SID_TEXTDIRECTION_TOP_TO_BOTTOM); ScPatternAttr aAttr( GetViewData()->GetDocument()->GetPool() ); SfxItemSet& rItemSet = aAttr.GetItemSet(); rItemSet.Put( SfxBoolItem( ATTR_STACKED, bVert ) ); @@ -2064,15 +2064,15 @@ void ScFormatShell::GetTextDirectionState( SfxItemSet& rSet ) ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); - BOOL bVertDontCare = + sal_Bool bVertDontCare = (rAttrSet.GetItemState( ATTR_VERTICAL_ASIAN ) == SFX_ITEM_DONTCARE) || (rAttrSet.GetItemState( ATTR_STACKED ) == SFX_ITEM_DONTCARE); - BOOL bLeftRight = !bVertDontCare && + sal_Bool bLeftRight = !bVertDontCare && !((const SfxBoolItem&) rAttrSet.Get( ATTR_STACKED )).GetValue(); - BOOL bTopBottom = !bVertDontCare && !bLeftRight && + sal_Bool bTopBottom = !bVertDontCare && !bLeftRight && ((const SfxBoolItem&) rAttrSet.Get( ATTR_VERTICAL_ASIAN )).GetValue(); - BOOL bBidiDontCare = (rAttrSet.GetItemState( ATTR_WRITINGDIR ) == SFX_ITEM_DONTCARE); + sal_Bool bBidiDontCare = (rAttrSet.GetItemState( ATTR_WRITINGDIR ) == SFX_ITEM_DONTCARE); EEHorizontalTextDirection eBidiDir = EE_HTEXTDIR_DEFAULT; if ( !bBidiDontCare ) { @@ -2088,11 +2088,11 @@ void ScFormatShell::GetTextDirectionState( SfxItemSet& rSet ) } SvtLanguageOptions aLangOpt; - BOOL bDisableCTLFont = !aLangOpt.IsCTLFontEnabled(); - BOOL bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled(); + sal_Bool bDisableCTLFont = !aLangOpt.IsCTLFontEnabled(); + sal_Bool bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled(); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while( nWhich ) { switch( nWhich ) @@ -2142,7 +2142,7 @@ void ScFormatShell::ExecFormatPaintbrush( SfxRequest& rReq ) } else { - BOOL bLock = FALSE; + sal_Bool bLock = sal_False; const SfxItemSet *pArgs = rReq.GetArgs(); if( pArgs && pArgs->Count() >= 1 ) bLock = static_cast<const SfxBoolItem&>(pArgs->Get(SID_FORMATPAINTBRUSH)).GetValue(); @@ -2153,7 +2153,7 @@ void ScFormatShell::ExecFormatPaintbrush( SfxRequest& rReq ) pView->Unmark(); ScDocument* pBrushDoc = new ScDocument( SCDOCMODE_CLIP ); - pView->CopyToClip( pBrushDoc, FALSE, TRUE ); + pView->CopyToClip( pBrushDoc, sal_False, sal_True ); pView->SetBrushDocument( pBrushDoc, bLock ); } } |