diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-03-28 18:11:49 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-04-03 19:23:45 +0900 |
commit | 0bd9d5459891e6fb17ee6802878f85e217cb9f54 (patch) | |
tree | 962f6ea26d1fab041fe3476fbbd64132ab8ada1b /filters/chalk | |
parent | cb258b7e39ffa5662b57e7d9006e69172a378d7e (diff) | |
download | koffice-r14.1.4.tar.gz koffice-r14.1.4.zip |
Replace TRUE/FALSE with boolean values true/falser14.1.4
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit cf85b9c285a2b9baa87c9d0cb9d683b48e82a475)
Diffstat (limited to 'filters/chalk')
-rw-r--r-- | filters/chalk/xcf/xcf/xcf-load.cpp | 142 | ||||
-rw-r--r-- | filters/chalk/xcf/xcf/xcf-save.cpp | 64 | ||||
-rw-r--r-- | filters/chalk/xcf/xcf/xcf-seek.cpp | 10 |
3 files changed, 108 insertions, 108 deletions
diff --git a/filters/chalk/xcf/xcf/xcf-load.cpp b/filters/chalk/xcf/xcf/xcf-load.cpp index 3209e1811..034e5261a 100644 --- a/filters/chalk/xcf/xcf/xcf-load.cpp +++ b/filters/chalk/xcf/xcf/xcf-load.cpp @@ -139,11 +139,11 @@ xcf_load_image (XcfInfo * info) gimp_parasite_list_remove (GIMP_IMAGE (gimage)->parasites, 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 */ info->cp += xcf_read_int32 (info->fp, &offset, 1); @@ -182,7 +182,7 @@ xcf_load_image (XcfInfo * info) goto error; } - while (TRUE) + while (true) { /* read in the offset of the next channel */ info->cp += xcf_read_int32 (info->fp, &offset, 1); @@ -264,15 +264,15 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) PropType prop_type; TQ_INT32 prop_size; - while (TRUE) + while (true) { if (!xcf_load_prop (info, &prop_type, &prop_size)) - return FALSE; + return false; switch (prop_type) { case PROP_END: - return TRUE; + return true; case PROP_COLORMAP: 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); gimage->cmap = g_new (guchar, gimage->num_cols * 3); if (!xcf_seek_pos (info, info->cp + gimage->num_cols, NULL)) - return FALSE; + return false; for (i = 0; i < gimage->num_cols; i++) { @@ -331,7 +331,7 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) (compression != COMPRESS_FRACTAL)) { g_message ("unknown compression type: %d", (int) compression); - return FALSE; + return false; } info->compression = compression; @@ -359,11 +359,11 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) switch (orientation) { case XCF_ORIENTATION_HORIZONTAL: - gimp_image_add_hguide (gimage, position, FALSE); + gimp_image_add_hguide (gimage, position, false); break; case XCF_ORIENTATION_VERTICAL: - gimp_image_add_vguide (gimage, position, FALSE); + gimp_image_add_vguide (gimage, position, false); break; default: @@ -540,7 +540,7 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) } } - return FALSE; + return false; } static bool @@ -554,15 +554,15 @@ xcf_load_layer_props (XcfInfo * info, PropType prop_type; TQ_INT32 prop_size; - while (TRUE) + while (true) { if (!xcf_load_prop (info, &prop_type, &prop_size)) - return FALSE; + return false; switch (prop_type) { case PROP_END: - return TRUE; + return true; case PROP_ACTIVE_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); gimp_item_set_visible (GIMP_ITEM (layer), - visible ? TRUE : FALSE, FALSE); + visible ? true : false, false); } break; @@ -602,7 +602,7 @@ xcf_load_layer_props (XcfInfo * info, info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & linked, 1); gimp_item_set_linked (GIMP_ITEM (layer), - linked ? TRUE : FALSE, FALSE); + linked ? true : false, false); } break; @@ -682,7 +682,7 @@ xcf_load_layer_props (XcfInfo * info, } } - return FALSE; + return false; } static bool @@ -692,15 +692,15 @@ xcf_load_channel_props (XcfInfo * info, PropType prop_type; TQ_INT32 prop_size; - while (TRUE) + while (true) { if (!xcf_load_prop (info, &prop_type, &prop_size)) - return FALSE; + return false; switch (prop_type) { case PROP_END: - return TRUE; + return true; case PROP_ACTIVE_CHANNEL: info->active_channel = *channel; @@ -721,8 +721,8 @@ xcf_load_channel_props (XcfInfo * info, GIMP_DRAWABLE (*channel)->tiles = NULL; g_object_unref (*channel); *channel = gimage->selection_mask; - (*channel)->boundary_known = FALSE; - (*channel)->bounds_known = FALSE; + (*channel)->boundary_known = false; + (*channel)->bounds_known = false; break; case PROP_OPACITY: @@ -740,7 +740,7 @@ xcf_load_channel_props (XcfInfo * info, info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & visible, 1); gimp_item_set_visible (GIMP_ITEM (*channel), - visible ? TRUE : FALSE, FALSE); + visible ? true : false, false); } break; @@ -750,7 +750,7 @@ xcf_load_channel_props (XcfInfo * info, info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & linked, 1); gimp_item_set_linked (GIMP_ITEM (*channel), - linked ? TRUE : FALSE, FALSE); + linked ? true : false, false); } break; @@ -816,7 +816,7 @@ xcf_load_channel_props (XcfInfo * info, } } - return FALSE; + return false; } 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_size, 1); - return TRUE; + return true; } static KisLayer * @@ -834,9 +834,9 @@ xcf_load_layer (XcfInfo * info, KisImage * gimage) GimpLayerMask *layer_mask; TQ_INT32 hierarchy_offset; TQ_INT32 layer_mask_offset; - bool apply_mask = TRUE; - bool edit_mask = FALSE; - bool show_mask = FALSE; + bool apply_mask = true; + bool edit_mask = false; + bool show_mask = false; bool active; bool floating; 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->show_mask = show_mask; - gimp_layer_add_mask (layer, layer_mask, FALSE); + gimp_layer_add_mask (layer, layer_mask, false); } /* attach the floating selection... */ @@ -1049,7 +1049,7 @@ xcf_load_hierarchy (XcfInfo * info, TileManager * tiles) if (width != tile_manager_width (tiles) || height != tile_manager_height (tiles) || bpp != tile_manager_bpp (tiles)) - return FALSE; + return false; /* load in the levels...we make sure that the number of levels * 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 */ if (!xcf_seek_pos (info, offset, NULL)) - return FALSE; + return false; /* read in the level */ if (!xcf_load_level (info, tiles)) - return FALSE; + return false; /* restore the saved position so we'll be ready to * read the next offset. */ 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) || height != tile_manager_height (tiles)) - return FALSE; + return false; /* read in the first tile offset. * 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); if (offset == 0) - return TRUE; + return true; /* 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; for (i = 0; i < ntiles; i++) { - fail = FALSE; + fail = false; if (offset == 0) { g_message ("not enough tiles found in level"); - return FALSE; + return false; } /* 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 */ if (!xcf_seek_pos (info, offset, NULL)) - return FALSE; + return false; /* 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 */ switch (info->compression) { case COMPRESS_NONE: if (!xcf_load_tile (info, tile)) - fail = TRUE; + fail = true; break; case COMPRESS_RLE: if (!xcf_load_tile_rle (info, tile, offset2 - offset)) - fail = TRUE; + fail = true; break; case COMPRESS_ZLIB: g_error ("xcf: zlib compression unimplemented"); - fail = TRUE; + fail = true; break; case COMPRESS_FRACTAL: g_error ("xcf: fractal compression unimplemented"); - fail = TRUE; + fail = true; break; } if (fail) { - tile_release (tile, TRUE); - return FALSE; + tile_release (tile, true); + return false; } /* 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_size (tile)) == 0) tile_manager_map (tiles, i, previous); - tile_release (previous, FALSE); + tile_release (previous, false); } - tile_release (tile, TRUE); - previous = tile_manager_get (tiles, i, FALSE, FALSE); + tile_release (tile, true); + previous = tile_manager_get (tiles, i, false, false); /* restore the saved position so we'll be ready to * read the next offset. */ if (!xcf_seek_pos (info, saved_pos, NULL)) - return FALSE; + return false; /* read in the offset of the next tile */ info->cp += xcf_read_int32 (info->fp, &offset, 1); @@ -1215,10 +1215,10 @@ xcf_load_level (XcfInfo * info, TileManager * tiles) if (offset != 0) { g_message ("encountered garbage after reading level: %d", offset); - return FALSE; + return false; } - return TRUE; + return true; } static bool @@ -1244,7 +1244,7 @@ xcf_load_tile (XcfInfo * info, Tile * tile) #endif - return TRUE; + return true; } static bool @@ -1360,12 +1360,12 @@ xcf_load_tile_rle (XcfInfo * info, Tile * tile, int data_length) } } g_free (xcfodata); - return TRUE; + return true; bogus_rle: if (xcfodata) g_free (xcfodata); - return FALSE; + return false; } static KisAnnotation * @@ -1402,7 +1402,7 @@ xcf_load_old_paths (XcfInfo * info, KisImage * gimage) if (active_vectors) gimp_image_set_active_vectors (gimage, active_vectors); - return TRUE; + return true; } static bool @@ -1445,12 +1445,12 @@ xcf_load_old_path (XcfInfo * info, KisImage * gimage) { g_warning ("Unknown path type. Possibly corrupt XCF file"); - return FALSE; + return false; } /* skip empty compatibility paths */ if (num_points == 0) - return FALSE; + return false; 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_container_num_children (gimage->vectors)); - return TRUE; + return true; } static bool @@ -1519,7 +1519,7 @@ xcf_load_vectors (XcfInfo * info, KisImage * gimage) if (version != 1) { g_message ("Unknown vectors version: %d (skipping)", version); - return FALSE; + return false; } 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) if (!xcf_load_vector (info, gimage)) - return FALSE; + return false; active_vectors = (GimpVectors *) 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 g_printerr ("xcf_load_vectors: loaded %d bytes\n", info->cp - base); #endif - return TRUE; + return true; } static bool @@ -1577,8 +1577,8 @@ xcf_load_vector (XcfInfo * info, KisImage * gimage) vectors = gimp_vectors_new (gimage, name); - GIMP_ITEM (vectors)->visible = visible ? TRUE : FALSE; - GIMP_ITEM (vectors)->linked = linked ? TRUE : FALSE; + GIMP_ITEM (vectors)->visible = visible ? true : false; + GIMP_ITEM (vectors)->linked = linked ? true : false; if (tattoo) GIMP_ITEM (vectors)->tattoo = tattoo; @@ -1590,7 +1590,7 @@ xcf_load_vector (XcfInfo * info, KisImage * gimage) parasite = xcf_load_parasite (info); if (!parasite) - return FALSE; + return false; gimp_item_parasite_attach (GIMP_ITEM (vectors), 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); - anchor.selected = FALSE; + anchor.selected = false; 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_container_num_children (gimage->vectors)); - return TRUE; + return true; } #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: " "%d ( %d ) bytes read", err, nleft); - return FALSE; + return false; } 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_offset = -1; - return TRUE; + return true; } - return FALSE; + return false; } #endif diff --git a/filters/chalk/xcf/xcf/xcf-save.cpp b/filters/chalk/xcf/xcf/xcf-save.cpp index a0dbb9b5a..25abdfa6a 100644 --- a/filters/chalk/xcf/xcf/xcf-save.cpp +++ b/filters/chalk/xcf/xcf/xcf-save.cpp @@ -119,7 +119,7 @@ static bool xcf_save_vectors (XcfInfo *info, if (tmp_error) \ { \ g_propagate_error (error, tmp_error); \ - return FALSE; \ + return false; \ } \ } G_STMT_END @@ -128,7 +128,7 @@ static bool xcf_save_vectors (XcfInfo *info, if (tmp_error) \ { \ g_propagate_error (error, tmp_error); \ - return FALSE; \ + return false; \ } \ } G_STMT_END @@ -137,7 +137,7 @@ static bool xcf_save_vectors (XcfInfo *info, if (tmp_error) \ { \ g_propagate_error (error, tmp_error); \ - return FALSE; \ + return false; \ } \ } G_STMT_END @@ -146,7 +146,7 @@ static bool xcf_save_vectors (XcfInfo *info, if (tmp_error) \ { \ g_propagate_error (error, tmp_error); \ - return FALSE; \ + return false; \ } \ } G_STMT_END @@ -156,7 +156,7 @@ static bool xcf_save_vectors (XcfInfo *info, { \ g_message (_("Error saving XCF file: %s"), \ error->message); \ - return FALSE; \ + return false; \ } \ } G_STMT_END @@ -166,7 +166,7 @@ static bool xcf_save_vectors (XcfInfo *info, { \ g_message (_("Error saving XCF file: %s"), \ error->message); \ - return FALSE; \ + return false; \ } \ } G_STMT_END @@ -176,7 +176,7 @@ static bool xcf_save_vectors (XcfInfo *info, { \ g_message (_("Error saving XCF file: %s"), \ error->message); \ - return FALSE; \ + return false; \ } \ } G_STMT_END @@ -186,7 +186,7 @@ static bool xcf_save_vectors (XcfInfo *info, { \ g_message (_("Error saving XCF file: %s"), \ error->message); \ - return FALSE; \ + return false; \ } \ } G_STMT_END @@ -202,7 +202,7 @@ static bool xcf_save_vectors (XcfInfo *info, #define xcf_check_error(x) G_STMT_START { \ if (! (x)) \ - return FALSE; \ + return false; \ } G_STMT_END #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"), \ error->message); \ - return FALSE; \ + return false; \ } \ } G_STMT_END @@ -366,7 +366,7 @@ xcf_save_image (XcfInfo *info, else { channel = gimage->selection_mask; - have_selection = FALSE; + have_selection = false; } /* 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)); - return TRUE; + return true; } static bool @@ -561,7 +561,7 @@ xcf_save_layer_props (XcfInfo *info, xcf_check_error (xcf_save_prop (info, gimage, PROP_END, error)); - return TRUE; + return true; } static bool @@ -599,7 +599,7 @@ xcf_save_channel_props (XcfInfo *info, xcf_check_error (xcf_save_prop (info, gimage, PROP_END, error)); - return TRUE; + return true; } static bool @@ -929,7 +929,7 @@ xcf_save_prop (XcfInfo *info, if (tmp_error) { g_propagate_error (error, tmp_error); - return FALSE; + return false; } xcf_check_error (xcf_seek_end (info, error)); @@ -976,7 +976,7 @@ xcf_save_prop (XcfInfo *info, if (tmp_error) { g_propagate_error (error, tmp_error); - return FALSE; + return false; } xcf_check_error (xcf_seek_end (info, error)); @@ -1042,7 +1042,7 @@ xcf_save_prop (XcfInfo *info, if (tmp_error) { g_propagate_error (error, tmp_error); - return FALSE; + return false; } xcf_check_error (xcf_seek_end (info, error)); @@ -1065,7 +1065,7 @@ xcf_save_prop (XcfInfo *info, va_end (args); - return TRUE; + return true; } static bool @@ -1136,7 +1136,7 @@ xcf_save_layer (XcfInfo *info, xcf_check_error (xcf_seek_pos (info, saved_pos, error)); xcf_write_int32_check_error (info, &offset, 1); - return TRUE; + return true; } static bool @@ -1189,7 +1189,7 @@ xcf_save_channel (XcfInfo *info, xcf_write_int32_check_error (info, &offset, 1); saved_pos = info->cp; - return TRUE; + return true; } static TQ_INT32 @@ -1285,7 +1285,7 @@ xcf_save_hierarchy (XcfInfo *info, xcf_check_error (xcf_seek_pos (info, saved_pos, error)); xcf_write_int32_check_error (info, &offset, 1); - return TRUE; + return true; } static bool @@ -1373,7 +1373,7 @@ xcf_save_level (XcfInfo *info, xcf_check_error (xcf_seek_pos (info, saved_pos, error)); xcf_write_int32_check_error (info, &offset, 1); - return TRUE; + return true; } @@ -1387,9 +1387,9 @@ xcf_save_tile (XcfInfo *info, tile_lock (tile); xcf_write_int8_check_error (info, tile_data_pointer (tile, 0, 0), tile_size (tile)); - tile_release (tile, FALSE); + tile_release (tile, false); - return TRUE; + return true; } static bool @@ -1503,9 +1503,9 @@ xcf_save_tile_rle (XcfInfo *info, g_message ("xcf: uh oh! xcf rle tile saving error: %d", count); } xcf_write_int8_check_error (info, rlebuf, len); - tile_release (tile, FALSE); + tile_release (tile, false); - return TRUE; + return true; } static bool @@ -1523,7 +1523,7 @@ xcf_save_parasite (XcfInfo *info, xcf_write_int8_check_error (info, parasite->data, parasite->size); } - return TRUE; + return true; } typedef struct @@ -1556,10 +1556,10 @@ xcf_save_parasite_list (XcfInfo *info, if (data.error) { g_propagate_error (error, data.error); - return FALSE; + return false; } - return TRUE; + return true; } static bool @@ -1665,7 +1665,7 @@ xcf_save_old_paths (XcfInfo *info, g_free (points); } - return TRUE; + return true; } static bool @@ -1818,9 +1818,9 @@ xcf_save_vectors (XcfInfo *info, 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; } diff --git a/filters/chalk/xcf/xcf/xcf-seek.cpp b/filters/chalk/xcf/xcf/xcf-seek.cpp index a24271f5e..fb72d392c 100644 --- a/filters/chalk/xcf/xcf/xcf-seek.cpp +++ b/filters/chalk/xcf/xcf/xcf-seek.cpp @@ -44,11 +44,11 @@ xcf_seek_pos (XcfInfo *info, _("Could not seek in XCF file: %s"), g_strerror (errno)); - return FALSE; + return false; } } - return TRUE; + return true; } bool @@ -61,7 +61,7 @@ xcf_seek_end (XcfInfo *info, _("Could not seek in XCF file: %s"), g_strerror (errno)); - return FALSE; + return false; } info->cp = ftell (info->fp); @@ -72,8 +72,8 @@ xcf_seek_end (XcfInfo *info, _("Could not seek in XCF file: %s"), g_strerror (errno)); - return FALSE; + return false; } - return TRUE; + return true; } |