[goffice] Add a dew missing go_string functions
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: svn-commits-list gnome org
- Subject: [goffice] Add a dew missing go_string functions
- Date: Sat, 27 Jun 2009 05:06:06 +0000 (UTC)
commit 46126827b683b950102b7b69e349a85b0a43d02f
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Fri Jun 26 23:05:30 2009 -0600
Add a dew missing go_string functions
2009-06-25 Andreas J. Guelzow <aguelzow pyrshep ca>
* goffice/utils/go-string.h (go_string_get_cstr): deleted
* goffice/utils/go-string.c (go_string_get_len): new
(go_string_get_markup): new
(go_string_get_phonetic): new
(go_string_equal_ignorecase): new
(go_string_equal_rich): new
ChangeLog | 9 ++++++
goffice/utils/go-string.c | 62 +++++++++++++++++++++++++++++++++++++++++++++
goffice/utils/go-string.h | 1 -
3 files changed, 71 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 28b18af..d162908 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-06-25 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * goffice/utils/go-string.h (go_string_get_cstr): deleted
+ * goffice/utils/go-string.c (go_string_get_len): new
+ (go_string_get_markup): new
+ (go_string_get_phonetic): new
+ (go_string_equal_ignorecase): new
+ (go_string_equal_rich): new
+
2009-06-25 Jean Brefort <jean brefort normalesup org>
* goffice/graph/gog-axis-line.c (axis_line_render), (x_process),
diff --git a/goffice/utils/go-string.c b/goffice/utils/go-string.c
index 817dc7f..d60ae97 100644
--- a/goffice/utils/go-string.c
+++ b/goffice/utils/go-string.c
@@ -553,3 +553,65 @@ go_string_get_type (void)
}
return t;
}
+
+/**
+ * go_string_get_len
+ **/
+guint32
+go_string_get_len (GOString const *gstr)
+{
+ return GO_STRING_LEN(gstr);
+}
+
+
+/**
+ * go_string_get_markup
+ **/
+PangoAttrList *
+go_string_get_markup (GOString const *gstr)
+{
+ GOStringImpl *impl = (GOStringImpl *)gstr;
+
+ if ((impl->flags & GO_STRING_IS_RICH) != 0) {
+ GOStringRichImpl *rich = (GOStringRichImpl *) gstr;
+ return rich->markup;
+ } else
+ return NULL;
+}
+
+/**
+ * go_string_get_phonetic
+ **/
+GOStringPhonetic *
+go_string_get_phonetic (GOString const *gstr)
+{
+ GOStringImpl *impl = (GOStringImpl *)gstr;
+
+ if ((impl->flags & GO_STRING_IS_RICH) != 0) {
+ GOStringRichImpl *rich = (GOStringRichImpl *) gstr;
+ return rich->phonetic;
+ } else
+ return NULL;
+}
+
+
+/**
+ * go_string_equal_ignorecase
+ **/
+gboolean
+go_string_equal_ignorecase (gconstpointer gstr_a, gconstpointer gstr_b)
+{
+ return (0 == go_string_cmp_ignorecase (gstr_a, gstr_b));
+}
+
+
+/**
+ * go_string_equal_ignorecase
+ **/
+gboolean
+go_string_equal_rich (gconstpointer gstr_a, gconstpointer gstr_b)
+{
+ /* TODO */
+
+ return go_string_equal (gstr_a, gstr_b);
+}
diff --git a/goffice/utils/go-string.h b/goffice/utils/go-string.h
index 856e8f9..be1b186 100644
--- a/goffice/utils/go-string.h
+++ b/goffice/utils/go-string.h
@@ -49,7 +49,6 @@ GOString *go_string_new_rich (char const *str,
GOString *go_string_ref (GOString *gstr);
void go_string_unref (GOString *gstr);
-char const *go_string_get_cstr (GOString const *gstr);
guint32 go_string_get_len (GOString const *gstr);
unsigned int go_string_get_ref_count (GOString const *gstr);
char const *go_string_get_collation (GOString const *gstr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]