Instance: use getInstance()
[nikiroo-utils.git] / src / be / nikiroo / fanfix / supported / BasicSupportPara.java
index 2f657237a1acbb742e72757272ec3dc258a770ba..58c363af59b77e1b4f4d1c323fefe2af350ad31b 100644 (file)
@@ -26,14 +26,10 @@ import be.nikiroo.utils.StringUtils;
  */
 public class BasicSupportPara {
        // quote chars
-       private static char openQuote = Instance.getTrans().getCharacter(
-                       StringId.OPEN_SINGLE_QUOTE);
-       private static char closeQuote = Instance.getTrans().getCharacter(
-                       StringId.CLOSE_SINGLE_QUOTE);
-       private static char openDoubleQuote = Instance.getTrans().getCharacter(
-                       StringId.OPEN_DOUBLE_QUOTE);
-       private static char closeDoubleQuote = Instance.getTrans().getCharacter(
-                       StringId.CLOSE_DOUBLE_QUOTE);
+       private static char openQuote = Instance.getInstance().getTrans().getCharacter(StringId.OPEN_SINGLE_QUOTE);
+       private static char closeQuote = Instance.getInstance().getTrans().getCharacter(StringId.CLOSE_SINGLE_QUOTE);
+       private static char openDoubleQuote = Instance.getInstance().getTrans().getCharacter(StringId.OPEN_DOUBLE_QUOTE);
+       private static char closeDoubleQuote = Instance.getInstance().getTrans().getCharacter(StringId.CLOSE_DOUBLE_QUOTE);
 
        // used by this class:
        BasicSupportHelper bsHelper;
@@ -51,7 +47,8 @@ public class BasicSupportPara {
         * @param support
         *            the linked {@link BasicSupport}
         * @param source
-        *            the source of the story
+        *            the source of the story (for image lookup in the same path if
+        *            the source is a file, can be NULL)
         * @param number
         *            the chapter number
         * @param name
@@ -76,9 +73,8 @@ public class BasicSupportPara {
                // "Chapter 5: - Fun!" after the ": " was automatically added)
                String chapterName = processPara(name, false)
                                .getContent().trim();
-               for (String lang : Instance.getConfig().getList(Config.CONF_CHAPTER)) {
-                       String chapterWord = Instance.getConfig().getStringX(
-                                       Config.CONF_CHAPTER, lang);
+               for (String lang : Instance.getInstance().getConfig().getList(Config.CONF_CHAPTER)) {
+                       String chapterWord = Instance.getInstance().getConfig().getStringX(Config.CONF_CHAPTER, lang);
                        if (chapterName.startsWith(chapterWord)) {
                                chapterName = chapterName.substring(chapterWord.length())
                                                .trim();
@@ -415,10 +411,11 @@ public class BasicSupportPara {
         * Convert the given content into {@link Paragraph}s.
         * 
         * @param support
-        *            the linked {@link BasicSupport} (can be NULL),
-        *            used to download optional image content in []
+        *            the linked {@link BasicSupport} (can be NULL), used to
+        *            download optional image content in []
         * @param source
-        *            the source URL of the story
+        *            the source URL of the story (for image lookup in the same path
+        *            if the source is a file, can be NULL)
         * @param content
         *            the textual content
         * @param html
@@ -507,10 +504,11 @@ public class BasicSupportPara {
         * Convert the given line into a single {@link Paragraph}.
         * 
         * @param support
-        *            the linked {@link BasicSupport} (can be NULL),
-        *            used to download optional image content in []
+        *            the linked {@link BasicSupport} (can be NULL), used to
+        *            download optional image content in []
         * @param source
-        *            the source URL of the story
+        *            the source URL of the story (for image lookup in the same path
+        *            if the source is a file, can be NULL)
         * @param line
         *            the textual content of the paragraph
         * @param html