summaryrefslogtreecommitdiff
path: root/sw/source/core/text/pordrop.hxx
diff options
context:
space:
mode:
authorFrank Meies <fme@openoffice.org>2001-10-19 07:41:38 +0000
committerFrank Meies <fme@openoffice.org>2001-10-19 07:41:38 +0000
commit97d56f8c29cfec773cc704bf515e853e945c3781 (patch)
treee9225f4cd2a6fbca650b033baba6cf0b03b79744 /sw/source/core/text/pordrop.hxx
parentbf0713486d33ac05041b9cb04e07a453c403b077 (diff)
Fix #92507#: Script and attribute changes inside drop caps
Diffstat (limited to 'sw/source/core/text/pordrop.hxx')
-rw-r--r--sw/source/core/text/pordrop.hxx53
1 files changed, 43 insertions, 10 deletions
diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx
index 183a327f7d16..20b85d9cb36b 100644
--- a/sw/source/core/text/pordrop.hxx
+++ b/sw/source/core/text/pordrop.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pordrop.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: fme $ $Date: 2001-05-28 16:20:44 $
+ * last change: $Author: fme $ $Date: 2001-10-19 08:38:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -72,30 +72,57 @@ class SwDropCapCache;
extern SwDropCapCache *pDropCapCache;
/*************************************************************************
+ * class SwDropPortionPart
+ *
+ * A drop portion can consist of one or more parts in order to allow
+ * attribute changes inside them.
+ *************************************************************************/
+
+class SwDropPortionPart
+{
+ SwDropPortionPart* pFollow;
+ SwFont* pFnt;
+ xub_StrLen nLen;
+ USHORT nWidth;
+
+public:
+ SwDropPortionPart( SwFont& rFont, const xub_StrLen nL )
+ : pFollow( 0 ), pFnt( &rFont ), nLen( nL ), nWidth( 0 ) {};
+ ~SwDropPortionPart();
+
+ inline SwDropPortionPart* GetFollow() const { return pFollow; };
+ inline void SetFollow( SwDropPortionPart* pNew ) { pFollow = pNew; };
+ inline SwFont& GetFont() const { return *pFnt; }
+ inline xub_StrLen GetLen() const { return nLen; }
+ inline USHORT GetWidth() const { return nWidth; }
+ inline void SetWidth( USHORT nNew ) { nWidth = nNew; }
+};
+
+/*************************************************************************
* class SwDropPortion
*************************************************************************/
class SwDropPortion : public SwTxtPortion
{
friend class SwDropCapCache;
- SwFont *pFnt; // der Font
+ SwDropPortionPart* pPart; // due to script / attribute changes
MSHORT nLines; // Anzahl der Zeilen
KSHORT nDropHeight; // Hoehe
KSHORT nDropDescent; // Abstand zur naechsten Zeile
KSHORT nDistance; // Abstand zum Text
KSHORT nFix; // Fixposition
short nX; // X-PaintOffset
- short nY; // Y-PaintOffset
+ short nY; // Y-Offset
sal_Bool FormatTxt( SwTxtFormatInfo &rInf );
- void PaintTxt( const SwTxtPaintInfo &rInf /*, const sal_Bool bBack */) const;
+ void PaintTxt( const SwTxtPaintInfo &rInf ) const;
inline void Fix( const KSHORT nNew ) { nFix = nNew; }
public:
- SwDropPortion( SwFont *pFnt, const MSHORT nLineCnt,
- const KSHORT nDropHeight,
- const KSHORT nDropDescent,
- const KSHORT nDistance );
+ SwDropPortion( const MSHORT nLineCnt,
+ const KSHORT nDropHeight,
+ const KSHORT nDropDescent,
+ const KSHORT nDistance );
virtual ~SwDropPortion();
virtual void Paint( const SwTxtPaintInfo &rInf ) const;
@@ -109,7 +136,13 @@ public:
inline KSHORT GetDropHeight() const { return nDropHeight; }
inline KSHORT GetDropDescent() const { return nDropDescent; }
inline KSHORT GetDropLeft() const { return Width() + nFix; }
- inline SwFont* GetFnt() { return pFnt; }
+
+ inline SwDropPortionPart* GetPart() const { return pPart; }
+ inline void SetPart( SwDropPortionPart* pNew ) { pPart = pNew; }
+
+ inline void SetY( short nNew ) { nY = nNew; }
+
+ inline SwFont* GetFnt() { return pPart ? &pPart->GetFont() : NULL; }
static void DeleteDropCapCache();