diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2009-11-24 12:30:17 +0100 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2009-11-24 12:30:17 +0100 |
commit | 3ee0f60e251fc31f13cac15047ca3d3b9d2f56b6 (patch) | |
tree | 53eafed7b898b5d1fc9657699d7a741850fce361 /sw/inc | |
parent | 8eeb6688770ab12a2243926098526417764fa38b (diff) | |
parent | ac926713efc96ddd53f84099d46bca7d94ee5823 (diff) |
CWS-TOOLING: integrate CWS sw33bf01
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/docstat.hxx | 11 | ||||
-rw-r--r-- | sw/inc/docufld.hxx | 2 | ||||
-rw-r--r-- | sw/inc/swrect.hxx | 129 | ||||
-rw-r--r-- | sw/inc/txatbase.hxx | 8 | ||||
-rw-r--r-- | sw/inc/txtatr.hxx | 9 | ||||
-rw-r--r-- | sw/inc/undobj.hxx | 5 |
6 files changed, 69 insertions, 95 deletions
diff --git a/sw/inc/docstat.hxx b/sw/inc/docstat.hxx index ce641a9f23..bc7f8111fd 100644 --- a/sw/inc/docstat.hxx +++ b/sw/inc/docstat.hxx @@ -33,12 +33,6 @@ #include <tools/solar.h> #include "swdllapi.h" -/////////////////////////////////////////////////////////////////////////// -// PRODUCT: struct SwInternStat ist nur fuer CORE Interne Statistics und -// hat nichts in einer ProductVersion zu suchen. -/////////////////////////////////////////////////////////////////////////// - -struct SwInternStat; struct SW_DLLPUBLIC SwDocStat { @@ -46,11 +40,14 @@ struct SW_DLLPUBLIC SwDocStat USHORT nGrf; USHORT nOLE; ULONG nPage; + /// paragraphs for document statistic: non-empty and non-hidden ones ULONG nPara; + /// all paragraphs, including empty/hidden ones + ULONG nAllPara; ULONG nWord; ULONG nChar; BOOL bModified; - SwInternStat* pInternStat; + SwDocStat(); void Reset(); }; diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx index 68219053da..181162ca24 100644 --- a/sw/inc/docufld.hxx +++ b/sw/inc/docufld.hxx @@ -548,6 +548,8 @@ public: const OutlinerParaObject* GetTextObject() const; void SetTextObject( OutlinerParaObject* pText ); + sal_uInt32 GetNumberOfParagraphs() const; + virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const; virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich ); virtual String GetDescription() const; diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx index 136eff0922..dd191916f8 100644 --- a/sw/inc/swrect.hxx +++ b/sw/inc/swrect.hxx @@ -35,10 +35,8 @@ class SvStream; class SwRect { - long nX; - long nY; - long nWidth; - long nHeight; + Point m_Point; + Size m_Size; public: @@ -177,137 +175,133 @@ typedef void (SwRect:: *SwRectSetPos)( const Point& ); //---------------------------------- Set-Methoden inline void SwRect::Chg( const Point& rNP, const Size &rNS ) { - nX = rNP.X(); nY = rNP.Y(); - nWidth = rNS.Width(); nHeight = rNS.Height(); + m_Point = rNP; + m_Size = rNS; } inline void SwRect::Pos( const Point& rNew ) { - nX = rNew.X(); nY = rNew.Y(); + m_Point = rNew; } inline void SwRect::Pos( const long nNewX, const long nNewY ) { - nX = nNewX; nY = nNewY; + m_Point.setX(nNewX); + m_Point.setY(nNewY); } inline void SwRect::SSize( const Size& rNew ) { - nWidth = rNew.Width(); nHeight = rNew.Height(); + m_Size = rNew; } inline void SwRect::SSize( const long nNewHeight, const long nNewWidth ) { - nWidth = nNewWidth; nHeight = nNewHeight; + m_Size.setWidth(nNewWidth); + m_Size.setHeight(nNewHeight); } inline void SwRect::Width( long nNew ) { - nWidth = nNew; + m_Size.setWidth(nNew); } inline void SwRect::Height( long nNew ) { - nHeight = nNew; + m_Size.setHeight(nNew); } inline void SwRect::Left( const long nLeft ) { - nWidth += nX - nLeft; - nX = nLeft; + m_Size.Width() += m_Point.getX() - nLeft; + m_Point.setX(nLeft); } inline void SwRect::Right( const long nRight ) { - nWidth = nRight - nX + 1; + m_Size.setWidth(nRight - m_Point.getX() + 1); } inline void SwRect::Top( const long nTop ) { - nHeight += nY - nTop; - nY = nTop; + m_Size.Height() += m_Point.getY() - nTop; + m_Point.setY(nTop); } inline void SwRect::Bottom( const long nBottom ) { - nHeight = nBottom - nY + 1; + m_Size.setHeight(nBottom - m_Point.getY() + 1); } //----------------------------------- Get-Methoden inline const Point &SwRect::Pos() const { - return *(Point*)(&nX); + return m_Point; } inline Point &SwRect::Pos() { - return *(Point*)(&nX); + return m_Point; } inline const Size &SwRect::SSize() const { - return *(Size*)(&nWidth); + return m_Size; } inline Size &SwRect::SSize() { - return *(Size*)(&nWidth); + return m_Size; } inline long SwRect::Width() const { - return nWidth; + return m_Size.Width(); } inline long SwRect::Height() const { - return nHeight; + return m_Size.Height(); } inline long SwRect::Left() const { - return nX; + return m_Point.X(); } inline long SwRect::Right() const { - return nWidth ? nX + nWidth - 1 : nX; + return m_Size.getWidth() ? m_Point.getX() + m_Size.getWidth() - 1 : m_Point.getX(); } inline long SwRect::Top() const { - return nY; + return m_Point.Y(); } inline long SwRect::Bottom() const { - return nHeight ? nY + nHeight - 1 : nY; + return m_Size.getHeight() ? m_Point.getY() + m_Size.getHeight() - 1 : m_Point.getY(); } //----------------------------------- operatoren inline SwRect &SwRect::operator = ( const SwRect &rRect ) { - nX = rRect.Left(); - nY = rRect.Top(); - nWidth = rRect.Width(); - nHeight = rRect.Height(); + m_Point = rRect.m_Point; + m_Size = rRect.m_Size; return *this; } inline BOOL SwRect::operator == ( const SwRect& rRect ) const { - return (nX == rRect.Left() && - nY == rRect.Top() && - nWidth == rRect.Width() && - nHeight == rRect.Height()); + return (m_Point == rRect.m_Point && m_Size == rRect.m_Size); } inline BOOL SwRect::operator != ( const SwRect& rRect ) const { - return (nX != rRect.Left() || - nY != rRect.Top() || - nWidth != rRect.Width() || - nHeight != rRect.Height()); + return (m_Point != rRect.m_Point || m_Size != rRect.m_Size); } inline SwRect &SwRect::operator+=( const Point &rPt ) { - nX += rPt.X(); nY += rPt.Y(); + m_Point += rPt; return *this; } inline SwRect &SwRect::operator-=( const Point &rPt ) { - nX -= rPt.X(); nY -= rPt.Y(); + m_Point -= rPt; return *this; } inline SwRect &SwRect::operator+=( const Size &rSz ) { - nWidth += rSz.Width(); nHeight += rSz.Height(); + m_Size.Width() += rSz.Width(); + m_Size.Height() += rSz.Height(); return *this; } inline SwRect &SwRect::operator-=( const Size &rSz ) { - nWidth -= rSz.Width(); nHeight -= rSz.Height(); + m_Size.Width() -= rSz.Width(); + m_Size.Height() -= rSz.Height(); return *this; } @@ -315,10 +309,10 @@ inline SwRect &SwRect::operator-=( const Size &rSz ) //--------------------------- Sonstiges inline Rectangle SwRect::SVRect() const { - ASSERT( nWidth && nHeight, "SVRect() ohne Widht oder Height" ); - return Rectangle( nX, nY, - nX + nWidth - 1, //Right() - nY + nHeight - 1 ); //Bottom() + ASSERT( !IsEmpty(), "SVRect() without Width or Height" ); + return Rectangle( m_Point.getX(), m_Point.getY(), + m_Point.getX() + m_Size.getWidth() - 1, //Right() + m_Point.getY() + m_Size.getHeight() - 1 ); //Bottom() } inline SwRect SwRect::GetIntersection( const SwRect& rRect ) const @@ -328,51 +322,44 @@ inline SwRect SwRect::GetIntersection( const SwRect& rRect ) const inline BOOL SwRect::HasArea() const { - return nHeight && nWidth; + return !IsEmpty(); } inline BOOL SwRect::IsEmpty() const { - return !(nHeight && nWidth); + return !(m_Size.getHeight() && m_Size.getWidth()); } inline void SwRect::Clear() { - nX = nY = nWidth = nHeight = 0; + m_Point.setX(0); + m_Point.setY(0); + m_Size.setWidth(0); + m_Size.setHeight(0); } //-------------------------- CToren inline SwRect::SwRect() : - nX( 0 ), - nY( 0 ), - nWidth ( 0 ), - nHeight( 0 ) + m_Point( 0, 0 ), + m_Size( 0, 0 ) { } inline SwRect::SwRect( const SwRect &rRect ) : - nX( rRect.Left() ), - nY( rRect.Top() ), - nWidth ( rRect.Width() ), - nHeight( rRect.Height() ) + m_Point( rRect.m_Point ), + m_Size( rRect.m_Size ) { } inline SwRect::SwRect( const Point& rLT, const Size& rSize ) : - nX( rLT.X() ), - nY( rLT.Y() ), - nWidth ( rSize.Width() ), - nHeight( rSize.Height()) + m_Point( rLT ), + m_Size( rSize ) { } inline SwRect::SwRect( const Point& rLT, const Point& rRB ) : - nX( rLT.X() ), - nY( rLT.Y() ), - nWidth ( rRB.X() - rLT.X() + 1 ), - nHeight( rRB.Y() - rLT.Y() + 1 ) + m_Point( rLT ), + m_Size( rRB.X() - rLT.X() + 1, rRB.Y() - rLT.Y() + 1 ) { } inline SwRect::SwRect( long X, long Y, long W, long H ) : - nX( X ), - nY( Y ), - nWidth ( W ), - nHeight( H ) + m_Point( X, Y ), + m_Size( W, H ) { } diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx index da08842e02..706e481763 100644 --- a/sw/inc/txatbase.hxx +++ b/sw/inc/txatbase.hxx @@ -121,7 +121,6 @@ public: inline const SwTOXMark &GetTOXMark() const; inline const SwFmtRefMark &GetRefMark() const; inline const SwFmtINetFmt &GetINetFmt() const; - inline const SvXMLAttrContainerItem &GetXMLAttrContainer() const; inline const SwFmtRuby &GetRuby() const; inline const SwFmtMeta &GetMeta() const; @@ -230,13 +229,6 @@ inline const SwFmtINetFmt& SwTxtAttr::GetINetFmt() const return (const SwFmtINetFmt&)(*m_pAttr); } -inline const SvXMLAttrContainerItem& SwTxtAttr::GetXMLAttrContainer() const -{ - ASSERT( m_pAttr && m_pAttr->Which() == RES_UNKNOWNATR_CONTAINER, - "Wrong attribute" ); - return (const SvXMLAttrContainerItem&)(*m_pAttr); -} - inline const SwFmtRuby& SwTxtAttr::GetRuby() const { ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_CJK_RUBY, diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx index 5a36625d52..3af8e54bf6 100644 --- a/sw/inc/txtatr.hxx +++ b/sw/inc/txtatr.hxx @@ -60,15 +60,6 @@ public: }; -// ATT_XMLCONTAINERITEM ****************************** - -class SwTxtXMLAttrContainer : public SwTxtAttrEnd -{ -public: - SwTxtXMLAttrContainer( SvXMLAttrContainerItem& rAttr, - xub_StrLen nStart, xub_StrLen nEnd ); -}; - // ****************************** class SwTxtAttrNesting : public SwTxtAttrEnd diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index f45806e558..9a86b86475 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -206,6 +206,11 @@ namespace nsDelCntntType const DelCntntType DELCNT_CHKNOCNTNT = 0x80; } +/// will DelCntntIndex destroy a frame anchored at character at rAnchorPos? +bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos, + SwPosition const & rStart, SwPosition const & rEnd, + DelCntntType const nDelCntntType = nsDelCntntType::DELCNT_ALL); + // diese Klasse muss in ein Undo-Object vererbt werden, wenn dieses Inhalt // fuers Redo/Undo ... speichert class SwUndoSaveCntnt |