summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-07-28 20:08:50 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-07-28 20:08:50 +0000
commit71a56457a3660039c6a2d3d7055bf296a1d01ae6 (patch)
tree4cafdf60a28a0ce1641e393b2b23a03673ad745c /src
parentMerge from trunk 13472 (diff)
parentrelated to lp:inkscape r13474, remove unnecessary/broken placement news (diff)
downloadinkscape-71a56457a3660039c6a2d3d7055bf296a1d01ae6.tar.gz
inkscape-71a56457a3660039c6a2d3d7055bf296a1d01ae6.zip
Merge from lp:inkscape 13477
(bzr r13341.1.103)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/wmf-inout.cpp22
-rw-r--r--src/sp-flowregion.cpp3
-rw-r--r--src/sp-flowtext.cpp2
-rw-r--r--src/sp-gradient.cpp2
-rw-r--r--src/sp-item-group.cpp2
-rw-r--r--src/sp-item.cpp4
-rw-r--r--src/sp-offset.cpp5
-rw-r--r--src/sp-shape.cpp2
-rw-r--r--src/sp-string.cpp1
-rw-r--r--src/sp-text.cpp5
-rw-r--r--src/sp-tref.cpp7
-rw-r--r--src/sp-tspan.cpp5
-rw-r--r--src/style.cpp11
13 files changed, 19 insertions, 52 deletions
diff --git a/src/extension/internal/wmf-inout.cpp b/src/extension/internal/wmf-inout.cpp
index beb6190d3..5ccad678a 100644
--- a/src/extension/internal/wmf-inout.cpp
+++ b/src/extension/internal/wmf-inout.cpp
@@ -670,7 +670,7 @@ void Wmf::add_clips(PWMF_CALLBACK_DATA d, const char *clippath, unsigned int log
SVGOStringStream tmp_clippath;
tmp_clippath << "\n<clipPath";
tmp_clippath << "\n\tclipPathUnits=\"userSpaceOnUse\" ";
- tmp_clippath << "\n\tid=\"clipEmfPath" << d->dc[d->level].clip_id << "\"";
+ tmp_clippath << "\n\tid=\"clipWmfPath" << d->dc[d->level].clip_id << "\"";
tmp_clippath << " >";
tmp_clippath << "\n\t<path d=\"";
tmp_clippath << combined;
@@ -895,7 +895,7 @@ Wmf::output_style(PWMF_CALLBACK_DATA d)
}
tmp_style << "\" ";
if (d->dc[d->level].clip_id)
- tmp_style << "\n\tclip-path=\"url(#clipEmfPath" << d->dc[d->level].clip_id << ")\" ";
+ tmp_style << "\n\tclip-path=\"url(#clipWmfPath" << d->dc[d->level].clip_id << ")\" ";
d->outsvg += tmp_style.str().c_str();
}
@@ -1688,11 +1688,19 @@ int Wmf::myMetaFileProc(const char *contents, unsigned int length, PWMF_CALLBACK
// next record is valid type and forces pending text to be drawn immediately
if ((d->dc[d->level].dirty & DIRTY_TEXT) || ((wmr_mask != U_WMR_INVALID) && (wmr_mask & U_DRAW_TEXT) && d->tri->dirty)){
TR_layout_analyze(d->tri);
+ if (d->dc[d->level].clip_id){
+ SVGOStringStream tmp_clip;
+ tmp_clip << "\n<g\n\tclip-path=\"url(#clipWmfPath" << d->dc[d->level].clip_id << ")\"\n>";
+ d->outsvg += tmp_clip.str().c_str();
+ }
TR_layout_2_svg(d->tri);
SVGOStringStream ts;
ts << d->tri->out;
d->outsvg += ts.str().c_str();
d->tri = trinfo_clear(d->tri);
+ if (d->dc[d->level].clip_id){
+ d->outsvg += "\n</g>\n";
+ }
}
if(d->dc[d->level].dirty){ //Apply the delayed background changes, clear the flag
d->dc[d->level].bkMode = tbkMode;
@@ -2590,11 +2598,19 @@ std::cout << "BEFORE DRAW"
status = trinfo_load_textrec(d->tri, &tsp, tsp.ori,TR_EMFBOT); // ori is actually escapement
if(status==-1){ // change of escapement, emit what we have and reset
TR_layout_analyze(d->tri);
+ if (d->dc[d->level].clip_id){
+ SVGOStringStream tmp_clip;
+ tmp_clip << "\n<g\n\tclip-path=\"url(#clipWmfPath" << d->dc[d->level].clip_id << ")\"\n>";
+ d->outsvg += tmp_clip.str().c_str();
+ }
TR_layout_2_svg(d->tri);
ts << d->tri->out;
d->outsvg += ts.str().c_str();
d->tri = trinfo_clear(d->tri);
(void) trinfo_load_textrec(d->tri, &tsp, tsp.ori,TR_EMFBOT); // ignore return status, it must work
+ if (d->dc[d->level].clip_id){
+ d->outsvg += "\n</g>\n";
+ }
}
g_free(escaped_text);
@@ -3071,7 +3087,7 @@ Wmf::open( Inkscape::Extension::Input * /*mod*/, const gchar *uri )
(void) myMetaFileProc(contents,length, &d);
free(contents);
-// std::cout << "SVG Output: " << std::endl << *(d.outsvg) << std::endl;
+// std::cout << "SVG Output: " << std::endl << d.outsvg << std::endl;
SPDocument *doc = SPDocument::createNewDocFromMem(d.outsvg.c_str(), strlen(d.outsvg.c_str()), TRUE);
diff --git a/src/sp-flowregion.cpp b/src/sp-flowregion.cpp
index e8e5c3d95..32d3b0f60 100644
--- a/src/sp-flowregion.cpp
+++ b/src/sp-flowregion.cpp
@@ -42,15 +42,12 @@ static void GetDest(SPObject* child,Shape **computed);
SPFlowregion::SPFlowregion() : SPItem() {
- //new (&this->computed) std::vector<Shape*>;
}
SPFlowregion::~SPFlowregion() {
for (std::vector<Shape*>::iterator it = this->computed.begin() ; it != this->computed.end() ; ++it) {
delete *it;
}
-
- //this->computed.~vector<Shape*>();
}
void SPFlowregion::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) {
diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp
index 59832a2b4..7de65ccc3 100644
--- a/src/sp-flowtext.cpp
+++ b/src/sp-flowtext.cpp
@@ -46,11 +46,9 @@ namespace {
SPFlowtext::SPFlowtext() : SPItem() {
this->par_indent = 0;
- //new (&this->layout) Inkscape::Text::Layout();
}
SPFlowtext::~SPFlowtext() {
- //this->layout.~Layout();
}
void SPFlowtext::child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) {
diff --git a/src/sp-gradient.cpp b/src/sp-gradient.cpp
index 1479acd69..70c54451a 100644
--- a/src/sp-gradient.cpp
+++ b/src/sp-gradient.cpp
@@ -262,8 +262,6 @@ SPGradient::SPGradient() : SPPaintServer(), units(),
this->vector.built = false;
this->vector.stops.clear();
-
- //new (&this->modified_connection) sigc::connection();
}
SPGradient::~SPGradient() {
diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp
index 7af4e3320..657aca692 100644
--- a/src/sp-item-group.cpp
+++ b/src/sp-item-group.cpp
@@ -70,11 +70,9 @@ namespace {
SPGroup::SPGroup() : SPLPEItem() {
this->_layer_mode = SPGroup::GROUP;
- //new (&this->_display_modes) std::map<unsigned int, SPGroup::LayerMode>();
}
SPGroup::~SPGroup() {
- //this->_display_modes.~map();
}
void SPGroup::build(SPDocument *document, Inkscape::XML::Node *repr) {
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index 0cdff6546..a3f1a5d64 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -118,10 +118,6 @@ SPItem::SPItem() : SPObject() {
mask_ref->changedSignal().connect(sigc::bind(sigc::ptr_fun(mask_ref_changed), this));
avoidRef = new SPAvoidRef(this);
-
- //new (&constraints) std::vector<SPGuideConstraint>();
-
- //new (&_transformed_signal) sigc::signal<void, Geom::Affine const *, SPItem *>();
}
SPItem::~SPItem() {
diff --git a/src/sp-offset.cpp b/src/sp-offset.cpp
index c6a4b730d..3aa1e4eb6 100644
--- a/src/sp-offset.cpp
+++ b/src/sp-offset.cpp
@@ -107,11 +107,6 @@ SPOffset::SPOffset() : SPShape() {
this->sourceRepr = NULL;
this->sourceObject = NULL;
- new (&this->_modified_connection) sigc::connection();
- new (&this->_delete_connection) sigc::connection();
- new (&this->_changed_connection) sigc::connection();
- new (&this->_transformed_connection) sigc::connection();
-
// set up the uri reference
this->sourceRef = new SPUseReference(this);
this->_changed_connection = this->sourceRef->changedSignal().connect(sigc::bind(sigc::ptr_fun(sp_offset_href_changed), this));
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp
index 61d35e6ff..de9103dee 100644
--- a/src/sp-shape.cpp
+++ b/src/sp-shape.cpp
@@ -57,8 +57,6 @@ static void sp_shape_update_marker_view (SPShape *shape, Inkscape::DrawingItem *
SPShape::SPShape() : SPLPEItem() {
for ( int i = 0 ; i < SP_MARKER_LOC_QTY ; i++ ) {
- new (&this->_release_connect[i]) sigc::connection();
- new (&this->_modified_connect[i]) sigc::connection();
this->_marker[i] = NULL;
}
diff --git a/src/sp-string.cpp b/src/sp-string.cpp
index 08755a5fc..e9dfc168b 100644
--- a/src/sp-string.cpp
+++ b/src/sp-string.cpp
@@ -47,7 +47,6 @@ namespace {
#####################################################*/
SPString::SPString() : SPObject() {
- //new (&this->string) Glib::ustring();
}
SPString::~SPString() {
diff --git a/src/sp-text.cpp b/src/sp-text.cpp
index 9a7f0b7a0..ccc5adf59 100644
--- a/src/sp-text.cpp
+++ b/src/sp-text.cpp
@@ -70,8 +70,6 @@ namespace {
# SPTEXT
#####################################################*/
SPText::SPText() : SPItem() {
- //new (&this->layout) Inkscape::Text::Layout;
- //new (&this->attributes) TextTagAttributes;
}
SPText::~SPText() {
@@ -90,9 +88,6 @@ void SPText::build(SPDocument *doc, Inkscape::XML::Node *repr) {
}
void SPText::release() {
- //this->attributes.~TextTagAttributes();
- //this->layout.~Layout();
-
SPItem::release();
}
diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp
index edbb9faa7..0f6eb106f 100644
--- a/src/sp-tref.cpp
+++ b/src/sp-tref.cpp
@@ -64,12 +64,8 @@ static void sp_tref_delete_self(SPObject *deleted, SPTRef *self);
SPTRef::SPTRef() : SPItem() {
this->stringChild = NULL;
- //new (&this->attributes) TextTagAttributes;
-
this->href = NULL;
this->uriOriginalRef = new SPTRefReference(this);
- //new (&this->_delete_connection) sigc::connection();
- //new (&this->_changed_connection) sigc::connection();
this->_changed_connection =
this->uriOriginalRef->changedSignal().connect(sigc::bind(sigc::ptr_fun(sp_tref_href_changed), this));
@@ -77,9 +73,6 @@ SPTRef::SPTRef() : SPItem() {
SPTRef::~SPTRef() {
delete this->uriOriginalRef;
-
- //this->_delete_connection.~connection();
- //this->_changed_connection.~connection();
}
void SPTRef::build(SPDocument *document, Inkscape::XML::Node *repr) {
diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp
index 8c4105777..c3f7689e7 100644
--- a/src/sp-tspan.cpp
+++ b/src/sp-tspan.cpp
@@ -63,7 +63,6 @@ namespace {
#####################################################*/
SPTSpan::SPTSpan() : SPItem() {
this->role = SP_TSPAN_ROLE_UNSPECIFIED;
- //new (&this->attributes) TextTagAttributes;
}
SPTSpan::~SPTSpan() {
@@ -81,8 +80,6 @@ void SPTSpan::build(SPDocument *doc, Inkscape::XML::Node *repr) {
}
void SPTSpan::release() {
- //this->attributes.~TextTagAttributes();
-
SPItem::release();
}
@@ -227,8 +224,6 @@ const char* SPTSpan::displayName() const {
void refresh_textpath_source(SPTextPath* offset);
SPTextPath::SPTextPath() : SPItem() {
- //new (&this->attributes) TextTagAttributes;
-
this->startOffset._set = false;
this->originalPath = NULL;
this->isUpdating=false;
diff --git a/src/style.cpp b/src/style.cpp
index 3691a3e48..f0710e404 100644
--- a/src/style.cpp
+++ b/src/style.cpp
@@ -231,11 +231,6 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) :
document = document_in;
}
- new (&release_connection) sigc::connection();
- new (&filter_modified_connection) sigc::connection();
- new (&fill_ps_modified_connection) sigc::connection();
- new (&stroke_ps_modified_connection) sigc::connection();
-
// 'font' shorthand requires access to included properties.
font.setStylePointer( this );
@@ -442,7 +437,6 @@ SPStyle::~SPStyle() {
// Remove connections
release_connection.disconnect();
- release_connection.~connection();
// The following shoud be moved into SPIPaint and SPIFilter
if (fill.value.href) {
@@ -457,12 +451,7 @@ SPStyle::~SPStyle() {
filter_modified_connection.disconnect();
}
- filter_modified_connection.~connection();
- fill_ps_modified_connection.~connection();
- stroke_ps_modified_connection.~connection();
-
_properties.clear();
- //_propmap.clear();
// std::cout << "SPStyle::~SPstyle(): Exit\n" << std::endl;
}