[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: koffice/filters/kword/rtf/import
From: Nicolas Goutte <nicolasg () snafu ! de>
Date: 2003-08-31 17:56:01
[Download RAW message or body]
CVS commit by goutte:
Add support of underine color (keyword \ulc)
CCMAIL:koffice-devel@kde.org
M +9 -0 rtfimport.cpp 1.58
M +1 -1 rtfimport.h 1.21
--- koffice/filters/kword/rtf/import/rtfimport.cpp #1.57:1.58
@@ -214,4 +214,5 @@ static RTFProperty propertyTable[] =
MEMBER( 0L, "uc", setNumericProperty, \
state.format.uc, 0 ),
MEMBER( 0L, "ul", setUnderlineProperty, \
state.format.underline, 0 ), + MEMBER( 0L, "ulc", \
setNumericProperty, state.format.underlinecolor, 0 ),
MEMBER( 0L, "uld", setEnumProperty, \
state.format.underline, RTFFormat::UnderlineDouble ),
MEMBER( 0L, "uldash", setEnumProperty, \
state.format.underline, RTFFormat::UnderlineDash ), @@ -787,4 +788,5 @@ void \
RTFImport::setPlainFormatting( RTFP format.color = -1;
format.bgcolor = -1;
+ format.underlinecolor = -1;
format.vertAlign = RTFFormat::Normal;
format.bold = false;
@@ -1886,4 +1888,5 @@ void RTFImport::addFormat( DomNode &node
QCString st,styleline,wordbyword("0");
st.setNum(format.fmt.underline);
+ int underlinecolor = format.fmt.underlinecolor;
switch (format.fmt.underline)
@@ -1893,4 +1896,5 @@ void RTFImport::addFormat( DomNode &node
{
st="0";
+ underlinecolor=-1; // Reset underline color
break;
}
@@ -1954,4 +1958,9 @@ void RTFImport::addFormat( DomNode &node
if ( !styleline.isEmpty() )
node.setAttribute( "styleline", styleline );
+ if ( underlinecolor >= 0 && uint(underlinecolor) < colorTable.count() )
+ {
+ QCString colorstr( colorTable[underlinecolor].name().utf8() );
+ node.setAttribute( "underlinecolor", colorstr );
+ }
node.closeNode( "UNDERLINE" );
--- koffice/filters/kword/rtf/import/rtfimport.h #1.20:1.21
@@ -134,5 +134,5 @@ struct RTFFormat
Underline underline;
int font, fontSize, baseline;
- int color, bgcolor;
+ int color, bgcolor, underlinecolor;
int uc;
bool bold, italic, strike, striked, hidden, caps, smallCaps;
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic