maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r519551 - in /maven/doxia/trunk/doxia-modules/doxia-module-rtf: ./ src/main/java/org/apache/maven/doxia/module/rtf/ src/test/java/org/apache/maven/doxia/module/rtf/ src/test/resources/
Date Sun, 18 Mar 2007 05:08:14 GMT
Author: jvanzyl
Date: Sat Mar 17 22:08:13 2007
New Revision: 519551

URL: http://svn.apache.org/viewvc?view=rev&rev=519551
Log:
decoupling module

Added:
    maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/test/resources/
    maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/test/resources/test.apt   (with props)
Modified:
    maven/doxia/trunk/doxia-modules/doxia-module-rtf/pom.xml
    maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java
    maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/test/java/org/apache/maven/doxia/module/rtf/RtfSinkTest.java

Modified: maven/doxia/trunk/doxia-modules/doxia-module-rtf/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-modules/doxia-module-rtf/pom.xml?view=diff&rev=519551&r1=519550&r2=519551
==============================================================================
--- maven/doxia/trunk/doxia-modules/doxia-module-rtf/pom.xml (original)
+++ maven/doxia/trunk/doxia-modules/doxia-module-rtf/pom.xml Sat Mar 17 22:08:13 2007
@@ -5,17 +5,13 @@
     <version>1.0-alpha-9-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
-  <groupId>org.apache.maven.doxia</groupId>
   <artifactId>doxia-module-rtf</artifactId>
-  <name>doxia-module-rtf</name>
-  <version>1.0-SNAPSHOT</version>
-  <url>http://maven.apache.org</url>
   <dependencies>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-module-apt</artifactId>
+      <version>${projectVersion}</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>

Modified: maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java?view=diff&rev=519551&r1=519550&r2=519551
==============================================================================
--- maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java
(original)
+++ maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java
Sat Mar 17 22:08:13 2007
@@ -19,9 +19,9 @@
  * under the License.
  */
 
-import org.apache.maven.doxia.module.apt.AptParser;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.doxia.sink.SinkAdapter;
+import org.apache.maven.doxia.parser.Parser;
 
 import java.awt.*;
 import java.io.BufferedOutputStream;
@@ -370,7 +370,7 @@
     public void title()
     {
         Paragraph paragraph = new Paragraph( STYLE_BOLD, fontSize + 6 );
-        paragraph.justification = AptParser.JUSTIFY_CENTER;
+        paragraph.justification = Parser.JUSTIFY_CENTER;
         beginParagraph( paragraph );
         emptyHeader = false;
     }
@@ -383,7 +383,7 @@
     public void author()
     {
         Paragraph paragraph = new Paragraph( STYLE_ROMAN, fontSize + 2 );
-        paragraph.justification = AptParser.JUSTIFY_CENTER;
+        paragraph.justification = Parser.JUSTIFY_CENTER;
         beginParagraph( paragraph );
         emptyHeader = false;
     }
@@ -396,7 +396,7 @@
     public void date()
     {
         Paragraph paragraph = new Paragraph( STYLE_ROMAN, fontSize );
-        paragraph.justification = AptParser.JUSTIFY_CENTER;
+        paragraph.justification = Parser.JUSTIFY_CENTER;
         beginParagraph( paragraph );
         emptyHeader = false;
     }
