diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-03-18 20:06:37 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-03-18 20:06:37 +0000 |
| commit | 5ea50da1809d7c851b97c448588757ec33a0145e (patch) | |
| tree | f1a669fc9d1647600ced5fa28d8e8c5af3af9cf0 /src | |
| parent | update to trunk (diff) | |
| parent | Fix for Bug #1291546 (Linking color profile from Document properties dialog c... (diff) | |
| download | inkscape-5ea50da1809d7c851b97c448588757ec33a0145e.tar.gz inkscape-5ea50da1809d7c851b97c448588757ec33a0145e.zip | |
update to trunk
(bzr r11950.1.300)
Diffstat (limited to 'src')
| -rw-r--r-- | src/color-profile.cpp | 2 | ||||
| -rw-r--r-- | src/extension/internal/emf-print.cpp | 2 | ||||
| -rw-r--r-- | src/extension/internal/grid.cpp | 35 | ||||
| -rw-r--r-- | src/extension/internal/wmf-print.cpp | 2 | ||||
| -rw-r--r-- | src/sp-use.cpp | 6 | ||||
| -rw-r--r-- | src/trace/siox.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/export.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/filter-effects-dialog.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/undo-history.cpp | 2 | ||||
| -rw-r--r-- | src/uri.cpp | 3 |
10 files changed, 31 insertions, 27 deletions
diff --git a/src/color-profile.cpp b/src/color-profile.cpp index 09eaa36e5..ed4b9029e 100644 --- a/src/color-profile.cpp +++ b/src/color-profile.cpp @@ -339,7 +339,7 @@ void ColorProfile::set(unsigned key, gchar const *value) { Inkscape::URI hrefUri(escaped); //# 3. Resolve the href according the docBase. This follows // the w3c specs. All absolute and relative issues are considered - std::string fullpath = docUri.getFullPath(hrefUri.getFullPath("")); + std::string fullpath = hrefUri.getFullPath(docUri.getFullPath("")); gchar* fullname = g_uri_unescape_string(fullpath.c_str(), ""); this->impl->_clearProfile(); diff --git a/src/extension/internal/emf-print.cpp b/src/extension/internal/emf-print.cpp index 9cc662a27..4bb892821 100644 --- a/src/extension/internal/emf-print.cpp +++ b/src/extension/internal/emf-print.cpp @@ -1562,7 +1562,7 @@ unsigned int PrintEmf::image( unsigned int h, /** height of bitmap */ unsigned int rs, /** row stride (normally w*4) */ Geom::Affine const &tf_rect, /** affine transform only used for defining location and size of rect, for all other tranforms, use the one from m_tr_stack */ - SPStyle const *style) /** provides indirect link to image object */ + SPStyle const * /*style*/) /** provides indirect link to image object */ { double x1, y1, dw, dh; char *rec = NULL; diff --git a/src/extension/internal/grid.cpp b/src/extension/internal/grid.cpp index c120df719..0059bbec2 100644 --- a/src/extension/internal/grid.cpp +++ b/src/extension/internal/grid.cpp @@ -59,31 +59,31 @@ Grid::load (Inkscape::Extension::Extension */*module*/) namespace { Glib::ustring build_lines(Geom::Rect bounding_area, - float offset[], float spacing[]) + Geom::Point const &offset, Geom::Point const &spacing) { Geom::Point point_offset(0.0, 0.0); SVG::PathString path_data; - for ( int axis = 0 ; axis < 2 ; ++axis ) { + for ( int axis = Geom::X ; axis <= Geom::Y ; ++axis ) { point_offset[axis] = offset[axis]; for (Geom::Point start_point = bounding_area.min(); - start_point[axis] + offset[axis] <= (bounding_area.max())[axis]; - start_point[axis] += spacing[axis]) { + start_point[axis] + offset[axis] <= (bounding_area.max())[axis]; + start_point[axis] += spacing[axis]) { Geom::Point end_point = start_point; end_point[1-axis] = (bounding_area.max())[1-axis]; path_data.moveTo(start_point + point_offset) - .lineTo(end_point + point_offset); + .lineTo(end_point + point_offset); } } - // std::cout << "Path data:" << path_data.c_str() << std::endl; - return path_data; - } - + // std::cout << "Path data:" << path_data.c_str() << std::endl; + return path_data; } +} // namespace + /** \brief This actually draws the grid. \param module The effect that was called (unused) @@ -115,16 +115,15 @@ Grid::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *doc gdouble scale = Inkscape::Util::Quantity::convert(1, "px", (document->doc())->getDefaultUnit()); bounding_area *= Geom::Scale(scale); - float spacings[2] = { scale*module->get_param_float("xspacing"), - scale*module->get_param_float("yspacing") }; - float line_width = scale*module->get_param_float("lineWidth"); - float offsets[2] = { scale*module->get_param_float("xoffset"), - scale*module->get_param_float("yoffset") }; + Geom::Point spacings( scale * module->get_param_float("xspacing"), + scale * module->get_param_float("yspacing") ); + gdouble line_width = scale * module->get_param_float("lineWidth"); + Geom::Point offsets( scale * module->get_param_float("xoffset"), + scale * module->get_param_float("yoffset") ); Glib::ustring path_data(""); - path_data = build_lines(bounding_area, - offsets, spacings); + path_data = build_lines(bounding_area, offsets, spacings); Inkscape::XML::Document * xml_doc = document->doc()->getReprDoc(); //XML Tree being used directly here while it shouldn't be. @@ -144,9 +143,7 @@ Grid::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *doc path->setAttribute("style", style.c_str()); current_layer->appendChild(path); - Inkscape::GC::release(path); - - return; + Inkscape::GC::release(path); } /** \brief A class to make an adjustment that uses Extension params */ diff --git a/src/extension/internal/wmf-print.cpp b/src/extension/internal/wmf-print.cpp index 232891c9c..5a552ad83 100644 --- a/src/extension/internal/wmf-print.cpp +++ b/src/extension/internal/wmf-print.cpp @@ -1103,7 +1103,7 @@ unsigned int PrintWmf::image( unsigned int h, /** height of bitmap */ unsigned int rs, /** row stride (normally w*4) */ Geom::Affine const &tf_rect, /** affine transform only used for defining location and size of rect, for all other tranforms, use the one from m_tr_stack */ - SPStyle const *style) /** provides indirect link to image object */ + SPStyle const * /*style*/) /** provides indirect link to image object */ { double x1, y1, dw, dh; char *rec = NULL; diff --git a/src/sp-use.cpp b/src/sp-use.cpp index 14f51159b..e8fe3687f 100644 --- a/src/sp-use.cpp +++ b/src/sp-use.cpp @@ -220,7 +220,11 @@ const char* SPUse::displayName() const { gchar* SPUse::description() const { if (this->child) { if( SP_IS_SYMBOL( this->child ) ) { - return g_strdup_printf(_("called %s"), Glib::Markup::escape_text(Glib::ustring( g_dpgettext2(NULL, "Symbol", this->child->title()))).c_str()); + if (this->child->title()) { + return g_strdup_printf(_("called %s"), Glib::Markup::escape_text(Glib::ustring( g_dpgettext2(NULL, "Symbol", this->child->title()))).c_str()); + } else { + return g_strdup_printf(_("called %s"), _("Unnamed Symbol")); + } } static unsigned recursion_depth = 0; diff --git a/src/trace/siox.cpp b/src/trace/siox.cpp index 0706cfed1..065e891ed 100644 --- a/src/trace/siox.cpp +++ b/src/trace/siox.cpp @@ -889,7 +889,7 @@ SioxImage Siox::extractForeground(const SioxImage &originalImage, return workImage; } - trace("knownBg:%u knownFg:%u", knownBg.size(), knownFg.size()); + trace("knownBg:%u knownFg:%u", static_cast<unsigned int>(knownBg.size()), static_cast<unsigned int>(knownFg.size())); std::vector<CieLab> bgSignature ; diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp index f0a5f1bf5..913713e5c 100644 --- a/src/ui/dialog/export.cpp +++ b/src/ui/dialog/export.cpp @@ -1049,7 +1049,7 @@ void Export::onExport () dpi = atof(dpi_hint); } if (dpi == 0.0) { - dpi = DPI_BASE; + dpi = getValue(xdpi_adj); } Geom::OptRect area = item->desktopVisualBounds(); diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index 65bebbd14..c2367c2a2 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -1515,7 +1515,7 @@ void FilterEffectsDialog::FilterModifier::on_name_edited(const Glib::ustring& pa } } -bool FilterEffectsDialog::FilterModifier::on_filter_move(const Glib::RefPtr<Gdk::DragContext>& /*context*/, int x, int y, guint /*time*/) { +bool FilterEffectsDialog::FilterModifier::on_filter_move(const Glib::RefPtr<Gdk::DragContext>& /*context*/, int /*x*/, int /*y*/, guint /*time*/) { //const Gtk::TreeModel::Path& /*path*/) { /* The code below is bugged. Use of "object->getRepr()->setPosition(0)" is dangerous! diff --git a/src/ui/dialog/undo-history.cpp b/src/ui/dialog/undo-history.cpp index 2412c3ec9..53691cd37 100644 --- a/src/ui/dialog/undo-history.cpp +++ b/src/ui/dialog/undo-history.cpp @@ -235,7 +235,7 @@ void UndoHistory::setDesktop(SPDesktop* desktop) } } -void UndoHistory::_connectDocument(SPDesktop* desktop, SPDocument *document) +void UndoHistory::_connectDocument(SPDesktop* desktop, SPDocument * /*document*/) { // disconnect from prior if (_event_log) { diff --git a/src/uri.cpp b/src/uri.cpp index e81d108c9..2eaf4ecc1 100644 --- a/src/uri.cpp +++ b/src/uri.cpp @@ -149,6 +149,9 @@ gchar *URI::to_native_filename(gchar const* uri) throw(BadURIException) * and thus redundent. Caller is expected to check against the document's path. */ const std::string URI::getFullPath(std::string const base) const { + if (!_impl->getPath()) { + return ""; + } std::string path = std::string(_impl->getPath()); // Calculate the absolute path from an available base if(!base.empty() && !path.empty() && path[0] != '/') { |
