diff options
| author | Martin Owens <doctormo@gmail.com> | 2018-11-13 00:25:05 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2018-11-13 00:25:05 +0000 |
| commit | db722f5b79ef1517f0b6e9a96968ad257dffc6f9 (patch) | |
| tree | f7992f8cc42739e3aef74233efaf840045c9cb87 /src/style.cpp | |
| parent | Support multiple style sheets or style elements in an svg document (diff) | |
| download | inkscape-db722f5b79ef1517f0b6e9a96968ad257dffc6f9.tar.gz inkscape-db722f5b79ef1517f0b6e9a96968ad257dffc6f9.zip | |
Add capability to get style rulesets as SPStyle objects
Diffstat (limited to 'src/style.cpp')
| -rw-r--r-- | src/style.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/style.cpp b/src/style.cpp index 529b9bb0a..09f7f763c 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -807,6 +807,17 @@ SPStyle::mergeString( gchar const *const p ) { _mergeString( p ); } +/** + * Append an existing css statement into this style, used in css editing + * always appends declarations as STYLE_SHEET properties. + */ +void +SPStyle::mergeStatement( CRStatement *statement ) { + CRDeclaration *decl_list = NULL; + cr_statement_ruleset_get_declarations (statement, &decl_list); + _mergeDeclList(decl_list, SP_STYLE_SRC_STYLE_SHEET); +} + // Mostly for unit testing bool SPStyle::operator==(const SPStyle& rhs) { |
