summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe CorrĂȘa da Silva Sanches <juca@members.fsf.org>2018-03-27 20:57:32 +0000
committerFelipe CorrĂȘa da Silva Sanches <juca@members.fsf.org>2018-03-27 20:58:51 +0000
commita679bb93e87a142a4cfa2720881bd033d570bebb (patch)
tree291650706054e23166970c7e7d03c61523822543
parentConvert Pango font variations string to CSS format before saving to CSS. (diff)
downloadinkscape-a679bb93e87a142a4cfa2720881bd033d570bebb.tar.gz
inkscape-a679bb93e87a142a4cfa2720881bd033d570bebb.zip
a few more fixes to build warnings related to libnrtype
-rw-r--r--src/object/sp-item-group.cpp2
-rw-r--r--src/object/sp-style-elem.cpp5
-rw-r--r--src/object/sp-text.cpp4
-rw-r--r--src/ui/dialog/font-substitution.cpp6
-rw-r--r--src/ui/widget/font-variants.cpp18
-rw-r--r--src/verbs.cpp2
6 files changed, 19 insertions, 18 deletions
diff --git a/src/object/sp-item-group.cpp b/src/object/sp-item-group.cpp
index 990634b72..3d89a524d 100644
--- a/src/object/sp-item-group.cpp
+++ b/src/object/sp-item-group.cpp
@@ -938,7 +938,7 @@ sp_group_perform_patheffect(SPGroup *group, SPGroup *top_group, Inkscape::LivePa
sp_group_perform_patheffect(sub_group, top_group, lpe, write);
} else {
SPShape* sub_shape = dynamic_cast<SPShape *>(sub_item);
- SPPath* sub_path = dynamic_cast<SPPath *>(sub_item);
+ //SPPath* sub_path = dynamic_cast<SPPath *>(sub_item);
SPItem* clipmaskto = dynamic_cast<SPItem *>(sub_item);
if (clipmaskto) {
top_group->applyToClipPath(clipmaskto, lpe);
diff --git a/src/object/sp-style-elem.cpp b/src/object/sp-style-elem.cpp
index da02d4ef1..4c954dc41 100644
--- a/src/object/sp-style-elem.cpp
+++ b/src/object/sp-style-elem.cpp
@@ -212,7 +212,8 @@ import_style_cb (CRDocHandler *a_handler,
delete parse_new;
};
-/* NOT USED, incomplete libcroco implementation */
+#if 0
+/* FIXME: NOT USED, incomplete libcroco implementation */
static void
import_style_result_cb (CRDocHandler *a_this,
GList *a_media_list,
@@ -223,6 +224,7 @@ import_style_result_cb (CRDocHandler *a_this,
/* a_uri_default_ns and a_sheet are set to NULL and are unused by libcroco */
std::cerr << "import_style_result_cb: unimplemented" << std::endl;
};
+#endif
static void
start_selector_cb(CRDocHandler *a_handler,
@@ -340,7 +342,6 @@ end_font_face_cb(CRDocHandler *a_handler)
cur->value->content.str->stryng->str) {
Glib::ustring value = cur->value->content.str->stryng->str;
- std::size_t found = value.find_last_of("ttf");
if (value.rfind("ttf") == (value.length() - 3) ||
value.rfind("otf") == (value.length() - 3)) {
diff --git a/src/object/sp-text.cpp b/src/object/sp-text.cpp
index 79b1020ef..326e540c4 100644
--- a/src/object/sp-text.cpp
+++ b/src/object/sp-text.cpp
@@ -450,7 +450,7 @@ unsigned SPText::_buildLayoutInput(SPObject *root, Inkscape::Text::Layout::Optio
// Extract out shapes (a comma separated list of urls)
Glib::ustring shapeInside_value = style->shape_inside.value;
std::vector<Glib::ustring> shapes_url = Glib::Regex::split_simple(" ", shapeInside_value);
- for (int i=0; i<shapes_url.size(); ++i) {
+ for (unsigned int i=0; i<shapes_url.size(); ++i) {
Glib::ustring shape_url = shapes_url.at(i);
if ( shape_url.compare(0,5,"url(#") != 0 || shape_url.compare(shape_url.size()-1,1,")") != 0 ){
std::cerr << "SPText::_buildLayoutInput(): Invalid shape-inside value: " << shape_url << std::endl;
@@ -694,7 +694,7 @@ Shape* SPText::_buildExclusionShape() const
// Extract out shapes (a comma separated list of urls)
std::vector<Glib::ustring> shapes_url = Glib::Regex::split_simple(" ", shapeSubtract_value);
- for(int i=0; i<shapes_url.size(); i++) {
+ for(unsigned int i=0; i<shapes_url.size(); i++) {
Glib::ustring shape_url = shapes_url.at(i);
if ( shape_url.compare(0,5,"url(#") != 0 || shape_url.compare(shape_url.size()-1,1,")") != 0 ){
std::cerr << "SPText::_buildLayoutInput(): Invalid shape-inside value: " << shape_url << std::endl;
diff --git a/src/ui/dialog/font-substitution.cpp b/src/ui/dialog/font-substitution.cpp
index a07a7b7b3..da7d14d9c 100644
--- a/src/ui/dialog/font-substitution.cpp
+++ b/src/ui/dialog/font-substitution.cpp
@@ -170,11 +170,9 @@ std::vector<SPItem*> FontSubstitution::getFontReplacedItems(SPDocument* doc, Gli
if (parent_text != NULL) {
family = SP_TEXT(parent_text)->layout.getFontFamily(0);
// Add all the spans fonts to the set
- gint ii = 0;
- for (auto& child: parent_text->children) {
- family = SP_TEXT(parent_text)->layout.getFontFamily(ii);
+ for (unsigned int f=0; f < parent_text->children.size(); f++) {
+ family = SP_TEXT(parent_text)->layout.getFontFamily(f);
setFontSpans.insert(family);
- ii++;
}
}
}
diff --git a/src/ui/widget/font-variants.cpp b/src/ui/widget/font-variants.cpp
index 12c920264..6d072602f 100644
--- a/src/ui/widget/font-variants.cpp
+++ b/src/ui/widget/font-variants.cpp
@@ -662,29 +662,31 @@ namespace Widget {
// Caps
{
- unsigned caps_new = SP_CSS_FONT_VARIANT_CAPS_NORMAL;
+ //unsigned caps_new;
Glib::ustring css_string;
if( _caps_normal.get_active() ) {
css_string = "normal";
- caps_new = SP_CSS_FONT_VARIANT_CAPS_NORMAL;
+ // caps_new = SP_CSS_FONT_VARIANT_CAPS_NORMAL;
} else if( _caps_small.get_active() ) {
css_string = "small-caps";
- caps_new = SP_CSS_FONT_VARIANT_CAPS_SMALL;
+ // caps_new = SP_CSS_FONT_VARIANT_CAPS_SMALL;
} else if( _caps_all_small.get_active() ) {
css_string = "all-small-caps";
- caps_new = SP_CSS_FONT_VARIANT_CAPS_ALL_SMALL;
+ // caps_new = SP_CSS_FONT_VARIANT_CAPS_ALL_SMALL;
} else if( _caps_petite.get_active() ) {
css_string = "petite";
- caps_new = SP_CSS_FONT_VARIANT_CAPS_PETITE;
+ // caps_new = SP_CSS_FONT_VARIANT_CAPS_PETITE;
} else if( _caps_all_petite.get_active() ) {
css_string = "all-petite";
- caps_new = SP_CSS_FONT_VARIANT_CAPS_ALL_PETITE;
+ // caps_new = SP_CSS_FONT_VARIANT_CAPS_ALL_PETITE;
} else if( _caps_unicase.get_active() ) {
css_string = "unicase";
- caps_new = SP_CSS_FONT_VARIANT_CAPS_UNICASE;
+ // caps_new = SP_CSS_FONT_VARIANT_CAPS_UNICASE;
} else if( _caps_titling.get_active() ) {
css_string = "titling";
- caps_new = SP_CSS_FONT_VARIANT_CAPS_TITLING;
+ // caps_new = SP_CSS_FONT_VARIANT_CAPS_TITLING;
+ //} else {
+ // caps_new = SP_CSS_FONT_VARIANT_CAPS_NORMAL;
}
// May not be necessary... need to test.
diff --git a/src/verbs.cpp b/src/verbs.cpp
index 2038e213f..38c6adae1 100644
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
@@ -1938,7 +1938,7 @@ void ZoomVerb::perform(SPAction *action, void *data)
if (dt->namedview->display_units && (dt->namedview->display_units->abbr == abbr))
zcorr = prefs->getDouble("/options/zoomcorrection/value", 1.0);
- Geom::Rect const d = dt->get_display_area();
+ //Geom::Rect const d = dt->get_display_area();
Geom::Rect const d_canvas = dt->getCanvas()->getViewbox(); // Not SVG 'viewBox'
Geom::Point midpoint = dt->w2d(d_canvas.midpoint()); // Midpoint of drawing on canvas.