summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/charatr.hxx12
-rw-r--r--sw/inc/format.hxx9
-rw-r--r--sw/inc/hintids.hxx10
-rw-r--r--sw/inc/swatrset.hxx11
-rw-r--r--sw/inc/txatbase.hxx25
-rw-r--r--sw/inc/txtatr.hxx36
-rw-r--r--sw/source/core/bastyp/init.cxx26
-rw-r--r--sw/source/core/inc/swfont.hxx5
-rw-r--r--sw/source/core/txtnode/thints.cxx16
-rw-r--r--sw/source/core/txtnode/txtatr2.cxx67
10 files changed, 183 insertions, 34 deletions
diff --git a/sw/inc/charatr.hxx b/sw/inc/charatr.hxx
index a98a499e115b..536216f3fcf1 100644
--- a/sw/inc/charatr.hxx
+++ b/sw/inc/charatr.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: charatr.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: jp $ $Date: 2000-11-16 21:29:02 $
+ * last change: $Author: jp $ $Date: 2001-02-15 20:10:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -138,6 +138,10 @@ inline const SvxEmphasisMarkItem &SwAttrSet::GetEmphasisMark( BOOL bInP ) const
{ return (const SvxEmphasisMarkItem&)Get( RES_CHRATR_EMPHASIS_MARK, bInP ); }
inline const SvxTwoLinesItem &SwAttrSet::Get2Lines( BOOL bInP ) const
{ return (const SvxTwoLinesItem&)Get( RES_CHRATR_TWO_LINES, bInP ); }
+inline const SvxCharScaleWidthItem &SwAttrSet::GetCharScaleW( BOOL bInP ) const
+ { return (const SvxCharScaleWidthItem&)Get( RES_CHRATR_SCALEW, bInP ); }
+inline const SvxCharRotateItem &SwAttrSet::GetCharRotate( BOOL bInP ) const
+ { return (const SvxCharRotateItem&)Get( RES_CHRATR_ROTATE, bInP ); }
/******************************************************************************
* Implementierung der Charakter-Attribut Methoden vom SwFmt
@@ -188,5 +192,9 @@ inline const SvxEmphasisMarkItem &SwFmt::GetEmphasisMark( BOOL bInP ) const
{ return aSet.GetEmphasisMark(bInP); }
inline const SvxTwoLinesItem &SwFmt::Get2Lines( BOOL bInP ) const
{ return aSet.Get2Lines(bInP); }
+inline const SvxCharScaleWidthItem &SwFmt::GetCharScaleW( BOOL bInP ) const
+ { return aSet.GetCharScaleW(bInP); }
+inline const SvxCharRotateItem &SwFmt::GetCharRotate( BOOL bInP ) const
+ { return aSet.GetCharRotate(bInP); }
#endif
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index 8cc5f59a4895..637212ad6d1b 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: format.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: os $ $Date: 2000-11-29 17:18:48 $
+ * last change: $Author: jp $ $Date: 2001-02-15 20:10:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -241,9 +241,10 @@ public:
inline const SvxPostureItem &GetCTLPosture( BOOL = TRUE ) const;
inline const SvxWeightItem &GetCTLWeight( BOOL = TRUE ) const;
inline const SfxBoolItem &GetWritingDirection( BOOL = TRUE ) const;
-
inline const SvxEmphasisMarkItem &GetEmphasisMark( BOOL = TRUE ) const;
- inline const SvxTwoLinesItem &Get2Lines( BOOL = TRUE ) const;
+ inline const SvxTwoLinesItem &Get2Lines( BOOL = TRUE ) const;
+ inline const SvxCharScaleWidthItem &GetCharScaleW( BOOL = TRUE ) const;
+ inline const SvxCharRotateItem &GetCharRotate( BOOL = TRUE ) const;
// Frame-Attribute - impl. steht im frmatr.hxx,
// fuer LINUX, SINIX, HPUX auch in gcc_outl.cxx
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index c9062efd5301..915f9c9e77ae 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: hintids.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: os $ $Date: 2000-11-29 17:18:49 $
+ * last change: $Author: jp $ $Date: 2001-02-15 20:10:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -119,10 +119,10 @@ RES_CHRATR_BEGIN = HINT_BEGIN,
RES_CHRATR_CTL_LANGUAGE, // 29
RES_CHRATR_CTL_POSTURE, // 30
RES_CHRATR_CTL_WEIGHT, // 31
- RES_CHRATR_WRITING_DIRECTION, // 32
+ RES_CHRATR_ROTATE, // 32
RES_CHRATR_EMPHASIS_MARK, // 33
RES_CHRATR_TWO_LINES, // 34
- RES_CHRATR_DUMMY4, // 35
+ RES_CHRATR_SCALEW, // 35
RES_CHRATR_DUMMY5, // 36
RES_CHRATR_DUMMY1, // 37
RES_CHRATR_END
@@ -454,6 +454,8 @@ BOOL IsInRange( const USHORT* pRange, const USHORT nId );
#define ITEMID_WORDLINEMODE RES_CHRATR_WORDLINEMODE
#define ITEMID_EMPHASISMARK RES_CHRATR_EMPHASIS_MARK
#define ITEMID_TWOLINES RES_CHRATR_TWO_LINES
+#define ITEMID_CHARSCALE_W RES_CHRATR_SCALEW
+#define ITEMID_CHARROTATE RES_CHRATR_ROTATE
//Defines fuer die ehemaligen FrmAttribute, die jetzt in frmitems.hxx
//von svx zu finden sind.
diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx
index c0505b60185d..5b093a4ad28c 100644
--- a/sw/inc/swatrset.hxx
+++ b/sw/inc/swatrset.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: swatrset.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: os $ $Date: 2000-11-29 17:18:49 $
+ * last change: $Author: jp $ $Date: 2001-02-15 20:10:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -99,6 +99,8 @@ class SvxNoHyphenItem;
class SvxBlinkItem;
class SvxEmphasisMarkItem;
class SvxTwoLinesItem;
+class SvxCharScaleWidthItem;
+class SvxCharRotateItem;
// Frame-Attribute
class SwFmtFillOrder;
@@ -277,6 +279,8 @@ public:
inline const SfxBoolItem &GetWritingDirection( BOOL = TRUE ) const;
inline const SvxEmphasisMarkItem &GetEmphasisMark( BOOL = TRUE ) const;
inline const SvxTwoLinesItem &Get2Lines( BOOL = TRUE ) const;
+ inline const SvxCharScaleWidthItem &GetCharScaleW( BOOL = TRUE ) const;
+ inline const SvxCharRotateItem &GetCharRotate( BOOL = TRUE ) const;
// Frame-Attribute - impl. steht im frmatr.hxx
inline const SwFmtFillOrder &GetFillOrder( BOOL = TRUE ) const;
@@ -352,6 +356,9 @@ public:
/*************************************************************************
$Log: not supported by cvs2svn $
+ Revision 1.6 2000/11/29 17:18:49 os
+ #80913# forbidden rules
+
Revision 1.5 2000/11/20 09:36:59 jp
new para attributes - expand para range
diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx
index 73ccd6c9ee5c..21e96cd450d9 100644
--- a/sw/inc/txatbase.hxx
+++ b/sw/inc/txatbase.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txatbase.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: jp $ $Date: 2000-11-16 21:29:02 $
+ * last change: $Author: jp $ $Date: 2001-02-15 20:10:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -94,6 +94,9 @@ class SvXMLAttrContainerItem;
class SwFmtRuby;
class SvxTwoLinesItem;
class SvxEmphasisMarkItem;
+class SvxCharScaleWidthItem;
+class SvxCharRotateItem;
+
class SwFmtCharFmt;
class SwFmtINetFmt;
class SvxKerningItem;
@@ -197,6 +200,8 @@ public:
inline const SwFmtRuby &GetRuby() const;
inline const SvxTwoLinesItem &Get2Lines() const;
inline const SvxEmphasisMarkItem &GetEmphasisMark() const;
+ inline const SvxCharScaleWidthItem &GetCharScaleW() const;
+ inline const SvxCharRotateItem &GetCharRotate() const;
private:
SwTxtAttr( const SwTxtAttr& );
@@ -439,9 +444,25 @@ inline const SvxEmphasisMarkItem& SwTxtAttr::GetEmphasisMark() const
return (const SvxEmphasisMarkItem&)*pAttr;
}
+inline const SvxCharScaleWidthItem& SwTxtAttr::GetCharScaleW() const
+{
+ ASSERT( pAttr && pAttr->Which() == RES_CHRATR_SCALEW, "Falsche Abfrage" );
+ return (const SvxCharScaleWidthItem&)*pAttr;
+}
+
+inline const SvxCharRotateItem& SwTxtAttr::GetCharRotate() const
+{
+ ASSERT( pAttr && pAttr->Which() == RES_CHRATR_ROTATE, "Falsche Abfrage" );
+ return (const SvxCharRotateItem&)*pAttr;
+}
+
+
/*************************************************************************
$Log: not supported by cvs2svn $
+ Revision 1.6 2000/11/16 21:29:02 jp
+ SwFmt2Lines moved to SVX and renamed
+
Revision 1.5 2000/11/06 10:46:50 jp
new flags for the SwTxtAttr
diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx
index 030d1707e2f3..a9f322031bc9 100644
--- a/sw/inc/txtatr.hxx
+++ b/sw/inc/txtatr.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtatr.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: jp $ $Date: 2000-11-20 09:36:59 $
+ * last change: $Author: jp $ $Date: 2001-02-15 20:10:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -479,6 +479,38 @@ public:
virtual void RstTxtAttr( SwTxtAttr & );
};
+// CHARROTATE ************************************************************
+
+class SwTxtCharRotate : public SwTxtAttrEnd
+{
+ // Hier merkt es sich das SV-Attribut den Wert aus dem Font.
+ USHORT nPrevRotate;
+public:
+ SwTxtCharRotate( const SvxCharRotateItem& rAttr,
+ xub_StrLen nStart, xub_StrLen nEnd );
+
+ virtual void ChgFnt(SwFont *);
+ virtual void RstFnt(SwFont *);
+ virtual void ChgTxtAttr( SwTxtAttr & );
+ virtual void RstTxtAttr( SwTxtAttr & );
+};
+
+// CHARSCALEWIDTH **********************************************************
+
+class SwTxtCharScaleWidth : public SwTxtAttrEnd
+{
+ // Hier merkt es sich das SV-Attribut den Wert aus dem Font.
+ USHORT nPrevScale;
+public:
+ SwTxtCharScaleWidth( const SvxCharScaleWidthItem& rAttr,
+ xub_StrLen nStart, xub_StrLen nEnd );
+
+ virtual void ChgFnt(SwFont *);
+ virtual void RstFnt(SwFont *);
+ virtual void ChgTxtAttr( SwTxtAttr & );
+ virtual void RstTxtAttr( SwTxtAttr & );
+};
+
// --------------- Inline Implementierungen ------------------------
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index d66e481f70bf..549512026d8d 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: init.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: jp $ $Date: 2001-01-25 20:04:02 $
+ * last change: $Author: jp $ $Date: 2001-02-15 20:09:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -175,9 +175,15 @@
#ifndef _SVX_HNGPNCTITEM_HXX
#include <svx/hngpnctitem.hxx>
#endif
-#ifndef _SVX_CMAPITEM_HXX //autogen
+#ifndef _SVX_CMAPITEM_HXX
#include <svx/cmapitem.hxx>
#endif
+#ifndef _SVX_CHARSCALEITEM_HXX
+#include <svx/charscaleitem.hxx>
+#endif
+#ifndef _SVX_CHARROTATEITEM_HXX
+#include <svx/charrotateitem.hxx>
+#endif
#ifndef _SVX_DIALOGS_HRC
#include <svx/dialogs.hrc>
#endif
@@ -469,10 +475,10 @@ SfxItemInfo __FAR_DATA aSlotTab[] =
{ SID_ATTR_CHAR_CTL_LANGUAGE, SFX_ITEM_POOLABLE }, // RES_CHRATR_CTL_LANGUAGE
{ SID_ATTR_CHAR_CTL_POSTURE, SFX_ITEM_POOLABLE }, // RES_CHRATR_CTL_POSTURE
{ SID_ATTR_CHAR_CTL_WEIGHT, SFX_ITEM_POOLABLE }, // RES_CHRATR_CTL_WEIGHT
- { 0, SFX_ITEM_POOLABLE }, // RES_CHRATR_WRITING_DIRECTION
+ { SID_ATTR_CHAR_ROTATED, SFX_ITEM_POOLABLE }, // RES_CHRATR_ROTATE
{ SID_ATTR_CHAR_EMPHASISMARK, SFX_ITEM_POOLABLE }, // RES_CHRATR_EMPHASIS_MARK
{ SID_ATTR_CHAR_TWO_LINES, SFX_ITEM_POOLABLE }, // RES_CHRATR_TWO_LINES
- { 0, SFX_ITEM_POOLABLE }, // RES_CHRATR_DUMMY4
+ { SID_ATTR_CHAR_SCALEWIDTH, SFX_ITEM_POOLABLE }, // RES_CHRATR_SCALEW
{ 0, SFX_ITEM_POOLABLE }, // RES_CHRATR_DUMMY5
{ 0, SFX_ITEM_POOLABLE }, // RES_CHRATR_DUMMY1
@@ -696,18 +702,14 @@ void _InitCore()
pItem->SetWhich( RES_CHRATR_CTL_WEIGHT );
aAttrTab[ RES_CHRATR_CTL_WEIGHT - POOLATTR_BEGIN ] = pItem;
- aAttrTab[ RES_CHRATR_CTL_WEIGHT - POOLATTR_BEGIN ] = pItem;
-
- aAttrTab[ RES_CHRATR_WRITING_DIRECTION - POOLATTR_BEGIN ] =
- new SfxBoolItem( RES_CHRATR_WRITING_DIRECTION );
-
+ aAttrTab[ RES_CHRATR_ROTATE - POOLATTR_BEGIN ] = new SvxCharRotateItem;
aAttrTab[ RES_CHRATR_EMPHASIS_MARK - POOLATTR_BEGIN ] =
- new SvxEmphasisMarkItem();
+ new SvxEmphasisMarkItem;
aAttrTab[ RES_CHRATR_TWO_LINES - POOLATTR_BEGIN ] = new SvxTwoLinesItem( FALSE );
+ aAttrTab[ RES_CHRATR_SCALEW - POOLATTR_BEGIN ] = new SvxCharScaleWidthItem;
// CharakterAttr - Dummies
aAttrTab[ RES_CHRATR_DUMMY1 - POOLATTR_BEGIN ] = new SfxBoolItem( RES_CHRATR_DUMMY1 );
- aAttrTab[ RES_CHRATR_DUMMY4 - POOLATTR_BEGIN ] = new SfxBoolItem( RES_CHRATR_DUMMY4 );
aAttrTab[ RES_CHRATR_DUMMY5 - POOLATTR_BEGIN ] = new SfxBoolItem( RES_CHRATR_DUMMY5 );
// CharakterAttr - Dummies
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index 6c366560e7f3..3aada32de769 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: swfont.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: ama $ $Date: 2001-02-13 08:48:34 $
+ * last change: $Author: jp $ $Date: 2001-02-15 20:10:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -357,6 +357,7 @@ public:
FontEmphasisMark GetEmphasisMark() const
{ return aSub[nActual].GetEmphasisMark(); }
USHORT GetPropWidth() { return aSub[nActual].GetPropWidth(); }
+ USHORT GetOrientation() { return aSub[nActual].GetOrientation(); }
inline const XubString& GetName( const BYTE nWhich ) const
{ return aSub[nWhich].GetName(); }
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index f18af2ccc966..c6248d4f387e 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: thints.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: ama $ $Date: 2001-01-30 13:41:55 $
+ * last change: $Author: jp $ $Date: 2001-02-15 20:09:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -93,6 +93,12 @@
#ifndef _SVX_TWOLINESITEM_HXX
#include <svx/twolinesitem.hxx>
#endif
+#ifndef _SVX_CHARSCALEITEM_HXX
+#include <svx/charscaleitem.hxx>
+#endif
+#ifndef _SVX_CHARROTATEITEM_HXX
+#include <svx/charrotateitem.hxx>
+#endif
#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
#endif
@@ -336,6 +342,12 @@ SwTxtAttr* SwTxtNode::MakeTxtAttr( const SfxPoolItem& rAttr,
case RES_CHRATR_TWO_LINES:
pNew = new SwTxt2Lines( (SvxTwoLinesItem&)rNew, nStt, nEnd );
break;
+ case RES_CHRATR_ROTATE:
+ pNew = new SwTxtCharRotate( (SvxCharRotateItem&)rNew, nStt, nEnd );
+ break;
+ case RES_CHRATR_SCALEW:
+ pNew = new SwTxtCharScaleWidth( (SvxCharScaleWidthItem&)rNew, nStt, nEnd );
+ break;
case RES_TXTATR_REFMARK:
pNew = nStt == nEnd
? new SwTxtRefMark( (SwFmtRefMark&)rNew, nStt )
diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx
index 94c0b1f2d657..9f10eedb0c1e 100644
--- a/sw/source/core/txtnode/txtatr2.cxx
+++ b/sw/source/core/txtnode/txtatr2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtatr2.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: jp $ $Date: 2000-11-16 21:31:21 $
+ * last change: $Author: jp $ $Date: 2001-02-15 20:09:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,6 +104,12 @@
#ifndef _SVX_TWOLINESITEM_HXX
#include <svx/twolinesitem.hxx>
#endif
+#ifndef _SVX_CHARSCALEITEM_HXX
+#include <svx/charscaleitem.hxx>
+#endif
+#ifndef _SVX_CHARROTATEITEM_HXX
+#include <svx/charrotateitem.hxx>
+#endif
#ifndef _TXTINET_HXX //autogen
#include <txtinet.hxx>
@@ -803,3 +809,60 @@ void SwTxtEmphasisMark::RstTxtAttr( SwTxtAttr &rAttr )
((SwTxtEmphasisMark&)rAttr).ePrevEmphasis = ePrevEmphasis;
}
+// ******************************
+
+SwTxtCharRotate::SwTxtCharRotate( const SvxCharRotateItem& rAttr,
+ xub_StrLen nStart, xub_StrLen nEnd )
+ : SwTxtAttrEnd( rAttr, nStart, nEnd )
+{
+}
+
+void SwTxtCharRotate::ChgFnt( SwFont* pFont )
+{
+ nPrevRotate = pFont->GetOrientation();
+ pFont->SetVertical( GetCharRotate().GetValue() );
+}
+
+void SwTxtCharRotate::RstFnt( SwFont* pFont )
+{
+ pFont->SetVertical( nPrevRotate );
+}
+
+void SwTxtCharRotate::ChgTxtAttr( SwTxtAttr & rAttr )
+{
+ nPrevRotate = ((SwTxtCharRotate&)rAttr).nPrevRotate;
+ ((SwTxtCharRotate&)rAttr).nPrevRotate = GetCharRotate().GetValue();
+}
+
+void SwTxtCharRotate::RstTxtAttr( SwTxtAttr & rAttr )
+{
+ ((SwTxtCharRotate&)rAttr).nPrevRotate = nPrevRotate;
+}
+
+// ******************************
+
+SwTxtCharScaleWidth::SwTxtCharScaleWidth( const SvxCharScaleWidthItem& rAttr,
+ xub_StrLen nStart, xub_StrLen nEnd )
+ : SwTxtAttrEnd( rAttr, nStart, nEnd )
+{
+}
+
+void SwTxtCharScaleWidth::ChgFnt( SwFont* pFont )
+{
+ nPrevScale = pFont->GetPropWidth();
+ pFont->SetPropWidth( GetCharScaleW().GetValue() );
+}
+void SwTxtCharScaleWidth::RstFnt(SwFont * pFont )
+{
+ pFont->SetPropWidth( nPrevScale );
+}
+void SwTxtCharScaleWidth::ChgTxtAttr( SwTxtAttr & rAttr )
+{
+ nPrevScale = ((SwTxtCharScaleWidth&)rAttr).nPrevScale;
+ ((SwTxtCharScaleWidth&)rAttr).nPrevScale = GetCharScaleW().GetValue();
+}
+void SwTxtCharScaleWidth::RstTxtAttr( SwTxtAttr & rAttr )
+{
+ ((SwTxtCharScaleWidth&)rAttr).nPrevScale = nPrevScale;
+}
+