? -dup
? cvschk
? up
? admin/acinclude.m4.in.bk
? admin/foo
? kosoap/Makefile.in
? kosoap/easysoap++/Makefile.in
? kword/templates/CardsAndLabels
? kword/templates/Envelopes
Index: admin/acinclude.m4.in
===================================================================
RCS file: /home/kde/kde-common/admin/acinclude.m4.in,v
retrieving revision 2.344
diff -d -u -p -r2.344 acinclude.m4.in
--- admin/acinclude.m4.in	1 Mar 2003 16:29:48 -0000	2.344
+++ admin/acinclude.m4.in	5 Mar 2003 06:04:03 -0000
@@ -817,7 +817,14 @@ AC_ARG_ENABLE(
   kde_use_qt_emb_palm=no
 )
 
-if test "$kde_use_qt_emb" = "no"; then
+AC_ARG_ENABLE(
+  mac,
+  [  --enable-mac       link to Qt/Mac (don't use X)],
+  kde_use_qt_mac=$enableval,
+  kde_use_qt_mac=no
+)
+
+if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
 
 AC_MSG_CHECKING(for X)
 AC_LANG_SAVE
@@ -976,7 +983,7 @@ fi
 LIB_XEXT="-lXext"
 QTE_NORTTI=""
 
-else
+elif test "$kde_use_qt_emb" = "yes"; then
   dnl We're using QT Embedded
   CPPFLAGS=-DQWS
   CXXFLAGS="$CXXFLAGS -fno-rtti"
@@ -996,6 +1003,26 @@ else
   AC_SUBST(X_LDFLAGS)
   AC_SUBST(x_includes)
   AC_SUBST(x_libraries)
+elif test "$kde_use_qt_mac" = "yes"; then
+  dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
+  dnl be included to get the information) --Sam
+  CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
+  CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
+  X_PRE_LIBS=""
+  LIB_X11=""
+  LIB_XEXT=""
+  LIBSM=""
+  X_INCLUDES=""
+  X_LDFLAGS=""
+  x_includes=""
+  x_libraries=""
+  AC_SUBST(X_PRE_LIBS)
+  AC_SUBST(LIB_X11)
+  AC_SUBST(LIBSM)
+  AC_SUBST(X_INCLUDES)
+  AC_SUBST(X_LDFLAGS)
+  AC_SUBST(x_includes)
+  AC_SUBST(x_libraries)
 fi
 AC_SUBST(QTE_NORTTI)
 AC_SUBST(LIB_XEXT)
@@ -1157,7 +1184,7 @@ ac_libs_safe="$LIBS"
 
 CXXFLAGS="$CXXFLAGS -I$qt_includes"
 LDFLAGS="$LDFLAGS $X_LDFLAGS"
-if test "x$kde_use_qt_emb" != "xyes"; then
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
 else
 LIBS="$LIBQT $LIBSOCKET"
@@ -1324,7 +1351,7 @@ fi
 
 AC_MSG_CHECKING([for Qt])
 
-if test "x$kde_use_qt_emb" != "xyes"; then
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
 fi
 ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
@@ -1388,6 +1415,12 @@ else
     if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
   done
 fi
+for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
+  if test -e "$a"; then
+    LIBQT="$LIBQT ${kde_int_qt}_incremental"
+    break
+  fi
+done
 
 ac_qt_libraries="$qt_libdir"
 
@@ -1485,12 +1518,18 @@ AC_PATH_QT_MOC_UIC
 
 KDE_CHECK_QT_JPEG
 
-if test "x$kde_use_qt_emb" != "xyes"; then
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
 else
 LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
 fi
 test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
+for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
+  if test -e "$a"; then
+     LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
+     break
+  fi
+done
 
 AC_SUBST(LIB_QT)
 AC_SUBST(LIB_QPE)
@@ -2265,7 +2304,7 @@ AC_DEFUN(AC_FIND_GIF,
    [AC_MSG_CHECKING([for giflib])
 AC_CACHE_VAL(ac_cv_lib_gif,
 [ac_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
 else
 LIBS="$all_libraries -lgif"
@@ -2469,7 +2508,7 @@ AC_CACHE_VAL(kde_cv_libtiff_$1,
 AC_LANG_SAVE
 AC_LANG_CPLUSPLUS
 kde_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
 else
 LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
@@ -2528,7 +2567,7 @@ AC_MSG_CHECKING([for libpng])
 AC_CACHE_VAL(ac_cv_lib_png,
 [
 kde_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
 else
 LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
@@ -3302,7 +3341,7 @@ AC_DEFUN(AC_HAVE_XPM,
     AC_LANG_C
     ac_save_ldflags="$LDFLAGS"
     ac_save_cflags="$CFLAGS"
-    if test "x$kde_use_qt_emb" != "xyes"; then
+    if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
       LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
     else
       LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
@@ -3358,7 +3397,7 @@ AC_DEFUN(AC_HAVE_DPMS,
    dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
    AC_CACHE_VAL(ac_cv_have_dpms,
    [
-    if test "x$kde_use_qt_emb" = "xyes"; then
+    if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
       AC_MSG_RESULT(no)
       ac_cv_have_dpms="no"
     else
@@ -3451,7 +3490,7 @@ AC_DEFUN(AC_HAVE_GL,
     ac_save_ldflags="$LDFLAGS"
     ac_save_cxxflags="$CXXFLAGS"
     LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
-    test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
+    test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
     LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
     CXXFLAGS="$CFLAGS $X_INCLUDES"
     test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
@@ -3461,7 +3500,7 @@ AC_DEFUN(AC_HAVE_GL,
 	ac_cv_have_gl="mesa", ac_cv_have_gl="no")
     if test "x$ac_cv_have_gl" = "xno"; then
       LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
-      test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
+      test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
       LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
       CXXFLAGS="$ac_save_cflags $X_INCLUDES"
       test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
Index: admin/libtool.m4.in
===================================================================
RCS file: /home/kde/kde-common/admin/libtool.m4.in,v
retrieving revision 1.76
diff -d -u -p -r1.76 libtool.m4.in
--- admin/libtool.m4.in	11 Feb 2003 08:22:01 -0000	1.76
+++ admin/libtool.m4.in	5 Mar 2003 06:04:11 -0000
@@ -609,6 +609,12 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [d
     lt_cv_sys_max_cmd_len=-1;
     ;;
 
+  darwin*)
+    # this should be enough... the length test freaks out some versions
+    # of OSX's `expr`
+    lt_cv_sys_max_cmd_len=16384;
+    ;;
+
   *)
     # If test is not a shell built-in, we'll probably end up computing a
     # maximum length that is only half of the actual maximum length, but
@@ -1138,10 +1144,17 @@ darwin* | rhapsody*)
   # FIXME: Relying on posixy $() will cause problems for
   #        cross-compilation, but unfortunately the echo tests do not
   #        yet detect zsh echo's removal of \ escapes.
-  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
+  library_names_spec='${libname}${release}${versuffix}$(test .$module = .yes && echo .so).dylib $(test .$module != .yes && echo ${libname}${release}${major}.dylib ${libname}.dylib)'
   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
+  postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
+    dldir=$destdir/`dirname \$dlpath`~
+    test -d \$dldir || mkdir -p \$dldir~
+    echo \$dlname | grep .so$ && $install_prog .libs/$dlname \$dldir/$dlname || true'
+  postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
+    dlpath=$dir/\$dldll~
+     echo \$dlname | grep .so$ && $rm \$dlpath || true'
   ;;
 
 dgux*)
@@ -1909,7 +1922,8 @@ darwin* | rhapsody*)
     lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
     ;;
   *) # Darwin 1.3 on
-    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+    lt_cv_deplibs_check_method='pass_all'
+       lt_cv_file_magic_cmd=''
     ;;
   esac
   ;;
@@ -2561,6 +2575,27 @@ case $host_os in
 	;;
     esac
     ;;
+  darwin*)
+    shared_flag='-dynamiclib'
+    CCT=""
+    for ENTRY in `what /usr/bin/ld`; do 
+      case $ENTRY in
+        PROJECT:*)
+          CCT=`expr "$ENTRY" : 'PROJECT:cctools-\([[:digit:]]*\)'`
+          ;;
+      esac
+    done
+
+    test -n "$CCT" || CCT=0
+    if true || test "$CCT" -ge 446; then
+      export MACOSX_DEPLOYMENT_TARGET=10.2
+      _LT_AC_TAGVAR(archive_cmds, $1)='$(test .$module = .yes && echo $CC -dynamiclib -single_module -undefined suppress -flat_namespace -o ${lib} $libobjs || echo true) && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib -single_module) $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $(test .$module = .yes && echo .libs/$soname || echo $lib ) $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
+    else
+      # this may cause problems with some libraries!
+      _LT_AC_TAGVAR(archive_cmds, $1)='$(test .$module = .yes && echo $CC -dynamiclib -undefined suppress -flat_namespace -o ${lib} $libobjs || echo true) && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $(test .$module = .yes && echo .libs/$soname || echo $lib ) $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
+    fi
+    output_verbose_link_cmd='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+    ;;
   dgux*)
     case $cc_basename in
       ec++)
@@ -4751,7 +4786,9 @@ EOF
 	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 	;;
       *) # Darwin 1.3 on
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+	#_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+        # testing with twolevel namespaces
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-multiply_defined suppress'
 	;;
       esac
 
@@ -4759,7 +4796,16 @@ EOF
       #        cross-compilation, but unfortunately the echo tests do not
       #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
       #	       `"' quotes if we put them in here... so don't!
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
+      BUILD=`gcc -v 2>&1 | grep 'GCC version'`
+      BUILD=`expr "$BUILD" : '.*GCC version \(.*\), based.*'`
+      test -n "$BUILD" || BUILD=0
+      if test "$BUILD" -ge 1173; then
+        export MACOSX_DEPLOYMENT_TARGET=10.2
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib -single_module) $allow_undefined_flag -o $lib $libobjs $deplibs $linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
+      else
+        # this may cause problems with some libraries!
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
+      fi
       # We need to add '_' to the symbols in $export_symbols first
       #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Index: admin/ltmain.sh
===================================================================
RCS file: /home/kde/kde-common/admin/ltmain.sh,v
retrieving revision 1.61
diff -d -u -p -r1.61 ltmain.sh
--- admin/ltmain.sh	2 Jun 2002 20:54:46 -0000	1.61
+++ admin/ltmain.sh	5 Mar 2003 06:04:19 -0000
@@ -659,7 +659,20 @@ EOF
       $run $rm "$lobj" "$output_obj"
 
       $show "$command"
-      if $run eval "$command"; then :
+      if $run eval "$command"; then 
+        case $host in
+        *darwin*)
+              BUILD=`gcc -v 2>&1 | grep 'GCC version'`
+              BUILD=`expr "$BUILD" : '.*GCC version \(.*\), based.*'`
+              test -n "$BUILD" || BUILD=0
+              if test "$BUILD" -lt 1173; then
+		 $show "ld -r -d $lobj"
+	         if ld -r -d "$lobj" -o "${lobj}.ld"; then
+		     mv "${lobj}.ld" "$lobj"
+		 fi
+	      fi
+	      ;;
+        esac
       else
 	test -n "$output_obj" && $run $rm $removelist
 	exit 1
@@ -729,7 +742,20 @@ EOF
       command="$command$suppress_output"
       $run $rm "$obj" "$output_obj"
       $show "$command"
-      if $run eval "$command"; then :
+      if $run eval "$command"; then
+        case $host in
+        *darwin*)
+              BUILD=`gcc -v 2>&1 | grep 'GCC version'`
+              BUILD=`expr "$BUILD" : '.*GCC version \(.*\), based.*'`
+              test -n "$BUILD" || BUILD=0
+              if test "$BUILD" -lt 1173; then
+		 $show "ld -r -d $lobj"
+	         if ld -r -d "$lobj" -o "${lobj}.ld"; then
+		     mv "${lobj}.ld" "$lobj"
+		 fi
+	      fi
+	      ;;
+        esac
       else
 	$run $rm $removelist
 	exit 1
