1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef SW_CELLFRM_HXX 24 #define SW_CELLFRM_HXX 25 26 #include <tools/mempool.hxx> 27 28 #include "layfrm.hxx" 29 30 class SwTableBox; 31 struct SwCrsrMoveState; 32 class SwBorderAttrs; 33 34 class SwCellFrm: public SwLayoutFrm 35 { 36 const SwTableBox* pTabBox; 37 38 protected: 39 virtual void Format( const SwBorderAttrs *pAttrs = 0 ); 40 virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ); 41 42 public: 43 SwCellFrm( const SwTableBox &, SwFrm*, bool bInsertContent = true ); 44 ~SwCellFrm(); 45 46 virtual sal_Bool GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0 ) const; 47 virtual void Paint( SwRect const&, 48 SwPrintData const*const pPrintData = NULL ) const; 49 virtual void CheckDirection( sal_Bool bVert ); 50 51 // --> OD 2010-02-17 #i103961# 52 virtual void Cut(); 53 // <-- 54 GetTabBox() const55 const SwTableBox *GetTabBox() const { return pTabBox; } 56 57 // used for breaking table rows: 58 SwCellFrm* GetFollowCell() const; 59 SwCellFrm* GetPreviousCell() const; 60 61 // used for rowspan stuff: 62 const SwCellFrm& FindStartEndOfRowSpanCell( bool bStart, bool bCurrentTab ) const; 63 long GetLayoutRowSpan() const; 64 65 DECL_FIXEDMEMPOOL_NEWDEL(SwCellFrm) 66 }; 67 68 #endif 69