summaryrefslogtreecommitdiffstats
path: root/src/object
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2019-04-06 18:54:25 +0000
committerTavmjong Bah <tavmjong@free.fr>2019-04-06 18:54:25 +0000
commit87eb273ceca7e4212a4bfbf2e04b616bac73a701 (patch)
tree5974d5938b0a71bf48a5486c5d669c4767aa2341 /src/object
parentCMake: Fix module FindDoubleConversion.cmake (diff)
downloadinkscape-87eb273ceca7e4212a4bfbf2e04b616bac73a701.tar.gz
inkscape-87eb273ceca7e4212a4bfbf2e04b616bac73a701.zip
More document.h cleanup.
Diffstat (limited to 'src/object')
-rw-r--r--src/object/box3d-side.cpp2
-rw-r--r--src/object/box3d.cpp2
-rw-r--r--src/object/sp-conn-end-pair.cpp4
-rw-r--r--src/object/sp-style-elem.cpp14
4 files changed, 11 insertions, 11 deletions
diff --git a/src/object/box3d-side.cpp b/src/object/box3d-side.cpp
index 72566e617..6fcf22a9c 100644
--- a/src/object/box3d-side.cpp
+++ b/src/object/box3d-side.cpp
@@ -122,7 +122,7 @@ void Box3DSide::update(SPCtx* ctx, guint flags) {
Box3DSide * Box3DSide::createBox3DSide(SPBox3D *box)
{
Box3DSide *box3d_side = nullptr;
- Inkscape::XML::Document *xml_doc = box->document->rdoc;
+ Inkscape::XML::Document *xml_doc = box->document->getReprDoc();;
Inkscape::XML::Node *repr_side = xml_doc->createElement("svg:path");
repr_side->setAttribute("sodipodi:type", "inkscape:box3dside");
box3d_side = static_cast<Box3DSide *>(box->appendChildRepr(repr_side));
diff --git a/src/object/box3d.cpp b/src/object/box3d.cpp
index 26ac9de8a..483e5e7ae 100644
--- a/src/object/box3d.cpp
+++ b/src/object/box3d.cpp
@@ -431,7 +431,7 @@ box3d_snap (SPBox3D *box, int id, Proj::Pt3 const &pt_proj, Proj::Pt3 const &sta
SPBox3D * SPBox3D::createBox3D(SPItem * parent)
{
SPBox3D *box3d = nullptr;
- Inkscape::XML::Document *xml_doc = parent->document->rdoc;
+ Inkscape::XML::Document *xml_doc = parent->document->getReprDoc();
Inkscape::XML::Node *repr = xml_doc->createElement("svg:g");
repr->setAttribute("sodipodi:type", "inkscape:box3d");
box3d = reinterpret_cast<SPBox3D *>(parent->appendChildRepr(repr));
diff --git a/src/object/sp-conn-end-pair.cpp b/src/object/sp-conn-end-pair.cpp
index 2f60e9a9e..899a4f12d 100644
--- a/src/object/sp-conn-end-pair.cpp
+++ b/src/object/sp-conn-end-pair.cpp
@@ -64,7 +64,7 @@ void SPConnEndPair::release()
// If the document is being destroyed then the router instance
// and the ConnRefs will have been destroyed with it.
- const bool routerInstanceExists = (_path->document->router != nullptr);
+ const bool routerInstanceExists = (_path->document->getRouter() != nullptr);
if (_connRef && routerInstanceExists) {
_connRef->router()->deleteConnector(_connRef);
@@ -101,7 +101,7 @@ void SPConnEndPair::setAttr(unsigned const key, gchar const *const value)
if (!_connRef) {
_connType = new_conn_type;
- Avoid::Router *router = _path->document->router;
+ Avoid::Router *router = _path->document->getRouter();
_connRef = new Avoid::ConnRef(router);
_connRef->setRoutingType(new_conn_type == SP_CONNECTOR_POLYLINE ?
Avoid::ConnType_PolyLine : Avoid::ConnType_Orthogonal);
diff --git a/src/object/sp-style-elem.cpp b/src/object/sp-style-elem.cpp
index dae679bb4..439a1b3cb 100644
--- a/src/object/sp-style-elem.cpp
+++ b/src/object/sp-style-elem.cpp
@@ -188,7 +188,7 @@ import_style_cb (CRDocHandler *a_handler,
std::cerr << "import_style_cb: No document!" << std::endl;
return;
}
- if (!document->style_sheet) {
+ if (!document->getStyleSheet()) {
std::cerr << "import_style_cb: No document style sheet!" << std::endl;
return;
}
@@ -207,7 +207,7 @@ import_style_cb (CRDocHandler *a_handler,
CRStatus const parse_status =
cr_parser_parse_file (parser, reinterpret_cast<const guchar *>(import_file.c_str()), CR_UTF_8);
if (parse_status == CR_OK) {
- cr_stylesheet_append_import (document->style_sheet, stylesheet);
+ cr_stylesheet_append_import (document->getStyleSheet(), stylesheet);
} else {
std::cerr << "import_style_cb: Could not parse: " << import_file << std::endl;
cr_stylesheet_destroy (stylesheet);
@@ -468,14 +468,14 @@ void SPStyleElem::read_content() {
cr_parser_parse_buf (parser, reinterpret_cast<const guchar *>(text.c_str()), text.bytes(), CR_UTF_8);
if (parse_status == CR_OK) {
- if(!document->style_sheet) {
+ if(!document->getStyleSheet()) {
// if the style is the first style sheet that we've seen, set the document's
// first style sheet to this style and create a cascade object with it.
- document->style_sheet = style_sheet;
- cr_cascade_set_sheet (document->style_cascade, document->style_sheet, ORIGIN_AUTHOR);
+ document->setStyleSheet(style_sheet);
+ cr_cascade_set_sheet (document->getStyleCascade(), document->getStyleSheet(), ORIGIN_AUTHOR);
} else {
// If not the first, then chain up this style_sheet
- cr_stylesheet_append_import (document->style_sheet, style_sheet);
+ cr_stylesheet_append_import (document->getStyleSheet(), style_sheet);
}
} else {
cr_stylesheet_destroy (style_sheet);
@@ -506,7 +506,7 @@ void SPStyleElem::read_content() {
// If style sheet has changed, we need to cascade the entire object tree, top down
// Get root, read style, loop through children
update_style_recursively( (SPObject *)document->getRoot() );
- // cr_stylesheet_dump (document->style_sheet, stdout);
+ // cr_stylesheet_dump (document->getStyleSheet(), stdout);
}
/**