summaryrefslogtreecommitdiffstats
path: root/src/widgets/dash-selector.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-12-26 18:49:12 +0000
committertavmjong-free <tavmjong@free.fr>2014-12-26 18:49:12 +0000
commit74f6d0cf39c974ca1980a7be7742f2154d2025f2 (patch)
treef98b503be33ccc32c1074c5c670a0cd9b5fb5332 /src/widgets/dash-selector.cpp
parentDocumentation. Fix for bug #1405653 (Outdated links in hacking doc). (diff)
parentSPStyle ref counting clean up. (diff)
downloadinkscape-74f6d0cf39c974ca1980a7be7742f2154d2025f2.tar.gz
inkscape-74f6d0cf39c974ca1980a7be7742f2154d2025f2.zip
Replace sp_style_xxx functions with SPStyle member functions.
Fix a bunch of memory leaks. One leak still remaining in Layout::appendText. (bzr r13824)
Diffstat (limited to 'src/widgets/dash-selector.cpp')
-rw-r--r--src/widgets/dash-selector.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/widgets/dash-selector.cpp b/src/widgets/dash-selector.cpp
index 479895022..9d591d33d 100644
--- a/src/widgets/dash-selector.cpp
+++ b/src/widgets/dash-selector.cpp
@@ -118,18 +118,18 @@ void SPDashSelector::init_dashes() {
int pos = 0;
if (!dash_prefs.empty()) {
- SPStyle *style = sp_style_new (NULL);
+ SPStyle style;
dashes = g_new (double *, dash_prefs.size() + 2); // +1 for custom slot, +1 for terminator slot
for (std::vector<Glib::ustring>::iterator i = dash_prefs.begin(); i != dash_prefs.end(); ++i) {
- sp_style_read_from_prefs(style, *i);
+ style.readFromPrefs( *i );
- if (!style->stroke_dasharray.values.empty()) {
- dashes[pos] = g_new (double, style->stroke_dasharray.values.size() + 1);
+ if (!style.stroke_dasharray.values.empty()) {
+ dashes[pos] = g_new (double, style.stroke_dasharray.values.size() + 1);
double *d = dashes[pos];
unsigned i = 0;
- for (; i < style->stroke_dasharray.values.size(); i++) {
- d[i] = style->stroke_dasharray.values[i];
+ for (; i < style.stroke_dasharray.values.size(); i++) {
+ d[i] = style.stroke_dasharray.values[i];
}
d[i] = -1;
} else {