Index: kdevelop/kwrite/kwdoc.cpp
===================================================================
RCS file: /home/kde/kdevelop/kdevelop/kwrite/Attic/kwdoc.cpp,v
retrieving revision 1.5.2.14.2.40.2.17
diff -u -r1.5.2.14.2.40.2.17 kwdoc.cpp
--- kdevelop/kwrite/kwdoc.cpp	2002/06/07 18:03:05	1.5.2.14.2.40.2.17
+++ kdevelop/kwrite/kwdoc.cpp	2002/06/22 17:52:36
@@ -21,11 +21,6 @@
 #include "kwview.h"
 #include "kwdoc.h"

-// set this to 0, if you want color printing
-//   (take care the background on printing is always set to white)
-#define BW_PRINTING      1
-
-
 //text attribute constants
 const int taSelected = 0x40;
 const int taFound = 0x80;
@@ -460,6 +455,8 @@
   ,printFontHeight(0)
   ,fontAscent(0)
   ,printFontAscent(0)
+  ,indentLength(2)
+  ,bwPrinting(true)
   ,newDocGeometry(false)
   ,longestLine(0L)
   ,maxLength(0)
@@ -596,6 +593,7 @@

   setTabWidth(config->readNumEntry("TabWidth",8));
   setIndentLength(config->readNumEntry("IndentLength",2));
+  setBWPrinting(config->readBoolEntry("BlackAndWhitePrinting",true));
   setUndoSteps(config->readNumEntry("UndoSteps",5000));
   for (z = 0; z < 5; z++) {
     sprintf(s,"Color%d",z);
@@ -609,6 +607,7 @@

   config->writeEntry("TabWidth",tabChars);
   config->writeEntry("IndentLength",indentLength);
+  config->writeEntry("BlackAndWhitePrinting",bwPrinting);
   config->writeEntry("UndoSteps",undoSteps);
   for (z = 0; z < 5; z++) {
     sprintf(s,"Color%d",z);
@@ -1608,6 +1607,12 @@
   indentLength = length;
 }

+/** Set black and white printing width */
+void KWriteDoc::setBWPrinting(bool bw)
+{
+  bwPrinting=bw;
+}
+
 void KWriteDoc::updateLines(int startLine, int curLine, int endLine, int flags)
 {
   TextLine *textLine;
@@ -2512,7 +2517,7 @@
           attr = nextAttr;
           a = &attribs[attr & taAttrMask];

-          if (printing && BW_PRINTING)
+          if (printing && bwPrinting)
              paint.setPen(black);
           else
           {
@@ -2555,7 +2560,7 @@
         attr = nextAttr;
         a = &attribs[attr & taAttrMask];

-        if (printing && BW_PRINTING)
+        if (printing && bwPrinting)
            paint.setPen(black);
         else
         {
Index: kdevelop/kwrite/kwdoc.h
===================================================================
RCS file: /home/kde/kdevelop/kdevelop/kwrite/Attic/kwdoc.h,v
retrieving revision 1.5.2.6.2.16.2.4
diff -u -r1.5.2.6.2.16.2.4 kwdoc.h
--- kdevelop/kwrite/kwdoc.h	2002/06/06 23:45:09	1.5.2.6.2.16.2.4
+++ kdevelop/kwrite/kwdoc.h	2002/06/22 17:52:36
@@ -242,6 +242,7 @@
     void updateFontData();
     void setTabWidth(int);
     void setIndentLength(int length);
+    void setBWPrinting(bool);
     void updateLines(int startLine = 0, int curLine = -1, int endLine = 0xffffff, int flags = 0);
     void updateMaxLength(const TextLine *);
     void updateMaxLengthSimple(  QList<TextLine> &contents );
@@ -332,6 +333,7 @@
     int fontHeight, printFontHeight;
     int fontAscent, printFontAscent;
     int indentLength;
+    bool bwPrinting;
 
     QList<KWriteView> views;
     bool newDocGeometry;
