From 95b2985759bd19e22e647487ff9eac16a2b21a73 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 29 Jan 2010 20:10:09 +0000 Subject: [PATCH] Fix more wvware stuff git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1082138 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- filters/kword/msword/document.cpp | 8 ++++---- filters/kword/msword/texthandler.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/filters/kword/msword/document.cpp b/filters/kword/msword/document.cpp index bd700b2b7..9d2eab185 100644 --- a/filters/kword/msword/document.cpp +++ b/filters/kword/msword/document.cpp @@ -400,18 +400,18 @@ void Document::generateFrameBorder( QDomElement& frameElementOut, const wvWare:: Conversion::setBorderAttributes( frameElementOut, brcRight, "r" ); // Frame background brush (color and fill style) - if ( shd.icoFore != 0 || shd.icoBack != 0 ) + if ( shd.cvFore != 0 || shd.cvBack != 0 ) { // If ipat = 0 (solid fill), icoBack is the background color. // But otherwise, icoFore is the one we need to set as bkColor // (and icoBack is usually white; it's the other colour of the pattern, // something that we can't set in Qt apparently). - int bkColor = shd.ipat ? shd.icoFore : shd.icoBack; - kdDebug(30513) << "generateFrameBorder: " << " icoFore=" << shd.icoFore << " icoBack=" << shd.icoBack << " ipat=" << shd.ipat << " -> bkColor=" << bkColor << endl; + int bkColor = shd.ipat ? shd.cvFore : shd.cvBack; + kdDebug(30513) << "generateFrameBorder: " << " icoFore=" << shd.cvFore << " icoBack=" << shd.cvBack << " ipat=" << shd.ipat << " -> bkColor=" << bkColor << endl; // Reverse-engineer MSWord's own hackery: it models various gray levels // using dithering. But this looks crappy with Qt. So we go back to a QColor. - bool grayHack = ( shd.ipat && shd.icoFore == 1 && shd.icoBack == 8 ); + bool grayHack = ( shd.ipat && shd.cvFore == 1 && shd.cvBack == 8 ); if ( grayHack ) { bool ok; diff --git a/filters/kword/msword/texthandler.cpp b/filters/kword/msword/texthandler.cpp index 77d0efe77..4b0189bb2 100644 --- a/filters/kword/msword/texthandler.cpp +++ b/filters/kword/msword/texthandler.cpp @@ -322,9 +322,9 @@ void KWordTextHandler::writeFormat( QDomElement& parentElement, const wvWare::Wo format.setAttribute( "pos", pos ); format.setAttribute( "len", len ); - if ( !refChp || refChp->ico != chp->ico ) + if ( !refChp || refChp->cv != chp->cv ) { - QColor color = Conversion::color( chp->ico, -1 ); + QColor color = Conversion::color( chp->cv, -1 ); QDomElement colorElem( mainDocument().createElement( "COLOR" ) ); colorElem.setAttribute( "red", color.red() ); colorElem.setAttribute( "blue", color.blue() ); @@ -436,11 +436,11 @@ void KWordTextHandler::writeFormat( QDomElement& parentElement, const wvWare::Wo } // background color is known as "highlight" in msword - if ( !refChp || refChp->fHighlight != chp->fHighlight || refChp->icoHighlight != chp->icoHighlight ) { + if ( !refChp || refChp->fHighlight != chp->fHighlight || refChp->cvHighlight != chp->cvHighlight ) { QDomElement bgcolElem( mainDocument().createElement( "TEXTBACKGROUNDCOLOR" ) ); if ( chp->fHighlight ) { - QColor color = Conversion::color( chp->icoHighlight, -1 ); + QColor color = Conversion::color( chp->cvHighlight, -1 ); bgcolElem.setAttribute( "red", color.red() ); bgcolElem.setAttribute( "blue", color.blue() ); bgcolElem.setAttribute( "green", color.green() );