From 1633a91c3a1fd6eb4d981d9117c7a4ba96d1f562 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 20 Apr 2019 00:16:59 +0200 Subject: Removes style on empty lines --- src/document.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/document.cpp') diff --git a/src/document.cpp b/src/document.cpp index 680e98f6a..96dce8d2c 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -450,6 +450,11 @@ SPDocument *SPDocument::createDoc(Inkscape::XML::Document *rdoc, sp_file_convert_font_name(document); } + /** Fix first line spacing in legacy documents (pre-1.0 files) **/ + if ( sp_version_inside_range( document->root->version.inkscape, 0, 1, 1, 0 ) ) { + sp_file_remove_style_on_empty_lines(document); + } + /** Fix dpi (pre-92 files). With GUI fixed in Inkscape::Application::fix_document. **/ if ( !(INKSCAPE.use_gui()) && sp_version_inside_range( document->root->version.inkscape, 0, 1, 0, 92 ) ) { sp_file_convert_dpi(document); -- cgit v1.2.3 From a545384a9246881ba14effeafef924ffc3eca27d Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 20 Apr 2019 01:19:45 +0200 Subject: Fix style and line detection --- src/document.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/document.cpp') diff --git a/src/document.cpp b/src/document.cpp index 96dce8d2c..f923a45d6 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -451,7 +451,7 @@ SPDocument *SPDocument::createDoc(Inkscape::XML::Document *rdoc, } /** Fix first line spacing in legacy documents (pre-1.0 files) **/ - if ( sp_version_inside_range( document->root->version.inkscape, 0, 1, 1, 0 ) ) { + if (sp_version_inside_range(document->root->version.inkscape, 0, 1, 1, 0)) { sp_file_remove_style_on_empty_lines(document); } -- cgit v1.2.3 From 1446f4eeb37a47231dd45db757454db045049ac6 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Wed, 24 Apr 2019 15:16:09 +0200 Subject: Add comment, rename function --- src/document.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/document.cpp') diff --git a/src/document.cpp b/src/document.cpp index f923a45d6..03b285710 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -452,7 +452,7 @@ SPDocument *SPDocument::createDoc(Inkscape::XML::Document *rdoc, /** Fix first line spacing in legacy documents (pre-1.0 files) **/ if (sp_version_inside_range(document->root->version.inkscape, 0, 1, 1, 0)) { - sp_file_remove_style_on_empty_lines(document); + sp_file_fix_empty_lines(document); } /** Fix dpi (pre-92 files). With GUI fixed in Inkscape::Application::fix_document. **/ -- cgit v1.2.3