index 53362d3e374096a3ad1e8bef63757a7135a26810..7021be13de836a1d1cc2d0075b00928aa0e3e3ce 100644 (file)
--- a/src/sp-style-elem-test.h
+++ b/src/sp-style-elem-test.h
void testWrite()
{
TS_ASSERT( _doc );
- TS_ASSERT( sp_document_repr_doc(_doc) );
- if ( !sp_document_repr_doc(_doc) ) {
+ TS_ASSERT( _doc->getReprDoc() );
+ if ( !_doc->getReprDoc() ) {
return; // evil early return
}
SP_OBJECT(style_elem)->document = _doc;
SP_OBJECT(style_elem)->setKeyValue( SP_ATTR_TYPE, "text/css");
- Inkscape::XML::Node *repr = sp_document_repr_doc(_doc)->createElement("svg:style");
- SP_OBJECT(style_elem)->updateRepr(sp_document_repr_doc(_doc), repr, SP_OBJECT_WRITE_ALL);
+ Inkscape::XML::Node *repr = _doc->getReprDoc()->createElement("svg:style");
+ SP_OBJECT(style_elem)->updateRepr(_doc->getReprDoc(), repr, SP_OBJECT_WRITE_ALL);
{
gchar const *typ = repr->attribute("type");
TS_ASSERT( typ != NULL );
void testBuild()
{
TS_ASSERT( _doc );
- TS_ASSERT( sp_document_repr_doc(_doc) );
- if ( !sp_document_repr_doc(_doc) ) {
+ TS_ASSERT( _doc->getReprDoc() );
+ if ( !_doc->getReprDoc() ) {
return; // evil early return
}
SPStyleElem &style_elem = *SP_STYLE_ELEM(g_object_new(SP_TYPE_STYLE_ELEM, NULL));
- Inkscape::XML::Node *const repr = sp_document_repr_doc(_doc)->createElement("svg:style");
+ Inkscape::XML::Node *const repr = _doc->getReprDoc()->createElement("svg:style");
repr->setAttribute("type", "text/css");
(&style_elem)->invoke_build( _doc, repr, false);
TS_ASSERT( style_elem.is_css );
void testReadContent()
{
TS_ASSERT( _doc );
- TS_ASSERT( sp_document_repr_doc(_doc) );
- if ( !sp_document_repr_doc(_doc) ) {
+ TS_ASSERT( _doc->getReprDoc() );
+ if ( !_doc->getReprDoc() ) {
return; // evil early return
}
SPStyleElem &style_elem = *SP_STYLE_ELEM(g_object_new(SP_TYPE_STYLE_ELEM, NULL));
- Inkscape::XML::Node *const repr = sp_document_repr_doc(_doc)->createElement("svg:style");
+ Inkscape::XML::Node *const repr = _doc->getReprDoc()->createElement("svg:style");
repr->setAttribute("type", "text/css");
- Inkscape::XML::Node *const content_repr = sp_document_repr_doc(_doc)->createTextNode(".myclass { }");
+ Inkscape::XML::Node *const content_repr = _doc->getReprDoc()->createTextNode(".myclass { }");
repr->addChild(content_repr, NULL);
(&style_elem)->invoke_build(_doc, repr, false);
TS_ASSERT( style_elem.is_css );