summaryrefslogtreecommitdiffstats
path: root/src/style-internal.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-05-10 10:19:43 +0000
committertavmjong-free <tavmjong@free.fr>2014-05-10 10:19:43 +0000
commit9a1a8cfc1dd26f094a6c2dce291b50ba00fe2e5b (patch)
tree73013082beff03c323804c9376685bc27183ae4f /src/style-internal.cpp
parentDocumentation. Man pages udpate. (diff)
downloadinkscape-9a1a8cfc1dd26f094a6c2dce291b50ba00fe2e5b.tar.gz
inkscape-9a1a8cfc1dd26f094a6c2dce291b50ba00fe2e5b.zip
Style rewrite: 'text-decoration' requires access to style of ancestor element which set property.
(bzr r13348)
Diffstat (limited to 'src/style-internal.cpp')
-rw-r--r--src/style-internal.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/style-internal.cpp b/src/style-internal.cpp
index bfe708e7a..508fb677c 100644
--- a/src/style-internal.cpp
+++ b/src/style-internal.cpp
@@ -2440,6 +2440,11 @@ SPITextDecoration::read( gchar const *str ) {
style->text_decoration_style.set = true;
style->text_decoration_color.set = true;
}
+
+ // If we set text_decoration_line, then update style_td (for CSS2 text-decoration)
+ if( style->text_decoration_line.set == true ) {
+ style_td = style;
+ }
}
// Returns CSS2 'text-decoration' (using settings in SPTextDecorationLine)
@@ -2474,10 +2479,17 @@ SPITextDecoration::write( guint const flags, SPIBase const *const base) const {
return Glib::ustring("");
}
-// Done in SPITextDecorationLine
-// void
-// SPITextDecoration::cascade( const SPIBase* const parent ) {
-// }
+void
+SPITextDecoration::cascade( const SPIBase* const parent ) {
+ if( const SPITextDecoration* p = dynamic_cast<const SPITextDecoration*>(parent) ) {
+ if( style_td == NULL ) {
+ style_td = p->style_td;
+ }
+ } else {
+ std::cerr << "SPITextDecoration::cascade(): Incorrect parent type" << std::endl;
+ }
+
+}
// void
// SPITextDecoration::merge( const SPIBase* const parent ) {