summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2014-09-01 23:55:58 +0000
committer~suv <suv-sf@users.sourceforge.net>2014-09-01 23:55:58 +0000
commitf85dfb19c10b0345859964066eb7fce49d275c49 (patch)
tree29ac681cf0f68f9ffb623b59a9b6a5b6e31d3709 /src
parentosx-app.sh: test awk and require gawk if too old (diff)
parentBinReloc: fix -Wwrite-strings (diff)
downloadinkscape-f85dfb19c10b0345859964066eb7fce49d275c49.tar.gz
inkscape-f85dfb19c10b0345859964066eb7fce49d275c49.zip
update to trunk (r13538)
(bzr r13506.1.48)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/bitmap/crop.cpp2
-rw-r--r--src/extension/internal/bitmap/opacity.cpp2
-rw-r--r--src/prefix.cpp2
-rw-r--r--src/prefix.h2
-rw-r--r--src/sp-item.cpp20
-rw-r--r--src/ui/dialog/aboutbox.cpp8
-rw-r--r--src/ui/dialog/document-properties.cpp10
-rw-r--r--src/ui/tools/node-tool.cpp38
8 files changed, 47 insertions, 37 deletions
diff --git a/src/extension/internal/bitmap/crop.cpp b/src/extension/internal/bitmap/crop.cpp
index 0e633afd6..02d92668b 100644
--- a/src/extension/internal/bitmap/crop.cpp
+++ b/src/extension/internal/bitmap/crop.cpp
@@ -74,7 +74,7 @@ Crop::init(void)
"<effects-menu>\n"
"<submenu name=\"" N_("Raster") "\" />\n"
"</effects-menu>\n"
- "<menu-tip>" N_("Crop selected bitmap(s).") "</menu-tip>\n"
+ "<menu-tip>" N_("Crop selected bitmap(s)") "</menu-tip>\n"
"</effect>\n"
"</inkscape-extension>\n", new Crop());
}
diff --git a/src/extension/internal/bitmap/opacity.cpp b/src/extension/internal/bitmap/opacity.cpp
index 742cb7019..f9b4bbc27 100644
--- a/src/extension/internal/bitmap/opacity.cpp
+++ b/src/extension/internal/bitmap/opacity.cpp
@@ -43,7 +43,7 @@ Opacity::init(void)
"<effects-menu>\n"
"<submenu name=\"" N_("Raster") "\" />\n"
"</effects-menu>\n"
- "<menu-tip>" N_("Modify opacity channel(s) of selected bitmap(s).") "</menu-tip>\n"
+ "<menu-tip>" N_("Modify opacity channel(s) of selected bitmap(s)") "</menu-tip>\n"
"</effect>\n"
"</inkscape-extension>\n", new Opacity());
}
diff --git a/src/prefix.cpp b/src/prefix.cpp
index 126d16a72..dd8872a1d 100644
--- a/src/prefix.cpp
+++ b/src/prefix.cpp
@@ -192,7 +192,7 @@ br_locate_prefix (void *symbol)
* br_prepend_prefix (&argc, "/share/foo/data.png"); --> Returns "/usr/share/foo/data.png"
*/
char *
-br_prepend_prefix (void *symbol, char *path)
+br_prepend_prefix (void *symbol, char const *path)
{
char *tmp, *newpath;
diff --git a/src/prefix.h b/src/prefix.h
index af96fa746..7c5a1fd3c 100644
--- a/src/prefix.h
+++ b/src/prefix.h
@@ -80,7 +80,7 @@ extern "C" {
const char *br_thread_local_store (char *str);
char *br_locate (void *symbol);
char *br_locate_prefix (void *symbol);
-char *br_prepend_prefix (void *symbol, char *path);
+char *br_prepend_prefix (void *symbol, char const *path);
#endif /* ENABLE_BINRELOC */
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index 428f9555e..19dc71785 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -234,9 +234,13 @@ void SPItem::setCenter(Geom::Point const &object_centre) {
document->ensureUpToDate();
// Copied from DocumentProperties::onDocUnitChange()
- gdouble viewscale_w = this->document->getWidth().value("px") / this->document->getRoot()->viewBox.width();
- gdouble viewscale_h = this->document->getHeight().value("px")/ this->document->getRoot()->viewBox.height();
- gdouble viewscale = std::min(viewscale_h, viewscale_w);
+ gdouble viewscale = 1.0;
+ Geom::Rect vb = this->document->getRoot()->viewBox;
+ if ( !vb.hasZeroArea() ) {
+ gdouble viewscale_w = this->document->getWidth().value("px") / vb.width();
+ gdouble viewscale_h = this->document->getHeight().value("px")/ vb.height();
+ viewscale = std::min(viewscale_h, viewscale_w);
+ }
// FIXME this is seriously wrong
Geom::OptRect bbox = desktopGeometricBounds();
@@ -267,9 +271,13 @@ Geom::Point SPItem::getCenter() const {
document->ensureUpToDate();
// Copied from DocumentProperties::onDocUnitChange()
- gdouble viewscale_w = this->document->getWidth().value("px") / this->document->getRoot()->viewBox.width();
- gdouble viewscale_h = this->document->getHeight().value("px")/ this->document->getRoot()->viewBox.height();
- gdouble viewscale = std::min(viewscale_h, viewscale_w);
+ gdouble viewscale = 1.0;
+ Geom::Rect vb = this->document->getRoot()->viewBox;
+ if ( !vb.hasZeroArea() ) {
+ gdouble viewscale_w = this->document->getWidth().value("px") / vb.width();
+ gdouble viewscale_h = this->document->getHeight().value("px")/ vb.height();
+ viewscale = std::min(viewscale_h, viewscale_w);
+ }
// FIXME this is seriously wrong
Geom::OptRect bbox = desktopGeometricBounds();
diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp
index a66855b2a..7cd069132 100644
--- a/src/ui/dialog/aboutbox.cpp
+++ b/src/ui/dialog/aboutbox.cpp
@@ -482,6 +482,7 @@ void AboutBox::initStrings() {
"Elias Norberg <elno0959 at student.su.se>, 2009.\n"
"Equipe de Tradução Inkscape Brasil <www.inkscapebrasil.org>, 2007.\n"
"Fatih Demir <kabalak@gtranslator.org>, 2000.\n"
+"Firas Hanife <FirasHanife@gmail.com>, 2014.\n"
"Foppe Benedictus <foppe.benedictus@gmail.com>, 2007-2009.\n"
"Francesc Dorca <f.dorca@filnet.es>, 2003. Traducció sodipodi.\n"
"Francisco Javier F. Serrador <serrador@arrakis.es>, 2003.\n"
@@ -493,8 +494,9 @@ void AboutBox::initStrings() {
"Hizkuntza Politikarako Sailburuordetza <hizkpol@ej-gv.es>, 2005.\n"
"Ilia Penev <lichopicho@gmail.com>, 2006.\n"
"Ivan Masár <helix84@centrum.sk>, 2006-2010. \n"
+"Ivan Řihošek <irihosek@seznam.cz>, 2014.\n"
"Iñaki Larrañaga <dooteo@euskalgnu.org>, 2006.\n"
-"Jānis Eisaks <jancs@dv.lv>, 2012, 2013.\n"
+"Jānis Eisaks <jancs@dv.lv>, 2012-2014.\n"
"Jeffrey Steve Borbón Sanabria <jeff_kerokid@yahoo.com>, 2005.\n"
"Jesper Öqvist <jesper@llbit.se>, 2010, 2011.\n"
"Joaquim Perez i Noguer <noguer@gmail.com>, 2008-2009.\n"
@@ -516,7 +518,7 @@ void AboutBox::initStrings() {
"Kingsley Turner <kingsley@maddogsbreakfast.com.au>, 2006.\n"
"Kitae <bluetux@gmail.com>, 2006.\n"
"Kjartan Maraas <kmaraas@gnome.org>, 2000-2002.\n"
-"Kris De Gussem <Kris.DeGussem@gmail.com>, 2008-2013.\n"
+"Kris De Gussem <Kris.DeGussem@gmail.com>, 2008-2014.\n"
"Lauris Kaplinski <lauris@ariman.ee>, 2000.\n"
"Leandro Regueiro <leandro.regueiro@gmail.com>, 2006-2008, 2010.\n"
"Liu Xiaoqin <liuxqsmile@gmail.com>, 2008.\n"
@@ -536,7 +538,7 @@ void AboutBox::initStrings() {
"Muhammad Bashir Al-Noimi <mhdbnoimi@gmail.com>, 2008.\n"
"Myckel Habets <myckel@sdf.lonestar.org>, 2008.\n"
"Nguyen Dinh Trung <nguyendinhtrung141@gmail.com>, 2007, 2008.\n"
-"Nicolas Dufour <nicoduf@yahoo.fr>, 2008-2013.\n"
+"Nicolas Dufour <nicoduf@yahoo.fr>, 2008-2014.\n"
"Pawan Chitrakar <pchitrakar@gmail.com>, 2006.\n"
"Przemysław Loesch <p_loesch@poczta.onet.pl>, 2005.\n"
"Quico Llach <quico@softcatala.org>, 2000. Traducció sodipodi.\n"
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 4e4616724..2757a0ec9 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -1736,9 +1736,13 @@ void DocumentProperties::onDocUnitChange()
prefs->setBool("/options/transform/gradient", true);
{
ShapeEditor::blockSetItem(true);
- gdouble viewscale_w = doc->getWidth().value("px")/doc->getRoot()->viewBox.width();
- gdouble viewscale_h = doc->getHeight().value("px")/doc->getRoot()->viewBox.height();
- gdouble viewscale = std::min(viewscale_h, viewscale_w);
+ gdouble viewscale = 1.0;
+ Geom::Rect vb = doc->getRoot()->viewBox;
+ if ( !vb.hasZeroArea() ) {
+ gdouble viewscale_w = doc->getWidth().value("px") / vb.width();
+ gdouble viewscale_h = doc->getHeight().value("px")/ vb.height();
+ viewscale = std::min(viewscale_h, viewscale_w);
+ }
gdouble scale = Inkscape::Util::Quantity::convert(1, old_doc_unit, doc_unit);
doc->getRoot()->scaleChildItemsRec(Geom::Scale(scale), Geom::Point(-viewscale*doc->getRoot()->viewBox.min()[Geom::X] +
(doc->getWidth().value("px") - viewscale*doc->getRoot()->viewBox.width())/2,
diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp
index 0778e3f3f..4be547506 100644
--- a/src/ui/tools/node-tool.cpp
+++ b/src/ui/tools/node-tool.cpp
@@ -298,27 +298,23 @@ void NodeTool::update_helperpath () {
if (SP_IS_LPE_ITEM(selection->singleItem())) {
Inkscape::LivePathEffect::Effect *lpe = SP_LPE_ITEM(selection->singleItem())->getCurrentLPE();
if (lpe && lpe->isVisible()/* && lpe->showOrigPath()*/) {
- if (lpe) {
- SPCurve *c = new SPCurve();
- SPCurve *cc = new SPCurve();
- std::vector<Geom::PathVector> cs = lpe->getCanvasIndicators(SP_LPE_ITEM(selection->singleItem()));
- for (std::vector<Geom::PathVector>::iterator p = cs.begin(); p != cs.end(); ++p) {
- cc->set_pathvector(*p);
- c->append(cc, false);
- cc->reset();
- }
- if (!c->is_empty()) {
- c->transform(selection->singleItem()->i2dt_affine());
- SPCanvasItem *helperpath = sp_canvas_bpath_new(sp_desktop_tempgroup(this->desktop), c);
- sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(helperpath),
- 0x0000ff9A, 1.0,
- SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);
- sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(helperpath), 0, SP_WIND_RULE_NONZERO);
- this->helperpath_tmpitem = this->desktop->add_temporary_canvasitem(helperpath,0);
- }
- c->unref();
- cc->unref();
- }
+ SPCurve *c = new SPCurve();
+ SPCurve *cc = new SPCurve();
+ std::vector<Geom::PathVector> cs = lpe->getCanvasIndicators(SP_LPE_ITEM(selection->singleItem()));
+ for (std::vector<Geom::PathVector>::iterator p = cs.begin(); p != cs.end(); ++p) {
+ cc->set_pathvector(*p);
+ c->append(cc, false);
+ cc->reset();
+ }
+ if (!c->is_empty()) {
+ SPCanvasItem *helperpath = sp_canvas_bpath_new(sp_desktop_tempgroup(this->desktop), c);
+ sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(helperpath), 0x0000ff9A, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);
+ sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(helperpath), 0, SP_WIND_RULE_NONZERO);
+ sp_canvas_item_affine_absolute(helperpath, selection->singleItem()->i2dt_affine());
+ this->helperpath_tmpitem = this->desktop->add_temporary_canvasitem(helperpath, 0);
+ }
+ c->unref();
+ cc->unref();
}
}
}