diff --git a/src/graph.c b/src/graph.c
index 03bcc73..8841c7e 100644
--- a/src/graph.c
+++ b/src/graph.c
@@ -23,6 +23,7 @@
 #include "graph.h"
 #include "dependent.h"
 #include "expr.h"
+#include "expr-impl.h"
 #include "cell.h"
 #include "value.h"
 #include "number-match.h"
@@ -34,6 +35,7 @@
 #include "auto-format.h"
 #include "ranges.h"
 #include "parse-util.h"
+#include "rendered-value.h"
 #include <goffice/goffice.h>
 
 #include <gsf/gsf-impl-utils.h>
@@ -388,6 +390,20 @@ gnm_go_data_scalar_get_str (GODataScalar *dat)
 	return scalar->val_str;
 }
 
+static PangoAttrList *
+gnm_go_data_scalar_get_markup (GODataScalar *dat)
+{
+	GnmGODataScalar *scalar = (GnmGODataScalar *) dat;
+	PangoAttrList *res = NULL;
+	if (scalar->dep.texpr->expr->oper == GNM_EXPR_OP_CELLREF && scalar->dep.sheet != NULL) {
+		GnmCellRef const *ref = &scalar->dep.texpr->expr->cellref.ref;
+		GnmCell *cell = sheet_cell_get (scalar->dep.sheet, ref->col, ref->row);
+		GnmRenderedValue *rv = gnm_cell_fetch_rendered_value (cell, TRUE);
+		res = pango_layout_get_attributes (rv->layout);
+	}
+	return res;
+}
+
 static void
 gnm_go_data_scalar_class_init (GObjectClass *gobject_klass)
 {
@@ -404,6 +420,7 @@ gnm_go_data_scalar_class_init (GObjectClass *gobject_klass)
 	godata_klass->unserialize	= gnm_go_data_unserialize;
 	scalar_klass->get_value		= gnm_go_data_scalar_get_value;
 	scalar_klass->get_str		= gnm_go_data_scalar_get_str;
+	scalar_klass->get_markup	= gnm_go_data_scalar_get_markup;
 }
 
 static void