@@ -2532,11 +2558,11 @@ EOF
 	eval libname=\"$libname_spec\"
 	;;
       *)
-	if test "$module" = no; then
-	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	fi
+#	if test "$module" = no; then
+#	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+#	  $echo "$help" 1>&2
+#	  exit 1
+#	fi
 	if test "$need_lib_prefix" != no; then
 	  # Add the "lib" prefix for modules if required
 	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
@@ -3321,7 +3347,23 @@ EOF
 	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
 	  eval cmds=\"$archive_expsym_cmds\"
 	else
+          if test "x$verstring" = "x0.0"; then
+                tmp_verstring=
+          else
+                tmp_verstring="$verstring"
+          fi
+ 	  save_deplibs="$deplibs"
+ 	  for conv in $convenience; do
+            tmp_deplibs=
+            for test_deplib in $deplibs; do
+              if test "$test_deplib" != "$conv"; then
+                tmp_deplibs="$tmp_deplibs $test_deplib"
+              fi
+            done
+            deplibs="$tmp_deplibs"
+ 	  done
 	  eval cmds=\"$archive_cmds\"
+ 	  deplibs="$save_deplibs"
 	fi
 
 	if len=`expr "X$cmds" : ".*"` &&
@@ -3419,7 +3461,12 @@ EOF
 	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
 	    eval cmds=\"$archive_expsym_cmds\"
 	  else
-	    eval cmds=\"$archive_cmds\"
+            save_deplibs="$deplibs"
+            for conv in $convenience; do
+              deplibs="${deplibs%$conv*} ${deplibs#*$conv}"
+            done
+            eval cmds=\"$archive_cmds\"
+            deplibs="$save_deplibs"
 	  fi
 
 	  # Append the command to remove the reloadable object files
@@ -3634,6 +3681,14 @@ EOF
 	;;
       esac
 
