From f10048be170a45921ae8fc65ccd2588a9ad2897d Mon Sep 17 00:00:00 2001 From: Matthew Petroff Date: Tue, 27 Aug 2013 12:32:55 -0400 Subject: Added viewBox implement document unit support. (bzr r12475.1.2) --- src/sp-item.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/sp-item.cpp') diff --git a/src/sp-item.cpp b/src/sp-item.cpp index a4070c9b3..0ca9592c9 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -73,6 +73,8 @@ #include "live_effects/effect.h" #include "live_effects/lpeobject-reference.h" +#include "util/units.h" + #define noSP_ITEM_DEBUG_IDLE static void sp_item_build (SPObject *object, @@ -857,7 +859,7 @@ Geom::OptRect SPItem::desktopGeometricBounds() const Geom::OptRect SPItem::desktopVisualBounds() const { /// @fixme hardcoded desktop transform - Geom::Affine m = Geom::Scale(1, -1) * Geom::Translate(0, document->getHeight()); + Geom::Affine m = Geom::Scale(1, -1) * Geom::Translate(0, document->getHeight().value("px")); Geom::OptRect ret = documentVisualBounds(); if (ret) *ret *= m; return ret; @@ -1520,7 +1522,7 @@ Geom::Affine SPItem::i2dt_affine() const // TODO temp code to prevent crashing on command-line launch: ret = i2doc_affine() * Geom::Scale(1, -1) - * Geom::Translate(0, document->getHeight()); + * Geom::Translate(0, document->getHeight().value("px")); } return ret; } -- cgit v1.2.3 From eb3598e7e27619c759ef33bb9ec4ffb8898523de Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Fri, 20 Sep 2013 00:45:16 -0400 Subject: Refactor status-bar text for multiple items, was very broken Fixed bugs: - https://launchpad.net/bugs/1199192 (bzr r12550) --- src/sp-item.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/sp-item.cpp') diff --git a/src/sp-item.cpp b/src/sp-item.cpp index e6991a1fa..154169e79 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -931,9 +931,12 @@ void SPItem::invoke_print(SPPrintContext *ctx) } } -// CPPIFY: is it possible to combine this method with "SPItem::description()"? +const char* SPItem::display_name() { + return _("Object"); +} + gchar* SPItem::description() { - return g_strdup(_("Object")); + return g_strdup(""); } /** @@ -943,7 +946,8 @@ gchar* SPItem::description() { */ gchar *SPItem::getDetailedDescription() { - gchar* s = this->description(); + gchar* s = g_strdup_printf("%s %s", + this->display_name(), this->description()); if (s && clip_ref->getObject()) { gchar *snew = g_strdup_printf (_("%s; clipped"), s); -- cgit v1.2.3