summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode/txtatr2.cxx
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2001-02-15 19:10:39 +0000
committerjp <jp@openoffice.org>2001-02-15 19:10:39 +0000
commitc34d14937ff13453cc2504a14ba5ca366eaed8b7 (patch)
treeaadcf6811ed2191b384df252ebb9bd33a27ecdc6 /sw/source/core/txtnode/txtatr2.cxx
parent497cda668155aab71ed3ae0594a5996dee25dbea (diff)
new character attribute: rotate and scalewidth
Diffstat (limited to 'sw/source/core/txtnode/txtatr2.cxx')
-rw-r--r--sw/source/core/txtnode/txtatr2.cxx67
1 files changed, 65 insertions, 2 deletions
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;
+}
+