Replace TRUE/FALSE with boolean values true/false

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
master
Michele Calgaro 3 months ago
parent a6b8cc41e2
commit cf85b9c285
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -254,7 +254,7 @@ void evolve_paint()
}*/ }*/
for (k=0; k < STEP_LIMIT; k++) single_step(); for (k=0; k < STEP_LIMIT; k++) single_step();
while (TRUE) { while (1) {
next_cell_for_repaint(&cell, &p); next_cell_for_repaint(&cell, &p);
if (cell == NIL) return; if (cell == NIL) return;
paint_cell(cell, p.x, p.y); paint_cell(cell, p.x, p.y);

@ -699,7 +699,7 @@ void evolve_paint()
for (k=0; k < STEP_LIMIT; k++) single_step(); for (k=0; k < STEP_LIMIT; k++) single_step();
while (TRUE) { while (1) {
next_cell_for_repaint(&cell, &p); next_cell_for_repaint(&cell, &p);
if (cell == NIL) return; if (cell == NIL) return;
paint_cell(cell, p.x, p.y); paint_cell(cell, p.x, p.y);

@ -117,7 +117,7 @@ void KisScaleWorker::run()
{ {
for(int channel = 0; channel < m_pixelSize; channel++){ for(int channel = 0; channel < m_pixelSize; channel++){
weight[channel] = 0.0; weight[channel] = 0.0;
bPelDelta[channel] = FALSE; bPelDelta[channel] = false;
pel[channel]=tmpRows[contribY.p[0].m_pixel][ x * m_pixelSize + channel ]; pel[channel]=tmpRows[contribY.p[0].m_pixel][ x * m_pixelSize + channel ];
} }
for(int srcpos = 0; srcpos < contribY.n; srcpos++) for(int srcpos = 0; srcpos < contribY.n; srcpos++)
@ -126,7 +126,7 @@ void KisScaleWorker::run()
for(int channel = 0; channel < m_pixelSize; channel++) for(int channel = 0; channel < m_pixelSize; channel++)
{ {
pel2[channel]=tmpRows[contribY.p[srcpos].m_pixel][ x * m_pixelSize + channel ]; pel2[channel]=tmpRows[contribY.p[srcpos].m_pixel][ x * m_pixelSize + channel ];
if(pel2[channel] != pel[channel]) bPelDelta[channel] = TRUE; if(pel2[channel] != pel[channel]) bPelDelta[channel] = true;
weight[channel] += pel2[channel] * contribY.p[srcpos].m_weight; weight[channel] += pel2[channel] * contribY.p[srcpos].m_weight;
} }
} }
@ -143,7 +143,7 @@ void KisScaleWorker::run()
{ {
for(int channel = 0; channel < m_pixelSize; channel++){ for(int channel = 0; channel < m_pixelSize; channel++){
weight[channel] = 0.0; weight[channel] = 0.0;
bPelDelta[channel] = FALSE; bPelDelta[channel] = false;
pel[channel] = tmp[ contribX[x].p[0].m_pixel * m_pixelSize + channel ]; pel[channel] = tmp[ contribX[x].p[0].m_pixel * m_pixelSize + channel ];
} }
for(int srcpos = 0; srcpos < contribX[x].n; srcpos++) for(int srcpos = 0; srcpos < contribX[x].n; srcpos++)
@ -151,7 +151,7 @@ void KisScaleWorker::run()
for(int channel = 0; channel < m_pixelSize; channel++){ for(int channel = 0; channel < m_pixelSize; channel++){
pel2[channel] = tmp[ contribX[x].p[srcpos].m_pixel * m_pixelSize + channel ]; pel2[channel] = tmp[ contribX[x].p[srcpos].m_pixel * m_pixelSize + channel ];
if(pel2[channel] != pel[channel]) if(pel2[channel] != pel[channel])
bPelDelta[channel] = TRUE; bPelDelta[channel] = true;
weight[channel] += pel2[channel] * contribX[x].p[srcpos].m_weight; weight[channel] += pel2[channel] * contribX[x].p[srcpos].m_weight;
} }
} }

@ -79,7 +79,7 @@ public:
virtual void setWorldXForm(bool); virtual void setWorldXForm(bool);
virtual const TQWMatrix&worldMatrix() const; virtual const TQWMatrix&worldMatrix() const;
virtual void setWorldMatrix(const TQWMatrix&, bool combine=FALSE); virtual void setWorldMatrix(const TQWMatrix&, bool combine=false);
virtual void saveWorldMatrix(); virtual void saveWorldMatrix();
virtual void restoreWorldMatrix(); virtual void restoreWorldMatrix();
@ -136,7 +136,7 @@ public:
virtual void drawChord(const TQRect&, int a, int alen); virtual void drawChord(const TQRect&, int a, int alen);
virtual void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1); virtual void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1);
virtual void drawPolyline(const TQPointArray&, int index=0, int npoints=-1); virtual void drawPolyline(const TQPointArray&, int index=0, int npoints=-1);
virtual void drawPolygon(const TQPointArray&, bool winding=FALSE, int index=0, int npoints=-1); virtual void drawPolygon(const TQPointArray&, bool winding=false, int index=0, int npoints=-1);
virtual void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1); virtual void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1);
virtual void drawCubicBezier(const TQPointArray&, int index=0); virtual void drawCubicBezier(const TQPointArray&, int index=0);
virtual void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); virtual void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1);
@ -242,7 +242,7 @@ public:
void setWorldXForm(bool); void setWorldXForm(bool);
const TQWMatrix&worldMatrix() const; const TQWMatrix&worldMatrix() const;
void setWorldMatrix(const TQWMatrix&, bool combine=FALSE); void setWorldMatrix(const TQWMatrix&, bool combine=false);
void saveWorldMatrix(); void saveWorldMatrix();
void restoreWorldMatrix(); void restoreWorldMatrix();
@ -299,7 +299,7 @@ public:
void drawChord(const TQRect&, int a, int alen); void drawChord(const TQRect&, int a, int alen);
void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1); void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1);
void drawPolyline(const TQPointArray&, int index=0, int npoints=-1); void drawPolyline(const TQPointArray&, int index=0, int npoints=-1);
void drawPolygon(const TQPointArray&, bool winding=FALSE, int index=0, int npoints=-1); void drawPolygon(const TQPointArray&, bool winding=false, int index=0, int npoints=-1);
void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1); void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1);
void drawCubicBezier(const TQPointArray&, int index=0); void drawCubicBezier(const TQPointArray&, int index=0);
void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1);

@ -86,7 +86,7 @@ public:
virtual void setWorldXForm(bool); virtual void setWorldXForm(bool);
virtual const TQWMatrix&worldMatrix() const; virtual const TQWMatrix&worldMatrix() const;
virtual void setWorldMatrix(const TQWMatrix&, bool combine=FALSE); virtual void setWorldMatrix(const TQWMatrix&, bool combine=false);
virtual void saveWorldMatrix(); virtual void saveWorldMatrix();
virtual void restoreWorldMatrix(); virtual void restoreWorldMatrix();
@ -143,7 +143,7 @@ public:
virtual void drawChord(const TQRect&, int a, int alen); virtual void drawChord(const TQRect&, int a, int alen);
virtual void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1); virtual void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1);
virtual void drawPolyline(const TQPointArray&, int index=0, int npoints=-1); virtual void drawPolyline(const TQPointArray&, int index=0, int npoints=-1);
virtual void drawPolygon(const TQPointArray&, bool winding=FALSE, int index=0, int npoints=-1); virtual void drawPolygon(const TQPointArray&, bool winding=false, int index=0, int npoints=-1);
virtual void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1); virtual void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1);
virtual void drawCubicBezier(const TQPointArray&, int index=0); virtual void drawCubicBezier(const TQPointArray&, int index=0);
virtual void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); virtual void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1);

@ -81,7 +81,7 @@ public:
virtual void setWorldXForm(bool); virtual void setWorldXForm(bool);
virtual const TQWMatrix&worldMatrix() const; virtual const TQWMatrix&worldMatrix() const;
virtual void setWorldMatrix(const TQWMatrix&, bool combine=FALSE); virtual void setWorldMatrix(const TQWMatrix&, bool combine=false);
virtual void saveWorldMatrix(); virtual void saveWorldMatrix();
virtual void restoreWorldMatrix(); virtual void restoreWorldMatrix();
@ -138,7 +138,7 @@ public:
virtual void drawChord(const TQRect&, int a, int alen); virtual void drawChord(const TQRect&, int a, int alen);
virtual void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1); virtual void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1);
virtual void drawPolyline(const TQPointArray&, int index=0, int npoints=-1); virtual void drawPolyline(const TQPointArray&, int index=0, int npoints=-1);
virtual void drawPolygon(const TQPointArray&, bool winding=FALSE, int index=0, int npoints=-1); virtual void drawPolygon(const TQPointArray&, bool winding=false, int index=0, int npoints=-1);
virtual void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1); virtual void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1);
virtual void drawCubicBezier(const TQPointArray&, int index=0); virtual void drawCubicBezier(const TQPointArray&, int index=0);
virtual void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); virtual void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1);

@ -511,7 +511,7 @@ TQString KugarWidgetPlugin::whatsThis (const TQString &amp; feature) const
bool KugarWidgetPlugin::isContainer (const TQString &amp;) const bool KugarWidgetPlugin::isContainer (const TQString &amp;) const
{ {
return FALSE; return false;
} }
TQ_EXPORT_PLUGIN( KugarWidgetPlugin ) TQ_EXPORT_PLUGIN( KugarWidgetPlugin )

@ -43,7 +43,7 @@ bool ExamplePart::initDoc(InitDocFlags flags, TQWidget* parentWidget)
KoTemplateChooseDia::ReturnType ret = KoTemplateChooseDia::choose( KoTemplateChooseDia::ReturnType ret = KoTemplateChooseDia::choose(
.... ) .... )
*/ */
return TRUE; return true;
} }
KoView* ExamplePart::createViewInstance( TQWidget* parent, const char* name ) KoView* ExamplePart::createViewInstance( TQWidget* parent, const char* name )

@ -29,7 +29,7 @@ class ExamplePart : public KoDocument
public: public:
ExamplePart( TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject* parent = 0, const char* name = 0, bool singleViewMode = false ); ExamplePart( TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject* parent = 0, const char* name = 0, bool singleViewMode = false );
virtual void paintContent( TQPainter& painter, const TQRect& rect, bool transparent = FALSE, double zoomX = 1.0, double zoomY = 1.0 ); virtual void paintContent( TQPainter& painter, const TQRect& rect, bool transparent = false, double zoomX = 1.0, double zoomY = 1.0 );
virtual bool initDoc(InitDocFlags flags, TQWidget* parentWidget=0); virtual bool initDoc(InitDocFlags flags, TQWidget* parentWidget=0);

@ -51,7 +51,7 @@ void ExampleView::paintEvent( TQPaintEvent* ev )
// ### TODO: Scaling // ### TODO: Scaling
// Let the document do the drawing // Let the document do the drawing
koDocument()->paintEverything( painter, ev->rect(), FALSE, this ); koDocument()->paintEverything( painter, ev->rect(), false, this );
painter.end(); painter.end();
} }

@ -139,11 +139,11 @@ xcf_load_image (XcfInfo * info)
gimp_parasite_list_remove (GIMP_IMAGE (gimage)->parasites, gimp_parasite_list_remove (GIMP_IMAGE (gimage)->parasites,
gimp_parasite_name (parasite)); gimp_parasite_name (parasite));
gimp_image_set_grid (GIMP_IMAGE (gimage), grid, FALSE); gimp_image_set_grid (GIMP_IMAGE (gimage), grid, false);
} }
} }
while (TRUE) while (true)
{ {
/* read in the offset of the next layer */ /* read in the offset of the next layer */
info->cp += xcf_read_int32 (info->fp, &offset, 1); info->cp += xcf_read_int32 (info->fp, &offset, 1);
@ -182,7 +182,7 @@ xcf_load_image (XcfInfo * info)
goto error; goto error;
} }
while (TRUE) while (true)
{ {
/* read in the offset of the next channel */ /* read in the offset of the next channel */
info->cp += xcf_read_int32 (info->fp, &offset, 1); info->cp += xcf_read_int32 (info->fp, &offset, 1);
@ -264,15 +264,15 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage)
PropType prop_type; PropType prop_type;
TQ_INT32 prop_size; TQ_INT32 prop_size;
while (TRUE) while (true)
{ {
if (!xcf_load_prop (info, &prop_type, &prop_size)) if (!xcf_load_prop (info, &prop_type, &prop_size))
return FALSE; return false;
switch (prop_type) switch (prop_type)
{ {
case PROP_END: case PROP_END:
return TRUE; return true;
case PROP_COLORMAP: case PROP_COLORMAP:
if (info->file_version == 0) if (info->file_version == 0)
@ -286,7 +286,7 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage)
xcf_read_int32 (info->fp, (TQ_INT32 *) & gimage->num_cols, 1); xcf_read_int32 (info->fp, (TQ_INT32 *) & gimage->num_cols, 1);
gimage->cmap = g_new (guchar, gimage->num_cols * 3); gimage->cmap = g_new (guchar, gimage->num_cols * 3);
if (!xcf_seek_pos (info, info->cp + gimage->num_cols, NULL)) if (!xcf_seek_pos (info, info->cp + gimage->num_cols, NULL))
return FALSE; return false;
for (i = 0; i < gimage->num_cols; i++) for (i = 0; i < gimage->num_cols; i++)
{ {
@ -331,7 +331,7 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage)
(compression != COMPRESS_FRACTAL)) (compression != COMPRESS_FRACTAL))
{ {
g_message ("unknown compression type: %d", (int) compression); g_message ("unknown compression type: %d", (int) compression);
return FALSE; return false;
} }
info->compression = compression; info->compression = compression;
@ -359,11 +359,11 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage)
switch (orientation) switch (orientation)
{ {
case XCF_ORIENTATION_HORIZONTAL: case XCF_ORIENTATION_HORIZONTAL:
gimp_image_add_hguide (gimage, position, FALSE); gimp_image_add_hguide (gimage, position, false);
break; break;
case XCF_ORIENTATION_VERTICAL: case XCF_ORIENTATION_VERTICAL:
gimp_image_add_vguide (gimage, position, FALSE); gimp_image_add_vguide (gimage, position, false);
break; break;
default: default:
@ -540,7 +540,7 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage)
} }
} }
return FALSE; return false;
} }
static bool static bool
@ -554,15 +554,15 @@ xcf_load_layer_props (XcfInfo * info,
PropType prop_type; PropType prop_type;
TQ_INT32 prop_size; TQ_INT32 prop_size;
while (TRUE) while (true)
{ {
if (!xcf_load_prop (info, &prop_type, &prop_size)) if (!xcf_load_prop (info, &prop_type, &prop_size))
return FALSE; return false;
switch (prop_type) switch (prop_type)
{ {
case PROP_END: case PROP_END:
return TRUE; return true;
case PROP_ACTIVE_LAYER: case PROP_ACTIVE_LAYER:
info->active_layer = layer; info->active_layer = layer;
@ -592,7 +592,7 @@ xcf_load_layer_props (XcfInfo * info,
info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & visible, 1); info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & visible, 1);
gimp_item_set_visible (GIMP_ITEM (layer), gimp_item_set_visible (GIMP_ITEM (layer),
visible ? TRUE : FALSE, FALSE); visible ? true : false, false);
} }
break; break;
@ -602,7 +602,7 @@ xcf_load_layer_props (XcfInfo * info,
info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & linked, 1); info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & linked, 1);
gimp_item_set_linked (GIMP_ITEM (layer), gimp_item_set_linked (GIMP_ITEM (layer),
linked ? TRUE : FALSE, FALSE); linked ? true : false, false);
} }
break; break;
@ -682,7 +682,7 @@ xcf_load_layer_props (XcfInfo * info,
} }
} }
return FALSE; return false;
} }
static bool static bool
@ -692,15 +692,15 @@ xcf_load_channel_props (XcfInfo * info,
PropType prop_type; PropType prop_type;
TQ_INT32 prop_size; TQ_INT32 prop_size;
while (TRUE) while (true)
{ {
if (!xcf_load_prop (info, &prop_type, &prop_size)) if (!xcf_load_prop (info, &prop_type, &prop_size))
return FALSE; return false;
switch (prop_type) switch (prop_type)
{ {
case PROP_END: case PROP_END:
return TRUE; return true;
case PROP_ACTIVE_CHANNEL: case PROP_ACTIVE_CHANNEL:
info->active_channel = *channel; info->active_channel = *channel;
@ -721,8 +721,8 @@ xcf_load_channel_props (XcfInfo * info,
GIMP_DRAWABLE (*channel)->tiles = NULL; GIMP_DRAWABLE (*channel)->tiles = NULL;
g_object_unref (*channel); g_object_unref (*channel);
*channel = gimage->selection_mask; *channel = gimage->selection_mask;
(*channel)->boundary_known = FALSE; (*channel)->boundary_known = false;
(*channel)->bounds_known = FALSE; (*channel)->bounds_known = false;
break; break;
case PROP_OPACITY: case PROP_OPACITY:
@ -740,7 +740,7 @@ xcf_load_channel_props (XcfInfo * info,
info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & visible, 1); info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & visible, 1);
gimp_item_set_visible (GIMP_ITEM (*channel), gimp_item_set_visible (GIMP_ITEM (*channel),
visible ? TRUE : FALSE, FALSE); visible ? true : false, false);
} }
break; break;
@ -750,7 +750,7 @@ xcf_load_channel_props (XcfInfo * info,
info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & linked, 1); info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & linked, 1);
gimp_item_set_linked (GIMP_ITEM (*channel), gimp_item_set_linked (GIMP_ITEM (*channel),
linked ? TRUE : FALSE, FALSE); linked ? true : false, false);
} }
break; break;
@ -816,7 +816,7 @@ xcf_load_channel_props (XcfInfo * info,
} }
} }
return FALSE; return false;
} }
static bool static bool
@ -824,7 +824,7 @@ xcf_load_prop (XcfInfo * info, PropType * prop_type, TQ_INT32 * prop_size)
{ {
info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) prop_type, 1); info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) prop_type, 1);
info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) prop_size, 1); info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) prop_size, 1);
return TRUE; return true;
} }
static KisLayer * static KisLayer *
@ -834,9 +834,9 @@ xcf_load_layer (XcfInfo * info, KisImage * gimage)
GimpLayerMask *layer_mask; GimpLayerMask *layer_mask;
TQ_INT32 hierarchy_offset; TQ_INT32 hierarchy_offset;
TQ_INT32 layer_mask_offset; TQ_INT32 layer_mask_offset;
bool apply_mask = TRUE; bool apply_mask = true;
bool edit_mask = FALSE; bool edit_mask = false;
bool show_mask = FALSE; bool show_mask = false;
bool active; bool active;
bool floating; bool floating;
TQ_INT32 text_layer_flags = 0; TQ_INT32 text_layer_flags = 0;
@ -910,7 +910,7 @@ xcf_load_layer (XcfInfo * info, KisImage * gimage)
layer_mask->edit_mask = edit_mask; layer_mask->edit_mask = edit_mask;
layer_mask->show_mask = show_mask; layer_mask->show_mask = show_mask;
gimp_layer_add_mask (layer, layer_mask, FALSE); gimp_layer_add_mask (layer, layer_mask, false);
} }
/* attach the floating selection... */ /* attach the floating selection... */
@ -1049,7 +1049,7 @@ xcf_load_hierarchy (XcfInfo * info, TileManager * tiles)
if (width != tile_manager_width (tiles) || if (width != tile_manager_width (tiles) ||
height != tile_manager_height (tiles) || height != tile_manager_height (tiles) ||
bpp != tile_manager_bpp (tiles)) bpp != tile_manager_bpp (tiles))
return FALSE; return false;
/* load in the levels...we make sure that the number of levels /* load in the levels...we make sure that the number of levels
* calculated when the TileManager was created is the same * calculated when the TileManager was created is the same
@ -1073,19 +1073,19 @@ xcf_load_hierarchy (XcfInfo * info, TileManager * tiles)
/* seek to the level offset */ /* seek to the level offset */
if (!xcf_seek_pos (info, offset, NULL)) if (!xcf_seek_pos (info, offset, NULL))
return FALSE; return false;
/* read in the level */ /* read in the level */
if (!xcf_load_level (info, tiles)) if (!xcf_load_level (info, tiles))
return FALSE; return false;
/* restore the saved position so we'll be ready to /* restore the saved position so we'll be ready to
* read the next offset. * read the next offset.
*/ */
if (!xcf_seek_pos (info, saved_pos, NULL)) if (!xcf_seek_pos (info, saved_pos, NULL))
return FALSE; return false;
return TRUE; return true;
} }
@ -1107,7 +1107,7 @@ xcf_load_level (XcfInfo * info, TileManager * tiles)
if (width != tile_manager_width (tiles) || if (width != tile_manager_width (tiles) ||
height != tile_manager_height (tiles)) height != tile_manager_height (tiles))
return FALSE; return false;
/* read in the first tile offset. /* read in the first tile offset.
* if it is '0', then this tile level is empty * if it is '0', then this tile level is empty
@ -1115,7 +1115,7 @@ xcf_load_level (XcfInfo * info, TileManager * tiles)
*/ */
info->cp += xcf_read_int32 (info->fp, &offset, 1); info->cp += xcf_read_int32 (info->fp, &offset, 1);
if (offset == 0) if (offset == 0)
return TRUE; return true;
/* Initialise the reference for the in-memory tile-compression /* Initialise the reference for the in-memory tile-compression
*/ */
@ -1124,12 +1124,12 @@ xcf_load_level (XcfInfo * info, TileManager * tiles)
ntiles = tiles->ntile_rows * tiles->ntile_cols; ntiles = tiles->ntile_rows * tiles->ntile_cols;
for (i = 0; i < ntiles; i++) for (i = 0; i < ntiles; i++)
{ {
fail = FALSE; fail = false;
if (offset == 0) if (offset == 0)
{ {
g_message ("not enough tiles found in level"); g_message ("not enough tiles found in level");
return FALSE; return false;
} }
/* save the current position as it is where the /* save the current position as it is where the
@ -1150,36 +1150,36 @@ xcf_load_level (XcfInfo * info, TileManager * tiles)
/* seek to the tile offset */ /* seek to the tile offset */
if (!xcf_seek_pos (info, offset, NULL)) if (!xcf_seek_pos (info, offset, NULL))
return FALSE; return false;
/* get the tile from the tile manager */ /* get the tile from the tile manager */
tile = tile_manager_get (tiles, i, TRUE, TRUE); tile = tile_manager_get (tiles, i, true, true);
/* read in the tile */ /* read in the tile */
switch (info->compression) switch (info->compression)
{ {
case COMPRESS_NONE: case COMPRESS_NONE:
if (!xcf_load_tile (info, tile)) if (!xcf_load_tile (info, tile))
fail = TRUE; fail = true;
break; break;
case COMPRESS_RLE: case COMPRESS_RLE:
if (!xcf_load_tile_rle (info, tile, offset2 - offset)) if (!xcf_load_tile_rle (info, tile, offset2 - offset))
fail = TRUE; fail = true;
break; break;
case COMPRESS_ZLIB: case COMPRESS_ZLIB:
g_error ("xcf: zlib compression unimplemented"); g_error ("xcf: zlib compression unimplemented");
fail = TRUE; fail = true;
break; break;
case COMPRESS_FRACTAL: case COMPRESS_FRACTAL:
g_error ("xcf: fractal compression unimplemented"); g_error ("xcf: fractal compression unimplemented");
fail = TRUE; fail = true;
break; break;
} }
if (fail) if (fail)
{ {
tile_release (tile, TRUE); tile_release (tile, true);
return FALSE; return false;
} }
/* To potentially save memory, we compare the /* To potentially save memory, we compare the
@ -1197,16 +1197,16 @@ xcf_load_level (XcfInfo * info, TileManager * tiles)
tile_data_pointer (previous, 0, 0), tile_data_pointer (previous, 0, 0),
tile_size (tile)) == 0) tile_size (tile)) == 0)
tile_manager_map (tiles, i, previous); tile_manager_map (tiles, i, previous);
tile_release (previous, FALSE); tile_release (previous, false);
} }
tile_release (tile, TRUE); tile_release (tile, true);
previous = tile_manager_get (tiles, i, FALSE, FALSE); previous = tile_manager_get (tiles, i, false, false);
/* restore the saved position so we'll be ready to /* restore the saved position so we'll be ready to
* read the next offset. * read the next offset.
*/ */
if (!xcf_seek_pos (info, saved_pos, NULL)) if (!xcf_seek_pos (info, saved_pos, NULL))
return FALSE; return false;
/* read in the offset of the next tile */ /* read in the offset of the next tile */
info->cp += xcf_read_int32 (info->fp, &offset, 1); info->cp += xcf_read_int32 (info->fp, &offset, 1);
@ -1215,10 +1215,10 @@ xcf_load_level (XcfInfo * info, TileManager * tiles)
if (offset != 0) if (offset != 0)
{ {
g_message ("encountered garbage after reading level: %d", offset); g_message ("encountered garbage after reading level: %d", offset);
return FALSE; return false;
} }
return TRUE; return true;
} }
static bool static bool
@ -1244,7 +1244,7 @@ xcf_load_tile (XcfInfo * info, Tile * tile)
#endif #endif
return TRUE; return true;
} }
static bool static bool
@ -1360,12 +1360,12 @@ xcf_load_tile_rle (XcfInfo * info, Tile * tile, int data_length)
} }
} }
g_free (xcfodata); g_free (xcfodata);
return TRUE; return true;
bogus_rle: bogus_rle:
if (xcfodata) if (xcfodata)
g_free (xcfodata); g_free (xcfodata);
return FALSE; return false;
} }
static KisAnnotation * static KisAnnotation *
@ -1402,7 +1402,7 @@ xcf_load_old_paths (XcfInfo * info, KisImage * gimage)
if (active_vectors) if (active_vectors)
gimp_image_set_active_vectors (gimage, active_vectors); gimp_image_set_active_vectors (gimage, active_vectors);
return TRUE; return true;
} }
static bool static bool
@ -1445,12 +1445,12 @@ xcf_load_old_path (XcfInfo * info, KisImage * gimage)
{ {
g_warning ("Unknown path type. Possibly corrupt XCF file"); g_warning ("Unknown path type. Possibly corrupt XCF file");
return FALSE; return false;
} }
/* skip empty compatibility paths */ /* skip empty compatibility paths */
if (num_points == 0) if (num_points == 0)
return FALSE; return false;
points = g_new0 (GimpVectorsCompatPoint, num_points); points = g_new0 (GimpVectorsCompatPoint, num_points);
@ -1496,7 +1496,7 @@ xcf_load_old_path (XcfInfo * info, KisImage * gimage)
gimp_image_add_vectors (gimage, vectors, gimp_image_add_vectors (gimage, vectors,
gimp_container_num_children (gimage->vectors)); gimp_container_num_children (gimage->vectors));
return TRUE; return true;
} }
static bool static bool
@ -1519,7 +1519,7 @@ xcf_load_vectors (XcfInfo * info, KisImage * gimage)
if (version != 1) if (version != 1)
{ {
g_message ("Unknown vectors version: %d (skipping)", version); g_message ("Unknown vectors version: %d (skipping)", version);
return FALSE; return false;
} }
info->cp += xcf_read_int32 (info->fp, &active_index, 1); info->cp += xcf_read_int32 (info->fp, &active_index, 1);
@ -1531,7 +1531,7 @@ xcf_load_vectors (XcfInfo * info, KisImage * gimage)
while (num_paths-- > 0) while (num_paths-- > 0)
if (!xcf_load_vector (info, gimage)) if (!xcf_load_vector (info, gimage))
return FALSE; return false;
active_vectors = (GimpVectors *) active_vectors = (GimpVectors *)
gimp_container_get_child_by_index (gimage->vectors, active_index); gimp_container_get_child_by_index (gimage->vectors, active_index);
@ -1542,7 +1542,7 @@ xcf_load_vectors (XcfInfo * info, KisImage * gimage)
#ifdef GIMP_XCF_PATH_DEBUG #ifdef GIMP_XCF_PATH_DEBUG
g_printerr ("xcf_load_vectors: loaded %d bytes\n", info->cp - base); g_printerr ("xcf_load_vectors: loaded %d bytes\n", info->cp - base);
#endif #endif
return TRUE; return true;
} }
static bool static bool
@ -1577,8 +1577,8 @@ xcf_load_vector (XcfInfo * info, KisImage * gimage)
vectors = gimp_vectors_new (gimage, name); vectors = gimp_vectors_new (gimage, name);
GIMP_ITEM (vectors)->visible = visible ? TRUE : FALSE; GIMP_ITEM (vectors)->visible = visible ? true : false;
GIMP_ITEM (vectors)->linked = linked ? TRUE : FALSE; GIMP_ITEM (vectors)->linked = linked ? true : false;
if (tattoo) if (tattoo)
GIMP_ITEM (vectors)->tattoo = tattoo; GIMP_ITEM (vectors)->tattoo = tattoo;
@ -1590,7 +1590,7 @@ xcf_load_vector (XcfInfo * info, KisImage * gimage)
parasite = xcf_load_parasite (info); parasite = xcf_load_parasite (info);
if (!parasite) if (!parasite)
return FALSE; return false;
gimp_item_parasite_attach (GIMP_ITEM (vectors), parasite); gimp_item_parasite_attach (GIMP_ITEM (vectors), parasite);
gimp_parasite_free (parasite); gimp_parasite_free (parasite);
@ -1639,7 +1639,7 @@ xcf_load_vector (XcfInfo * info, KisImage * gimage)
control_points = g_value_array_new (num_control_points); control_points = g_value_array_new (num_control_points);
anchor.selected = FALSE; anchor.selected = false;
for (j = 0; j < num_control_points; j++) for (j = 0; j < num_control_points; j++)
{ {
@ -1676,7 +1676,7 @@ xcf_load_vector (XcfInfo * info, KisImage * gimage)
gimp_image_add_vectors (gimage, vectors, gimp_image_add_vectors (gimage, vectors,
gimp_container_num_children (gimage->vectors)); gimp_container_num_children (gimage->vectors));
return TRUE; return true;
} }
#ifdef SWAP_FROM_FILE #ifdef SWAP_FROM_FILE
@ -1710,7 +1710,7 @@ xcf_swap_func (TQ_INT32 fd, Tile * tile, TQ_INT32 cmd, gpointer user_data)
{ {
g_message ("unable to read tile data from xcf file: " g_message ("unable to read tile data from xcf file: "
"%d ( %d ) bytes read", err, nleft); "%d ( %d ) bytes read", err, nleft);
return FALSE; return false;
} }
nleft -= err; nleft -= err;
@ -1731,10 +1731,10 @@ xcf_swap_func (TQ_INT32 fd, Tile * tile, TQ_INT32 cmd, gpointer user_data)
tile->swap_num = 1; tile->swap_num = 1;
tile->swap_offset = -1; tile->swap_offset = -1;
return TRUE; return true;
} }
return FALSE; return false;
} }
#endif #endif

@ -119,7 +119,7 @@ static bool xcf_save_vectors (XcfInfo *info,
if (tmp_error) \ if (tmp_error) \
{ \ { \
g_propagate_error (error, tmp_error); \ g_propagate_error (error, tmp_error); \
return FALSE; \ return false; \
} \ } \
} G_STMT_END } G_STMT_END
@ -128,7 +128,7 @@ static bool xcf_save_vectors (XcfInfo *info,
if (tmp_error) \ if (tmp_error) \
{ \ { \
g_propagate_error (error, tmp_error); \ g_propagate_error (error, tmp_error); \
return FALSE; \ return false; \
} \ } \
} G_STMT_END } G_STMT_END
@ -137,7 +137,7 @@ static bool xcf_save_vectors (XcfInfo *info,
if (tmp_error) \ if (tmp_error) \
{ \ { \
g_propagate_error (error, tmp_error); \ g_propagate_error (error, tmp_error); \
return FALSE; \ return false; \
} \ } \
} G_STMT_END } G_STMT_END
@ -146,7 +146,7 @@ static bool xcf_save_vectors (XcfInfo *info,
if (tmp_error) \ if (tmp_error) \
{ \ { \
g_propagate_error (error, tmp_error); \ g_propagate_error (error, tmp_error); \
return FALSE; \ return false; \
} \ } \
} G_STMT_END } G_STMT_END
@ -156,7 +156,7 @@ static bool xcf_save_vectors (XcfInfo *info,
{ \ { \
g_message (_("Error saving XCF file: %s"), \ g_message (_("Error saving XCF file: %s"), \
error->message); \ error->message); \
return FALSE; \ return false; \
} \ } \
} G_STMT_END } G_STMT_END
@ -166,7 +166,7 @@ static bool xcf_save_vectors (XcfInfo *info,
{ \ { \
g_message (_("Error saving XCF file: %s"), \ g_message (_("Error saving XCF file: %s"), \
error->message); \ error->message); \
return FALSE; \ return false; \
} \ } \
} G_STMT_END } G_STMT_END
@ -176,7 +176,7 @@ static bool xcf_save_vectors (XcfInfo *info,
{ \ { \
g_message (_("Error saving XCF file: %s"), \ g_message (_("Error saving XCF file: %s"), \
error->message); \ error->message); \
return FALSE; \ return false; \
} \ } \
} G_STMT_END } G_STMT_END
@ -186,7 +186,7 @@ static bool xcf_save_vectors (XcfInfo *info,
{ \ { \
g_message (_("Error saving XCF file: %s"), \ g_message (_("Error saving XCF file: %s"), \
error->message); \ error->message); \
return FALSE; \ return false; \
} \ } \
} G_STMT_END } G_STMT_END
@ -202,7 +202,7 @@ static bool xcf_save_vectors (XcfInfo *info,
#define xcf_check_error(x) G_STMT_START { \ #define xcf_check_error(x) G_STMT_START { \
if (! (x)) \ if (! (x)) \
return FALSE; \ return false; \
} G_STMT_END } G_STMT_END
#define xcf_print_error(x) G_STMT_START { \ #define xcf_print_error(x) G_STMT_START { \
@ -210,7 +210,7 @@ static bool xcf_save_vectors (XcfInfo *info,
{ \ { \
g_message (_("Error saving XCF file: %s"), \ g_message (_("Error saving XCF file: %s"), \
error->message); \ error->message); \
return FALSE; \ return false; \
} \ } \
} G_STMT_END } G_STMT_END
@ -366,7 +366,7 @@ xcf_save_image (XcfInfo *info,
else else
{ {
channel = gimage->selection_mask; channel = gimage->selection_mask;
have_selection = FALSE; have_selection = false;
} }
/* save the start offset of where we are writing /* save the start offset of where we are writing
@ -476,7 +476,7 @@ xcf_save_image_props (XcfInfo *info,
xcf_check_error (xcf_save_prop (info, gimage, PROP_END, error)); xcf_check_error (xcf_save_prop (info, gimage, PROP_END, error));
return TRUE; return true;
} }
static bool static bool
@ -561,7 +561,7 @@ xcf_save_layer_props (XcfInfo *info,
xcf_check_error (xcf_save_prop (info, gimage, PROP_END, error)); xcf_check_error (xcf_save_prop (info, gimage, PROP_END, error));
return TRUE; return true;
} }
static bool static bool
@ -599,7 +599,7 @@ xcf_save_channel_props (XcfInfo *info,
xcf_check_error (xcf_save_prop (info, gimage, PROP_END, error)); xcf_check_error (xcf_save_prop (info, gimage, PROP_END, error));
return TRUE; return true;
} }
static bool static bool
@ -929,7 +929,7 @@ xcf_save_prop (XcfInfo *info,
if (tmp_error) if (tmp_error)
{ {
g_propagate_error (error, tmp_error); g_propagate_error (error, tmp_error);
return FALSE; return false;
} }
xcf_check_error (xcf_seek_end (info, error)); xcf_check_error (xcf_seek_end (info, error));
@ -976,7 +976,7 @@ xcf_save_prop (XcfInfo *info,
if (tmp_error) if (tmp_error)
{ {
g_propagate_error (error, tmp_error); g_propagate_error (error, tmp_error);
return FALSE; return false;
} }
xcf_check_error (xcf_seek_end (info, error)); xcf_check_error (xcf_seek_end (info, error));
@ -1042,7 +1042,7 @@ xcf_save_prop (XcfInfo *info,
if (tmp_error) if (tmp_error)
{ {
g_propagate_error (error, tmp_error); g_propagate_error (error, tmp_error);
return FALSE; return false;
} }
xcf_check_error (xcf_seek_end (info, error)); xcf_check_error (xcf_seek_end (info, error));
@ -1065,7 +1065,7 @@ xcf_save_prop (XcfInfo *info,
va_end (args); va_end (args);
return TRUE; return true;
} }
static bool static bool
@ -1136,7 +1136,7 @@ xcf_save_layer (XcfInfo *info,
xcf_check_error (xcf_seek_pos (info, saved_pos, error)); xcf_check_error (xcf_seek_pos (info, saved_pos, error));
xcf_write_int32_check_error (info, &offset, 1); xcf_write_int32_check_error (info, &offset, 1);
return TRUE; return true;
} }
static bool static bool
@ -1189,7 +1189,7 @@ xcf_save_channel (XcfInfo *info,
xcf_write_int32_check_error (info, &offset, 1); xcf_write_int32_check_error (info, &offset, 1);
saved_pos = info->cp; saved_pos = info->cp;
return TRUE; return true;
} }
static TQ_INT32 static TQ_INT32
@ -1285,7 +1285,7 @@ xcf_save_hierarchy (XcfInfo *info,
xcf_check_error (xcf_seek_pos (info, saved_pos, error)); xcf_check_error (xcf_seek_pos (info, saved_pos, error));
xcf_write_int32_check_error (info, &offset, 1); xcf_write_int32_check_error (info, &offset, 1);
return TRUE; return true;
} }
static bool static bool
@ -1373,7 +1373,7 @@ xcf_save_level (XcfInfo *info,
xcf_check_error (xcf_seek_pos (info, saved_pos, error)); xcf_check_error (xcf_seek_pos (info, saved_pos, error));
xcf_write_int32_check_error (info, &offset, 1); xcf_write_int32_check_error (info, &offset, 1);
return TRUE; return true;
} }
@ -1387,9 +1387,9 @@ xcf_save_tile (XcfInfo *info,
tile_lock (tile); tile_lock (tile);
xcf_write_int8_check_error (info, tile_data_pointer (tile, 0, 0), xcf_write_int8_check_error (info, tile_data_pointer (tile, 0, 0),
tile_size (tile)); tile_size (tile));
tile_release (tile, FALSE); tile_release (tile, false);
return TRUE; return true;
} }
static bool static bool
@ -1503,9 +1503,9 @@ xcf_save_tile_rle (XcfInfo *info,
g_message ("xcf: uh oh! xcf rle tile saving error: %d", count); g_message ("xcf: uh oh! xcf rle tile saving error: %d", count);
} }
xcf_write_int8_check_error (info, rlebuf, len); xcf_write_int8_check_error (info, rlebuf, len);
tile_release (tile, FALSE); tile_release (tile, false);
return TRUE; return true;
} }
static bool static bool
@ -1523,7 +1523,7 @@ xcf_save_parasite (XcfInfo *info,
xcf_write_int8_check_error (info, parasite->data, parasite->size); xcf_write_int8_check_error (info, parasite->data, parasite->size);
} }
return TRUE; return true;
} }
typedef struct typedef struct
@ -1556,10 +1556,10 @@ xcf_save_parasite_list (XcfInfo *info,
if (data.error) if (data.error)
{ {
g_propagate_error (error, data.error); g_propagate_error (error, data.error);
return FALSE; return false;
} }
return TRUE; return true;
} }
static bool static bool
@ -1665,7 +1665,7 @@ xcf_save_old_paths (XcfInfo *info,
g_free (points); g_free (points);
} }
return TRUE; return true;
} }
static bool static bool
@ -1818,9 +1818,9 @@ xcf_save_vectors (XcfInfo *info,
xcf_write_float_check_error (info, coords, num_axes); xcf_write_float_check_error (info, coords, num_axes);
} }
g_array_free (control_points, TRUE); g_array_free (control_points, true);
} }
} }
return TRUE; return true;
} }

@ -44,11 +44,11 @@ xcf_seek_pos (XcfInfo *info,
_("Could not seek in XCF file: %s"), _("Could not seek in XCF file: %s"),
g_strerror (errno)); g_strerror (errno));
return FALSE; return false;
} }
} }
return TRUE; return true;
} }
bool bool
@ -61,7 +61,7 @@ xcf_seek_end (XcfInfo *info,
_("Could not seek in XCF file: %s"), _("Could not seek in XCF file: %s"),
g_strerror (errno)); g_strerror (errno));
return FALSE; return false;
} }
info->cp = ftell (info->fp); info->cp = ftell (info->fp);
@ -72,8 +72,8 @@ xcf_seek_end (XcfInfo *info,
_("Could not seek in XCF file: %s"), _("Could not seek in XCF file: %s"),
g_strerror (errno)); g_strerror (errno));
return FALSE; return false;
} }
return TRUE; return true;
} }

@ -670,7 +670,7 @@ TQByteArray& AIElement::asByteArray()
} }
/*! /*!
Returns TRUE if the aielement's type can be cast to the requested Returns true if the aielement's type can be cast to the requested
type, \p t. Such casting is done automatically when calling the type, \p t. Such casting is done automatically when calling the
toInt(), ... or asInt(), ... methods. toInt(), ... or asInt(), ... methods.
@ -686,19 +686,19 @@ TQByteArray& AIElement::asByteArray()
bool AIElement::canCast( Type t ) const bool AIElement::canCast( Type t ) const
{ {
if ( d->typ == t ) if ( d->typ == t )
return TRUE; return true;
if ( t == Int && ( d->typ == String || d->typ == Double || d->typ == UInt || d->typ == Byte) ) if ( t == Int && ( d->typ == String || d->typ == Double || d->typ == UInt || d->typ == Byte) )
return TRUE; return true;
if ( t == UInt && ( d->typ == String || d->typ == Double || d->typ == Int || d->typ == Byte) ) if ( t == UInt && ( d->typ == String || d->typ == Double || d->typ == Int || d->typ == Byte) )
return TRUE; return true;
if ( t == Double && ( d->typ == String || d->typ == Int || d->typ == UInt || d->typ == Byte) ) if ( t == Double && ( d->typ == String || d->typ == Int || d->typ == UInt || d->typ == Byte) )
return TRUE; return true;
if ( t == CString && d->typ == String ) if ( t == CString && d->typ == String )
return TRUE; return true;
if ( t == String && ( d->typ == CString || d->typ == Int || d->typ == UInt || d->typ == Double || d->typ == Byte) ) if ( t == String && ( d->typ == CString || d->typ == Int || d->typ == UInt || d->typ == Double || d->typ == Byte) )
return TRUE; return true;
return FALSE; return false;
} }
/*! /*!
@ -710,8 +710,8 @@ bool AIElement::canCast( Type t ) const
AIElement::String, an empty point array if the requested type \p t is AIElement::String, an empty point array if the requested type \p t is
AIElement::PointArray, etc). AIElement::PointArray, etc).
\returns TRUE if the current type of the \returns true if the current type of the
aielement was successfully casted; otherwise returns FALSE. aielement was successfully casted; otherwise returns false.
\see canCast() \see canCast()
*/ */
@ -756,14 +756,14 @@ bool AIElement::cast( Type t )
return canCast( t ); return canCast( t );
} }
/*! Compares this AIElement with \a v and returns TRUE if they are /*! Compares this AIElement with \a v and returns true if they are
equal; otherwise returns FALSE. equal; otherwise returns false.
*/ */
bool AIElement::operator==( const AIElement &v ) const bool AIElement::operator==( const AIElement &v ) const
{ {
if ( !v.canCast( type() ) ) if ( !v.canCast( type() ) )
return FALSE; return false;
switch( d->typ ) { switch( d->typ ) {
/* case List: /* case List:
return v.toList() == toList(); */ return v.toList() == toList(); */
@ -791,11 +791,11 @@ bool AIElement::operator==( const AIElement &v ) const
case Invalid: case Invalid:
break; break;
} }
return FALSE; return false;
} }
/*! Compares this AIElement with \a v and returns TRUE if they are /*! Compares this AIElement with \a v and returns true if they are
not equal; otherwise returns FALSE. not equal; otherwise returns false.
*/ */
bool AIElement::operator!=( const AIElement &v ) const bool AIElement::operator!=( const AIElement &v ) const

@ -88,12 +88,12 @@ private:
void drawPie( int x, int y, int w, int h, int a, int alen ); void drawPie( int x, int y, int w, int h, int a, int alen );
void drawChord( int x, int y, int w, int h, int a, int alen ); void drawChord( int x, int y, int w, int h, int a, int alen );
void drawPolyline( const TQPointArray &pa ); void drawPolyline( const TQPointArray &pa );
void drawPolygon( const TQPointArray &pa, bool winding=FALSE ); void drawPolygon( const TQPointArray &pa, bool winding=false );
/** /**
* drawPolyPolygon draw the XOR of a list of polygons * drawPolyPolygon draw the XOR of a list of polygons
* listPa : list of polygons * listPa : list of polygons
*/ */
void drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding=FALSE ); void drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding=false );
void drawImage( int x, int y, const TQImage &, int sx = 0, int sy = 0, int sw = -1, int sh = -1 ); void drawImage( int x, int y, const TQImage &, int sx = 0, int sy = 0, int sw = -1, int sh = -1 );
// Text drawing // Text drawing
@ -102,7 +102,7 @@ private:
void drawText( int x, int y, int w, int h, int flags, const TQString &s, double rotation ); void drawText( int x, int y, int w, int h, int flags, const TQString &s, double rotation );
// matrix transformation : only used in some bitmap manipulation // matrix transformation : only used in some bitmap manipulation
void setWorldMatrix( const TQWMatrix &, bool combine=FALSE ); void setWorldMatrix( const TQWMatrix &, bool combine=false );
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Utilities // Utilities

@ -1406,7 +1406,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const TQCString& from, const
TQString tmp = cell->text(); TQString tmp = cell->text();
if ( tmp =="==" ) if ( tmp =="==" )
tmp=replace( "==", "=" ); tmp=replace( "==", "=" );
/* cell->calc( TRUE ); // Incredible, cells are not calculated if the document was just opened text = cell->valueString(); */ /* cell->calc( true ); // Incredible, cells are not calculated if the document was just opened text = cell->valueString(); */
text = tmp; text = tmp;
break; break;
} }

@ -288,7 +288,7 @@ void HTMLExport::convertSheet( Sheet *sheet, TQString &str, int iMaxUsedRow, int
text = cell->text(); // untested text = cell->text(); // untested
break; break;
case Cell::Formula: case Cell::Formula:
cell->calc( TRUE ); // Incredible, cells are not calculated if the document was just opened cell->calc( true ); // Incredible, cells are not calculated if the document was just opened
text = cell->valueString(); text = cell->valueString();
break; break;
} }

@ -53,7 +53,7 @@
* name 'name' and widget flags set to 'f'. * name 'name' and widget flags set to 'f'.
* *
* The dialog will by default be modeless, unless you set 'modal' to * The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog. * true to construct a modal dialog.
*/ */
KSpreadLatexExportDiaImpl::KSpreadLatexExportDiaImpl(KoStore* in, TQWidget* parent, KSpreadLatexExportDiaImpl::KSpreadLatexExportDiaImpl(KoStore* in, TQWidget* parent,
const char* name_, bool modal, WFlags fl ) const char* name_, bool modal, WFlags fl )

@ -42,7 +42,7 @@ class KSpreadLatexExportDiaImpl : public LatexExportDia
public: public:
KSpreadLatexExportDiaImpl( KoStore*, TQWidget* parent = 0, KSpreadLatexExportDiaImpl( KoStore*, TQWidget* parent = 0,
const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); const char* name = 0, bool modal = false, WFlags fl = 0 );
virtual ~KSpreadLatexExportDiaImpl(); virtual ~KSpreadLatexExportDiaImpl();
void setOutputFile(TQString file) { _fileOut = file; } void setOutputFile(TQString file) { _fileOut = file; }

@ -26,7 +26,7 @@
* name 'name' and widget flags set to 'f'. * name 'name' and widget flags set to 'f'.
* *
* The dialog will by default be modeless, unless you set 'modal' to * The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog. * true to construct a modal dialog.
*/ */
LatexExportIface::LatexExportIface(KSpreadLatexExportDiaImpl* dia) LatexExportIface::LatexExportIface(KSpreadLatexExportDiaImpl* dia)
: DCOPObject("FilterConfigDia") : DCOPObject("FilterConfigDia")

@ -342,14 +342,14 @@ void Leader::updateMaxCells(KSpreadSheet *spreadSheet) {
// Maybe we should have something which does that in the KSpreadSheet class, // Maybe we should have something which does that in the KSpreadSheet class,
// it would be easy to keep track of this each time a new Cellis instanciated. // it would be easy to keep track of this each time a new Cellis instanciated.
for (int row = 1; row < maxRow; ++row) { for (int row = 1; row < maxRow; ++row) {
bool usedColumn = FALSE; bool usedColumn = false;
for (int column = 1; column < maxColumn; ++column) { for (int column = 1; column < maxColumn; ++column) {
Cell*cell = spreadSheet->cellAt(column, row); Cell*cell = spreadSheet->cellAt(column, row);
if (!cell->isDefault() && !cell->isEmpty()) { if (!cell->isDefault() && !cell->isEmpty()) {
if (column > m_maxCellColumn) { if (column > m_maxCellColumn) {
m_maxCellColumn = column; m_maxCellColumn = column;
} }
usedColumn = TRUE; usedColumn = true;
} }
} }
if (usedColumn) { if (usedColumn) {

@ -171,7 +171,7 @@ KoFilter::ConversionStatus QpImport::convert( const TQCString& from, const TQCSt
table=ksdoc->map()->addNewSheet(); table=ksdoc->map()->addNewSheet();
// set up a default name for the table // set up a default name for the table
table->setSheetName( lTableNames.name(lPageIdx) table->setSheetName( lTableNames.name(lPageIdx)
, TRUE , true
); );
lTableNames.table(lPageIdx, table); lTableNames.table(lPageIdx, table);
} }
@ -208,7 +208,7 @@ KoFilter::ConversionStatus QpImport::convert( const TQCString& from, const TQCSt
// set up a default name for the table // set up a default name for the table
lNewTable->setSheetName( lTableNames.name(lIdx) lNewTable->setSheetName( lTableNames.name(lIdx)
, TRUE , true
); );
lTableNames.table(lIdx, lNewTable); lTableNames.table(lIdx, lNewTable);
} }
@ -236,7 +236,7 @@ KoFilter::ConversionStatus QpImport::convert( const TQCString& from, const TQCSt
if( lTableNames.allocated(lPageIdx) && lTableNames.table(lPageIdx) ) if( lTableNames.allocated(lPageIdx) && lTableNames.table(lPageIdx) )
{ {
lTableNames.table(lPageIdx)->setSheetName( lRecPageName->pageName() lTableNames.table(lPageIdx)->setSheetName( lRecPageName->pageName()
// , TRUE // , true
); );
lTableNames.name(lPageIdx, lRecPageName->pageName()); lTableNames.name(lPageIdx, lRecPageName->pageName());
} }

@ -63,18 +63,18 @@ bool AmiProWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*
{ {
filename = filenameOut; filename = filenameOut;
return TRUE; return true;
} }
bool AmiProWorker::doCloseFile(void) bool AmiProWorker::doCloseFile(void)
{ {
TQFile out( filename ); TQFile out( filename );
if( !out.open( IO_WriteOnly ) ) if( !out.open( IO_WriteOnly ) )
return FALSE; return false;
TQTextStream stream; TQTextStream stream;
stream.setDevice( &out ); stream.setDevice( &out );
stream << result; stream << result;
return TRUE; return true;
} }
bool AmiProWorker::doOpenDocument(void) bool AmiProWorker::doOpenDocument(void)
@ -98,15 +98,15 @@ bool AmiProWorker::doOpenDocument(void)
result += "[edoc]\n"; result += "[edoc]\n";
m_bold = m_italic = m_underline = m_underlineDouble = m_bold = m_italic = m_underline = m_underlineDouble =
m_strike = m_subscript = m_superscript = FALSE; m_strike = m_subscript = m_superscript = false;
return TRUE; return true;
} }
bool AmiProWorker::doCloseDocument(void) bool AmiProWorker::doCloseDocument(void)
{ {
result += ">\n\n"; result += ">\n\n";
return TRUE; return true;
} }
static TQString AmiProEscape( const TQString& text ) static TQString AmiProEscape( const TQString& text )
@ -172,7 +172,7 @@ bool AmiProWorker::doFullParagraph(const TQString& paraText,
result += amiproText + "\n\n"; result += amiproText + "\n\n";
return TRUE; return true;
} }
AmiProExport::AmiProExport( KoFilter *, const char *, const TQStringList& ): AmiProExport::AmiProExport( KoFilter *, const char *, const TQStringList& ):

@ -579,7 +579,7 @@ AmiProFormat::AmiProFormat()
pos = len = 0; pos = len = 0;
bold = italic = underline = bold = italic = underline =
word_underline = double_underline = word_underline = double_underline =
subscript = superscript = strikethrough = FALSE; subscript = superscript = strikethrough = false;
fontFamily = ""; fontFamily = "";
fontSize = 12; fontSize = 12;
fontColor = TQt::black; fontColor = TQt::black;
@ -637,7 +637,7 @@ AmiProLayout::AmiProLayout()
fontColor = TQt::black; fontColor = TQt::black;
bold = italic = underline = bold = italic = underline =
word_underline = double_underline = word_underline = double_underline =
subscript = superscript = strikethrough = FALSE; subscript = superscript = strikethrough = false;
align = TQt::AlignLeft; align = TQt::AlignLeft;
linespace = AmiPro::LS_Single; linespace = AmiPro::LS_Single;
spaceBefore = spaceAfter = 0; spaceBefore = spaceAfter = 0;
@ -702,7 +702,7 @@ AmiProStyle::AmiProStyle()
fontColor = TQt::black; fontColor = TQt::black;
bold = italic = underline = bold = italic = underline =
word_underline = double_underline = word_underline = double_underline =
subscript = superscript = strikethrough = FALSE; subscript = superscript = strikethrough = false;
linespace = AmiPro::LS_Single; linespace = AmiPro::LS_Single;
spaceBefore = spaceAfter = 0; spaceBefore = spaceAfter = 0;
} }

@ -54,7 +54,7 @@
* name 'name' and widget flags set to 'f'. * name 'name' and widget flags set to 'f'.
* *
* The dialog will by default be modeless, unless you set 'modal' to * The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog. * true to construct a modal dialog.
*/ */
KWordLatexExportDia::KWordLatexExportDia(KoStore* in, TQWidget* parent, KWordLatexExportDia::KWordLatexExportDia(KoStore* in, TQWidget* parent,
const char* name_, bool modal, WFlags fl ) const char* name_, bool modal, WFlags fl )

@ -26,7 +26,7 @@
* name 'name' and widget flags set to 'f'. * name 'name' and widget flags set to 'f'.
* *
* The dialog will by default be modeless, unless you set 'modal' to * The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog. * true to construct a modal dialog.
*/ */
LatexExportIface::LatexExportIface(KWordLatexExportDia* dia) LatexExportIface::LatexExportIface(KWordLatexExportDia* dia)
: DCOPObject("FilterConfigDia") : DCOPObject("FilterConfigDia")

@ -515,7 +515,7 @@ TQString KWordTextHandler::getFont(unsigned fc) const
for (i = 0; i < ENTRIES; i++) for (i = 0; i < ENTRIES; i++)
{ {
// The loop will leave unchanged any MS font name not fuzzy-matched. // The loop will leave unchanged any MS font name not fuzzy-matched.
if (font.find(fuzzyLookup[i][0], 0, FALSE) != -1) if (font.find(fuzzyLookup[i][0], 0, false) != -1)
{ {
font = fuzzyLookup[i][1]; font = fuzzyLookup[i][1];
break; break;

@ -45,7 +45,7 @@ PalmDB::PalmDB()
setCreator( TQString() ); setCreator( TQString() );
// crash if autodelete ? // crash if autodelete ?
records.setAutoDelete( TRUE ); records.setAutoDelete( true );
} }
PalmDB::~PalmDB() PalmDB::~PalmDB()
@ -58,13 +58,13 @@ bool PalmDB::load( const char* filename )
// open input file // open input file
TQFile in (filename); TQFile in (filename);
if (!in.open (IO_ReadOnly)) if (!in.open (IO_ReadOnly))
return FALSE; return false;
TQDataStream stream; TQDataStream stream;
stream.setDevice (&in); stream.setDevice (&in);
unsigned filesize = stream.device()->size(); unsigned filesize = stream.device()->size();
if( filesize < 72 ) return FALSE; if( filesize < 72 ) return false;
// always big-endian // always big-endian
stream.setByteOrder (TQDataStream::BigEndian); stream.setByteOrder (TQDataStream::BigEndian);
@ -194,7 +194,7 @@ bool PalmDB::load( const char* filename )
// close input file // close input file
in.close(); in.close();
return TRUE; return true;
} }
bool PalmDB::save( const char* filename ) bool PalmDB::save( const char* filename )
@ -202,7 +202,7 @@ bool PalmDB::save( const char* filename )
// open output file // open output file
TQFile out( filename ); TQFile out( filename );
if( !out.open( IO_WriteOnly ) ) if( !out.open( IO_WriteOnly ) )
return FALSE; return false;
TQDataStream stream; TQDataStream stream;
stream.setDevice( &out ); stream.setDevice( &out );
@ -321,7 +321,7 @@ bool PalmDB::save( const char* filename )
// close output file // close output file
out.close(); out.close();
return TRUE; return true;
} }
void PalmDB::setType( const TQString& t ) void PalmDB::setType( const TQString& t )

@ -42,14 +42,14 @@ bool PalmDoc::load( const char* filename )
if( !ok ) if( !ok )
{ {
m_result = PalmDoc::ReadError; m_result = PalmDoc::ReadError;
return FALSE; return false;
} }
if( type() != "TEXt" ) if( type() != "TEXt" )
{ {
tqDebug( "Type is \"%s\", not \"TEXt\", so this is not Palm DOC!", type().latin1() ); tqDebug( "Type is \"%s\", not \"TEXt\", so this is not Palm DOC!", type().latin1() );
m_result = PalmDoc::InvalidFormat; m_result = PalmDoc::InvalidFormat;
return FALSE; return false;
} }
if( creator() != "REAd" ) if( creator() != "REAd" )
@ -57,7 +57,7 @@ bool PalmDoc::load( const char* filename )
tqDebug( "Creator is \"%s\", not \"REAd\", so this is not Palm DOC!", tqDebug( "Creator is \"%s\", not \"REAd\", so this is not Palm DOC!",
creator().latin1() ); creator().latin1() );
m_result = PalmDoc::InvalidFormat; m_result = PalmDoc::InvalidFormat;
return FALSE; return false;
} }
// must have at least two records // must have at least two records
@ -65,7 +65,7 @@ bool PalmDoc::load( const char* filename )
{ {
tqDebug( "Palm DOC has at least 2 records!" ); tqDebug( "Palm DOC has at least 2 records!" );
m_result = PalmDoc::InvalidFormat; m_result = PalmDoc::InvalidFormat;
return FALSE; return false;
} }
// the very first record is DOC header // the very first record is DOC header
@ -82,7 +82,7 @@ bool PalmDoc::load( const char* filename )
{ {
tqDebug( "Unknown format of document!" ); tqDebug( "Unknown format of document!" );
m_result = PalmDoc::InvalidFormat; m_result = PalmDoc::InvalidFormat;
return FALSE; return false;
} }
// initialize // initialize
@ -110,7 +110,7 @@ bool PalmDoc::load( const char* filename )
// done // done
m_result = OK; m_result = OK;
return TRUE; return true;
} }
bool PalmDoc::save( const char* filename ) bool PalmDoc::save( const char* filename )
@ -165,12 +165,12 @@ bool PalmDoc::save( const char* filename )
if( !ok ) if( !ok )
{ {
m_result = WriteError; m_result = WriteError;
return FALSE; return false;
} }
// done // done
m_result = OK; m_result = OK;
return TRUE; return true;
} }
// TODO describe in brief about compression algorithm // TODO describe in brief about compression algorithm

@ -64,7 +64,7 @@ private:
bool PalmDocWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) bool PalmDocWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/)
{ {
outfile = filenameOut; outfile = filenameOut;
return TRUE; return true;
} }
bool PalmDocWorker::doCloseFile(void) bool PalmDocWorker::doCloseFile(void)
@ -80,24 +80,24 @@ bool PalmDocWorker::doCloseFile(void)
doc.setText( text ); doc.setText( text );
doc.save( outfile.latin1() ); doc.save( outfile.latin1() );
return TRUE; return true;
} }
bool PalmDocWorker::doOpenDocument(void) bool PalmDocWorker::doOpenDocument(void)
{ {
text = TQString(); text = TQString();
return TRUE; return true;
} }
bool PalmDocWorker::doCloseDocument(void) bool PalmDocWorker::doCloseDocument(void)
{ {
return TRUE; return true;
} }
bool PalmDocWorker::doFullDocumentInfo( const KWEFDocumentInfo& docInfo ) bool PalmDocWorker::doFullDocumentInfo( const KWEFDocumentInfo& docInfo )
{ {
title = docInfo.title; title = docInfo.title;
return TRUE; return true;
} }
bool PalmDocWorker::doFullParagraph(const TQString& paraText, bool PalmDocWorker::doFullParagraph(const TQString& paraText,
@ -107,7 +107,7 @@ bool PalmDocWorker::doFullParagraph(const TQString& paraText,
text.append( paraText ); text.append( paraText );
text.append( "\n\n" ); text.append( "\n\n" );
return TRUE; return true;
} }
PalmDocExport::PalmDocExport( KoFilter *, const char *, const TQStringList& ): PalmDocExport::PalmDocExport( KoFilter *, const char *, const TQStringList& ):

@ -156,7 +156,7 @@ TQString PalmDocImport::processPlainDocument( TQString plaindoc )
TQString prolog, content, epilog; TQString prolog, content, epilog;
TQStringList paragraphs; TQStringList paragraphs;
paragraphs = TQStringList::split( "\n\n", plaindoc, TRUE ); paragraphs = TQStringList::split( "\n\n", plaindoc, true );
for( unsigned int i = 0; i < paragraphs.count(); i++ ) for( unsigned int i = 0; i < paragraphs.count(); i++ )
{ {
TQString text = paragraphs[i]; TQString text = paragraphs[i];

@ -62,18 +62,18 @@ class WMLWorker : public KWEFBaseWorker
bool WMLWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) bool WMLWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/)
{ {
filename = filenameOut; filename = filenameOut;
return TRUE; return true;
} }
bool WMLWorker::doCloseFile(void) bool WMLWorker::doCloseFile(void)
{ {
TQFile out( filename ); TQFile out( filename );
if( !out.open( IO_WriteOnly ) ) if( !out.open( IO_WriteOnly ) )
return FALSE; return false;
TQTextStream stream; TQTextStream stream;
stream.setDevice( &out ); stream.setDevice( &out );
stream << result; stream << result;
return TRUE; return true;
} }
bool WMLWorker::doOpenDocument(void) bool WMLWorker::doOpenDocument(void)
@ -84,16 +84,16 @@ bool WMLWorker::doOpenDocument(void)
result += "<wml>\n"; result += "<wml>\n";
result += "<card>\n"; result += "<card>\n";
m_bold = m_italic = m_underline = FALSE; m_bold = m_italic = m_underline = false;
return TRUE; return true;
} }
bool WMLWorker::doCloseDocument(void) bool WMLWorker::doCloseDocument(void)
{ {
result += "</card>\n"; result += "</card>\n";
result += "</wml>"; result += "</wml>";
return TRUE; return true;
} }
bool WMLWorker::doFullParagraph(const TQString& paraText, bool WMLWorker::doFullParagraph(const TQString& paraText,
@ -114,7 +114,7 @@ bool WMLWorker::doFullParagraph(const TQString& paraText,
partialText = text.mid( formatData.pos, formatData.len ); partialText = text.mid( formatData.pos, formatData.len );
// escape the text // escape the text
partialText = KWEFUtil::EscapeSgmlText( NULL, partialText, TRUE, TRUE ); partialText = KWEFUtil::EscapeSgmlText( NULL, partialText, true, true );
// apply formatting // apply formatting
m_bold = formatData.text.weight >= 75; m_bold = formatData.text.weight >= 75;
@ -137,7 +137,7 @@ bool WMLWorker::doFullParagraph(const TQString& paraText,
result += "<p align=\"" + align + "\">" + wmlText + "</p>\n"; result += "<p align=\"" + align + "\">" + wmlText + "</p>\n";
return TRUE; return true;
} }
WMLExport::WMLExport( KoFilter *, const char *, const TQStringList& ): WMLExport::WMLExport( KoFilter *, const char *, const TQStringList& ):

@ -150,7 +150,7 @@ bool WMLConverter::doOpenCard( TQString id, TQString title )
if( m_title.isEmpty() ) if( m_title.isEmpty() )
m_title = ( !title.isEmpty() ) ? title : id; m_title = ( !title.isEmpty() ) ? title : id;
return TRUE; return true;
} }
// FIXME is this right ? // FIXME is this right ?
@ -186,7 +186,7 @@ bool WMLConverter::doParagraph( TQString atext, WMLFormatList formatList,
root.append( WMLLayoutAsXML( layout) ); root.append( WMLLayoutAsXML( layout) );
root.append( "</PARAGRAPH>\n" ); root.append( "</PARAGRAPH>\n" );
return TRUE; return true;
} }
void WMLConverter::parse( const char* filename ) void WMLConverter::parse( const char* filename )

@ -125,7 +125,7 @@ bool WMLHandler::startElement( const TQString&, const TQString&,
if( tag == "p" ) if( tag == "p" )
{ {
m_state.currentLayout = WMLLayout(); m_state.currentLayout = WMLLayout();
m_inBlock = TRUE; m_inBlock = true;
if( m_state.currentFormat.bold || if( m_state.currentFormat.bold ||
m_state.currentFormat.italic || m_state.currentFormat.italic ||
m_state.currentFormat.underline || m_state.currentFormat.underline ||
@ -138,31 +138,31 @@ bool WMLHandler::startElement( const TQString&, const TQString&,
if( align == "center" ) if( align == "center" )
m_state.currentLayout.align = WMLLayout::Center; m_state.currentLayout.align = WMLLayout::Center;
return TRUE; return true;
} }
if(( tag == "b" ) || (tag == "strong") ) if(( tag == "b" ) || (tag == "strong") )
{ {
m_state.currentFormat.bold = TRUE; m_state.currentFormat.bold = true;
m_state.currentFormat.pos = m_text.length(); m_state.currentFormat.pos = m_text.length();
m_state.formatList.append( m_state.currentFormat ); m_state.formatList.append( m_state.currentFormat );
return TRUE; return true;
} }
if(( tag == "i" ) || (tag == "em") ) if(( tag == "i" ) || (tag == "em") )
{ {
m_state.currentFormat.italic = TRUE; m_state.currentFormat.italic = true;
m_state.currentFormat.pos = m_text.length(); m_state.currentFormat.pos = m_text.length();
m_state.formatList.append( m_state.currentFormat ); m_state.formatList.append( m_state.currentFormat );
return TRUE; return true;
} }
if( tag == "u" ) if( tag == "u" )
{ {
m_state.currentFormat.underline = TRUE; m_state.currentFormat.underline = true;
m_state.currentFormat.pos = m_text.length(); m_state.currentFormat.pos = m_text.length();
m_state.formatList.append( m_state.currentFormat ); m_state.formatList.append( m_state.currentFormat );
return TRUE; return true;
} }
if( tag == "big" ) if( tag == "big" )
@ -170,7 +170,7 @@ bool WMLHandler::startElement( const TQString&, const TQString&,
m_state.currentFormat.fontsize = WMLFormat::Big; m_state.currentFormat.fontsize = WMLFormat::Big;
m_state.currentFormat.pos = m_text.length(); m_state.currentFormat.pos = m_text.length();
m_state.formatList.append( m_state.currentFormat ); m_state.formatList.append( m_state.currentFormat );
return TRUE; return true;
} }
if( tag == "small" ) if( tag == "small" )
@ -178,7 +178,7 @@ bool WMLHandler::startElement( const TQString&, const TQString&,
m_state.currentFormat.fontsize = WMLFormat::Small; m_state.currentFormat.fontsize = WMLFormat::Small;
m_state.currentFormat.pos = m_text.length(); m_state.currentFormat.pos = m_text.length();
m_state.formatList.append( m_state.currentFormat ); m_state.formatList.append( m_state.currentFormat );
return TRUE; return true;
} }
if( tag == "a" ) if( tag == "a" )
@ -208,7 +208,7 @@ bool WMLHandler::startElement( const TQString&, const TQString&,
if( tag == "tr" ) if( tag == "tr" )
{ {
m_state.tableRow++; m_state.tableRow++;
return TRUE; return true;
} }
// open table cell, keep in sync with <p> above // open table cell, keep in sync with <p> above
@ -216,13 +216,13 @@ bool WMLHandler::startElement( const TQString&, const TQString&,
{ {
m_state.tableCol++; m_state.tableCol++;
m_state.currentLayout = WMLLayout(); m_state.currentLayout = WMLLayout();
m_inBlock = TRUE; m_inBlock = true;
m_state.formatList.append( m_state.currentFormat ); m_state.formatList.append( m_state.currentFormat );
return m_parser->doTableCell( m_state.tableRow, m_state.tableCol ); return m_parser->doTableCell( m_state.tableRow, m_state.tableCol );
} }
// unhandled element // unhandled element
return TRUE; return true;
} }
bool WMLHandler::endElement( const TQString&, const TQString&, bool WMLHandler::endElement( const TQString&, const TQString&,
@ -236,7 +236,7 @@ bool WMLHandler::endElement( const TQString&, const TQString&,
if( tag == "card" ) if( tag == "card" )
{ {
// forget </p> before </card> ? // forget </p> before </card> ?
m_inBlock = FALSE; m_inBlock = false;
if( !m_text.isEmpty() ) if( !m_text.isEmpty() )
flushParagraph(); flushParagraph();
return m_parser->doCloseCard(); return m_parser->doCloseCard();
@ -244,32 +244,32 @@ bool WMLHandler::endElement( const TQString&, const TQString&,
if( tag == "p" ) if( tag == "p" )
{ {
m_inBlock = FALSE; m_inBlock = false;
return flushParagraph(); return flushParagraph();
} }
if(( tag == "b" ) || (tag == "strong") ) if(( tag == "b" ) || (tag == "strong") )
{ {
m_state.currentFormat.bold = FALSE; m_state.currentFormat.bold = false;
m_state.currentFormat.pos = m_text.length(); m_state.currentFormat.pos = m_text.length();
m_state.formatList.append( m_state.currentFormat ); m_state.formatList.append( m_state.currentFormat );
return TRUE; return true;
} }
if(( tag == "i" ) || (tag == "em") ) if(( tag == "i" ) || (tag == "em") )
{ {
m_state.currentFormat.italic = FALSE; m_state.currentFormat.italic = false;
m_state.currentFormat.pos = m_text.length(); m_state.currentFormat.pos = m_text.length();
m_state.formatList.append( m_state.currentFormat ); m_state.formatList.append( m_state.currentFormat );
return TRUE; return true;
} }
if( tag == "u" ) if( tag == "u" )
{ {
m_state.currentFormat.underline = FALSE; m_state.currentFormat.underline = false;
m_state.currentFormat.pos = m_text.length(); m_state.currentFormat.pos = m_text.length();
m_state.formatList.append( m_state.currentFormat ); m_state.formatList.append( m_state.currentFormat );
return TRUE; return true;
} }
if( tag == "big" ) if( tag == "big" )
@ -277,7 +277,7 @@ bool WMLHandler::endElement( const TQString&, const TQString&,
m_state.currentFormat.fontsize = WMLFormat::Normal; m_state.currentFormat.fontsize = WMLFormat::Normal;
m_state.currentFormat.pos = m_text.length(); m_state.currentFormat.pos = m_text.length();
m_state.formatList.append( m_state.currentFormat ); m_state.formatList.append( m_state.currentFormat );
return TRUE; return true;
} }
if( tag == "small" ) if( tag == "small" )
@ -285,7 +285,7 @@ bool WMLHandler::endElement( const TQString&, const TQString&,
m_state.currentFormat.fontsize = WMLFormat::Normal; m_state.currentFormat.fontsize = WMLFormat::Normal;
m_state.currentFormat.pos = m_text.length(); m_state.currentFormat.pos = m_text.length();
m_state.formatList.append( m_state.currentFormat ); m_state.formatList.append( m_state.currentFormat );
return TRUE; return true;
} }
if( tag == "a" ) if( tag == "a" )
@ -305,17 +305,17 @@ bool WMLHandler::endElement( const TQString&, const TQString&,
// close table row // close table row
if( tag == "tr" ) if( tag == "tr" )
return TRUE; //skip return true; //skip
// close table cell, like </p> // close table cell, like </p>
if( tag == "td" ) if( tag == "td" )
{ {
m_inBlock = FALSE; m_inBlock = false;
return flushParagraph(); return flushParagraph();
} }
// unhandled // unhandled
return TRUE; return true;
} }
bool WMLHandler::characters( const TQString& ch ) bool WMLHandler::characters( const TQString& ch )
@ -326,7 +326,7 @@ bool WMLHandler::characters( const TQString& ch )
if( m_inLink ) if( m_inLink )
m_state.currentFormat.link.append( ch ); m_state.currentFormat.link.append( ch );
return TRUE; return true;
} }
bool WMLHandler::flushParagraph() bool WMLHandler::flushParagraph()
@ -375,7 +375,7 @@ WMLFormat::WMLFormat()
{ {
pos = len = 0; pos = len = 0;
fontsize = Normal; fontsize = Normal;
bold = italic = underline = FALSE; bold = italic = underline = false;
link = ""; link = "";
href = ""; href = "";
} }
@ -438,40 +438,40 @@ void WMLParser::parse( const char* filename )
bool WMLParser::doOpenDocument() bool WMLParser::doOpenDocument()
{ {
return TRUE; return true;
} }
bool WMLParser::doCloseDocument() bool WMLParser::doCloseDocument()
{ {
return TRUE; return true;
} }
bool WMLParser::doOpenCard( TQString, TQString ) bool WMLParser::doOpenCard( TQString, TQString )
{ {
return TRUE; return true;
} }
bool WMLParser::doCloseCard() bool WMLParser::doCloseCard()
{ {
return TRUE; return true;
} }
bool WMLParser::doParagraph( TQString, WMLFormatList, WMLLayout ) bool WMLParser::doParagraph( TQString, WMLFormatList, WMLLayout )
{ {
return TRUE; return true;
} }
bool WMLParser::doBeginTable() bool WMLParser::doBeginTable()
{ {
return TRUE; return true;
} }
bool WMLParser::doEndTable() bool WMLParser::doEndTable()
{ {
return TRUE; return true;
} }
bool WMLParser::doTableCell( unsigned, unsigned ) bool WMLParser::doTableCell( unsigned, unsigned )
{ {
return TRUE; return true;
} }

@ -52,9 +52,9 @@ class KWordFormat
KWordFormat::KWordFormat() KWordFormat::KWordFormat()
{ {
bold = italic = underline = doubleunderline = FALSE; bold = italic = underline = doubleunderline = false;
striked = superscript = subscript = redline = FALSE; striked = superscript = subscript = redline = false;
color = highlight = FALSE; color = highlight = false;
red = green = blue = 0; red = green = blue = 0;
bgred = bggreen = bgblue = 255; bgred = bggreen = bgblue = 255;
fontsize = 0.0; fontsize = 0.0;
@ -122,7 +122,7 @@ KWordFilter::parse (const TQString & filename)
int frameLeftMargin = 36, frameRightMargin = 36; // quick hack int frameLeftMargin = 36, frameRightMargin = 36; // quick hack
if (!Parser::parse (filename)) if (!Parser::parse (filename))
return FALSE; return false;
// this will force very last text and formatting to be flushed as well // this will force very last text and formatting to be flushed as well
tokens.append( new Token( Token::HardReturn ) ); tokens.append( new Token( Token::HardReturn ) );
@ -418,5 +418,5 @@ KWordFilter::parse (const TQString & filename)
documentInfo += "</document-info>"; documentInfo += "</document-info>";
return TRUE; return true;
} }

@ -91,8 +91,8 @@ mapToAlign (int data)
Parser::Parser () Parser::Parser ()
{ {
tokens.setAutoDelete( TRUE ); tokens.setAutoDelete( true );
packets.setAutoDelete( TRUE ); packets.setAutoDelete( true );
} }
bool bool
@ -107,7 +107,7 @@ Parser::parse (const TQString & filename)
TQDataStream stream; TQDataStream stream;
TQFile in (filename); TQFile in (filename);
if (!in.open (IO_ReadOnly)) if (!in.open (IO_ReadOnly))
return FALSE; return false;
stream.setDevice (&in); stream.setDevice (&in);
// must be little-endian // must be little-endian
@ -121,19 +121,19 @@ Parser::parse (const TQString & filename)
// check first 4 bytes, must be (in hex): 0xFF, 0x57, 0x50, 0x43 // check first 4 bytes, must be (in hex): 0xFF, 0x57, 0x50, 0x43
if ((header[0] != 0xFF) || (header[1] != 0x57) || if ((header[0] != 0xFF) || (header[1] != 0x57) ||
(header[2] != 0x50) || (header[3] != 0x43)) (header[2] != 0x50) || (header[3] != 0x43))
return FALSE; return false;
// get document start // get document start
unsigned m_docstart = header[4] + (header[5] << 8) + unsigned m_docstart = header[4] + (header[5] << 8) +
(header[6] << 16) + (header[7] << 24); (header[6] << 16) + (header[7] << 24);
if (m_docstart > stream.device ()->size ()) if (m_docstart > stream.device ()->size ())
return FALSE; return false;
// check document type // check document type
unsigned product_type = header[8]; unsigned product_type = header[8];
unsigned file_type = header[9]; unsigned file_type = header[9];
if ((product_type != 1) || (file_type != 10)) if ((product_type != 1) || (file_type != 10))
return FALSE; return false;
// check document format version: for WP 5.x or WP 6/7/8 // check document format version: for WP 5.x or WP 6/7/8
// major 0 means WP 5.x, otherwise WP 6/7/8 // major 0 means WP 5.x, otherwise WP 6/7/8
@ -143,11 +143,11 @@ Parser::parse (const TQString & filename)
// do not accept other than 0 (WP 5.x) and 2 (WP 6/7/8) // do not accept other than 0 (WP 5.x) and 2 (WP 6/7/8)
if ( (major_version != 0) && (major_version != 2) ) if ( (major_version != 0) && (major_version != 2) )
return FALSE; return false;
// check if this is encrypted // check if this is encrypted
unsigned encrypt_hash = header[12] + (header[13] << 8); unsigned encrypt_hash = header[12] + (header[13] << 8);
if ( encrypt_hash ) return FALSE; if ( encrypt_hash ) return false;
in.close (); in.close ();
@ -159,7 +159,7 @@ Parser::parse (const TQString & filename)
if ( major_version == 0 ) parseDocWP5 ( filename, m_docstart ); if ( major_version == 0 ) parseDocWP5 ( filename, m_docstart );
else parseDocWP6 ( filename, m_docstart ); else parseDocWP6 ( filename, m_docstart );
return TRUE; return true;
} }
void void

@ -170,7 +170,7 @@ namespace WP
/** /**
* Parses given filename. * Parses given filename.
* @returns TRUE if parsing was successful, otherwise FALSE. * @returns true if parsing was successful, otherwise false.
* *
*/ */
bool parse (const TQString & filename); bool parse (const TQString & filename);

@ -46,7 +46,7 @@
* name 'name' and widget flags set to 'f'. * name 'name' and widget flags set to 'f'.
* *
* The dialog will by default be modeless, unless you set 'modal' to * The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog. * true to construct a modal dialog.
*/ */
XSLTExportDia::XSLTExportDia(KoStoreDevice* in, const TQCString &format, TQWidget* parent, const char* name_, bool modal, WFlags fl ) XSLTExportDia::XSLTExportDia(KoStoreDevice* in, const TQCString &format, TQWidget* parent, const char* name_, bool modal, WFlags fl )
: XSLTDialog( parent, name_, modal, fl ) : XSLTDialog( parent, name_, modal, fl )

@ -47,7 +47,7 @@ class XSLTExportDia : public XSLTDialog
TQStringList _namesList; TQStringList _namesList;
public: public:
XSLTExportDia( KoStoreDevice*, const TQCString &format, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); XSLTExportDia( KoStoreDevice*, const TQCString &format, TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~XSLTExportDia(); ~XSLTExportDia();
void setOutputFile(TQString file) { _fileOut = file; } void setOutputFile(TQString file) { _fileOut = file; }

@ -43,7 +43,7 @@
* name 'name' and widget flags set to 'f'. * name 'name' and widget flags set to 'f'.
* *
* The dialog will by default be modeless, unless you set 'modal' to * The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog. * true to construct a modal dialog.
*/ */
XSLTImportDia::XSLTImportDia(KoStore* out, const TQCString &format, TQWidget* parent, const char* name_, bool modal, WFlags fl ) XSLTImportDia::XSLTImportDia(KoStore* out, const TQCString &format, TQWidget* parent, const char* name_, bool modal, WFlags fl )
: XSLTDialog( parent, name_, modal, fl ) : XSLTDialog( parent, name_, modal, fl )

@ -47,7 +47,7 @@ class XSLTImportDia : public XSLTDialog
TQStringList _namesList; TQStringList _namesList;
public: public:
XSLTImportDia(KoStore*, const TQCString &format, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); XSLTImportDia(KoStore*, const TQCString &format, TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~XSLTImportDia(); ~XSLTImportDia();
void setInputFile(TQString file) { _fileIn = file; } void setInputFile(TQString file) { _fileIn = file; }

@ -153,7 +153,7 @@ VTQPainter::fillPath()
{ {
// we probably dont need filling for qpainter // we probably dont need filling for qpainter
//m_index = 0; //m_index = 0;
m_painter->drawPolygon( m_pa, FALSE, 0, m_index ); m_painter->drawPolygon( m_pa, false, 0, m_index );
} }
void void

@ -142,7 +142,7 @@ bool VColorSlider::eventFilter( TQObject *obj, TQEvent *ev )
else if( ev->type() == TQEvent::MouseButtonRelease ) else if( ev->type() == TQEvent::MouseButtonRelease )
m_isDragging = false; m_isDragging = false;
} }
return FALSE; return false;
} }
#include "vcolorslider.moc" #include "vcolorslider.moc"

@ -31,7 +31,7 @@ namespace KChart
{ {
KChartPageLayout::KChartPageLayout( KChartParams* _params, TQWidget* parent, const char* name ) KChartPageLayout::KChartPageLayout( KChartParams* _params, TQWidget* parent, const char* name )
: KDialogBase( parent, name, TRUE,i18n("Page Layout"),KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::User1 | KDialogBase::Apply , KDialogBase::Ok,true ) : KDialogBase( parent, name, true,i18n("Page Layout"),KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::User1 | KDialogBase::Apply , KDialogBase::Ok,true )
{ {
params=_params; params=_params;
#if 0 #if 0

@ -53,7 +53,7 @@ KChartPieConfigPage::KChartPieConfigPage( KChartParams* params,
list->resize( list->sizeHint() ); list->resize( list->sizeHint() );
grid->addMultiCellWidget(list,0,9,0,0); grid->addMultiCellWidget(list,0,9,0,0);
list->addColumn( i18n("Hide Piece") ); list->addColumn( i18n("Hide Piece") );
list->setRootIsDecorated( TRUE ); list->setRootIsDecorated( true );
TQLabel* label = new TQLabel( i18n( "Column active:" ), this ); TQLabel* label = new TQLabel( i18n( "Column active:" ), this );
label->resize( label->sizeHint() ); label->resize( label->sizeHint() );

@ -35,7 +35,7 @@ KChartWizard::KChartWizard ( KChartPart* _chart, TQWidget *parent, const char* n
// Second page: select the major chart type // Second page: select the major chart type
m_chartTypePage = new KChartWizardSelectChartTypePage( this, m_chart ); m_chartTypePage = new KChartWizardSelectChartTypePage( this, m_chart );
addPage( m_chartTypePage, i18n( "Select Chart Type" ) ); addPage( m_chartTypePage, i18n( "Select Chart Type" ) );
//finishButton()->setEnabled( TRUE ); //finishButton()->setEnabled( true );
setFinishEnabled(m_chartTypePage, true); setFinishEnabled(m_chartTypePage, true);
setHelpEnabled(m_chartTypePage, false); setHelpEnabled(m_chartTypePage, false);

@ -596,7 +596,7 @@ void KChartPart::analyzeHeaders( const KDChartTableData& data )
// label text => prevents crash. // label text => prevents crash.
#if 1 #if 1
if ( data.cols() == 1 ) if ( data.cols() == 1 )
isStringFirstRow = FALSE; isStringFirstRow = false;
#endif #endif
bool hasColHeader = false; bool hasColHeader = false;

@ -260,7 +260,7 @@ void KDChart::paint( TQPainter* painter,
const TQRect* rect, const TQRect* rect,
bool mustCalculateGeometry ) bool mustCalculateGeometry )
{ {
//tqDebug("KDChart::paint() mustCalculateGeometry: "+TQString(mustCalculateGeometry?"TRUE":"FALSE") ); //tqDebug("KDChart::paint() mustCalculateGeometry: "+TQString(mustCalculateGeometry?"true":"false") );
#if defined KDAB_EVAL #if defined KDAB_EVAL
EvalDialog::checkEvalLicense( "KD Chart" ); EvalDialog::checkEvalLicense( "KD Chart" );
#endif #endif
@ -346,7 +346,7 @@ void KDChart::paint( TQPainter* painter,
like the paint() method described above but additionally like the paint() method described above but additionally
it takes care for the output mode flag: Before painting is it takes care for the output mode flag: Before painting is
started the internal optimizeOutputForScreen flag is set started the internal optimizeOutputForScreen flag is set
to FALSE and after painting is done it is restored to to false and after painting is done it is restored to
it's previous value. it's previous value.
\sa paint \sa paint

@ -692,7 +692,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter,
if(!iAxis){ if(!iAxis){
tqDebug("nTxtHeight: "+TQString::number(cv.nTxtHeight)+" nRotation: "+TQString::number(nRotation)+ tqDebug("nTxtHeight: "+TQString::number(cv.nTxtHeight)+" nRotation: "+TQString::number(nRotation)+
" matching: "+TQString(textsMatching ? "TRUE":"FALSE")); " matching: "+TQString(textsMatching ? "true":"false"));
tqDebug("nUsableAxisHeight: %f, unitedRegions.boundingRect().height(): %i ", tqDebug("nUsableAxisHeight: %f, unitedRegions.boundingRect().height(): %i ",
nUsableAxisHeight, unitedRegions.boundingRect().height()); nUsableAxisHeight, unitedRegions.boundingRect().height());
} }
@ -704,7 +704,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter,
} }
} else { } else {
if( nUsableAxisWidth < unitedRegions.boundingRect().width() ){ if( nUsableAxisWidth < unitedRegions.boundingRect().width() ){
//tqDebug("textsMatching: %s",textsMatching ? "TRUE" : "FALSE"); //tqDebug("textsMatching: %s",textsMatching ? "true" : "false");
textsMatching = false; textsMatching = false;
textsDontFitIntoArea = true; textsDontFitIntoArea = true;
//tqDebug("too wide"); //tqDebug("too wide");
@ -2022,7 +2022,7 @@ void KDChartAxesPainter::calculateLabelTexts(
pYDelimDeltaFaktor = 1.0; pYDelimDeltaFaktor = 1.0;
pXDeltaFactor = bDecreasing ? -1.0 : 1.0; pXDeltaFactor = bDecreasing ? -1.0 : 1.0;
//tqDebug("\nsetting pXDeltaFactor for axis %x", axisNumber); //tqDebug("\nsetting pXDeltaFactor for axis %x", axisNumber);
//tqDebug(bDecreasing ? "bDecreasing = TRUE" : "bDecreasing = FALSE"); //tqDebug(bDecreasing ? "bDecreasing = true" : "bDecreasing = false");
//tqDebug("pXDeltaFactor = %f\n",pXDeltaFactor); //tqDebug("pXDeltaFactor = %f\n",pXDeltaFactor);
} }
break; break;
@ -4105,8 +4105,8 @@ void KDChartAxesPainter::calculateAbscissaInfos( const KDChartParams& params,
? ( infos.abscissaSpan / infos.numLabels ) ? ( infos.abscissaSpan / infos.numLabels )
: infos.abscissaSpan ); : infos.abscissaSpan );
//tqDebug( bAbscissaDecreasing ? "bAbscissaDecreasing = TRUE" : "bAbscissaDecreasing = FALSE"); //tqDebug( bAbscissaDecreasing ? "bAbscissaDecreasing = true" : "bAbscissaDecreasing = false");
//tqDebug( abscissaHasTrueAxisValues ? "abscissaHasTrueAxisValues = TRUE" : "abscissaHasTrueAxisValues = FALSE"); //tqDebug( abscissaHasTrueAxisValues ? "abscissaHasTrueAxisValues = true" : "abscissaHasTrueAxisValues = false");
//tqDebug( "abscissaDelta = %f", abscissaDelta); //tqDebug( "abscissaDelta = %f", abscissaDelta);
infos.bAbscissaHasTrueAxisDtValues = infos.bAbscissaHasTrueAxisDtValues =
@ -4217,8 +4217,8 @@ void KDChartAxesPainter::calculateAbscissaInfos( const KDChartParams& params,
"\nabscissaPara: OK" : "\nabscissaPara: OK" :
"\nabscissaPara: leer"); "\nabscissaPara: leer");
tqDebug(abscissaHasTrueAxisValues ? tqDebug(abscissaHasTrueAxisValues ?
"abscissaHasTrueAxisValues: TRUE" : "abscissaHasTrueAxisValues: true" :
"abscissaHasTrueAxisValues: FALSE"); "abscissaHasTrueAxisValues: false");
tqDebug("abscissaStart: %f", abscissaStart); tqDebug("abscissaStart: %f", abscissaStart);
tqDebug("abscissaEnd : %f", abscissaEnd); tqDebug("abscissaEnd : %f", abscissaEnd);
tqDebug("abscissaPara->trueAxisDelta(): %f", abscissaPara->trueAxisDelta()); tqDebug("abscissaPara->trueAxisDelta(): %f", abscissaPara->trueAxisDelta());

@ -1928,12 +1928,12 @@ void KDChartAxisParams::setAxisValues( bool axisSteadyValueCalc,
the default, KD Chart just takes the value specified by you, e.g. the default, KD Chart just takes the value specified by you, e.g.
if you specify 75003.00 as start value you will get exactly this. if you specify 75003.00 as start value you will get exactly this.
By setting this flag to FALSE you let KD Chart find a better By setting this flag to false you let KD Chart find a better
value for you: if your value is not Zero the axis will start value for you: if your value is not Zero the axis will start
with the next value lower than your start value that can be with the next value lower than your start value that can be
divided by the delta factor. divided by the delta factor.
\param isExactValue set this to FALSE if KD Chart shall find \param isExactValue set this to false if KD Chart shall find
a better value than the one you have specified by setAxisValueStart() a better value than the one you have specified by setAxisValueStart()
\sa setAxisValues, setAxisValueEnd, setAxisValueDelta \sa setAxisValues, setAxisValueEnd, setAxisValueDelta
\sa axisValueStartIsExact, axisValueStart \sa axisValueStartIsExact, axisValueStart

@ -159,7 +159,7 @@ public:
<b>Note: </b> If greater 0, the value is taken as exact offset, <b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the if less than 0, it is interpreted as being a per-mille value of the
size of the drawing area (or as percent value of the actual font size size of the drawing area (or as percent value of the actual font size
(as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.). (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is false, resp.).
Actual drawing position/size is calculated dynamically in methode trueRect. Actual drawing position/size is calculated dynamically in methode trueRect.
\param deltaY The Y distance between the box and its anchor. \param deltaY The Y distance between the box and its anchor.
\param width The width of the box. \param width The width of the box.
@ -270,13 +270,13 @@ public:
<b>Note: </b> If greater 0, the value is taken as exact offset, <b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the if less than 0, it is interpreted as being a per-mille value of the
width of the drawing area (or as percent value of the actual font size width of the drawing area (or as percent value of the actual font size
(as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.). (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is false, resp.).
Actual drawing position/size is calculated dynamically in method trueRect. Actual drawing position/size is calculated dynamically in method trueRect.
\param deltaY The Y distance between the box and its anchor. \param deltaY The Y distance between the box and its anchor.
<b>Note: </b> If greater 0, the value is taken as exact offset, <b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the if less than 0, it is interpreted as being a per-mille value of the
height of the drawing area (or as percent value of the actual font size height of the drawing area (or as percent value of the actual font size
(as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.). (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is false, resp.).
Actual drawing position/size is calculated dynamically in method trueRect. Actual drawing position/size is calculated dynamically in method trueRect.
\param width The width of the box. \param width The width of the box.
\param height The height of the box. \param height The height of the box.
@ -571,7 +571,7 @@ public slots: // PENDING(blackie) merge slots sections.
<b>Note: </b> If greater 0, the value is taken as exact offset, <b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the if less than 0, it is interpreted as being a per-mille value of the
size of the drawing area (or as percent value of the actual font size size of the drawing area (or as percent value of the actual font size
(as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.). (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is false, resp.).
Actual drawing position/size is calculated dynamically in methode trueRect. Actual drawing position/size is calculated dynamically in methode trueRect.
\param deltaY The Y distance between the box and its anchor. \param deltaY The Y distance between the box and its anchor.
\param width The width of the drawing region. \param width The width of the drawing region.
@ -614,7 +614,7 @@ public slots: // PENDING(blackie) merge slots sections.
<b>Note: </b> If greater 0, the value is taken as exact offset, <b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the if less than 0, it is interpreted as being a per-mille value of the
size of the drawing area (or as percent value of the actual font size size of the drawing area (or as percent value of the actual font size
(as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.). (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is false, resp.).
Actual drawing position/size is calculated dynamically in methode trueRect. Actual drawing position/size is calculated dynamically in methode trueRect.
\param deltaY The Y distance between the box and its anchor. \param deltaY The Y distance between the box and its anchor.
\param align the way how the values specified for deltaX and/or deltaY \param align the way how the values specified for deltaX and/or deltaY
@ -838,7 +838,7 @@ public slots: // PENDING(blackie) merge slots sections.
<b>Note: </b> If greater 0, the value is taken as exact offset, <b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the if less than 0, it is interpreted as being a per-mille value of the
size of the drawing area (or as percent value of the actual font size size of the drawing area (or as percent value of the actual font size
(as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.). (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is false, resp.).
Actual drawing position/size is calculated dynamically in methode trueRect. Actual drawing position/size is calculated dynamically in methode trueRect.
\sa deltaY, deltaAlign, deltaScaleGlobal \sa deltaY, deltaAlign, deltaScaleGlobal
@ -853,7 +853,7 @@ public slots: // PENDING(blackie) merge slots sections.
<b>Note: </b> If greater 0, the value is taken as exact offset, <b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the if less than 0, it is interpreted as being a per-mille value of the
size of the drawing area (or as percent value of the actual font size size of the drawing area (or as percent value of the actual font size
(as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.). (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is false, resp.).
Actual drawing position/size is calculated dynamically in methode trueRect. Actual drawing position/size is calculated dynamically in methode trueRect.
\sa deltaX, deltaAlign, deltaScaleGlobal \sa deltaX, deltaAlign, deltaScaleGlobal

@ -241,7 +241,7 @@ class KDCHART_EXPORT KDChartPainter
const KDChartAxisParams* ordinatePara, const KDChartAxisParams* ordinatePara,
const double areaWidthP1000, const double areaWidthP1000,
const double areaHeightP1000, const double areaHeightP1000,
bool bDrawInFront = FALSE ); bool bDrawInFront = false );
static KDChartDataRegion* drawMarker( TQPainter* painter, static KDChartDataRegion* drawMarker( TQPainter* painter,
const KDChartParams* params, const KDChartParams* params,

@ -500,8 +500,8 @@ int KDChartParams::registerProperties( KDChartPropertySet& rSet )
in general it is better to use the registerProperties function in general it is better to use the registerProperties function
to initially obtain a unique ID number for your new property set. to initially obtain a unique ID number for your new property set.
\returns TRUE if the property set had been stored before, \returns true if the property set had been stored before,
or FALSE if the set was now stored initially. or false if the set was now stored initially.
\sa KDCHART_PROPSET_TRANSPARENT_DATA \sa KDCHART_PROPSET_TRANSPARENT_DATA
\sa KDCHART_PROPSET_HORI_LINE, KDCHART_PROPSET_VERT_LINE \sa KDCHART_PROPSET_HORI_LINE, KDCHART_PROPSET_VERT_LINE
@ -523,7 +523,7 @@ void KDChartParams::setProperties( int id, KDChartPropertySet& rSet )
function calls using KDCHART_PROPSET_NORMAL_DATA as ID function calls using KDCHART_PROPSET_NORMAL_DATA as ID
will be ignored. will be ignored.
\returns TRUE if the property set was found and removed, or FALSE \returns true if the property set was found and removed, or false
if the set was not found or KDCHART_PROPSET_NORMAL_DATA if the set was not found or KDCHART_PROPSET_NORMAL_DATA
was specified as ID value. was specified as ID value.
@ -555,7 +555,7 @@ bool KDChartParams::removeProperties( int id )
stored therein. To change a stored property set stored therein. To change a stored property set
you may use the setProperties() function. you may use the setProperties() function.
\returns TRUE if the property set was found, FALSE \returns true if the property set was found, false
if it no property set was registred with this ID. if it no property set was registred with this ID.
\sa registerProperties, KDChartData::setPropertySet \sa registerProperties, KDChartData::setPropertySet
@ -610,7 +610,7 @@ KDChartPropertySet* KDChartParams::properties( int id )
Don't use this function to retrieve the exact specification Don't use this function to retrieve the exact specification
of a property set but use KDChartParams::properties() instead. of a property set but use KDChartParams::properties() instead.
\returns TRUE if the property set was found, FALSE \returns true if the property set was found, false
if it no property set was registred with this ID. if it no property set was registred with this ID.
\sa registerProperties, KDChartData::setPropertySet \sa registerProperties, KDChartData::setPropertySet
@ -2255,7 +2255,7 @@ void KDChartParams::activateDefaultAxes()
screen output or whether other routines should be used to obtain screen output or whether other routines should be used to obtain
best quality when using a printer. best quality when using a printer.
\note The default of this flag is TRUE, so make sure to deactivate \note The default of this flag is true, so make sure to deactivate
it before painting your KDChart onto a TQPrinter device! it before painting your KDChart onto a TQPrinter device!
\note This setting is NOT stored together with the other parameters, \note This setting is NOT stored together with the other parameters,
@ -2553,9 +2553,9 @@ void KDChartParams::setGlobalLeading( int left, int top, int right, int bottom )
\param newData3rd The third table coordinate of the new cell (parameter not used, its value will be ignored, set to 0, reserved for future use). \param newData3rd The third table coordinate of the new cell (parameter not used, its value will be ignored, set to 0, reserved for future use).
\note Using KDCHART_NO_DATASET for the newDataRow parameter will not \note Using KDCHART_NO_DATASET for the newDataRow parameter will not
result in returning FALSE because it is an allowed action: the frame is just removed then. result in returning false because it is an allowed action: the frame is just removed then.
\return TRUE if the frame could be moved or was removed; FALSE if either there was no frame around the old cell or the target cell does not exist. \return true if the frame could be moved or was removed; false if either there was no frame around the old cell or the target cell does not exist.
*/ */
bool KDChartParams::moveDataRegionFrame( uint oldDataRow, bool KDChartParams::moveDataRegionFrame( uint oldDataRow,
uint oldDataCol, uint oldDataCol,
@ -2575,7 +2575,7 @@ bool KDChartParams::moveDataRegionFrame( uint oldDataRow,
frame->setDataRow( newDataRow ); frame->setDataRow( newDataRow );
frame->setDataCol( newDataCol ); frame->setDataCol( newDataCol );
frame->setData3rd( 0 ); // newData3rd ); frame->setData3rd( 0 ); // newData3rd );
_areaDict.setAutoDelete( TRUE ); _areaDict.setAutoDelete( true );
_areaDict.replace( _areaDict.replace(
dataRegionFrameAreaName( newDataRow, newDataCol, 0 ), //data3rd 5 ), dataRegionFrameAreaName( newDataRow, newDataCol, 0 ), //data3rd 5 ),
frame ); frame );
@ -3226,7 +3226,7 @@ void KDChartParams::setAdditionalChartType( ChartType chartType )
Specifies whether a data value text may be drawn even if it's Specifies whether a data value text may be drawn even if it's
region intersects with another data value text's region. region intersects with another data value text's region.
By default this is FALSE to prevent ugly mutual overwriting of By default this is false to prevent ugly mutual overwriting of
data value texts and to speed up drawing of cahrts containing data value texts and to speed up drawing of cahrts containing
thousands of data points. thousands of data points.
*/ */
@ -3238,7 +3238,7 @@ void KDChartParams::setAdditionalChartType( ChartType chartType )
Returns whether a data value text may be drawn even if it's region Returns whether a data value text may be drawn even if it's region
intersects with another data value text's region. intersects with another data value text's region.
By default this is FALSE to prevent ugly mutual overwriting of data By default this is false to prevent ugly mutual overwriting of data
value texts and to speed up drawing of cahrts containing thousands value texts and to speed up drawing of cahrts containing thousands
of data points. of data points.
*/ */
@ -8509,7 +8509,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
Stores whether a data value may be drawn near it's respective entry Stores whether a data value may be drawn near it's respective entry
even if it's region intersects with another data value text's region. even if it's region intersects with another data value text's region.
By default this is FALSE to prevent ugly mutual overwriting of data By default this is false to prevent ugly mutual overwriting of data
value texts and to speed up drawing of cahrts containing thousands value texts and to speed up drawing of cahrts containing thousands
of data points. of data points.
*/ */
@ -9153,9 +9153,9 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
your custom box will become the default axis title text box: you then can access/modify your custom box will become the default axis title text box: you then can access/modify
its properties using these convenience functions. its properties using these convenience functions.
\return TRUE if a KDChartCustomBox was found that is anchored to axis \c n. \return true if a KDChartCustomBox was found that is anchored to axis \c n.
\param n the axis number, this could be KDChartAxisParams::AxisPosLeft or KDChartAxisParams::AxisPosBottom... \param n the axis number, this could be KDChartAxisParams::AxisPosLeft or KDChartAxisParams::AxisPosBottom...
\param boxID will obtain the respective KDChartCustomBox's ID if return value is TRUE, otherwise the parameter's value remains unchanged. \param boxID will obtain the respective KDChartCustomBox's ID if return value is true, otherwise the parameter's value remains unchanged.
\sa setAxisTitle, setAxisTitleColor, setAxisTitleFont, setAxisTitleFontUseRelSize, setAxisTitleFontRelSize \sa setAxisTitle, setAxisTitleColor, setAxisTitleFont, setAxisTitleFontUseRelSize, setAxisTitleFontRelSize
*/ */
bool KDChartParams::findFirstAxisCustomBoxID( uint n, uint& boxID ) const bool KDChartParams::findFirstAxisCustomBoxID( uint n, uint& boxID ) const
@ -9510,7 +9510,7 @@ bool KDChartParams::axisTitleFontUseRelSize( uint n ) const
/** /**
Specifies whether a relative size to be used for the default axis title text instead of the fixed size of the font. Specifies whether a relative size to be used for the default axis title text instead of the fixed size of the font.
Calling this function implicitely sets this axis's \c axisTitleFontUseRelSize flag to TRUE. Calling this function implicitely sets this axis's \c axisTitleFontUseRelSize flag to true.
\param axisTitleFontRelSize the size to be used, this is interpreted as per mil value of the printable area size. \param axisTitleFontRelSize the size to be used, this is interpreted as per mil value of the printable area size.
\sa setAxisTitle, setAxisTitleColor,setAxisTitleFont, setAxisTitleFontUseRelSize \sa setAxisTitle, setAxisTitleColor,setAxisTitleFont, setAxisTitleFontUseRelSize

@ -388,7 +388,7 @@ public slots:
bool addFrameWidthToLayout = true, bool addFrameWidthToLayout = true,
bool addFrameHeightToLayout = true ) bool addFrameHeightToLayout = true )
{ {
_areaDict.setAutoDelete( TRUE ); _areaDict.setAutoDelete( true );
_areaDict.replace( TQString( "%1/-----/-----/-----" ).arg( area, 5 ), _areaDict.replace( TQString( "%1/-----/-----/-----" ).arg( area, 5 ),
new KDChartFrameSettings(0,0,0, new KDChartFrameSettings(0,0,0,
frame, frame,
@ -420,7 +420,7 @@ public slots:
int shadowWidth = 0, int shadowWidth = 0,
KDFrame::CornerName sunPos = KDFrame::CornerTopLeft ) KDFrame::CornerName sunPos = KDFrame::CornerTopLeft )
{ {
_areaDict.setAutoDelete( TRUE ); _areaDict.setAutoDelete( true );
KDFrame frame( TQRect(0,0,0,0), KDFrame frame( TQRect(0,0,0,0),
simpleFrame, simpleFrame,
lineWidth, lineWidth,
@ -461,7 +461,7 @@ public slots:
int shadowWidth = 0, int shadowWidth = 0,
KDFrame::CornerName sunPos = KDFrame::CornerTopLeft ) KDFrame::CornerName sunPos = KDFrame::CornerTopLeft )
{ {
_areaDict.setAutoDelete( TRUE ); _areaDict.setAutoDelete( true );
KDFrame frame( TQRect(0,0,0,0), KDFrame frame( TQRect(0,0,0,0),
simpleFrame, simpleFrame,
lineWidth, lineWidth,

@ -254,7 +254,7 @@ void KDChartPolarPainter::paintData( TQPainter* painter,
// calculate font size // calculate font size
actFont = paraCircular.axisLabelsFont(); actFont = paraCircular.axisLabelsFont();
if ( paraCircular.axisLabelsFontUseRelSize() ) { if ( paraCircular.axisLabelsFontUseRelSize() ) {
//tqDebug("paraCircular.axisLabelsFontUseRelSize() is TRUE"); //tqDebug("paraCircular.axisLabelsFontUseRelSize() is true");
actFont.setPointSizeFloat( nTxtHeight ); actFont.setPointSizeFloat( nTxtHeight );
} }
TQFontMetrics fm( actFont ); TQFontMetrics fm( actFont );

@ -187,7 +187,7 @@ class KDCHART_EXPORT KDChartPropertySet :public TQObject
after calling \c load() if you want to use the loaded after calling \c load() if you want to use the loaded
property set in the context of KDChartParam settings. property set in the context of KDChartParam settings.
\returns TRUE if the property set could be read. \returns true if the property set could be read.
\sa id, saveXLM \sa id, saveXLM
*/ */
@ -252,13 +252,13 @@ public slots:
\note This function should be used for Bar Charts only, otherwise \note This function should be used for Bar Charts only, otherwise
the settings specified here will be ignored. the settings specified here will be ignored.
\returns TRUE if this property set is specifying it's own showBar flag, \returns true if this property set is specifying it's own showBar flag,
FALSE if the settings of another property set are to be used instead. false if the settings of another property set are to be used instead.
\note The return value will also be FALSE if the 'default' properties \note The return value will also be false if the 'default' properties
are to be used: in this case idShowBar will be KDChartParams::NormalData are to be used: in this case idShowBar will be KDChartParams::NormalData
\param idShowBar to be ignored if return value is TRUE. \param idShowBar to be ignored if return value is true.
If idShowBar is KDChartPropertySet::UndefinedID If idShowBar is KDChartPropertySet::UndefinedID
then neither a property set ID then neither a property set ID
nor an own flag were specified (so no special nor an own flag were specified (so no special
@ -266,10 +266,10 @@ public slots:
respective data cell), else idShowBar contains the respective data cell), else idShowBar contains the
ID of another property set that is specifying the flag ID of another property set that is specifying the flag
to be used. to be used.
\param showBar this parameter's value is not modified if return value is FALSE. \param showBar this parameter's value is not modified if return value is false.
Parameter showBar contains the showBar flag Parameter showBar contains the showBar flag
associated with the respective data cell. associated with the respective data cell.
If return value is FALSE the showBar If return value is false the showBar
flag is not set (so the parameter keeps its previous value) flag is not set (so the parameter keeps its previous value)
but this is to be overridden by the respective value but this is to be overridden by the respective value
of another property set that is indicated of another property set that is indicated
@ -324,23 +324,23 @@ public slots:
\note This function should be used for Bar Charts only, otherwise \note This function should be used for Bar Charts only, otherwise
the settings specified here will be ignored. the settings specified here will be ignored.
\returns TRUE if this property set is specifying it's own bar color settings, \returns true if this property set is specifying it's own bar color settings,
FALSE if the settings of another property set are to be used instead. false if the settings of another property set are to be used instead.
\note The return value will also be FALSE if the 'default' properties \note The return value will also be false if the 'default' properties
are to be used: in this case idBarColor will be KDChartParams::NormalData are to be used: in this case idBarColor will be KDChartParams::NormalData
\param idBarColor to be ignored if return value is TRUE. \param idBarColor to be ignored if return value is true.
If idBarColor is KDChartPropertySet::UndefinedID If idBarColor is KDChartPropertySet::UndefinedID
then neither a property set ID then neither a property set ID
nor an own bar color were specified (so no special nor an own bar color were specified (so no special
Bar color is associated to the respective data cell), Bar color is associated to the respective data cell),
else idBarColor contains the ID of another property set else idBarColor contains the ID of another property set
that is specifying the Bar color to be used. that is specifying the Bar color to be used.
\param barColor this parameter's value is not modified if return value is FALSE. \param barColor this parameter's value is not modified if return value is false.
Parameter barColor contains the bar color value Parameter barColor contains the bar color value
associated with the respective data cell. associated with the respective data cell.
If return value is FALSE the barColor If return value is false the barColor
value is not set (so the parameter keeps its previous value) value is not set (so the parameter keeps its previous value)
but this is to be overridden by the respective value but this is to be overridden by the respective value
of another property set that is indicated of another property set that is indicated
@ -394,20 +394,20 @@ public slots:
\note This function should be used for Line Charts only. \note This function should be used for Line Charts only.
\returns TRUE if this property set is specifying it's own line width settings, \returns true if this property set is specifying it's own line width settings,
FALSE if the settings of another property set are to be used instead. false if the settings of another property set are to be used instead.
\param idLineWidth to be ignored if return value is TRUE. \param idLineWidth to be ignored if return value is true.
If idLineWidth is KDChartPropertySet::UndefinedID If idLineWidth is KDChartPropertySet::UndefinedID
then neither a property set ID then neither a property set ID
nor an own line width were specified (so no special nor an own line width were specified (so no special
line width is associated to the respective data cell), line width is associated to the respective data cell),
else idLineWidth contains the ID of another property set else idLineWidth contains the ID of another property set
that is specifying the line width to be used. that is specifying the line width to be used.
\param lineWidth this parameter's value is not modified if return value is FALSE. \param lineWidth this parameter's value is not modified if return value is false.
Parameter lineWidth contains the line width value Parameter lineWidth contains the line width value
associated with the respective data cell. associated with the respective data cell.
If return value is FALSE the lineWidth If return value is false the lineWidth
value is not set (so the parameter keeps its previous value) value is not set (so the parameter keeps its previous value)
but this is to be overridden by the respective value but this is to be overridden by the respective value
of another property set that is indicated of another property set that is indicated
@ -462,23 +462,23 @@ public slots:
\note This function should be used for Line Charts only, otherwise \note This function should be used for Line Charts only, otherwise
the settings specified here will be ignored. the settings specified here will be ignored.
\returns TRUE if this property set is specifying it's own line color settings, \returns true if this property set is specifying it's own line color settings,
FALSE if the settings of another property set are to be used instead. false if the settings of another property set are to be used instead.
\note The return value will also be FALSE if the 'default' properties \note The return value will also be false if the 'default' properties
are to be used: in this case idLineColor will be KDChartParams::NormalData are to be used: in this case idLineColor will be KDChartParams::NormalData
\param idLineColor to be ignored if return value is TRUE. \param idLineColor to be ignored if return value is true.
If idLineColor is KDChartPropertySet::UndefinedID If idLineColor is KDChartPropertySet::UndefinedID
then neither a property set ID then neither a property set ID
nor an own line color were specified (so no special nor an own line color were specified (so no special
line color is associated to the respective data cell), line color is associated to the respective data cell),
else idLineColor contains the ID of another property set else idLineColor contains the ID of another property set
that is specifying the line color to be used. that is specifying the line color to be used.
\param lineColor this parameter's value is not modified if return value is FALSE. \param lineColor this parameter's value is not modified if return value is false.
Parameter lineColor contains the line color value Parameter lineColor contains the line color value
associated with the respective data cell. associated with the respective data cell.
If return value is FALSE the lineColor If return value is false the lineColor
value is not set (so the parameter keeps its previous value) value is not set (so the parameter keeps its previous value)
but this is to be overridden by the respective value but this is to be overridden by the respective value
of another property set that is indicated of another property set that is indicated
@ -533,23 +533,23 @@ public slots:
\note This function should be used for Line Charts only, otherwise \note This function should be used for Line Charts only, otherwise
the settings specified here will be ignored. the settings specified here will be ignored.
\returns TRUE if this property set is specifying it's own line style settings, \returns true if this property set is specifying it's own line style settings,
FALSE if the settings of another property set are to be used instead. false if the settings of another property set are to be used instead.
\note The return value will also be FALSE if the 'default' properties \note The return value will also be false if the 'default' properties
are to be used: in this case idLineStyle will be KDChartParams::NormalData are to be used: in this case idLineStyle will be KDChartParams::NormalData
\param idLineStyle to be ignored if return value is TRUE. \param idLineStyle to be ignored if return value is true.
If idLineStyle is KDChartPropertySet::UndefinedID If idLineStyle is KDChartPropertySet::UndefinedID
then neither a property set ID then neither a property set ID
nor an own line style were specified (so no special nor an own line style were specified (so no special
line style is associated to the respective data cell), line style is associated to the respective data cell),
else idLineStyle contains the ID of another property set else idLineStyle contains the ID of another property set
that is specifying the line style to be used. that is specifying the line style to be used.
\param lineStyle this parameter's value is not modified if return value is FALSE. \param lineStyle this parameter's value is not modified if return value is false.
Parameter lineStyle contains the line style value Parameter lineStyle contains the line style value
associated with the respective data cell. associated with the respective data cell.
If return value is FALSE the lineStyle If return value is false the lineStyle
value is not set (so the parameter keeps its previous value) value is not set (so the parameter keeps its previous value)
but this is to be overridden by the respective value but this is to be overridden by the respective value
of another property set that is indicated of another property set that is indicated
@ -605,23 +605,23 @@ public slots:
\note This function should be used for Area Charts in <b>Normal</b> mode \note This function should be used for Area Charts in <b>Normal</b> mode
only, otherwise the settings specified here will be ignored. only, otherwise the settings specified here will be ignored.
\returns TRUE if this property set is specifying it's own area brush settings, \returns true if this property set is specifying it's own area brush settings,
FALSE if the settings of another property set are to be used instead. false if the settings of another property set are to be used instead.
\note The return value will also be FALSE if the 'default' properties \note The return value will also be false if the 'default' properties
are to be used: in this case idAreaBrush will be KDChartParams::NormalData are to be used: in this case idAreaBrush will be KDChartParams::NormalData
\param idAreaBrush to be ignored if return value is TRUE. \param idAreaBrush to be ignored if return value is true.
If idAreaBrush is KDChartPropertySet::UndefinedID If idAreaBrush is KDChartPropertySet::UndefinedID
then neither a property set ID then neither a property set ID
nor an own area brush were specified (so no special nor an own area brush were specified (so no special
area brush is associated to the respective data cell), area brush is associated to the respective data cell),
else idAreaBrush contains the ID of another property set else idAreaBrush contains the ID of another property set
that is specifying the area brush to be used. that is specifying the area brush to be used.
\param areaBrush this parameter's value is not modified if return value is FALSE. \param areaBrush this parameter's value is not modified if return value is false.
Parameter areaBrush contains the area brush value Parameter areaBrush contains the area brush value
associated with the respective data cell. associated with the respective data cell.
If return value is FALSE the areaBrush If return value is false the areaBrush
value is not set (so the parameter keeps its previous value) value is not set (so the parameter keeps its previous value)
but this is to be overridden by the respective value but this is to be overridden by the respective value
of another property set that is indicated of another property set that is indicated
@ -682,13 +682,13 @@ public slots:
\note This function should be used for Line Charts only, otherwise \note This function should be used for Line Charts only, otherwise
the settings specified here will be ignored. the settings specified here will be ignored.
\returns TRUE if this property set is specifying it's own showMarker flag, \returns true if this property set is specifying it's own showMarker flag,
FALSE if the settings of another property set are to be used instead. false if the settings of another property set are to be used instead.
\note The return value will also be FALSE if the 'default' properties \note The return value will also be false if the 'default' properties
are to be used: in this case idShowMarker will be KDChartParams::NormalData are to be used: in this case idShowMarker will be KDChartParams::NormalData
\param idShowMarker to be ignored if return value is TRUE. \param idShowMarker to be ignored if return value is true.
If idShowMarker is KDChartPropertySet::UndefinedID If idShowMarker is KDChartPropertySet::UndefinedID
then neither a property set ID then neither a property set ID
nor an own flag were specified (so no special nor an own flag were specified (so no special
@ -696,10 +696,10 @@ public slots:
respective data cell), else idShowMarker contains the respective data cell), else idShowMarker contains the
ID of another property set that is specifying the flag ID of another property set that is specifying the flag
to be used. to be used.
\param showMarker this parameter's value is not modified if return value is FALSE. \param showMarker this parameter's value is not modified if return value is false.
Parameter showMarker contains the showMarker flag Parameter showMarker contains the showMarker flag
associated with the respective data cell. associated with the respective data cell.
If return value is FALSE the showMarker If return value is false the showMarker
flag is not set (so the parameter keeps its previous value) flag is not set (so the parameter keeps its previous value)
but this is to be overridden by the respective value but this is to be overridden by the respective value
of another property set that is indicated of another property set that is indicated

@ -187,7 +187,7 @@ public slots:
\param coordinate the number of the coordinate to be retrieved, normally \param coordinate the number of the coordinate to be retrieved, normally
1 is the Y value and 2 is the X value. 1 is the Y value and 2 is the X value.
\returns TRUE if the row and col are addressing a cell in the table. \returns true if the row and col are addressing a cell in the table.
\sa cellCoords, cellProp, cellContent, cellVal, setCell, setProp \sa cellCoords, cellProp, cellContent, cellVal, setCell, setProp
*/ */
@ -232,7 +232,7 @@ const double xVal = data.cellVal( r, c, 2 ).toDouble(); \endverbatim
\param _prop the property set ID of the cell to be retrieved. \param _prop the property set ID of the cell to be retrieved.
\returns TRUE if the row and col are addressing a cell in the table. \returns true if the row and col are addressing a cell in the table.
\sa cellCoord, cellCoords, cellContent, setCell, setProp \sa cellCoord, cellCoords, cellContent, setCell, setProp
*/ */
@ -373,7 +373,7 @@ const double xVal = data.cellVal( r, c, 2 ).toDouble(); \endverbatim
special value KDCHART_POS_INFINITE special value KDCHART_POS_INFINITE
to indicate positive infinite values to indicate positive infinite values
\returns TRUE if the value given is a positive infinite value. \returns true if the value given is a positive infinite value.
*/ */
virtual bool isPosInfinite( double value ) const virtual bool isPosInfinite( double value ) const
{ {
@ -389,7 +389,7 @@ const double xVal = data.cellVal( r, c, 2 ).toDouble(); \endverbatim
special value KDCHART_NEG_INFINITE special value KDCHART_NEG_INFINITE
to indicate negative infinite values to indicate negative infinite values
\returns TRUE if the value given is a negative infinite value. \returns true if the value given is a negative infinite value.
*/ */
virtual bool isNegInfinite( double value ) const virtual bool isNegInfinite( double value ) const
{ {
@ -406,7 +406,7 @@ const double xVal = data.cellVal( r, c, 2 ).toDouble(); \endverbatim
\note To improve runtime speed this virtual function \note To improve runtime speed this virtual function
may be reimplemented by classes derived from KDChartTableDataBase. may be reimplemented by classes derived from KDChartTableDataBase.
\returns TRUE if the value given is neither positive infinite nor negativr infinite. \returns true if the value given is neither positive infinite nor negativr infinite.
*/ */
virtual bool isNormalDouble( double value ) const virtual bool isNormalDouble( double value ) const
{ {
@ -423,7 +423,7 @@ const double xVal = data.cellVal( r, c, 2 ).toDouble(); \endverbatim
\param value The TQVariant value to be tested and converted. \param value The TQVariant value to be tested and converted.
\param dVal Points to the double variable to be filled with the converted value. \param dVal Points to the double variable to be filled with the converted value.
\returns TRUE if the value given is neither positive infinite nor negative \returns true if the value given is neither positive infinite nor negative
infinite, \c value is set to the converted value if the type of \c value infinite, \c value is set to the converted value if the type of \c value
is TQVariant::Double, otherwise it is not modified. is TQVariant::Double, otherwise it is not modified.
*/ */

@ -297,7 +297,7 @@ public:
class TQSplitterData class TQSplitterData
{ {
public: public:
TQSplitterData() : opaque( FALSE ), firstShow( TRUE ) {} TQSplitterData() : opaque( false ), firstShow( true ) {}
TQPtrList<KDGanttSplitterLayoutStruct> list; TQPtrList<KDGanttSplitterLayoutStruct> list;
bool opaque; bool opaque;
@ -342,7 +342,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
that a widget should keep its size when the splitter is resized. that a widget should keep its size when the splitter is resized.
Although KDGanttMinimizeSplitter normally resizes the children only Although KDGanttMinimizeSplitter normally resizes the children only
at the end of a resize operation, if you call setOpaqueResize( TRUE at the end of a resize operation, if you call setOpaqueResize( true
) the widgets are resized as often as possible. ) the widgets are resized as often as possible.
The initial distribution of size between the widgets is determined The initial distribution of size between the widgets is determined
@ -406,7 +406,7 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( TQt::Orientation o, TQWidget *
*/ */
KDGanttMinimizeSplitter::~KDGanttMinimizeSplitter() KDGanttMinimizeSplitter::~KDGanttMinimizeSplitter()
{ {
data->list.setAutoDelete( TRUE ); data->list.setAutoDelete( true );
delete data; delete data;
} }
@ -460,11 +460,11 @@ void KDGanttMinimizeSplitter::resizeEvent( TQResizeEvent * )
/* /*
Inserts the widget \a w at the end (or at the beginning if \a first Inserts the widget \a w at the end (or at the beginning if \a first
is TRUE) of the splitter's list of widgets. is true) of the splitter's list of widgets.
It is the responsibility of the caller of this function to make sure It is the responsibility of the caller of this function to make sure
that \a w is not already in the splitter and to call recalcId if that \a w is not already in the splitter and to call recalcId if
needed. (If \a first is TRUE, then recalcId is very probably needed. (If \a first is true, then recalcId is very probably
needed.) needed.)
*/ */
KDGanttSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool first ) KDGanttSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool first )
@ -479,7 +479,7 @@ KDGanttSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bo
newHandle = new KDGanttSplitterHandle( orientation(), this, tmp.latin1() ); newHandle = new KDGanttSplitterHandle( orientation(), this, tmp.latin1() );
s->wid = newHandle; s->wid = newHandle;
newHandle->setId(data->list.count()); newHandle->setId(data->list.count());
s->isSplitter = TRUE; s->isSplitter = true;
s->sizer = pick( newHandle->sizeHint() ); s->sizer = pick( newHandle->sizeHint() );
if ( first ) if ( first )
data->list.insert( 0, s ); data->list.insert( 0, s );
@ -493,7 +493,7 @@ KDGanttSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bo
s->sizer = pick( w->sizeHint() ); s->sizer = pick( w->sizeHint() );
else else
s->sizer = pick( w->size() ); s->sizer = pick( w->size() );
s->isSplitter = FALSE; s->isSplitter = false;
if ( first ) if ( first )
data->list.insert( 0, s ); data->list.insert( 0, s );
else else
@ -587,7 +587,7 @@ bool KDGanttMinimizeSplitter::event( TQEvent *e )
if ( e->type() == TQEvent::LayoutHint || ( e->type() == TQEvent::Show && data->firstShow ) ) { if ( e->type() == TQEvent::LayoutHint || ( e->type() == TQEvent::Show && data->firstShow ) ) {
recalc( isVisible() ); recalc( isVisible() );
if ( e->type() == TQEvent::Show ) if ( e->type() == TQEvent::Show )
data->firstShow = FALSE; data->firstShow = false;
} }
return TQWidget::event( e ); return TQWidget::event( e );
} }
@ -617,12 +617,12 @@ void KDGanttMinimizeSplitter::drawSplitter( TQPainter *p,
int KDGanttMinimizeSplitter::idAfter( TQWidget* w ) const int KDGanttMinimizeSplitter::idAfter( TQWidget* w ) const
{ {
KDGanttSplitterLayoutStruct *s = data->list.first(); KDGanttSplitterLayoutStruct *s = data->list.first();
bool seen_w = FALSE; bool seen_w = false;
while ( s ) { while ( s ) {
if ( s->isSplitter && seen_w ) if ( s->isSplitter && seen_w )
return data->list.at(); return data->list.at();
if ( !s->isSplitter && s->wid == w ) if ( !s->isSplitter && s->wid == w )
seen_w = TRUE; seen_w = true;
s = data->list.next(); s = data->list.next();
} }
return 0; return 0;
@ -698,11 +698,11 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
pos1 = pos2 + 1; pos1 = pos2 + 1;
} }
if ( upLeft ) { if ( upLeft ) {
setG( w, pos1, dd, TRUE ); setG( w, pos1, dd, true );
moveBefore( pos2, id-1, upLeft ); moveBefore( pos2, id-1, upLeft );
} else { } else {
moveBefore( pos2, id-1, upLeft ); moveBefore( pos2, id-1, upLeft );
setG( w, pos1, dd, TRUE ); setG( w, pos1, dd, true );
} }
} else { } else {
int dd, newLeft, nextPos; int dd, newLeft, nextPos;
@ -717,7 +717,7 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
newLeft = pos-dd+1; newLeft = pos-dd+1;
nextPos = newLeft - 1; nextPos = newLeft - 1;
} }
setG( w, newLeft, dd, TRUE ); setG( w, newLeft, dd, true );
moveBefore( nextPos, id-1, upLeft ); moveBefore( nextPos, id-1, upLeft );
} }
} }
@ -751,11 +751,11 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
pos2 = pos + dd; pos2 = pos + dd;
} }
if ( upLeft ) { if ( upLeft ) {
setG( w, pos1, dd, TRUE ); setG( w, pos1, dd, true );
moveAfter( pos2, id+1, upLeft ); moveAfter( pos2, id+1, upLeft );
} else { } else {
moveAfter( pos2, id+1, upLeft ); moveAfter( pos2, id+1, upLeft );
setG( w, pos1, dd, TRUE ); setG( w, pos1, dd, true );
} }
} else { } else {
int left = pick( w->pos() ); int left = pick( w->pos() );
@ -773,7 +773,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
newLeft = pos; newLeft = pos;
nextPos = newLeft + dd; nextPos = newLeft + dd;
} }
setG( w, newLeft, dd, TRUE ); setG( w, newLeft, dd, true );
/*if( right != newRight )*/ /*if( right != newRight )*/
moveAfter( nextPos, id+1, upLeft ); moveAfter( nextPos, id+1, upLeft );
} }
@ -886,23 +886,23 @@ void KDGanttMinimizeSplitter::doResize()
} else if ( s->isSplitter ) { } else if ( s->isSplitter ) {
a[i].stretch = 0; a[i].stretch = 0;
a[i].sizeHint = a[i].minimumSize = a[i].maximumSize = s->sizer; a[i].sizeHint = a[i].minimumSize = a[i].maximumSize = s->sizer;
a[i].empty = FALSE; a[i].empty = false;
} else if ( s->mode == KeepSize ) { } else if ( s->mode == KeepSize ) {
a[i].stretch = 0; a[i].stretch = 0;
a[i].minimumSize = pick( minSize(s->wid) ); a[i].minimumSize = pick( minSize(s->wid) );
a[i].sizeHint = s->sizer; a[i].sizeHint = s->sizer;
a[i].maximumSize = pick( s->wid->maximumSize() ); a[i].maximumSize = pick( s->wid->maximumSize() );
a[i].empty = FALSE; a[i].empty = false;
} else if ( s->mode == FollowSizeHint ) { } else if ( s->mode == FollowSizeHint ) {
a[i].stretch = 0; a[i].stretch = 0;
a[i].minimumSize = a[i].sizeHint = pick( s->wid->sizeHint() ); a[i].minimumSize = a[i].sizeHint = pick( s->wid->sizeHint() );
a[i].maximumSize = pick( s->wid->maximumSize() ); a[i].maximumSize = pick( s->wid->maximumSize() );
a[i].empty = FALSE; a[i].empty = false;
} else { //proportional } else { //proportional
a[i].stretch = s->sizer; a[i].stretch = s->sizer;
a[i].maximumSize = pick( s->wid->maximumSize() ); a[i].maximumSize = pick( s->wid->maximumSize() );
a[i].sizeHint = a[i].minimumSize = pick( minSize(s->wid) ); a[i].sizeHint = a[i].minimumSize = pick( minSize(s->wid) );
a[i].empty = FALSE; a[i].empty = false;
} }
} }
@ -924,7 +924,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
int maxt = TQWIDGETSIZE_MAX; int maxt = TQWIDGETSIZE_MAX;
int mint = fi; int mint = fi;
int n = data->list.count(); int n = data->list.count();
bool first = TRUE; bool first = true;
/* /*
The splitter before a hidden widget is always hidden. The splitter before a hidden widget is always hidden.
The splitter before the first visible widget is hidden. The splitter before the first visible widget is hidden.
@ -940,15 +940,15 @@ void KDGanttMinimizeSplitter::recalc( bool update )
else else
p->wid->show(); //may trigger new recalc p->wid->show(); //may trigger new recalc
if ( !s->wid->isHidden() ) if ( !s->wid->isHidden() )
first = FALSE; first = false;
} }
} }
bool empty=TRUE; bool empty=true;
for ( int j = 0; j< n; j++ ) { for ( int j = 0; j< n; j++ ) {
KDGanttSplitterLayoutStruct *s = data->list.at(j); KDGanttSplitterLayoutStruct *s = data->list.at(j);
if ( !s->wid->isHidden() ) { if ( !s->wid->isHidden() ) {
empty = FALSE; empty = false;
if ( s->isSplitter ) { if ( s->isSplitter ) {
minl += s->sizer; minl += s->sizer;
maxl += s->sizer; maxl += s->sizer;
@ -1005,13 +1005,13 @@ void KDGanttMinimizeSplitter::setResizeMode( TQWidget *w, ResizeMode mode )
} }
s = data->list.next(); s = data->list.next();
} }
s = addWidget( w, TRUE ); s = addWidget( w, true );
s->mode = mode; s->mode = mode;
} }
/*! /*!
Returns TRUE if opaque resize is on; otherwise returns FALSE. Returns true if opaque resize is on; otherwise returns false.
\sa setOpaqueResize() \sa setOpaqueResize()
*/ */
@ -1023,7 +1023,7 @@ bool KDGanttMinimizeSplitter::opaqueResize() const
/*! /*!
If \a on is TRUE then opaque resizing is turned on; otherwise If \a on is true then opaque resizing is turned on; otherwise
opaque resizing is turned off. opaque resizing is turned off.
Opaque resizing is initially turned off. Opaque resizing is initially turned off.
@ -1043,11 +1043,11 @@ void KDGanttMinimizeSplitter::setOpaqueResize( bool on )
void KDGanttMinimizeSplitter::moveToFirst( TQWidget *w ) void KDGanttMinimizeSplitter::moveToFirst( TQWidget *w )
{ {
processChildEvents(); processChildEvents();
bool found = FALSE; bool found = false;
KDGanttSplitterLayoutStruct *s = data->list.first(); KDGanttSplitterLayoutStruct *s = data->list.first();
while ( s ) { while ( s ) {
if ( s->wid == w ) { if ( s->wid == w ) {
found = TRUE; found = true;
KDGanttSplitterLayoutStruct *p = data->list.prev(); KDGanttSplitterLayoutStruct *p = data->list.prev();
if ( p ) { // not already at first place if ( p ) { // not already at first place
data->list.take(); //take p data->list.take(); //take p
@ -1060,7 +1060,7 @@ void KDGanttMinimizeSplitter::moveToFirst( TQWidget *w )
s = data->list.next(); s = data->list.next();
} }
if ( !found ) if ( !found )
addWidget( w, TRUE ); addWidget( w, true );
recalcId(); recalcId();
} }
@ -1072,11 +1072,11 @@ void KDGanttMinimizeSplitter::moveToFirst( TQWidget *w )
void KDGanttMinimizeSplitter::moveToLast( TQWidget *w ) void KDGanttMinimizeSplitter::moveToLast( TQWidget *w )
{ {
processChildEvents(); processChildEvents();
bool found = FALSE; bool found = false;
KDGanttSplitterLayoutStruct *s = data->list.first(); KDGanttSplitterLayoutStruct *s = data->list.first();
while ( s ) { while ( s ) {
if ( s->wid == w ) { if ( s->wid == w ) {
found = TRUE; found = true;
data->list.take(); // take s data->list.take(); // take s
KDGanttSplitterLayoutStruct *p = data->list.current(); KDGanttSplitterLayoutStruct *p = data->list.current();
if ( p ) { // the splitter handle after s if ( p ) { // the splitter handle after s
@ -1181,7 +1181,7 @@ void KDGanttMinimizeSplitter::storeSizes()
#if 0 // ### remove this code ASAP #if 0 // ### remove this code ASAP
/*! /*!
Hides \a w if \a hide is TRUE and updates the splitter. Hides \a w if \a hide is true and updates the splitter.
\warning Due to a limitation in the current implementation, \warning Due to a limitation in the current implementation,
calling TQWidget::hide() will not work. calling TQWidget::hide() will not work.
@ -1203,7 +1203,7 @@ void KDGanttMinimizeSplitter::setHidden( TQWidget *w, bool hide )
w->hide(); w->hide();
else else
w->show(); w->show();
recalc( TRUE ); recalc( true );
} }
@ -1221,7 +1221,7 @@ bool KDGanttMinimizeSplitter::isHidden( TQWidget *w ) const
else else
tqWarning( "KDGanttMinimizeSplitter::isHidden(), unknown widget" ); tqWarning( "KDGanttMinimizeSplitter::isHidden(), unknown widget" );
#endif #endif
return FALSE; return false;
} }
#endif #endif
@ -1360,12 +1360,12 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
int sumStretch = 0; int sumStretch = 0;
int spacerCount = 0; int spacerCount = 0;
bool wannaGrow = FALSE; // anyone who really wants to grow? bool wannaGrow = false; // anyone who really wants to grow?
// bool canShrink = FALSE; // anyone who could be persuaded to shrink? // bool canShrink = false; // anyone who could be persuaded to shrink?
int i; int i;
for ( i = start; i < start + count; i++ ) { for ( i = start; i < start + count; i++ ) {
chain[i].done = FALSE; chain[i].done = false;
cHint += chain[i].sizeHint; cHint += chain[i].sizeHint;
cMin += chain[i].minimumSize; cMin += chain[i].minimumSize;
cMax += chain[i].maximumSize; cMax += chain[i].maximumSize;
@ -1382,7 +1382,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
// tqDebug("not enough space"); // tqDebug("not enough space");
for ( i = start; i < start+count; i++ ) { for ( i = start; i < start+count; i++ ) {
chain[i].size = chain[i].minimumSize; chain[i].size = chain[i].minimumSize;
chain[i].done = TRUE; chain[i].done = true;
} }
} else if ( space < cHint + spacerCount*spacer ) { } else if ( space < cHint + spacerCount*spacer ) {
// Less space than sizeHint, but more than minimum. // Less space than sizeHint, but more than minimum.
@ -1395,7 +1395,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
for ( i = start; i < start+count; i++ ) { for ( i = start; i < start+count; i++ ) {
if ( !chain[i].done && chain[i].minimumSize >= chain[i].sizeHint) { if ( !chain[i].done && chain[i].minimumSize >= chain[i].sizeHint) {
chain[i].size = chain[i].sizeHint; chain[i].size = chain[i].sizeHint;
chain[i].done = TRUE; chain[i].done = true;
space_left -= chain[i].sizeHint; space_left -= chain[i].sizeHint;
// sumStretch -= chain[i].stretch; // sumStretch -= chain[i].stretch;
n--; n--;
@ -1403,7 +1403,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
} }
bool finished = n == 0; bool finished = n == 0;
while ( !finished ) { while ( !finished ) {
finished = TRUE; finished = true;
fixed fp_over = toFixed( overdraft ); fixed fp_over = toFixed( overdraft );
fixed fp_w = 0; fixed fp_w = 0;
@ -1418,9 +1418,9 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
chain[i].size = chain[i].sizeHint - w; chain[i].size = chain[i].sizeHint - w;
fp_w -= toFixed( w ); //give the difference to the next fp_w -= toFixed( w ); //give the difference to the next
if ( chain[i].size < chain[i].minimumSize ) { if ( chain[i].size < chain[i].minimumSize ) {
chain[i].done = TRUE; chain[i].done = true;
chain[i].size = chain[i].minimumSize; chain[i].size = chain[i].minimumSize;
finished = FALSE; finished = false;
overdraft -= chain[i].sizeHint - chain[i].minimumSize; overdraft -= chain[i].sizeHint - chain[i].minimumSize;
// sumStretch -= chain[i].stretch; // sumStretch -= chain[i].stretch;
n--; n--;
@ -1436,7 +1436,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
if ( !chain[i].done && (chain[i].maximumSize <= chain[i].sizeHint if ( !chain[i].done && (chain[i].maximumSize <= chain[i].sizeHint
|| wannaGrow && !chain[i].expansive) ) { || wannaGrow && !chain[i].expansive) ) {
chain[i].size = chain[i].sizeHint; chain[i].size = chain[i].sizeHint;
chain[i].done = TRUE; chain[i].done = true;
space_left -= chain[i].sizeHint; space_left -= chain[i].sizeHint;
sumStretch -= chain[i].stretch; sumStretch -= chain[i].stretch;
n--; n--;
@ -1481,7 +1481,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
if ( !chain[i].done && if ( !chain[i].done &&
chain[i].size < chain[i].sizeHint ) { chain[i].size < chain[i].sizeHint ) {
chain[i].size = chain[i].sizeHint; chain[i].size = chain[i].sizeHint;
chain[i].done = TRUE; chain[i].done = true;
space_left -= chain[i].sizeHint; space_left -= chain[i].sizeHint;
sumStretch -= chain[i].stretch; sumStretch -= chain[i].stretch;
n--; n--;
@ -1494,7 +1494,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
if ( !chain[i].done && if ( !chain[i].done &&
chain[i].size > chain[i].maximumSize ) { chain[i].size > chain[i].maximumSize ) {
chain[i].size = chain[i].maximumSize; chain[i].size = chain[i].maximumSize;
chain[i].done = TRUE; chain[i].done = true;
space_left -= chain[i].maximumSize; space_left -= chain[i].maximumSize;
sumStretch -= chain[i].stretch; sumStretch -= chain[i].stretch;
n--; n--;

@ -65,13 +65,13 @@ public:
Direction minimizeDirection() const; Direction minimizeDirection() const;
virtual void setResizeMode( TQWidget *w, ResizeMode ); virtual void setResizeMode( TQWidget *w, ResizeMode );
virtual void setOpaqueResize( bool = TRUE ); virtual void setOpaqueResize( bool = true );
bool opaqueResize() const; bool opaqueResize() const;
void moveToFirst( TQWidget * ); void moveToFirst( TQWidget * );
void moveToLast( TQWidget * ); void moveToLast( TQWidget * );
void refresh() { recalc( TRUE ); } void refresh() { recalc( true ); }
virtual TQSize sizeHint() const; virtual TQSize sizeHint() const;
virtual TQSize minimumSizeHint() const; virtual TQSize minimumSizeHint() const;
@ -97,15 +97,15 @@ protected:
private: private:
void init(); void init();
void recalc( bool update = FALSE ); void recalc( bool update = false );
void doResize(); void doResize();
void storeSizes(); void storeSizes();
void processChildEvents(); void processChildEvents();
KDGanttSplitterLayoutStruct *addWidget( TQWidget*, bool first = FALSE ); KDGanttSplitterLayoutStruct *addWidget( TQWidget*, bool first = false );
void recalcId(); void recalcId();
void moveBefore( int pos, int id, bool upLeft ); void moveBefore( int pos, int id, bool upLeft );
void moveAfter( int pos, int id, bool upLeft ); void moveAfter( int pos, int id, bool upLeft );
void setG( TQWidget *w, int p, int s, bool isSplitter = FALSE ); void setG( TQWidget *w, int p, int s, bool isSplitter = false );
TQCOORD pick( const TQPoint &p ) const TQCOORD pick( const TQPoint &p ) const
{ return orient ==TQt::Horizontal ? p.x() : p.y(); } { return orient ==TQt::Horizontal ? p.x() : p.y(); }

@ -59,7 +59,7 @@
struct QLayoutStruct struct QLayoutStruct
{ {
void initParameters() { minimumSize = sizeHint = 0; void initParameters() { minimumSize = sizeHint = 0;
maximumSize = TQWIDGETSIZE_MAX; expansive = FALSE; empty = TRUE; } maximumSize = TQWIDGETSIZE_MAX; expansive = false; empty = true; }
void init() { stretch = 0; initParameters(); } void init() { stretch = 0; initParameters(); }
//permanent storage: //permanent storage:
int stretch; int stretch;

@ -286,7 +286,7 @@ HINT: removing WStaticContents from KexiTableView ctor fixed repaint problem
offer copy/cut/paste/copy-to-file/clear for such selections offer copy/cut/paste/copy-to-file/clear for such selections
- tooltips: - tooltips:
-- implement tooltip manager (this will allow to create custom tooltips) -- implement tooltip manager (this will allow to create custom tooltips)
-- use if ( QApplication::isEffectEnabled( UI_AnimateTooltip ) == FALSE ||.... -- use if ( QApplication::isEffectEnabled( UI_AnimateTooltip ) == false ||....
as in qtooltip.cpp:564 as in qtooltip.cpp:564
-- implement custom tooltip for large texts and BLOB, add "zoom" option at the bottom of the tooltip -- implement custom tooltip for large texts and BLOB, add "zoom" option at the bottom of the tooltip
(zooming should not show a modal dialog but rather a widget inside the TV) (zooming should not show a modal dialog but rather a widget inside the TV)

@ -140,7 +140,7 @@ void KexiDBComboBox::paintEvent( TQPaintEvent * )
flags |= TQStyle::Style_MouseOver; flags |= TQStyle::Style_MouseOver;
if ( width() < 5 || height() < 5 ) { if ( width() < 5 || height() < 5 ) {
qDrawShadePanel( &p, rect(), cg, FALSE, 2, &cg.brush( TQColorGroup::Button ) ); qDrawShadePanel( &p, rect(), cg, false, 2, &cg.brush( TQColorGroup::Button ) );
return; return;
} }
@ -242,7 +242,7 @@ bool KexiDBComboBox::handleMousePressEvent(TQMouseEvent *e)
if ( e->button() != TQt::LeftButton || d->designMode ) if ( e->button() != TQt::LeftButton || d->designMode )
return true; return true;
/*todo if ( m_discardNextMousePress ) { /*todo if ( m_discardNextMousePress ) {
d->discardNextMousePress = FALSE; d->discardNextMousePress = false;
return; return;
}*/ }*/
@ -250,15 +250,15 @@ bool KexiDBComboBox::handleMousePressEvent(TQMouseEvent *e)
d->buttonPressed = false; d->buttonPressed = false;
/* if ( d->usingListBox() ) { /* if ( d->usingListBox() ) {
listBox()->blockSignals( TRUE ); listBox()->blockSignals( true );
tqApp->sendEvent( listBox(), e ); // trigger the listbox's autoscroll tqApp->sendEvent( listBox(), e ); // trigger the listbox's autoscroll
listBox()->setCurrentItem(d->current); listBox()->setCurrentItem(d->current);
listBox()->blockSignals( FALSE ); listBox()->blockSignals( false );
popup(); popup();
if ( arrowRect.contains( e->pos() ) ) { if ( arrowRect.contains( e->pos() ) ) {
d->arrowPressed = TRUE; d->arrowPressed = true;
d->arrowDown = TRUE; d->arrowDown = true;
repaint( FALSE ); repaint( false );
} }
} else {*/ } else {*/
showPopup(); showPopup();
@ -318,7 +318,7 @@ void KexiDBComboBox::mousePressEvent( TQMouseEvent *e )
return; return;
// TQTimer::singleShot( 200, this, TQ_SLOT(internalClickTimeout())); // TQTimer::singleShot( 200, this, TQ_SLOT(internalClickTimeout()));
// d->shortClick = TRUE; // d->shortClick = true;
// } // }
KexiDBAutoField::mousePressEvent( e ); KexiDBAutoField::mousePressEvent( e );
} }

@ -190,7 +190,7 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
m_uniquenessTest.setAutoDelete(true); m_uniquenessTest.setAutoDelete(true);
setIcon(DesktopIcon(_IMPORT_ICON)); setIcon(DesktopIcon(_IMPORT_ICON));
setSizeGripEnabled( TRUE ); setSizeGripEnabled( true );
// m_encoding = TQString::fromLatin1(TDEGlobal::locale()->encoding()); // m_encoding = TQString::fromLatin1(TDEGlobal::locale()->encoding());
// m_stripWhiteSpaceInTextValuesChecked = true; // m_stripWhiteSpaceInTextValuesChecked = true;

@ -31,7 +31,7 @@ class KexiFindDialog : public KexiFindDialogBase
TQ_OBJECT TQ_OBJECT
public: public:
KexiFindDialog( bool replaceMode, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE ); KexiFindDialog( bool replaceMode, TQWidget* parent = 0, const char* name = 0, bool modal = false );
virtual ~KexiFindDialog(); virtual ~KexiFindDialog();
#if 0 #if 0

@ -42,7 +42,7 @@ FormulaString::FormulaString( KFormulaPartView* parent, const char* name, bool m
setName( "FormulaString" ); setName( "FormulaString" );
resize( 511, 282 ); resize( 511, 282 );
setCaption( i18n( "Formula String" ) ); setCaption( i18n( "Formula String" ) );
setSizeGripEnabled( TRUE ); setSizeGripEnabled( true );
TQVBoxLayout* FormulaStringLayout = new TQVBoxLayout( this, 11, 6, "FormulaStringLayout"); TQVBoxLayout* FormulaStringLayout = new TQVBoxLayout( this, 11, 6, "FormulaStringLayout");
textWidget = new TQTextEdit( this, "textWidget" ); textWidget = new TQTextEdit( this, "textWidget" );
@ -61,20 +61,20 @@ FormulaString::FormulaString( KFormulaPartView* parent, const char* name, bool m
buttonHelp = new KPushButton( KStdGuiItem::help(), this, "buttonHelp" ); buttonHelp = new KPushButton( KStdGuiItem::help(), this, "buttonHelp" );
buttonHelp->setAccel( 4144 ); buttonHelp->setAccel( 4144 );
buttonHelp->setAutoDefault( TRUE ); buttonHelp->setAutoDefault( true );
Layout1->addWidget( buttonHelp ); Layout1->addWidget( buttonHelp );
spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
Layout1->addItem( spacer ); Layout1->addItem( spacer );
buttonOk = new KPushButton( KStdGuiItem::ok(), this, "buttonOk" ); buttonOk = new KPushButton( KStdGuiItem::ok(), this, "buttonOk" );
buttonOk->setAccel( 0 ); buttonOk->setAccel( 0 );
buttonOk->setAutoDefault( TRUE ); buttonOk->setAutoDefault( true );
buttonOk->setDefault( TRUE ); buttonOk->setDefault( true );
Layout1->addWidget( buttonOk ); Layout1->addWidget( buttonOk );
buttonCancel = new KPushButton( KStdGuiItem::cancel(), this, "buttonCancel" ); buttonCancel = new KPushButton( KStdGuiItem::cancel(), this, "buttonCancel" );
buttonCancel->setAccel( 0 ); buttonCancel->setAccel( 0 );
buttonCancel->setAutoDefault( TRUE ); buttonCancel->setAutoDefault( true );
Layout1->addWidget( buttonCancel ); Layout1->addWidget( buttonCancel );
FormulaStringLayout->addLayout( Layout1 ); FormulaStringLayout->addLayout( Layout1 );

@ -38,7 +38,7 @@ class FormulaString : public TQDialog
public: public:
FormulaString( KFormulaPartView* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); FormulaString( KFormulaPartView* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~FormulaString(); ~FormulaString();
TQTextEdit* textWidget; TQTextEdit* textWidget;

@ -209,7 +209,7 @@ void KFormulaDoc::documentRestored()
bool KFormulaDoc::initDoc(InitDocFlags /*flags*/, TQWidget* /*parentWidget*/) bool KFormulaDoc::initDoc(InitDocFlags /*flags*/, TQWidget* /*parentWidget*/)
{ {
// If nothing is loaded, do initialize here // If nothing is loaded, do initialize here
return TRUE; return true;
} }
void KFormulaDoc::showStartUpWidget(KoMainWindow* parent, bool /*alwaysShow*/) void KFormulaDoc::showStartUpWidget(KoMainWindow* parent, bool /*alwaysShow*/)

@ -160,12 +160,12 @@ TQDragObject *KivioIconView::dragObject()
id.setData( TQCString(full.ascii())); id.setData( TQCString(full.ascii()));
drag->append( id, drag->append( id,
TQRect( item->pixmapRect(FALSE).x() - orig.x(), TQRect( item->pixmapRect(false).x() - orig.x(),
item->pixmapRect(FALSE).y() - orig.y(), item->pixmapRect(false).y() - orig.y(),
item->pixmapRect().width(), item->pixmapRect().width(),
item->pixmapRect().height() ), item->pixmapRect().height() ),
TQRect( item->textRect(FALSE).x() - orig.x(), TQRect( item->textRect(false).x() - orig.x(),
item->textRect(FALSE).y() - orig.y(), item->textRect(false).y() - orig.y(),
item->textRect().width(), item->textRect().width(),
item->textRect().height() ), item->textRect().height() ),
*(item->spawner()) ); *(item->spawner()) );

@ -450,7 +450,7 @@ void KivioView::setupActions()
this, TQ_SLOT( textAlignCenter() ), this, TQ_SLOT( textAlignCenter() ),
actionCollection(), "textAlignCenter" ); actionCollection(), "textAlignCenter" );
m_textAlignCenter->setExclusiveGroup( "align" ); m_textAlignCenter->setExclusiveGroup( "align" );
m_textAlignCenter->setChecked( TRUE ); m_textAlignCenter->setChecked( true );
m_textAlignRight = new TDEToggleAction( i18n( "Align &Right" ), "format-text-direction-rtl", CTRL + ALT + Key_R, m_textAlignRight = new TDEToggleAction( i18n( "Align &Right" ), "format-text-direction-rtl", CTRL + ALT + Key_R,
this, TQ_SLOT( textAlignRight() ), this, TQ_SLOT( textAlignRight() ),
actionCollection(), "textAlignRight" ); actionCollection(), "textAlignRight" );
@ -847,7 +847,7 @@ int KivioView::canvasYOffset() const
void KivioView::print(KPrinter& ptr) void KivioView::print(KPrinter& ptr)
{ {
ptr.setFullPage(TRUE); ptr.setFullPage(true);
m_pDoc->printContent( ptr ); m_pDoc->printContent( ptr );
} }

@ -29,7 +29,7 @@
void insertLayer( int i, KivioLayer *l ) { page->insertLayer(i,l); } void insertLayer( int i, KivioLayer *l ) { page->insertLayer(i,l); }
KivioLayer *layerAt( int i ) { return page->layerAt(i); } KivioLayer *layerAt( int i ) { return page->layerAt(i); }
bool addStencil( KivioStencil *s ) { page->addStencil(s); return TRUE; } bool addStencil( KivioStencil *s ) { page->addStencil(s); return true; }
void deleteSelectedStencils() { page->deleteSelectedStencils(); } void deleteSelectedStencils() { page->deleteSelectedStencils(); }
void groupSelectedStencils() { page->groupSelectedStencils(); } void groupSelectedStencils() { page->groupSelectedStencils(); }

@ -120,7 +120,7 @@ void KoUnavailView::paintEvent( TQPaintEvent* ev )
// ### TODO: Scaling // ### TODO: Scaling
// Let the document do the drawing // Let the document do the drawing
koDocument()->paintEverything( painter, ev->rect(), FALSE, this ); koDocument()->paintEverything( painter, ev->rect(), false, this );
painter.end(); painter.end();
} }

@ -32,7 +32,7 @@ class KoUnavailPart : public KoDocument
public: public:
KoUnavailPart( TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject* parent = 0, const char* name = 0 ); KoUnavailPart( TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject* parent = 0, const char* name = 0 );
virtual void paintContent( TQPainter& painter, const TQRect& rect, bool transparent = FALSE, double zoomX = 1.0, double zoomY = 1.0 ); virtual void paintContent( TQPainter& painter, const TQRect& rect, bool transparent = false, double zoomX = 1.0, double zoomY = 1.0 );
virtual bool initDoc(InitDocFlags, TQWidget* = 0) { return true; } virtual bool initDoc(InitDocFlags, TQWidget* = 0) { return true; }
virtual bool loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles, const TQDomDocument& settings, KoStore* ); virtual bool loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles, const TQDomDocument& settings, KoStore* );

@ -69,7 +69,7 @@ CalendarEditBase::CalendarEditBase( TQWidget* parent, const char* name, WFlags f
layout8 = new TQHBoxLayout( 0, 0, 6, "layout8"); layout8 = new TQHBoxLayout( 0, 0, 6, "layout8");
state = new TQComboBox( FALSE, day, "state" ); state = new TQComboBox( false, day, "state" );
layout8->addWidget( state ); layout8->addWidget( state );
bApply = new TQPushButton( day, "bApply" ); bApply = new TQPushButton( day, "bApply" );

@ -137,7 +137,7 @@ CalendarPanel::eventFilter(TQObject *o, TQEvent *e )
{ {
TQApplication::sendEvent( table, e ); TQApplication::sendEvent( table, e );
table->setFocus(); table->setFocus();
return TRUE; // eat event return true; // eat event
} }
} }
return TQFrame::eventFilter( o, e ); return TQFrame::eventFilter( o, e );

@ -55,7 +55,7 @@ public:
~Part(); ~Part();
virtual void paintContent(TQPainter& painter, const TQRect& rect, virtual void paintContent(TQPainter& painter, const TQRect& rect,
bool transparent = FALSE, bool transparent = false,
double zoomX = 1.0, double zoomY = 1.0); double zoomX = 1.0, double zoomY = 1.0);
virtual bool initDoc(InitDocFlags flags, TQWidget* parentWidget=0); virtual bool initDoc(InitDocFlags flags, TQWidget* parentWidget=0);

@ -71,7 +71,7 @@ protected:
virtual void fillStyle( KoGenStyle& styleObjectAuto, KoGenStyles& mainStyles ) const; virtual void fillStyle( KoGenStyle& styleObjectAuto, KoGenStyles& mainStyles ) const;
virtual void paint( TQPainter *_painter, KoTextZoomHandler *_zoomHandler, virtual void paint( TQPainter *_painter, KoTextZoomHandler *_zoomHandler,
int /* pageNum */, bool drawingShadow, bool drawContour = FALSE ); int /* pageNum */, bool drawingShadow, bool drawContour = false );
TQString filename; TQString filename;

@ -211,7 +211,7 @@ void KPrCanvas::scrollY( int y )
bool KPrCanvas::eventFilter( TQObject *o, TQEvent *e ) bool KPrCanvas::eventFilter( TQObject *o, TQEvent *e )
{ {
if ( !o || !e ) if ( !o || !e )
return TRUE; return true;
if ( m_currentTextObjectView ) if ( m_currentTextObjectView )
KCursor::autoHideEventFilter( o, e ); KCursor::autoHideEventFilter( o, e );
switch ( e->type() ) switch ( e->type() )
@ -219,11 +219,11 @@ bool KPrCanvas::eventFilter( TQObject *o, TQEvent *e )
case TQEvent::FocusIn: case TQEvent::FocusIn:
if ( m_currentTextObjectView ) if ( m_currentTextObjectView )
m_currentTextObjectView->focusInEvent(); m_currentTextObjectView->focusInEvent();
return TRUE; return true;
case TQEvent::FocusOut: case TQEvent::FocusOut:
if ( m_currentTextObjectView ) if ( m_currentTextObjectView )
m_currentTextObjectView->focusOutEvent(); m_currentTextObjectView->focusOutEvent();
return TRUE; return true;
case TQEvent::KeyPress: case TQEvent::KeyPress:
{ {
TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e); TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e);
@ -277,7 +277,7 @@ bool KPrCanvas::eventFilter( TQObject *o, TQEvent *e )
bool KPrCanvas::focusNextPrevChild( bool ) bool KPrCanvas::focusNextPrevChild( bool )
{ {
return TRUE; // Don't allow to go out of the canvas widget by pressing "Tab" return true; // Don't allow to go out of the canvas widget by pressing "Tab"
} }
void KPrCanvas::paintEvent( TQPaintEvent* paintEvent ) void KPrCanvas::paintEvent( TQPaintEvent* paintEvent )
@ -1173,7 +1173,7 @@ void KPrCanvas::mouseReleaseEvent( TQMouseEvent *e )
switch ( toolEditMode ) { switch ( toolEditMode ) {
case TEM_MOUSE: { case TEM_MOUSE: {
drawContour = FALSE; drawContour = false;
switch ( modType ) { switch ( modType ) {
case MT_NONE: { case MT_NONE: {
if ( drawRubber ) { if ( drawRubber ) {
@ -1259,7 +1259,7 @@ void KPrCanvas::mouseReleaseEvent( TQMouseEvent *e )
} }
break; break;
case TEM_ZOOM:{ case TEM_ZOOM:{
drawContour = FALSE; drawContour = false;
if( modType == MT_NONE && drawRubber ) if( modType == MT_NONE && drawRubber )
{ {
TQPainter p; TQPainter p;
@ -1283,7 +1283,7 @@ void KPrCanvas::mouseReleaseEvent( TQMouseEvent *e )
} }
}break; }break;
case TEM_ROTATE: { case TEM_ROTATE: {
drawContour = FALSE; drawContour = false;
if ( !m_rotateObject ) if ( !m_rotateObject )
break; break;
if ( m_angleBeforeRotate != m_rotateObject->getAngle() ) { if ( m_angleBeforeRotate != m_rotateObject->getAngle() ) {
@ -1465,7 +1465,7 @@ void KPrCanvas::mouseMoveEvent( TQMouseEvent *e )
} else if ( mousePressed ) { } else if ( mousePressed ) {
switch ( toolEditMode ) { switch ( toolEditMode ) {
case TEM_MOUSE: { case TEM_MOUSE: {
drawContour = TRUE; drawContour = true;
if ( modType == MT_NONE ) { if ( modType == MT_NONE ) {
if ( drawRubber ) if ( drawRubber )
{ {
@ -1528,7 +1528,7 @@ void KPrCanvas::mouseMoveEvent( TQMouseEvent *e )
case TEM_ROTATE: { case TEM_ROTATE: {
if ( m_rotateObject ) if ( m_rotateObject )
{ {
drawContour = TRUE; drawContour = true;
// angle to mouse pos // angle to mouse pos
double angle = KoPoint::getAngle( m_rotateCenter, docPoint ); double angle = KoPoint::getAngle( m_rotateCenter, docPoint );
// angle to start of mouse pos // angle to start of mouse pos
@ -4472,7 +4472,7 @@ void KPrCanvas::setTextBackground( KPrTextObject */*obj*/ )
#if 0 #if 0
TQPixmap pix( m_activePage->getZoomPageRect().size() ); TQPixmap pix( m_activePage->getZoomPageRect().size() );
TQPainter painter( &pix ); TQPainter painter( &pix );
m_activePage->background()->drawBackground( &painter, FALSE ); m_activePage->background()->drawBackground( &painter, false );
TQPixmap bpix( obj->getSize().toTQSize() ); // ## zoom it ! TQPixmap bpix( obj->getSize().toTQSize() ); // ## zoom it !
bitBlt( &bpix, 0, 0, &pix, obj->getOrig().x(), obj->getOrig().y() - bitBlt( &bpix, 0, 0, &pix, obj->getOrig().x(), obj->getOrig().y() -
m_activePage->getZoomPageRect().height() * ( m_view->getCurrPgNum() - 1 ), bpix.width(), bpix.height() ); m_activePage->getZoomPageRect().height() * ( m_view->getCurrPgNum() - 1 ), bpix.width(), bpix.height() );

@ -257,7 +257,7 @@ KPrDocument::KPrDocument( TQWidget *parentWidget, const char *widgetName, TQObje
objStartY = 0; objStartY = 0;
_presPen = TQPen( red, 3, SolidLine ); _presPen = TQPen( red, 3, SolidLine );
ignoreSticky = TRUE; ignoreSticky = true;
m_gridColor=TQt::black; m_gridColor=TQt::black;
@ -1567,7 +1567,7 @@ bool KPrDocument::loadOasis( const TQDomDocument& doc, KoOasisStyles&oasisStyles
TQTime dt; TQTime dt;
dt.start(); dt.start();
m_loadingInfo = new KPrLoadingInfo; m_loadingInfo = new KPrLoadingInfo;
ignoreSticky = FALSE; ignoreSticky = false;
emit sigProgress( 0 ); emit sigProgress( 0 );
lastObj = -1; lastObj = -1;
@ -1772,7 +1772,7 @@ bool KPrDocument::loadOasis( const TQDomDocument& doc, KoOasisStyles&oasisStyles
if (!settings.isNull() && _clean /*don't load settings when we copy/paste a page*/) if (!settings.isNull() && _clean /*don't load settings when we copy/paste a page*/)
loadOasisPresentationSettings( settings ); loadOasisPresentationSettings( settings );
ignoreSticky = TRUE; ignoreSticky = true;
kdDebug()<<" _clean :"<<_clean<<endl; kdDebug()<<" _clean :"<<_clean<<endl;
if(_clean) if(_clean)
{ {
@ -2201,7 +2201,7 @@ bool KPrDocument::loadXML( TQIODevice * dev, const TQDomDocument& doc )
dt.start(); dt.start();
m_loadingInfo = new KPrLoadingInfo( true ); m_loadingInfo = new KPrLoadingInfo( true );
ignoreSticky = FALSE; ignoreSticky = false;
bool b=false; bool b=false;
TQDomElement docelem = doc.documentElement(); TQDomElement docelem = doc.documentElement();
const int syntaxVersion = docelem.attribute( "syntaxVersion" ).toInt(); const int syntaxVersion = docelem.attribute( "syntaxVersion" ).toInt();
@ -2254,7 +2254,7 @@ bool KPrDocument::loadXML( TQIODevice * dev, const TQDomDocument& doc )
else else
b = loadXML( doc ); b = loadXML( doc );
ignoreSticky = TRUE; ignoreSticky = true;
if(_clean) if(_clean)
{ {
@ -2624,7 +2624,7 @@ bool KPrDocument::loadXML( const TQDomDocument &doc )
} }
} else if(elem.tagName()=="PRESSLIDES") { } else if(elem.tagName()=="PRESSLIDES") {
if(elem.hasAttribute("value") && elem.attribute("value").toInt()==0) if(elem.hasAttribute("value") && elem.attribute("value").toInt()==0)
allSlides = TRUE; allSlides = true;
} else if ( elem.tagName()=="DEFAULTCUSTOMSLIDESHOWNAME" ) { } else if ( elem.tagName()=="DEFAULTCUSTOMSLIDESHOWNAME" ) {
if(elem.hasAttribute("name") ) if(elem.hasAttribute("name") )
m_presentationName=elem.attribute( "name" ); m_presentationName=elem.attribute( "name" );
@ -3972,7 +3972,7 @@ void KPrDocument::pastePage( const TQMimeSource * data, int pgnum )
KURL::List lst; KURL::List lst;
if ( KURLDrag::decode( data, lst ) && !lst.isEmpty() ) if ( KURLDrag::decode( data, lst ) && !lst.isEmpty() )
{ {
insertNewPage(i18n("Paste Slide"), pgnum, IP_BEFORE, FALSE, lst.first().path() ); insertNewPage(i18n("Paste Slide"), pgnum, IP_BEFORE, false, lst.first().path() );
//selectPage( pgnum, true /* should be part of the file ? */ ); //selectPage( pgnum, true /* should be part of the file ? */ );
} }
} }

@ -56,7 +56,7 @@ protected:
virtual bool saveOasisObjectAttributes( KPOasisSaveContext &sc ) const; virtual bool saveOasisObjectAttributes( KPOasisSaveContext &sc ) const;
virtual void paint( TQPainter *_painter,KoTextZoomHandler *_zoomHandler, virtual void paint( TQPainter *_painter,KoTextZoomHandler *_zoomHandler,
int /* pageNum */, bool drawingShadow, bool drawContour = FALSE ); int /* pageNum */, bool drawingShadow, bool drawContour = false );
}; };

@ -72,7 +72,7 @@ public:
virtual void loadOasisGroupObject( KPrDocument *doc, KPrPage * newpage, TQDomNode &element, KoOasisContext & context, KPrLoadingInfo *info); virtual void loadOasisGroupObject( KPrDocument *doc, KPrPage * newpage, TQDomNode &element, KoOasisContext & context, KPrLoadingInfo *info);
virtual void draw( TQPainter *_painter, KoTextZoomHandler *_zoomhandler, virtual void draw( TQPainter *_painter, KoTextZoomHandler *_zoomhandler,
int pageNum, SelectionMode selectionMode, bool drawContour = FALSE ); int pageNum, SelectionMode selectionMode, bool drawContour = false );
void addObjects( KPrObject * obj ); void addObjects( KPrObject * obj );

@ -46,7 +46,7 @@ KPrImportStyleDia::~KPrImportStyleDia()
void KPrImportStyleDia::loadFile() void KPrImportStyleDia::loadFile()
{ {
KFileDialog fd( TQString(), TQString(), 0, 0, TRUE ); KFileDialog fd( TQString(), TQString(), 0, 0, true );
TQStringList lst = "application/x-kpresenter"; TQStringList lst = "application/x-kpresenter";
#if 0 //For the future #if 0 //For the future
lst << "application/vnd.oasis.opendocument.presentation"; lst << "application/vnd.oasis.opendocument.presentation";

@ -76,7 +76,7 @@ protected:
virtual void fillStyle( KoGenStyle& styleObjectAuto, KoGenStyles& mainStyles ) const; virtual void fillStyle( KoGenStyle& styleObjectAuto, KoGenStyles& mainStyles ) const;
virtual void paint( TQPainter *_painter, KoTextZoomHandler*_zoomHandler, virtual void paint( TQPainter *_painter, KoTextZoomHandler*_zoomHandler,
int /* pageNum */, bool drawingShadow, bool drawContour = FALSE ); int /* pageNum */, bool drawingShadow, bool drawContour = false );
LineType lineType; LineType lineType;
}; };

@ -72,7 +72,7 @@ KPrInsertHelpLineDia::KPrInsertHelpLineDia( TQWidget *parent, const KoRect & _pa
setCaption( i18n("Add New Help Line") ); setCaption( i18n("Add New Help Line") );
TQVBox *page = makeVBoxMainWidget(); TQVBox *page = makeVBoxMainWidget();
TQButtonGroup *group = new TQButtonGroup( 1, TQt::Horizontal,i18n("Orientation"), page ); TQButtonGroup *group = new TQButtonGroup( 1, TQt::Horizontal,i18n("Orientation"), page );
group->setRadioButtonExclusive( TRUE ); group->setRadioButtonExclusive( true );
group->layout(); group->layout();
m_rbHoriz = new TQRadioButton( i18n("Horizontal"), group ); m_rbHoriz = new TQRadioButton( i18n("Horizontal"), group );
m_rbVert = new TQRadioButton( i18n("Vertical"), group ); m_rbVert = new TQRadioButton( i18n("Vertical"), group );

@ -239,7 +239,7 @@ public:
// the main drawing method. // the main drawing method.
virtual void draw( TQPainter *_painter, KoTextZoomHandler*_zoomHandler, virtual void draw( TQPainter *_painter, KoTextZoomHandler*_zoomHandler,
int /*pageNum*/, SelectionMode selectionMode, bool drawContour = FALSE ); int /*pageNum*/, SelectionMode selectionMode, bool drawContour = false );
/** /**
* @brief Check if point lies in rect of object * @brief Check if point lies in rect of object
@ -420,7 +420,7 @@ public:
virtual double load(const TQDomElement &element); virtual double load(const TQDomElement &element);
virtual void loadOasis(const TQDomElement &element, KoOasisContext & context, KPrLoadingInfo *info); virtual void loadOasis(const TQDomElement &element, KoOasisContext & context, KPrLoadingInfo *info);
virtual void draw( TQPainter *_painter, KoTextZoomHandler*_zoomHandler, virtual void draw( TQPainter *_painter, KoTextZoomHandler*_zoomHandler,
int pageNum, SelectionMode selectionMode, bool drawContour = FALSE ); int pageNum, SelectionMode selectionMode, bool drawContour = false );
virtual void saveOasisStrokeElement( KoGenStyles& mainStyles, KoGenStyle &styleobjectauto ) const; virtual void saveOasisStrokeElement( KoGenStyles& mainStyles, KoGenStyle &styleobjectauto ) const;
TQString saveOasisStrokeStyle( KoGenStyles& mainStyles ) const; TQString saveOasisStrokeStyle( KoGenStyles& mainStyles ) const;
@ -471,7 +471,7 @@ protected:
* This method isn't pure virtual because some objects implement draw() directly. * This method isn't pure virtual because some objects implement draw() directly.
*/ */
virtual void paint( TQPainter* /* painter */, KoTextZoomHandler* /* zoomHandler */, virtual void paint( TQPainter* /* painter */, KoTextZoomHandler* /* zoomHandler */,
int /* pageNum */, bool drawingShadow, bool /* drawContour */ = FALSE ); int /* pageNum */, bool drawingShadow, bool /* drawContour */ = false );
KoPen pen; KoPen pen;
}; };
@ -521,7 +521,7 @@ public:
virtual double load(const TQDomElement &element); virtual double load(const TQDomElement &element);
virtual void loadOasis(const TQDomElement &element, KoOasisContext & context, KPrLoadingInfo *info); virtual void loadOasis(const TQDomElement &element, KoOasisContext & context, KPrLoadingInfo *info);
virtual void draw( TQPainter *_painter, KoTextZoomHandler*_zoomHandler, virtual void draw( TQPainter *_painter, KoTextZoomHandler*_zoomHandler,
int pageNum, SelectionMode selectionMode, bool drawContour = FALSE ); int pageNum, SelectionMode selectionMode, bool drawContour = false );
virtual void flip(bool horizontal ); virtual void flip(bool horizontal );

@ -43,7 +43,7 @@ public:
virtual TQString getTypeString() const { return i18n("Embedded Object"); } virtual TQString getTypeString() const { return i18n("Embedded Object"); }
virtual void draw( TQPainter *_painter, KoTextZoomHandler *_zoomhandler, virtual void draw( TQPainter *_painter, KoTextZoomHandler *_zoomhandler,
int pageNum, SelectionMode selectionMode, bool drawContour = FALSE ); int pageNum, SelectionMode selectionMode, bool drawContour = false );
void activate( TQWidget *_widget ); void activate( TQWidget *_widget );
void deactivate(); void deactivate();
@ -61,7 +61,7 @@ protected:
void updateChildGeometry(); void updateChildGeometry();
virtual void paint( TQPainter *_painter,KoTextZoomHandler*_zoomHandler, virtual void paint( TQPainter *_painter,KoTextZoomHandler*_zoomHandler,
int /* pageNum */, bool drawingShadow, bool drawContour = FALSE ); int /* pageNum */, bool drawingShadow, bool drawContour = false );
bool _enableDrawing; bool _enableDrawing;
KPrChild *child; KPrChild *child;

@ -76,7 +76,7 @@ public:
virtual void loadOasis(const TQDomElement &element, KoOasisContext & context, KPrLoadingInfo *info); virtual void loadOasis(const TQDomElement &element, KoOasisContext & context, KPrLoadingInfo *info);
virtual void draw( TQPainter *_painter, KoTextZoomHandler*_zoomHandler, virtual void draw( TQPainter *_painter, KoTextZoomHandler*_zoomHandler,
int /* page */, SelectionMode selectionMode, bool drawContour = FALSE ); int /* page */, SelectionMode selectionMode, bool drawContour = false );
TQPixmap getOriginalPixmap(); TQPixmap getOriginalPixmap();
PictureMirrorType getPictureMirrorType() const { return mirrorType; } PictureMirrorType getPictureMirrorType() const { return mirrorType; }

@ -63,7 +63,7 @@ protected:
virtual void fillStyle( KoGenStyle& styleObjectAuto, KoGenStyles& mainStyles ) const; virtual void fillStyle( KoGenStyle& styleObjectAuto, KoGenStyles& mainStyles ) const;
virtual void paint( TQPainter *_painter,KoTextZoomHandler*_zoomHandler, virtual void paint( TQPainter *_painter,KoTextZoomHandler*_zoomHandler,
int /* pageNum */, bool drawingShadow, bool drawContour = FALSE ); int /* pageNum */, bool drawingShadow, bool drawContour = false );
virtual void updatePoints( double _fx, double _fy ); virtual void updatePoints( double _fx, double _fy );
virtual KoPointArray getDrawingPoints() const; virtual KoPointArray getDrawingPoints() const;

@ -265,7 +265,7 @@ void KPrThumbBar::setCurrentPage( int pg )
if ( it->text().toInt() - 1 == pg ) { if ( it->text().toInt() - 1 == pg ) {
blockSignals( true ); blockSignals( true );
setCurrentItem( it ); setCurrentItem( it );
setSelected( it, FALSE ); // to avoid the blue "selected"-mark setSelected( it, false ); // to avoid the blue "selected"-mark
ensureItemVisible(it); ensureItemVisible(it);
refreshItems(); refreshItems();
blockSignals( false ); blockSignals( false );
@ -283,7 +283,7 @@ TQRect KPrThumbBar::tip(const TQPoint &pos, TQString &title)
int pagenr = item->index(); int pagenr = item->index();
title = m_doc->pageList().at(pagenr)->pageTitle(); title = m_doc->pageList().at(pagenr)->pageTitle();
TQRect r = item->pixmapRect(FALSE); TQRect r = item->pixmapRect(false);
r = TQRect(contentsToViewport(TQPoint(r.x(), r.y())), TQSize(r.width(), r.height())); r = TQRect(contentsToViewport(TQPoint(r.x(), r.y())), TQSize(r.width(), r.height()));
return r; return r;
} }

@ -1402,7 +1402,7 @@ void KPrTextObject::drawCursor( TQPainter *p, KoTextCursor *cursor, bool cursorV
TQMAX(0, iPoint.x() - 5), // negative values create problems TQMAX(0, iPoint.x() - 5), // negative values create problems
iPoint.y(), clip.width(), clip.height(), iPoint.y(), clip.width(), clip.height(),
pix, cg, m_doc->zoomHandler(), pix, cg, m_doc->zoomHandler(),
cursorVisible, cursor, FALSE /*resetChanged*/, drawingFlags ); cursorVisible, cursor, false /*resetChanged*/, drawingFlags );
if ( wasChanged ) // Maybe we have more changes to draw, than those in the small cliprect if ( wasChanged ) // Maybe we have more changes to draw, than those in the small cliprect
cursor->parag()->setLineChanged( oldLineChanged ); // -1 = all cursor->parag()->setLineChanged( oldLineChanged ); // -1 = all

@ -441,7 +441,7 @@ KPrView::KPrView( KPrDocument* _doc, TQWidget *_parent, const char *_name )
} }
setAcceptDrops( TRUE ); setAcceptDrops( true );
} }
DCOPObject* KPrView::dcopObject() DCOPObject* KPrView::dcopObject()
@ -717,15 +717,15 @@ void KPrView::editDelPage()
void KPrView::insertPage() void KPrView::insertPage()
{ {
InsertPageDia dia( this, 0, TRUE ); InsertPageDia dia( this, 0, true );
#if COPYOASISFORMAT #if COPYOASISFORMAT
TQString templ = locateLocal( "data", "kpresenter/default.oop" ); TQString templ = locateLocal( "data", "kpresenter/default.oop" );
#else #else
TQString templ = locateLocal( "data", "kpresenter/default.kpr" ); TQString templ = locateLocal( "data", "kpresenter/default.kpr" );
#endif #endif
if ( !TQFile::exists( templ ) ) { if ( !TQFile::exists( templ ) ) {
dia.radioDifferent->setChecked( TRUE ); dia.radioDifferent->setChecked( true );
dia.radioDefault->setEnabled( FALSE ); dia.radioDefault->setEnabled( false );
} }
if ( dia.exec() != TQDialog::Accepted ) if ( dia.exec() != TQDialog::Accepted )
return; return;
@ -808,7 +808,7 @@ void KPrView::savePicture( const TQString& oldName, KoPicture& picture)
TQStringList mimetypes; TQStringList mimetypes;
mimetypes << mimetype; mimetypes << mimetype;
KFileDialog fd( oldFile, TQString(), this, 0, TRUE ); KFileDialog fd( oldFile, TQString(), this, 0, true );
fd.setMimeFilter( mimetypes ); fd.setMimeFilter( mimetypes );
fd.setCaption(i18n("Save Picture")); fd.setCaption(i18n("Save Picture"));
fd.setOperationMode(KFileDialog::Saving); fd.setOperationMode(KFileDialog::Saving);
@ -1572,7 +1572,7 @@ void KPrView::startScreenPres( int pgNum /*1-based*/ )
vert->setEnabled( false ); vert->setEnabled( false );
horz->setEnabled( false ); horz->setEnabled( false );
m_bShowGUI = false; m_bShowGUI = false;
m_canvas->reparent( ( TQWidget* )0L, 0, TQPoint( 0, 0 ), FALSE ); m_canvas->reparent( ( TQWidget* )0L, 0, TQPoint( 0, 0 ), false );
m_canvas->setPaletteBackgroundColor( TQt::white ); m_canvas->setPaletteBackgroundColor( TQt::white );
m_canvas->showFullScreen(); m_canvas->showFullScreen();
m_canvas->setFocusPolicy( TQWidget::StrongFocus ); m_canvas->setFocusPolicy( TQWidget::StrongFocus );
@ -2230,7 +2230,7 @@ void KPrView::createGUI()
if ( sidebar ) if ( sidebar )
{ {
sidebar->outline()->setCurrentItem( sidebar->outline()->firstChild() ); sidebar->outline()->setCurrentItem( sidebar->outline()->firstChild() );
sidebar->outline()->setSelected( sidebar->outline()->firstChild(), TRUE ); sidebar->outline()->setSelected( sidebar->outline()->firstChild(), true );
TDEConfig *config=TDEGlobal::config(); TDEConfig *config=TDEGlobal::config();
config->setGroup("Global"); config->setGroup("Global");
if(!config->readBoolEntry("Sidebar", true)) { if(!config->readBoolEntry("Sidebar", true)) {
@ -3756,12 +3756,12 @@ void KPrView::setupScrollbars()
horz->setValue(horz->minValue()); horz->setValue(horz->minValue());
pgNext = new TQToolButton( pageBase ); pgNext = new TQToolButton( pageBase );
pgNext->setPixmap( TQPixmap( pagedown_xpm ) ); pgNext->setPixmap( TQPixmap( pagedown_xpm ) );
pgNext->setAutoRepeat( TRUE ); pgNext->setAutoRepeat( true );
TQToolTip::add( pgNext, i18n( "Next slide" ) ); TQToolTip::add( pgNext, i18n( "Next slide" ) );
connect( pgNext, TQ_SIGNAL( clicked() ), this, TQ_SLOT( nextPage() ) ); connect( pgNext, TQ_SIGNAL( clicked() ), this, TQ_SLOT( nextPage() ) );
pgPrev = new TQToolButton( pageBase ); pgPrev = new TQToolButton( pageBase );
pgPrev->setPixmap( TQPixmap( pageup_xpm ) ); pgPrev->setPixmap( TQPixmap( pageup_xpm ) );
pgPrev->setAutoRepeat( TRUE ); pgPrev->setAutoRepeat( true );
TQToolTip::add( pgPrev, i18n( "Previous slide" ) ); TQToolTip::add( pgPrev, i18n( "Previous slide" ) );
connect( pgPrev, TQ_SIGNAL( clicked() ), this, TQ_SLOT( prevPage() ) ); connect( pgPrev, TQ_SIGNAL( clicked() ), this, TQ_SLOT( prevPage() ) );
} }
@ -3847,7 +3847,7 @@ void KPrView::skipToPage( int num )
//(Laurent) deselect object when we change page. //(Laurent) deselect object when we change page.
//otherwise you can change object properties on other page //otherwise you can change object properties on other page
deSelectAllObjects(); deSelectAllObjects();
m_pKPresenterDoc->repaint( FALSE ); m_pKPresenterDoc->repaint( false );
m_pKPresenterDoc->displayActivePage( page ); m_pKPresenterDoc->displayActivePage( page );
} }
@ -4053,11 +4053,11 @@ void KPrView::updateSideBar()
{ {
if ( sidebar ) if ( sidebar )
{ {
sidebar->blockSignals( TRUE ); sidebar->blockSignals( true );
sidebar->thumbBar()->uptodate = false; sidebar->thumbBar()->uptodate = false;
sidebar->outline()->rebuildItems(); sidebar->outline()->rebuildItems();
sidebar->thumbBar()->rebuildItems(); sidebar->thumbBar()->rebuildItems();
sidebar->blockSignals( FALSE ); sidebar->blockSignals( false );
} }
} }
@ -4072,9 +4072,9 @@ void KPrView::addSideBarItem( int pos )
{ {
if ( sidebar ) if ( sidebar )
{ {
sidebar->blockSignals( TRUE ); sidebar->blockSignals( true );
sidebar->addItem( pos ); sidebar->addItem( pos );
sidebar->blockSignals( FALSE ); sidebar->blockSignals( false );
} }
} }
@ -4082,9 +4082,9 @@ void KPrView::moveSideBarItem( int oldPos, int newPos )
{ {
if ( sidebar ) if ( sidebar )
{ {
sidebar->blockSignals( TRUE ); sidebar->blockSignals( true );
sidebar->moveItem( oldPos, newPos ); sidebar->moveItem( oldPos, newPos );
sidebar->blockSignals( FALSE ); sidebar->blockSignals( false );
} }
} }
@ -4092,9 +4092,9 @@ void KPrView::removeSideBarItem( int pos )
{ {
if ( sidebar ) if ( sidebar )
{ {
sidebar->blockSignals( TRUE ); sidebar->blockSignals( true );
sidebar->removeItem( pos ); sidebar->removeItem( pos );
sidebar->blockSignals( FALSE ); sidebar->blockSignals( false );
} }
} }
@ -4627,7 +4627,7 @@ void KPrView::spellCheckerRemoveHighlight()
} }
KPrTextView *edit=m_canvas->currentTextObjectView(); KPrTextView *edit=m_canvas->currentTextObjectView();
if (edit) if (edit)
edit->drawCursor( TRUE ); edit->drawCursor( true );
} }
@ -6149,7 +6149,7 @@ void KPrView::autoSpellCheck()
void KPrView::insertFile( ) void KPrView::insertFile( )
{ {
KFileDialog fd( TQString(), TQString(), this, 0, TRUE ); KFileDialog fd( TQString(), TQString(), this, 0, true );
TQStringList filter; TQStringList filter;
filter<<"application/x-kpresenter"; filter<<"application/x-kpresenter";
filter<<"application/vnd.oasis.opendocument.presentation"; filter<<"application/vnd.oasis.opendocument.presentation";

@ -60,10 +60,10 @@ bool KoPointArray::putPoints( int index, int nPoints, double firstx, double firs
va_list ap; va_list ap;
if ( index + nPoints > (int)size() ) { // extend array if ( index + nPoints > (int)size() ) { // extend array
if ( !resize(index + nPoints) ) if ( !resize(index + nPoints) )
return FALSE; return false;
} }
if ( nPoints <= 0 ) if ( nPoints <= 0 )
return TRUE; return true;
setPoint( index, firstx, firsty ); // set first point setPoint( index, firstx, firsty ); // set first point
int i = index + 1; int i = index + 1;
double x, y; double x, y;
@ -75,7 +75,7 @@ bool KoPointArray::putPoints( int index, int nPoints, double firstx, double firs
setPoint( i++, x, y ); setPoint( i++, x, y );
} }
va_end( ap ); va_end( ap );
return TRUE; return true;
} }
void split(const double *p, double *l, double *r) void split(const double *p, double *l, double *r)

@ -39,7 +39,7 @@
using namespace KSpread; using namespace KSpread;
AngleDialog::AngleDialog(View* parent, const char* name, const TQPoint &_marker) AngleDialog::AngleDialog(View* parent, const char* name, const TQPoint &_marker)
: KDialogBase( parent, name,TRUE,i18n("Change Angle" ), Ok|Cancel|Default ) : KDialogBase( parent, name,true,i18n("Change Angle" ), Ok|Cancel|Default )
{ {
m_pView=parent; m_pView=parent;
marker=_marker; marker=_marker;

@ -38,7 +38,7 @@
using namespace KSpread; using namespace KSpread;
AreaDialog::AreaDialog( View * parent, const char * name, const TQPoint & _marker ) AreaDialog::AreaDialog( View * parent, const char * name, const TQPoint & _marker )
: KDialogBase( parent, name, TRUE, i18n("Area Name"), Ok | Cancel ) : KDialogBase( parent, name, true, i18n("Area Name"), Ok | Cancel )
{ {
m_pView = parent; m_pView = parent;
m_marker = _marker; m_marker = _marker;

@ -39,7 +39,7 @@
using namespace KSpread; using namespace KSpread;
CommentDialog::CommentDialog( View* parent, const char* name,const TQPoint &_marker) CommentDialog::CommentDialog( View* parent, const char* name,const TQPoint &_marker)
: KDialogBase( parent, name,TRUE,i18n("Cell Comment"),Ok|Cancel ) : KDialogBase( parent, name,true,i18n("Cell Comment"),Ok|Cancel )
{ {
m_pView = parent; m_pView = parent;
marker= _marker; marker= _marker;

@ -63,7 +63,7 @@ CSVDialog::CSVDialog( View * parent, const char * name, TQRect const & rect, Mod
if ( !name ) if ( !name )
setName( "CSV" ); setName( "CSV" );
setSizeGripEnabled( TRUE ); setSizeGripEnabled( true );
TQWidget* page = new TQWidget( this ); TQWidget* page = new TQWidget( this );
setMainWidget( page ); setMainWidget( page );
@ -102,7 +102,7 @@ CSVDialog::CSVDialog( View * parent, const char * name, TQRect const & rect, Mod
m_radioComma = new TQRadioButton( m_delimiterBox, "m_radioComma" ); m_radioComma = new TQRadioButton( m_delimiterBox, "m_radioComma" );
m_radioComma->setText( i18n( "Comma" ) ); m_radioComma->setText( i18n( "Comma" ) );
m_radioComma->setChecked( TRUE ); m_radioComma->setChecked( true );
m_delimiterBoxLayout->addWidget( m_radioComma, 0, 0 ); m_delimiterBoxLayout->addWidget( m_radioComma, 0, 0 );
m_radioSemicolon = new TQRadioButton( m_delimiterBox, "m_radioSemicolon" ); m_radioSemicolon = new TQRadioButton( m_delimiterBox, "m_radioSemicolon" );
@ -144,7 +144,7 @@ CSVDialog::CSVDialog( View * parent, const char * name, TQRect const & rect, Mod
m_radioText = new TQRadioButton( m_formatBox, "m_radioText" ); m_radioText = new TQRadioButton( m_formatBox, "m_radioText" );
m_radioText->setText( i18n( "Text" ) ); m_radioText->setText( i18n( "Text" ) );
m_radioText->setChecked( TRUE ); m_radioText->setChecked( true );
m_formatBoxLayout->addWidget( m_radioText, 0, 0 ); m_formatBoxLayout->addWidget( m_radioText, 0, 0 );
m_radioCurrency = new TQRadioButton( m_formatBox, "m_radioCurrency" ); m_radioCurrency = new TQRadioButton( m_formatBox, "m_radioCurrency" );
@ -155,13 +155,13 @@ CSVDialog::CSVDialog( View * parent, const char * name, TQRect const & rect, Mod
m_radioDate->setText( i18n( "Date" ) ); m_radioDate->setText( i18n( "Date" ) );
m_formatBoxLayout->addWidget( m_radioDate, 1, 2 ); m_formatBoxLayout->addWidget( m_radioDate, 1, 2 );
m_comboLine = new TQComboBox( FALSE, page, "m_comboLine" ); m_comboLine = new TQComboBox( false, page, "m_comboLine" );
m_comboLine->insertItem( i18n( "1" ) ); m_comboLine->insertItem( i18n( "1" ) );
m_comboLine->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, m_comboLine->sizePolicy().hasHeightForWidth() ) ); m_comboLine->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, m_comboLine->sizePolicy().hasHeightForWidth() ) );
MyDialogLayout->addWidget( m_comboLine, 1, 3 ); MyDialogLayout->addWidget( m_comboLine, 1, 3 );
m_comboQuote = new TQComboBox( FALSE, page, "m_comboQuote" ); m_comboQuote = new TQComboBox( false, page, "m_comboQuote" );
m_comboQuote->insertItem( i18n( "\"" ) ); m_comboQuote->insertItem( i18n( "\"" ) );
m_comboQuote->insertItem( i18n( "'" ) ); m_comboQuote->insertItem( i18n( "'" ) );
m_comboQuote->insertItem( i18n( "None" ) ); m_comboQuote->insertItem( i18n( "None" ) );

@ -104,7 +104,7 @@ DatabaseDialog::DatabaseDialog( View * parent, TQRect const & rect, const char *
TextLabel2->setText( i18n( "Host:" ) ); TextLabel2->setText( i18n( "Host:" ) );
Frame16Layout->addWidget( TextLabel2, 2, 0 ); Frame16Layout->addWidget( TextLabel2, 2, 0 );
m_driver = new TQComboBox( FALSE, Frame16, "m_driver" ); m_driver = new TQComboBox( false, Frame16, "m_driver" );
Frame16Layout->addWidget( m_driver, 0, 1 ); Frame16Layout->addWidget( m_driver, 0, 1 );
m_username = new TQLineEdit( Frame16, "m_username" ); m_username = new TQLineEdit( Frame16, "m_username" );
@ -172,7 +172,7 @@ DatabaseDialog::DatabaseDialog( View * parent, TQRect const & rect, const char *
// TextLabel12_2->setText( i18n( "Database:" ) ); // TextLabel12_2->setText( i18n( "Database:" ) );
// Layout21->addWidget( TextLabel12_2 ); // Layout21->addWidget( TextLabel12_2 );
// m_databaseList = new TQComboBox( FALSE, Frame5_2, "m_databaseList" ); // m_databaseList = new TQComboBox( false, Frame5_2, "m_databaseList" );
// Layout21->addWidget( m_databaseList ); // Layout21->addWidget( m_databaseList );
// m_connectButton = new KPushButton( Frame5_2, "m_connectButton" ); // m_connectButton = new KPushButton( Frame5_2, "m_connectButton" );
@ -191,7 +191,7 @@ DatabaseDialog::DatabaseDialog( View * parent, TQRect const & rect, const char *
m_sheetView = new TDEListView( Frame5_2, "m_tableView" ); m_sheetView = new TDEListView( Frame5_2, "m_tableView" );
m_sheetView->addColumn( i18n( "Sheet" ) ); m_sheetView->addColumn( i18n( "Sheet" ) );
m_sheetView->setRootIsDecorated( FALSE ); m_sheetView->setRootIsDecorated( false );
Frame5_2Layout->addWidget( m_sheetView, 2, 0 ); Frame5_2Layout->addWidget( m_sheetView, 2, 0 );
@ -223,7 +223,7 @@ DatabaseDialog::DatabaseDialog( View * parent, TQRect const & rect, const char *
m_columnView->addColumn( i18n( "Column" ) ); m_columnView->addColumn( i18n( "Column" ) );
m_columnView->addColumn( i18n( "Sheet" ) ); m_columnView->addColumn( i18n( "Sheet" ) );
m_columnView->addColumn( i18n( "Data Type" ) ); m_columnView->addColumn( i18n( "Data Type" ) );
m_columnView->setRootIsDecorated( FALSE ); m_columnView->setRootIsDecorated( false );
Frame5_2_2Layout->addWidget( m_columnView, 1, 0 ); Frame5_2_2Layout->addWidget( m_columnView, 1, 0 );
@ -271,13 +271,13 @@ DatabaseDialog::DatabaseDialog( View * parent, TQRect const & rect, const char *
m_operatorValue_1 = new TQLineEdit( optionsFrame, "m_operatorValue" ); m_operatorValue_1 = new TQLineEdit( optionsFrame, "m_operatorValue" );
optionsFrameLayout->addWidget( m_operatorValue_1, 2, 2 ); optionsFrameLayout->addWidget( m_operatorValue_1, 2, 2 );
m_columns_2 = new TQComboBox( FALSE, optionsFrame, "m_columns_2" ); m_columns_2 = new TQComboBox( false, optionsFrame, "m_columns_2" );
optionsFrameLayout->addWidget( m_columns_2, 3, 0 ); optionsFrameLayout->addWidget( m_columns_2, 3, 0 );
m_operatorValue_3 = new TQLineEdit( optionsFrame, "m_operatorValue_3" ); m_operatorValue_3 = new TQLineEdit( optionsFrame, "m_operatorValue_3" );
optionsFrameLayout->addWidget( m_operatorValue_3, 4, 2 ); optionsFrameLayout->addWidget( m_operatorValue_3, 4, 2 );
m_operator_1 = new TQComboBox( FALSE, optionsFrame, "m_operator_1" ); m_operator_1 = new TQComboBox( false, optionsFrame, "m_operator_1" );
m_operator_1->insertItem( i18n( "equals" ) ); m_operator_1->insertItem( i18n( "equals" ) );
m_operator_1->insertItem( i18n( "not equal" ) ); m_operator_1->insertItem( i18n( "not equal" ) );
m_operator_1->insertItem( i18n( "in" ) ); m_operator_1->insertItem( i18n( "in" ) );
@ -290,7 +290,7 @@ DatabaseDialog::DatabaseDialog( View * parent, TQRect const & rect, const char *
optionsFrameLayout->addWidget( m_operator_1, 2, 1 ); optionsFrameLayout->addWidget( m_operator_1, 2, 1 );
m_operator_2 = new TQComboBox( FALSE, optionsFrame, "m_operator_2" ); m_operator_2 = new TQComboBox( false, optionsFrame, "m_operator_2" );
m_operator_2->insertItem( i18n( "equals" ) ); m_operator_2->insertItem( i18n( "equals" ) );
m_operator_2->insertItem( i18n( "not equal" ) ); m_operator_2->insertItem( i18n( "not equal" ) );
m_operator_2->insertItem( i18n( "in" ) ); m_operator_2->insertItem( i18n( "in" ) );
@ -301,7 +301,7 @@ DatabaseDialog::DatabaseDialog( View * parent, TQRect const & rect, const char *
optionsFrameLayout->addWidget( m_operator_2, 3, 1 ); optionsFrameLayout->addWidget( m_operator_2, 3, 1 );
m_operator_3 = new TQComboBox( FALSE, optionsFrame, "m_operator_3" ); m_operator_3 = new TQComboBox( false, optionsFrame, "m_operator_3" );
m_operator_3->insertItem( i18n( "equals" ) ); m_operator_3->insertItem( i18n( "equals" ) );
m_operator_3->insertItem( i18n( "not equal" ) ); m_operator_3->insertItem( i18n( "not equal" ) );
m_operator_3->insertItem( i18n( "in" ) ); m_operator_3->insertItem( i18n( "in" ) );
@ -395,7 +395,7 @@ DatabaseDialog::DatabaseDialog( View * parent, TQRect const & rect, const char *
m_startingCell = new TQRadioButton( Frame12, "m_startingCell" ); m_startingCell = new TQRadioButton( Frame12, "m_startingCell" );
m_startingCell->setText( i18n( "Starting in cell" ) ); m_startingCell->setText( i18n( "Starting in cell" ) );
m_startingCell->setChecked( TRUE ); m_startingCell->setChecked( true );
Frame12Layout->addWidget( m_startingCell, 1, 0 ); Frame12Layout->addWidget( m_startingCell, 1, 0 );
Frame5_2_2_3Layout->addWidget( Frame12, 2, 0 ); Frame5_2_2_3Layout->addWidget( Frame12, 2, 0 );

@ -55,7 +55,7 @@ class DatabaseDialog : public KWizard
public: public:
enum PageId { eDatabase = 0, eSheets = 1, eColumns = 2, eOptions = 3, eResult = 4 }; enum PageId { eDatabase = 0, eSheets = 1, eColumns = 2, eOptions = 3, eResult = 4 };
DatabaseDialog( View * parent, TQRect const & rect, const char * name = 0, bool modal = FALSE, WFlags fl = 0 ); DatabaseDialog( View * parent, TQRect const & rect, const char * name = 0, bool modal = false, WFlags fl = 0 );
virtual ~DatabaseDialog(); virtual ~DatabaseDialog();
private slots: private slots:

@ -48,7 +48,7 @@
using namespace KSpread; using namespace KSpread;
FormatDialog::FormatDialog( View* view, const char* name ) FormatDialog::FormatDialog( View* view, const char* name )
: KDialogBase( view, name, TRUE,i18n("Sheet Style"),Ok|Cancel ) : KDialogBase( view, name, true,i18n("Sheet Style"),Ok|Cancel )
{ {
for( int i = 0; i < 16; ++i ) for( int i = 0; i < 16; ++i )
m_cells[ i ] = 0; m_cells[ i ] = 0;
@ -67,12 +67,12 @@ FormatDialog::FormatDialog( View* view, const char* name )
vbox->addWidget( m_label ); vbox->addWidget( m_label );
TQStringList lst = Factory::global()->dirs()->findAllResources( "sheet-styles", "*.ksts", TRUE ); TQStringList lst = Factory::global()->dirs()->findAllResources( "sheet-styles", "*.ksts", true );
TQStringList::Iterator it = lst.begin(); TQStringList::Iterator it = lst.begin();
for( ; it != lst.end(); ++it ) for( ; it != lst.end(); ++it )
{ {
KSimpleConfig cfg( *it, TRUE ); KSimpleConfig cfg( *it, true );
cfg.setGroup( "Sheet-Style" ); cfg.setGroup( "Sheet-Style" );
Entry e; Entry e;
@ -346,7 +346,7 @@ bool FormatDialog::parseXML( const TQDomDocument& doc )
} }
} }
return TRUE; return true;
} }
#include "kspread_dlg_format.moc" #include "kspread_dlg_format.moc"

@ -159,7 +159,7 @@ FormulaDialog::FormulaDialog( View* parent, const char* name,const TQString& for
grid2->addStretch( 10 ); grid2->addStretch( 10 );
m_tabwidget->addTab( m_input, i18n("&Parameters") ); m_tabwidget->addTab( m_input, i18n("&Parameters") );
m_tabwidget->setTabEnabled( m_input, FALSE ); m_tabwidget->setTabEnabled( m_input, false );
m_tabwidget->setCurrentPage( index ); m_tabwidget->setCurrentPage( index );
@ -282,12 +282,12 @@ bool FormulaDialog::eventFilter( TQObject* obj, TQEvent* ev )
else if ( obj == fiveElement && ev->type() == TQEvent::FocusIn ) else if ( obj == fiveElement && ev->type() == TQEvent::FocusIn )
m_focus = fiveElement; m_focus = fiveElement;
else else
return FALSE; return false;
if ( m_focus ) if ( m_focus )
m_pView->canvasWidget()->startChoose(); m_pView->canvasWidget()->startChoose();
return FALSE; return false;
} }
void FormulaDialog::slotOk() void FormulaDialog::slotOk()
@ -391,19 +391,19 @@ TQString FormulaDialog::createFormula()
if ( !m_desc ) if ( !m_desc )
return TQString(); return TQString();
bool first = TRUE; bool first = true;
int count = m_desc->params(); int count = m_desc->params();
if(!firstElement->text().isEmpty() && count >= 1 ) if(!firstElement->text().isEmpty() && count >= 1 )
{ {
tmp=tmp+createParameter(firstElement->text(), 0 ); tmp=tmp+createParameter(firstElement->text(), 0 );
first = FALSE; first = false;
} }
if(!secondElement->text().isEmpty() && count >= 2 ) if(!secondElement->text().isEmpty() && count >= 2 )
{ {
first = FALSE; first = false;
if ( !first ) if ( !first )
tmp=tmp+";"+createParameter(secondElement->text(), 1 ); tmp=tmp+";"+createParameter(secondElement->text(), 1 );
else else
@ -411,7 +411,7 @@ TQString FormulaDialog::createFormula()
} }
if(!thirdElement->text().isEmpty() && count >= 3 ) if(!thirdElement->text().isEmpty() && count >= 3 )
{ {
first = FALSE; first = false;
if ( !first ) if ( !first )
tmp=tmp+";"+createParameter(thirdElement->text(), 2 ); tmp=tmp+";"+createParameter(thirdElement->text(), 2 );
else else
@ -419,7 +419,7 @@ TQString FormulaDialog::createFormula()
} }
if(!fourElement->text().isEmpty() && count >= 4 ) if(!fourElement->text().isEmpty() && count >= 4 )
{ {
first = FALSE; first = false;
if ( !first ) if ( !first )
tmp=tmp+";"+createParameter(fourElement->text(), 3 ); tmp=tmp+";"+createParameter(fourElement->text(), 3 );
else else
@ -427,7 +427,7 @@ TQString FormulaDialog::createFormula()
} }
if(!fiveElement->text().isEmpty() && count >= 5 ) if(!fiveElement->text().isEmpty() && count >= 5 )
{ {
first = FALSE; first = false;
if ( !first ) if ( !first )
tmp=tmp+";"+createParameter(fiveElement->text(), 4 ); tmp=tmp+";"+createParameter(fiveElement->text(), 4 );
else else
@ -570,7 +570,7 @@ void FormulaDialog::slotDoubleClicked( TQListBoxItem* item )
// Dont change order of these function calls due to a bug in TQt 2.2 // Dont change order of these function calls due to a bug in TQt 2.2
m_browser->setText( m_desc->toTQML() ); m_browser->setText( m_desc->toTQML() );
m_tabwidget->setTabEnabled( m_input, TRUE ); m_tabwidget->setTabEnabled( m_input, true );
m_tabwidget->setCurrentPage( 1 ); m_tabwidget->setCurrentPage( 1 );
// //
@ -678,7 +678,7 @@ void FormulaDialog::slotSelected( const TQString& function )
} }
if( functions->currentItem() !=- 1 ) if( functions->currentItem() !=- 1 )
selectFunction->setEnabled( TRUE ); selectFunction->setEnabled( true );
// Lock // Lock
refresh_result = false; refresh_result = false;
@ -693,7 +693,7 @@ void FormulaDialog::slotSelected( const TQString& function )
m_focus=0; m_focus=0;
m_tabwidget->setCurrentPage( 0 ); m_tabwidget->setCurrentPage( 0 );
m_tabwidget->setTabEnabled( m_input, FALSE ); m_tabwidget->setTabEnabled( m_input, false );
// Unlock // Unlock
refresh_result=true; refresh_result=true;

@ -111,13 +111,13 @@ GoalSeekDialog::GoalSeekDialog( View * parent, TQPoint const & marker,
m_buttonOk = new TQPushButton( this, "m_buttonOk" ); m_buttonOk = new TQPushButton( this, "m_buttonOk" );
m_buttonOk->setText( i18n( "&Start" ) ); m_buttonOk->setText( i18n( "&Start" ) );
m_buttonOk->setAccel( 276824143 ); m_buttonOk->setAccel( 276824143 );
m_buttonOk->setAutoDefault( TRUE ); m_buttonOk->setAutoDefault( true );
m_buttonOk->setDefault( TRUE ); m_buttonOk->setDefault( true );
Layout5->addWidget( m_buttonOk ); Layout5->addWidget( m_buttonOk );
m_buttonCancel = new KPushButton( KStdGuiItem::cancel(), this, "m_buttonCancel" ); m_buttonCancel = new KPushButton( KStdGuiItem::cancel(), this, "m_buttonCancel" );
m_buttonCancel->setAccel( 276824131 ); m_buttonCancel->setAccel( 276824131 );
m_buttonCancel->setAutoDefault( TRUE ); m_buttonCancel->setAutoDefault( true );
Layout5->addWidget( m_buttonCancel ); Layout5->addWidget( m_buttonCancel );
TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
Layout5->addItem( spacer ); Layout5->addItem( spacer );
@ -204,12 +204,12 @@ bool GoalSeekDialog::eventFilter( TQObject* obj, TQEvent* ev )
else if ( obj == m_sourceEdit && ev->type() == TQEvent::FocusIn ) else if ( obj == m_sourceEdit && ev->type() == TQEvent::FocusIn )
m_focus = m_sourceEdit; m_focus = m_sourceEdit;
else else
return FALSE; return false;
if ( m_focus ) if ( m_focus )
m_pView->canvasWidget()->startChoose(); m_pView->canvasWidget()->startChoose();
return FALSE; return false;
} }
void GoalSeekDialog::closeEvent ( TQCloseEvent * e ) void GoalSeekDialog::closeEvent ( TQCloseEvent * e )

@ -52,7 +52,7 @@ class GoalSeekDialog : public KDialog
public: public:
GoalSeekDialog( View * parent, TQPoint const & marker, const char * name = 0, GoalSeekDialog( View * parent, TQPoint const & marker, const char * name = 0,
bool modal = FALSE, WFlags fl = 0 ); bool modal = false, WFlags fl = 0 );
~GoalSeekDialog(); ~GoalSeekDialog();
/** /**

@ -39,7 +39,7 @@
using namespace KSpread; using namespace KSpread;
GotoDialog::GotoDialog( View* parent, const char* name ) GotoDialog::GotoDialog( View* parent, const char* name )
: KDialogBase( parent, name, TRUE, i18n("Goto Cell"), Ok|Cancel ) : KDialogBase( parent, name, true, i18n("Goto Cell"), Ok|Cancel )
{ {
m_pView = parent; m_pView = parent;
TQWidget *page = new TQWidget( this ); TQWidget *page = new TQWidget( this );

@ -43,7 +43,7 @@
using namespace KSpread; using namespace KSpread;
InsertDialog::InsertDialog( View* parent, const char* name,const TQRect &_rect,Mode _mode) InsertDialog::InsertDialog( View* parent, const char* name,const TQRect &_rect,Mode _mode)
: KDialogBase( parent, name, TRUE,"",Ok|Cancel ) : KDialogBase( parent, name, true,"",Ok|Cancel )
{ {
m_pView = parent; m_pView = parent;
rect=_rect; rect=_rect;
@ -54,7 +54,7 @@ InsertDialog::InsertDialog( View* parent, const char* name,const TQRect &_rect,M
TQVBoxLayout *lay1 = new TQVBoxLayout( page, 0, spacingHint() ); TQVBoxLayout *lay1 = new TQVBoxLayout( page, 0, spacingHint() );
TQButtonGroup *grp = new TQButtonGroup( 1, TQt::Horizontal, i18n("Insert"),page); TQButtonGroup *grp = new TQButtonGroup( 1, TQt::Horizontal, i18n("Insert"),page);
grp->setRadioButtonExclusive( TRUE ); grp->setRadioButtonExclusive( true );
grp->layout(); grp->layout();
lay1->addWidget(grp); lay1->addWidget(grp);
if( insRem==Insert) if( insRem==Insert)

@ -110,7 +110,7 @@ public:
void setPattern( const TQColor &_color, int _width, TQt::PenStyle _style ); void setPattern( const TQColor &_color, int _width, TQt::PenStyle _style );
void setUndefined(); void setUndefined();
void setDefined() { undefined = FALSE; repaint(); } void setDefined() { undefined = false; repaint(); }
bool isDefined() { return !undefined; } bool isDefined() { return !undefined; }

@ -38,7 +38,7 @@
using namespace KSpread; using namespace KSpread;
PasteInsertDialog::PasteInsertDialog( View* parent, const char* name,const TQRect &_rect) PasteInsertDialog::PasteInsertDialog( View* parent, const char* name,const TQRect &_rect)
: KDialogBase( parent, name, TRUE,i18n("Paste Inserting Cells"),Ok|Cancel ) : KDialogBase( parent, name, true,i18n("Paste Inserting Cells"),Ok|Cancel )
{ {
m_pView = parent; m_pView = parent;
rect=_rect; rect=_rect;
@ -48,7 +48,7 @@ PasteInsertDialog::PasteInsertDialog( View* parent, const char* name,const TQRec
TQVBoxLayout *lay1 = new TQVBoxLayout( page, 0, spacingHint() ); TQVBoxLayout *lay1 = new TQVBoxLayout( page, 0, spacingHint() );
TQButtonGroup *grp = new TQButtonGroup( 1, TQt::Horizontal, i18n("Insert"),page); TQButtonGroup *grp = new TQButtonGroup( 1, TQt::Horizontal, i18n("Insert"),page);
grp->setRadioButtonExclusive( TRUE ); grp->setRadioButtonExclusive( true );
grp->layout(); grp->layout();
lay1->addWidget(grp); lay1->addWidget(grp);
rb1 = new TQRadioButton( i18n("Move towards right"), grp ); rb1 = new TQRadioButton( i18n("Move towards right"), grp );

@ -52,7 +52,7 @@
using namespace KSpread; using namespace KSpread;
reference::reference( View* parent, const char* name ) reference::reference( View* parent, const char* name )
: TQDialog( parent, name,TRUE ) : TQDialog( parent, name,true )
{ {
m_pView = parent; m_pView = parent;
TQVBoxLayout *lay1 = new TQVBoxLayout( this ); TQVBoxLayout *lay1 = new TQVBoxLayout( this );
@ -74,7 +74,7 @@ reference::reference( View* parent, const char* name )
m_pEdit = bb->addButton( i18n("&Edit...") ); m_pEdit = bb->addButton( i18n("&Edit...") );
m_pOk = bb->addButton( KStdGuiItem::ok() ); m_pOk = bb->addButton( KStdGuiItem::ok() );
m_pCancel = bb->addButton( KStdGuiItem::cancel() ); m_pCancel = bb->addButton( KStdGuiItem::cancel() );
m_pOk->setDefault( TRUE ); m_pOk->setDefault( true );
bb->layout(); bb->layout();
lay1->addWidget( bb ); lay1->addWidget( bb );
@ -285,7 +285,7 @@ EditAreaName::EditAreaName( View * parent,
EditAreaNameLayout->addWidget( TextLabel1, 1, 0 ); EditAreaNameLayout->addWidget( TextLabel1, 1, 0 );
m_sheets = new TQComboBox( FALSE, page, "m_sheets" ); m_sheets = new TQComboBox( false, page, "m_sheets" );
EditAreaNameLayout->addWidget( m_sheets, 1, 1 ); EditAreaNameLayout->addWidget( m_sheets, 1, 1 );

@ -48,7 +48,7 @@
using namespace KSpread; using namespace KSpread;
SeriesDlg::SeriesDlg( View* parent, const char* name,const TQPoint &_marker) SeriesDlg::SeriesDlg( View* parent, const char* name,const TQPoint &_marker)
: KDialogBase( parent, name,TRUE,i18n("Series"),Ok|Cancel ) : KDialogBase( parent, name,true,i18n("Series"),Ok|Cancel )
{ {
m_pView = parent; m_pView = parent;
marker=_marker; marker=_marker;

@ -39,7 +39,7 @@
using namespace KSpread; using namespace KSpread;
ShowDialog::ShowDialog( View* parent, const char* name ) ShowDialog::ShowDialog( View* parent, const char* name )
: KDialogBase( parent, name,TRUE,i18n("Show Sheet"),Ok|Cancel ) : KDialogBase( parent, name,true,i18n("Show Sheet"),Ok|Cancel )
{ {
m_pView = parent; m_pView = parent;
TQWidget *page = new TQWidget( this ); TQWidget *page = new TQWidget( this );

@ -36,7 +36,7 @@
using namespace KSpread; using namespace KSpread;
ShowColRow::ShowColRow( View* parent, const char* name, Type _type ) ShowColRow::ShowColRow( View* parent, const char* name, Type _type )
: KDialogBase( parent, name,TRUE,"",Ok|Cancel ) : KDialogBase( parent, name,true,"",Ok|Cancel )
{ {
m_pView = parent; m_pView = parent;
typeShow=_type; typeShow=_type;

@ -37,7 +37,7 @@
using namespace KSpread; using namespace KSpread;
SpecialDialog::SpecialDialog( View* parent, const char* name ) SpecialDialog::SpecialDialog( View* parent, const char* name )
: KDialogBase( parent, name, TRUE,i18n("Special Paste"),Ok|Cancel ) : KDialogBase( parent, name, true,i18n("Special Paste"),Ok|Cancel )
{ {
m_pView = parent; m_pView = parent;
TQWidget *page = new TQWidget( this ); TQWidget *page = new TQWidget( this );
@ -45,7 +45,7 @@ SpecialDialog::SpecialDialog( View* parent, const char* name )
TQVBoxLayout *lay1 = new TQVBoxLayout( page, 0, spacingHint() ); TQVBoxLayout *lay1 = new TQVBoxLayout( page, 0, spacingHint() );
TQButtonGroup *grp = new TQButtonGroup( 1, TQt::Horizontal, i18n( "Paste What" ),page ); TQButtonGroup *grp = new TQButtonGroup( 1, TQt::Horizontal, i18n( "Paste What" ),page );
grp->setRadioButtonExclusive( TRUE ); grp->setRadioButtonExclusive( true );
grp->layout(); grp->layout();
lay1->addWidget(grp); lay1->addWidget(grp);
rb1 = new TQRadioButton( i18n("Everything"), grp ); rb1 = new TQRadioButton( i18n("Everything"), grp );
@ -58,7 +58,7 @@ SpecialDialog::SpecialDialog( View* parent, const char* name )
rb1->setChecked(true); rb1->setChecked(true);
grp = new TQButtonGroup( 1, TQt::Horizontal, i18n("Operation"),page); grp = new TQButtonGroup( 1, TQt::Horizontal, i18n("Operation"),page);
grp->setRadioButtonExclusive( TRUE ); grp->setRadioButtonExclusive( true );
grp->layout(); grp->layout();
lay1->addWidget(grp); lay1->addWidget(grp);

@ -49,7 +49,7 @@ StyleWidget::StyleWidget( TQWidget * parent, const char * name, WFlags fl )
m_styleList->setResizeMode( TDEListView::AllColumns ); m_styleList->setResizeMode( TDEListView::AllColumns );
layout->addWidget( m_styleList ); layout->addWidget( m_styleList );
m_displayBox = new KComboBox( FALSE, this, "m_displayBox" ); m_displayBox = new KComboBox( false, this, "m_displayBox" );
layout->addWidget( m_displayBox ); layout->addWidget( m_displayBox );
m_styleList->header()->setLabel( 0, i18n( "Styles" ) ); m_styleList->header()->setLabel( 0, i18n( "Styles" ) );

@ -208,7 +208,7 @@ FunctionRepository* FunctionRepository::self()
// find all XML description files // find all XML description files
TQStringList files = Factory::global()->dirs()->findAllResources TQStringList files = Factory::global()->dirs()->findAllResources
("extensions", "*.xml", TRUE); ("extensions", "*.xml", true);
// load desc/help from XML file // load desc/help from XML file
for( TQStringList::Iterator it = files.begin(); it != files.end(); ++it ) for( TQStringList::Iterator it = files.begin(); it != files.end(); ++it )
@ -324,7 +324,7 @@ static ParameterType toType( const TQString& type )
return KSpread_Float; return KSpread_Float;
} }
static TQString toString (ParameterType type, bool range = FALSE) static TQString toString (ParameterType type, bool range = false)
{ {
if ( !range ) if ( !range )
{ {
@ -363,7 +363,7 @@ static TQString toString (ParameterType type, bool range = FALSE)
FunctionParameter::FunctionParameter() FunctionParameter::FunctionParameter()
{ {
m_type = KSpread_Float; m_type = KSpread_Float;
m_range = FALSE; m_range = false;
} }
FunctionParameter::FunctionParameter (const FunctionParameter& param) FunctionParameter::FunctionParameter (const FunctionParameter& param)
@ -376,7 +376,7 @@ FunctionParameter::FunctionParameter (const FunctionParameter& param)
FunctionParameter::FunctionParameter (const TQDomElement& element) FunctionParameter::FunctionParameter (const TQDomElement& element)
{ {
m_type = KSpread_Float; m_type = KSpread_Float;
m_range = FALSE; m_range = false;
TQDomNode n = element.firstChild(); TQDomNode n = element.firstChild();
for( ; !n.isNull(); n = n.nextSibling() ) for( ; !n.isNull(); n = n.nextSibling() )
@ -391,7 +391,7 @@ FunctionParameter::FunctionParameter (const TQDomElement& element)
if ( e.hasAttribute( "range" )) if ( e.hasAttribute( "range" ))
{ {
if (e.attribute("range").lower() == "true") if (e.attribute("range").lower() == "true")
m_range = TRUE; m_range = true;
} }
} }
} }

@ -356,7 +356,7 @@ class EmbeddedPictureObject : public EmbeddedObject
//virtual void loadOasis(const TQDomElement &element, KoOasisLoadingContext & context, KPRLoadingInfo *info); //virtual void loadOasis(const TQDomElement &element, KoOasisLoadingContext & context, KPRLoadingInfo *info);
// virtual void draw( TQPainter *_painter, KoZoomHandler*_zoomHandler, // virtual void draw( TQPainter *_painter, KoZoomHandler*_zoomHandler,
// int /* page */, SelectionMode selectionMode, bool drawContour = FALSE ); // int /* page */, SelectionMode selectionMode, bool drawContour = false );
TQPixmap getOriginalPixmap(); TQPixmap getOriginalPixmap();
PictureMirrorType getPictureMirrorType() const { return mirrorType; } PictureMirrorType getPictureMirrorType() const { return mirrorType; }

@ -53,14 +53,14 @@ void ToolBox::setEnabled( bool enable )
{ {
++it; ++it;
if ( w->isWidgetType() ) if ( w->isWidgetType() )
w->setEnabled( TRUE ); w->setEnabled( true );
} }
} }
} }
else else
{ {
if ( focusWidget() == this ) if ( focusWidget() == this )
focusNextPrevChild( TRUE ); focusNextPrevChild( true );
TQObjectList clo = childrenListObject(); TQObjectList clo = childrenListObject();
if ( !clo.isEmpty() ) if ( !clo.isEmpty() )
{ {
@ -71,7 +71,7 @@ void ToolBox::setEnabled( bool enable )
++it; ++it;
if ( w->isWidgetType() ) if ( w->isWidgetType() )
{ {
w->setEnabled( FALSE ); w->setEnabled( false );
// w->clearWState( WState_ForceDisabled ); // w->clearWState( WState_ForceDisabled );
} }
} }

@ -4974,7 +4974,7 @@ void View::print( KPrinter &prt )
continue; continue;
} }
setActiveSheet(sheet,FALSE); setActiveSheet(sheet,false);
SheetPrint* print = d->activeSheet->print(); SheetPrint* print = d->activeSheet->print();

File diff suppressed because it is too large Load Diff

@ -112,7 +112,7 @@ Calculator::~Calculator()
bool Calculator::eventFilter( TQObject*, TQEvent* ev ) bool Calculator::eventFilter( TQObject*, TQEvent* ev )
{ {
if ( !m_calc ) if ( !m_calc )
return FALSE; return false;
if ( SelectionChanged::test( ev ) ) if ( SelectionChanged::test( ev ) )
{ {
@ -120,18 +120,18 @@ bool Calculator::eventFilter( TQObject*, TQEvent* ev )
// Selection cleared ? // Selection cleared ?
if (!event->region().isValid()) if (!event->region().isValid())
return FALSE; return false;
Sheet* sheet = m_view->doc()->map()->findSheet( event->sheet() ); Sheet* sheet = m_view->doc()->map()->findSheet( event->sheet() );
if ( !sheet ) if ( !sheet )
return FALSE; return false;
// A single cell selected ? // A single cell selected ?
if (event->region().isSingular()) if (event->region().isSingular())
{ {
Cell* cell = sheet->cellAt( event->rect().left(), event->rect().top(), false ); Cell* cell = sheet->cellAt( event->rect().left(), event->rect().top(), false );
if ( !cell ) if ( !cell )
return FALSE; return false;
double d; double d;
if ( cell->isEmpty() ) if ( cell->isEmpty() )
@ -140,7 +140,7 @@ bool Calculator::eventFilter( TQObject*, TQEvent* ev )
d = cell->value().asFloat(); d = cell->value().asFloat();
m_calc->setValue( d ); m_calc->setValue( d );
return FALSE; return false;
} }
// Multiple cells selected ? // Multiple cells selected ?
@ -148,10 +148,10 @@ bool Calculator::eventFilter( TQObject*, TQEvent* ev )
TQString str = util_rangeName( sheet, event->rect() ); TQString str = util_rangeName( sheet, event->rect() );
m_calc->setLabel( str.latin1() ); m_calc->setLabel( str.latin1() );
return FALSE; return false;
} }
return FALSE; return false;
} }
/*************************************************** /***************************************************

@ -31,8 +31,8 @@
KStats::KStats(){ KStats::KStats(){
error_flag = FALSE; error_flag = false;
data.setAutoDelete(TRUE); data.setAutoDelete(true);
} }
@ -164,7 +164,7 @@ CALCAMNT KStats::median(){
bound = list.count(); bound = list.count();
if (bound == 0){ if (bound == 0){
error_flag = TRUE; error_flag = true;
return 0.0; return 0.0;
} }
@ -234,7 +234,7 @@ CALCAMNT KStats::mean(){
CALCAMNT result = 0.0; CALCAMNT result = 0.0;
if(data.count() == 0){ if(data.count() == 0){
error_flag = TRUE; error_flag = true;
return 0.0; return 0.0;
} }
@ -253,7 +253,7 @@ CALCAMNT KStats::std(){
CALCAMNT result = 0.0; CALCAMNT result = 0.0;
if(data.count() == 0){ if(data.count() == 0){
error_flag = TRUE; error_flag = true;
#ifdef DEBUG_STATS #ifdef DEBUG_STATS
printf("set stats error\n"); printf("set stats error\n");
@ -283,7 +283,7 @@ CALCAMNT KStats::sample_std(){
CALCAMNT result = 0.0; CALCAMNT result = 0.0;
if(data.count() < 2 ){ if(data.count() < 2 ){
error_flag = TRUE; error_flag = true;
return 0.0; return 0.0;
} }
@ -306,7 +306,7 @@ bool KStats::error(){
bool value; bool value;
value = error_flag; value = error_flag;
error_flag = FALSE; error_flag = false;
return value; return value;

@ -69,7 +69,7 @@ void KudesignerDoc::addCommand( KCommand *cmd )
bool KudesignerDoc::initDoc( InitDocFlags flags, TQWidget* parentWidget ) bool KudesignerDoc::initDoc( InitDocFlags flags, TQWidget* parentWidget )
{ {
// If nothing is loaded, do initialize here // If nothing is loaded, do initialize here
bool ok = FALSE; bool ok = false;
// TODO if (flags==KoDocument::InitDocEmpty) // TODO if (flags==KoDocument::InitDocEmpty)
@ -105,7 +105,7 @@ bool KudesignerDoc::initDoc( InitDocFlags flags, TQWidget* parentWidget )
showLoadingErrorDialog(); showLoadingErrorDialog();
setEmpty(); setEmpty();
} }
setModified( FALSE ); setModified( false );
return ok; return ok;
} }
@ -143,7 +143,7 @@ void KudesignerDoc::paintContent( TQPainter& painter, const TQRect& rect, bool /
// Need to draw only the document rectangle described in the parameter rect. // Need to draw only the document rectangle described in the parameter rect.
canvas() ->drawArea( rect, &painter, TRUE ); canvas() ->drawArea( rect, &painter, true );
} }

@ -43,7 +43,7 @@ public:
~KudesignerDoc(); ~KudesignerDoc();
virtual void paintContent( TQPainter& painter, const TQRect& rect, bool transparent = FALSE, double zoomX = 1.0, double zoomY = 1.0 ); virtual void paintContent( TQPainter& painter, const TQRect& rect, bool transparent = false, double zoomX = 1.0, double zoomY = 1.0 );
virtual bool initDoc( InitDocFlags flags, TQWidget* parentWidget ); virtual bool initDoc( InitDocFlags flags, TQWidget* parentWidget );

@ -166,7 +166,7 @@ void KudesignerView::paintEvent( TQPaintEvent* ev )
// ### TODO: Scaling // ### TODO: Scaling
// Let the document do the drawing // Let the document do the drawing
koDocument() ->paintEverything( painter, ev->rect(), FALSE, this ); koDocument() ->paintEverything( painter, ev->rect(), false, this );
painter.end(); painter.end();
} }

@ -51,7 +51,7 @@ public:
int minHeight(); int minHeight();
TQRect bottomMiddleResizableRect(); TQRect bottomMiddleResizableRect();
void arrange( int base, bool destructive = TRUE ); void arrange( int base, bool destructive = true );
virtual void updateGeomProps(); virtual void updateGeomProps();
TQCanvasItemList items; TQCanvasItemList items;

@ -189,7 +189,7 @@ bool Canvas::loadXML( const TQDomNode &report )
setReportFooterAttributes( &child ); setReportFooterAttributes( &child );
} }
} }
templ->arrangeSections( FALSE ); templ->arrangeSections( false );
TQCanvasItemList l = allItems(); TQCanvasItemList l = allItems();
for ( TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it ) for ( TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it )
{ {

@ -89,19 +89,19 @@ void InputMask::parseInputMask( const TQString &maskFields )
MaskInputData::Casemode m = MaskInputData::NoCaseMode; MaskInputData::Casemode m = MaskInputData::NoCaseMode;
c = 0; c = 0;
bool s; bool s;
bool escape = FALSE; bool escape = false;
int index = 0; int index = 0;
for ( i = 0; i < m_mask.length(); i++ ) for ( i = 0; i < m_mask.length(); i++ )
{ {
c = m_mask.at( i ); c = m_mask.at( i );
if ( escape ) if ( escape )
{ {
s = TRUE; s = true;
m_maskData[ index ].maskChar = c; m_maskData[ index ].maskChar = c;
m_maskData[ index ].separator = s; m_maskData[ index ].separator = s;
m_maskData[ index ].caseMode = m; m_maskData[ index ].caseMode = m;
index++; index++;
escape = FALSE; escape = false;
} }
else if ( c == '<' || c == '>' || c == '!' ) else if ( c == '<' || c == '>' || c == '!' )
{ {
@ -133,12 +133,12 @@ void InputMask::parseInputMask( const TQString &maskFields )
case 'D': case 'D':
case 'd': case 'd':
case '#': case '#':
s = FALSE; s = false;
break; break;
case '\\': case '\\':
escape = TRUE; escape = true;
default: default:
s = TRUE; s = true;
break; break;
} }
@ -159,52 +159,52 @@ bool InputMask::isValidInput( TQChar key, TQChar mask ) const
{ {
case 'A': case 'A':
if ( key.isLetter() && key != m_blank ) if ( key.isLetter() && key != m_blank )
return TRUE; return true;
break; break;
case 'a': case 'a':
if ( key.isLetter() || key == m_blank ) if ( key.isLetter() || key == m_blank )
return TRUE; return true;
break; break;
case 'N': case 'N':
if ( key.isLetterOrNumber() && key != m_blank ) if ( key.isLetterOrNumber() && key != m_blank )
return TRUE; return true;
break; break;
case 'n': case 'n':
if ( key.isLetterOrNumber() || key == m_blank ) if ( key.isLetterOrNumber() || key == m_blank )
return TRUE; return true;
break; break;
case 'X': case 'X':
if ( key.isPrint() && key != m_blank ) if ( key.isPrint() && key != m_blank )
return TRUE; return true;
break; break;
case 'x': case 'x':
if ( key.isPrint() || key == m_blank ) if ( key.isPrint() || key == m_blank )
return TRUE; return true;
break; break;
case '9': case '9':
if ( key.isNumber() && key != m_blank ) if ( key.isNumber() && key != m_blank )
return TRUE; return true;
break; break;
case '0': case '0':
if ( key.isNumber() || key == m_blank ) if ( key.isNumber() || key == m_blank )
return TRUE; return true;
break; break;
case 'D': case 'D':
if ( key.isNumber() && key.digitValue() > 0 && key != m_blank ) if ( key.isNumber() && key.digitValue() > 0 && key != m_blank )
return TRUE; return true;
break; break;
case 'd': case 'd':
if ( ( key.isNumber() && key.digitValue() > 0 ) || key == m_blank ) if ( ( key.isNumber() && key.digitValue() > 0 ) || key == m_blank )
return TRUE; return true;
break; break;
case '#': case '#':
if ( key.isNumber() || key == '+' || key == '-' || key == m_blank ) if ( key.isNumber() || key == '+' || key == '-' || key == m_blank )
return TRUE; return true;
break; break;
default: default:
break; break;
} }
return FALSE; return false;
} }
TQString InputMask::maskString( uint pos, const TQString &str, bool clear ) const TQString InputMask::maskString( uint pos, const TQString &str, bool clear ) const
@ -249,7 +249,7 @@ TQString InputMask::maskString( uint pos, const TQString &str, bool clear ) cons
else else
{ {
// search for separator first // search for separator first
int n = findInMask( i, TRUE, TRUE, str[ ( int ) strIndex ] ); int n = findInMask( i, true, true, str[ ( int ) strIndex ] );
if ( n != -1 ) if ( n != -1 )
{ {
if ( str.length() != 1 || i == 0 || ( i > 0 && ( !m_maskData[ i - 1 ].separator || m_maskData[ i - 1 ].maskChar != str[ ( int ) strIndex ] ) ) ) if ( str.length() != 1 || i == 0 || ( i > 0 && ( !m_maskData[ i - 1 ].separator || m_maskData[ i - 1 ].maskChar != str[ ( int ) strIndex ] ) ) )
@ -261,7 +261,7 @@ TQString InputMask::maskString( uint pos, const TQString &str, bool clear ) cons
else else
{ {
// search for valid m_blank if not // search for valid m_blank if not
n = findInMask( i, TRUE, FALSE, str[ ( int ) strIndex ] ); n = findInMask( i, true, false, str[ ( int ) strIndex ] );
if ( n != -1 ) if ( n != -1 )
{ {
s += fill.mid( i, n - i ); s += fill.mid( i, n - i );

@ -37,7 +37,7 @@ public:
private: private:
void parseInputMask( const TQString &maskFields ); void parseInputMask( const TQString &maskFields );
bool isValidInput( TQChar key, TQChar mask ) const; bool isValidInput( TQChar key, TQChar mask ) const;
TQString maskString( uint pos, const TQString &str, bool clear = FALSE ) const; TQString maskString( uint pos, const TQString &str, bool clear = false ) const;
TQString clearString( uint pos, uint len ) const; TQString clearString( uint pos, uint len ) const;
TQString stripString( const TQString &str ) const; TQString stripString( const TQString &str ) const;
int findInMask( int pos, bool forward, bool findSeparator, TQChar searchChar = TQChar() ) const; int findInMask( int pos, bool forward, bool findSeparator, TQChar searchChar = TQChar() ) const;

@ -135,7 +135,7 @@ bool KugarPart::initDoc( InitDocFlags /*flags*/, TQWidget* /*parentWidget*/ )
return ok; return ok;
// If nothing is loaded, do initialize here // If nothing is loaded, do initialize here
return TRUE; return true;
} }
KoView* KugarPart::createViewInstance( TQWidget* parent, const char* name ) KoView* KugarPart::createViewInstance( TQWidget* parent, const char* name )

@ -298,9 +298,9 @@ void KWAnchor::saveOasis( KoXmlWriter& writer, KoSavingContext& context ) const
bool KWAnchor::ownLine() const bool KWAnchor::ownLine() const
{ {
if ( m_deleted ) if ( m_deleted )
return FALSE; return false;
if ( m_frameset) if ( m_frameset)
return m_frameset->ownLine(); return m_frameset->ownLine();
return FALSE; return false;
} }

@ -105,10 +105,10 @@ KWCanvas::KWCanvas(const TQString& viewMode, TQWidget *parent, KWDocument *d, KW
m_temporaryStatusBarTextShown = false; m_temporaryStatusBarTextShown = false;
viewport()->setBackgroundMode( PaletteBase ); viewport()->setBackgroundMode( PaletteBase );
viewport()->setAcceptDrops( TRUE ); viewport()->setAcceptDrops( true );
setKeyCompression( TRUE ); setKeyCompression( true );
viewport()->setMouseTracking( TRUE ); viewport()->setMouseTracking( true );
m_scrollTimer = new TQTimer( this ); m_scrollTimer = new TQTimer( this );
connect( m_scrollTimer, TQ_SIGNAL( timeout() ), connect( m_scrollTimer, TQ_SIGNAL( timeout() ),
@ -403,7 +403,7 @@ void KWCanvas::mpCreatePixmap( const TQPoint& normalPoint, bool noGrid )
} }
emit docStructChanged(Pictures); emit docStructChanged(Pictures);
if ( !m_doc->showGrid() && m_doc->snapToGrid() ) if ( !m_doc->showGrid() && m_doc->snapToGrid() )
repaintContents( FALSE ); //draw the grid over the whole canvas repaintContents( false ); //draw the grid over the whole canvas
} }
} }
@ -812,7 +812,7 @@ void KWCanvas::contentsMouseMoveEvent( TQMouseEvent *e )
m_currentTable->resizeColumn( m_rowColResized, docPoint.x() ); m_currentTable->resizeColumn( m_rowColResized, docPoint.x() );
// Repaint only the changed rects (oldRect U newRect) // Repaint only the changed rects (oldRect U newRect)
TQRect newRect( m_viewMode->normalToView( m_doc->zoomRect( m_currentTable->boundingRect() ) ) ); TQRect newRect( m_viewMode->normalToView( m_doc->zoomRect( m_currentTable->boundingRect() ) ) );
repaintContents( TQRegion(oldRect).unite(newRect).boundingRect(), FALSE ); repaintContents( TQRegion(oldRect).unite(newRect).boundingRect(), false );
} }
else if (m_interactionPolicy) { else if (m_interactionPolicy) {
m_interactionPolicy->handleMouseMove(e->state(), m_interactionPolicy->handleMouseMove(e->state(),
@ -1127,7 +1127,7 @@ void KWCanvas::contentsMouseReleaseEvent( TQMouseEvent * e )
} }
if ( old_mouseMove != MM_EDIT && !m_doc->showGrid() && m_doc->snapToGrid() ) if ( old_mouseMove != MM_EDIT && !m_doc->showGrid() && m_doc->snapToGrid() )
repaintContents( FALSE ); //draw the grid over the whole canvas repaintContents( false ); //draw the grid over the whole canvas
m_mousePressed = false; m_mousePressed = false;
} }
} }
@ -1404,7 +1404,7 @@ void KWCanvas::setMouseMode( MouseMode newMouseMode )
m_mouseMode = newMouseMode; m_mouseMode = newMouseMode;
if ( !m_doc->showGrid() && m_doc->snapToGrid() ) if ( !m_doc->showGrid() && m_doc->snapToGrid() )
repaintContents( FALSE ); //draw the grid over the whole canvas repaintContents( false ); //draw the grid over the whole canvas
} }
else else
m_mouseMode = newMouseMode; m_mouseMode = newMouseMode;
@ -1778,11 +1778,11 @@ bool KWCanvas::eventFilter( TQObject *o, TQEvent *e )
// Activate this code (and in focusNextPreviousChild() to allow Shift+Tab // Activate this code (and in focusNextPreviousChild() to allow Shift+Tab
// out of document window. Disabled because it conflicts with Shift+Tab inside a table. // out of document window. Disabled because it conflicts with Shift+Tab inside a table.
// else if ( keyev->key() == TQt::Key_BackTab ) // else if ( keyev->key() == TQt::Key_BackTab )
// return FALSE; // return false;
else if ( keyev->key() == TDEGlobalSettings::contextMenuKey() ) { else if ( keyev->key() == TDEGlobalSettings::contextMenuKey() ) {
// The popups are not available in readonly mode, since the GUI isn't built... // The popups are not available in readonly mode, since the GUI isn't built...
if(!m_doc->isReadWrite()) return TRUE; if(!m_doc->isReadWrite()) return true;
if (m_mouseMode != MM_EDIT) return TRUE; if (m_mouseMode != MM_EDIT) return true;
KoPoint docPoint = m_doc->unzoomPoint( TQCursor::pos() ); KoPoint docPoint = m_doc->unzoomPoint( TQCursor::pos() );
if ( viewMode()->type()=="ModeText") { if ( viewMode()->type()=="ModeText") {
@ -1804,9 +1804,9 @@ bool KWCanvas::eventFilter( TQObject *o, TQEvent *e )
// around before they click or hit Enter. // around before they click or hit Enter.
if (m_frameInline) if (m_frameInline)
m_lastCaretPos = caretPos(); m_lastCaretPos = caretPos();
if (m_lastCaretPos.isNull()) return TRUE; if (m_lastCaretPos.isNull()) return true;
int page = m_doc->pageManager()->pageNumber(m_lastCaretPos); int page = m_doc->pageManager()->pageNumber(m_lastCaretPos);
if(page == -1) return TRUE; if(page == -1) return true;
TQPoint normalPoint = m_doc->zoomPoint(m_lastCaretPos); TQPoint normalPoint = m_doc->zoomPoint(m_lastCaretPos);
// Coordinate is at the very top of the caret. In the case of an // Coordinate is at the very top of the caret. In the case of an
// inline frame, adjust slightly down and to the right in order // inline frame, adjust slightly down and to the right in order
@ -1862,7 +1862,7 @@ bool KWCanvas::eventFilter( TQObject *o, TQEvent *e )
} }
else else
m_currentFrameSetEdit->keyPressEvent( keyev ); m_currentFrameSetEdit->keyPressEvent( keyev );
return TRUE; return true;
} }
// Because of the dependency on the control key, we need to update the mouse cursor here // Because of the dependency on the control key, we need to update the mouse cursor here
@ -1891,7 +1891,7 @@ bool KWCanvas::eventFilter( TQObject *o, TQEvent *e )
if ( m_currentFrameSetEdit && m_mouseMode == MM_EDIT && m_doc->isReadWrite() && !m_printing ) if ( m_currentFrameSetEdit && m_mouseMode == MM_EDIT && m_doc->isReadWrite() && !m_printing )
{ {
m_currentFrameSetEdit->keyReleaseEvent( keyev ); m_currentFrameSetEdit->keyReleaseEvent( keyev );
return TRUE; return true;
} }
} }
break; break;
@ -1923,9 +1923,9 @@ bool KWCanvas::eventFilter( TQObject *o, TQEvent *e )
bool KWCanvas::focusNextPrevChild( bool next) bool KWCanvas::focusNextPrevChild( bool next)
{ {
Q_UNUSED(next); Q_UNUSED(next);
return TRUE; // Don't allow to go out of the canvas widget by pressing "Tab" return true; // Don't allow to go out of the canvas widget by pressing "Tab"
// Don't allow to go out of the canvas widget by pressing Tab, but do allow Shift+Tab. // Don't allow to go out of the canvas widget by pressing Tab, but do allow Shift+Tab.
// if (next) return TRUE; // if (next) return true;
// return TQWidget::focusNextPrevChild( next ); // return TQWidget::focusNextPrevChild( next );
} }
@ -2372,7 +2372,7 @@ void FrameMovePolicy::handleMouseMove(TQt::ButtonState keyState, const KoPoint &
kdDebug() << " point.x()=" << point.x() << endl; */ kdDebug() << " point.x()=" << point.x() << endl; */
TQPtrList<KWTableFrameSet> tablesMoved; TQPtrList<KWTableFrameSet> tablesMoved;
tablesMoved.setAutoDelete( FALSE ); tablesMoved.setAutoDelete( false );
TQRegion repaintRegion; TQRegion repaintRegion;
KoPoint _move=m_boundingRect.topLeft() - oldBoundingRect.topLeft(); KoPoint _move=m_boundingRect.topLeft() - oldBoundingRect.topLeft();

@ -121,7 +121,7 @@ KoTextCursor * KWPasteTextCommand::execute( KoTextCursor *c )
{ {
// Create new parag // Create new parag
// Lowlevel method: // Lowlevel method:
c->splitAndInsertEmptyParag( FALSE, TRUE ); c->splitAndInsertEmptyParag( false, true );
// Highlevel method: // Highlevel method:
//c->insert( "\n", true ); //c->insert( "\n", true );
} }
@ -159,7 +159,7 @@ KoTextCursor * KWPasteTextCommand::execute( KoTextCursor *c )
KoTextFormat * defaultFormat = doc->formatCollection()->format( &f ); KoTextFormat * defaultFormat = doc->formatCollection()->format( &f );
// Last paragraph (i.e. only one in all) : some of the text might be from before the paste // Last paragraph (i.e. only one in all) : some of the text might be from before the paste
int endIndex = (item == count-1) ? c->index() : parag->string()->length() - 1; int endIndex = (item == count-1) ? c->index() : parag->string()->length() - 1;
parag->setFormat( m_idx, endIndex - m_idx, defaultFormat, TRUE ); parag->setFormat( m_idx, endIndex - m_idx, defaultFormat, true );
} }
} }
@ -176,11 +176,11 @@ KoTextCursor * KWPasteTextCommand::execute( KoTextCursor *c )
// Last paragraph: some of the text might be from before the paste // Last paragraph: some of the text might be from before the paste
int len = (item == count-1) ? c->index() : parag->string()->length(); int len = (item == count-1) ? c->index() : parag->string()->length();
// Apply default format // Apply default format
parag->setFormat( 0, len, parag->paragFormat(), TRUE ); parag->setFormat( 0, len, parag->paragFormat(), true );
parag->loadFormatting( paragElem, 0, (textFs->isMainFrameset()) ); parag->loadFormatting( paragElem, 0, (textFs->isMainFrameset()) );
} }
parag->invalidate(0); // the formatting will be done by caller (either KWTextFrameSet::pasteOasis or KoTextObject::undo/redo) parag->invalidate(0); // the formatting will be done by caller (either KWTextFrameSet::pasteOasis or KoTextObject::undo/redo)
parag->setChanged( TRUE ); parag->setChanged( true );
parag = static_cast<KWTextParag *>(parag->next()); parag = static_cast<KWTextParag *>(parag->next());
//kdDebug() << "KWPasteTextCommand::execute going to next parag: " << parag << endl; //kdDebug() << "KWPasteTextCommand::execute going to next parag: " << parag << endl;
} }

@ -503,7 +503,7 @@ bool KWDocument::initDoc(InitDocFlags flags, TQWidget* parentWidget)
m_pageHeaderFooter.ptFooterBodySpacing = 10; m_pageHeaderFooter.ptFooterBodySpacing = 10;
m_pageHeaderFooter.ptFootNoteBodySpacing = 10; m_pageHeaderFooter.ptFootNoteBodySpacing = 10;
bool ok = FALSE; bool ok = false;
if ( isEmbedded() ) if ( isEmbedded() )
{ {
@ -513,7 +513,7 @@ bool KWDocument::initDoc(InitDocFlags flags, TQWidget* parentWidget)
if ( !ok ) if ( !ok )
showLoadingErrorDialog(); showLoadingErrorDialog();
setEmpty(); setEmpty();
setModified( FALSE ); setModified( false );
return ok; return ok;
} }
else if (flags==KoDocument::InitDocEmpty) else if (flags==KoDocument::InitDocEmpty)
@ -524,7 +524,7 @@ bool KWDocument::initDoc(InitDocFlags flags, TQWidget* parentWidget)
if ( !ok ) if ( !ok )
showLoadingErrorDialog(); showLoadingErrorDialog();
setEmpty(); setEmpty();
setModified( FALSE ); setModified( false );
return ok; return ok;
} }
@ -558,7 +558,7 @@ bool KWDocument::initDoc(InitDocFlags flags, TQWidget* parentWidget)
showLoadingErrorDialog(); showLoadingErrorDialog();
setEmpty(); setEmpty();
} }
setModified( FALSE ); setModified( false );
return ok; return ok;
} }
@ -606,7 +606,7 @@ void KWDocument::initEmpty()
if ( !ok ) if ( !ok )
showLoadingErrorDialog(); showLoadingErrorDialog();
resetURL(); resetURL();
setModified( FALSE ); setModified( false );
setEmpty(); setEmpty();
} }
@ -999,10 +999,10 @@ bool KWDocument::loadChildren( KoStore *store )
TQPtrListIterator<KoDocumentChild> it( children() ); TQPtrListIterator<KoDocumentChild> it( children() );
for( ; it.current(); ++it ) { for( ; it.current(); ++it ) {
if ( !it.current()->loadDocument( store ) ) if ( !it.current()->loadDocument( store ) )
return FALSE; return false;
} }
return TRUE; return true;
} }
void KWDocument::loadPictureMap ( TQDomElement& domElement ) void KWDocument::loadPictureMap ( TQDomElement& domElement )
@ -3699,7 +3699,7 @@ TQValueList<KoPictureKey> KWDocument::savePictureList()
bool KWDocument::completeSaving( KoStore *store ) bool KWDocument::completeSaving( KoStore *store )
{ {
if ( !store ) if ( !store )
return TRUE; return true;
TQString u = KURL( url() ).path(); TQString u = KURL( url() ).path();
@ -3876,7 +3876,7 @@ KWPartFrameSet* KWDocument::insertObject( const KoRect& rect, KoDocumentEntry& e
return 0; return 0;
KWDocumentChild* ch = createChildDoc( rect, doc ); KWDocumentChild* ch = createChildDoc( rect, doc );
setModified( TRUE ); setModified( true );
KWPartFrameSet *frameset = new KWPartFrameSet( this, ch, TQString() ); KWPartFrameSet *frameset = new KWPartFrameSet( this, ch, TQString() );
KWFrame *frame = new KWFrame(frameset, rect.x(), rect.y(), rect.width(), rect.height() ); KWFrame *frame = new KWFrame(frameset, rect.x(), rect.y(), rect.width(), rect.height() );
@ -4103,7 +4103,7 @@ kdDebug() << "KWDocument::canRemovePage " << num<< endl;
return false; return false;
} }
#ifdef DEBUG_PAGES #ifdef DEBUG_PAGES
kdDebug(32002) << "KWDocument::canRemovePage " << num << "-> TRUE" << endl; kdDebug(32002) << "KWDocument::canRemovePage " << num << "-> true" << endl;
#endif #endif
return true; return true;
} }

@ -857,7 +857,7 @@ void KWFrameDia::setupTab3(){ // TAB Frameset
item->setText( 1, fs->name() ); item->setText( 1, fs->name() );
amount++; amount++;
if( m_frame && m_frame->frameSet() == fs ) { if( m_frame && m_frame->frameSet() == fs ) {
m_lFrameSList->setSelected(item, TRUE ); m_lFrameSList->setSelected(item, true );
m_oldFrameSetName = fs->name(); m_oldFrameSetName = fs->name();
m_rExistingFrameset->setChecked(true); m_rExistingFrameset->setChecked(true);
} }

@ -76,7 +76,7 @@ public:
virtual FrameSetType type() const { return FT_BASE; } virtual FrameSetType type() const { return FT_BASE; }
virtual void addTextFrameSets( TQPtrList<KWTextFrameSet> & /*lst*/, bool /*onlyReadWrite*/ = false ) {}; virtual void addTextFrameSets( TQPtrList<KWTextFrameSet> & /*lst*/, bool /*onlyReadWrite*/ = false ) {};
virtual bool ownLine() const { return FALSE;} virtual bool ownLine() const { return false;}
/** The different types of textFramesets (that TEXT is important here!) /** The different types of textFramesets (that TEXT is important here!)
* FI_BODY = normal text frames.<br> * FI_BODY = normal text frames.<br>

@ -50,7 +50,7 @@ KWImportStyleDia::~KWImportStyleDia()
void KWImportStyleDia::loadFile() void KWImportStyleDia::loadFile()
{ {
KFileDialog fd( TQString(), TQString(), 0, 0, TRUE ); KFileDialog fd( TQString(), TQString(), 0, 0, true );
TQStringList lst = "application/x-kword"; TQStringList lst = "application/x-kword";
#if 0 #if 0
lst << "application/vnd.oasis.opendocument.text"; lst << "application/vnd.oasis.opendocument.text";
@ -206,7 +206,7 @@ TQString KWImportFrameTableStyleDia::generateStyleName( const TQString & templat
void KWImportFrameTableStyleDia::loadFile() void KWImportFrameTableStyleDia::loadFile()
{ {
KFileDialog fd( TQString(), TQString(), 0, 0, TRUE ); KFileDialog fd( TQString(), TQString(), 0, 0, true );
TQStringList lst = "application/x-kword"; TQStringList lst = "application/x-kword";
#if 0 #if 0
lst << "application/vnd.oasis.opendocument.text"; lst << "application/vnd.oasis.opendocument.text";

@ -28,17 +28,17 @@
#include <tqvbox.h> #include <tqvbox.h>
KWInsertPageDia::KWInsertPageDia( TQWidget *parent, const char* name ) KWInsertPageDia::KWInsertPageDia( TQWidget *parent, const char* name )
: KDialogBase( parent, name,TRUE,i18n("Insert Page"),Ok|Cancel ) : KDialogBase( parent, name,true,i18n("Insert Page"),Ok|Cancel )
{ {
TQVBox *page = makeVBoxMainWidget(); TQVBox *page = makeVBoxMainWidget();
TQButtonGroup *grp = new TQButtonGroup( 1, TQt::Horizontal, i18n( "Insert Page" ),page ); TQButtonGroup *grp = new TQButtonGroup( 1, TQt::Horizontal, i18n( "Insert Page" ),page );
grp->setRadioButtonExclusive( TRUE ); grp->setRadioButtonExclusive( true );
grp->layout(); grp->layout();
m_after = new TQRadioButton( i18n("After"), grp ); m_after = new TQRadioButton( i18n("After"), grp );
m_before = new TQRadioButton( i18n("Before"), grp ); m_before = new TQRadioButton( i18n("Before"), grp );
grp->setRadioButtonExclusive( TRUE ); grp->setRadioButtonExclusive( true );
m_after->setChecked( true ); m_after->setChecked( true );
resize( 200, 150 ); resize( 200, 150 );
setFocus(); setFocus();

@ -150,7 +150,7 @@ KoPicture KWInsertPicDia::selectPictureDia( const TQString & _path, TQWidget* pa
TQStringList mimetypes ( KImageIO::mimeTypes( KImageIO::Reading ) ); TQStringList mimetypes ( KImageIO::mimeTypes( KImageIO::Reading ) );
mimetypes += KoPictureFilePreview::clipartMimeTypes(); mimetypes += KoPictureFilePreview::clipartMimeTypes();
KFileDialog fd( _path, TQString(), parent, 0, TRUE ); KFileDialog fd( _path, TQString(), parent, 0, true );
fd.setMimeFilter( mimetypes ); fd.setMimeFilter( mimetypes );
fd.setCaption(i18n("Choose Picture")); fd.setCaption(i18n("Choose Picture"));
return selectPicture( fd, parent ); return selectPicture( fd, parent );

@ -28,17 +28,17 @@
#include <tqvbox.h> #include <tqvbox.h>
KWSortDia::KWSortDia( TQWidget *parent, const char* name ) KWSortDia::KWSortDia( TQWidget *parent, const char* name )
: KDialogBase( parent, name,TRUE,i18n("Sort Text"),Ok|Cancel ) : KDialogBase( parent, name,true,i18n("Sort Text"),Ok|Cancel )
{ {
TQVBox *page = makeVBoxMainWidget(); TQVBox *page = makeVBoxMainWidget();
TQButtonGroup *grp = new TQButtonGroup( 1, TQt::Horizontal, i18n( "Sort" ),page ); TQButtonGroup *grp = new TQButtonGroup( 1, TQt::Horizontal, i18n( "Sort" ),page );
grp->setRadioButtonExclusive( TRUE ); grp->setRadioButtonExclusive( true );
grp->layout(); grp->layout();
m_increase = new TQRadioButton( i18n("Increase"), grp ); m_increase = new TQRadioButton( i18n("Increase"), grp );
m_decrease = new TQRadioButton( i18n("Decrease"), grp ); m_decrease = new TQRadioButton( i18n("Decrease"), grp );
grp->setRadioButtonExclusive( TRUE ); grp->setRadioButtonExclusive( true );
m_increase->setChecked( true ); m_increase->setChecked( true );
resize( 200, 150 ); resize( 200, 150 );
setFocus(); setFocus();

@ -120,7 +120,7 @@ void KWTableDia::setupTab1( int rows, int cols, CellSize wid, CellSize hei, bool
lHei = new TQLabel( i18n( "Cell heights:" ), tab1 ); lHei = new TQLabel( i18n( "Cell heights:" ), tab1 );
grid->addWidget( lHei, 4, 0 ); grid->addWidget( lHei, 4, 0 );
cHei = new TQComboBox( FALSE, tab1 ); cHei = new TQComboBox( false, tab1 );
cHei->insertItem( i18n( "Automatic" ) ); cHei->insertItem( i18n( "Automatic" ) );
cHei->insertItem( i18n( "Manual" ) ); cHei->insertItem( i18n( "Manual" ) );
cHei->setCurrentItem( (int)hei ); cHei->setCurrentItem( (int)hei );
@ -129,7 +129,7 @@ void KWTableDia::setupTab1( int rows, int cols, CellSize wid, CellSize hei, bool
lWid = new TQLabel( i18n( "Cell widths:" ), tab1 ); lWid = new TQLabel( i18n( "Cell widths:" ), tab1 );
grid->addWidget( lWid, 6, 0 ); grid->addWidget( lWid, 6, 0 );
cWid = new TQComboBox( FALSE, tab1 ); cWid = new TQComboBox( false, tab1 );
cWid->insertItem( i18n( "Automatic" ) ); cWid->insertItem( i18n( "Automatic" ) );
cWid->insertItem( i18n( "Manual" ) ); cWid->insertItem( i18n( "Manual" ) );
cWid->setCurrentItem( (int)wid ); cWid->setCurrentItem( (int)wid );

@ -44,7 +44,7 @@ public:
~KWTextDocument(); ~KWTextDocument();
virtual KoTextParag * createParag( KoTextDocument *d, KoTextParag *pr = 0, KoTextParag *nx = 0, bool updateIds = TRUE ); virtual KoTextParag * createParag( KoTextDocument *d, KoTextParag *pr = 0, KoTextParag *nx = 0, bool updateIds = true );
/** Return the text frameset in which this document is. /** Return the text frameset in which this document is.
* Note that this can be 0L (e.g. for paragraphs in the paragdia preview) */ * Note that this can be 0L (e.g. for paragraphs in the paragdia preview) */

@ -806,7 +806,7 @@ void KWTextFrameSet::drawCursor( TQPainter *p, KoTextCursor *cursor, bool cursor
TQMAX(0, iPoint.x() - 5), // negative values create problems TQMAX(0, iPoint.x() - 5), // negative values create problems
iPoint.y(), clip.width(), clip.height(), iPoint.y(), clip.width(), clip.height(),
pix, cg, m_doc, // TODO view's zoom handler pix, cg, m_doc, // TODO view's zoom handler
cursorVisible, cursor, FALSE /*resetChanged*/, drawingFlags ); cursorVisible, cursor, false /*resetChanged*/, drawingFlags );
if ( wasChanged ) // Maybe we have more changes to draw, than those in the small cliprect if ( wasChanged ) // Maybe we have more changes to draw, than those in the small cliprect
parag->setLineChanged( oldLineChanged ); // -1 = all parag->setLineChanged( oldLineChanged ); // -1 = all
@ -1540,7 +1540,7 @@ KWFrame * KWTextFrameSet::internalToDocument( const KoPoint &relPoint, KoPoint &
int n2 = len - 1; int n2 = len - 1;
double internalY = 0.0; double internalY = 0.0;
int mid = 0; int mid = 0;
bool found = FALSE; bool found = false;
while ( n1 <= n2 ) { while ( n1 <= n2 ) {
double res; double res;
mid = (n1 + n2)/2; mid = (n1 + n2)/2;
@ -3506,7 +3506,7 @@ void KWTextFrameSetEdit::mousePressEvent( TQMouseEvent *e, const TQPoint &, cons
if ( addParag ) if ( addParag )
frameSet()->kWordDocument()->setModified(true ); frameSet()->kWordDocument()->setModified(true );
} }
// else mightStartDrag = FALSE; necessary? // else mightStartDrag = false; necessary?
if ( e->button() != TQt::LeftButton ) if ( e->button() != TQt::LeftButton )
return; return;

@ -592,7 +592,7 @@ void KWTextParag::load( TQDomElement &attributes )
//kdDebug() << "KWTextParag::load '" << element.text() << "'" << endl; //kdDebug() << "KWTextParag::load '" << element.text() << "'" << endl;
append( element.text() ); append( element.text() );
// Apply default format - this should be automatic !! // Apply default format - this should be automatic !!
setFormat( 0, string()->length(), paragFormat(), TRUE ); setFormat( 0, string()->length(), paragFormat(), true );
} }
if ( attributes.attribute( "toc" ) == "true" ) if ( attributes.attribute( "toc" ) == "true" )

@ -40,7 +40,7 @@ typedef KoParagLayout KWParagLayout;
class KWTextParag : public KoTextParag class KWTextParag : public KoTextParag
{ {
public: public:
KWTextParag( KoTextDocument *d, KoTextParag *pr = 0, KoTextParag *nx = 0, bool updateIds = TRUE ) KWTextParag( KoTextDocument *d, KoTextParag *pr = 0, KoTextParag *nx = 0, bool updateIds = true )
: KoTextParag( d, pr, nx, updateIds ) { } : KoTextParag( d, pr, nx, updateIds ) { }
~KWTextParag() { } ~KWTextParag() { }

@ -270,8 +270,8 @@ KWView::KWView( const TQString& viewMode, TQWidget *parent, const char *name, KW
TQObject::connect( this, TQ_SIGNAL( embeddImage( const TQString & ) ), TQObject::connect( this, TQ_SIGNAL( embeddImage( const TQString & ) ),
this, TQ_SLOT( slotEmbedImage( const TQString & ) ) ); this, TQ_SLOT( slotEmbedImage( const TQString & ) ) );
setKeyCompression( TRUE ); setKeyCompression( true );
setAcceptDrops( TRUE ); setAcceptDrops( true );
setupActions(); setupActions();
@ -501,7 +501,7 @@ void KWView::initGui()
m_gui->canvasWidget()->setMouseMode( m_gui->canvasWidget()->mouseMode() ); m_gui->canvasWidget()->setMouseMode( m_gui->canvasWidget()->mouseMode() );
bool editingFormula = dynamic_cast<KWFormulaFrameSetEdit *>( m_gui->canvasWidget()->currentFrameSetEdit() ) != 0; bool editingFormula = dynamic_cast<KWFormulaFrameSetEdit *>( m_gui->canvasWidget()->currentFrameSetEdit() ) != 0;
//showFormulaToolbar( FALSE ); // not called, to avoid creating the formula-document if not necessary //showFormulaToolbar( false ); // not called, to avoid creating the formula-document if not necessary
if(shell()) if(shell())
shell()->showToolbar( "formula_toolbar", editingFormula ); shell()->showToolbar( "formula_toolbar", editingFormula );
@ -929,7 +929,7 @@ void KWView::setupActions()
this, TQ_SLOT( textAlignLeft() ), this, TQ_SLOT( textAlignLeft() ),
actionCollection(), "format_alignleft" ); actionCollection(), "format_alignleft" );
m_actionFormatAlignLeft->setExclusiveGroup( "align" ); m_actionFormatAlignLeft->setExclusiveGroup( "align" );
m_actionFormatAlignLeft->setChecked( TRUE ); m_actionFormatAlignLeft->setChecked( true );
m_actionFormatAlignCenter = new TDEToggleAction( i18n( "Align &Center" ), "text_center", TQt::CTRL + TQt::ALT + TQt::Key_C, m_actionFormatAlignCenter = new TDEToggleAction( i18n( "Align &Center" ), "text_center", TQt::CTRL + TQt::ALT + TQt::Key_C,
this, TQ_SLOT( textAlignCenter() ), this, TQ_SLOT( textAlignCenter() ),
actionCollection(), "format_aligncenter" ); actionCollection(), "format_aligncenter" );
@ -1448,7 +1448,7 @@ void KWView::loadexpressionActions( TDEActionMenu * parentMenu)
} }
} }
//TQStringList files = KWFactory::instance()->dirs()->findAllResources( "expression", "*.xml", TRUE ); //TQStringList files = KWFactory::instance()->dirs()->findAllResources( "expression", "*.xml", true );
int i = 0; int i = 0;
int nbFile = 0; int nbFile = 0;
for( TQStringList::Iterator it = files.begin(); it != files.end(); ++it,nbFile++ ) for( TQStringList::Iterator it = files.begin(); it != files.end(); ++it,nbFile++ )
@ -1820,22 +1820,22 @@ void KWView::print( KPrinter &prt )
//kdDebug() << "KWView::print metrics: " << metrics.logicalDpiX() << "," << metrics.logicalDpiY() << endl; //kdDebug() << "KWView::print metrics: " << metrics.logicalDpiX() << "," << metrics.logicalDpiY() << endl;
//kdDebug() << "x11AppDPI: " << KoGlobal::dpiX() << "," << KoGlobal::dpiY() << endl; //kdDebug() << "x11AppDPI: " << KoGlobal::dpiX() << "," << KoGlobal::dpiY() << endl;
bool serialLetter = FALSE; bool serialLetter = false;
TQPtrList<KoVariable> vars = m_doc->variableCollection()->getVariables(); TQPtrList<KoVariable> vars = m_doc->variableCollection()->getVariables();
KoVariable *v = 0; KoVariable *v = 0;
for ( v = vars.first(); v; v = vars.next() ) { for ( v = vars.first(); v; v = vars.next() ) {
if ( v->type() == VT_MAILMERGE ) { if ( v->type() == VT_MAILMERGE ) {
serialLetter = TRUE; serialLetter = true;
break; break;
} }
} }
if ( !m_doc->mailMergeDataBase() ) serialLetter=FALSE; if ( !m_doc->mailMergeDataBase() ) serialLetter=false;
else else
{ {
m_doc->mailMergeDataBase()->refresh(false); m_doc->mailMergeDataBase()->refresh(false);
if (m_doc->mailMergeDataBase()->getNumRecords() == 0 ) serialLetter = FALSE; if (m_doc->mailMergeDataBase()->getNumRecords() == 0 ) serialLetter = false;
} }
//float left_margin = 0.0; //float left_margin = 0.0;
@ -2006,16 +2006,16 @@ void KWView::showAlign( int align ) {
kdWarning() << k_funcinfo << "shouldn't be called with AlignAuto" << endl; kdWarning() << k_funcinfo << "shouldn't be called with AlignAuto" << endl;
// fallthrough // fallthrough
case TQt::AlignLeft: case TQt::AlignLeft:
m_actionFormatAlignLeft->setChecked( TRUE ); m_actionFormatAlignLeft->setChecked( true );
break; break;
case TQt::AlignHCenter: case TQt::AlignHCenter:
m_actionFormatAlignCenter->setChecked( TRUE ); m_actionFormatAlignCenter->setChecked( true );
break; break;
case TQt::AlignRight: case TQt::AlignRight:
m_actionFormatAlignRight->setChecked( TRUE ); m_actionFormatAlignRight->setChecked( true );
break; break;
case TQt::AlignJustify: case TQt::AlignJustify:
m_actionFormatAlignBlock->setChecked( TRUE ); m_actionFormatAlignBlock->setChecked( true );
break; break;
} }
} }
@ -2024,18 +2024,18 @@ void KWView::showSpacing( int spacing ) {
switch ( spacing ) switch ( spacing )
{ {
case KoParagLayout::LS_SINGLE: case KoParagLayout::LS_SINGLE:
m_actionFormatSpacingSingle->setChecked( TRUE ); m_actionFormatSpacingSingle->setChecked( true );
break; break;
case KoParagLayout::LS_ONEANDHALF: case KoParagLayout::LS_ONEANDHALF:
m_actionFormatSpacingOneAndHalf->setChecked( TRUE ); m_actionFormatSpacingOneAndHalf->setChecked( true );
break; break;
case KoParagLayout::LS_DOUBLE: case KoParagLayout::LS_DOUBLE:
m_actionFormatSpacingDouble->setChecked( TRUE ); m_actionFormatSpacingDouble->setChecked( true );
break; break;
default: default:
m_actionFormatSpacingSingle->setChecked( FALSE ); m_actionFormatSpacingSingle->setChecked( false );
m_actionFormatSpacingOneAndHalf->setChecked( FALSE ); m_actionFormatSpacingOneAndHalf->setChecked( false );
m_actionFormatSpacingDouble->setChecked( FALSE ); m_actionFormatSpacingDouble->setChecked( false );
} }
} }
@ -2164,10 +2164,10 @@ void KWView::showMouseMode( int mouseMode )
break; break;
} }
m_actionTableJoinCells->setEnabled( FALSE ); m_actionTableJoinCells->setEnabled( false );
m_actionTableSplitCells->setEnabled( FALSE ); m_actionTableSplitCells->setEnabled( false );
m_actionTableProtectCells->setEnabled( false ); m_actionTableProtectCells->setEnabled( false );
m_actionFormatFrameSet->setEnabled(FALSE); m_actionFormatFrameSet->setEnabled(false);
m_actionTablePropertiesMenu->setEnabled( false ); m_actionTablePropertiesMenu->setEnabled( false );
m_actionConvertTableToText->setEnabled( false ); m_actionConvertTableToText->setEnabled( false );
} }
@ -2914,7 +2914,7 @@ void KWView::editMailMergeDataBase()
KWMailMergeEditor *dia = new KWMailMergeEditor( this, m_doc->mailMergeDataBase() ); KWMailMergeEditor *dia = new KWMailMergeEditor( this, m_doc->mailMergeDataBase() );
dia->exec(); dia->exec();
// Don't know if we really need this so it's commented out (SL) // Don't know if we really need this so it's commented out (SL)
// m_gui->canvasWidget()->repaintAll( FALSE ); // m_gui->canvasWidget()->repaintAll( false );
delete dia; delete dia;
#endif #endif
} }
@ -5677,7 +5677,7 @@ void KWView::spellCheckerRemoveHighlight()
} }
KWTextFrameSetEdit * edit = currentTextEdit(); KWTextFrameSetEdit * edit = currentTextEdit();
if (edit) if (edit)
edit->drawCursor( TRUE ); edit->drawCursor( true );
} }
void KWView::spellAddAutoCorrect (const TQString & originalword, const TQString & newword) void KWView::spellAddAutoCorrect (const TQString & originalword, const TQString & newword)
@ -6029,7 +6029,7 @@ void KWView::setViewFrameBorders(bool b)
bool KWView::doubleClickActivation() const bool KWView::doubleClickActivation() const
{ {
return TRUE; return true;
} }
TQWidget* KWView::canvas() const TQWidget* KWView::canvas() const
@ -6104,7 +6104,7 @@ void KWView::savePicture()
kdDebug() << "Picture has mime type: " << mimetype << endl; kdDebug() << "Picture has mime type: " << mimetype << endl;
TQStringList mimetypes; TQStringList mimetypes;
mimetypes << mimetype; mimetypes << mimetype;
KFileDialog fd( oldFile, TQString(), this, 0, TRUE ); KFileDialog fd( oldFile, TQString(), this, 0, true );
fd.setMimeFilter( mimetypes ); fd.setMimeFilter( mimetypes );
fd.setCaption(i18n("Save Picture")); fd.setCaption(i18n("Save Picture"));
fd.setOperationMode(KFileDialog::Saving); fd.setOperationMode(KFileDialog::Saving);
@ -6732,7 +6732,7 @@ void KWView::docStructSpeak()
void KWView::insertFile() void KWView::insertFile()
{ {
KFileDialog fd( TQString(), TQString(), this, 0, TRUE ); KFileDialog fd( TQString(), TQString(), this, 0, true );
fd.setMimeFilter( "application/x-kword" ); fd.setMimeFilter( "application/x-kword" );
fd.setCaption(i18n("Insert File")); fd.setCaption(i18n("Insert File"));
KURL url; KURL url;
@ -7660,8 +7660,8 @@ KWGUI::KWGUI( const TQString& viewMode, TQWidget *parent, KWView *daView )
connect( m_horRuler, TQ_SIGNAL( tabListChanged( const KoTabulatorList & ) ), m_view, connect( m_horRuler, TQ_SIGNAL( tabListChanged( const KoTabulatorList & ) ), m_view,
TQ_SLOT( tabListChanged( const KoTabulatorList & ) ) ); TQ_SLOT( tabListChanged( const KoTabulatorList & ) ) );
setKeyCompression( TRUE ); setKeyCompression( true );
setAcceptDrops( TRUE ); setAcceptDrops( true );
setFocusPolicy( TQWidget::NoFocus ); setFocusPolicy( TQWidget::NoFocus );
} }

@ -244,7 +244,7 @@ KWClassicMailMergeEditorList::KWClassicMailMergeEditorList( TQWidget *parent, KW
setSorting( -1 ); setSorting( -1 );
addColumn( i18n( "Name" ) ); addColumn( i18n( "Name" ) );
addColumn( i18n( "Value" ) ); addColumn( i18n( "Value" ) );
header()->setMovingEnabled( FALSE ); header()->setMovingEnabled( false );
connect( header(), TQ_SIGNAL( sizeChange( int, int, int ) ), connect( header(), TQ_SIGNAL( sizeChange( int, int, int ) ),
this, TQ_SLOT( columnSizeChange( int, int, int ) ) ); this, TQ_SLOT( columnSizeChange( int, int, int ) ) );
// connect( header(), TQ_SIGNAL( sectionClicked( int ) ), // connect( header(), TQ_SIGNAL( sectionClicked( int ) ),
@ -546,7 +546,7 @@ void KWClassicMailMergeEditor::removeRecord()
} else } else
{ {
dbList->clear(); dbList->clear();
records->setEnabled( FALSE ); records->setEnabled( false );
} }
if ( db->getNumRecords() == 0 ) if ( db->getNumRecords() == 0 )

@ -114,7 +114,7 @@ public:
void updateItems(); void updateItems();
void displayRecord( int i ); void displayRecord( int i );
void setSorting( int, bool increasing = TRUE ) { void setSorting( int, bool increasing = true ) {
TQListView::setSorting( -1, increasing ); TQListView::setSorting( -1, increasing );
} }

@ -38,7 +38,7 @@ class KWMySqlCursor: public TQSqlCursor
{ {
public: public:
KWMySqlCursor( const TQString & query = TQString(), bool autopopulate = KWMySqlCursor( const TQString & query = TQString(), bool autopopulate =
TRUE, TQSqlDatabase* db = 0 ): TQSqlCursor( TQString(), autopopulate, db ) true, TQSqlDatabase* db = 0 ): TQSqlCursor( TQString(), autopopulate, db )
{ {
exec( query ); exec( query );
if ( autopopulate ) if ( autopopulate )
@ -47,7 +47,7 @@ TRUE, TQSqlDatabase* db = 0 ): TQSqlCursor( TQString(), autopopulate, db )
setMode( TQSqlCursor::ReadOnly ); setMode( TQSqlCursor::ReadOnly );
} }
KWMySqlCursor( const KWMySqlCursor & other ): TQSqlCursor( other ) {} KWMySqlCursor( const KWMySqlCursor & other ): TQSqlCursor( other ) {}
KWMySqlCursor( const TQSqlQuery & query, bool autopopulate = TRUE ): KWMySqlCursor( const TQSqlQuery & query, bool autopopulate = true ):
TQSqlCursor( TQString(), autopopulate ) TQSqlCursor( TQString(), autopopulate )
{ {
*(TQSqlQuery*)this = query; *(TQSqlQuery*)this = query;
@ -57,12 +57,12 @@ TQSqlCursor( TQString(), autopopulate )
} }
bool select( const TQString & /*filter*/, const TQSqlIndex & /*sort*/ = bool select( const TQString & /*filter*/, const TQSqlIndex & /*sort*/ =
TQSqlIndex() ) { return exec( lastQuery() ); } TQSqlIndex() ) { return exec( lastQuery() ); }
TQSqlIndex primaryIndex( bool /*prime*/ = TRUE ) const { return TQSqlIndex primaryIndex( bool /*prime*/ = true ) const { return
TQSqlIndex(); } TQSqlIndex(); }
int insert( bool /*invalidate*/ = TRUE ) { return FALSE; } int insert( bool /*invalidate*/ = true ) { return false; }
int update( bool /*invalidate*/ = TRUE ) { return FALSE; } int update( bool /*invalidate*/ = true ) { return false; }
int del( bool /*invalidate*/ = TRUE ) { return FALSE; } int del( bool /*invalidate*/ = true ) { return false; }
void setName( const TQString& /*name*/, bool /*autopopulate*/ = TRUE ) {} void setName( const TQString& /*name*/, bool /*autopopulate*/ = true ) {}
}; };

@ -104,7 +104,7 @@ void SymbolComboItem::paint( TQPainter *p )
SymbolAction::SymbolAction( TQObject* parent, const char* name ) SymbolAction::SymbolAction( TQObject* parent, const char* name )
: TDESelectAction( parent, name ) : TDESelectAction( parent, name )
{ {
setEditable( FALSE ); setEditable( false );
} }
SymbolAction::SymbolAction( const TQString& text, const TDEShortcut& cut, SymbolAction::SymbolAction( const TQString& text, const TDEShortcut& cut,
@ -112,7 +112,7 @@ SymbolAction::SymbolAction( const TQString& text, const TDEShortcut& cut,
TQObject* parent, const char* name ) TQObject* parent, const char* name )
: TDESelectAction( text, cut, receiver, slot, parent, name ) : TDESelectAction( text, cut, receiver, slot, parent, name )
{ {
setEditable( FALSE ); setEditable( false );
} }
int SymbolAction::plug( TQWidget* w, int index ) int SymbolAction::plug( TQWidget* w, int index )

@ -230,7 +230,7 @@ KoDocument::KoDocument( TQWidget * parentWidget, const char *widgetName, TQObjec
s_documentList->append(this); s_documentList->append(this);
d = new Private; d = new Private;
m_bEmpty = TRUE; m_bEmpty = true;
connect( &d->m_autoSaveTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotAutoSave() ) ); connect( &d->m_autoSaveTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotAutoSave() ) );
setAutoSave( s_defaultAutoSave ); setAutoSave( s_defaultAutoSave );
d->m_bSingleViewMode = singleViewMode; d->m_bSingleViewMode = singleViewMode;
@ -825,7 +825,7 @@ void KoDocument::paintChild( KoDocumentChild *child, TQPainter &painter, KoView
manager->activeWidget() == (TQWidget *)view ) ) manager->activeWidget() == (TQWidget *)view ) )
{ {
// painter.setClipRegion( rgn ); // painter.setClipRegion( rgn );
painter.setClipping( FALSE ); painter.setClipping( false );
painter.setPen( black ); painter.setPen( black );
painter.fillRect( -5, -5, w + 10, 5, white ); painter.fillRect( -5, -5, w + 10, 5, white );
@ -855,7 +855,7 @@ void KoDocument::paintChild( KoDocumentChild *child, TQPainter &painter, KoView
painter.fillRect( w, h / 2 - 3, 5, 5, color ); painter.fillRect( w, h / 2 - 3, 5, 5, color );
} }
painter.setClipping( TRUE ); painter.setClipping( true );
} }
} }
} }
@ -891,7 +891,7 @@ bool KoDocument::saveChildren( KoStore* _store )
{ {
//kdDebug(30003) << "KoDocument::saveChildren internal url: /" << i << endl; //kdDebug(30003) << "KoDocument::saveChildren internal url: /" << i << endl;
if ( !childDoc->saveToStore( _store, TQString::number( i++ ) ) ) if ( !childDoc->saveToStore( _store, TQString::number( i++ ) ) )
return FALSE; return false;
if (!isExporting ()) if (!isExporting ())
childDoc->setModified( false ); childDoc->setModified( false );
@ -1968,7 +1968,7 @@ void KoDocument::setModified( bool mod )
KParts::ReadWritePart::setModified( mod ); KParts::ReadWritePart::setModified( mod );
if ( mod ) { if ( mod ) {
m_bEmpty = FALSE; m_bEmpty = false;
} else { } else {
// When saving this document, all non-external child documents get saved too. // When saving this document, all non-external child documents get saved too.
TQPtrListIterator<KoDocumentChild> it = children(); TQPtrListIterator<KoDocumentChild> it = children();
@ -2278,15 +2278,15 @@ void KoDocument::setupXmlReader( TQXmlSimpleReader& reader, bool namespaceProces
{ {
if ( namespaceProcessing ) if ( namespaceProcessing )
{ {
reader.setFeature( "http://xml.org/sax/features/namespaces", TRUE ); reader.setFeature( "http://xml.org/sax/features/namespaces", true );
reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", FALSE ); reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", false );
} }
else else
{ {
reader.setFeature( "http://xml.org/sax/features/namespaces", FALSE ); reader.setFeature( "http://xml.org/sax/features/namespaces", false );
reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", TRUE ); reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", true );
} }
reader.setFeature( "http://trolltech.com/xml/features/report-whitespace-only-CharData", TRUE ); reader.setFeature( "http://trolltech.com/xml/features/report-whitespace-only-CharData", true );
} }

@ -158,7 +158,7 @@ bool KoDocumentChild::load( const TQDomElement& element, bool uppercase )
return false; return false;
} }
bool brect = FALSE; bool brect = false;
TQDomNode n = element.firstChild(); TQDomNode n = element.firstChild();
for( ; !n.isNull(); n = n.nextSibling() ) for( ; !n.isNull(); n = n.nextSibling() )
{ {

@ -64,12 +64,12 @@ k_dcop:
void openURL( TQString url ); void openURL( TQString url );
/** /**
* @return TRUE is the document is still loading * @return true is the document is still loading
*/ */
bool isLoading(); bool isLoading();
/** /**
* @return TRUE is the document has been modified * @return true is the document has been modified
*/ */
bool isModified(); bool isModified();

@ -106,7 +106,7 @@ public:
void showToolbar( const char * tbName, bool shown ); void showToolbar( const char * tbName, bool shown );
/** /**
* @return TRUE if the toolbar @p tbName is visible * @return true if the toolbar @p tbName is visible
*/ */
bool toolbarIsVisible(const char *tbName); bool toolbarIsVisible(const char *tbName);
@ -130,7 +130,7 @@ public:
* Load the desired document and show it. * Load the desired document and show it.
* @param url the URL to open * @param url the URL to open
* *
* @return TRUE on success. * @return true on success.
*/ */
virtual bool openDocument( const KURL & url ); virtual bool openDocument( const KURL & url );
@ -309,11 +309,11 @@ protected: // protected methods are mostly for koshell, it's the only one derivi
/** /**
* Saves the document, asking for a filename if necessary. * Saves the document, asking for a filename if necessary.
* *
* @param saveas if set to TRUE the user is always prompted for a filename * @param saveas if set to true the user is always prompted for a filename
* *
* @param silent if set to TRUE rootDocument()->setTitleModified will not be called. * @param silent if set to true rootDocument()->setTitleModified will not be called.
* *
* @return TRUE on success, false on error or cancel * @return true on success, false on error or cancel
* (don't display anything in this case, the error dialog box is also implemented here * (don't display anything in this case, the error dialog box is also implemented here
* but restore the original URL in slotFileSaveAs) * but restore the original URL in slotFileSaveAs)
*/ */

@ -194,7 +194,7 @@ public:
TQImage generateImage(const TQSize& size); TQImage generateImage(const TQSize& size);
/** /**
* @return TRUE if the alpha channel processing has been enabled * @return true if the alpha channel processing has been enabled
*/ */
bool hasAlphaBuffer() const; bool hasAlphaBuffer() const;

@ -46,7 +46,7 @@ public:
KService::Ptr service() const { return m_service; } KService::Ptr service() const { return m_service; }
/** /**
* @return TRUE if the service pointer is null * @return true if the service pointer is null
*/ */
bool isEmpty() const { return m_service == 0L; } bool isEmpty() const { return m_service == 0L; }
@ -61,7 +61,7 @@ public:
TQStringList mimeTypes() const { return m_service->serviceTypes(); } TQStringList mimeTypes() const { return m_service->serviceTypes(); }
/** /**
* @return TRUE if the document can handle the requested mimetype. * @return true if the document can handle the requested mimetype.
*/ */
bool supportsMimeType( const TQString & _mimetype ) const bool supportsMimeType( const TQString & _mimetype ) const
{ return mimeTypes().contains( _mimetype ); } { return mimeTypes().contains( _mimetype ); }
@ -149,13 +149,13 @@ public:
TQString available; TQString available;
/** /**
* @return TRUE if the filter can import the requested mimetype. * @return true if the filter can import the requested mimetype.
*/ */
bool imports( const TQString& _mimetype ) const bool imports( const TQString& _mimetype ) const
{ return ( import.contains( _mimetype ) ); } { return ( import.contains( _mimetype ) ); }
/** /**
* @return TRUE if the filter can export the requested mimetype. * @return true if the filter can export the requested mimetype.
*/ */
bool exports( const TQString& _m ) const bool exports( const TQString& _m ) const
{ return ( export_.contains( _m ) ); } { return ( export_.contains( _m ) ); }

@ -563,7 +563,7 @@ void KoView::slotChildActivated( bool a )
// #### HACK // #### HACK
// We want to delete as many views as possible and this // We want to delete as many views as possible and this
// trick is used to go upwards in the view-tree. // trick is used to go upwards in the view-tree.
emit activated( FALSE ); emit activated( false );
} }
void KoView::slotChildChanged( KoDocumentChild *child ) void KoView::slotChildChanged( KoDocumentChild *child )
@ -658,12 +658,12 @@ bool KoView::isInOperation() const
void KoView::beginOperation() void KoView::beginOperation()
{ {
d->m_inOperation = true; d->m_inOperation = true;
canvas()->setUpdatesEnabled(FALSE); canvas()->setUpdatesEnabled(false);
} }
void KoView::endOperation() void KoView::endOperation()
{ {
canvas()->setUpdatesEnabled(TRUE); canvas()->setUpdatesEnabled(true);
d->m_inOperation = false; d->m_inOperation = false;
// canvas()->update(); // canvas()->update();

@ -237,7 +237,7 @@ public:
virtual void paintEverything( TQPainter &painter, const TQRect &rect, bool transparent = false ); virtual void paintEverything( TQPainter &painter, const TQRect &rect, bool transparent = false );
/** /**
* @return TRUE if the document @p doc is represented in this view by * @return true if the document @p doc is represented in this view by
* some KoViewChild. * some KoViewChild.
* *
* This is just a convenience function for @ref #child. * This is just a convenience function for @ref #child.

@ -119,8 +119,8 @@ int main( int argc, char** argv ) {
"</o:document-content>\n"; "</o:document-content>\n";
TQDomDocument doc; TQDomDocument doc;
//TQXmlSimpleReader reader; //TQXmlSimpleReader reader;
//reader.setFeature( "http://xml.org/sax/features/namespaces", TRUE ); //reader.setFeature( "http://xml.org/sax/features/namespaces", true );
//reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", FALSE ); //reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", false );
bool ok = doc.setContent( xml, true /* namespace processing */ ); bool ok = doc.setContent( xml, true /* namespace processing */ );
assert( ok ); assert( ok );

@ -30,13 +30,13 @@
****************************************************/ ****************************************************/
KoPartSelectDia::KoPartSelectDia( TQWidget* parent, const char* name ) : KoPartSelectDia::KoPartSelectDia( TQWidget* parent, const char* name ) :
KDialogBase( parent, name, TRUE, i18n("Insert Object"), KDialogBase::Ok | KDialogBase::Cancel ) KDialogBase( parent, name, true, i18n("Insert Object"), KDialogBase::Ok | KDialogBase::Cancel )
{ {
listview = new TQListView( this ); listview = new TQListView( this );
listview->addColumn( i18n( "Object" ) ); listview->addColumn( i18n( "Object" ) );
listview->addColumn( i18n( "Comment" ) ); listview->addColumn( i18n( "Comment" ) );
listview->setAllColumnsShowFocus( TRUE ); listview->setAllColumnsShowFocus( true );
listview->setShowSortIndicator( TRUE ); listview->setShowSortIndicator( true );
setMainWidget( listview ); setMainWidget( listview );
connect( listview, TQ_SIGNAL( doubleClicked( TQListViewItem * ) ), connect( listview, TQ_SIGNAL( doubleClicked( TQListViewItem * ) ),
this, TQ_SLOT( slotOk() ) ); this, TQ_SLOT( slotOk() ) );

@ -366,7 +366,7 @@ void KoTemplateChooseDia::setupFileDialog(TQWidget * widgetbase, TQGridLayout *
} }
delete l; delete l;
d->m_filedialog->setSizeGripEnabled ( FALSE ); d->m_filedialog->setSizeGripEnabled ( false );
TQStringList mimeFilter = KoFilterManager::mimeFilter( d->m_format, KoFilterManager::Import ); TQStringList mimeFilter = KoFilterManager::mimeFilter( d->m_format, KoFilterManager::Import );
TQStringList::Iterator mimeFilterIt = mimeFilter.at( 1 ); TQStringList::Iterator mimeFilterIt = mimeFilter.at( 1 );
@ -810,7 +810,7 @@ void KoTCDRecentFilesIconView::showToolTip( TQIconViewItem* item )
toolTip->move(toolTip->x(), screen.bottom()-toolTip->y()-toolTip->height()+toolTip->y()); toolTip->move(toolTip->x(), screen.bottom()-toolTip->y()-toolTip->height()+toolTip->y());
} }
toolTip->setFont( TQToolTip::font() ); toolTip->setFont( TQToolTip::font() );
toolTip->setPalette( TQToolTip::palette(), TRUE ); toolTip->setPalette( TQToolTip::palette(), true );
toolTip->show(); toolTip->show();
} }

@ -456,7 +456,7 @@ void KoAutoFormat::readAutoCorrectConfig()
for(uint i = 0; i < nl.count() ; i++) { for(uint i = 0; i < nl.count() ; i++) {
//bug in qmap we overwrite = false doesn't work //bug in qmap we overwrite = false doesn't work
//so we can't add multiple "othernb" //so we can't add multiple "othernb"
m_superScriptEntries.insert( nl.item(i).toElement().attribute("find"), KoAutoFormatEntry(nl.item(i).toElement().attribute("super")),FALSE ); m_superScriptEntries.insert( nl.item(i).toElement().attribute("find"), KoAutoFormatEntry(nl.item(i).toElement().attribute("super")),false );
} }
} }

@ -35,7 +35,7 @@ KoChangeCaseDia::KoChangeCaseDia( TQWidget *parent, const char *name )
TQVBox *page = makeVBoxMainWidget(); TQVBox *page = makeVBoxMainWidget();
TQButtonGroup *grp = new TQButtonGroup( 1, TQt::Horizontal, i18n( "Case" ),page ); TQButtonGroup *grp = new TQButtonGroup( 1, TQt::Horizontal, i18n( "Case" ),page );
grp->setRadioButtonExclusive( TRUE ); grp->setRadioButtonExclusive( true );
grp->layout(); grp->layout();
m_upperCase=new TQRadioButton( i18n("&Uppercase"), grp ); m_upperCase=new TQRadioButton( i18n("&Uppercase"), grp );
m_lowerCase=new TQRadioButton( i18n("&Lowercase"), grp ); m_lowerCase=new TQRadioButton( i18n("&Lowercase"), grp );
@ -47,7 +47,7 @@ KoChangeCaseDia::KoChangeCaseDia( TQWidget *parent, const char *name )
TQWhatsThis::add( m_sentenceCase, i18n("Convert first letter of a sentence to uppercase.")); TQWhatsThis::add( m_sentenceCase, i18n("Convert first letter of a sentence to uppercase."));
m_upperCase->setChecked(true); m_upperCase->setChecked(true);
grp->setRadioButtonExclusive( TRUE ); grp->setRadioButtonExclusive( true );
} }

@ -897,7 +897,7 @@ TQPtrList<KoTextRun> *KoComplexText::bidiReorderLine( KoBidiControl *control, co
//printf("doing BiDi reordering from %d to %d!\n", start, last); //printf("doing BiDi reordering from %d to %d!\n", start, last);
TQPtrList<KoTextRun> *runs = new TQPtrList<KoTextRun>; TQPtrList<KoTextRun> *runs = new TQPtrList<KoTextRun>;
runs->setAutoDelete(TRUE); runs->setAutoDelete(true);
KoBidiContext *context = control->context; KoBidiContext *context = control->context;
if ( !context ) { if ( !context ) {
@ -982,7 +982,7 @@ TQPtrList<KoTextRun> *KoComplexText::bidiReorderLine( KoBidiControl *control, co
if(level < 61) { if(level < 61) {
runs->append( new KoTextRun(sor, eor, context, dir) ); runs->append( new KoTextRun(sor, eor, context, dir) );
++eor; sor = eor; dir = TQChar::DirON; status.eor = TQChar::DirON; ++eor; sor = eor; dir = TQChar::DirON; status.eor = TQChar::DirON;
context = new KoBidiContext(level, TQChar::DirR, context, TRUE); context = new KoBidiContext(level, TQChar::DirR, context, true);
dir = TQChar::DirR; dir = TQChar::DirR;
status.last = TQChar::DirR; status.last = TQChar::DirR;
status.lastStrong = TQChar::DirR; status.lastStrong = TQChar::DirR;
@ -999,7 +999,7 @@ TQPtrList<KoTextRun> *KoComplexText::bidiReorderLine( KoBidiControl *control, co
if(level < 61) { if(level < 61) {
runs->append( new KoTextRun(sor, eor, context, dir) ); runs->append( new KoTextRun(sor, eor, context, dir) );
++eor; sor = eor; dir = TQChar::DirON; status.eor = TQChar::DirON; ++eor; sor = eor; dir = TQChar::DirON; status.eor = TQChar::DirON;
context = new KoBidiContext(level, TQChar::DirL, context, TRUE); context = new KoBidiContext(level, TQChar::DirL, context, true);
dir = TQChar::DirL; dir = TQChar::DirL;
status.last = TQChar::DirL; status.last = TQChar::DirL;
status.lastStrong = TQChar::DirL; status.lastStrong = TQChar::DirL;

@ -75,7 +75,7 @@ struct TQ_EXPORT KoBidiStatus {
struct TQ_EXPORT KoBidiContext : public TQShared { struct TQ_EXPORT KoBidiContext : public TQShared {
// ### ref and deref parent? // ### ref and deref parent?
KoBidiContext( uchar level, TQChar::Direction embedding, KoBidiContext *parent = 0, bool override = FALSE ); KoBidiContext( uchar level, TQChar::Direction embedding, KoBidiContext *parent = 0, bool override = false );
~KoBidiContext(); ~KoBidiContext();
unsigned char level; unsigned char level;

@ -38,14 +38,14 @@
******************************************************************/ ******************************************************************/
KoVariableNameDia::KoVariableNameDia( TQWidget *parent ) KoVariableNameDia::KoVariableNameDia( TQWidget *parent )
: KDialogBase( parent, "", TRUE,i18n( "Entry Name" ),Ok|Cancel ) : KDialogBase( parent, "", true,i18n( "Entry Name" ),Ok|Cancel )
{ {
init(); init();
} }
KoVariableNameDia::KoVariableNameDia( TQWidget *parent, const TQPtrList<KoVariable>& vars ) KoVariableNameDia::KoVariableNameDia( TQWidget *parent, const TQPtrList<KoVariable>& vars )
: KDialogBase( parent, "", TRUE, i18n( "Variable Name" ), Ok|Cancel ) : KDialogBase( parent, "", true, i18n( "Variable Name" ), Ok|Cancel )
{ {
init(); init();
@ -68,7 +68,7 @@ void KoVariableNameDia::init()
TQLabel *l = new TQLabel( i18n( "Name:" ), row1 ); TQLabel *l = new TQLabel( i18n( "Name:" ), row1 );
l->setFixedSize( l->sizeHint() ); l->setFixedSize( l->sizeHint() );
names = new TQComboBox( TRUE, row1 ); names = new TQComboBox( true, row1 );
names->setFocus(); names->setFocus();
connect( names, TQ_SIGNAL( textChanged ( const TQString & )), connect( names, TQ_SIGNAL( textChanged ( const TQString & )),
@ -161,7 +161,7 @@ int KoCustomVariablesListItem::width( const TQFontMetrics & fm, const TQListView
KoCustomVariablesList::KoCustomVariablesList( TQWidget *parent ) KoCustomVariablesList::KoCustomVariablesList( TQWidget *parent )
: TDEListView( parent ) : TDEListView( parent )
{ {
header()->setMovingEnabled( FALSE ); header()->setMovingEnabled( false );
addColumn( i18n( "Variable" ) ); addColumn( i18n( "Variable" ) );
addColumn( i18n( "Value" ) ); addColumn( i18n( "Value" ) );
connect( header(), TQ_SIGNAL( sizeChange( int, int, int ) ), connect( header(), TQ_SIGNAL( sizeChange( int, int, int ) ),
@ -205,7 +205,7 @@ void KoCustomVariablesList::updateItems()
******************************************************************/ ******************************************************************/
KoCustomVariablesDia::KoCustomVariablesDia( TQWidget *parent, const TQPtrList<KoVariable> &variables ) KoCustomVariablesDia::KoCustomVariablesDia( TQWidget *parent, const TQPtrList<KoVariable> &variables )
: KDialogBase( parent, "", TRUE,i18n( "Variable Value Editor" ), Ok|Cancel ) : KDialogBase( parent, "", true,i18n( "Variable Value Editor" ), Ok|Cancel )
{ {
back = makeVBoxMainWidget(); back = makeVBoxMainWidget();
@ -249,7 +249,7 @@ void KoCustomVariablesDia::slotOk()
******************************************************************/ ******************************************************************/
KoCustomVarDialog::KoCustomVarDialog( TQWidget *parent ) KoCustomVarDialog::KoCustomVarDialog( TQWidget *parent )
: KDialogBase( parent, "", TRUE,i18n( "Add Variable" ), Ok|Cancel ) : KDialogBase( parent, "", true,i18n( "Add Variable" ), Ok|Cancel )
{ {
init(); init();
m_name->setFocus(); m_name->setFocus();
@ -269,7 +269,7 @@ KoCustomVarDialog::KoCustomVarDialog( TQWidget *parent )
} }
// edit existing variable // edit existing variable
KoCustomVarDialog::KoCustomVarDialog( TQWidget *parent, KoCustomVariable *var ) KoCustomVarDialog::KoCustomVarDialog( TQWidget *parent, KoCustomVariable *var )
: KDialogBase( parent, "", TRUE,i18n( "Edit Variable" ), Ok|Cancel ) : KDialogBase( parent, "", true,i18n( "Edit Variable" ), Ok|Cancel )
{ {
m_var = var; m_var = var;
init(); init();

@ -462,7 +462,7 @@ int KoSpinBox::mapTextToValue( bool * ok )
int ret; int ret;
TQString txt = text(); TQString txt = text();
*ok = TRUE; *ok = true;
switch(m_Etype) switch(m_Etype)
{ {
case NUM: case NUM:
@ -487,7 +487,7 @@ int KoSpinBox::mapTextToValue( bool * ok )
} }
if (ret == -1) if (ret == -1)
*ok = FALSE; *ok = false;
return ret; return ret;
} }
@ -1849,7 +1849,7 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram
TextLabel2->setAlignment( AlignRight ); TextLabel2->setAlignment( AlignRight );
fillingGrid->addWidget( TextLabel2, 0, 0 ); fillingGrid->addWidget( TextLabel2, 0, 0 );
cFilling = new TQComboBox( FALSE, gTabLeader); cFilling = new TQComboBox( false, gTabLeader);
cFilling->insertItem( i18n( "Blank" ) ); cFilling->insertItem( i18n( "Blank" ) );
cFilling->insertItem( "_ _ _ _ _ _"); // DOT cFilling->insertItem( "_ _ _ _ _ _"); // DOT
cFilling->insertItem( "_________"); // SOLID cFilling->insertItem( "_________"); // SOLID

@ -60,7 +60,7 @@ void KoTextDocCommandHistory::addCommand( KoTextDocCommand *cmd )
{ {
if ( current < (int)history.count() - 1 ) { if ( current < (int)history.count() - 1 ) {
TQPtrList<KoTextDocCommand> commands; TQPtrList<KoTextDocCommand> commands;
commands.setAutoDelete( FALSE ); commands.setAutoDelete( false );
for( int i = 0; i <= current; ++i ) { for( int i = 0; i <= current; ++i ) {
commands.insert( i, history.at( 0 ) ); commands.insert( i, history.at( 0 ) );
@ -70,7 +70,7 @@ void KoTextDocCommandHistory::addCommand( KoTextDocCommand *cmd )
commands.append( cmd ); commands.append( cmd );
history.clear(); history.clear();
history = commands; history = commands;
history.setAutoDelete( TRUE ); history.setAutoDelete( true );
} else { } else {
history.append( cmd ); history.append( cmd );
} }
@ -187,7 +187,7 @@ KoTextCursor *KoTextDocDeleteCommand::unexecute( KoTextCursor *c )
cursor.setParag( s ); cursor.setParag( s );
cursor.setIndex( index ); cursor.setIndex( index );
TQString str = KoTextString::toString( text ); TQString str = KoTextString::toString( text );
cursor.insert( str, TRUE, &text ); cursor.insert( str, true, &text );
cursor.setParag( s ); cursor.setParag( s );
cursor.setIndex( index ); cursor.setIndex( index );
if ( c ) { if ( c ) {
@ -200,7 +200,7 @@ KoTextCursor *KoTextDocDeleteCommand::unexecute( KoTextCursor *c )
s = cursor.parag(); s = cursor.parag();
while ( s ) { while ( s ) {
s->format(); s->format();
s->setChanged( TRUE ); s->setChanged( true );
if ( c && s == c->parag() ) if ( c && s == c->parag() )
break; break;
s = s->next(); s = s->next();
@ -377,7 +377,7 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko
{ {
string->invalidate( idx ); string->invalidate( idx );
tmpIndex = -1; tmpIndex = -1;
bool justInsert = TRUE; bool justInsert = true;
TQString s( str ); TQString s( str );
#if defined(TQ_WS_WIN) #if defined(TQ_WS_WIN)
if ( checkNewLine ) if ( checkNewLine )
@ -391,27 +391,27 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko
for ( int i = 0; i < (int)s.length(); ++i ) { for ( int i = 0; i < (int)s.length(); ++i ) {
if ( formatting->at( i ).format() ) { if ( formatting->at( i ).format() ) {
formatting->at( i ).format()->addRef(); formatting->at( i ).format()->addRef();
string->string()->setFormat( idx + i, formatting->at( i ).format(), TRUE ); string->string()->setFormat( idx + i, formatting->at( i ).format(), true );
} }
} }
} }
idx += s.length(); idx += s.length();
} else { } else {
TQStringList lst = TQStringList::split( '\n', s, TRUE ); TQStringList lst = TQStringList::split( '\n', s, true );
TQStringList::Iterator it = lst.begin(); TQStringList::Iterator it = lst.begin();
//int y = string->rect().y() + string->rect().height(); //int y = string->rect().y() + string->rect().height();
int lastIndex = 0; int lastIndex = 0;
KoTextFormat *lastFormat = 0; KoTextFormat *lastFormat = 0;
for ( ; it != lst.end(); ) { for ( ; it != lst.end(); ) {
if ( it != lst.begin() ) { if ( it != lst.begin() ) {
splitAndInsertEmptyParag( FALSE, TRUE ); splitAndInsertEmptyParag( false, true );
//string->setEndState( -1 ); //string->setEndState( -1 );
#if 0 // no! #if 0 // no!
string->prev()->format( -1, FALSE ); string->prev()->format( -1, false );
#endif #endif
if ( lastFormat && formatting && string->prev() ) { if ( lastFormat && formatting && string->prev() ) {
lastFormat->addRef(); lastFormat->addRef();
string->prev()->string()->setFormat( string->prev()->length() - 1, lastFormat, TRUE ); string->prev()->string()->setFormat( string->prev()->length() - 1, lastFormat, true );
} }
} }
lastFormat = 0; lastFormat = 0;
@ -427,7 +427,7 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko
for ( int i = 0; i < len; ++i ) { for ( int i = 0; i < len; ++i ) {
if ( formatting->at( i + lastIndex ).format() ) { if ( formatting->at( i + lastIndex ).format() ) {
formatting->at( i + lastIndex ).format()->addRef(); formatting->at( i + lastIndex ).format()->addRef();
string->string()->setFormat( i + idx, formatting->at( i + lastIndex ).format(), TRUE ); string->string()->setFormat( i + idx, formatting->at( i + lastIndex ).format(), true );
} }
} }
if ( it != lst.end() ) if ( it != lst.end() )
@ -439,7 +439,7 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko
idx += s.length(); idx += s.length();
} }
#if 0 //// useless and wrong. We'll format things and move them down correctly in KoTextObject::insert(). #if 0 //// useless and wrong. We'll format things and move them down correctly in KoTextObject::insert().
string->format( -1, FALSE ); string->format( -1, false );
int dy = string->rect().y() + string->rect().height() - y; int dy = string->rect().y() + string->rect().height() - y;
#endif #endif
KoTextParag *p = string; KoTextParag *p = string;
@ -455,7 +455,7 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko
#if 0 //// useless and slow #if 0 //// useless and slow
int h = string->rect().height(); int h = string->rect().height();
string->format( -1, TRUE ); string->format( -1, true );
#endif #endif
fixCursorPosition(); fixCursorPosition();
} }
@ -499,9 +499,9 @@ bool KoTextCursor::place( const TQPoint &p, KoTextParag *s, bool link, int *cust
} }
if ( !s ) if ( !s )
return FALSE; return false;
setParag( s, FALSE ); setParag( s, false );
int y = s->rect().y(); int y = s->rect().y();
int lines = s->lines(); int lines = s->lines();
KoTextStringChar *chr = 0; KoTextStringChar *chr = 0;
@ -514,7 +514,7 @@ bool KoTextCursor::place( const TQPoint &p, KoTextParag *s, bool link, int *cust
cy = s->lineY( i ); cy = s->lineY( i );
//ch = s->lineHeight( i ); //ch = s->lineHeight( i );
if ( !chr ) if ( !chr )
return FALSE; return false;
if ( i < lines - 1 && pos.y() >= y + cy && pos.y() <= y + s->lineY( i+1 ) ) if ( i < lines - 1 && pos.y() >= y + cy && pos.y() <= y + s->lineY( i+1 ) )
break; break;
} }
@ -545,7 +545,7 @@ bool KoTextCursor::place( const TQPoint &p, KoTextParag *s, bool link, int *cust
cpos += cw; cpos += cw;
int d = cpos - pos.x(); int d = cpos - pos.x();
bool dm = d < 0 ? !chr->rightToLeft : chr->rightToLeft; bool dm = d < 0 ? !chr->rightToLeft : chr->rightToLeft;
if ( (TQABS( d ) < dist || (dist == d && dm == TRUE )) && string->string()->validCursorPosition( i ) ) { if ( (TQABS( d ) < dist || (dist == d && dm == true )) && string->string()->validCursorPosition( i ) ) {
dist = TQABS( d ); dist = TQABS( d );
if ( !link || pos.x() >= x + chr->x ) { if ( !link || pos.x() >= x + chr->x ) {
curpos = i; curpos = i;
@ -553,9 +553,9 @@ bool KoTextCursor::place( const TQPoint &p, KoTextParag *s, bool link, int *cust
} }
i++; i++;
} }
setIndex( curpos, FALSE ); setIndex( curpos, false );
return TRUE; return true;
} }
void KoTextCursor::gotoRight() void KoTextCursor::gotoRight()
@ -781,7 +781,7 @@ void KoTextCursor::gotoPreviousWord()
gotoPreviousLetter(); gotoPreviousLetter();
tmpIndex = -1; tmpIndex = -1;
KoTextString *s = string->string(); KoTextString *s = string->string();
bool allowSame = FALSE; bool allowSame = false;
if ( idx == ( (int)s->length()-1 ) ) if ( idx == ( (int)s->length()-1 ) )
return; return;
for ( int i = idx; i >= 0; --i ) { for ( int i = idx; i >= 0; --i ) {
@ -794,7 +794,7 @@ void KoTextCursor::gotoPreviousWord()
} }
if ( !allowSame && !( s->at( i ).c.isSpace() || s->at( i ).c == '\t' || s->at( i ).c == '.' || if ( !allowSame && !( s->at( i ).c.isSpace() || s->at( i ).c == '\t' || s->at( i ).c == '.' ||
s->at( i ).c == ',' || s->at( i ).c == ':' || s->at( i ).c == ';' ) ) s->at( i ).c == ',' || s->at( i ).c == ':' || s->at( i ).c == ';' ) )
allowSame = TRUE; allowSame = true;
} }
idx = 0; idx = 0;
} }
@ -803,7 +803,7 @@ void KoTextCursor::gotoNextWord()
{ {
tmpIndex = -1; tmpIndex = -1;
KoTextString *s = string->string(); KoTextString *s = string->string();
bool allowSame = FALSE; bool allowSame = false;
for ( int i = idx; i < (int)s->length(); ++i ) { for ( int i = idx; i < (int)s->length(); ++i ) {
if ( ! ( s->at( i ).c.isSpace() || s->at( i ).c == '\t' || s->at( i ).c == '.' || if ( ! ( s->at( i ).c.isSpace() || s->at( i ).c == '\t' || s->at( i ).c == '.' ||
s->at( i ).c == ',' || s->at( i ).c == ':' || s->at( i ).c == ';' ) ) { s->at( i ).c == ',' || s->at( i ).c == ':' || s->at( i ).c == ';' ) ) {
@ -814,7 +814,7 @@ void KoTextCursor::gotoNextWord()
} }
if ( !allowSame && ( s->at( i ).c.isSpace() || s->at( i ).c == '\t' || s->at( i ).c == '.' || if ( !allowSame && ( s->at( i ).c.isSpace() || s->at( i ).c == '\t' || s->at( i ).c == '.' ||
s->at( i ).c == ',' || s->at( i ).c == ':' || s->at( i ).c == ';' ) ) s->at( i ).c == ',' || s->at( i ).c == ':' || s->at( i ).c == ';' ) )
allowSame = TRUE; allowSame = true;
} }
if ( idx < ((int)s->length()-1) ) { if ( idx < ((int)s->length()-1) ) {
@ -860,7 +860,7 @@ void KoTextCursor::splitAndInsertEmptyParag( bool ind, bool updateIds )
KoTextParag *n = string->next(); KoTextParag *n = string->next();
KoTextParag *s = doc->createParag( doc, string, n, updateIds ); KoTextParag *s = doc->createParag( doc, string, n, updateIds );
if ( f ) if ( f )
s->setFormat( 0, 1, f, TRUE ); s->setFormat( 0, 1, f, true );
s->copyParagData( string ); s->copyParagData( string );
#if 0 #if 0
if ( ind ) { if ( ind ) {
@ -878,7 +878,7 @@ void KoTextCursor::splitAndInsertEmptyParag( bool ind, bool updateIds )
KoTextParag *p = string->prev(); KoTextParag *p = string->prev();
KoTextParag *s = doc->createParag( doc, p, string, updateIds ); KoTextParag *s = doc->createParag( doc, p, string, updateIds );
if ( f ) if ( f )
s->setFormat( 0, 1, f, TRUE ); s->setFormat( 0, 1, f, true );
s->copyParagData( string ); s->copyParagData( string );
if ( ind ) { if ( ind ) {
//s->indent(); //s->indent();
@ -892,10 +892,10 @@ void KoTextCursor::splitAndInsertEmptyParag( bool ind, bool updateIds )
KoTextParag *s = doc->createParag( doc, string, n, updateIds ); KoTextParag *s = doc->createParag( doc, string, n, updateIds );
s->copyParagData( string ); s->copyParagData( string );
s->remove( 0, 1 ); s->remove( 0, 1 );
s->append( str, TRUE ); s->append( str, true );
for ( uint i = 0; i < str.length(); ++i ) { for ( uint i = 0; i < str.length(); ++i ) {
KoTextStringChar* tsc = string->at( idx + i ); KoTextStringChar* tsc = string->at( idx + i );
s->setFormat( i, 1, tsc->format(), TRUE ); s->setFormat( i, 1, tsc->format(), true );
if ( tsc->isCustom() ) { if ( tsc->isCustom() ) {
KoTextCustomItem * item = tsc->customItem(); KoTextCustomItem * item = tsc->customItem();
s->at( i )->setCustomItem( item ); s->at( i )->setCustomItem( item );
@ -932,17 +932,17 @@ bool KoTextCursor::removePreviousChar()
idx--; idx--;
// shouldn't be needed, just to make sure. // shouldn't be needed, just to make sure.
fixCursorPosition(); fixCursorPosition();
string->format( -1, TRUE ); string->format( -1, true );
//else if ( string->document() && string->document()->parent() ) //else if ( string->document() && string->document()->parent() )
// string->document()->nextDoubleBuffered = TRUE; // string->document()->nextDoubleBuffered = true;
return FALSE; return false;
} else if ( string->prev() ) { } else if ( string->prev() ) {
string = string->prev(); string = string->prev();
string->join( string->next() ); string->join( string->next() );
string->invalidateCounters(); string->invalidateCounters();
return TRUE; return true;
} }
return FALSE; return false;
} }
bool KoTextCursor::remove() bool KoTextCursor::remove()
@ -951,10 +951,10 @@ bool KoTextCursor::remove()
if ( !atParagEnd() ) { if ( !atParagEnd() ) {
int next = string->string()->nextCursorPosition( idx ); int next = string->string()->nextCursorPosition( idx );
string->remove( idx, next-idx ); string->remove( idx, next-idx );
string->format( -1, TRUE ); string->format( -1, true );
//else if ( doc && doc->parent() ) //else if ( doc && doc->parent() )
// doc->nextDoubleBuffered = TRUE; // doc->nextDoubleBuffered = true;
return FALSE; return false;
} else if ( string->next() ) { } else if ( string->next() ) {
if ( string->length() == 1 ) { if ( string->length() == 1 ) {
string->next()->setPrev( string->prev() ); string->next()->setPrev( string->prev() );
@ -971,17 +971,17 @@ bool KoTextCursor::remove()
while ( s ) { while ( s ) {
s->id = s->p ? s->p->id + 1 : 0; s->id = s->p ? s->p->id + 1 : 0;
//s->state = -1; //s->state = -1;
//s->needPreProcess = TRUE; //s->needPreProcess = true;
s->changed = TRUE; s->changed = true;
s = s->n; s = s->n;
} }
string->format(); string->format();
} else { } else {
string->join( string->next() ); string->join( string->next() );
} }
return TRUE; return true;
} }
return FALSE; return false;
} }
void KoTextCursor::killLine() void KoTextCursor::killLine()
@ -989,9 +989,9 @@ void KoTextCursor::killLine()
if ( atParagEnd() ) if ( atParagEnd() )
return; return;
string->remove( idx, string->length() - idx - 1 ); string->remove( idx, string->length() - idx - 1 );
string->format( -1, TRUE ); string->format( -1, true );
//else if ( doc && doc->parent() ) //else if ( doc && doc->parent() )
//doc->nextDoubleBuffered = TRUE; //doc->nextDoubleBuffered = true;
} }
#if 0 #if 0
@ -1069,10 +1069,10 @@ void KoTextCursor::fixCursorPosition()
KoTextString::KoTextString() KoTextString::KoTextString()
{ {
bidiDirty = TRUE; bidiDirty = true;
bNeedsSpellCheck = true; bNeedsSpellCheck = true;
bidi = FALSE; bidi = false;
rightToLeft = FALSE; rightToLeft = false;
dir = TQChar::DirON; dir = TQChar::DirON;
} }
@ -1117,7 +1117,7 @@ void KoTextString::insert( int index, const TQString &s, KoTextFormat *f )
#endif #endif
ch.setFormat( f ); ch.setFormat( f );
} }
bidiDirty = TRUE; bidiDirty = true;
bNeedsSpellCheck = true; bNeedsSpellCheck = true;
} }
@ -1145,7 +1145,7 @@ void KoTextString::insert( int index, KoTextStringChar *c )
ch.d.format = 0; ch.d.format = 0;
ch.type = KoTextStringChar::Regular; ch.type = KoTextStringChar::Regular;
ch.setFormat( c->format() ); ch.setFormat( c->format() );
bidiDirty = TRUE; bidiDirty = true;
bNeedsSpellCheck = true; bNeedsSpellCheck = true;
} }
@ -1168,7 +1168,7 @@ void KoTextString::truncate( int index )
} }
} }
data.truncate( index ); data.truncate( index );
bidiDirty = TRUE; bidiDirty = true;
bNeedsSpellCheck = true; bNeedsSpellCheck = true;
} }
@ -1189,7 +1189,7 @@ void KoTextString::remove( int index, int len )
memmove( data.data() + index, data.data() + index + len, memmove( data.data() + index, data.data() + index + len,
sizeof( KoTextStringChar ) * ( data.size() - index - len ) ); sizeof( KoTextStringChar ) * ( data.size() - index - len ) );
data.resize( data.size() - len, TQGArray::SpeedOptim ); data.resize( data.size() - len, TQGArray::SpeedOptim );
bidiDirty = TRUE; bidiDirty = true;
bNeedsSpellCheck = true; bNeedsSpellCheck = true;
} }
@ -1232,10 +1232,10 @@ void KoTextString::setFormat( int index, KoTextFormat *f, bool useCollection, bo
void KoTextString::checkBidi() const void KoTextString::checkBidi() const
{ {
KoTextString *that = (KoTextString *)this; KoTextString *that = (KoTextString *)this;
that->bidiDirty = FALSE; that->bidiDirty = false;
int length = data.size(); int length = data.size();
if ( !length ) { if ( !length ) {
that->bidi = FALSE; that->bidi = false;
that->rightToLeft = dir == TQChar::DirR; that->rightToLeft = dir == TQChar::DirR;
return; return;
} }
@ -1251,7 +1251,7 @@ void KoTextString::checkBidi() const
TQScriptItem *item = &textEngine.items[textEngine.items.size()-1]; TQScriptItem *item = &textEngine.items[textEngine.items.size()-1];
unsigned char bidiLevel = item->analysis.bidiLevel; unsigned char bidiLevel = item->analysis.bidiLevel;
if ( bidiLevel ) if ( bidiLevel )
that->bidi = TRUE; that->bidi = true;
int pos = length-1; int pos = length-1;
while ( ch >= start ) { while ( ch >= start ) {
if ( item->position > pos ) { if ( item->position > pos ) {
@ -1260,7 +1260,7 @@ void KoTextString::checkBidi() const
Q_ASSERT( item < &textEngine.items[textEngine.items.size()] ); Q_ASSERT( item < &textEngine.items[textEngine.items.size()] );
bidiLevel = item->analysis.bidiLevel; bidiLevel = item->analysis.bidiLevel;
if ( bidiLevel ) if ( bidiLevel )
that->bidi = TRUE; that->bidi = true;
} }
ch->softBreak = ca->softBreak; ch->softBreak = ca->softBreak;
ch->whiteSpace = ca->whiteSpace; ch->whiteSpace = ca->whiteSpace;
@ -1274,10 +1274,10 @@ void KoTextString::checkBidi() const
} }
if ( dir == TQChar::DirR ) { if ( dir == TQChar::DirR ) {
that->bidi = TRUE; that->bidi = true;
that->rightToLeft = TRUE; that->rightToLeft = true;
} else if ( dir == TQChar::DirL ) { } else if ( dir == TQChar::DirL ) {
that->rightToLeft = FALSE; that->rightToLeft = false;
} else { } else {
that->rightToLeft = (textEngine.direction == TQChar::DirR); that->rightToLeft = (textEngine.direction == TQChar::DirR);
} }
@ -1476,7 +1476,7 @@ int KoTextStringChar::descent() const
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
KoTextFormatterBase::KoTextFormatterBase() KoTextFormatterBase::KoTextFormatterBase()
: wrapColumn( -1 ), //wrapEnabled( TRUE ), : wrapColumn( -1 ), //wrapEnabled( true ),
m_bViewFormattingChars( false ), m_bViewFormattingChars( false ),
biw( true /*default in kotext*/ ) biw( true /*default in kotext*/ )
{ {
@ -1533,7 +1533,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para
} }
} }
int toAdd = 0; int toAdd = 0;
bool first = TRUE; bool first = true;
KoTextRun *r = runs->first(); KoTextRun *r = runs->first();
int xmax = -0xffffff; int xmax = -0xffffff;
while ( r ) { while ( r ) {
@ -1548,13 +1548,13 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para
space -= s; space -= s;
numSpaces--; numSpaces--;
} else if ( first ) { } else if ( first ) {
first = FALSE; first = false;
if ( c->c == ' ' ) if ( c->c == ' ' )
x -= c->format()->width( ' ' ); x -= c->format()->width( ' ' );
} }
c->x = x + toAdd; c->x = x + toAdd;
c->rightToLeft = TRUE; c->rightToLeft = true;
c->startOfRun = FALSE; c->startOfRun = false;
int ww = 0; int ww = 0;
if ( c->c.unicode() >= 32 || c->c == '\t' || c->c == '\n' || c->isCustom() ) { if ( c->c.unicode() >= 32 || c->c == '\t' || c->c == '\n' || c->isCustom() ) {
ww = c->width; ww = c->width;
@ -1575,13 +1575,13 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para
space -= s; space -= s;
numSpaces--; numSpaces--;
} else if ( first ) { } else if ( first ) {
first = FALSE; first = false;
if ( c->c == ' ' ) if ( c->c == ' ' )
x -= c->format()->width( ' ' ); x -= c->format()->width( ' ' );
} }
c->x = x + toAdd; c->x = x + toAdd;
c->rightToLeft = FALSE; c->rightToLeft = false;
c->startOfRun = FALSE; c->startOfRun = false;
int ww = 0; int ww = 0;
if ( c->c.unicode() >= 32 || c->c == '\t' || c->isCustom() ) { if ( c->c.unicode() >= 32 || c->c == '\t' || c->isCustom() ) {
ww = c->width; ww = c->width;
@ -1594,7 +1594,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para
pos++; pos++;
} }
} }
text->at( r->start + start ).startOfRun = TRUE; text->at( r->start + start ).startOfRun = true;
r = runs->next(); r = runs->next();
} }
@ -1617,7 +1617,7 @@ bool KoTextFormatterBase::isStretchable( KoTextString *string, int pos ) const
bool KoTextFormatterBase::isBreakable( KoTextString *string, int pos ) const bool KoTextFormatterBase::isBreakable( KoTextString *string, int pos ) const
{ {
//if (string->at(pos).nobreak) //if (string->at(pos).nobreak)
// return FALSE; // return false;
return (pos < string->length()-1 && string->at(pos+1).softBreak); return (pos < string->length()-1 && string->at(pos+1).softBreak);
} }
@ -1662,12 +1662,12 @@ int KoTextFormatterBase::formatVertically( KoTextDocument* doc, KoTextParag* par
int delta = c->customItem()->height - h; int delta = c->customItem()->height - h;
ls->h += delta; ls->h += delta;
if ( delta ) if ( delta )
parag->setMovedDown( TRUE ); parag->setMovedDown( true );
} else { } else {
int shift = doc->flow()->adjustFlow( parag->rect().y() + ls->y, ls->w, ls->h ); int shift = doc->flow()->adjustFlow( parag->rect().y() + ls->y, ls->w, ls->h );
ls->y += shift; ls->y += shift;
if ( shift ) if ( shift )
parag->setMovedDown( TRUE ); parag->setMovedDown( true );
} }
h = ls->y + ls->h; h = ls->y + ls->h;
} }
@ -1696,8 +1696,8 @@ KoTextCustomItem::~KoTextCustomItem()
KoTextFlow::KoTextFlow() KoTextFlow::KoTextFlow()
{ {
w = 0; w = 0;
leftItems.setAutoDelete( FALSE ); leftItems.setAutoDelete( false );
rightItems.setAutoDelete( FALSE ); rightItems.setAutoDelete( false );
} }
KoTextFlow::~KoTextFlow() KoTextFlow::~KoTextFlow()

@ -116,7 +116,7 @@ public:
bool isCustom() const { return type == Custom; } bool isCustom() const { return type == Custom; }
KoTextFormat *format() const; KoTextFormat *format() const;
KoTextCustomItem *customItem() const; KoTextCustomItem *customItem() const;
void setFormat( KoTextFormat *f,bool setFormatAgain=TRUE ); void setFormat( KoTextFormat *f,bool setFormatAgain=true );
void setCustomItem( KoTextCustomItem *i ); void setCustomItem( KoTextCustomItem *i );
void loseCustomItem(); void loseCustomItem();
struct CustomData struct CustomData
@ -171,13 +171,13 @@ public:
void remove( int index, int len ); void remove( int index, int len );
void clear(); void clear();
void setFormat( int index, KoTextFormat *f, bool useCollection, bool setFormatAgain = FALSE ); void setFormat( int index, KoTextFormat *f, bool useCollection, bool setFormatAgain = false );
void setBidi( bool b ) { bidi = b; } void setBidi( bool b ) { bidi = b; }
bool isBidi() const; bool isBidi() const;
bool isRightToLeft() const; bool isRightToLeft() const;
TQChar::Direction direction() const; TQChar::Direction direction() const;
void setDirection( TQChar::Direction d ) { dir = d; bidiDirty = TRUE; } void setDirection( TQChar::Direction d ) { dir = d; bidiDirty = true; }
/** Set dirty flag for background spell-checking */ /** Set dirty flag for background spell-checking */
void setNeedsSpellCheck( bool b ) { bNeedsSpellCheck = b; } void setNeedsSpellCheck( bool b ) { bNeedsSpellCheck = b; }
@ -245,7 +245,7 @@ public:
KoTextParag *parag() const; KoTextParag *parag() const;
int index() const; int index() const;
void setParag( KoTextParag *s, bool restore = TRUE ); void setParag( KoTextParag *s, bool restore = true );
void gotoLeft(); void gotoLeft();
void gotoRight(); void gotoRight();
@ -265,7 +265,7 @@ public:
void gotoWordRight(); void gotoWordRight();
void insert( const TQString &s, bool checkNewLine, TQMemArray<KoTextStringChar> *formatting = 0 ); void insert( const TQString &s, bool checkNewLine, TQMemArray<KoTextStringChar> *formatting = 0 );
void splitAndInsertEmptyParag( bool ind = TRUE, bool updateIds = TRUE ); void splitAndInsertEmptyParag( bool ind = true, bool updateIds = true );
bool remove(); bool remove();
bool removePreviousChar(); bool removePreviousChar();
void killLine(); void killLine();
@ -274,7 +274,7 @@ public:
bool atParagStart() const; bool atParagStart() const;
bool atParagEnd() const; bool atParagEnd() const;
void setIndex( int i, bool restore = TRUE ); void setIndex( int i, bool restore = true );
//void checkIndex(); //void checkIndex();
@ -323,7 +323,7 @@ template class TQPtrList<KoTextDocCommand>;
class KoTextDocCommandHistory class KoTextDocCommandHistory
{ {
public: public:
KoTextDocCommandHistory( int s ) : current( -1 ), steps( s ) { history.setAutoDelete( TRUE ); } KoTextDocCommandHistory( int s ) : current( -1 ), steps( s ) { history.setAutoDelete( true ); }
virtual ~KoTextDocCommandHistory() { clear(); } virtual ~KoTextDocCommandHistory() { clear(); }
void clear() { history.clear(); current = -1; } void clear() { history.clear(); current = -1; }
@ -396,7 +396,7 @@ public:
void draw(TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected ); void draw(TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected );
TQString richText() const; TQString richText() const;
bool ownLine() const { return TRUE; } bool ownLine() const { return true; }
private: private:
int tmpheight; int tmpheight;
@ -547,15 +547,15 @@ public:
void draw( TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, void draw( TQPainter* p, int x, int y, int cx, int cy, int cw, int ch,
const TQColorGroup& cg, bool selected ); const TQColorGroup& cg, bool selected );
bool noErase() const { return TRUE; } bool noErase() const { return true; }
bool ownLine() const { return TRUE; } bool ownLine() const { return true; }
Placement placement() const { return place; } Placement placement() const { return place; }
bool isNested() const { return TRUE; } bool isNested() const { return true; }
void resize( int nwidth ); void resize( int nwidth );
virtual void invalidate(); virtual void invalidate();
/// ## TQString anchorAt( TQPainter* p, int x, int y ); /// ## TQString anchorAt( TQPainter* p, int x, int y );
virtual bool enter( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy, bool atEnd = FALSE ); virtual bool enter( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy, bool atEnd = false );
virtual bool enterAt( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy, const TQPoint &pos ); virtual bool enterAt( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy, const TQPoint &pos );
virtual bool next( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy ); virtual bool next( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy );
virtual bool prev( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy ); virtual bool prev( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy );

@ -604,25 +604,25 @@ KoFormatDia::KoFormatDia( TQWidget* parent, const TQString & _caption, KoSearchC
TQButtonGroup *grpBold = new TQButtonGroup( 1, TQt::Vertical, page ); TQButtonGroup *grpBold = new TQButtonGroup( 1, TQt::Vertical, page );
grpBold->setRadioButtonExclusive( TRUE ); grpBold->setRadioButtonExclusive( true );
grpBold->layout(); grpBold->layout();
m_boldYes=new TQRadioButton( i18n("Yes"), grpBold ); m_boldYes=new TQRadioButton( i18n("Yes"), grpBold );
m_boldNo=new TQRadioButton( i18n("No"), grpBold ); m_boldNo=new TQRadioButton( i18n("No"), grpBold );
TQButtonGroup *grpItalic = new TQButtonGroup( 1, TQt::Vertical, page ); TQButtonGroup *grpItalic = new TQButtonGroup( 1, TQt::Vertical, page );
grpItalic->setRadioButtonExclusive( TRUE ); grpItalic->setRadioButtonExclusive( true );
grpItalic->layout(); grpItalic->layout();
m_italicYes=new TQRadioButton( i18n("Yes"), grpItalic ); m_italicYes=new TQRadioButton( i18n("Yes"), grpItalic );
m_italicNo=new TQRadioButton( i18n("No"), grpItalic ); m_italicNo=new TQRadioButton( i18n("No"), grpItalic );
TQButtonGroup *grpShadow = new TQButtonGroup( 1, TQt::Vertical, page ); TQButtonGroup *grpShadow = new TQButtonGroup( 1, TQt::Vertical, page );
grpShadow->setRadioButtonExclusive( TRUE ); grpShadow->setRadioButtonExclusive( true );
grpShadow->layout(); grpShadow->layout();
m_shadowYes=new TQRadioButton( i18n("Yes"), grpShadow ); m_shadowYes=new TQRadioButton( i18n("Yes"), grpShadow );
m_shadowNo=new TQRadioButton( i18n("No"), grpShadow ); m_shadowNo=new TQRadioButton( i18n("No"), grpShadow );
TQButtonGroup *grpWordByWord = new TQButtonGroup( 1, TQt::Vertical, page ); TQButtonGroup *grpWordByWord = new TQButtonGroup( 1, TQt::Vertical, page );
grpWordByWord->setRadioButtonExclusive( TRUE ); grpWordByWord->setRadioButtonExclusive( true );
grpWordByWord->layout(); grpWordByWord->layout();
m_wordByWordYes=new TQRadioButton( i18n("Yes"), grpWordByWord ); m_wordByWordYes=new TQRadioButton( i18n("Yes"), grpWordByWord );
m_wordByWordNo=new TQRadioButton( i18n("No"), grpWordByWord ); m_wordByWordNo=new TQRadioButton( i18n("No"), grpWordByWord );

@ -197,7 +197,7 @@ void KoStyleManager::addGeneralTab( int flags ) {
tabLayout->addWidget( nameLabel, 0, 0 ); tabLayout->addWidget( nameLabel, 0, 0 );
m_styleCombo = new TQComboBox( FALSE, tab, "styleCombo" ); m_styleCombo = new TQComboBox( false, tab, "styleCombo" );
tabLayout->addWidget( m_styleCombo, 1, 1 ); tabLayout->addWidget( m_styleCombo, 1, 1 );
@ -207,7 +207,7 @@ void KoStyleManager::addGeneralTab( int flags ) {
tabLayout->addWidget( nextStyleLabel, 1, 0 ); tabLayout->addWidget( nextStyleLabel, 1, 0 );
m_inheritCombo = new TQComboBox( FALSE, tab, "inheritCombo" ); m_inheritCombo = new TQComboBox( false, tab, "inheritCombo" );
tabLayout->addWidget( m_inheritCombo, 2, 1 ); tabLayout->addWidget( m_inheritCombo, 2, 1 );
TQLabel *inheritStyleLabel = new TQLabel( tab ); TQLabel *inheritStyleLabel = new TQLabel( tab );

@ -31,28 +31,28 @@
bool KoTextCustomItem::enter( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy, bool atEnd ) bool KoTextCustomItem::enter( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy, bool atEnd )
{ {
doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; Q_UNUSED( atEnd ) return TRUE; doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; Q_UNUSED( atEnd ) return true;
} }
bool KoTextCustomItem::enterAt( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy, const TQPoint & ) bool KoTextCustomItem::enterAt( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy, const TQPoint & )
{ {
doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return TRUE; doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return true;
} }
bool KoTextCustomItem::next( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy ) bool KoTextCustomItem::next( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy )
{ {
doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return TRUE; doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return true;
} }
bool KoTextCustomItem::prev( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy ) bool KoTextCustomItem::prev( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy )
{ {
doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return TRUE; doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return true;
} }
bool KoTextCustomItem::down( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy ) bool KoTextCustomItem::down( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy )
{ {
doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return TRUE; doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return true;
} }
bool KoTextCustomItem::up( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy ) bool KoTextCustomItem::up( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy )
{ {
doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return TRUE; doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return true;
} }
int KoTextCustomItem::index() const int KoTextCustomItem::index() const

@ -53,12 +53,12 @@ public:
virtual Placement placement() const { return PlaceInline; } virtual Placement placement() const { return PlaceInline; }
bool placeInline() { return placement() == PlaceInline; } bool placeInline() { return placement() == PlaceInline; }
virtual bool ownLine() const { return FALSE; } virtual bool ownLine() const { return false; }
// Called for "ownline" items // Called for "ownline" items
virtual void resize( int nwidth ) { width = nwidth; } virtual void resize( int nwidth ) { width = nwidth; }
virtual void invalidate() {}; virtual void invalidate() {};
virtual bool isNested() const { return FALSE; } virtual bool isNested() const { return false; }
virtual int minimumWidth() const { return 0; } virtual int minimumWidth() const { return 0; }
virtual int widthHint() const { return 0; } virtual int widthHint() const { return 0; }
virtual int ascent() const { return height; } virtual int ascent() const { return height; }
@ -70,7 +70,7 @@ public:
TQRect geometry() const { return TQRect( xpos, ypos, width, height ); } TQRect geometry() const { return TQRect( xpos, ypos, width, height ); }
virtual bool enter( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy, bool atEnd = FALSE ); virtual bool enter( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy, bool atEnd = false );
virtual bool enterAt( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy, const TQPoint & ); virtual bool enterAt( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy, const TQPoint & );
virtual bool next( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy ); virtual bool next( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy );
virtual bool prev( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy ); virtual bool prev( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy );

@ -69,7 +69,7 @@ KoTextDocument::KoTextDocument( KoTextZoomHandler *zoomHandler, KoTextFormatColl
void KoTextDocument::init() void KoTextDocument::init()
{ {
//pProcessor = 0; //pProcessor = 0;
useFC = TRUE; useFC = true;
pFormatter = 0; pFormatter = 0;
fParag = 0; fParag = 0;
m_pageBreakEnabled = false; m_pageBreakEnabled = false;
@ -77,15 +77,15 @@ void KoTextDocument::init()
align = TQt::AlignAuto; align = TQt::AlignAuto;
nSelections = 2; nSelections = 2;
underlLinks = TRUE; underlLinks = true;
backBrush = 0; backBrush = 0;
buf_pixmap = 0; buf_pixmap = 0;
//nextDoubleBuffered = FALSE; //nextDoubleBuffered = false;
//if ( par ) //if ( par )
// withoutDoubleBuffer = par->withoutDoubleBuffer; // withoutDoubleBuffer = par->withoutDoubleBuffer;
// else // else
withoutDoubleBuffer = FALSE; withoutDoubleBuffer = false;
lParag = fParag = createParag( this, 0, 0 ); lParag = fParag = createParag( this, 0, 0 );
@ -102,9 +102,9 @@ void KoTextDocument::init()
rightmargin = 0; // 4 in TQRT rightmargin = 0; // 4 in TQRT
selectionColors[ Standard ] = TQApplication::palette().color( TQPalette::Active, TQColorGroup::Highlight ); selectionColors[ Standard ] = TQApplication::palette().color( TQPalette::Active, TQColorGroup::Highlight );
selectionText[ Standard ] = TRUE; selectionText[ Standard ] = true;
assert( Standard < nSelections ); assert( Standard < nSelections );
selectionText[ InputMethodPreedit ] = FALSE; selectionText[ InputMethodPreedit ] = false;
assert( InputMethodPreedit < nSelections ); assert( InputMethodPreedit < nSelections );
commandHistory = new KoTextDocCommandHistory( 100 ); commandHistory = new KoTextDocCommandHistory( 100 );
tStopWidth = formatCollection()->defaultFormat()->width( 'x' ) * 8; tStopWidth = formatCollection()->defaultFormat()->width( 'x' ) * 8;
@ -186,8 +186,8 @@ KoTextParag *KoTextDocument::createParag( KoTextDocument *d, KoTextParag *pr, Ko
void KoTextDocument::setPlainText( const TQString &text ) void KoTextDocument::setPlainText( const TQString &text )
{ {
clear(); clear();
//preferRichText = FALSE; //preferRichText = false;
//oTextValid = TRUE; //oTextValid = true;
//oText = text; //oText = text;
int lastNl = 0; int lastNl = 0;
@ -387,7 +387,7 @@ bool KoTextDocument::setSelectionEnd( int id, KoTextCursor *cursor )
{ {
TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id ); TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id );
if ( it == selections.end() ) if ( it == selections.end() )
return FALSE; return false;
KoTextDocumentSelection &sel = *it; KoTextDocumentSelection &sel = *it;
KoTextCursor start = sel.startCursor; KoTextCursor start = sel.startCursor;
@ -396,15 +396,15 @@ bool KoTextDocument::setSelectionEnd( int id, KoTextCursor *cursor )
if ( start == end ) { if ( start == end ) {
removeSelection( id ); removeSelection( id );
setSelectionStart( id, cursor ); setSelectionStart( id, cursor );
return TRUE; return true;
} }
if ( sel.endCursor.parag() == end.parag() ) { if ( sel.endCursor.parag() == end.parag() ) {
setSelectionEndHelper( id, sel, start, end ); setSelectionEndHelper( id, sel, start, end );
return TRUE; return true;
} }
bool inSelection = FALSE; bool inSelection = false;
KoTextCursor c( this ); KoTextCursor c( this );
KoTextCursor tmp = sel.startCursor; KoTextCursor tmp = sel.startCursor;
if ( sel.swapped ) if ( sel.swapped )
@ -412,32 +412,32 @@ bool KoTextDocument::setSelectionEnd( int id, KoTextCursor *cursor )
KoTextCursor tmp2 = *cursor; KoTextCursor tmp2 = *cursor;
c.setParag( tmp.parag()->paragId() < tmp2.parag()->paragId() ? tmp.parag() : tmp2.parag() ); c.setParag( tmp.parag()->paragId() < tmp2.parag()->paragId() ? tmp.parag() : tmp2.parag() );
KoTextCursor old; KoTextCursor old;
bool hadStart = FALSE; bool hadStart = false;
bool hadEnd = FALSE; bool hadEnd = false;
bool hadStartParag = FALSE; bool hadStartParag = false;
bool hadEndParag = FALSE; bool hadEndParag = false;
bool hadOldStart = FALSE; bool hadOldStart = false;
bool hadOldEnd = FALSE; bool hadOldEnd = false;
bool leftSelection = FALSE; bool leftSelection = false;
sel.swapped = FALSE; sel.swapped = false;
for ( ;; ) { for ( ;; ) {
if ( c == start ) if ( c == start )
hadStart = TRUE; hadStart = true;
if ( c == end ) if ( c == end )
hadEnd = TRUE; hadEnd = true;
if ( c.parag() == start.parag() ) if ( c.parag() == start.parag() )
hadStartParag = TRUE; hadStartParag = true;
if ( c.parag() == end.parag() ) if ( c.parag() == end.parag() )
hadEndParag = TRUE; hadEndParag = true;
if ( c == sel.startCursor ) if ( c == sel.startCursor )
hadOldStart = TRUE; hadOldStart = true;
if ( c == sel.endCursor ) if ( c == sel.endCursor )
hadOldEnd = TRUE; hadOldEnd = true;
if ( !sel.swapped && if ( !sel.swapped &&
( hadEnd && !hadStart || ( hadEnd && !hadStart ||
hadEnd && hadStart && start.parag() == end.parag() && start.index() > end.index() ) ) hadEnd && hadStart && start.parag() == end.parag() && start.index() > end.index() ) )
sel.swapped = TRUE; sel.swapped = true;
if ( c == end && hadStartParag || if ( c == end && hadStartParag ||
c == start && hadEndParag ) { c == start && hadEndParag ) {
@ -451,9 +451,9 @@ bool KoTextDocument::setSelectionEnd( int id, KoTextCursor *cursor )
if ( inSelection && if ( inSelection &&
( c == end && hadStart || c == start && hadEnd ) ) ( c == end && hadStart || c == start && hadEnd ) )
leftSelection = TRUE; leftSelection = true;
else if ( !leftSelection && !inSelection && ( hadStart || hadEnd ) ) else if ( !leftSelection && !inSelection && ( hadStart || hadEnd ) )
inSelection = TRUE; inSelection = true;
bool noSelectionAnymore = hadOldStart && hadOldEnd && leftSelection && !inSelection && !c.parag()->hasSelection( id ) && c.atParagEnd(); bool noSelectionAnymore = hadOldStart && hadOldEnd && leftSelection && !inSelection && !c.parag()->hasSelection( id ) && c.atParagEnd();
c.parag()->removeSelection( id ); c.parag()->removeSelection( id );
@ -474,7 +474,7 @@ bool KoTextDocument::setSelectionEnd( int id, KoTextCursor *cursor )
} }
if ( leftSelection ) if ( leftSelection )
inSelection = FALSE; inSelection = false;
old = c; old = c;
c.gotoNextLetter(); c.gotoNextLetter();
@ -492,7 +492,7 @@ bool KoTextDocument::setSelectionEnd( int id, KoTextCursor *cursor )
setSelectionEndHelper( id, sel, start, end ); setSelectionEndHelper( id, sel, start, end );
return TRUE; return true;
} }
void KoTextDocument::selectAll( int id ) void KoTextDocument::selectAll( int id )
@ -500,7 +500,7 @@ void KoTextDocument::selectAll( int id )
removeSelection( id ); removeSelection( id );
KoTextDocumentSelection sel; KoTextDocumentSelection sel;
sel.swapped = FALSE; sel.swapped = false;
KoTextCursor c( this ); KoTextCursor c( this );
c.setParag( fParag ); c.setParag( fParag );
@ -534,7 +534,7 @@ bool KoTextDocument::removeSelection( int id )
{ {
TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id ); TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id );
if ( it == selections.end() ) if ( it == selections.end() )
return FALSE; return false;
KoTextDocumentSelection &sel = *it; KoTextDocumentSelection &sel = *it;
@ -544,25 +544,25 @@ bool KoTextDocument::removeSelection( int id )
tmp = sel.endCursor; tmp = sel.endCursor;
c.setParag( tmp.parag() ); c.setParag( tmp.parag() );
KoTextCursor old; KoTextCursor old;
bool hadStart = FALSE; bool hadStart = false;
bool hadEnd = FALSE; bool hadEnd = false;
KoTextParag *lastParag = 0; KoTextParag *lastParag = 0;
bool leftSelection = FALSE; bool leftSelection = false;
bool inSelection = FALSE; bool inSelection = false;
sel.swapped = FALSE; sel.swapped = false;
for ( ;; ) { for ( ;; ) {
if ( !hadStart && c.parag() == sel.startCursor.parag() ) if ( !hadStart && c.parag() == sel.startCursor.parag() )
hadStart = TRUE; hadStart = true;
if ( !hadEnd && c.parag() == sel.endCursor.parag() ) if ( !hadEnd && c.parag() == sel.endCursor.parag() )
hadEnd = TRUE; hadEnd = true;
if ( !leftSelection && !inSelection && ( c.parag() == sel.startCursor.parag() || c.parag() == sel.endCursor.parag() ) ) if ( !leftSelection && !inSelection && ( c.parag() == sel.startCursor.parag() || c.parag() == sel.endCursor.parag() ) )
inSelection = TRUE; inSelection = true;
if ( inSelection && if ( inSelection &&
( c == sel.endCursor && hadStart || c == sel.startCursor && hadEnd ) ) { ( c == sel.endCursor && hadStart || c == sel.startCursor && hadEnd ) ) {
leftSelection = TRUE; leftSelection = true;
inSelection = FALSE; inSelection = false;
} }
bool noSelectionAnymore = leftSelection && !inSelection && !c.parag()->hasSelection( id ) && c.atParagEnd(); bool noSelectionAnymore = leftSelection && !inSelection && !c.parag()->hasSelection( id ) && c.atParagEnd();
@ -578,7 +578,7 @@ bool KoTextDocument::removeSelection( int id )
} }
selections.remove( id ); selections.remove( id );
return TRUE; return true;
} }
TQString KoTextDocument::selectedText( int id, bool withCustom ) const TQString KoTextDocument::selectedText( int id, bool withCustom ) const
@ -710,17 +710,17 @@ void KoTextDocument::setFormat( int id, const KoTextFormat *f, int flags )
} }
if ( c1.parag() == c2.parag() ) { if ( c1.parag() == c2.parag() ) {
c1.parag()->setFormat( c1.index(), c2.index() - c1.index(), f, TRUE, flags ); c1.parag()->setFormat( c1.index(), c2.index() - c1.index(), f, true, flags );
return; return;
} }
c1.parag()->setFormat( c1.index(), c1.parag()->length() - c1.index(), f, TRUE, flags ); c1.parag()->setFormat( c1.index(), c1.parag()->length() - c1.index(), f, true, flags );
KoTextParag *p = c1.parag()->next(); KoTextParag *p = c1.parag()->next();
while ( p && p != c2.parag() ) { while ( p && p != c2.parag() ) {
p->setFormat( 0, p->length(), f, TRUE, flags ); p->setFormat( 0, p->length(), f, true, flags );
p = p->next(); p = p->next();
} }
c2.parag()->setFormat( 0, c2.index(), f, TRUE, flags ); c2.parag()->setFormat( 0, c2.index(), f, true, flags );
} }
/*void KoTextDocument::copySelectedText( int id ) /*void KoTextDocument::copySelectedText( int id )
@ -760,13 +760,13 @@ void KoTextDocument::removeSelectedText( int id, KoTextCursor *cursor )
bool valid = true; bool valid = true;
if ( c1.parag() == fParag && c1.index() == 0 && if ( c1.parag() == fParag && c1.index() == 0 &&
c2.parag() == lParag && c2.index() == lParag->length() - 1 ) c2.parag() == lParag && c2.index() == lParag->length() - 1 )
valid = FALSE; valid = false;
bool didGoLeft = FALSE; bool didGoLeft = false;
if ( c1.index() == 0 && c1.parag() != fParag ) { if ( c1.index() == 0 && c1.parag() != fParag ) {
cursor->gotoPreviousLetter(); cursor->gotoPreviousLetter();
if ( valid ) if ( valid )
didGoLeft = TRUE; didGoLeft = true;
} }
c1.parag()->remove( c1.index(), c1.parag()->length() - 1 - c1.index() ); c1.parag()->remove( c1.index(), c1.parag()->length() - 1 - c1.index() );
@ -821,7 +821,7 @@ bool KoTextDocument::find( const TQString &expr, bool cs, bool wo, bool forward,
p = paragAt( *parag ); p = paragAt( *parag );
else if ( cursor ) else if ( cursor )
p = cursor->parag(); p = cursor->parag();
bool first = TRUE; bool first = true;
while ( p ) { while ( p ) {
TQString s = p->string()->toString(); TQString s = p->string()->toString();
@ -834,26 +834,26 @@ bool KoTextDocument::find( const TQString &expr, bool cs, bool wo, bool forward,
if ( !forward && first ) { if ( !forward && first ) {
start -= expr.length() + 1; start -= expr.length() + 1;
if ( start < 0 ) { if ( start < 0 ) {
first = FALSE; first = false;
p = p->prev(); p = p->prev();
continue; continue;
} }
} }
first = FALSE; first = false;
for ( ;; ) { for ( ;; ) {
int res = forward ? s.find( expr, start, cs ) : s.findRev( expr, start, cs ); int res = forward ? s.find( expr, start, cs ) : s.findRev( expr, start, cs );
if ( res == -1 ) if ( res == -1 )
break; break;
bool ok = TRUE; bool ok = true;
if ( wo ) { if ( wo ) {
int end = res + expr.length(); int end = res + expr.length();
if ( ( res == 0 || s[ res - 1 ].isSpace() || s[ res - 1 ].isPunct() ) && if ( ( res == 0 || s[ res - 1 ].isSpace() || s[ res - 1 ].isPunct() ) &&
( end == (int)s.length() || s[ end ].isSpace() || s[ end ].isPunct() ) ) ( end == (int)s.length() || s[ end ].isSpace() || s[ end ].isPunct() ) )
ok = TRUE; ok = true;
else else
ok = FALSE; ok = false;
} }
if ( ok ) { if ( ok ) {
cursor->setParag( p ); cursor->setParag( p );
@ -865,7 +865,7 @@ bool KoTextDocument::find( const TQString &expr, bool cs, bool wo, bool forward,
*parag = p->paragId(); *parag = p->paragId();
if ( index ) if ( index )
*index = res; *index = res;
return TRUE; return true;
} }
if ( forward ) { if ( forward ) {
start = res + 1; start = res + 1;
@ -878,21 +878,21 @@ bool KoTextDocument::find( const TQString &expr, bool cs, bool wo, bool forward,
p = forward ? p->next() : p->prev(); p = forward ? p->next() : p->prev();
} }
return FALSE; return false;
} }
bool KoTextDocument::inSelection( int selId, const TQPoint &pos ) const bool KoTextDocument::inSelection( int selId, const TQPoint &pos ) const
{ {
TQMap<int, KoTextDocumentSelection>::ConstIterator it = selections.find( selId ); TQMap<int, KoTextDocumentSelection>::ConstIterator it = selections.find( selId );
if ( it == selections.end() ) if ( it == selections.end() )
return FALSE; return false;
KoTextDocumentSelection sel = *it; KoTextDocumentSelection sel = *it;
KoTextParag *startParag = sel.startCursor.parag(); KoTextParag *startParag = sel.startCursor.parag();
KoTextParag *endParag = sel.endCursor.parag(); KoTextParag *endParag = sel.endCursor.parag();
if ( sel.startCursor.parag() == sel.endCursor.parag() && if ( sel.startCursor.parag() == sel.endCursor.parag() &&
sel.startCursor.parag()->selectionStart( selId ) == sel.endCursor.parag()->selectionEnd( selId ) ) sel.startCursor.parag()->selectionStart( selId ) == sel.endCursor.parag()->selectionEnd( selId ) )
return FALSE; return false;
if ( sel.endCursor.parag()->paragId() < sel.startCursor.parag()->paragId() ) { if ( sel.endCursor.parag()->paragId() < sel.startCursor.parag()->paragId() ) {
endParag = sel.startCursor.parag(); endParag = sel.startCursor.parag();
startParag = sel.endCursor.parag(); startParag = sel.endCursor.parag();
@ -901,14 +901,14 @@ bool KoTextDocument::inSelection( int selId, const TQPoint &pos ) const
KoTextParag *p = startParag; KoTextParag *p = startParag;
while ( p ) { while ( p ) {
if ( p->rect().contains( pos ) ) { if ( p->rect().contains( pos ) ) {
bool inSel = FALSE; bool inSel = false;
int selStart = p->selectionStart( selId ); int selStart = p->selectionStart( selId );
int selEnd = p->selectionEnd( selId ); int selEnd = p->selectionEnd( selId );
int y = 0; int y = 0;
int h = 0; int h = 0;
for ( int i = 0; i < p->length(); ++i ) { for ( int i = 0; i < p->length(); ++i ) {
if ( i == selStart ) if ( i == selStart )
inSel = TRUE; inSel = true;
if ( i == selEnd ) if ( i == selEnd )
break; break;
if ( p->at( i )->lineStart ) { if ( p->at( i )->lineStart ) {
@ -918,7 +918,7 @@ bool KoTextDocument::inSelection( int selId, const TQPoint &pos ) const
if ( pos.y() - p->rect().y() >= y && pos.y() - p->rect().y() <= y + h ) { if ( pos.y() - p->rect().y() >= y && pos.y() - p->rect().y() <= y + h ) {
if ( inSel && pos.x() >= p->at( i )->x && if ( inSel && pos.x() >= p->at( i )->x &&
pos.x() <= p->at( i )->x + p->at( i )->width /*p->at( i )->format()->width( p->at( i )->c )*/ ) pos.x() <= p->at( i )->x + p->at( i )->width /*p->at( i )->format()->width( p->at( i )->c )*/ )
return TRUE; return true;
} }
} }
} }
@ -929,7 +929,7 @@ bool KoTextDocument::inSelection( int selId, const TQPoint &pos ) const
p = p->next(); p = p->next();
} }
return FALSE; return false;
} }
TQPixmap *KoTextDocument::bufferPixmap( const TQSize &s ) TQPixmap *KoTextDocument::bufferPixmap( const TQSize &s )
@ -1000,7 +1000,7 @@ void KoTextDocument::setSelectionStart( int id, KoTextCursor *cursor )
KoTextDocumentSelection sel; KoTextDocumentSelection sel;
sel.startCursor = *cursor; sel.startCursor = *cursor;
sel.endCursor = *cursor; sel.endCursor = *cursor;
sel.swapped = FALSE; sel.swapped = false;
selections[ id ] = sel; selections[ id ] = sel;
} }
@ -1078,12 +1078,12 @@ KoTextParag *KoTextDocument::drawWYSIWYG( TQPainter *p, int cx, int cy, int cw,
// This stuff relies on doLayout()... simpler to just test for Printer. // This stuff relies on doLayout()... simpler to just test for Printer.
// If someone understand doLayout() please tell me (David) // If someone understand doLayout() please tell me (David)
/*if ( isWithoutDoubleBuffer() || par && par->withoutDoubleBuffer ) { */ /*if ( isWithoutDoubleBuffer() || par && par->withoutDoubleBuffer ) { */
//setWithoutDoubleBuffer( TRUE ); //setWithoutDoubleBuffer( true );
TQRect crect( cx, cy, cw, ch ); TQRect crect( cx, cy, cw, ch );
drawWithoutDoubleBuffer( p, crect, cg, zoomHandler ); drawWithoutDoubleBuffer( p, crect, cg, zoomHandler );
return 0; return 0;
} }
//setWithoutDoubleBuffer( FALSE ); //setWithoutDoubleBuffer( false );
if ( !firstParag() ) if ( !firstParag() )
return 0; return 0;
@ -1181,7 +1181,7 @@ floating:
TQRect cr( cx, cy, cw, ch ); TQRect cr( cx, cy, cw, ch );
cr = cr.intersect( TQRect( 0, pixelRect.y() + pixelRect.height(), docwidth, cr = cr.intersect( TQRect( 0, pixelRect.y() + pixelRect.height(), docwidth,
docheight - ( pixelRect.y() + pixelRect.height() ) ) ); docheight - ( pixelRect.y() + pixelRect.height() ) ) );
flow()->drawFloatingItems( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, FALSE ); flow()->drawFloatingItems( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, false );
} }
} }
@ -1238,7 +1238,7 @@ void KoTextDocument::drawWithoutDoubleBuffer( TQPainter *p, const TQRect &cr, co
p->fillRect( TQRect( 0, 0, pr.width(), pr.height() ), brush ); p->fillRect( TQRect( 0, 0, pr.width(), pr.height() ), brush );
//p->setBrushOrigin( p->brushOrigin() + TQPoint( 0, pr.y() ) ); //p->setBrushOrigin( p->brushOrigin() + TQPoint( 0, pr.y() ) );
parag->paint( *p, cg, 0, FALSE, parag->paint( *p, cg, 0, false,
crect_lu.x(), crect_lu.y(), crect_lu.x(), crect_lu.y(),
crect_lu.width(), crect_lu.height() ); crect_lu.width(), crect_lu.height() );
p->translate( 0, -pr.y() ); p->translate( 0, -pr.y() );
@ -1290,7 +1290,7 @@ void KoTextDocument::drawParagWYSIWYG( TQPainter *p, KoTextParag *parag, int cx,
bool useDoubleBuffer = !parag->document()->parent(); bool useDoubleBuffer = !parag->document()->parent();
if ( is_printer(p) ) if ( is_printer(p) )
useDoubleBuffer = FALSE; useDoubleBuffer = false;
// Can't handle transparency using double-buffering, in case of rotation/scaling (due to bitBlt) // Can't handle transparency using double-buffering, in case of rotation/scaling (due to bitBlt)
// The test on mat is almost like isIdentity(), but allows for translation. // The test on mat is almost like isIdentity(), but allows for translation.
//// ##### The way to fix this: initialize the pixmap to be fully transparent instead //// ##### The way to fix this: initialize the pixmap to be fully transparent instead
@ -1298,7 +1298,7 @@ void KoTextDocument::drawParagWYSIWYG( TQPainter *p, KoTextParag *parag, int cx,
TQWMatrix mat = p->worldMatrix(); TQWMatrix mat = p->worldMatrix();
if ( ( mat.m11() != 1.0 || mat.m22() != 1.0 || mat.m12() != 0.0 || mat.m21() != 0.0 ) if ( ( mat.m11() != 1.0 || mat.m22() != 1.0 || mat.m12() != 0.0 || mat.m21() != 0.0 )
&& brush.style() != TQt::SolidPattern ) && brush.style() != TQt::SolidPattern )
useDoubleBuffer = FALSE; useDoubleBuffer = false;
#ifdef DEBUG_PAINTING #ifdef DEBUG_PAINTING
kdDebug(32500) << "KoTextDocument::drawParagWYSIWYG parag->rect=" << parag->rect() kdDebug(32500) << "KoTextDocument::drawParagWYSIWYG parag->rect=" << parag->rect()
@ -1399,7 +1399,7 @@ void KoTextDocument::drawParagWYSIWYG( TQPainter *p, KoTextParag *parag, int cx,
} }
if ( resetChanged ) if ( resetChanged )
parag->setChanged( FALSE ); parag->setChanged( false );
} }

@ -121,7 +121,7 @@ public:
int numSelections() const { return nSelections; } int numSelections() const { return nSelections; }
void addSelection( int id ); void addSelection( int id );
TQString selectedText( int id, bool withCustom = TRUE ) const; TQString selectedText( int id, bool withCustom = true ) const;
//void copySelectedText( int id ); //void copySelectedText( int id );
void removeSelectedText( int id, KoTextCursor *cursor ); void removeSelectedText( int id, KoTextCursor *cursor );
@ -152,10 +152,10 @@ public:
void draw( TQPainter *p, const TQRect& rect, const TQColorGroup &cg, const TQBrush *paper = 0 ); void draw( TQPainter *p, const TQRect& rect, const TQColorGroup &cg, const TQBrush *paper = 0 );
void drawParag( TQPainter *p, KoTextParag *parag, int cx, int cy, int cw, int ch, void drawParag( TQPainter *p, KoTextParag *parag, int cx, int cy, int cw, int ch,
TQPixmap *&doubleBuffer, const TQColorGroup &cg, TQPixmap *&doubleBuffer, const TQColorGroup &cg,
bool drawCursor, KoTextCursor *cursor, bool resetChanged = TRUE ); bool drawCursor, KoTextCursor *cursor, bool resetChanged = true );
KoTextParag *draw( TQPainter *p, int cx, int cy, int cw, int ch, const TQColorGroup &cg, KoTextParag *draw( TQPainter *p, int cx, int cy, int cw, int ch, const TQColorGroup &cg,
bool onlyChanged = FALSE, bool drawCursor = FALSE, KoTextCursor *cursor = 0, bool onlyChanged = false, bool drawCursor = false, KoTextCursor *cursor = 0,
bool resetChanged = TRUE ); bool resetChanged = true );
#endif #endif
//void setDefaultFont( const TQFont &f ); //void setDefaultFont( const TQFont &f );
@ -200,7 +200,7 @@ public:
int undoDepth() const { return commandHistory->undoDepth(); } int undoDepth() const { return commandHistory->undoDepth(); }
int length() const; int length() const;
void clear( bool createEmptyParag = FALSE ); void clear( bool createEmptyParag = false );
KoTextParag* loadList( const TQDomElement& list, KoOasisContext& context, KoTextParag* lastParagraph, KoStyleCollection * styleColl, KoTextParag* nextParagraph ); KoTextParag* loadList( const TQDomElement& list, KoOasisContext& context, KoTextParag* lastParagraph, KoStyleCollection * styleColl, KoTextParag* nextParagraph );
@ -211,7 +211,7 @@ public:
void saveOasisContent( KoXmlWriter& writer, KoSavingContext& context ) const; void saveOasisContent( KoXmlWriter& writer, KoSavingContext& context ) const;
virtual KoTextParag *createParag( KoTextDocument *d, KoTextParag *pr = 0, KoTextParag *nx = 0, bool updateIds = TRUE ); virtual KoTextParag *createParag( KoTextDocument *d, KoTextParag *pr = 0, KoTextParag *nx = 0, bool updateIds = true );
// Whether margins are added or max'ed. // Whether margins are added or max'ed.
int addMargins() const { return true; } int addMargins() const { return true; }
@ -292,9 +292,9 @@ public:
/** The main drawing method. Equivalent to KoTextDocument::draw, but reimplemented /** The main drawing method. Equivalent to KoTextDocument::draw, but reimplemented
* for wysiwyg */ * for wysiwyg */
KoTextParag *drawWYSIWYG( TQPainter *p, int cx, int cy, int cw, int ch, const TQColorGroup &cg, KoTextParag *drawWYSIWYG( TQPainter *p, int cx, int cy, int cw, int ch, const TQColorGroup &cg,
KoTextZoomHandler* zoomHandler, bool onlyChanged = FALSE, KoTextZoomHandler* zoomHandler, bool onlyChanged = false,
bool drawCursor = FALSE, KoTextCursor *cursor = 0, bool drawCursor = false, KoTextCursor *cursor = 0,
bool resetChanged = TRUE, uint drawingFlags = KoTextDocument::DrawSelections ); bool resetChanged = true, uint drawingFlags = KoTextDocument::DrawSelections );
/** Draw a single paragraph (used by drawWYSIWYG and by KWTextFrameSet::drawCursor). /** Draw a single paragraph (used by drawWYSIWYG and by KWTextFrameSet::drawCursor).
* Equivalent to KoTextDocument::draw, but modified for wysiwyg */ * Equivalent to KoTextDocument::draw, but modified for wysiwyg */
@ -302,7 +302,7 @@ public:
TQPixmap *&doubleBuffer, const TQColorGroup &cg, TQPixmap *&doubleBuffer, const TQColorGroup &cg,
KoTextZoomHandler* zoomHandler, KoTextZoomHandler* zoomHandler,
bool drawCursor, KoTextCursor *cursor, bool drawCursor, KoTextCursor *cursor,
bool resetChanged = TRUE, bool resetChanged = true,
uint drawingFlags = KoTextDocument::DrawSelections ); uint drawingFlags = KoTextDocument::DrawSelections );
/** Set by drawParagWYSIWYG, used by KoTextParag::drawParagString */ /** Set by drawParagWYSIWYG, used by KoTextParag::drawParagString */

@ -54,9 +54,9 @@ void KoTextFormat::zoomChanged()
KoTextFormat::KoTextFormat() KoTextFormat::KoTextFormat()
{ {
//linkColor = TRUE; //linkColor = true;
ref = 0; ref = 0;
missp = FALSE; missp = false;
va = AlignNormal; va = AlignNormal;
collection = 0; collection = 0;
//// kotext: WYSIWYG works much much better with scalable fonts -> force it to be scalable //// kotext: WYSIWYG works much much better with scalable fonts -> force it to be scalable
@ -83,7 +83,7 @@ KoTextFormat::KoTextFormat()
} }
KoTextFormat::KoTextFormat( const TQFont &f, const TQColor &c, const TQString &_language, bool hyphenation, KoTextFormatCollection *parent ) KoTextFormat::KoTextFormat( const TQFont &f, const TQColor &c, const TQString &_language, bool hyphenation, KoTextFormatCollection *parent )
: fn( f ), col( c ) /*fm( TQFontMetrics( f ) ),*/ //linkColor( TRUE ) : fn( f ), col( c ) /*fm( TQFontMetrics( f ) ),*/ //linkColor( true )
{ {
#ifdef DEBUG_COLLECTION #ifdef DEBUG_COLLECTION
kdDebug(32500) << "KoTextFormat with font & color & parent (" << parent << "), addRef. " << this << endl; kdDebug(32500) << "KoTextFormat with font & color & parent (" << parent << "), addRef. " << this << endl;
@ -103,7 +103,7 @@ KoTextFormat::KoTextFormat( const TQFont &f, const TQColor &c, const TQString &_
//hei = fm.height(); //hei = fm.height();
//asc = fm.ascent(); //asc = fm.ascent();
//dsc = fm.descent(); //dsc = fm.descent();
missp = FALSE; missp = false;
va = AlignNormal; va = AlignNormal;
//// kotext //// kotext
d = new KoTextFormatPrivate; d = new KoTextFormatPrivate;
@ -1681,7 +1681,7 @@ KoTextFormatCollection::KoTextFormatCollection()
defFormat = new KoTextFormat( TQApplication::font(), TQColor(), TDEGlobal::locale()->language(), false ); defFormat = new KoTextFormat( TQApplication::font(), TQColor(), TDEGlobal::locale()->language(), false );
lastFormat = cres = 0; lastFormat = cres = 0;
cflags = -1; cflags = -1;
cKey.setAutoDelete( TRUE ); cKey.setAutoDelete( true );
cachedFormat = 0; cachedFormat = 0;
} }
@ -1694,7 +1694,7 @@ KoTextFormatCollection::KoTextFormatCollection( const TQFont& defaultFont, const
defFormat = new KoTextFormat( defaultFont, defaultColor, defaultLanguage, defaultHyphenation ); defFormat = new KoTextFormat( defaultFont, defaultColor, defaultLanguage, defaultHyphenation );
lastFormat = cres = 0; lastFormat = cres = 0;
cflags = -1; cflags = -1;
cKey.setAutoDelete( TRUE ); cKey.setAutoDelete( true );
cachedFormat = 0; cachedFormat = 0;
} }
@ -1813,7 +1813,7 @@ KoTextFormat *KoTextFormatCollection::format( const TQFont &f, const TQColor &c,
return cachedFormat; return cachedFormat;
} }
TQString key = KoTextFormat::getKey( f, c, FALSE, KoTextFormat::AlignNormal ); TQString key = KoTextFormat::getKey( f, c, false, KoTextFormat::AlignNormal );
cachedFormat = cKey.find( key ); cachedFormat = cKey.find( key );
cfont = f; cfont = f;
ccol = c; ccol = c;

@ -225,7 +225,7 @@ bool KoTextFormatterCore::format()
if ( maxY == 0 ) if ( maxY == 0 )
kdDebug(32500) << "KoTextFormatter::format " << parag->paragId() << " warning, maxY=0" << endl; kdDebug(32500) << "KoTextFormatter::format " << parag->paragId() << " warning, maxY=0" << endl;
#endif #endif
bool fullWidth = TRUE; bool fullWidth = true;
//int marg = left + initialRMargin; //int marg = left + initialRMargin;
// minw is the really minimum width needed for this paragraph, i.e. // minw is the really minimum width needed for this paragraph, i.e.
@ -248,7 +248,7 @@ bool KoTextFormatterCore::format()
int tmpBaseLine = 0, tmph = 0; int tmpBaseLine = 0, tmph = 0;
//int tminw = marg; //int tminw = marg;
int tmpWused = 0; int tmpWused = 0;
bool lastWasNonInlineCustom = FALSE; bool lastWasNonInlineCustom = false;
bool abort = false; bool abort = false;
int align = parag->alignment(); int align = parag->alignment();
@ -281,9 +281,9 @@ bool KoTextFormatterCore::format()
} }
if ( c->isCustom() && c->customItem()->placement() != KoTextCustomItem::PlaceInline ) if ( c->isCustom() && c->customItem()->placement() != KoTextCustomItem::PlaceInline )
lastWasNonInlineCustom = TRUE; lastWasNonInlineCustom = true;
else else
lastWasNonInlineCustom = FALSE; lastWasNonInlineCustom = false;
TQPair<int, int> widths = determineCharWidth(); TQPair<int, int> widths = determineCharWidth();
ww = widths.first; ww = widths.first;
@ -457,7 +457,7 @@ bool KoTextFormatterCore::format()
ww = nx - x; ww = nx - x;
} }
if ( x != left || availableWidth != dw ) if ( x != left || availableWidth != dw )
fullWidth = FALSE; fullWidth = false;
lineStart->y = y; lineStart->y = y;
parag->insertLineStart( i, lineStart ); parag->insertLineStart( i, lineStart );
tempWordData.clear(); tempWordData.clear();
@ -550,7 +550,7 @@ bool KoTextFormatterCore::format()
initialLMargin = x; initialLMargin = x;
availableWidth = dw - initialRMargin; availableWidth = dw - initialRMargin;
if ( x != left || availableWidth != dw ) if ( x != left || availableWidth != dw )
fullWidth = FALSE; fullWidth = false;
lineStart->y = y; lineStart->y = y;
parag->insertLineStart( i + 1, lineStart ); parag->insertLineStart( i + 1, lineStart );
tempWordData.clear(); tempWordData.clear();
@ -976,7 +976,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine(
int pixelx = zh->layoutUnitToPixelX( x ); int pixelx = zh->layoutUnitToPixelX( x );
int toAdd = 0; int toAdd = 0;
int toAddPix = 0; int toAddPix = 0;
bool first = TRUE; bool first = true;
KoTextRun *r = runs->first(); KoTextRun *r = runs->first();
int xmax = -0xffffff; int xmax = -0xffffff;
while ( r ) { while ( r ) {
@ -997,7 +997,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine(
chr.width += s; chr.width += s;
chr.pixelwidth += zh->layoutUnitToPixelX( s ); // ### rounding problem, recalculate chr.pixelwidth += zh->layoutUnitToPixelX( s ); // ### rounding problem, recalculate
} else if ( first ) { } else if ( first ) {
first = FALSE; first = false;
if ( chr.c == ' ' ) // trailing space if ( chr.c == ' ' ) // trailing space
{ {
//x -= chr.format()->width( ' ' ); //x -= chr.format()->width( ' ' );
@ -1010,8 +1010,8 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine(
#ifdef DEBUG_FORMATTER #ifdef DEBUG_FORMATTER
kdDebug(32500) << "koBidiReorderLine: pos=" << pos << " x(LU)=" << x << " toAdd(LU)=" << toAdd << " -> chr.x=" << chr.x << " pixelx=" << pixelx << "+" << zh->layoutUnitToPixelX( toAdd ) << ", pixelxadj=" << pixelx+zh->layoutUnitToPixelX( toAdd )-zh->layoutUnitToPixelX( chr.x ) << endl; kdDebug(32500) << "koBidiReorderLine: pos=" << pos << " x(LU)=" << x << " toAdd(LU)=" << toAdd << " -> chr.x=" << chr.x << " pixelx=" << pixelx << "+" << zh->layoutUnitToPixelX( toAdd ) << ", pixelxadj=" << pixelx+zh->layoutUnitToPixelX( toAdd )-zh->layoutUnitToPixelX( chr.x ) << endl;
#endif #endif
chr.rightToLeft = TRUE; chr.rightToLeft = true;
chr.startOfRun = FALSE; chr.startOfRun = false;
int ww = chr.width; int ww = chr.width;
if ( xmax < x + toAdd + ww ) xmax = x + toAdd + ww; if ( xmax < x + toAdd + ww ) xmax = x + toAdd + ww;
x += ww; x += ww;
@ -1032,7 +1032,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine(
space -= s; space -= s;
numSpaces--; numSpaces--;
} else if ( first ) { } else if ( first ) {
first = FALSE; first = false;
if ( chr.c == ' ' ) // trailing space if ( chr.c == ' ' ) // trailing space
{ {
//x -= chr.format()->width( ' ' ); //x -= chr.format()->width( ' ' );
@ -1042,8 +1042,8 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine(
} }
chr.x = x + toAdd; chr.x = x + toAdd;
chr.pixelxadj = pixelx + toAddPix - zh->layoutUnitToPixelX( chr.x ); chr.pixelxadj = pixelx + toAddPix - zh->layoutUnitToPixelX( chr.x );
chr.rightToLeft = FALSE; chr.rightToLeft = false;
chr.startOfRun = FALSE; chr.startOfRun = false;
int ww = chr.width; int ww = chr.width;
//kdDebug(32500) << "setting char " << pos << " at pos " << chr.x << endl; //kdDebug(32500) << "setting char " << pos << " at pos " << chr.x << endl;
if ( xmax < x + toAdd + ww ) xmax = x + toAdd + ww; if ( xmax < x + toAdd + ww ) xmax = x + toAdd + ww;
@ -1052,7 +1052,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine(
pos++; pos++;
} }
} }
text->at( r->start + start ).startOfRun = TRUE; text->at( r->start + start ).startOfRun = true;
r = runs->next(); r = runs->next();
} }

@ -1063,7 +1063,7 @@ KCommand * KoTextObject::setFormatCommand( KoTextCursor * cursor, KoTextFormat *
//kdDebug(32500) << "KoTextObject::setFormatCommand index=" << cursor->index() << " length-1=" << cursor->parag()->length() - 1 << endl; //kdDebug(32500) << "KoTextObject::setFormatCommand index=" << cursor->index() << " length-1=" << cursor->parag()->length() - 1 << endl;
if ( cursor && cursor->index() == cursor->parag()->length() - 1 ) { if ( cursor && cursor->index() == cursor->parag()->length() - 1 ) {
newFormat->addRef(); newFormat->addRef();
cursor->parag()->string()->setFormat( cursor->index(), newFormat, TRUE ); cursor->parag()->string()->setFormat( cursor->index(), newFormat, true );
if ( cursor->parag()->length() == 1 ) { if ( cursor->parag()->length() == 1 ) {
newFormat->addRef(); newFormat->addRef();
cursor->parag()->setFormat( newFormat ); cursor->parag()->setFormat( newFormat );
@ -1751,7 +1751,7 @@ bool KoTextObject::formatMore( int count /* = 10 */, bool emitAfterFormatting /*
if ( count == 0 ) if ( count == 0 )
{ {
formatTimer->start( interval, TRUE ); formatTimer->start( interval, true );
return true; return true;
} }
@ -1859,7 +1859,7 @@ bool KoTextObject::formatMore( int count /* = 10 */, bool emitAfterFormatting /*
// Now let's see when we'll need to get back here. // Now let's see when we'll need to get back here.
if ( m_lastFormatted ) if ( m_lastFormatted )
{ {
formatTimer->start( interval, TRUE ); formatTimer->start( interval, true );
#ifdef DEBUG_FORMAT_MORE #ifdef DEBUG_FORMAT_MORE
kdDebug(32500) << name() << " formatMore: will have to format more. formatTimer->start with interval=" << interval << endl; kdDebug(32500) << name() << " formatMore: will have to format more. formatTimer->start with interval=" << interval << endl;
#endif #endif
@ -1899,7 +1899,7 @@ void KoTextObject::typingStarted()
void KoTextObject::typingDone() void KoTextObject::typingDone()
{ {
changeIntervalTimer->start( 100, TRUE ); changeIntervalTimer->start( 100, true );
} }
@ -2173,7 +2173,7 @@ KoTextCursor KoTextObject::pasteOasisText( const TQDomElement &bodyElem, KoOasis
// Now split this parag, to make room for the next paragraphs // Now split this parag, to make room for the next paragraphs
resultCursor.setParag( lastParagraph ); resultCursor.setParag( lastParagraph );
resultCursor.setIndex( pos ); resultCursor.setIndex( pos );
resultCursor.splitAndInsertEmptyParag( FALSE, TRUE ); resultCursor.splitAndInsertEmptyParag( false, true );
removeNewline = true; removeNewline = true;
// Done with first parag, remove it and exit loop // Done with first parag, remove it and exit loop

@ -40,11 +40,11 @@
KoTextParag::KoTextParag( KoTextDocument *d, KoTextParag *pr, KoTextParag *nx, bool updateIds ) KoTextParag::KoTextParag( KoTextDocument *d, KoTextParag *pr, KoTextParag *nx, bool updateIds )
: p( pr ), n( nx ), doc( d ), : p( pr ), n( nx ), doc( d ),
m_invalid( true ), m_invalid( true ),
changed( FALSE ), changed( false ),
fullWidth( TRUE ), fullWidth( true ),
newLinesAllowed( TRUE ), // default in kotext newLinesAllowed( true ), // default in kotext
visible( TRUE ), //breakable( TRUE ), visible( true ), //breakable( true ),
movedDown( FALSE ), movedDown( false ),
m_toc( false ), m_toc( false ),
align( 0 ), align( 0 ),
m_lineChanged( -1 ), m_lineChanged( -1 ),
@ -71,10 +71,10 @@ KoTextParag::KoTextParag( KoTextDocument *d, KoTextParag *pr, KoTextParag *nx, b
if ( !n && doc ) if ( !n && doc )
doc->setLastParag( this ); doc->setLastParag( this );
//firstFormat = TRUE; //// unused //firstFormat = true; //// unused
//firstPProcess = TRUE; //firstPProcess = true;
//state = -1; //state = -1;
//needPreProcess = FALSE; //needPreProcess = false;
if ( p ) if ( p )
id = p->id + 1; id = p->id + 1;
@ -187,14 +187,14 @@ void KoTextParag::insert( int index, const TQString &s )
{ {
str->insert( index, s, formatCollection()->defaultFormat() ); str->insert( index, s, formatCollection()->defaultFormat() );
invalidate( index ); invalidate( index );
//needPreProcess = TRUE; //needPreProcess = true;
} }
void KoTextParag::truncate( int index ) void KoTextParag::truncate( int index )
{ {
str->truncate( index ); str->truncate( index );
insert( length(), " " ); insert( length(), " " );
//needPreProcess = TRUE; //needPreProcess = true;
} }
void KoTextParag::remove( int index, int len ) void KoTextParag::remove( int index, int len )
@ -210,7 +210,7 @@ void KoTextParag::remove( int index, int len )
} }
str->remove( index, len ); str->remove( index, len );
invalidate( 0 ); invalidate( 0 );
//needPreProcess = TRUE; //needPreProcess = true;
} }
void KoTextParag::join( KoTextParag *s ) void KoTextParag::join( KoTextParag *s )
@ -228,12 +228,12 @@ void KoTextParag::join( KoTextParag *s )
remove( length() - 1, 1 ); remove( length() - 1, 1 );
--start; --start;
} }
append( s->str->toString(), TRUE ); append( s->str->toString(), true );
for ( int i = 0; i < s->length(); ++i ) { for ( int i = 0; i < s->length(); ++i ) {
if ( doc->useFormatCollection() ) { if ( doc->useFormatCollection() ) {
s->str->at( i ).format()->addRef(); s->str->at( i ).format()->addRef();
str->setFormat( i + start, s->str->at( i ).format(), TRUE ); str->setFormat( i + start, s->str->at( i ).format(), true );
} }
if ( s->str->at( i ).isCustom() ) { if ( s->str->at( i ).isCustom() ) {
KoTextCustomItem * item = s->str->at( i ).customItem(); KoTextCustomItem * item = s->str->at( i ).customItem();
@ -257,14 +257,14 @@ void KoTextParag::join( KoTextParag *s )
invalidateCounters(); invalidateCounters();
//// ////
r.setHeight( oh ); r.setHeight( oh );
//needPreProcess = TRUE; //needPreProcess = true;
if ( n ) { if ( n ) {
KoTextParag *s = n; KoTextParag *s = n;
while ( s ) { while ( s ) {
s->id = s->p->id + 1; s->id = s->p->id + 1;
//s->state = -1; //s->state = -1;
//s->needPreProcess = TRUE; //s->needPreProcess = true;
s->changed = TRUE; s->changed = true;
s = s->n; s = s->n;
} }
} }
@ -277,7 +277,7 @@ void KoTextParag::move( int &dy )
//kdDebug(32500) << "KoTextParag::move paragId=" << paragId() << " dy=" << dy << endl; //kdDebug(32500) << "KoTextParag::move paragId=" << paragId() << " dy=" << dy << endl;
if ( dy == 0 ) if ( dy == 0 )
return; return;
changed = TRUE; changed = true;
r.moveBy( 0, dy ); r.moveBy( 0, dy );
if ( mFloatingItems ) { if ( mFloatingItems ) {
for ( KoTextCustomItem *i = mFloatingItems->first(); i; i = mFloatingItems->next() ) { for ( KoTextCustomItem *i = mFloatingItems->first(); i; i = mFloatingItems->next() ) {
@ -285,16 +285,16 @@ void KoTextParag::move( int &dy )
} }
} }
//if ( p ) //if ( p )
// p->lastInFrame = TRUE; // TQt does this, but the loop at the end of format() calls move a lot! // p->lastInFrame = true; // TQt does this, but the loop at the end of format() calls move a lot!
movedDown = FALSE; movedDown = false;
// do page breaks if required // do page breaks if required
if ( doc && doc->isPageBreakEnabled() ) { if ( doc && doc->isPageBreakEnabled() ) {
int shift; int shift;
if ( ( shift = doc->formatter()->formatVertically( doc, this ) ) ) { if ( ( shift = doc->formatter()->formatVertically( doc, this ) ) ) {
if ( p ) if ( p )
p->setChanged( TRUE ); p->setChanged( true );
dy += shift; dy += shift;
} }
} }
@ -312,10 +312,10 @@ void KoTextParag::format( int start, bool doMove )
r.moveTopLeft( TQPoint( documentX(), p ? p->r.y() + p->r.height() : documentY() ) ); r.moveTopLeft( TQPoint( documentX(), p ? p->r.y() + p->r.height() : documentY() ) );
//if ( p ) //if ( p )
// p->lastInFrame = FALSE; // p->lastInFrame = false;
movedDown = FALSE; movedDown = false;
bool formattedAgain = FALSE; bool formattedAgain = false;
formatAgain: formatAgain:
r.setWidth( documentWidth() ); r.setWidth( documentWidth() );
@ -388,7 +388,7 @@ void KoTextParag::format( int start, bool doMove )
int shift = doc->formatter()->formatVertically( doc, this ); int shift = doc->formatter()->formatVertically( doc, this );
//kdDebug(32500) << "formatVertically returned shift=" << shift << endl; //kdDebug(32500) << "formatVertically returned shift=" << shift << endl;
if ( shift && !formattedAgain ) { if ( shift && !formattedAgain ) {
formattedAgain = TRUE; formattedAgain = true;
goto formatAgain; goto formatAgain;
} }
} }
@ -408,12 +408,12 @@ void KoTextParag::format( int start, bool doMove )
break; break;
} }
if ( !s->isFullWidth() ) if ( !s->isFullWidth() )
makeInvalid = TRUE; makeInvalid = true;
if ( makeInvalid ) if ( makeInvalid )
s->invalidate( 0 ); s->invalidate( 0 );
s->move( dy ); s->move( dy );
//if ( s->lastInFrame ) //if ( s->lastInFrame )
// makeInvalid = TRUE; // makeInvalid = true;
s = s->n; s = s->n;
} }
} }
@ -455,13 +455,13 @@ void KoTextParag::format( int start, bool doMove )
} }
} }
//firstFormat = FALSE; //// unused //firstFormat = false; //// unused
if ( formatterWorked ) // only if it worked, i.e. we had some width to format it if ( formatterWorked ) // only if it worked, i.e. we had some width to format it
{ {
m_invalid = false; m_invalid = false;
} }
changed = TRUE; changed = true;
//#### str->setTextChanged( FALSE ); //#### str->setTextChanged( false );
} }
int KoTextParag::lineHeightOfChar( int i, int *bl, int *y ) const int KoTextParag::lineHeightOfChar( int i, int *bl, int *y ) const
@ -581,7 +581,7 @@ void KoTextParag::setFormat( int index, int len, const KoTextFormat *_f, bool us
for ( int i = 0; i < len; ++i ) { for ( int i = 0; i < len; ++i ) {
of = str->at( i + index ).format(); of = str->at( i + index ).format();
if ( !changed && _f->key() != of->key() ) if ( !changed && _f->key() != of->key() )
changed = TRUE; changed = true;
// Check things that need the textformatter to run // Check things that need the textformatter to run
// (e.g. not color changes) // (e.g. not color changes)
// ######## Is this test exhaustive? // ######## Is this test exhaustive?
@ -676,14 +676,14 @@ void KoTextParag::show()
{ {
if ( visible || !doc ) if ( visible || !doc )
return; return;
visible = TRUE; visible = true;
} }
void KoTextParag::hide() void KoTextParag::hide()
{ {
if ( !visible || !doc ) if ( !visible || !doc )
return; return;
visible = FALSE; visible = false;
} }
void KoTextParag::setDirection( TQChar::Direction d ) void KoTextParag::setDirection( TQChar::Direction d )
@ -715,7 +715,7 @@ void KoTextParag::setSelection( int id, int start, int end )
sel.start = start; sel.start = start;
sel.end = end; sel.end = end;
(*mSelections)[ id ] = sel; (*mSelections)[ id ] = sel;
setChanged( TRUE, TRUE ); setChanged( true, true );
} }
void KoTextParag::removeSelection( int id ) void KoTextParag::removeSelection( int id )
@ -724,7 +724,7 @@ void KoTextParag::removeSelection( int id )
return; return;
if ( mSelections ) if ( mSelections )
mSelections->remove( id ); mSelections->remove( id );
setChanged( TRUE, TRUE ); setChanged( true, true );
} }
int KoTextParag::selectionStart( int id ) const int KoTextParag::selectionStart( int id ) const
@ -750,20 +750,20 @@ int KoTextParag::selectionEnd( int id ) const
bool KoTextParag::hasSelection( int id ) const bool KoTextParag::hasSelection( int id ) const
{ {
if ( !mSelections ) if ( !mSelections )
return FALSE; return false;
TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->find( id ); TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->find( id );
if ( it == mSelections->end() ) if ( it == mSelections->end() )
return FALSE; return false;
return ( *it ).start != ( *it ).end || length() == 1; return ( *it ).start != ( *it ).end || length() == 1;
} }
bool KoTextParag::fullSelected( int id ) const bool KoTextParag::fullSelected( int id ) const
{ {
if ( !mSelections ) if ( !mSelections )
return FALSE; return false;
TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->find( id ); TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->find( id );
if ( it == mSelections->end() ) if ( it == mSelections->end() )
return FALSE; return false;
return ( *it ).start == 0 && ( *it ).end == str->length() - 1; return ( *it ).start == 0 && ( *it ).end == str->length() - 1;
} }
@ -845,9 +845,9 @@ uint KoTextParag::alignment() const
void KoTextParag::setFormat( KoTextFormat *fm ) void KoTextParag::setFormat( KoTextFormat *fm )
{ {
#if 0 #if 0
bool doUpdate = FALSE; bool doUpdate = false;
if (defFormat && (defFormat != formatCollection()->defaultFormat())) if (defFormat && (defFormat != formatCollection()->defaultFormat()))
doUpdate = TRUE; doUpdate = true;
#endif #endif
defFormat = formatCollection()->format( fm ); defFormat = formatCollection()->format( fm );
#if 0 #if 0
@ -1515,13 +1515,13 @@ void KoTextParag::paintLines( TQPainter &painter, const TQColorGroup &cg, KoText
TQMemArray<int> selectionStarts( nSels ); TQMemArray<int> selectionStarts( nSels );
TQMemArray<int> selectionEnds( nSels ); TQMemArray<int> selectionEnds( nSels );
if ( drawSelections ) { if ( drawSelections ) {
bool hasASelection = FALSE; bool hasASelection = false;
for ( int i = 0; i < nSels; ++i ) { for ( int i = 0; i < nSels; ++i ) {
if ( !hasSelection( i ) ) { if ( !hasSelection( i ) ) {
selectionStarts[ i ] = -1; selectionStarts[ i ] = -1;
selectionEnds[ i ] = -1; selectionEnds[ i ] = -1;
} else { } else {
hasASelection = TRUE; hasASelection = true;
selectionStarts[ i ] = selectionStart( i ); selectionStarts[ i ] = selectionStart( i );
int end = selectionEnd( i ); int end = selectionEnd( i );
if ( end == length() - 1 && n && n->hasSelection( i ) ) if ( end == length() - 1 && n && n->hasSelection( i ) )
@ -1530,7 +1530,7 @@ void KoTextParag::paintLines( TQPainter &painter, const TQColorGroup &cg, KoText
} }
} }
if ( !hasASelection ) if ( !hasASelection )
drawSelections = FALSE; drawSelections = false;
} }
// Draw the lines! // Draw the lines!
@ -1614,7 +1614,7 @@ void KoTextParag::paintLines( TQPainter &painter, const TQColorGroup &cg, KoText
// we flush when the selection state changes // we flush when the selection state changes
if ( drawSelections ) { if ( drawSelections ) {
// check if selection state changed - TODO update from TQRT // check if selection state changed - TODO update from TQRT
bool selectionChange = FALSE; bool selectionChange = false;
if ( drawSelections ) { if ( drawSelections ) {
for ( int j = 0; j < nSels; ++j ) { for ( int j = 0; j < nSels; ++j ) {
selectionChange = selectionStarts[ j ] == i+1 || selectionEnds[ j ] == i+1; selectionChange = selectionStarts[ j ] == i+1 || selectionEnds[ j ] == i+1;
@ -1786,7 +1786,7 @@ void KoTextParag::drawParagString( TQPainter &painter, const TQString &str, int
drawParagStringInternal( painter, str, start, draw_len, draw_startX_pix, drawParagStringInternal( painter, str, start, draw_len, draw_startX_pix,
lastY_pix, baseLine_pix, lastY_pix, baseLine_pix,
draw_bw, draw_bw,
h_pix, FALSE /*drawSelections*/, h_pix, false /*drawSelections*/,
format, selectionStarts, format, selectionStarts,
selectionEnds, cg, rightToLeft, line, zh, true ); selectionEnds, cg, rightToLeft, line, zh, true );
painter.restore(); painter.restore();
@ -2516,7 +2516,7 @@ void KoTextParag::drawFontEffects( TQPainter * p, KoTextFormat *format, KoTextZo
p->drawLine( startX, y, startX + bw, y ); p->drawLine( startX, y, startX + bw, y );
p->restore(); p->restore();
if ( font.underline() ) { // can this happen? if ( font.underline() ) { // can this happen?
font.setUnderline( FALSE ); font.setUnderline( false );
p->setFont( font ); p->setFont( font );
} }
} }
@ -2553,7 +2553,7 @@ void KoTextParag::drawFontEffects( TQPainter * p, KoTextFormat *format, KoTextZo
p->drawLine( startX, y, startX + bw, y ); p->drawLine( startX, y, startX + bw, y );
p->restore(); p->restore();
font.setUnderline( FALSE ); font.setUnderline( false );
p->setFont( font ); p->setFont( font );
} }
else if ( format->waveUnderline() ) else if ( format->waveUnderline() )
@ -2586,7 +2586,7 @@ void KoTextParag::drawFontEffects( TQPainter * p, KoTextFormat *format, KoTextZo
anc=acos(1.0-2*(static_cast<double>((startX+bw)%offset)/static_cast<double>(offset)))/3.1415*180; anc=acos(1.0-2*(static_cast<double>((startX+bw)%offset)/static_cast<double>(offset)))/3.1415*180;
p->drawArc( zigzag_x, y, offset, offset, 180*16, -tqRound(pos*anc*16) ); p->drawArc( zigzag_x, y, offset, offset, 180*16, -tqRound(pos*anc*16) );
p->restore(); p->restore();
font.setUnderline( FALSE ); font.setUnderline( false );
p->setFont( font ); p->setFont( font );
} }
@ -2626,7 +2626,7 @@ void KoTextParag::drawFontEffects( TQPainter * p, KoTextFormat *format, KoTextZo
y -= static_cast<int>(5*dimd); y -= static_cast<int>(5*dimd);
p->drawLine( startX, y, startX + bw, y ); p->drawLine( startX, y, startX + bw, y );
p->restore(); p->restore();
font.setStrikeOut( FALSE ); font.setStrikeOut( false );
p->setFont( font ); p->setFont( font );
} }
else if ( format->strikeOutType() == KoTextFormat::S_DOUBLE ) else if ( format->strikeOutType() == KoTextFormat::S_DOUBLE )
@ -2660,7 +2660,7 @@ void KoTextParag::drawFontEffects( TQPainter * p, KoTextFormat *format, KoTextZo
y -= static_cast<int>(2*dimd); y -= static_cast<int>(2*dimd);
p->drawLine( startX, y, startX + bw, y); p->drawLine( startX, y, startX + bw, y);
p->restore(); p->restore();
font.setStrikeOut( FALSE ); font.setStrikeOut( false );
p->setFont( font ); p->setFont( font );
} }
@ -2840,7 +2840,7 @@ void KoTextParag::loadOasisSpan( const TQDomElement& parent, KoOasisContext& con
KoTextFormat f; KoTextFormat f;
f.load( context ); f.load( context );
//kdDebug(32500) << "loadOasisSpan: applying formatting from " << pos << " to " << pos+length << "\n format=" << f.key() << endl; //kdDebug(32500) << "loadOasisSpan: applying formatting from " << pos << " to " << pos+length << "\n format=" << f.key() << endl;
setFormat( pos, length, document()->formatCollection()->format( &f ), TRUE ); setFormat( pos, length, document()->formatCollection()->format( &f ), true );
pos += length; pos += length;
} }
context.styleStack().restore(); context.styleStack().restore();
@ -2903,7 +2903,7 @@ void KoTextParag::loadOasis( const TQDomElement& parent, KoOasisContext& context
// Apply default format to trailing space // Apply default format to trailing space
const int len = str->length(); const int len = str->length();
Q_ASSERT( len >= 1 ); Q_ASSERT( len >= 1 );
setFormat( len - 1, 1, paragFormat(), TRUE ); setFormat( len - 1, 1, paragFormat(), true );
setChanged( true ); setChanged( true );
invalidate( 0 ); invalidate( 0 );

@ -52,7 +52,7 @@ class KOTEXT_EXPORT KoTextParag
friend class KoTextCursor; friend class KoTextCursor;
public: public:
KoTextParag( KoTextDocument *d, KoTextParag *pr = 0, KoTextParag *nx = 0, bool updateIds = TRUE ); KoTextParag( KoTextDocument *d, KoTextParag *pr = 0, KoTextParag *nx = 0, bool updateIds = true );
virtual ~KoTextParag(); virtual ~KoTextParag();
KoTextString *string() const; KoTextString *string() const;
@ -82,12 +82,12 @@ public:
void setNext( KoTextParag *s ); void setNext( KoTextParag *s );
void insert( int index, const TQString &s ); void insert( int index, const TQString &s );
void append( const TQString &s, bool reallyAtEnd = FALSE ); void append( const TQString &s, bool reallyAtEnd = false );
void truncate( int index ); void truncate( int index );
void remove( int index, int len ); void remove( int index, int len );
void move( int &dy ); void move( int &dy );
void format( int start = -1, bool doMove = TRUE ); void format( int start = -1, bool doMove = true );
/// Call this to ensure that format() will be called on this paragraph later on /// Call this to ensure that format() will be called on this paragraph later on
void invalidate( int chr /*ignored*/ = 0 ); void invalidate( int chr /*ignored*/ = 0 );
@ -96,7 +96,7 @@ public:
/// 'changed' tells the painting code what it needs to paint /// 'changed' tells the painting code what it needs to paint
bool hasChanged() const; bool hasChanged() const;
void setChanged( bool b, bool recursive = FALSE ); void setChanged( bool b, bool recursive = false );
short int lineChanged(); // first line that has been changed. short int lineChanged(); // first line that has been changed.
void setLineChanged( short int line ); void setLineChanged( short int line );
@ -125,7 +125,7 @@ public:
TQMap<int, KoTextParagLineStart*> &lineStartList(); TQMap<int, KoTextParagLineStart*> &lineStartList();
void setFormat( int index, int len, const KoTextFormat *f, bool useCollection = TRUE, int flags = -1 ); void setFormat( int index, int len, const KoTextFormat *f, bool useCollection = true, int flags = -1 );
void setAlignment( uint a ); void setAlignment( uint a );
void setAlignmentDirect( uint a ) { align = a; } void setAlignmentDirect( uint a ) { align = a; }
@ -475,7 +475,7 @@ inline KoTextParag *KoTextParag::next() const
inline bool KoTextParag::hasAnySelection() const inline bool KoTextParag::hasAnySelection() const
{ {
return mSelections ? !selections().isEmpty() : FALSE; return mSelections ? !selections().isEmpty() : false;
} }
/*inline void KoTextParag::setEndState( int s ) /*inline void KoTextParag::setEndState( int s )

@ -92,11 +92,11 @@ KoTextView::KoTextView( KoTextObject *textobj )
m_textobj->formatMore( 2 ); m_textobj->formatMore( 2 );
blinkCursorVisible = FALSE; blinkCursorVisible = false;
inDoubleClick = FALSE; inDoubleClick = false;
mightStartDrag = FALSE; mightStartDrag = false;
possibleTripleClick = FALSE; possibleTripleClick = false;
afterTripleClick = FALSE; afterTripleClick = false;
m_currentFormat = 0; m_currentFormat = 0;
m_variablePosition =-1; m_variablePosition =-1;
m_overwriteMode = false; m_overwriteMode = false;
@ -165,30 +165,30 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ
{ {
textObject()->typingStarted(); textObject()->typingStarted();
/* bool selChanged = FALSE; /* bool selChanged = false;
for ( int i = 1; i < textDocument()->numSelections(); ++i ) for ( int i = 1; i < textDocument()->numSelections(); ++i )
selChanged = textDocument()->removeSelection( i ) || selChanged; selChanged = textDocument()->removeSelection( i ) || selChanged;
if ( selChanged ) { if ( selChanged ) {
// m_cursor->parag()->document()->nextDoubleBuffered = TRUE; ######## we need that only if we have nested items/documents // m_cursor->parag()->document()->nextDoubleBuffered = true; ######## we need that only if we have nested items/documents
textFrameSet()->selectionChangedNotify(); textFrameSet()->selectionChangedNotify();
}*/ }*/
bool clearUndoRedoInfo = TRUE; bool clearUndoRedoInfo = true;
if ( TDEShortcut( KKey( e ) ) == TDEStdAccel::deleteWordBack() ) if ( TDEShortcut( KKey( e ) ) == TDEStdAccel::deleteWordBack() )
{ {
if ( m_cursor->parag()->string()->isRightToLeft() ) if ( m_cursor->parag()->string()->isRightToLeft() )
deleteWordRight(); deleteWordRight();
else else
deleteWordLeft(); deleteWordLeft();
clearUndoRedoInfo = TRUE; clearUndoRedoInfo = true;
} else if ( TDEShortcut( KKey( e ) ) == TDEStdAccel::deleteWordForward() ) } else if ( TDEShortcut( KKey( e ) ) == TDEStdAccel::deleteWordForward() )
{ {
if ( m_cursor->parag()->string()->isRightToLeft() ) if ( m_cursor->parag()->string()->isRightToLeft() )
deleteWordLeft(); deleteWordLeft();
else else
deleteWordRight(); deleteWordRight();
clearUndoRedoInfo = TRUE; clearUndoRedoInfo = true;
} }
else else
switch ( e->key() ) { switch ( e->key() ) {
@ -233,7 +233,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ
{ {
if ( textObject()->hasSelection() ) if ( textObject()->hasSelection() )
textObject()->removeSelectedText( m_cursor ); textObject()->removeSelectedText( m_cursor );
clearUndoRedoInfo = FALSE; clearUndoRedoInfo = false;
textObject()->doKeyboardAction( m_cursor, m_currentFormat, KoTextObject::ActionReturn ); textObject()->doKeyboardAction( m_cursor, m_currentFormat, KoTextObject::ActionReturn );
Q_ASSERT( m_cursor->parag()->prev() ); Q_ASSERT( m_cursor->parag()->prev() );
if ( m_cursor->parag()->prev() ) if ( m_cursor->parag()->prev() )
@ -250,7 +250,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ
textObject()->doKeyboardAction( m_cursor, m_currentFormat, KoTextObject::ActionDelete ); textObject()->doKeyboardAction( m_cursor, m_currentFormat, KoTextObject::ActionDelete );
clearUndoRedoInfo = FALSE; clearUndoRedoInfo = false;
break; break;
case Key_Backtab: case Key_Backtab:
if (e->state() & ShiftButton && m_cursor->parag() && m_cursor->atParagStart() && m_cursor->parag()->counter() && textDecreaseIndent()) if (e->state() & ShiftButton && m_cursor->parag() && m_cursor->atParagStart() && m_cursor->parag()->counter() && textDecreaseIndent())
@ -263,7 +263,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ
} }
textObject()->doKeyboardAction( m_cursor, m_currentFormat, KoTextObject::ActionBackspace ); textObject()->doKeyboardAction( m_cursor, m_currentFormat, KoTextObject::ActionBackspace );
clearUndoRedoInfo = FALSE; clearUndoRedoInfo = false;
break; break;
case Key_F16: // Copy key on Sun keyboards case Key_F16: // Copy key on Sun keyboards
emit copy(); emit copy();
@ -311,7 +311,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ
if ( e->text().length() && if ( e->text().length() &&
( !e->ascii() || e->ascii() >= 32 ) || ( !e->ascii() || e->ascii() >= 32 ) ||
( e->text() == "\t" && !( e->state() & ControlButton ) ) ) { ( e->text() == "\t" && !( e->state() & ControlButton ) ) ) {
clearUndoRedoInfo = FALSE; clearUndoRedoInfo = false;
TQString text = e->text(); TQString text = e->text();
if ( d->m_backSpeller ) { if ( d->m_backSpeller ) {
@ -382,13 +382,13 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ
insertNonbreakingSpace(); insertNonbreakingSpace();
break; break;
default: default:
clearUndoRedoInfo = FALSE; clearUndoRedoInfo = false;
break; break;
} }
} }
else // e.g. just Key_Shift -> don't do anything (#129481) else // e.g. just Key_Shift -> don't do anything (#129481)
{ {
clearUndoRedoInfo = FALSE; clearUndoRedoInfo = false;
} }
} }
break; break;
@ -656,7 +656,7 @@ void KoTextView::extendParagraphSelection( const TQPoint& iPoint )
KoTextCursor oldCursor = *m_cursor; KoTextCursor oldCursor = *m_cursor;
placeCursor( iPoint ); placeCursor( iPoint );
bool redraw = FALSE; bool redraw = false;
if ( textDocument()->hasSelection( KoTextDocument::Standard ) ) if ( textDocument()->hasSelection( KoTextDocument::Standard ) )
{ {
redraw = textDocument()->setSelectionEnd( KoTextDocument::Standard, m_cursor ); redraw = textDocument()->setSelectionEnd( KoTextDocument::Standard, m_cursor );
@ -689,7 +689,7 @@ TQString KoTextView::wordUnderCursor( const KoTextCursor& cursor )
bool KoTextView::handleMousePressEvent( TQMouseEvent *e, const TQPoint &iPoint, bool canStartDrag, bool insertDirectCursor ) bool KoTextView::handleMousePressEvent( TQMouseEvent *e, const TQPoint &iPoint, bool canStartDrag, bool insertDirectCursor )
{ {
bool addParag = false; bool addParag = false;
mightStartDrag = FALSE; mightStartDrag = false;
hideCursor(); hideCursor();
if (possibleTripleClick) if (possibleTripleClick)
@ -716,14 +716,14 @@ bool KoTextView::handleMousePressEvent( TQMouseEvent *e, const TQPoint &iPoint,
KoTextDocument * textdoc = textDocument(); KoTextDocument * textdoc = textDocument();
if ( canStartDrag && textdoc->inSelection( KoTextDocument::Standard, iPoint ) ) { if ( canStartDrag && textdoc->inSelection( KoTextDocument::Standard, iPoint ) ) {
mightStartDrag = TRUE; mightStartDrag = true;
m_textobj->emitShowCursor(); m_textobj->emitShowCursor();
dragStartTimer->start( TQApplication::startDragTime(), TRUE ); dragStartTimer->start( TQApplication::startDragTime(), true );
dragStartPos = e->pos(); dragStartPos = e->pos();
return addParag; return addParag;
} }
bool redraw = FALSE; bool redraw = false;
if ( textdoc->hasSelection( KoTextDocument::Standard ) ) { if ( textdoc->hasSelection( KoTextDocument::Standard ) ) {
if ( !( e->state() & ShiftButton ) ) { if ( !( e->state() & ShiftButton ) ) {
redraw = textdoc->removeSelection( KoTextDocument::Standard ); redraw = textdoc->removeSelection( KoTextDocument::Standard );
@ -778,7 +778,7 @@ void KoTextView::handleMouseMoveEvent( TQMouseEvent*, const TQPoint& iPoint )
*m_cursor = oldCursor; *m_cursor = oldCursor;
} }
bool redraw = FALSE; bool redraw = false;
if ( textDocument()->hasSelection( KoTextDocument::Standard ) ) if ( textDocument()->hasSelection( KoTextDocument::Standard ) )
redraw = textDocument()->setSelectionEnd( KoTextDocument::Standard, m_cursor ) || redraw; redraw = textDocument()->setSelectionEnd( KoTextDocument::Standard, m_cursor ) || redraw;
else // it may be that the initial click was out of the frame else // it may be that the initial click was out of the frame
@ -795,7 +795,7 @@ void KoTextView::handleMouseReleaseEvent()
if ( dragStartTimer->isActive() ) if ( dragStartTimer->isActive() )
dragStartTimer->stop(); dragStartTimer->stop();
if ( mightStartDrag ) { if ( mightStartDrag ) {
textObject()->selectAll( FALSE ); textObject()->selectAll( false );
mightStartDrag = false; mightStartDrag = false;
} }
else else
@ -813,7 +813,7 @@ void KoTextView::handleMouseReleaseEvent()
TQApplication::clipboard()->setSelectionMode( false ); TQApplication::clipboard()->setSelectionMode( false );
} }
inDoubleClick = FALSE; inDoubleClick = false;
m_textobj->emitShowCursor(); m_textobj->emitShowCursor();
} }
@ -827,7 +827,7 @@ void KoTextView::handleMouseDoubleClickEvent( TQMouseEvent*ev, const TQPoint& i
return; return;
} }
inDoubleClick = TRUE; inDoubleClick = true;
*m_cursor = selectWordUnderCursor( *m_cursor ); *m_cursor = selectWordUnderCursor( *m_cursor );
textObject()->selectionChangedNotify(); textObject()->selectionChangedNotify();
// Copy the selection. // Copy the selection.
@ -853,7 +853,7 @@ void KoTextView::handleMouseTripleClickEvent( TQMouseEvent*ev, const TQPoint& /*
return; return;
} }
afterTripleClick= true; afterTripleClick= true;
inDoubleClick = FALSE; inDoubleClick = false;
*m_cursor = selectParagUnderCursor( *m_cursor ); *m_cursor = selectParagUnderCursor( *m_cursor );
TQTimer::singleShot(TQApplication::doubleClickInterval(),this,TQ_SLOT(afterTripleClickTimeout())); TQTimer::singleShot(TQApplication::doubleClickInterval(),this,TQ_SLOT(afterTripleClickTimeout()));
} }
@ -888,7 +888,7 @@ bool KoTextView::insertParagraph(const TQPoint &pos)
for (int i = 0; i < nbParag ;i++) for (int i = 0; i < nbParag ;i++)
{ {
KoTextParag *s=textDocument()->createParag( textDocument(), last ); KoTextParag *s=textDocument()->createParag( textDocument(), last );
s->setFormat( 0, 1, f, TRUE ); s->setFormat( 0, 1, f, true );
if ( style ) if ( style )
s->setStyle( style ); s->setStyle( style );
s->setCounter( counter ); s->setCounter( counter );
@ -978,8 +978,8 @@ KCommand* KoTextView::setFormatCommand( const KoTextFormat * newFormat, int flag
void KoTextView::dragStarted() void KoTextView::dragStarted()
{ {
mightStartDrag = FALSE; mightStartDrag = false;
inDoubleClick = FALSE; inDoubleClick = false;
} }
void KoTextView::applyStyle( const KoParagStyle * style ) void KoTextView::applyStyle( const KoParagStyle * style )

@ -99,12 +99,12 @@ private:
void drawPie( int x, int y, int w, int h, int a, int alen ); void drawPie( int x, int y, int w, int h, int a, int alen );
void drawChord( int x, int y, int w, int h, int a, int alen ); void drawChord( int x, int y, int w, int h, int a, int alen );
void drawPolyline( const TQPointArray& pa ); void drawPolyline( const TQPointArray& pa );
void drawPolygon( const TQPointArray& pa, bool winding=FALSE ); void drawPolygon( const TQPointArray& pa, bool winding=false );
/** /**
* drawPolyPolygon draw the XOR of a list of polygons * drawPolyPolygon draw the XOR of a list of polygons
* listPa : list of polygons * listPa : list of polygons
*/ */
void drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding=FALSE ); void drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding=false );
void drawImage( int x, int y, const TQImage &, int sx = 0, int sy = 0, int sw = -1, int sh = -1 ); void drawImage( int x, int y, const TQImage &, int sx = 0, int sy = 0, int sw = -1, int sh = -1 );
// Text drawing functions // Text drawing functions
@ -113,7 +113,7 @@ private:
void drawText( int x, int y, int w, int h, int flags, const TQString &s, double rotation ); void drawText( int x, int y, int w, int h, int flags, const TQString &s, double rotation );
// matrix transformation : only used in some bitmap manipulation // matrix transformation : only used in some bitmap manipulation
void setWorldMatrix( const TQWMatrix &, bool combine=FALSE ); void setWorldMatrix( const TQWMatrix &, bool combine=false );
private: private:
TQPainter mPainter; TQPainter mPainter;

@ -131,10 +131,10 @@ public:
virtual void drawPie( int x, int y, int w, int h, int a, int alen ) = 0; virtual void drawPie( int x, int y, int w, int h, int a, int alen ) = 0;
virtual void drawChord( int x, int y, int w, int h, int a, int alen ) = 0; virtual void drawChord( int x, int y, int w, int h, int a, int alen ) = 0;
virtual void drawPolyline( const TQPointArray &pa ) = 0; virtual void drawPolyline( const TQPointArray &pa ) = 0;
virtual void drawPolygon( const TQPointArray &pa, bool winding=FALSE ) = 0; virtual void drawPolygon( const TQPointArray &pa, bool winding=false ) = 0;
// drawPolyPolygon draw the XOR of a list of polygons // drawPolyPolygon draw the XOR of a list of polygons
// listPa : list of polygons // listPa : list of polygons
virtual void drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding=FALSE ) = 0; virtual void drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding=false ) = 0;
virtual void drawImage( int x, int y, const TQImage &, int sx = 0, int sy = 0, int sw = -1, int sh = -1 ) = 0; virtual void drawImage( int x, int y, const TQImage &, int sx = 0, int sy = 0, int sw = -1, int sh = -1 ) = 0;
// Text drawing functions // Text drawing functions
@ -143,7 +143,7 @@ public:
virtual void drawText( int x, int y, int w, int h, int flags, const TQString &s, double rotation ) = 0; virtual void drawText( int x, int y, int w, int h, int flags, const TQString &s, double rotation ) = 0;
// matrix transformation : only used for bitmap manipulation // matrix transformation : only used for bitmap manipulation
virtual void setWorldMatrix( const TQWMatrix &, bool combine=FALSE ) = 0; virtual void setWorldMatrix( const TQWMatrix &, bool combine=false ) = 0;
private: private:
KoWmfReadPrivate *mKwmf; KoWmfReadPrivate *mKwmf;

@ -104,10 +104,10 @@ public:
void drawPie( int left, int top, int width, int height, int a, int alen ); void drawPie( int left, int top, int width, int height, int a, int alen );
void drawChord( int left, int top, int width, int height, int a, int alen ); void drawChord( int left, int top, int width, int height, int a, int alen );
void drawPolyline( const TQPointArray& pa ); void drawPolyline( const TQPointArray& pa );
void drawPolygon( const TQPointArray& pa, bool winding=FALSE ); void drawPolygon( const TQPointArray& pa, bool winding=false );
// drawPolyPolygon draw the XOR of a list of polygons // drawPolyPolygon draw the XOR of a list of polygons
// listPa : list of polygons // listPa : list of polygons
void drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding=FALSE ); void drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding=false );
void drawImage( int left, int top, const TQImage &, int sx = 0, int sy = 0, int sw = -1, int sh = -1 ); void drawImage( int left, int top, const TQImage &, int sx = 0, int sy = 0, int sw = -1, int sh = -1 );
// Text drawing functions // Text drawing functions

@ -56,20 +56,20 @@ bool SpellChecker::run( const TQString& command, void* data, const TQString& dat
{ {
kdDebug(31000) << "SpellChecker does only accept the command 'spellcheck'" << endl; kdDebug(31000) << "SpellChecker does only accept the command 'spellcheck'" << endl;
kdDebug(31000) << " The commands " << command << " is not accepted" << endl; kdDebug(31000) << " The commands " << command << " is not accepted" << endl;
return FALSE; return false;
} }
// Check wether we can accept the data // Check wether we can accept the data
if ( datatype != "TQString" ) if ( datatype != "TQString" )
{ {
kdDebug(31000) << "SpellChecker only accepts datatype TQString" << endl; kdDebug(31000) << "SpellChecker only accepts datatype TQString" << endl;
return FALSE; return false;
} }
if ( mimetype != "text/plain" && mimetype != "application/x-singleword" ) if ( mimetype != "text/plain" && mimetype != "application/x-singleword" )
{ {
kdDebug(31000) << "SpellChecker only accepts mimetype text/plain and application/x-singleword" << endl; kdDebug(31000) << "SpellChecker only accepts mimetype text/plain and application/x-singleword" << endl;
return FALSE; return false;
} }
// Get data // Get data
@ -91,13 +91,13 @@ bool SpellChecker::run( const TQString& command, void* data, const TQString& dat
kosconfig.setNoRootAffix(config->readNumEntry ("KSpell_NoRootAffix", 0)); kosconfig.setNoRootAffix(config->readNumEntry ("KSpell_NoRootAffix", 0));
kosconfig.setRunTogether(config->readNumEntry ("KSpell_RunTogether", 0)); kosconfig.setRunTogether(config->readNumEntry ("KSpell_RunTogether", 0));
kosconfig.setDictionary(config->readEntry ("KSpell_Dictionary", "")); kosconfig.setDictionary(config->readEntry ("KSpell_Dictionary", ""));
kosconfig.setDictFromList(config->readNumEntry ("KSpell_DictFromList", FALSE)); kosconfig.setDictFromList(config->readNumEntry ("KSpell_DictFromList", false));
kosconfig.setEncoding(config->readNumEntry ("KSpell_Encoding", KOS_E_ASCII)); kosconfig.setEncoding(config->readNumEntry ("KSpell_Encoding", KOS_E_ASCII));
kosconfig.setClient(config->readNumEntry ("KSpell_Client", KOS_CLIENT_ISPELL)); kosconfig.setClient(config->readNumEntry ("KSpell_Client", KOS_CLIENT_ISPELL));
kosconfig.setNoRootAffix(config->readNumEntry ("KSpell_NoRootAffix", 0)); kosconfig.setNoRootAffix(config->readNumEntry ("KSpell_NoRootAffix", 0));
kosconfig.setRunTogether(config->readNumEntry ("KSpell_RunTogether", 0)); kosconfig.setRunTogether(config->readNumEntry ("KSpell_RunTogether", 0));
kosconfig.setDictionary(config->readEntry ("KSpell_Dictionary", "")); kosconfig.setDictionary(config->readEntry ("KSpell_Dictionary", ""));
kosconfig.setDictFromList(config->readNumEntry ("KSpell_DictFromList", FALSE)); kosconfig.setDictFromList(config->readNumEntry ("KSpell_DictFromList", false));
kosconfig.setIgnoreCase( config->readNumEntry( "KSpell_IgnoreCase", 0)); kosconfig.setIgnoreCase( config->readNumEntry( "KSpell_IgnoreCase", 0));
kosconfig.setIgnoreAccent( config->readNumEntry( "KSpell_IgnoreAccent", 0)); kosconfig.setIgnoreAccent( config->readNumEntry( "KSpell_IgnoreAccent", 0));
@ -131,7 +131,7 @@ bool SpellChecker::run( const TQString& command, void* data, const TQString& dat
*((TQString*)data) = buffer; *((TQString*)data) = buffer;
} }
#endif #endif
return TRUE; return true;
} }
#include "main.moc" #include "main.moc"

@ -238,11 +238,11 @@ bool Thesaurus::run(const TQString& command, void* data, const TQString& datatyp
// Check whether we can accept the data // Check whether we can accept the data
if ( datatype != "TQString" ) { if ( datatype != "TQString" ) {
kdDebug(31000) << "Thesaurus only accepts datatype TQString" << endl; kdDebug(31000) << "Thesaurus only accepts datatype TQString" << endl;
return FALSE; return false;
} }
if ( mimetype != "text/plain" ) { if ( mimetype != "text/plain" ) {
kdDebug(31000) << "Thesaurus only accepts mimetype text/plain" << endl; kdDebug(31000) << "Thesaurus only accepts mimetype text/plain" << endl;
return FALSE; return false;
} }
if ( command == "thesaurus" ) { if ( command == "thesaurus" ) {
@ -260,7 +260,7 @@ bool Thesaurus::run(const TQString& command, void* data, const TQString& datatyp
} else { } else {
kdDebug(31000) << "Thesaurus does only accept the command 'thesaurus' or 'thesaurus_standalone'" << endl; kdDebug(31000) << "Thesaurus does only accept the command 'thesaurus' or 'thesaurus_standalone'" << endl;
kdDebug(31000) << "The command " << command << " is not accepted" << endl; kdDebug(31000) << "The command " << command << " is not accepted" << endl;
return FALSE; return false;
} }
// Get data and clean it up: // Get data and clean it up:
@ -284,7 +284,7 @@ bool Thesaurus::run(const TQString& command, void* data, const TQString& datatyp
*((TQString*)data) = m_replace->text(); *((TQString*)data) = m_replace->text();
} }
return TRUE; return true;
} }

Loading…
Cancel
Save