+      case $host in
+      *darwin*)
+        # Don't allow lazy linking, it breaks C++ global constructors
+        compile_command="$compile_command ${wl}-bind_at_load -undefined suppress -flat_namespace"
+        finalize_command="$finalize_command ${wl}-bind_at_load"
+        ;;
+      esac
+
       compile_command="$compile_command $compile_deplibs"
       finalize_command="$finalize_command $finalize_deplibs"
 
@@ -4024,9 +4079,10 @@ static const void *lt_preloaded_setup() 
 	    # fast_install is set to needless
 	    relink_command=
 	  fi
+          relink_command=
 	else
 	  link_command="$compile_var$compile_command$compile_rpath"
-	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	  #relink_command="$finalize_var$finalize_command$finalize_rpath"
 	fi
       fi
 
@@ -4549,6 +4605,7 @@ relink_command=\"$relink_command\""
     prev=
     install_type=
     isdir=no
+    bundle=no
     stripme=
     for arg
     do
@@ -4564,6 +4621,9 @@ relink_command=\"$relink_command\""
       -g) prev="-g" ;;
       -m) prev="-m" ;;
       -o) prev="-o" ;;
+      -bundle) 
+        bundle=yes 
+        continue ;;
       -s)
 	stripme=" -s"
 	continue
@@ -4916,6 +4976,13 @@ relink_command=\"$relink_command\""
 	  esac
 	  ;;
 	esac
+	case $host in
+        *darwin*)
+           if [ "x$bundle" = "xyes" ]; then # Put executables into an application bundle
+	     echo $destfile | grep '\.app' >/dev/null 2>&1 || destfile="${destfile}.app/Contents/MacOS/$(basename $destfile)"
+           fi
+           ;;
+        esac
 	$show "$install_prog$stripme $file $destfile"
 	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
 	test -n "$outputname" && ${rm}r "$tmpdir"
Index: kchart/kdchart/Makefile.am
===================================================================
RCS file: /home/kde/koffice/kchart/kdchart/Makefile.am,v
retrieving revision 1.6
diff -d -u -p -r1.6 Makefile.am
--- kchart/kdchart/Makefile.am	16 May 2002 19:18:11 -0000	1.6
+++ kchart/kdchart/Makefile.am	5 Mar 2003 06:04:31 -0000
@@ -20,6 +20,7 @@ libkdchart_la_SOURCES = KDChart.cpp 		\
 			KDFrame.cpp 		\
 			KDFrameProfileSection.cpp \
 			KDXMLTools.cpp 
+libkdchart_la_LIBADD = $(LIB_QT) $(LIBZ)
 
 noinst_HEADERS =	KDChart.h 		\
 			KDChartAreaPainter.h	\
Index: kivio/kiviopart/kivio_canvas.cpp
===================================================================
RCS file: /home/kde/koffice/kivio/kiviopart/kivio_canvas.cpp,v
retrieving revision 1.30
diff -d -u -p -r1.30 kivio_canvas.cpp
--- kivio/kiviopart/kivio_canvas.cpp	26 Jan 2003 13:26:21 -0000	1.30
+++ kivio/kiviopart/kivio_canvas.cpp	5 Mar 2003 06:04:36 -0000
@@ -413,8 +413,12 @@ QSize KivioCanvas::actualSize()
 
 void KivioCanvas::setZoom(int zoom)
 {
+#ifdef Q_WS_X11
   m_pView->zoomHandler()->setZoomAndResolution(zoom, QPaintDevice::x11AppDpiX(),
-    QPaintDevice::x11AppDpiY());
+					       QPaintDevice::x11AppDpiY());
+#else
+  m_pView->zoomHandler()->setZoomAndResolution(zoom, 75, 75);
+#endif
 
   updateScrollBars();
   erase();
Index: kivio/kiviopart/kivio_view.cpp
===================================================================
RCS file: /home/kde/koffice/kivio/kiviopart/kivio_view.cpp,v
retrieving revision 1.76
diff -d -u -p -r1.76 kivio_view.cpp
--- kivio/kiviopart/kivio_view.cpp	26 Jan 2003 13:26:21 -0000	1.76
+++ kivio/kiviopart/kivio_view.cpp	5 Mar 2003 06:04:39 -0000
@@ -133,8 +133,12 @@ KivioView::KivioView( QWidget *_parent, 
 : KoView( doc, _parent, _name )
 {
   m_zoomHandler = new KoZoomHandler();
+#ifdef Q_WS_X11
   zoomHandler()->setZoomAndResolution(100, QPaintDevice::x11AppDpiX(),
     QPaintDevice::x11AppDpiY());
+#else
+  zoomHandler()->setZoomAndResolution(100, 75, 75);
+#endif
   m_pDoc = doc;
   m_pActivePage = 0;
   dcop = 0;
@@ -818,8 +822,12 @@ void KivioView::print(KPrinter& ptr)
 
 void KivioView::viewZoom(int zoom)
 {
+#ifdef Q_WS_X11
   zoomHandler()->setZoomAndResolution(zoom, QPaintDevice::x11AppDpiX(),
     QPaintDevice::x11AppDpiY());
+#else
+  zoomHandler()->setZoomAndResolution(zoom, 75, 75);
+#endif
   m_pCanvas->update();
   m_pCanvas->updateScrollBars();
   vRuler->setZoom(zoomHandler()->zoomedResolutionY());
Index: kivio/kiviopart/stencilbarmovemanager.cpp
===================================================================
RCS file: /home/kde/koffice/kivio/kiviopart/stencilbarmovemanager.cpp,v
retrieving revision 1.6
diff -d -u -p -r1.6 stencilbarmovemanager.cpp
--- kivio/kiviopart/stencilbarmovemanager.cpp	20 Apr 2002 15:53:24 -0000	1.6
+++ kivio/kiviopart/stencilbarmovemanager.cpp	5 Mar 2003 06:04:39 -0000
@@ -29,11 +29,11 @@
 StencilBarMoveManager::StencilBarMoveManager()
 : QObject()
 {
-  XGCValues gv;
-
   working=false;
   noLast=true;
 
+#ifdef Q_WS_X11
+  XGCValues gv;
   scr = qt_xscreen();
   root = qt_xrootwin();
 
@@ -43,6 +43,7 @@ StencilBarMoveManager::StencilBarMoveMan
   gv.subwindow_mode = IncludeInferiors;
   long mask = GCForeground | GCFunction | GCLineWidth | GCSubwindowMode;
   rootgc = XCreateGC(qt_xdisplay(), qt_xrootwin(), mask, &gv);
+#endif
 
   timer = new QTimer(this);
 }
@@ -103,8 +104,10 @@ void StencilBarMoveManager::doMoveIntern
   if (check(xp, yp, w, h)) {
     paintProcess(false,xp, yp, w, h);
 
+#ifdef Q_WS_X11
     XFlush(qt_xdisplay());
     XSync(qt_xdisplay(),false);
+#endif
   }
 }
 
@@ -117,7 +120,9 @@ void StencilBarMoveManager::stop()
   QApplication::restoreOverrideCursor();
 
   paintProcess();
+#ifdef Q_WS_X11
   XFlush(qt_xdisplay());
+#endif
 
   working = false;
 }
@@ -137,8 +142,10 @@ void StencilBarMoveManager::setGeometry(
   check(_x, _y, _w, _h, true);
   paintProcess(false,_x, _y, _w, _h);
 
+#ifdef Q_WS_X11
   XFlush(qt_xdisplay());
   XSync(qt_xdisplay(),false);
+#endif
 }
 
 void StencilBarMoveManager::drawRectangle( int _x, int _y, int _w, int _h)
@@ -151,7 +158,11 @@ void StencilBarMoveManager::drawRectangl
   ow = _w;
   oh = _h;
 
+#ifdef Q_WS_X11
   XDrawRectangle(qt_xdisplay(), root, rootgc, _x, _y, _w, _h);
+#else
+  //must implement for QWS & Mac
+#endif
   noLast = false;
 }
 
