diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp
index 16420436180a84f8c9d9713707265440628722b9..1f1cb4351022319c5ee56ad360063fe801303c35 100644 (file)
--- a/src/sp-tref.cpp
+++ b/src/sp-tref.cpp
* The code for this function is swiped from the tspan bbox code, since tref should work pretty much the same way
*/
static void
* The code for this function is swiped from the tspan bbox code, since tref should work pretty much the same way
*/
static void
-sp_tref_bbox(SPItem const *item, NRRect *bbox, NR::Matrix const &transform, unsigned const flags)
+sp_tref_bbox(SPItem const *item, NRRect *bbox, NR::Matrix const &transform, unsigned const /*flags*/)
{
// find out the ancestor text which holds our layout
SPObject *parent_text = SP_OBJECT(item);
{
// find out the ancestor text which holds our layout
SPObject *parent_text = SP_OBJECT(item);
sp_tref_description(SPItem *item)
{
SPTRef *tref = SP_TREF(item);
sp_tref_description(SPItem *item)
{
SPTRef *tref = SP_TREF(item);
-
+
+ SPObject *referred = tref->getObjectReferredTo();
+
if (tref && tref->getObjectReferredTo()) {
if (tref && tref->getObjectReferredTo()) {
- char *child_desc = sp_item_description(SP_ITEM(tref->getObjectReferredTo()));
- char *ret = g_strdup_printf(_("<b>Cloned character data</b> from: %s"), child_desc);
+ char *child_desc;
+
+ if (SP_IS_ITEM(referred)) {
+ child_desc = sp_item_description(SP_ITEM(referred));
+ } else {
+ child_desc = "";
+ }
+
+ char *ret = g_strdup_printf(
+ _("<b>Cloned character data</b>%s%s"),
+ (SP_IS_ITEM(referred) ? _(" from ") : ""),
+ child_desc);
g_free(child_desc);
return ret;
} else {
g_free(child_desc);
return ret;
} else {
/* For the sigc::connection changes (i.e. when the object being refered to changes) */
static void
/* For the sigc::connection changes (i.e. when the object being refered to changes) */
static void
-sp_tref_href_changed(SPObject *old_ref, SPObject *ref, SPTRef *tref)
+sp_tref_href_changed(SPObject */*old_ref*/, SPObject */*ref*/, SPTRef *tref)
{
if (tref)
{
{
if (tref)
{
* Delete the tref object
*/
static void
* Delete the tref object
*/
static void
-sp_tref_delete_self(SPObject *deleted, SPTRef *self)
+sp_tref_delete_self(SPObject */*deleted*/, SPTRef *self)
{
SP_OBJECT(self)->deleteObject();
}
{
SP_OBJECT(self)->deleteObject();
}