@@ -816,14 +816,14 @@
     {
         switch ( justification )
         {
-            case AptParser.JUSTIFY_LEFT:
+            case Parser.JUSTIFY_LEFT:
             default:
                 writer.println( "\\ql" );
                 break;
-            case AptParser.JUSTIFY_CENTER:
+            case Parser.JUSTIFY_CENTER:
                 writer.println( "\\qc" );
                 break;
-            case AptParser.JUSTIFY_RIGHT:
+            case Parser.JUSTIFY_RIGHT:
                 writer.println( "\\qr" );
                 break;
         }
@@ -872,7 +872,7 @@
     public void tableCaption()
     {
         Paragraph paragraph = new Paragraph();
-        paragraph.justification = AptParser.JUSTIFY_CENTER;
+        paragraph.justification = Parser.JUSTIFY_CENTER;
         paragraph.spaceBefore /= 2;
         beginParagraph( paragraph );
     }
@@ -973,7 +973,7 @@
         name = buf.toString();
 
         Paragraph paragraph = new Paragraph();
-        paragraph.justification = AptParser.JUSTIFY_CENTER;
+        paragraph.justification = Parser.JUSTIFY_CENTER;
         beginParagraph( paragraph );
 
         try
@@ -1179,7 +1179,7 @@
     public void figureCaption()
     {
         Paragraph paragraph = new Paragraph();
-        paragraph.justification = AptParser.JUSTIFY_CENTER;
+        paragraph.justification = Parser.JUSTIFY_CENTER;
         paragraph.spaceBefore /= 2;
         beginParagraph( paragraph );
     }
@@ -1531,7 +1531,7 @@
 
         int style = 0;
 
-        int justification = AptParser.JUSTIFY_LEFT;
+        int justification = Parser.JUSTIFY_LEFT;
 
         int leftIndent = indentation.get();
 
@@ -1568,13 +1568,13 @@
             }
             switch ( justification )
             {
-                case AptParser.JUSTIFY_LEFT:
+                case Parser.JUSTIFY_LEFT:
                 default:
                     break;
-                case AptParser.JUSTIFY_CENTER:
+                case Parser.JUSTIFY_CENTER:
                     writer.print( "\\qc" );
                     break;
-                case AptParser.JUSTIFY_RIGHT:
+                case Parser.JUSTIFY_RIGHT:
                     writer.print( "\\qr" );
                     break;
             }

Modified: maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/test/java/org/apache/maven/doxia/module/rtf/RtfSinkTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/test/java/org/apache/maven/doxia/module/rtf/RtfSinkTest.java?view=diff&rev=519551&r1=519550&r2=519551
==============================================================================
--- maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/test/java/org/apache/maven/doxia/module/rtf/RtfSinkTest.java
(original)
+++ maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/test/java/org/apache/maven/doxia/module/rtf/RtfSinkTest.java
Sat Mar 17 22:08:13 2007
@@ -19,12 +19,16 @@
  * under the License.
  */
 
-import org.apache.maven.doxia.module.rtf.RtfSink;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.doxia.sink.AbstractSinkTestCase;
+import org.apache.maven.doxia.parser.Parser;
+import org.apache.maven.doxia.module.apt.AptParser;
 
 import java.io.File;
 import java.io.FileOutputStream;
+import java.io.Reader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@@ -38,11 +42,26 @@
         return "rtf";
     }
 
+    protected Parser createParser()
+    {
+        return new AptParser();
+    }
+
     protected Sink createSink()
         throws Exception
     {
         File outputFile = new File( getBasedirFile(), "target/output/test.rtf" );
         outputFile.getParentFile().mkdirs();
         return new RtfSink( new FileOutputStream( outputFile ) );
+    }
+
+    protected Reader getTestReader()
+        throws Exception
+    {
+        InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(
"test.apt" );
+
+        InputStreamReader reader = new InputStreamReader( is );
+
+        return reader;
     }
 }

Added: maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/test/resources/test.apt
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/test/resources/test.apt?view=auto&rev=519551
==============================================================================
--- maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/test/resources/test.apt (added)
+++ maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/test/resources/test.apt Sat Mar 17
22:08:13 2007
@@ -0,0 +1,16 @@
+ -----
+ Maven: the cute and fluffy build tool.
+ -----
+ Jason van Zyl
+ -----
+
+Maven: the cute and fluffy build tool that's good for the whole family
+
+ Maven will make you laugh; Maven will make you jump for joy; Maven will
+ make you put that dirty little tool called Ant in the litter box with
+ the cat treats where it belongs!
+
+* Say Goodbye the build time stains!
+
+ Maven helps you get rid of those <hard to get rid of> build stains. Wash with Maven
+ and go!

Propchange: maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/test/resources/test.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/trunk/doxia-modules/doxia-module-rtf/src/test/resources/test.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"



Mime
View raw message