From 8b71ee28d6d834eacf8853822b7c667f5c8eb21f Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Thu, 8 May 2008 13:05:51 +0000 Subject: merge inline patch from Jimmy (bzr r5631) --- src/sp-object.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/sp-object.cpp') diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 99d739700..f6ddf27df 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -1423,9 +1423,7 @@ sp_object_setAttribute(SPObject *object, gchar const *key, gchar const *value, S g_return_if_fail(SP_EXCEPTION_IS_OK(ex)); /// \todo fixme: Exception if object is NULL? */ - if (!sp_repr_set_attr(object->repr, key, value)) { - ex->code = SP_NO_MODIFICATION_ALLOWED_ERR; - } + object->repr->setAttribute(key, value, false); } void @@ -1435,9 +1433,7 @@ sp_object_removeAttribute(SPObject *object, gchar const *key, SPException *ex) g_return_if_fail(SP_EXCEPTION_IS_OK(ex)); /// \todo fixme: Exception if object is NULL? */ - if (!sp_repr_set_attr(object->repr, key, NULL)) { - ex->code = SP_NO_MODIFICATION_ALLOWED_ERR; - } + object->repr->setAttribute(key, NULL, false); } /* Helper */ -- cgit v1.2.3