From 707514b99500f249388b2d901e0f7cd7bfcfaf2d Mon Sep 17 00:00:00 2001 From: gcampuzano14 Date: Sun, 4 Feb 2018 09:48:15 -0500 Subject: [PATCH 1/3] [master] Remove unused module trim-cpp --- inkscape-layers.cpp | 7 +++---- trim-cpp | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) delete mode 160000 trim-cpp diff --git a/inkscape-layers.cpp b/inkscape-layers.cpp index a6fc3a9..e815db0 100644 --- a/inkscape-layers.cpp +++ b/inkscape-layers.cpp @@ -14,7 +14,6 @@ #include #include -#include "trim-cpp/trim.hpp" #define NAME_MODE_DEFAULT 0 #define NAME_MODE_LABEL 1 @@ -264,7 +263,7 @@ isVisible ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; style = layer->get_attribute_value("style").raw(); - Trim::inPlace(style); + // Trim::inPlace(style); if ( (displayBegin = style.find("display")) == std::string::npos ) return true; if ( (valueBegin = style.find(':', displayBegin)) == std::string::npos ) return true; @@ -273,7 +272,7 @@ isVisible valueLength = valueEnd - valueBegin; value = style.substr(valueBegin, valueLength); - Trim::inPlace(value); + // Trim::inPlace(value); return value.compare("none") != 0; } @@ -290,7 +289,7 @@ makeVisible ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; style = layer->get_attribute_value("style").raw(); - Trim::inPlace(style); + // Trim::inPlace(style); if ( (displayBegin = style.find("display")) == std::string::npos ) return; if ( (valueBegin = style.find(':', displayBegin)) == std::string::npos ) return; diff --git a/trim-cpp b/trim-cpp deleted file mode 160000 index 6933938..0000000 --- a/trim-cpp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6933938dec3516a2a67d9899fd3e9124554178e5 From c4ffa339201ba8c6c5adf498a9c559115fcfb391 Mon Sep 17 00:00:00 2001 From: gcampuzano14 Date: Sun, 4 Feb 2018 17:18:28 -0500 Subject: [PATCH 2/3] [compilation] Remove trim-cpp/trim.hpp module from compilation script --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c6c160e..6d97101 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ all : inkscape-layers -inkscape-layers : inkscape-layers.cpp trim-cpp/trim.hpp +inkscape-layers : inkscape-layers.cpp g++ -std=c++11 $^ `pkg-config libxml++-2.6 --cflags --libs` -o $@ clean : From 0dc1ee96a97b400bafad46e7191691538435cb19 Mon Sep 17 00:00:00 2001 From: Jacobo Isaza Date: Wed, 14 Feb 2018 16:08:28 -0500 Subject: [PATCH 3/3] [hacks] SVG Filenames without filename prefix --- inkscape-layers.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/inkscape-layers.cpp b/inkscape-layers.cpp index e815db0..b20c1d8 100644 --- a/inkscape-layers.cpp +++ b/inkscape-layers.cpp @@ -211,7 +211,15 @@ Mode if ( outputDirectory.length() == 0 ) outputDirectory = inputFilename.substr(0, pathEnd); outputBaseName = inputFilename.substr(pathEnd, extensionStart - pathEnd); + + /* HACK :( */ + /* commented for filename without prefix layerFilenamePrefix = outputDirectory + outputBaseName + "-"; + */ + + layerFilenamePrefix = outputDirectory; + + /*KCAH :( */ if ( extensionStart == std::string::npos ) { layerFilenameSuffix = "";