@@ -163,7 +174,11 @@ void StencilBarMoveManager::paintProcess
   if ( ox == _x && oy == _y && ow ==_w && oh == _h )
     return;
 
+#ifdef Q_WS_X11
   XDrawRectangle(qt_xdisplay(), root, rootgc, ox, oy, ow, oh);
+#ELSE
+  //must implement for QWS & Mac
+#endif
   noLast = true;
 
   drawRectangle(_x,_y,_w,_h);
@@ -253,8 +268,10 @@ void StencilBarMoveManager::doResizeInte
   if (check(xp, yp, w, h)) {
     paintProcess(false,xp, yp, w, h);
 
+#ifdef Q_WS_X11
     XFlush(qt_xdisplay());
     XSync(qt_xdisplay(),false);
+#endif
   }
 }
 
Index: kivio/kiviopart/stencilbarmovemanager.h
===================================================================
RCS file: /home/kde/koffice/kivio/kiviopart/stencilbarmovemanager.h,v
retrieving revision 1.3
diff -d -u -p -r1.3 stencilbarmovemanager.h
--- kivio/kiviopart/stencilbarmovemanager.h	20 Apr 2002 15:53:24 -0000	1.3
+++ kivio/kiviopart/stencilbarmovemanager.h	5 Mar 2003 06:04:39 -0000
@@ -21,9 +21,11 @@
 
 #include <qobject.h>
 
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
+#ifdef Q_WS_X11
+# include <X11/X.h>
+# include <X11/Xlib.h>
+# include <X11/Xutil.h>
+#endif
 
 class QTimer;
 class QWidget;
@@ -99,11 +101,13 @@ private:
   int rx, ry, sx, sy;
   int offX, offY;
 
+#ifdef Q_WS_X11
   /* X-stuff */
   Window root;
   GC rootgc;
   int scr;
   XEvent ev;
+#endif
 
   bool mirrorX;
   bool mirrorY;
Index: kivio/plugins/kivioselecttool/tool_select.cpp
===================================================================
RCS file: /home/kde/koffice/kivio/plugins/kivioselecttool/tool_select.cpp,v
retrieving revision 1.20
diff -d -u -p -r1.20 tool_select.cpp
--- kivio/plugins/kivioselecttool/tool_select.cpp	26 Jan 2003 13:26:22 -0000	1.20
+++ kivio/plugins/kivioselecttool/tool_select.cpp	5 Mar 2003 06:04:43 -0000
@@ -34,7 +34,9 @@
 #include "kivio_layer.h"
 #include "kivio_point.h"
 #include "kivio_stencil.h"
-#include <X11/Xlib.h>
+#ifdef Q_WS_X11
+# include <X11/Xlib.h>
+#endif
 
 #include <kaction.h>
 #include <kpopupmenu.h>
