Lines Matching refs:nColIndex
396 bool ScCsvGrid::IsValidColumn( sal_uInt32 nColIndex ) const in IsValidColumn()
398 return nColIndex < GetColumnCount(); in IsValidColumn()
401 bool ScCsvGrid::IsVisibleColumn( sal_uInt32 nColIndex ) const in IsVisibleColumn()
403 return IsValidColumn( nColIndex ) && in IsVisibleColumn()
404 (GetColumnPos( nColIndex ) < GetLastVisPos()) && in IsVisibleColumn()
405 (GetFirstVisPos() < GetColumnPos( nColIndex + 1 )); in IsVisibleColumn()
408 sal_Int32 ScCsvGrid::GetColumnX( sal_uInt32 nColIndex ) const in GetColumnX()
410 return GetX( GetColumnPos( nColIndex ) ); in GetColumnX()
425 sal_Int32 ScCsvGrid::GetColumnWidth( sal_uInt32 nColIndex ) const in GetColumnWidth()
427 …return IsValidColumn( nColIndex ) ? (GetColumnPos( nColIndex + 1 ) - GetColumnPos( nColIndex )) : … in GetColumnWidth()
439 sal_Int32 ScCsvGrid::GetColumnType( sal_uInt32 nColIndex ) const in GetColumnType()
441 return IsValidColumn( nColIndex ) ? maColStates[ nColIndex ].mnType : CSV_TYPE_NOSELECTION; in GetColumnType()
444 void ScCsvGrid::SetColumnType( sal_uInt32 nColIndex, sal_Int32 nColType ) in SetColumnType() argument
446 if( IsValidColumn( nColIndex ) ) in SetColumnType()
448 maColStates[ nColIndex ].mnType = nColType; in SetColumnType()
449 AccSendTableUpdateEvent( nColIndex, nColIndex, false ); in SetColumnType()
496 const String& ScCsvGrid::GetColumnTypeName( sal_uInt32 nColIndex ) const in GetColumnTypeName()
498 sal_uInt32 nTypeIx = static_cast< sal_uInt32 >( GetColumnType( nColIndex ) ); in GetColumnTypeName()
572 bool ScCsvGrid::IsSelected( sal_uInt32 nColIndex ) const in IsSelected()
574 return IsValidColumn( nColIndex ) && maColStates[ nColIndex ].IsSelected(); in IsSelected()
591 void ScCsvGrid::Select( sal_uInt32 nColIndex, bool bSelect ) in Select() argument
593 if( IsValidColumn( nColIndex ) ) in Select()
595 maColStates[ nColIndex ].Select( bSelect ); in Select()
596 ImplDrawColumnSelection( nColIndex ); in Select()
600 mnRecentSelCol = nColIndex; in Select()
605 void ScCsvGrid::ToggleSelect( sal_uInt32 nColIndex ) in ToggleSelect() argument
607 Select( nColIndex, !IsSelected( nColIndex ) ); in ToggleSelect()
642 void ScCsvGrid::MoveCursor( sal_uInt32 nColIndex ) in MoveCursor() argument
645 if( IsValidColumn( nColIndex ) ) in MoveCursor()
647 sal_Int32 nPosBeg = GetColumnPos( nColIndex ); in MoveCursor()
648 sal_Int32 nPosEnd = GetColumnPos( nColIndex + 1 ); in MoveCursor()
656 Execute( CSVCMD_MOVEGRIDCURSOR, GetColumnPos( nColIndex ) ); in MoveCursor()
694 void ScCsvGrid::DoSelectAction( sal_uInt32 nColIndex, sal_uInt16 nModifier ) in DoSelectAction() argument
699 SelectRange( mnRecentSelCol, nColIndex ); in DoSelectAction()
701 Select( nColIndex ); in DoSelectAction()
703 Select( nColIndex, mbMTSelecting ); in DoSelectAction()
705 ToggleSelect( nColIndex ); in DoSelectAction()
706 Execute( CSVCMD_MOVEGRIDCURSOR, GetColumnPos( nColIndex ) ); in DoSelectAction()
796 const String& ScCsvGrid::GetCellText( sal_uInt32 nColIndex, sal_Int32 nLine ) const in GetCellText() argument
804 if( nColIndex >= rStrVec.size() ) return EMPTY_STRING; in GetCellText()
806 return rStrVec[ nColIndex ]; in GetCellText()
1026 void ScCsvGrid::ImplSetColumnClipRegion( OutputDevice& rOutDev, sal_uInt32 nColIndex ) in ImplSetColumnClipRegion() argument
1029 Max( GetColumnX( nColIndex ), GetFirstX() ) + 1, 0, in ImplSetColumnClipRegion()
1030 Min( GetColumnX( nColIndex + 1 ), GetLastX() ), GetHeight() - 1 ) ) ); in ImplSetColumnClipRegion()
1033 void ScCsvGrid::ImplDrawColumnHeader( OutputDevice& rOutDev, sal_uInt32 nColIndex, Color aFillColor… in ImplDrawColumnHeader() argument
1035 sal_Int32 nX1 = GetColumnX( nColIndex ) + 1; in ImplDrawColumnHeader()
1036 sal_Int32 nX2 = GetColumnX( nColIndex + 1 ); in ImplDrawColumnHeader()
1046 rOutDev.DrawText( Point( nX1 + 1, 0 ), GetColumnTypeName( nColIndex ) ); in ImplDrawColumnHeader()
1117 void ScCsvGrid::ImplDrawColumnBackgr( sal_uInt32 nColIndex ) in ImplDrawColumnBackgr() argument
1119 if( !IsVisibleColumn( nColIndex ) ) in ImplDrawColumnBackgr()
1122 ImplSetColumnClipRegion( maBackgrDev, nColIndex ); in ImplDrawColumnBackgr()
1127 sal_Int32 nX1 = GetColumnX( nColIndex ) + 1; in ImplDrawColumnBackgr()
1128 sal_Int32 nX2 = GetColumnX( nColIndex + 1 ); in ImplDrawColumnBackgr()
1142 sal_Int32 nFirstVisPos = ::std::max( GetColumnPos( nColIndex ), GetFirstVisPos() ); in ImplDrawColumnBackgr()
1143 sal_Int32 nLastVisPos = ::std::min( GetColumnPos( nColIndex + 1 ), GetLastVisPos() ); in ImplDrawColumnBackgr()
1144 xub_StrLen nStrPos = static_cast< xub_StrLen >( nFirstVisPos - GetColumnPos( nColIndex ) ); in ImplDrawColumnBackgr()
1150 if( (nColIndex < rStrVec.size()) && (rStrVec[ nColIndex ].Len() > nStrPos) ) in ImplDrawColumnBackgr()
1152 String aText( rStrVec[ nColIndex ], nStrPos, nStrLen ); in ImplDrawColumnBackgr()
1158 ImplDrawColumnHeader( maBackgrDev, nColIndex, maHeaderBackColor ); in ImplDrawColumnBackgr()
1214 void ScCsvGrid::ImplDrawColumnSelection( sal_uInt32 nColIndex ) in ImplDrawColumnSelection() argument
1217 ImplSetColumnClipRegion( maGridDev, nColIndex ); in ImplDrawColumnSelection()
1220 if( IsSelected( nColIndex ) ) in ImplDrawColumnSelection()
1222 sal_Int32 nX1 = GetColumnX( nColIndex ) + 1; in ImplDrawColumnSelection()
1223 sal_Int32 nX2 = GetColumnX( nColIndex + 1 ); in ImplDrawColumnSelection()
1230 ImplDrawColumnHeader( maGridDev, nColIndex, COL_LIGHTGRAY ); in ImplDrawColumnSelection()
1255 void ScCsvGrid::ImplDrawColumn( sal_uInt32 nColIndex ) in ImplDrawColumn() argument
1257 ImplDrawColumnBackgr( nColIndex ); in ImplDrawColumn()
1258 ImplDrawColumnSelection( nColIndex ); in ImplDrawColumn()
1330 void ScCsvGrid::ImplDrawTrackingRect( sal_uInt32 nColIndex ) in ImplDrawTrackingRect() argument
1332 if( HasFocus() && IsVisibleColumn( nColIndex ) ) in ImplDrawTrackingRect()
1334 sal_Int32 nX1 = Max( GetColumnX( nColIndex ), GetFirstX() ) + 1; in ImplDrawTrackingRect()
1335 sal_Int32 nX2 = Min( GetColumnX( nColIndex + 1 ) - sal_Int32( 1 ), GetLastX() ); in ImplDrawTrackingRect()