summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2001-03-16 16:16:00 +0000
committerjp <jp@openoffice.org>2001-03-16 16:16:00 +0000
commit746dc20edc1ca055390d75356928e9504a15a442 (patch)
treee35ecfdcf482caac8d265b941bda92d13b5a17e2 /sw
parent3164339f28876ba3d323690d89cc1b94cf121332 (diff)
new: im-/export emboss / engrave attribute
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx45
-rw-r--r--sw/source/filter/ww8/ww8par.hxx10
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx43
3 files changed, 87 insertions, 11 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 79421a973e0b..c12a9470a40c 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ww8atr.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: cmc $ $Date: 2001-02-23 09:57:21 $
+ * last change: $Author: jp $ $Date: 2001-03-16 17:15:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -187,6 +187,9 @@
#ifndef _SVX_CHARROTATEITEM_HXX
#include <svx/charrotateitem.hxx>
#endif
+#ifndef _SVX_CHARRELIEFITEM_HXX
+#include <svx/charreliefitem.hxx>
+#endif
#ifndef _FMTFLD_HXX //autogen
#include <fmtfld.hxx>
@@ -946,6 +949,39 @@ static Writer& OutWW8_ScaleWidth( Writer& rWrt, const SfxPoolItem& rHt )
}
return rWrt;
}
+
+static Writer& OutWW8_Relief( Writer& rWrt, const SfxPoolItem& rHt )
+{
+ SwWW8Writer& rWrtWW8 = (SwWW8Writer&)rWrt;
+ if( rWrtWW8.bWrtWW8 )
+ {
+ const SvxCharReliefItem& rAttr = (const SvxCharReliefItem&)rHt;
+ USHORT nId;
+ switch ( rAttr.GetValue() )
+ {
+ case RELIEF_EMBOSSED: nId = 0x858; break;
+ case RELIEF_ENGRAVED: nId = 0x854; break;
+ default: nId = 0; break;
+ }
+
+ if( nId )
+ {
+ rWrtWW8.InsUInt16( nId );
+ rWrtWW8.pO->Insert( (BYTE)0x81, rWrtWW8.pO->Count() );
+ }
+ else
+ {
+ // switch both flags off
+ rWrtWW8.InsUInt16( 0x858 );
+ rWrtWW8.pO->Insert( (BYTE)0x0, rWrtWW8.pO->Count() );
+ rWrtWW8.InsUInt16( 0x854 );
+ rWrtWW8.pO->Insert( (BYTE)0x0, rWrtWW8.pO->Count() );
+ }
+ }
+ return rWrt;
+}
+
+
static Writer& OutWW8_CharRotate( Writer& rWrt, const SfxPoolItem& rHt )
{
SwWW8Writer& rWrtWW8 = (SwWW8Writer&)rWrt;
@@ -3558,7 +3594,7 @@ SwAttrFnTab aWW8AttrFnTab = {
/* RES_CHRATR_EMPHASIS_MARK*/ OutWW8_EmphasisMark,
/* RES_TXTATR_TWO_LINES */ OutWW8_SvxTwoLinesItem,
/* RES_CHRATR_DUMMY4 */ OutWW8_ScaleWidth,
-/* RES_CHRATR_DUMMY5 */ 0,
+/* RES_CHRATR_DUMMY5 */ OutWW8_Relief,
/* RES_CHRATR_DUMMY1 */ 0, // Dummy:
/* RES_TXTATR_INETFMT */ OutSwFmtINetFmt,
@@ -3667,6 +3703,9 @@ SwAttrFnTab aWW8AttrFnTab = {
/*************************************************************************
$Log: not supported by cvs2svn $
+ Revision 1.11 2001/02/23 09:57:21 cmc
+ Test if CJK combined characters are western or asian
+
Revision 1.10 2001/02/21 12:45:24 os
use database struct instead of a combined string
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index a272c3dfe433..c820760cc007 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ww8par.hxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: cmc $ $Date: 2001-03-13 16:21:22 $
+ * last change: $Author: jp $ $Date: 2001-03-16 17:16:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1005,6 +1005,7 @@ public: // eigentlich private, geht aber leider nur public
void Read_Invisible( USHORT, BYTE* pData, short nLen );
void Read_Emphasis( USHORT, BYTE* pData, short nLen );
void Read_ScaleWidth( USHORT, BYTE* pData, short nLen );
+ void Read_Relief( USHORT, BYTE* pData, short nLen);
void Read_NoLineNumb( USHORT nId, BYTE* pData, short nLen );
@@ -1150,11 +1151,14 @@ public: // eigentlich private, geht aber leider nur public
Source Code Control System - Header
- $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/ww8/ww8par.hxx,v 1.16 2001-03-13 16:21:22 cmc Exp $
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/ww8/ww8par.hxx,v 1.17 2001-03-16 17:16:00 jp Exp $
Source Code Control System - Update
$Log: not supported by cvs2svn $
+ Revision 1.16 2001/03/13 16:21:22 cmc
+ ##503##, #84126#. Incorrect endnote setting, and duplicate code
+
Revision 1.15 2001/02/27 10:59:05 cmc
#84122# Missing Cropping on DirectBLIP import
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 8551892b2a03..1e7ff773ab44 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ww8par6.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: cmc $ $Date: 2001-03-16 14:19:41 $
+ * last change: $Author: jp $ $Date: 2001-03-16 17:15:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -192,6 +192,9 @@
#ifndef _SVX_CHARROTATEITEM_HXX
#include <svx/charrotateitem.hxx>
#endif
+#ifndef _SVX_CHARRELIEFITEM_HXX
+#include <svx/charreliefitem.hxx>
+#endif
#ifndef _SVX_HYZNITEM_HXX //autogen
#include <svx/hyznitem.hxx>
@@ -3983,6 +3986,33 @@ void SwWW8ImplReader::Read_ScaleWidth( USHORT, BYTE* pData, short nLen )
}
}
+void SwWW8ImplReader::Read_Relief( USHORT nId, BYTE* pData, short nLen )
+{
+ if( nLen < 0 )
+ pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_RELIEF );
+ else
+ {
+ if( *pData )
+ {
+// JP 16.03.2001 - not so eays because this is also a toggle attribute!
+// 2 x emboss on -> no emboss !!!
+// the actual value must be searched over the stack / template
+
+ const SvxCharReliefItem* pOld = (SvxCharReliefItem*)
+ GetFmtAttr( RES_CHRATR_RELIEF );
+ FontRelief nNewValue = 0x854 == nId ? RELIEF_ENGRAVED
+ : ( 0x858 == nId ? RELIEF_EMBOSSED
+ : RELIEF_NONE );
+ if( pOld->GetValue() == nNewValue )
+ {
+ if( RELIEF_NONE != nNewValue )
+ nNewValue = RELIEF_NONE;
+ }
+ NewAttr( SvxCharReliefItem( nNewValue ));
+ }
+ }
+}
+
SwWW8Shade::SwWW8Shade( BOOL bVer67, const WW8_SHD& rSHD )
{
@@ -4733,11 +4763,11 @@ SprmReadInfo aSprmReadTab[] = {
0x4A51, &SwWW8ImplReader::Read_FontCode, //"sprmCRgFtc2" // chp.rgftc[2];ftc for non-Far East text (see below);short;
0x4852, &SwWW8ImplReader::Read_ScaleWidth, // ? ? ? , "sprmCCharScale", // ;;;
0x2A53, &SwWW8ImplReader::Read_BoldUsw, //"sprmCFDStrike" // chp.fDStrike;;byte;
- 0x0854, (FNReadRecord)0, //"sprmCFImprint" // chp.fImprint;1 or 0;bit;
+ 0x0854, &SwWW8ImplReader::Read_Relief, //"sprmCFImprint" // chp.fImprint;1 or 0;bit;
0x0855, &SwWW8ImplReader::Read_Special, //"sprmCFSpec" // chp.fSpec ;1 or 0;bit;
0x0856, &SwWW8ImplReader::Read_Obj, //"sprmCFObj" // chp.fObj;1 or 0;bit;
0xCA57, &SwWW8ImplReader::Read_CPropRMark, //"sprmCPropRMark" // chp.fPropRMark, chp.ibstPropRMark, chp.dttmPropRMark;Complex (see below);variable length always recorded as 7 bytes;
- 0x0858, (FNReadRecord)0, //"sprmCFEmboss" // chp.fEmboss;1 or 0;bit;
+ 0x0858, &SwWW8ImplReader::Read_Relief, //"sprmCFEmboss" // chp.fEmboss;1 or 0;bit;
0x2859, (FNReadRecord)0, //"sprmCSfxText" // chp.sfxtText;text animation;byte;
//0x085A, ? ? ? , "sprmCFBiDi", // ;;;
//0x085B, ? ? ? , "sprmCFDiacColor", // ;;;
@@ -4953,12 +4983,15 @@ short SwWW8ImplReader::ImportSprm( BYTE* pPos, short nSprmsLen, USHORT nId )
Source Code Control System - Header
- $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/ww8/ww8par6.cxx,v 1.16 2001-03-16 14:19:41 cmc Exp $
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/ww8/ww8par6.cxx,v 1.17 2001-03-16 17:15:59 jp Exp $
Source Code Control System - Update
$Log: not supported by cvs2svn $
+ Revision 1.16 2001/03/16 14:19:41 cmc
+ Add some undocumented sprms
+
Revision 1.15 2001/03/13 16:21:22 cmc
##503##, #84126#. Incorrect endnote setting, and duplicate code