@@ -161,10 +163,12 @@ void SelectTool::select(const QRect &r)
 void SelectTool::mousePress(const QPoint &pos)
 {
     // Gets the list of keys held down and check if the shift key is one of them. If yes, set the flag
+#ifdef Q_WS_X11
     XQueryKeymap( qt_xdisplay(), m_keys );
     if( !(m_keys[6] & 4 ) && !(m_keys[7] & 64) )
         m_shiftKey = false;
     else
+#endif
         m_shiftKey = true;
 
     // Last point is used for undrawing at the last position and calculating the distance the mouse has moved
Index: kpresenter/kprcanvas.cc
===================================================================
RCS file: /home/kde/koffice/kpresenter/kprcanvas.cc,v
retrieving revision 1.344
diff -d -u -p -r1.344 kprcanvas.cc
--- kpresenter/kprcanvas.cc	1 Mar 2003 14:26:31 -0000	1.344
+++ kpresenter/kprcanvas.cc	5 Mar 2003 06:04:56 -0000
@@ -3072,8 +3072,12 @@ void KPrCanvas::startScreenPresentation(
     KPresenterDoc * doc = m_view->kPresenterDoc();
     m_zoomBeforePresentation=doc->zoomHandler()->zoom();
     // ## TODO get rid of presFakt
+#ifdef Q_WS_X11
     doc->zoomHandler()->setZoomAndResolution( qRound(_presFakt*m_zoomBeforePresentation),
                                               QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+#else
+    doc->zoomHandler()->setZoomAndResolution( qRound(_presFakt*m_zoomBeforePresentation), 75, 75 );
+#endif
     doc->newZoomAndResolution(false,false);
 
     QPtrListIterator<KPObject> oIt(doc->pageList().at( curPgNum-1 )->objectList());
@@ -3122,8 +3126,12 @@ void KPrCanvas::stopScreenPresentation()
 
     KPresenterDoc * doc = m_view->kPresenterDoc();
     _presFakt = 1.0;
+#ifdef Q_WS_X11
     doc->zoomHandler()->setZoomAndResolution( m_zoomBeforePresentation,
                                               QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+#else
+    doc->zoomHandler()->setZoomAndResolution( m_zoomBeforePresentation, 75, 75 );
+#endif
     doc->newZoomAndResolution(false,false);
     goingBack = false;
     currPresPage = 1;
Index: kpresenter/kpresenter_doc.cc
===================================================================
RCS file: /home/kde/koffice/kpresenter/kpresenter_doc.cc,v
retrieving revision 1.649
diff -d -u -p -r1.649 kpresenter_doc.cc
--- kpresenter/kpresenter_doc.cc	2 Mar 2003 16:33:33 -0000	1.649
+++ kpresenter/kpresenter_doc.cc	5 Mar 2003 06:05:03 -0000
@@ -220,7 +220,11 @@ KPresenterDoc::KPresenterDoc( QWidget *p
     usedSoundFile = QStringList();
     haveNotOwnDiskSoundFile = QStringList();
 
+#ifdef Q_WS_X11
     m_zoomHandler->setZoomAndResolution( 100, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+#else
+    m_zoomHandler->setZoomAndResolution( 100, 75, 75 );
+#endif
     newZoomAndResolution(false,false);
 
     //   _pageLayout.format = PG_SCREEN;
@@ -415,7 +419,11 @@ void KPresenterDoc::initConfig()
 
     // Apply configuration, without creating an undo/redo command
     replaceObjs( false );
+#ifdef Q_WS_X11
     zoomHandler()->setZoomAndResolution( zoom, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+#else
+    zoomHandler()->setZoomAndResolution( zoom, 75, 75);
+#endif
     newZoomAndResolution(false,false);
 }
 
@@ -2435,7 +2443,11 @@ KoView* KPresenterDoc::createViewInstanc
 void KPresenterDoc::paintContent( QPainter& painter, const QRect& rect,
                                   bool /*transparent*/, double zoomX, double zoomY )
 {
+#ifdef Q_WS_X11
     m_zoomHandler->setZoomAndResolution( 100, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+#else
+    m_zoomHandler->setZoomAndResolution( 100, 75, 75 );
+#endif
     if ( zoomHandler()->zoomedResolutionX() != zoomX || zoomHandler()->zoomedResolutionY() != zoomY )
     {
         zoomHandler()->setResolution( zoomX, zoomY );
Index: kpresenter/kpresenter_view.cc
===================================================================
RCS file: /home/kde/koffice/kpresenter/kpresenter_view.cc,v
retrieving revision 1.953
diff -d -u -p -r1.953 kpresenter_view.cc
--- kpresenter/kpresenter_view.cc	2 Mar 2003 16:12:42 -0000	1.953
+++ kpresenter/kpresenter_view.cc	5 Mar 2003 06:05:15 -0000
@@ -455,15 +455,25 @@ void KPresenterView::unZoomDocument(int 
     // No koffice app supports zooming in paintContent currently.
     // Disable in ALL cases now
     bool doZoom=false;
+#ifdef Q_WS_X11
     dpiX = doZoom ? 300 : QPaintDevice::x11AppDpiX();
     dpiY = doZoom ? 300 : QPaintDevice::x11AppDpiY();
+#else
+    dpiX = doZoom ? 300 : 75;
+    dpiY = doZoom ? 300 : 75;
+#endif
     zoomHandler()->setZoomAndResolution( 100, dpiX, dpiY );
     m_pKPresenterDoc->newZoomAndResolution( false, true /* for printing*/ );
 }
 
 void KPresenterView::zoomDocument(int zoom)
 {
+#ifdef Q_WS_X11
     zoomHandler()->setZoomAndResolution( zoom, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+#else
+    zoomHandler()->setZoomAndResolution( zoom, 75, 75 );
+#endif
+
     m_pKPresenterDoc->newZoomAndResolution( false, false );
     updateRuler();
 }
@@ -4346,7 +4356,7 @@ void KPresenterView::skipToPage( int num
     //(Laurent) deselect object when we change page.
     //otherwise you can change object properties on other page
     deSelectAllObjects();
-    m_pKPresenterDoc->repaint( FALSE );
+    m_pKPresenterDoc->repaint( (bool)FALSE );
 
     m_pKPresenterDoc->displayActivePage( page );
 
@@ -6076,8 +6086,12 @@ void KPresenterView::setZoomRect( const 
 
 void KPresenterView::setZoom( int zoom, bool updateViews )
 {
+#ifdef Q_WS_X11
     zoomHandler()->setZoomAndResolution( zoom, QPaintDevice::x11AppDpiX(),
                                          QPaintDevice::x11AppDpiY());
+#else
+    zoomHandler()->setZoomAndResolution( zoom, 75, 75);
+#endif
     m_pKPresenterDoc->newZoomAndResolution(updateViews,false);
     m_pKPresenterDoc->updateZoomRuler();
 
Index: kspread/kspread_aboutdata.h
===================================================================
RCS file: /home/kde/koffice/kspread/kspread_aboutdata.h,v
retrieving revision 1.24
diff -d -u -p -r1.24 kspread_aboutdata.h
--- kspread/kspread_aboutdata.h	24 Feb 2003 13:33:57 -0000	1.24
+++ kspread/kspread_aboutdata.h	5 Mar 2003 06:05:18 -0000
@@ -29,31 +29,6 @@ static const char* description=I18N_NOOP
 // Always the same as the KOffice version
 static const char* version=VERSION;
 
-KAboutData * newKSpreadAboutData()
-{
-    KAboutData * aboutData = new KAboutData( "kspread", I18N_NOOP("KSpread"),
-                                             version, description, KAboutData::License_LGPL,
-                                             I18N_NOOP("(c) 1998-2002, The KSpread Team"), 0,
-					     "http://www.koffice.org/kspread/");
-    aboutData->addAuthor("Torben Weis", 0, "weis@kde.org");
-    aboutData->addAuthor("Laurent Montel", 0, "lmontel@mandrakesoft.com");
-    aboutData->addAuthor("John Dailey", 0, "dailey@vt.edu");
-    aboutData->addAuthor("Philipp Müller", 0, "philipp.mueller@gmx.de");
-    aboutData->addAuthor("Ariya Hidayat", 0, "ariya@kde.org");
-    aboutData->addAuthor("Norbert Andres", 0, "nandres@web.de");
-    aboutData->addAuthor("Shaheed Haque", 0, "srhaque@iee.org");
-    aboutData->addAuthor("Werner Trobin", 0, "trobin@kde.org");
-    aboutData->addAuthor("Nikolas Zimmermann", 0, "wildfox@kde.org");
-    aboutData->addAuthor("David Faure", 0, "faure@kde.org");
-    aboutData->addAuthor("Helge Deller", 0, "deller@gmx.de");
-    aboutData->addAuthor("Percy Leonhart", 0, "percy@eris23.org");
-    aboutData->addAuthor("Eva Brucherseifer", 0, "eva@kde.org");
-    aboutData->addAuthor("Phillip Ezolt", 0, "phillipezolt@hotmail.com");
-    aboutData->addAuthor("Enno Bartels", 0, "ebartels@nwn.de");
-    aboutData->addAuthor("Graham Short", 0, "grahshrt@netscape.net");
-    aboutData->addAuthor("Lukáš Tinkl", 0, "lukas@kde.org");
-
-    return aboutData;
-}
+KAboutData * newKSpreadAboutData();
 
 #endif
Index: kspread/kspread_doc.cc
===================================================================
RCS file: /home/kde/koffice/kspread/kspread_doc.cc,v
retrieving revision 1.226
diff -d -u -p -r1.226 kspread_doc.cc
--- kspread/kspread_doc.cc	11 Feb 2003 19:14:00 -0000	1.226
+++ kspread/kspread_doc.cc	5 Mar 2003 06:05:20 -0000
@@ -228,7 +228,11 @@ void KSpreadDoc::initConfig()
     else
       m_zoom = 100;
 
+#ifdef Q_WS_X11
     setZoomAndResolution( m_zoom, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+#else
+    setZoomAndResolution( m_zoom, 75, 75 );
+#endif
 }
 
 KoView* KSpreadDoc::createViewInstance( QWidget* parent, const char* name )
@@ -674,7 +678,11 @@ void KSpreadDoc::paintContent( QPainter&
 {
     //kdDebug(36001) << "KSpreadDoc::paintContent m_zoom=" << m_zoom << " zoomX=" << zoomX << " zoomY=" << zoomY << " transparent=" << transparent << endl;
     int oldZoom = m_zoom;
+#ifdef Q_WS_X11
     setZoomAndResolution( 100, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+#else
+    setZoomAndResolution( 100, 75, 75 );
+#endif
     if ( m_zoomedResolutionX != zoomX || m_zoomedResolutionY != zoomY )
     {
         setResolution( zoomX, zoomY );
@@ -698,7 +706,11 @@ void KSpreadDoc::paintContent( QPainter&
 
     painter.restore();
     m_zoom = oldZoom;
+#ifdef Q_WS_X11
     setZoomAndResolution( oldZoom, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+#else
+    setZoomAndResolution( oldZoom, 75, 75 );
+#endif
 }
 
 void KSpreadDoc::paintContent( QPainter& painter, const QRect& rect, bool /*transparent*/, KSpreadSheet* table, bool drawCursor )
Index: kspread/kspread_view.cc
===================================================================
RCS file: /home/kde/koffice/kspread/kspread_view.cc,v
retrieving revision 1.651
diff -d -u -p -r1.651 kspread_view.cc
--- kspread/kspread_view.cc	20 Feb 2003 19:43:49 -0000	1.651
+++ kspread/kspread_view.cc	5 Mar 2003 06:05:31 -0000
@@ -3825,7 +3825,11 @@ void KSpreadView::print( KPrinter &prt )
 
     painter.end();
 
+#ifdef Q_WS_X11
     m_pDoc->setZoomAndResolution( oldZoom, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+#else
+    m_pDoc->setZoomAndResolution( oldZoom, 75, 75 );
+#endif
     m_pDoc->newZoomAndResolution( false, false );
 
     //Restore original orientation
@@ -4337,7 +4341,11 @@ void KSpreadView::setZoom( int zoom, boo
 //   m_pDoc->setZoom( zoom );
 //   m_pDoc->newZoom();
 
+#ifdef Q_WS_X11
   m_pDoc->setZoomAndResolution( zoom, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY());
+#else
+  m_pDoc->setZoomAndResolution( zoom, 75, 75 );
+#endif
   KoView::setZoom( m_pDoc->zoomedResolutionY() /* KoView only supports one zoom */ );
 
 //  m_pDoc->newZoomAndResolution( updateViews, false )
Index: kspread/main.cc
===================================================================
RCS file: /home/kde/koffice/kspread/main.cc,v
retrieving revision 1.19
diff -d -u -p -r1.19 main.cc
--- kspread/main.cc	23 Jan 2003 09:10:24 -0000	1.19
+++ kspread/main.cc	5 Mar 2003 06:05:31 -0000
@@ -23,6 +23,32 @@
 #include <dcopclient.h>
 #include "kspread_aboutdata.h"
 
+KAboutData * newKSpreadAboutData() 
+{
+    KAboutData * aboutData = new KAboutData( "kspread", I18N_NOOP("KSpread"),
+                                             version, description, KAboutData::License_LGPL,
+                                             I18N_NOOP("(c) 1998-2002, The KSpread Team"), 0,
+					     "http://www.koffice.org/kspread/");
+    aboutData->addAuthor("Torben Weis", 0, "weis@kde.org");
+    aboutData->addAuthor("Laurent Montel", 0, "lmontel@mandrakesoft.com");
+    aboutData->addAuthor("John Dailey", 0, "dailey@vt.edu");
+    aboutData->addAuthor("Philipp Müller", 0, "philipp.mueller@gmx.de");
+    aboutData->addAuthor("Ariya Hidayat", 0, "ariya@kde.org");
+    aboutData->addAuthor("Norbert Andres", 0, "nandres@web.de");
+    aboutData->addAuthor("Shaheed Haque", 0, "srhaque@iee.org");
+    aboutData->addAuthor("Werner Trobin", 0, "trobin@kde.org");
+    aboutData->addAuthor("Nikolas Zimmermann", 0, "wildfox@kde.org");
+    aboutData->addAuthor("David Faure", 0, "faure@kde.org");
+    aboutData->addAuthor("Helge Deller", 0, "deller@gmx.de");
+    aboutData->addAuthor("Percy Leonhart", 0, "percy@eris23.org");
+    aboutData->addAuthor("Eva Brucherseifer", 0, "eva@kde.org");
+    aboutData->addAuthor("Phillip Ezolt", 0, "phillipezolt@hotmail.com");
+    aboutData->addAuthor("Enno Bartels", 0, "ebartels@nwn.de");
+    aboutData->addAuthor("Graham Short", 0, "grahshrt@netscape.net");
+    aboutData->addAuthor("Lukáš Tinkl", 0, "lukas@kde.org");
+
+    return aboutData;
+}
 
 static const KCmdLineOptions options[]=
 {
Index: kspread/plugins/calculator/kcalc_core.cpp
===================================================================
RCS file: /home/kde/koffice/kspread/plugins/calculator/kcalc_core.cpp,v
retrieving revision 1.11
diff -d -u -p -r1.11 kcalc_core.cpp
--- kspread/plugins/calculator/kcalc_core.cpp	3 Sep 2001 15:56:46 -0000	1.11
+++ kspread/plugins/calculator/kcalc_core.cpp	5 Mar 2003 06:05:33 -0000
@@ -51,7 +51,7 @@
 #undef HAVE_LONG_DOUBLE
 #endif
 
-#ifndef HAVE_FUNC_ISINF
+#if !defined( HAVE_FUNC_ISINF ) || defined(Q_OS_MAC) //not sure why FUNC_ISINF is defined on Mac OS X ##FIXME (sam)
 #ifdef HAVE_IEEEFP_H
 #include <ieeefp.h>
 #else
Index: kugar/kudesigner/kudesigner_factory.cpp
===================================================================
RCS file: /home/kde/koffice/kugar/kudesigner/kudesigner_factory.cpp,v
retrieving revision 1.4
diff -d -u -p -r1.4 kudesigner_factory.cpp
--- kugar/kudesigner/kudesigner_factory.cpp	31 Jan 2003 22:33:07 -0000	1.4
+++ kugar/kudesigner/kudesigner_factory.cpp	5 Mar 2003 06:05:34 -0000
@@ -26,6 +26,8 @@
 #include <kdebug.h>
 #include <kstandarddirs.h>
 
+#ifndef Q_OS_MAC
+/* This is already defined in the kudesigner_part.cpp */
 extern "C"
 {
     void* init_libkudesignerpart()
@@ -33,6 +35,7 @@ extern "C"
         return new KudesignerFactory;
     }
 };
+#endif
 
 KInstance* KudesignerFactory::s_global = 0L;
 KAboutData* KudesignerFactory::s_aboutData = 0L;
Index: kword/kwcanvas.cc
===================================================================
RCS file: /home/kde/koffice/kword/kwcanvas.cc,v
retrieving revision 1.430
diff -d -u -p -r1.430 kwcanvas.cc
--- kword/kwcanvas.cc	24 Feb 2003 09:15:25 -0000	1.430
+++ kword/kwcanvas.cc	5 Mar 2003 06:05:40 -0000
@@ -475,8 +475,13 @@ void KWCanvas::mpCreatePixmap( const QPo
         if ( !m_pixmapSize.isEmpty() )
         {
             // This ensures 1-1 at 100% on screen, but allows zooming and printing with correct DPI values
+#ifdef Q_WS_X11
             uint width = qRound( (double)m_pixmapSize.width() * m_doc->zoomedResolutionX() / POINT_TO_INCH( QPaintDevice::x11AppDpiX() ) );
             uint height = qRound( (double)m_pixmapSize.height() * m_doc->zoomedResolutionY() / POINT_TO_INCH( QPaintDevice::x11AppDpiY() ) );
+#else
+            uint width = qRound( (double)m_pixmapSize.width() * m_doc->zoomedResolutionX() / POINT_TO_INCH(75) );
+	    uint height = qRound( (double)m_pixmapSize.height() * m_doc->zoomedResolutionY() / POINT_TO_INCH(75) );
+#endif
             m_insRect.setWidth( m_doc->unzoomItX( width ) );
             m_insRect.setHeight( m_doc->unzoomItY( height ) );
             // Apply reasonable limits
Index: kword/kwdoc.cc
===================================================================
RCS file: /home/kde/koffice/kword/kwdoc.cc,v
retrieving revision 1.598
diff -d -u -p -r1.598 kwdoc.cc
--- kword/kwdoc.cc	24 Feb 2003 09:15:25 -0000	1.598
+++ kword/kwdoc.cc	5 Mar 2003 06:05:48 -0000
@@ -59,7 +59,10 @@
 #include "kwviewmode.h"
 #include "mailmerge.h"
 
-#include <X11/Xlib.h>
+#ifdef Q_WS_X11
+# include <X11/Xlib.h>
+#endif
+
 #include <kglobalsettings.h>
 #include "kocommandhistory.h"
 
@@ -104,7 +107,7 @@ KoDocument* KWChild::hitTest( const QPoi
         return 0L;
     }
     // And only if CTRL isn't pressed.
-
+#ifdef Q_WS_X11
     Window root;
     Window child;
     int root_x, root_y, win_x, win_y;
@@ -113,7 +116,7 @@ KoDocument* KWChild::hitTest( const QPoi
                    &root_x, &root_y, &win_x, &win_y, &keybstate );
     if ( keybstate & ControlMask )
         return 0L;
-
+#endif
     return KoDocumentChild::hitTest( p, _matrix );
 }
 
@@ -476,7 +479,11 @@ void KWDocument::initConfig()
   if(undo!=-1)
       setUndoRedoLimit(undo);
 
+#ifdef Q_WS_X11
   setZoomAndResolution( m_zoom, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+#else
+  setZoomAndResolution( m_zoom, 75, 75 );
+#endif
 
   //text mode view is not a good default for a readonly document...
   if ( !isReadWrite() && m_lastViewMode =="ModeText" )
Index: kword/kwview.cc
===================================================================
RCS file: /home/kde/koffice/kword/kwview.cc,v
retrieving revision 1.947
diff -d -u -p -r1.947 kwview.cc
--- kword/kwview.cc	8 Feb 2003 12:59:36 -0000	1.947
+++ kword/kwview.cc	5 Mar 2003 06:06:03 -0000
@@ -1648,8 +1648,15 @@ void KWView::print( KPrinter &prt )
 
     //int dpiX = metrics.logicalDpiX();
     //int dpiY = metrics.logicalDpiY();
-    int dpiX = doZoom ? 300 : QPaintDevice::x11AppDpiX();
-    int dpiY = doZoom ? 300 : QPaintDevice::x11AppDpiY();
+    int dpiX = 300, dpiY = 300;
+    if(!doZoom) {
+#ifdef Q_WS_X11
+	dpiX = QPaintDevice::x11AppDpiX();
+	dpiY = QPaintDevice::x11AppDpiY();
+#else
+	dpiY = dpiX = 75;
+#endif
+    }
     ///////// Changing the dpiX/dpiY is very wrong nowadays. This has no effect on the font size
     ///////// that we give Qt, anymore, so it leads to minuscule fonts in the printout => doZoom==false.
     m_doc->setZoomAndResolution( 100, dpiX, dpiY );
@@ -1759,7 +1766,11 @@ void KWView::print( KPrinter &prt )
             fit.current()->preparePrinting( 0L, 0L, processedParags );
 #endif
 
+#ifdef Q_WS_X11
     m_doc->setZoomAndResolution( oldZoom, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+#else
+    m_doc->setZoomAndResolution( oldZoom, 75, 75 );
+#endif
     m_doc->newZoomAndResolution( false, false );
     kdDebug() << "KWView::print zoom&res reset" << endl;
 
@@ -2995,7 +3006,11 @@ void KWView::viewZoom( const QString &s 
 
 void KWView::setZoom( int zoom, bool updateViews )
 {
+#ifdef Q_WS_X11
     m_doc->setZoomAndResolution( zoom, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY());
+#else
+    m_doc->setZoomAndResolution( zoom, 75, 75 );
+#endif
     m_doc->newZoomAndResolution( updateViews, false );
     m_doc->updateZoomRuler();
 
@@ -3050,8 +3065,13 @@ void KWView::insertPicture( const KoPict
         QSize pixmapSize ( frameset->picture().getOriginalSize() );
         // This ensures 1-1 at 100% on screen, but allows zooming and printing with correct DPI values
         // ### TODO/FIXME: is the qRound really necessary?
+#ifdef Q_WS_X11
         double width = m_doc->unzoomItX( qRound( (double)pixmapSize.width() * m_doc->zoomedResolutionX() / POINT_TO_INCH( QPaintDevice::x11AppDpiX() ) ) );
         double height = m_doc->unzoomItY( qRound( (double)pixmapSize.height() * m_doc->zoomedResolutionY() / POINT_TO_INCH( QPaintDevice::x11AppDpiY() ) ) );
+#else
+        double width = m_doc->unzoomItX( qRound( (double)pixmapSize.width() * m_doc->zoomedResolutionX()));
+        double height = m_doc->unzoomItY( qRound( (double)pixmapSize.height() * m_doc->zoomedResolutionY()));
+#endif
 
         frameset->setKeepAspectRatio( _keepRatio);
 
Index: lib/kformula/kformulacontainer.cc
===================================================================
RCS file: /home/kde/koffice/lib/kformula/kformulacontainer.cc,v
retrieving revision 1.111
diff -d -u -p -r1.111 kformulacontainer.cc
--- lib/kformula/kformulacontainer.cc	10 Jan 2003 22:24:17 -0000	1.111
+++ lib/kformula/kformulacontainer.cc	5 Mar 2003 06:06:04 -0000
@@ -502,7 +502,11 @@ QImage Container::drawImage( int width, 
                      static_cast<double>( height )/static_cast<double>( realHeight ) );
 
     int oldZoom = context.zoom();
+#ifdef Q_WS_X11
     context.setZoomAndResolution( qRound( oldZoom*f ), QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+#else
+    context.setZoomAndResolution( qRound( oldZoom*f ), 75, 75 );
+#endif
 
     kdDebug( DEBUGID ) << "Container::drawImage "
                        << "(" << width << " " << height << ")"
@@ -516,7 +520,12 @@ QImage Container::drawImage( int width, 
     QPainter paint(&pm);
     impl->rootElement->draw(paint, rect, context);
     paint.end();
+#ifdef Q_WS_X11
     context.setZoomAndResolution( oldZoom, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+#else
+    context.setZoomAndResolution( oldZoom, 75, 75 );
+#endif
+
     //return pm.convertToImage().smoothScale( width, height );
     return pm.convertToImage();
 }
Index: lib/kofficecore/koDocument.cc
===================================================================
RCS file: /home/kde/koffice/lib/kofficecore/koDocument.cc,v
retrieving revision 1.265
diff -d -u -p -r1.265 koDocument.cc
--- lib/kofficecore/koDocument.cc	18 Feb 2003 10:02:10 -0000	1.265
+++ lib/kofficecore/koDocument.cc	5 Mar 2003 06:06:08 -0000
@@ -939,8 +939,18 @@ QPixmap KoDocument::generatePreview( con
     int pixmapSize = QMAX(size.width(), size.height());
 
     if (m_pageLayout.ptWidth > 1.0) {
-        docWidth = m_pageLayout.ptWidth / 72 * QPaintDevice::x11AppDpiX();
-        docHeight = m_pageLayout.ptHeight / 72 * QPaintDevice::x11AppDpiX();
+        docWidth = m_pageLayout.ptWidth / 72;
+#ifdef Q_WS_X11
+	docWidth *= QPaintDevice::x11AppDpiX();
+#else
+	docWidth *= 75;
+#endif
+        docHeight = m_pageLayout.ptHeight / 72;
+#ifdef Q_WS_X11
+	docHeight *= QPaintDevice::x11AppDpiX();
+#else
+	docHeight *= 75;
+#endif
 
     } else {
         // If we don't have a page layout, just draw the top left hand corner
Index: lib/kofficeui/koToolBox.cpp
===================================================================
RCS file: /home/kde/koffice/lib/kofficeui/koToolBox.cpp,v
retrieving revision 1.3
diff -d -u -p -r1.3 koToolBox.cpp
--- lib/kofficeui/koToolBox.cpp	13 Oct 2001 13:48:00 -0000	1.3
+++ lib/kofficeui/koToolBox.cpp	5 Mar 2003 06:06:08 -0000
@@ -29,7 +29,9 @@
 KoToolBox::KoToolBox( QWidget* parent, const char* name )
     : QFrame( parent, name, WType_TopLevel | WStyle_Tool )
 {
+#ifdef Q_WS_X11
     KWin::setType( winId(), NET::Tool );
+#endif
 
     setFrameShape( Panel );
     setFrameShadow( Raised );
Index: lib/kotext/kotextformat.cc
===================================================================
RCS file: /home/kde/koffice/lib/kotext/kotextformat.cc,v
retrieving revision 1.66
diff -d -u -p -r1.66 kotextformat.cc
--- lib/kotext/kotextformat.cc	17 Jan 2003 21:56:57 -0000	1.66
+++ lib/kotext/kotextformat.cc	5 Mar 2003 06:06:11 -0000
@@ -72,10 +72,15 @@ KoTextFormat::KoTextFormat( const QFont 
     qDebug("KoTextFormat with font & color & parent (%p), addRef. %p", parent, this);
 #endif
     int pointSize;
-    if ( f.pointSize() == -1 ) // font was set with a pixelsize, we need a pointsize!
+    if ( f.pointSize() == -1 ) { // font was set with a pixelsize, we need a pointsize!
+#ifdef Q_WS_X11
         pointSize = (int)( ( (double)fn.pixelSize() * 72.0 ) / (double)QPaintDevice::x11AppDpiY() );
-    else
+#else
+        pointSize = (int)( ( (double)fn.pixelSize() * 72.0 ) / (double)75 );
+#endif
+    } else {
         pointSize = f.pointSize();
+    }
     fn.setPointSize( pointSize );
     // WYSIWYG works much much better with scalable fonts -> force it to be scalable
     fn.setStyleStrategy( QFont::ForceOutline );
Index: lib/kotext/kozoomhandler.cc
===================================================================
RCS file: /home/kde/koffice/lib/kotext/kozoomhandler.cc,v
retrieving revision 1.14
diff -d -u -p -r1.14 kozoomhandler.cc
--- lib/kotext/kozoomhandler.cc	28 Jul 2002 16:33:39 -0000	1.14
+++ lib/kotext/kozoomhandler.cc	5 Mar 2003 06:06:11 -0000
@@ -30,7 +30,11 @@ int KoTextZoomHandler::m_layoutUnitFacto
 KoZoomHandler::KoZoomHandler()
 {
     // Note that this calls the method below, not the derived one
+#ifdef Q_WS_X11
     setZoomAndResolution( 100, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+#else
+    setZoomAndResolution( 100, 75, 75 );
+#endif
 }
 
 void KoZoomHandler::setZoomAndResolution( int zoom, int dpiX, int dpiY )
Index: lib/kotext/qrichtext.cpp
===================================================================
RCS file: /home/kde/koffice/lib/kotext/qrichtext.cpp,v
retrieving revision 1.113
diff -d -u -p -r1.113 qrichtext.cpp
--- lib/kotext/qrichtext.cpp	24 Jan 2003 05:41:30 -0000	1.113
+++ lib/kotext/qrichtext.cpp	5 Mar 2003 06:06:21 -0000
@@ -5943,7 +5943,7 @@ void KoTextImage::setPainter( QPainter* 
     }
 }
 
-#if !defined(Q_WS_X11)
+#if !defined(Q_WS_X11) && !defined(Q_WS_MAC)
 #include <qbitmap.h>
 #include <qcleanuphandler.h>
 static QPixmap *qrt_selection = 0;
@@ -5994,7 +5994,7 @@ void KoTextImage::draw( QPainter* p, int
     if ( selected && placement() == PlaceInline && p->device()->devType() != QInternal::Printer ) {
 #if defined(Q_WS_X11)
 	p->fillRect( QRect( QPoint( x, y ), pm.size() ), QBrush( cg.highlight(), QBrush::Dense4Pattern) );
-#else // in WIN32 Dense4Pattern doesn't work correctly (transparency problem), so work around it
+#elif defined(Q_WS_WIN) // in WIN32 Dense4Pattern doesn't work correctly (transparency problem), so work around it
 	if ( !qrt_selection )
 	    qrt_createSelectionPixmap( cg );
 	p->drawTiledPixmap( x, y, pm.width(), pm.height(), *qrt_selection );
