summaryrefslogtreecommitdiffstats
path: root/src/desktop-style.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <mc@localhost.localdomain>2015-02-27 02:10:36 +0000
committerMarc Jeanmougin <mc@localhost.localdomain>2015-02-27 02:10:36 +0000
commit9a7fa4d1899d30ec745107823f307b2a0bf3172f (patch)
tree216bd7b47a96425af53642e2c3869a70ebfa23e5 /src/desktop-style.cpp
parentshould replace buggy pot file (diff)
downloadinkscape-9a7fa4d1899d30ec745107823f307b2a0bf3172f.tar.gz
inkscape-9a7fa4d1899d30ec745107823f307b2a0bf3172f.zip
corrected the casts (hopefully)
(bzr r13922.1.10)
Diffstat (limited to 'src/desktop-style.cpp')
-rw-r--r--src/desktop-style.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp
index e1a81f00a..82f66dcdf 100644
--- a/src/desktop-style.cpp
+++ b/src/desktop-style.cpp
@@ -195,9 +195,9 @@ sp_desktop_set_style(SPDesktop *desktop, SPCSSAttr *css, bool change, bool write
sp_css_attr_unset_uris(css_write);
prefs->mergeStyle("/desktop/style", css_write);
std::vector<SPItem*> const itemlist = desktop->selection->itemList();
- for (std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();i++) {
+ for (std::vector<SPItem*>::const_iterator i = itemlist.begin(); i!= itemlist.end(); i++) {
/* last used styles for 3D box faces are stored separately */
- SPObject *obj = reinterpret_cast<SPObject *>(*i); // TODO unsafe until Selection is refactored.
+ SPObject *obj = reinterpret_cast<SPObject *>(*i);
Box3DSide *side = dynamic_cast<Box3DSide *>(obj);
if (side) {
const char * descr = box3d_side_axes_string(side);
@@ -235,8 +235,8 @@ sp_desktop_set_style(SPDesktop *desktop, SPCSSAttr *css, bool change, bool write
css_no_text = sp_css_attr_unset_text(css_no_text);
std::vector<SPItem*> const itemlist = desktop->selection->itemList();
- for (std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();i++) {
- SPItem *item = reinterpret_cast<SPItem *>(*i);
+ for (std::vector<SPItem*>::const_iterator i = itemlist.begin(); i!= itemlist.end(); i++) {
+ SPItem *item = *i;
// If not text, don't apply text attributes (can a group have text attributes? Yes! FIXME)
if (isTextualItem(item)) {
@@ -447,9 +447,9 @@ stroke_average_width (const std::vector<SPItem*> &objects)
gdouble avgwidth = 0.0;
bool notstroked = true;
int n_notstroked = 0;
- for (std::vector<SPItem*>::const_iterator i=objects.begin();i!=objects.end();i++) {
+ for (std::vector<SPItem*>::const_iterator i = objects.begin(); i != objects.end(); i++) {
SPObject *obj = reinterpret_cast<SPObject *>(*i);
- SPItem *item = dynamic_cast<SPItem *>(obj);
+ SPItem *item = *i;
if (!item) {
continue;
}
@@ -514,7 +514,7 @@ objects_query_fillstroke (const std::vector<SPItem*> &objects, SPStyle *style_re
prev[0] = prev[1] = prev[2] = 0.0;
bool same_color = true;
- for (std::vector<SPItem*>::const_iterator i=objects.begin();i!=objects.end();i++) {
+ for (std::vector<SPItem*>::const_iterator i = objects.begin(); i!= objects.end(); i++) {
SPObject *obj = reinterpret_cast<SPObject *>(*i);
if (!obj) {
continue;
@@ -698,7 +698,7 @@ objects_query_opacity (const std::vector<SPItem*> &objects, SPStyle *style_res)
guint opacity_items = 0;
- for (std::vector<SPItem*>::const_iterator i=objects.begin();i!=objects.end();i++) {
+ for (std::vector<SPItem*>::const_iterator i = objects.begin(); i != objects.end(); i++) {
SPObject *obj = reinterpret_cast<SPObject *>(*i);
if (!obj) {
continue;
@@ -754,7 +754,7 @@ objects_query_strokewidth (const std::vector<SPItem*> &objects, SPStyle *style_r
int n_stroked = 0;
- for (std::vector<SPItem*>::const_iterator i=objects.begin();i!=objects.end();i++) {
+ for (std::vector<SPItem*>::const_iterator i = objects.begin(); i != objects.end(); i++) {
SPObject *obj = reinterpret_cast<SPObject *>(*i);
if (!obj) {
continue;
@@ -828,7 +828,7 @@ objects_query_miterlimit (const std::vector<SPItem*> &objects, SPStyle *style_re
gdouble prev_ml = -1;
bool same_ml = true;
- for (std::vector<SPItem*>::const_iterator i=objects.begin();i!=objects.end();i++) {
+ for (std::vector<SPItem*>::const_iterator i = objects.begin(); i != objects.end(); i++) {
SPObject *obj = reinterpret_cast<SPObject *>(*i);
if (!dynamic_cast<SPItem *>(obj)) {
continue;
@@ -887,7 +887,7 @@ objects_query_strokecap (const std::vector<SPItem*> &objects, SPStyle *style_res
bool same_cap = true;
int n_stroked = 0;
- for (std::vector<SPItem*>::const_iterator i=objects.begin();i!=objects.end();i++) {
+ for (std::vector<SPItem*>::const_iterator i = objects.begin(); i != objects.end(); i++) {
SPObject *obj = reinterpret_cast<SPObject *>(*i);
if (!dynamic_cast<SPItem *>(obj)) {
continue;
@@ -941,7 +941,7 @@ objects_query_strokejoin (const std::vector<SPItem*> &objects, SPStyle *style_re
bool same_join = true;
int n_stroked = 0;
- for (std::vector<SPItem*>::const_iterator i=objects.begin();i!=objects.end();i++) {
+ for (std::vector<SPItem*>::const_iterator i = objects.begin(); i != objects.end(); i++) {
SPObject *obj = reinterpret_cast<SPObject *>(*i);
if (!dynamic_cast<SPItem *>(obj)) {
continue;
@@ -1004,7 +1004,7 @@ objects_query_fontnumbers (const std::vector<SPItem*> &objects, SPStyle *style_r
int texts = 0;
int no_size = 0;
- for (std::vector<SPItem*>::const_iterator i=objects.begin();i!=objects.end();i++) {
+ for (std::vector<SPItem*>::const_iterator i = objects.begin(); i != objects.end(); i++) {
SPObject *obj = reinterpret_cast<SPObject *>(*i);
if (!isTextualItem(obj)) {
@@ -1123,7 +1123,7 @@ objects_query_fontstyle (const std::vector<SPItem*> &objects, SPStyle *style_res
int texts = 0;
- for (std::vector<SPItem*>::const_iterator i=objects.begin();i!=objects.end();i++) {
+ for (std::vector<SPItem*>::const_iterator i = objects.begin(); i != objects.end(); i++) {
SPObject *obj = reinterpret_cast<SPObject *>(*i);
if (!isTextualItem(obj)) {
@@ -1192,7 +1192,7 @@ objects_query_baselines (const std::vector<SPItem*> &objects, SPStyle *style_res
int texts = 0;
- for (std::vector<SPItem*>::const_iterator i=objects.begin();i!=objects.end();i++) {
+ for (std::vector<SPItem*>::const_iterator i = objects.begin(); i != objects.end(); i++) {
SPObject *obj = reinterpret_cast<SPObject *>(*i);
if (!isTextualItem(obj)) {
@@ -1280,7 +1280,7 @@ objects_query_fontfamily (const std::vector<SPItem*> &objects, SPStyle *style_re
}
style_res->font_family.set = FALSE;
- for (std::vector<SPItem*>::const_iterator i=objects.begin();i!=objects.end();i++) {
+ for (std::vector<SPItem*>::const_iterator i = objects.begin(); i != objects.end(); i++) {
SPObject *obj = reinterpret_cast<SPObject *>(*i);
// std::cout << " " << reinterpret_cast<SPObject*>(i->data)->getId() << std::endl;
@@ -1336,7 +1336,7 @@ objects_query_fontspecification (const std::vector<SPItem*> &objects, SPStyle *s
}
style_res->font_specification.set = FALSE;
- for (std::vector<SPItem*>::const_iterator i=objects.begin();i!=objects.end();i++) {
+ for (std::vector<SPItem*>::const_iterator i = objects.begin(); i != objects.end(); i++) {
SPObject *obj = reinterpret_cast<SPObject *>(*i);
// std::cout << " " << reinterpret_cast<SPObject*>(i->data)->getId() << std::endl;
@@ -1394,7 +1394,7 @@ objects_query_blend (const std::vector<SPItem*> &objects, SPStyle *style_res)
bool same_blend = true;
guint items = 0;
- for (std::vector<SPItem*>::const_iterator i=objects.begin();i!=objects.end();i++) {
+ for (std::vector<SPItem*>::const_iterator i = objects.begin(); i != objects.end(); i++) {
SPObject *obj = reinterpret_cast<SPObject *>(*i);
if (!obj) {
continue;
@@ -1484,7 +1484,7 @@ objects_query_blur (const std::vector<SPItem*> &objects, SPStyle *style_res)
guint blur_items = 0;
guint items = 0;
- for (std::vector<SPItem*>::const_iterator i=objects.begin();i!=objects.end();i++) {
+ for (std::vector<SPItem*>::const_iterator i = objects.begin(); i != objects.end(); i++) {
SPObject *obj = reinterpret_cast<SPObject *>(*i);
if (!obj) {
continue;