diff options
Diffstat (limited to 'svx/source/table')
-rw-r--r-- | svx/source/table/cell.cxx | 8 | ||||
-rw-r--r-- | svx/source/table/celleditsource.cxx | 14 | ||||
-rw-r--r-- | svx/source/table/celleditsource.hxx | 2 | ||||
-rw-r--r-- | svx/source/table/makefile.mk | 80 | ||||
-rw-r--r-- | svx/source/table/svdotable.cxx | 88 | ||||
-rw-r--r-- | svx/source/table/tablecontroller.cxx | 72 | ||||
-rw-r--r-- | svx/source/table/tablecontroller.hxx | 2 | ||||
-rw-r--r-- | svx/source/table/tablelayouter.cxx | 4 | ||||
-rw-r--r-- | svx/source/table/tablertfexporter.cxx | 8 | ||||
-rw-r--r-- | svx/source/table/tablertfimporter.cxx | 20 | ||||
-rw-r--r-- | svx/source/table/tableundo.cxx | 10 | ||||
-rw-r--r-- | svx/source/table/tableundo.hxx | 6 |
12 files changed, 117 insertions, 197 deletions
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 0f5467c99721..f6540e304bfc 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -399,7 +399,7 @@ void Cell::mergeContent( const CellRef& xSourceCell ) if( xSourceCell->hasText() ) { SdrOutliner& rOutliner=rTableObj.ImpGetDrawOutliner(); - rOutliner.SetUpdateMode(TRUE); + rOutliner.SetUpdateMode(sal_True); if( hasText() ) { @@ -657,7 +657,7 @@ sal_Int32 Cell::getMinimumHeight() { Outliner& rOutliner=rTableObj.ImpGetDrawOutliner(); rOutliner.SetPaperSize(aSize); - rOutliner.SetUpdateMode(TRUE); + rOutliner.SetUpdateMode(sal_True); ForceOutlinerParaObject( OUTLINERMODE_TEXTOBJECT ); if( GetOutlinerParaObject() ) @@ -1417,7 +1417,7 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName ) th case XATTR_FILLHATCH: case XATTR_LINEDASH: { - NameOrIndex* pItem = (NameOrIndex*)rSet.GetItem((USHORT)pMap->nWID); + NameOrIndex* pItem = (NameOrIndex*)rSet.GetItem((sal_uInt16)pMap->nWID); if( ( pItem == NULL ) || ( pItem->GetName().Len() == 0) ) eState = PropertyState_DEFAULT_VALUE; } @@ -1432,7 +1432,7 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName ) th case XATTR_LINESTART: case XATTR_FILLFLOATTRANSPARENCE: { - NameOrIndex* pItem = (NameOrIndex*)rSet.GetItem((USHORT)pMap->nWID); + NameOrIndex* pItem = (NameOrIndex*)rSet.GetItem((sal_uInt16)pMap->nWID); if( ( pItem == NULL ) ) eState = PropertyState_DEFAULT_VALUE; } diff --git a/svx/source/table/celleditsource.cxx b/svx/source/table/celleditsource.cxx index 4b49088be6e2..e979816fcb8d 100644 --- a/svx/source/table/celleditsource.cxx +++ b/svx/source/table/celleditsource.cxx @@ -153,7 +153,7 @@ public: void lock(); void unlock(); - BOOL IsValid() const; + sal_Bool IsValid() const; Rectangle GetVisArea(); Point LogicToPixel( const Point&, const MapMode& rMapMode ); @@ -320,7 +320,7 @@ void CellEditSourceImpl::Notify( SfxBroadcaster&, const SfxHint& rHint ) { case HINT_OBJCHG: { - mbDataValid = FALSE; // Text muss neu geholt werden + mbDataValid = sal_False; // Text muss neu geholt werden if( HasView() ) { @@ -353,7 +353,7 @@ void CellEditSourceImpl::Notify( SfxBroadcaster&, const SfxHint& rHint ) mpView->GetTextEditOutliner()->SetNotifyHdl( LINK(this, CellEditSourceImpl, NotifyHdl) ); // #104157# Only now we're really in edit mode - mbShapeIsEditMode = TRUE; + mbShapeIsEditMode = sal_True; Broadcast( *pSdrHint ); } @@ -367,7 +367,7 @@ void CellEditSourceImpl::Notify( SfxBroadcaster&, const SfxHint& rHint ) Broadcast( *pSdrHint ); // #104157# We're no longer in edit mode - mbShapeIsEditMode = FALSE; + mbShapeIsEditMode = sal_False; // remove as listener - outliner might outlive ourselves if( mpView && mpView->GetTextEditOutliner() ) @@ -800,9 +800,9 @@ void CellEditSourceImpl::unlock() } } -BOOL CellEditSourceImpl::IsValid() const +sal_Bool CellEditSourceImpl::IsValid() const { - return mpView && mpWindow ? TRUE : FALSE; + return mpView && mpWindow ? sal_True : sal_False; } Rectangle CellEditSourceImpl::GetVisArea() @@ -997,7 +997,7 @@ void CellEditSource::unlock() //------------------------------------------------------------------------ -BOOL CellEditSource::IsValid() const +sal_Bool CellEditSource::IsValid() const { return mpImpl->IsValid(); } diff --git a/svx/source/table/celleditsource.hxx b/svx/source/table/celleditsource.hxx index 561086106fbf..4d5ccbd43e55 100644 --- a/svx/source/table/celleditsource.hxx +++ b/svx/source/table/celleditsource.hxx @@ -71,7 +71,7 @@ public: void unlock(); // the SvxViewForwarder interface - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point&, const MapMode& ) const; virtual Point PixelToLogic( const Point&, const MapMode& ) const; diff --git a/svx/source/table/makefile.mk b/svx/source/table/makefile.mk deleted file mode 100644 index 1eaaef12aa02..000000000000 --- a/svx/source/table/makefile.mk +++ /dev/null @@ -1,80 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PROJECTPCH4DLL=TRUE -PROJECTPCH=svxpch -PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch - -PRJNAME=svx -TARGET=table -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE; - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -LIB1TARGET= $(SLB)$/$(TARGET)-core.lib -LIB1OBJFILES= \ - $(SLO)$/propertyset.obj\ - $(SLO)$/cell.obj\ - $(SLO)$/cellrange.obj\ - $(SLO)$/cellcursor.obj\ - $(SLO)$/tablerow.obj\ - $(SLO)$/tablerows.obj\ - $(SLO)$/tablecolumn.obj\ - $(SLO)$/tablecolumns.obj\ - $(SLO)$/tablemodel.obj\ - $(SLO)$/svdotable.obj\ - $(SLO)$/viewcontactoftableobj.obj\ - $(SLO)$/tablelayouter.obj\ - $(SLO)$/tablehandles.obj\ - $(SLO)$/tablecontroller.obj\ - $(SLO)$/tableundo.obj - -LIB2TARGET= $(SLB)$/$(TARGET).lib -LIB2OBJFILES= \ - $(SLO)$/celleditsource.obj \ - $(SLO)$/tabledesign.obj \ - $(SLO)$/accessibletableshape.obj \ - $(SLO)$/accessiblecell.obj \ - $(SLO)$/tablertfexporter.obj \ - $(SLO)$/tablertfimporter.obj - -SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) - -SRS1NAME=table -SRC1FILES= table.src - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 7f9250a90561..9ac652f5e025 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -756,7 +756,7 @@ SdrTableObj::SdrTableObj(SdrModel* _pModel, const ::Rectangle& rNewRect, sal_Int void SdrTableObj::init( sal_Int32 nColumns, sal_Int32 nRows ) { - bClosedObj = TRUE; + bClosedObj = sal_True; mpImpl = new SdrTableObjImpl; mpImpl->acquire(); @@ -1353,14 +1353,14 @@ void SdrTableObj::FitFrameToTextSize() FASTBOOL SdrTableObj::IsAutoGrowHeight() const { - return TRUE; + return sal_True; } // -------------------------------------------------------------------- FASTBOOL SdrTableObj::IsAutoGrowWidth() const { - return TRUE; + return sal_True; } // -------------------------------------------------------------------- @@ -1399,34 +1399,34 @@ void SdrTableObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus ) void SdrTableObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { - rInfo.bResizeFreeAllowed=TRUE; - rInfo.bResizePropAllowed=TRUE; - rInfo.bRotateFreeAllowed=FALSE; - rInfo.bRotate90Allowed =FALSE; - rInfo.bMirrorFreeAllowed=FALSE; - rInfo.bMirror45Allowed =FALSE; - rInfo.bMirror90Allowed =FALSE; + rInfo.bResizeFreeAllowed=sal_True; + rInfo.bResizePropAllowed=sal_True; + rInfo.bRotateFreeAllowed=sal_False; + rInfo.bRotate90Allowed =sal_False; + rInfo.bMirrorFreeAllowed=sal_False; + rInfo.bMirror45Allowed =sal_False; + rInfo.bMirror90Allowed =sal_False; // allow transparence - rInfo.bTransparenceAllowed = TRUE; + rInfo.bTransparenceAllowed = sal_True; // gradient depends on fillstyle XFillStyle eFillStyle = ((XFillStyleItem&)(GetObjectItem(XATTR_FILLSTYLE))).GetValue(); rInfo.bGradientAllowed = (eFillStyle == XFILL_GRADIENT); - rInfo.bShearAllowed =FALSE; - rInfo.bEdgeRadiusAllowed=FALSE; - rInfo.bCanConvToPath =FALSE; - rInfo.bCanConvToPoly =FALSE; - rInfo.bCanConvToPathLineToArea=FALSE; - rInfo.bCanConvToPolyLineToArea=FALSE; - rInfo.bCanConvToContour = FALSE; + rInfo.bShearAllowed =sal_False; + rInfo.bEdgeRadiusAllowed=sal_False; + rInfo.bCanConvToPath =sal_False; + rInfo.bCanConvToPoly =sal_False; + rInfo.bCanConvToPathLineToArea=sal_False; + rInfo.bCanConvToPolyLineToArea=sal_False; + rInfo.bCanConvToContour = sal_False; } // -------------------------------------------------------------------- -UINT16 SdrTableObj::GetObjIdentifier() const +sal_uInt16 SdrTableObj::GetObjIdentifier() const { - return static_cast<UINT16>(OBJ_TABLE); + return static_cast<sal_uInt16>(OBJ_TABLE); } // -------------------------------------------------------------------- @@ -1460,7 +1460,7 @@ void SdrTableObj::SetModel(SdrModel* pNewModel) // -------------------------------------------------------------------- -void SdrTableObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText, Rectangle* pAnchorRect, BOOL bLineWidth ) const +void SdrTableObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText, Rectangle* pAnchorRect, sal_Bool bLineWidth ) const { if( mpImpl ) TakeTextRect( mpImpl->maEditPos, rOutliner, rTextRect, bNoEditText, pAnchorRect, bLineWidth ); @@ -1468,7 +1468,7 @@ void SdrTableObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FA // -------------------------------------------------------------------- -void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText, Rectangle* pAnchorRect, BOOL /*bLineWidth*/ ) const +void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText, Rectangle* pAnchorRect, sal_Bool /*bLineWidth*/ ) const { if( !mpImpl ) return; @@ -1483,7 +1483,7 @@ void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, Rec SdrTextVertAdjust eVAdj=xCell->GetTextVerticalAdjust(); // SdrTextHorzAdjust eHAdj=xCell->GetTextHorizontalAdjust(); - ULONG nStat0=rOutliner.GetControlWord(); + sal_uIntPtr nStat0=rOutliner.GetControlWord(); Size aNullSize; nStat0 |= EE_CNTRL_AUTOPAGESIZE; rOutliner.SetControlWord(nStat0); @@ -1519,7 +1519,7 @@ void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, Rec if( bHitTest ) // #i33696# take back fix #i27510# rOutliner.SetTextObj( this ); - rOutliner.SetUpdateMode(TRUE); + rOutliner.SetUpdateMode(sal_True); rOutliner.SetText(*pPara); } } @@ -1531,7 +1531,7 @@ void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, Rec if (pEdtOutl && !bNoEditText && pPara && mpImpl->mxActiveCell == xCell ) delete pPara; - rOutliner.SetUpdateMode(TRUE); + rOutliner.SetUpdateMode(sal_True); rOutliner.SetControlWord(nStat0); Point aTextPos(aAnkRect.TopLeft()); @@ -1750,7 +1750,7 @@ void SdrTableObj::TakeTextEditArea( const CellPos& rPos, Size* pPaperMin, Size* // -------------------------------------------------------------------- -USHORT SdrTableObj::GetOutlinerViewAnchorMode() const +sal_uInt16 SdrTableObj::GetOutlinerViewAnchorMode() const { EVAnchorMode eRet=ANCHOR_TOP_LEFT; CellRef xCell( getActiveCell() ); @@ -1807,7 +1807,7 @@ USHORT SdrTableObj::GetOutlinerViewAnchorMode() const } */ } - return (USHORT)eRet; + return (sal_uInt16)eRet; } // -------------------------------------------------------------------- @@ -2044,14 +2044,14 @@ sal_Bool SdrTableObj::BegTextEdit(SdrOutliner& rOutl) // ForceOutlinerParaObject(); - mbInEditMode = TRUE; + mbInEditMode = sal_True; rOutl.Init( OUTLINERMODE_TEXTOBJECT ); rOutl.SetRefDevice( pModel->GetRefDevice() ); // -- FASTBOOL bUpdMerk=rOutl.GetUpdateMode(); - if (bUpdMerk) rOutl.SetUpdateMode(FALSE); + if (bUpdMerk) rOutl.SetUpdateMode(sal_False); Size aPaperMin; Size aPaperMax; Rectangle aEditArea; @@ -2061,10 +2061,10 @@ sal_Bool SdrTableObj::BegTextEdit(SdrOutliner& rOutl) rOutl.SetMaxAutoPaperSize(aPaperMax); rOutl.SetPaperSize(aPaperMax); - if (bUpdMerk) rOutl.SetUpdateMode(TRUE); + if (bUpdMerk) rOutl.SetUpdateMode(sal_True); //--- - ULONG nStat=rOutl.GetControlWord(); + sal_uIntPtr nStat=rOutl.GetControlWord(); // nStat &= ~EE_CNTRL_AUTOPAGESIZE; nStat |= EE_CNTRL_AUTOPAGESIZE; nStat &=~EE_CNTRL_STRETCHING; @@ -2093,7 +2093,7 @@ void SdrTableObj::EndTextEdit(SdrOutliner& rOutl) OutlinerParaObject* pNewText = 0; Paragraph* p1stPara = rOutl.GetParagraph( 0 ); - UINT32 nParaAnz = rOutl.GetParagraphCount(); + sal_uInt32 nParaAnz = rOutl.GetParagraphCount(); if(p1stPara) { @@ -2123,11 +2123,11 @@ void SdrTableObj::EndTextEdit(SdrOutliner& rOutl) pEdtOutl = 0; rOutl.Clear(); - UINT32 nStat = rOutl.GetControlWord(); + sal_uInt32 nStat = rOutl.GetControlWord(); nStat &= ~EE_CNTRL_AUTOPAGESIZE; rOutl.SetControlWord(nStat); - mbInEditMode = FALSE; + mbInEditMode = sal_False; } // -------------------------------------------------------------------- @@ -2235,7 +2235,7 @@ FASTBOOL SdrTableObj::AdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt FASTBOOL SdrTableObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHeight, FASTBOOL bWidth) const { if((pModel == NULL) || rR.IsEmpty() || !mpImpl || !mpImpl->mxTable.is() ) - return FALSE; + return sal_False; Rectangle aRectangle( rR ); mpImpl->LayoutTable( aRectangle, !bWidth, !bHeight ); @@ -2243,11 +2243,11 @@ FASTBOOL SdrTableObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHei if( aRectangle != rR ) { rR = aRectangle; - return TRUE; + return sal_True; } else { - return FALSE; + return sal_False; } } @@ -2330,7 +2330,7 @@ bool SdrTableObj::IsRealyEdited() const FASTBOOL SdrTableObj::IsFontwork() const { - return FALSE; + return sal_False; } // -------------------------------------------------------------------- @@ -2439,8 +2439,8 @@ void SdrTableObj::AddToHdlList(SdrHdlList& rHdlList) const rHdlList.AddHdl( pH = new SdrHdl(aRect.BottomCenter(),HDL_LOWER) ); pH->SetMoveOutside( true ); rHdlList.AddHdl( pH = new SdrHdl(aRect.BottomRight(),HDL_LWRGT) ); pH->SetMoveOutside( true ); - ULONG nHdlCount = rHdlList.GetHdlCount(); - for( ULONG nHdl = 0; nHdl < nHdlCount; nHdl++ ) + sal_uIntPtr nHdlCount = rHdlList.GetHdlCount(); + for( sal_uIntPtr nHdl = 0; nHdl < nHdlCount; nHdl++ ) rHdlList.GetHdl(nHdl)->SetObj((SdrObject*)this); } @@ -2606,7 +2606,7 @@ FASTBOOL SdrTableObj::BegCreate(SdrDragStat& rStat) aRect1.Justify(); rStat.SetActionRect(aRect1); aRect = aRect1; - return TRUE; + return sal_True; } // -------------------------------------------------------------------- @@ -2619,8 +2619,8 @@ FASTBOOL SdrTableObj::MovCreate(SdrDragStat& rStat) rStat.SetActionRect(aRect1); aRect=aRect1; // fuer ObjName SetBoundRectDirty(); - bSnapRectDirty=TRUE; - return TRUE; + bSnapRectDirty=sal_True; + return sal_True; } // -------------------------------------------------------------------- @@ -2640,7 +2640,7 @@ void SdrTableObj::BrkCreate(SdrDragStat& /*rStat*/) FASTBOOL SdrTableObj::BckCreate(SdrDragStat& /*rStat*/) { - return TRUE; + return sal_True; } // -------------------------------------------------------------------- diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index a4ba47047efe..9452420901a7 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -400,7 +400,7 @@ void SvxTableController::GetState( SfxItemSet& rSet ) // Iterate over all requested items in the set. SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { switch (nWhich) @@ -418,7 +418,7 @@ void SvxTableController::GetState( SfxItemSet& rSet ) if( !pSet ) { pSet = new SfxItemSet( mxTableObj->GetModel()->GetItemPool() ); - MergeAttrFromSelectedCells(*pSet, FALSE); + MergeAttrFromSelectedCells(*pSet, sal_False); } SdrTextVertAdjust eAdj = SDRTEXTVERTADJUST_BLOCK; @@ -504,11 +504,11 @@ void SvxTableController::onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs ) if( pArgs ) { const SfxPoolItem* pItem = 0; - pArgs->GetItemState(nSId, FALSE, &pItem); + pArgs->GetItemState(nSId, sal_False, &pItem); if (pItem) { nCount = ((const SfxInt16Item* )pItem)->GetValue(); - if(SFX_ITEM_SET == pArgs->GetItemState(SID_TABLE_PARAM_INSERT_AFTER, TRUE, &pItem)) + if(SFX_ITEM_SET == pArgs->GetItemState(SID_TABLE_PARAM_INSERT_AFTER, sal_True, &pItem)) bInsertAfter = ((const SfxBoolItem* )pItem)->GetValue(); } } @@ -722,14 +722,14 @@ void SvxTableController::onFormatTable( SfxRequest& rReq ) if( !pArgs && pTableObj->GetModel() ) { SfxItemSet aNewAttr( pTableObj->GetModel()->GetItemPool() ); - MergeAttrFromSelectedCells(aNewAttr, FALSE); + MergeAttrFromSelectedCells(aNewAttr, sal_False); // merge drawing layer text distance items into SvxBoxItem used by the dialog SvxBoxItem aBoxItem( static_cast< const SvxBoxItem& >( aNewAttr.Get( SDRATTR_TABLE_BORDER ) ) ); - aBoxItem.SetDistance( sal::static_int_cast< USHORT >( ((SdrTextLeftDistItem&)(aNewAttr.Get(SDRATTR_TEXT_LEFTDIST))).GetValue()), BOX_LINE_LEFT ); - aBoxItem.SetDistance( sal::static_int_cast< USHORT >( ((SdrTextRightDistItem&)(aNewAttr.Get(SDRATTR_TEXT_RIGHTDIST))).GetValue()), BOX_LINE_RIGHT ); - aBoxItem.SetDistance( sal::static_int_cast< USHORT >( ((SdrTextUpperDistItem&)(aNewAttr.Get(SDRATTR_TEXT_UPPERDIST))).GetValue()), BOX_LINE_TOP ); - aBoxItem.SetDistance( sal::static_int_cast< USHORT >( ((SdrTextLowerDistItem&)(aNewAttr.Get(SDRATTR_TEXT_LOWERDIST))).GetValue()), BOX_LINE_BOTTOM ); + aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrTextLeftDistItem&)(aNewAttr.Get(SDRATTR_TEXT_LEFTDIST))).GetValue()), BOX_LINE_LEFT ); + aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrTextRightDistItem&)(aNewAttr.Get(SDRATTR_TEXT_RIGHTDIST))).GetValue()), BOX_LINE_RIGHT ); + aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrTextUpperDistItem&)(aNewAttr.Get(SDRATTR_TEXT_UPPERDIST))).GetValue()), BOX_LINE_TOP ); + aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( ((SdrTextLowerDistItem&)(aNewAttr.Get(SDRATTR_TEXT_LOWERDIST))).GetValue()), BOX_LINE_BOTTOM ); aNewAttr.Put( aBoxItem ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -752,7 +752,7 @@ void SvxTableController::onFormatTable( SfxRequest& rReq ) if( aNewBoxItem.GetDistance( BOX_LINE_BOTTOM ) != aBoxItem.GetDistance( BOX_LINE_BOTTOM ) ) aNewSet.Put(SdrTextLowerDistItem( aNewBoxItem.GetDistance( BOX_LINE_BOTTOM ) ) ); - SetAttrToSelectedCells(aNewSet, FALSE); + SetAttrToSelectedCells(aNewSet, sal_False); } UpdateTableShape(); } @@ -843,7 +843,7 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs ) SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() ); SdrModel* pModel = pTableObj ? pTableObj->GetModel() : 0; - if( !pTableObj || !pModel || !pArgs || (SFX_ITEM_SET != pArgs->GetItemState(SID_TABLE_STYLE, FALSE)) ) + if( !pTableObj || !pModel || !pArgs || (SFX_ITEM_SET != pArgs->GetItemState(SID_TABLE_STYLE, sal_False)) ) return; const SfxStringItem* pArg = dynamic_cast< const SfxStringItem* >( &pArgs->Get( SID_TABLE_STYLE ) ); @@ -882,7 +882,7 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs ) bool bChanges = false; const SfxItemSet& rStyleAttribs = xCell->GetStyleSheet()->GetItemSet(); - for ( USHORT nWhich = SDRATTR_START; nWhich <= SDRATTR_TABLE_LAST; nWhich++ ) + for ( sal_uInt16 nWhich = SDRATTR_START; nWhich <= SDRATTR_TABLE_LAST; nWhich++ ) { if( (rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_ON) && (aSet.GetItemState( nWhich ) == SFX_ITEM_ON) ) { @@ -930,22 +930,22 @@ void SvxTableController::SetTableStyleSettings( const SfxItemSet* pArgs ) const SfxPoolItem *pPoolItem=NULL; - if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEFIRSTROWSTYLE, FALSE,&pPoolItem)) ) + if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEFIRSTROWSTYLE, sal_False,&pPoolItem)) ) aSettings.mbUseFirstRow = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); - if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USELASTROWSTYLE, FALSE,&pPoolItem)) ) + if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USELASTROWSTYLE, sal_False,&pPoolItem)) ) aSettings.mbUseLastRow = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); - if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEBANDINGROWSTYLE, FALSE,&pPoolItem)) ) + if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEBANDINGROWSTYLE, sal_False,&pPoolItem)) ) aSettings.mbUseRowBanding = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); - if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEFIRSTCOLUMNSTYLE, FALSE,&pPoolItem)) ) + if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEFIRSTCOLUMNSTYLE, sal_False,&pPoolItem)) ) aSettings.mbUseFirstColumn = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); - if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USELASTCOLUMNSTYLE, FALSE,&pPoolItem)) ) + if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USELASTCOLUMNSTYLE, sal_False,&pPoolItem)) ) aSettings.mbUseLastColumn = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); - if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEBANDINGCOLUMNSTYLE, FALSE,&pPoolItem)) ) + if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEBANDINGCOLUMNSTYLE, sal_False,&pPoolItem)) ) aSettings.mbUseColumnBanding = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); if( aSettings == pTableObj->getTableStyleSettings() ) @@ -1677,7 +1677,7 @@ void SvxTableController::EditCell( const CellPos& rPos, ::Window* pWindow, const if(!pTableObj->GetOutlinerParaObject() && mpView->GetTextEditOutliner()) { ::Outliner* pOutl = mpView->GetTextEditOutliner(); - ULONG nParaAnz = pOutl->GetParagraphCount(); + sal_uIntPtr nParaAnz = pOutl->GetParagraphCount(); Paragraph* p1stPara = pOutl->GetParagraph( 0 ); if(nParaAnz==1 && p1stPara) @@ -1703,7 +1703,7 @@ void SvxTableController::EditCell( const CellPos& rPos, ::Window* pWindow, const // create new outliner, owner will be the SdrObjEditView SdrOutliner* pOutl = SdrMakeOutliner( OUTLINERMODE_OUTLINEOBJECT, mpModel ); if( pTableObj->IsVerticalWriting() ) - pOutl->SetVertical( TRUE ); + pOutl->SetVertical( sal_True ); if(mpView->SdrBeginTextEdit(pTableObj, pPV, pWindow, sal_True, pOutl)) { @@ -2020,15 +2020,15 @@ void SvxTableController::MergeAttrFromSelectedCells(SfxItemSet& rAttr, bool bOnl { if(!bOnlyHardAttr) { - if(SFX_ITEM_DONTCARE == rSet.GetItemState(nWhich, FALSE)) + if(SFX_ITEM_DONTCARE == rSet.GetItemState(nWhich, sal_False)) rAttr.InvalidateItem(nWhich); else - rAttr.MergeValue(rSet.Get(nWhich), TRUE); + rAttr.MergeValue(rSet.Get(nWhich), sal_True); } - else if(SFX_ITEM_SET == rSet.GetItemState(nWhich, FALSE)) + else if(SFX_ITEM_SET == rSet.GetItemState(nWhich, sal_False)) { const SfxPoolItem& rItem = rSet.Get(nWhich); - rAttr.MergeValue(rItem, TRUE); + rAttr.MergeValue(rItem, sal_True); } nWhich = aIter.NextWhich(); @@ -2057,7 +2057,7 @@ const sal_uInt16 CELL_LOWER = 0x0080; // -------------------------------------------------------------------- -static void ImplSetLinePreserveColor( SvxBoxItem& rNewFrame, const SvxBorderLine* pNew, USHORT nLine ) +static void ImplSetLinePreserveColor( SvxBoxItem& rNewFrame, const SvxBorderLine* pNew, sal_uInt16 nLine ) { if( pNew ) { @@ -2126,14 +2126,14 @@ static void ImplApplyBoxItem( sal_uInt16 nCellFlags, const SvxBoxItem* pBoxItem, // apply distance to borders if( pBoxInfoItem->IsValid( VALID_DISTANCE ) ) - for( USHORT nLine = 0; nLine < 4; ++nLine ) + for( sal_uInt16 nLine = 0; nLine < 4; ++nLine ) rNewFrame.SetDistance( pBoxItem->GetDistance( nLine ), nLine ); } } // -------------------------------------------------------------------- -static void ImplSetLineColor( SvxBoxItem& rNewFrame, USHORT nLine, const Color& rColor ) +static void ImplSetLineColor( SvxBoxItem& rNewFrame, sal_uInt16 nLine, const Color& rColor ) { const SvxBorderLine* pSourceLine = rNewFrame.GetLine( nLine ); if( pSourceLine ) @@ -2220,19 +2220,19 @@ void SvxTableController::ApplyBorderAttr( const SfxItemSet& rAttr ) if( nRowCount && nColCount ) { const SvxBoxItem* pBoxItem = 0; - if(SFX_ITEM_SET == rAttr.GetItemState(SDRATTR_TABLE_BORDER, FALSE) ) + if(SFX_ITEM_SET == rAttr.GetItemState(SDRATTR_TABLE_BORDER, sal_False) ) pBoxItem = dynamic_cast< const SvxBoxItem* >( &rAttr.Get( SDRATTR_TABLE_BORDER ) ); const SvxBoxInfoItem* pBoxInfoItem = 0; - if(SFX_ITEM_SET == rAttr.GetItemState(SDRATTR_TABLE_BORDER_INNER, FALSE) ) + if(SFX_ITEM_SET == rAttr.GetItemState(SDRATTR_TABLE_BORDER_INNER, sal_False) ) pBoxInfoItem = dynamic_cast< const SvxBoxInfoItem* >( &rAttr.Get( SDRATTR_TABLE_BORDER_INNER ) ); const SvxColorItem* pLineColorItem = 0; - if(SFX_ITEM_SET == rAttr.GetItemState(SID_FRAME_LINECOLOR, FALSE) ) + if(SFX_ITEM_SET == rAttr.GetItemState(SID_FRAME_LINECOLOR, sal_False) ) pLineColorItem = dynamic_cast< const SvxColorItem* >( &rAttr.Get( SID_FRAME_LINECOLOR ) ); const SvxBorderLine* pBorderLineItem = 0; - if(SFX_ITEM_SET == rAttr.GetItemState(SID_FRAME_LINESTYLE, FALSE) ) + if(SFX_ITEM_SET == rAttr.GetItemState(SID_FRAME_LINESTYLE, sal_False) ) pBorderLineItem = ((const SvxLineItem&)rAttr.Get( SID_FRAME_LINESTYLE )).GetLine(); if( pBoxInfoItem && !pBoxItem ) @@ -2327,7 +2327,7 @@ void SvxTableController::SetAttrToSelectedCells(const SfxItemSet& rAttr, bool bR getSelectedCells( aStart, aEnd ); SfxItemSet aAttr(*rAttr.GetPool(), rAttr.GetRanges()); - aAttr.Put(rAttr, TRUE); + aAttr.Put(rAttr, sal_True); const bool bFrame = (rAttr.GetItemState( SDRATTR_TABLE_BORDER ) == SFX_ITEM_SET) || (rAttr.GetItemState( SDRATTR_TABLE_BORDER_INNER ) == SFX_ITEM_SET); @@ -2381,8 +2381,8 @@ bool SvxTableController::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAtt if(pTextEditOutlinerView) { // FALSE= InvalidItems nicht al Default, sondern als "Loecher" betrachten - rTargetSet.Put(pTextEditOutlinerView->GetAttribs(), FALSE); - rTargetSet.Put( SvxScriptTypeItem( pTextEditOutlinerView->GetSelectedScriptType() ), FALSE ); + rTargetSet.Put(pTextEditOutlinerView->GetAttribs(), sal_False); + rTargetSet.Put( SvxScriptTypeItem( pTextEditOutlinerView->GetSelectedScriptType() ), sal_False ); } } @@ -2534,7 +2534,7 @@ bool SvxTableController::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNo getSelectedCells( aStart, aEnd ); SfxItemSet aAttr(*rFormatSet.GetPool(), rFormatSet.GetRanges()); - aAttr.Put(rFormatSet, TRUE); + aAttr.Put(rFormatSet, sal_True); const bool bFrame = (rFormatSet.GetItemState( SDRATTR_TABLE_BORDER ) == SFX_ITEM_SET) || (rFormatSet.GetItemState( SDRATTR_TABLE_BORDER_INNER ) == SFX_ITEM_SET); @@ -2544,7 +2544,7 @@ bool SvxTableController::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNo aAttr.ClearItem( SDRATTR_TABLE_BORDER_INNER ); } - const USHORT* pRanges = rFormatSet.GetRanges(); + const sal_uInt16* pRanges = rFormatSet.GetRanges(); bool bTextOnly = true; while( *pRanges ) diff --git a/svx/source/table/tablecontroller.hxx b/svx/source/table/tablecontroller.hxx index 8ced09bc587f..40f22ef8ea09 100644 --- a/svx/source/table/tablecontroller.hxx +++ b/svx/source/table/tablecontroller.hxx @@ -161,7 +161,7 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > mxModifyListener; - ULONG mnUpdateEvent; + sal_uLong mnUpdateEvent; }; } } diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index 7f855752dcf2..643251100cbd 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -927,8 +927,8 @@ bool TableLayouter::HasPriority( const SvxBorderLine* pThis, const SvxBorderLine if (!pOther || (pOther == &gEmptyBorder)) return true; - USHORT nThisSize = pThis->GetOutWidth() + pThis->GetDistance() + pThis->GetInWidth(); - USHORT nOtherSize = pOther->GetOutWidth() + pOther->GetDistance() + pOther->GetInWidth(); + sal_uInt16 nThisSize = pThis->GetOutWidth() + pThis->GetDistance() + pThis->GetInWidth(); + sal_uInt16 nOtherSize = pOther->GetOutWidth() + pOther->GetDistance() + pOther->GetInWidth(); if (nThisSize > nOtherSize) return true; diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx index d155e084fff8..6fdb0f6c8be7 100644 --- a/svx/source/table/tablertfexporter.cxx +++ b/svx/source/table/tablertfexporter.cxx @@ -64,7 +64,7 @@ class SdrTableRtfExporter { public: SdrTableRtfExporter( SvStream& rStrmP, SdrTableObj& rObj ); - ULONG Write(); + sal_uLong Write(); void WriteRow( const Reference< XPropertySet >& xRowSet, sal_Int32 nRow, const std::vector< sal_Int32 >& aColumnStart ); void WriteCell( sal_Int32 nCol, sal_Int32 nRow ); @@ -95,7 +95,7 @@ long HundMMToTwips( long nIn ) return nRet; } -ULONG SdrTableRtfExporter::Write() +sal_uLong SdrTableRtfExporter::Write() { mrStrm << '{' << OOO_STRING_SVTOOLS_RTF_RTF; mrStrm << OOO_STRING_SVTOOLS_RTF_ANSI << RTFOutFuncs::sNewLine; @@ -185,7 +185,7 @@ void SdrTableRtfExporter::WriteRow( const Reference< XPropertySet >& xRowSet, sa } mrStrm << OOO_STRING_SVTOOLS_RTF_PARD << OOO_STRING_SVTOOLS_RTF_PLAIN << OOO_STRING_SVTOOLS_RTF_INTBL << RTFOutFuncs::sNewLine; - ULONG nStrmPos = mrStrm.Tell(); + sal_uLong nStrmPos = mrStrm.Tell(); for( sal_Int32 nCol = 0; nCol < nColCount; nCol++ ) { WriteCell( nCol, nRow ); @@ -232,7 +232,7 @@ void SdrTableRtfExporter::WriteCell( sal_Int32 nCol, sal_Int32 nRow ) } bool bResetPar, bResetAttr; - bResetPar = bResetAttr = FALSE; + bResetPar = bResetAttr = sal_False; SdrTextHorzAdjust eHAdj = xCell->GetTextHorizontalAdjust(); diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx index 359089444210..530732796c05 100644 --- a/svx/source/table/tablertfimporter.cxx +++ b/svx/source/table/tablertfimporter.cxx @@ -62,7 +62,7 @@ struct RTFCellDefault { SfxItemSet maItemSet; sal_Int32 mnCol; - USHORT mnTwips; // right border of the cell + sal_uInt16 mnTwips; // right border of the cell sal_Int32 mnColSpan; // MergeCell if >1, merged cells if 0 RTFCellDefault( SfxItemPool* pPool ) : maItemSet( *pPool ), mnCol(0), mnTwips(0 ), mnColSpan(1) {} @@ -119,7 +119,7 @@ private: sal_Int32 mnLastWidth; bool mbNewDef; - USHORT mnStartPara; + sal_uInt16 mnStartPara; sal_Int32 mnColCnt; sal_Int32 mnRowCnt; @@ -151,7 +151,7 @@ SdrTableRTFParser::SdrTableRTFParser( SdrTableObj& rTableObj ) , mpDefMerge( 0 ) , mxTable( rTableObj.getTable() ) { - mpOutliner->SetUpdateMode(TRUE); + mpOutliner->SetUpdateMode(sal_True); mpOutliner->SetStyleSheet( 0, mrTableObj.GetStyleSheet() ); mpInsDefault = new RTFCellDefault( &mrItemPool ); } @@ -282,16 +282,16 @@ void SdrTableRTFParser::FillTable() if( xCell.is() && xCellInfo.get() ) { const SfxPoolItem *pPoolItem = 0; - if( xCellInfo->maItemSet.GetItemState(SDRATTR_TABLE_BORDER,FALSE,&pPoolItem)==SFX_ITEM_SET) + if( xCellInfo->maItemSet.GetItemState(SDRATTR_TABLE_BORDER,sal_False,&pPoolItem)==SFX_ITEM_SET) xCell->SetMergedItem( *pPoolItem ); String sDebug = mpOutliner->GetText( mpOutliner->GetParagraph( xCellInfo->mnStartPara ), xCellInfo->mnParaCount ); - OutlinerParaObject* pTextObject = mpOutliner->CreateParaObject( (USHORT)xCellInfo->mnStartPara, (USHORT)xCellInfo->mnParaCount ); + OutlinerParaObject* pTextObject = mpOutliner->CreateParaObject( (sal_uInt16)xCellInfo->mnStartPara, (sal_uInt16)xCellInfo->mnParaCount ); if( pTextObject ) { SdrOutliner& rOutliner=mrTableObj.ImpGetDrawOutliner(); - rOutliner.SetUpdateMode(TRUE); + rOutliner.SetUpdateMode(sal_True); rOutliner.SetText( *pTextObject ); mrTableObj.NbcSetOutlinerParaObjectForText( rOutliner.CreateParaObject(), xCell.get() ); delete pTextObject; @@ -316,7 +316,7 @@ void SdrTableRTFParser::NewCellRow() { if( mbNewDef ) { - mbNewDef = FALSE; + mbNewDef = sal_False; maRows.push_back( RTFColumnVectorPtr( new RTFColumnVector() ) ); } @@ -373,7 +373,7 @@ void SdrTableRTFParser::ProcToken( ImportInfo* pInfo ) break; case RTF_CELLX: // closes cell default { - mbNewDef = TRUE; + mbNewDef = sal_True; mpInsDefault->mnCol = mnColCnt; maDefaultList.push_back( boost::shared_ptr< RTFCellDefault >( mpInsDefault ) ); @@ -427,10 +427,10 @@ void SdrTableRTFParser::ProcToken( ImportInfo* pInfo ) switch ( pInfo->nToken & ~(0xff | RTF_TABLEDEF) ) { case RTF_SHADINGDEF: -// ((SvxRTFParser*)pInfo->pParser)->ReadBackgroundAttr(pInfo->nToken, mpInsDefault->maItemSet, TRUE ); +// ((SvxRTFParser*)pInfo->pParser)->ReadBackgroundAttr(pInfo->nToken, mpInsDefault->maItemSet, sal_True ); break; case RTF_BRDRDEF: - ((SvxRTFParser*)pInfo->pParser)->ReadBorderAttr(pInfo->nToken, mpInsDefault->maItemSet, TRUE ); + ((SvxRTFParser*)pInfo->pParser)->ReadBorderAttr(pInfo->nToken, mpInsDefault->maItemSet, sal_True ); break; } } diff --git a/svx/source/table/tableundo.cxx b/svx/source/table/tableundo.cxx index d57be9f0994d..9b3f5e293070 100644 --- a/svx/source/table/tableundo.cxx +++ b/svx/source/table/tableundo.cxx @@ -107,16 +107,16 @@ void CellUndo::Redo() } } -BOOL CellUndo::Merge( SfxUndoAction *pNextAction ) +sal_Bool CellUndo::Merge( SfxUndoAction *pNextAction ) { CellUndo* pNext = dynamic_cast< CellUndo* >( pNextAction ); if( pNext && pNext->mxCell.get() == mxCell.get() ) { - return TRUE; + return sal_True; } else { - return FALSE; + return sal_False; } } @@ -413,7 +413,7 @@ void TableColumnUndo::Redo() // ----------------------------------------------------------------------------- -BOOL TableColumnUndo::Merge( SfxUndoAction *pNextAction ) +sal_Bool TableColumnUndo::Merge( SfxUndoAction *pNextAction ) { TableColumnUndo* pNext = dynamic_cast< TableColumnUndo* >( pNextAction ); return pNext && pNext->mxCol == mxCol; @@ -482,7 +482,7 @@ void TableRowUndo::Redo() // ----------------------------------------------------------------------------- -BOOL TableRowUndo::Merge( SfxUndoAction *pNextAction ) +sal_Bool TableRowUndo::Merge( SfxUndoAction *pNextAction ) { TableRowUndo* pNext = dynamic_cast< TableRowUndo* >( pNextAction ); return pNext && pNext->mxRow == mxRow; diff --git a/svx/source/table/tableundo.hxx b/svx/source/table/tableundo.hxx index 8bf00c4b0d98..2e5fee9382d6 100644 --- a/svx/source/table/tableundo.hxx +++ b/svx/source/table/tableundo.hxx @@ -55,7 +55,7 @@ public: virtual void Undo(); virtual void Redo(); - virtual BOOL Merge( SfxUndoAction *pNextAction ); + virtual sal_Bool Merge( SfxUndoAction *pNextAction ); void dispose(); virtual void ObjectInDestruction(const SdrObject& rObject); @@ -172,7 +172,7 @@ public: virtual void Undo(); virtual void Redo(); - virtual BOOL Merge( SfxUndoAction *pNextAction ); + virtual sal_Bool Merge( SfxUndoAction *pNextAction ); private: struct Data @@ -204,7 +204,7 @@ public: virtual void Undo(); virtual void Redo(); - virtual BOOL Merge( SfxUndoAction *pNextAction ); + virtual sal_Bool Merge( SfxUndoAction *pNextAction ); private: struct Data |