Compare commits

...

34 commits

Author SHA1 Message Date
72f2892d30
chore: new version 2021-12-08 16:13:12 +01:00
0bb7490ac2
chore: new version 2021-12-08 16:08:47 +01:00
ff556c19dd
chore: removed one more dependency 2021-12-08 16:07:51 +01:00
a6e85d367a
chore: removed dependency 2021-12-08 15:42:08 +01:00
19b17c5b58
chore: improved build configuration 2021-12-08 14:51:58 +01:00
7d03b2a02d chore: improving build configuration 2021-12-08 13:52:09 +01:00
56a44ea1fd chore: renamed constant 2021-12-08 12:51:54 +01:00
f5bf88532d fix: replaced bad boolean conversion calls 2021-12-08 12:51:14 +01:00
1454d68b4a refactoring 1 2021-12-03 13:03:52 +01:00
f0c43c83e3 fix: eclipse config 2021-11-25 23:41:49 +01:00
8247b4f976
chore: removed unused files 2021-11-25 23:31:24 +01:00
9fae696122
chore: removed unused files 2021-11-25 23:28:57 +01:00
63de83dad1 chore: Gitlab build fix 2021-11-21 16:07:36 +01:00
a5a311136f
chore: push updates 2021-11-21 16:01:52 +01:00
4e1ca75a4a
Regression test added 2021-11-21 15:51:37 +01:00
2b1c69e85e
fix: add spb before list if spb located before first list item content 2021-11-21 15:48:57 +01:00
2ff537d384
fix: removed duplicate bullet list character 2021-11-21 15:48:03 +01:00
2324e6815b chore: push new version 2021-10-18 17:05:21 +02:00
639fea75e1 Log exception message if error happened in document processing 2021-10-18 17:00:24 +02:00
7cc2ba2d4d fix: use custom transliteration method to avoid dependency on new java 2021-10-18 17:00:20 +02:00
9a4f2eda97 feat: set modal results dialog in gui 2021-10-18 15:14:14 +02:00
c44b41ad8a chore: push new version 2021-10-15 20:32:05 +02:00
7be5e479dc fix: replaced models for lists 2021-10-15 20:20:24 +02:00
334c569332 fix: Add space before bullet list if set in settings 2021-10-15 20:17:46 +02:00
8b676491fe fix: imitate list numberings instead of using standard list styles 2021-10-15 19:55:07 +02:00
f88a4a17a4 Added vertical scrollbar to conversion results 2021-10-15 19:51:03 +02:00
c417b4fcd0 fix: removed Java11 features for compatibility 2021-09-17 20:57:34 +02:00
0f9bce9037 chore: push new version 2021-09-17 20:43:22 +02:00
1de23921d5 chore: Added test for hard page breaks inside lists 2021-09-17 20:37:07 +02:00
237416dc43 Fix: improved verbosity on image conversion errors 2021-09-17 20:30:32 +02:00
5566e5ff43 fix: Fixed pagination with paragraph break-before property located in list 2021-09-17 19:59:20 +02:00
80b7005066 Fix: improved verbosity on image conversion errors 2021-09-17 19:57:29 +02:00
8e81b3511c Push new version 2021-09-17 14:46:11 +02:00
401bfc67ec fix: png to jpg conversion 2021-09-16 22:31:30 +02:00
69 changed files with 598 additions and 630 deletions

View file

@ -1,4 +1,4 @@
image: gradle:alpine
image: gradle:jdk11-alpine
stages:
- build

View file

@ -2,22 +2,21 @@
<projectDescription>
<name>w2phtml</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<projects/>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments/>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments/>
</buildCommand>
</buildSpec>
<linkedResources/>
<filteredResources/>
</projectDescription>

View file

@ -16,40 +16,37 @@ sourceSets {
regressionTests {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + files('src/main/java')
java.srcDir file('src/r_tests/java')
runtimeClasspath += main.output + test.output + files('src/main/java')
srcDir file('src/r_tests/java')
}
}
}
sourceCompatibility = 1.8
configurations{
bundledLibs
regressionTestsCompile.extendsFrom mainCompile
regressionTestsRuntime.extendsFrom mainRuntime
regressionTestsRuntime.extendsFrom bundledLibs
regressionTestsRuntime.extendsFrom compileClasspath
regressionTestsImplementation.extendsFrom compileClasspath
}
dependencies{
regressionTestsImplementation group: 'commons-io', name: 'commons-io', version: '2.8.0'
regressionTestsImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.7.1'
regressionTestsImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.7.1'
regressionTestsRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
regressionTestsImplementation 'org.junit.jupiter:junit-jupiter-engine'
bundledLibs 'org.libreoffice:jurt:5.3.2'
bundledLibs 'org.libreoffice:juh:5.3.2'
bundledLibs 'org.libreoffice:ridl:5.3.2'
bundledLibs 'org.libreoffice:unoil:5.3.2'
bundledLibs 'org.json:json:20190722'
bundledLibs group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
bundledLibs group: 'ch.qos.logback', name: 'logback-core', version: '1.2.3'
bundledLibs group: 'com.miglayout', name: 'miglayout-swing', version: '5.2'
bundledLibs group: 'org.apache.jena', name: 'jena-core', version: '3.15.0'
bundledLibs group: 'org.apache.jena', name: 'jena-arq', version: '3.15.0'
bundledLibs group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
bundledLibs group: 'com.opencsv', name: 'opencsv', version: '5.1'
bundledLibs group: 'org.imgscalr', name: 'imgscalr-lib', version: '4.2'
bundledLibs group: 'org.apache.commons', name: 'commons-imaging', version: '1.0-alpha2'
compileClasspath 'org.libreoffice:jurt:5.3.2'
compileClasspath 'org.libreoffice:juh:5.3.2'
compileClasspath 'org.libreoffice:ridl:5.3.2'
compileClasspath 'org.libreoffice:unoil:5.3.2'
compileClasspath 'org.json:json:20190722'
compileClasspath group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compileClasspath group: 'ch.qos.logback', name: 'logback-core', version: '1.2.3'
compileClasspath group: 'com.miglayout', name: 'miglayout-swing', version: '5.2'
compileClasspath group: 'org.apache.jena', name: 'jena-core', version: '3.15.0'
compileClasspath group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
compileClasspath group: 'com.opencsv', name: 'opencsv', version: '5.1'
compileClasspath group: 'org.imgscalr', name: 'imgscalr-lib', version: '4.2'
compileClasspath group: 'org.apache.commons', name: 'commons-imaging', version: '1.0-alpha2'
configurations.compile.extendsFrom(configurations.bundledLibs)
}
jar {
archiveName 'w2phtml.jar'
@ -60,8 +57,9 @@ jar {
"Class-Path" : "jasp.jar parser.jar")
}
duplicatesStrategy = 'exclude'
from {
configurations.bundledLibs.collect { it.isDirectory() ? it : zipTree(it) }
configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
from('src/main/java') {
include '**/*.properties'
@ -85,9 +83,10 @@ task xhtml(type: Jar) {
"RegistrationClassName" : "pro.litvinovg.w2phtml.RegistrationHandler",
"Class-Path" : "jasp.jar parser.jar")
}
duplicatesStrategy = 'exclude'
baseName = "writer2phtml"
from {
configurations.bundledLibs.collect {
configurations.compileClasspath.collect {
exclude 'module-info.class'
exclude '.gradle'
exclude '**/LICENSE*'
@ -108,6 +107,7 @@ task xhtml(type: Jar) {
include 'etc/*'
include 'com/**'
include 'com/**/*'
exclude '**/DEPENDENCIES'
include 'w2phtml/pageSplitters/**/*.class'
include 'pro/litvinovg/**/*.class'
include 'pro/litvinovg/**/*.png'
@ -130,6 +130,7 @@ task xhtml(type: Jar) {
exclude '.gradle'
}
from ('src/main/java'){
exclude '**/DEPENDENCIES'
exclude '.gradle'
include 'w2phtml/xhtml/**/*.properties'
include 'w2phtml/xhtml/**/**/*.properties'
@ -161,10 +162,10 @@ task oxt(type: Zip){
from ('build/libs/writer2phtml.jar'){
include '*'
}
from 'idl/writer2paginatedhtml.rdb'
from 'releasenotes.txt'
include '*'
}
task regressionTests(type: Test) {
testClassesDirs = sourceSets.regressionTests.output.classesDirs
classpath = sourceSets.regressionTests.runtimeClasspath

View file

@ -1 +1 @@
version=0.9.23
version=0.9.29

View file

@ -1,52 +0,0 @@
#ifndef __org_openoffice_da_writer2xhtml_XBatchConverter_idl__
#define __org_openoffice_da_writer2xhtml_XBatchConverter_idl__
#include <com/sun/star/uno/XInterface.idl>
#include <com/sun/star/beans/PropertyValue.idl>
module org { module openoffice { module da { module writer2xhtml {
// This interface is an IDL version of the java interface (writer2latex.api.BatchHandler)
interface XBatchHandler : com::sun::star::uno::XInterface
{
// method org::openoffice::da::writer2xhtml::XBatchHandler::startConversion
void startConversion ();
// method org::openoffice::da::writer2xhtml::XBatchHandler::endConversion
void endConversion ();
// method org::openoffice::da::writer2xhtml::XBatchHandler::startDirectory
void startDirectory ( [in] string sName );
// method org::openoffice::da::writer2xhtml::XBatchHandler::endDirectory
void endDirectory ( [in] string sName, [in] boolean bSuccess );
// method org::openoffice::da::writer2xhtml::XBatchHandler::startFile
void startFile ( [in] string sName );
// method org::openoffice::da::writer2xhtml::XBatchHandler::endFile
void endFile ( [in] string sName, [in] boolean bSuccess );
// method org::openoffice::da::writer2xhtml::XBatchHandler::cancel
boolean cancel ();
};
// This interface is an IDL version of the java interface (writer2latex.api.BatchConverter)
interface XBatchConverter : com::sun::star::uno::XInterface
{
// method org::openoffice::da::writer2xhtml::XBatchConverter::convert
void convert ( [in] string sSourceURL,
[in] string sTargetURL,
[in] sequence< com::sun::star::beans::PropertyValue > lArguments,
[in] XBatchHandler handler );
} ;
}; }; }; };
#endif

View file

@ -1,12 +0,0 @@
#ifndef __org_libreoffice_example_writer2latex_idl__
#define __org_libreoffice_example_writer2latex_idl__
#include <org/libreoffice/example/XWriter2latex.idl>
module org { module libreoffice { module example {
service Writer2latex : org::libreoffice::example::XWriter2latex {
};
}; }; };
#endif

View file

@ -1,11 +0,0 @@
#ifndef __org_libreoffice_example_xwriter2latex_idl__
#define __org_libreoffice_example_xwriter2latex_idl__
module org { module libreoffice { module example {
interface XWriter2latex {
};
}; }; };
#endif

View file

@ -1,13 +0,0 @@
package org.libreoffice.example;
/**
* org/libreoffice/example/XWriter2latex.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from XWriter2latex.idl
* Friday, 7 July 2017 12:51:34 o'clock MSK
*/
public interface XWriter2latex extends XWriter2latexOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity
{
} // interface XWriter2latex

View file

@ -1,85 +0,0 @@
package org.libreoffice.example;
/**
* org/libreoffice/example/XWriter2latexHelper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from XWriter2latex.idl
* Friday, 7 July 2017 12:51:34 o'clock MSK
*/
abstract public class XWriter2latexHelper
{
private static String _id = "IDL:org/libreoffice/example/XWriter2latex:1.0";
public static void insert (org.omg.CORBA.Any a, org.libreoffice.example.XWriter2latex that)
{
org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
a.type (type ());
write (out, that);
a.read_value (out.create_input_stream (), type ());
}
public static org.libreoffice.example.XWriter2latex extract (org.omg.CORBA.Any a)
{
return read (a.create_input_stream ());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
__typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.libreoffice.example.XWriter2latexHelper.id (), "XWriter2latex");
}
return __typeCode;
}
public static String id ()
{
return _id;
}
public static org.libreoffice.example.XWriter2latex read (org.omg.CORBA.portable.InputStream istream)
{
return narrow (istream.read_Object (_XWriter2latexStub.class));
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, org.libreoffice.example.XWriter2latex value)
{
ostream.write_Object ((org.omg.CORBA.Object) value);
}
public static org.libreoffice.example.XWriter2latex narrow (org.omg.CORBA.Object obj)
{
if (obj == null)
return null;
else if (obj instanceof org.libreoffice.example.XWriter2latex)
return (org.libreoffice.example.XWriter2latex)obj;
else if (!obj._is_a (id ()))
throw new org.omg.CORBA.BAD_PARAM ();
else
{
org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
org.libreoffice.example._XWriter2latexStub stub = new org.libreoffice.example._XWriter2latexStub ();
stub._set_delegate(delegate);
return stub;
}
}
public static org.libreoffice.example.XWriter2latex unchecked_narrow (org.omg.CORBA.Object obj)
{
if (obj == null)
return null;
else if (obj instanceof org.libreoffice.example.XWriter2latex)
return (org.libreoffice.example.XWriter2latex)obj;
else
{
org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
org.libreoffice.example._XWriter2latexStub stub = new org.libreoffice.example._XWriter2latexStub ();
stub._set_delegate(delegate);
return stub;
}
}
}

View file

@ -1,38 +0,0 @@
package org.libreoffice.example;
/**
* org/libreoffice/example/XWriter2latexHolder.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from XWriter2latex.idl
* Friday, 7 July 2017 12:51:34 o'clock MSK
*/
public final class XWriter2latexHolder implements org.omg.CORBA.portable.Streamable
{
public org.libreoffice.example.XWriter2latex value = null;
public XWriter2latexHolder ()
{
}
public XWriter2latexHolder (org.libreoffice.example.XWriter2latex initialValue)
{
value = initialValue;
}
public void _read (org.omg.CORBA.portable.InputStream i)
{
value = org.libreoffice.example.XWriter2latexHelper.read (i);
}
public void _write (org.omg.CORBA.portable.OutputStream o)
{
org.libreoffice.example.XWriter2latexHelper.write (o, value);
}
public org.omg.CORBA.TypeCode _type ()
{
return org.libreoffice.example.XWriter2latexHelper.type ();
}
}

View file

@ -1,13 +0,0 @@
package org.libreoffice.example;
/**
* org/libreoffice/example/XWriter2latexOperations.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from XWriter2latex.idl
* Friday, 7 July 2017 12:51:34 o'clock MSK
*/
public interface XWriter2latexOperations
{
} // interface XWriter2latexOperations

View file

@ -1,50 +0,0 @@
package org.libreoffice.example;
/**
* org/libreoffice/example/_XWriter2latexStub.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from XWriter2latex.idl
* Friday, 7 July 2017 12:51:34 o'clock MSK
*/
public class _XWriter2latexStub extends org.omg.CORBA.portable.ObjectImpl implements org.libreoffice.example.XWriter2latex
{
// Type-specific CORBA::Object operations
private static String[] __ids = {
"IDL:org/libreoffice/example/XWriter2latex:1.0"};
public String[] _ids ()
{
return (String[])__ids.clone ();
}
private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
{
String str = s.readUTF ();
String[] args = null;
java.util.Properties props = null;
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props);
try {
org.omg.CORBA.Object obj = orb.string_to_object (str);
org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
_set_delegate (delegate);
} finally {
orb.destroy() ;
}
}
private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
{
String[] args = null;
java.util.Properties props = null;
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props);
try {
String str = orb.object_to_string (this);
s.writeUTF (str);
} finally {
orb.destroy() ;
}
}
} // class _XWriter2latexStub

Binary file not shown.

View file

@ -1,30 +0,0 @@
This directory contains idl specifications for the custom uno interfaces
defined by the Writer2LaTeX and Writer2xhtml extensions
To avoid dependencies on the OOo SDK in the build process, compiled versions
are included here.
If you need to rebuild it, the complete SDK is required. These are the steps:
To create the registry database for Writer2LaTeX:
idlc -I<path to SDK>\idl XW2LStarMathConverter.idl
regmerge writer2latex.rdb /UCR XW2LStarMathConverter.urd
To create the java interface
javamaker -BUCR -Torg.openoffice.da.writer2latex.XW2LStarMathConverter -nD <path to the OOo installation>\program\types.rdb writer2latex.rdb
and likewise for Writer2xhtml:
idlc -I<path to SDK>\idl XBatchConverter.idl
regmerge writer2xhtml.rdb /UCR XBatchConverter.urd
To create the java interfaces
javamaker -BUCR -Torg.openoffice.da.writer2xhtml.XBatchConverter -nD <path to the OOo installation>\program\types.rdb writer2xhtml.rdb
javamaker -BUCR -Torg.openoffice.da.writer2xhtml.XBatchHandler -nD <path to the OOo installation>\program\types.rdb writer2xhtml.rdb
If you need to use the interfaces from C++ you will also need to run cppumaker

View file

@ -1,22 +0,0 @@
#ifndef __org_openoffice_da_writer2latex_XW2LStarMathConverter_idl__
#define __org_openoffice_da_writer2latex_XW2LStarMathConverter_idl__
#include <com/sun/star/uno/XInterface.idl>
module org { module openoffice { module da { module writer2latex {
interface XW2LStarMathConverter : com::sun::star::uno::XInterface
{
// method org::openoffice::da::writer2latex::XW2LStarMathConverter::convertFormula
string convertFormula ( [in] string sStarMathFormula );
// method org::openoffice::da::writer2latex::XW2LStarMathConverter::getPreamble
string getPreamble ( );
};
}; }; }; };
#endif

View file

@ -1,52 +0,0 @@
#ifndef __org_openoffice_da_writer2xhtml_XBatchConverter_idl__
#define __org_openoffice_da_writer2xhtml_XBatchConverter_idl__
#include <com/sun/star/uno/XInterface.idl>
#include <com/sun/star/beans/PropertyValue.idl>
module org { module openoffice { module da { module writer2xhtml {
// This interface is an IDL version of the java interface (writer2latex.api.BatchHandler)
interface XBatchHandler : com::sun::star::uno::XInterface
{
// method org::openoffice::da::writer2xhtml::XBatchHandler::startConversion
void startConversion ();
// method org::openoffice::da::writer2xhtml::XBatchHandler::endConversion
void endConversion ();
// method org::openoffice::da::writer2xhtml::XBatchHandler::startDirectory
void startDirectory ( [in] string sName );
// method org::openoffice::da::writer2xhtml::XBatchHandler::endDirectory
void endDirectory ( [in] string sName, [in] boolean bSuccess );
// method org::openoffice::da::writer2xhtml::XBatchHandler::startFile
void startFile ( [in] string sName );
// method org::openoffice::da::writer2xhtml::XBatchHandler::endFile
void endFile ( [in] string sName, [in] boolean bSuccess );
// method org::openoffice::da::writer2xhtml::XBatchHandler::cancel
boolean cancel ();
};
// This interface is an IDL version of the java interface (writer2latex.api.BatchConverter)
interface XBatchConverter : com::sun::star::uno::XInterface
{
// method org::openoffice::da::writer2xhtml::XBatchConverter::convert
void convert ( [in] string sSourceURL,
[in] string sTargetURL,
[in] sequence< com::sun::star::beans::PropertyValue > lArguments,
[in] XBatchHandler handler );
} ;
}; }; }; };
#endif

View file

@ -25,7 +25,7 @@ import org.slf4j.LoggerFactory;
import com.sun.star.uno.XComponentContext;
import w2phtml.Application;
import w2phtml.rdf.Metadata;
import w2phtml.rdf.MetadataContainer;
public class ConversionExecutor {
@ -200,6 +200,7 @@ public class ConversionExecutor {
} catch (Exception e ) {
logger.error("Conversion failed.");
logger.error("Params: " + Arrays.toString(prepareArgs()));
logger.error(e.getLocalizedMessage());
}
}

View file

@ -263,14 +263,14 @@ public class EpubPanel extends JPanel {
JCheckBox addPagination(HashMap<String, Component> configuration, UIPreferences preferences) {
cb_Pagination_1 = new JCheckBox(Localizer.get(LABEL_PAGINATION));
cb_Pagination_1.setSelected(Boolean.getBoolean(preferences.get(PREF_PAGINATION)));
cb_Pagination_1.setSelected(Boolean.valueOf(preferences.get(PREF_PAGINATION)));
configuration.put(ARG_PAGINATION, cb_Pagination_1);
return cb_Pagination_1;
}
JCheckBox addConvertToPX(HashMap<String, Component> configuration, UIPreferences preferences) {
cb_convertToPx_1 = new JCheckBox(Localizer.get(LABEL_CONVERT_TO_PX));
cb_convertToPx_1.setSelected(Boolean.getBoolean(preferences.get(PREF_CONVERT_TO_PX)));
cb_convertToPx_1.setSelected(Boolean.valueOf(preferences.get(PREF_CONVERT_TO_PX)));
configuration.put(ARG_CONVERT_TO_PX, cb_convertToPx_1);
return cb_convertToPx_1;
}

View file

@ -303,14 +303,14 @@ public class HTMLPanel extends JPanel{
JCheckBox addPagination(HashMap<String, Component> configuration, UIPreferences preferences) {
cb_Pagination_1 = new JCheckBox(Localizer.get(LABEL_PAGINATION));
cb_Pagination_1.setSelected(Boolean.getBoolean(preferences.get(PREF_PAGINATION)));
cb_Pagination_1.setSelected(Boolean.valueOf(preferences.get(PREF_PAGINATION)));
configuration.put(ARG_PAGINATION, cb_Pagination_1);
return cb_Pagination_1;
}
JCheckBox addConvertToPX(HashMap<String, Component> configuration, UIPreferences preferences) {
cb_convertToPx_1 = new JCheckBox(Localizer.get(LABEL_CONVERT_TO_PX));
cb_convertToPx_1.setSelected(Boolean.getBoolean(preferences.get(PREF_CONVERT_TO_PX)));
cb_convertToPx_1.setSelected(Boolean.valueOf(preferences.get(PREF_CONVERT_TO_PX)));
configuration.put(ARG_CONVERT_TO_PX, cb_convertToPx_1);
return cb_convertToPx_1;
}

View file

@ -340,14 +340,14 @@ public class RDFPanel extends JPanel {
JCheckBox addPagination(HashMap<String, Component> configuration, UIPreferences preferences) {
cb_Pagination_1 = new JCheckBox(Localizer.get(LABEL_PAGINATION));
cb_Pagination_1.setSelected(Boolean.getBoolean(preferences.get(PREF_PAGINATION)));
cb_Pagination_1.setSelected(Boolean.valueOf(preferences.get(PREF_PAGINATION)));
configuration.put(ARG_PAGINATION, cb_Pagination_1);
return cb_Pagination_1;
}
JCheckBox addConvertToPX(HashMap<String, Component> configuration, UIPreferences preferences) {
cb_convertToPx_1 = new JCheckBox(Localizer.get(LABEL_CONVERT_TO_PX));
cb_convertToPx_1.setSelected(Boolean.getBoolean(preferences.get(PREF_CONVERT_TO_PX)));
cb_convertToPx_1.setSelected(Boolean.valueOf(preferences.get(PREF_CONVERT_TO_PX)));
configuration.put(ARG_CONVERT_TO_PX, cb_convertToPx_1);
return cb_convertToPx_1;
}

View file

@ -2,12 +2,10 @@ package pro.litvinovg.w2phtml.gui;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.util.Iterator;
import java.util.Map;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
@ -16,16 +14,20 @@ import pro.litvinovg.w2phtml.SingleLogArray;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JTextArea;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Color;
import javax.swing.LayoutStyle.ComponentPlacement;
import java.awt.Toolkit;
import javax.swing.ScrollPaneConstants;
public class ResultsDialog extends JDialog {
/**
*
*/
private static final long serialVersionUID = 1L;
private final JPanel contentPanel = new JPanel();
private JTextArea txt_conversionLogs;
private static ResultsDialog dialog = null;
@ -38,6 +40,8 @@ public class ResultsDialog extends JDialog {
dialog = new ResultsDialog();
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setVisible(true);
dialog.setModal(true);
dialog.setModalityType (ModalityType.APPLICATION_MODAL);
} catch (Exception e) {
e.printStackTrace();
}
@ -60,6 +64,7 @@ public class ResultsDialog extends JDialog {
SingleLogArray singleLogArray = SingleLogArray.create();
JScrollPane scrollPane = new JScrollPane();
scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
JTextArea txtrConversionCompleted = new JTextArea();
txtrConversionCompleted.setBackground(Color.WHITE);

View file

@ -55,11 +55,12 @@ import w2phtml.xhtml.XhtmlConfig;
*/
public class BinaryGraphicsDocument implements OutputFile {
private String sFileName;
private String sMimeType;
private boolean bAcceptedFormat;
private String sFileName;
private String sMimeType;
private String imageName = "";
private boolean bAcceptedFormat;
private boolean bRecycled = false;
// Data for an embedded image
@ -96,6 +97,7 @@ public class BinaryGraphicsDocument implements OutputFile {
this.sMimeType = bgd.getMIMEType();
this.blob = bgd.getData();
this.bAcceptedFormat = bgd.isAcceptedFormat();
this.imageName = bgd.getImageName();
this.bRecycled = true;
}
@ -112,7 +114,7 @@ public class BinaryGraphicsDocument implements OutputFile {
this.horizontalPPI = widthDPI;
}
} catch (ImageReadException | IOException e) {
logger.error("Image " + sFileName + "error reading image info.");
logger.error("Image " + getImageName() + " error reading image info.");
e.printStackTrace();
}
@ -232,31 +234,43 @@ public class BinaryGraphicsDocument implements OutputFile {
return;
}
ByteArrayInputStream bis = new ByteArrayInputStream(blob);
try {
BufferedImage image = ImageIO.read(bis);
if (image == null) {
logger.error("Image " + sFileName + " couldn't be processed as it is damaged or has unknown format.");
logger.error("Image " + getImageName() + " couldn't be processed as it is damaged or has unknown format.");
return;
}
int height = image.getHeight();
int width = image.getWidth();
int leftOffset = offsets[3];
int topOffset = offsets[0];
int newWidth = width - offsets[3] - offsets[1];
int newHeight = height - offsets[0] - offsets[2];
BufferedImage croppedImage = image.getSubimage(leftOffset, topOffset, newWidth , newHeight );
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int croppedWidth = width - offsets[3] - offsets[1];
int croppedHeight = height - offsets[0] - offsets[2];
if ( croppedHeight <= 0) {
throw new IOException("Cropped image height < 0");
}
if ( croppedWidth <= 0 ) {
throw new IOException("Cropped image width < 0");
}
BufferedImage croppedImage = new BufferedImage(croppedWidth, croppedHeight, BufferedImage.TYPE_3BYTE_BGR);
int px[] = new int[croppedWidth * croppedHeight];
image.getRGB(leftOffset, topOffset, croppedWidth, croppedHeight, px, 0, croppedWidth);
croppedImage.setRGB(0, 0, croppedWidth, croppedHeight, px, 0, croppedWidth);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ImageIO.write(croppedImage, "JPG", baos);
sMimeType = MIMETypes.JPEG;
this.blob = baos.toByteArray();
if (blob.length == 0) {
throw new IOException();
}
this.cropped = true;
updateFileName(offsets);
} catch (IOException e) {
logger.error("Image " + sFileName + " " + e.getLocalizedMessage());
logger.error("Error. Image " + getImageName() + " " + e.getLocalizedMessage());
e.printStackTrace();
} catch (RasterFormatException e ) {
logger.error("Image " + sFileName + " " + e.getLocalizedMessage());
logger.error("Error. Image " + getImageName() + " " + e.getLocalizedMessage());
e.printStackTrace();
}
}
@ -278,28 +292,38 @@ public class BinaryGraphicsDocument implements OutputFile {
try {
BufferedImage image = ImageIO.read(bis);
if (image == null) {
logger.error("Image " + sFileName + " couldn't be processed as it is damaged or has unknown format.");
logger.error("Image " + getImageName() + " couldn't be processed as it is damaged or has unknown format.");
return;
}
int width = image.getWidth();
if (width > 0) {
Integer newWidth = (int) ( width/divider);
BufferedImage resizedImage = Scalr.resize(image, newWidth);
BufferedImage jpgImage = getJPGImage(resizedImage);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ImageIO.write(resizedImage, "JPG", baos);
ImageIO.write(jpgImage, "JPG", baos);
this.blob = baos.toByteArray();
extractPPI();
//logger.error(sFileName + " Vertical PPI " + this.verticalPPI);
//logger.error(sFileName + " Horizontal PPI " + this.horizontalPPI);
} else {
logger.error("Image " + sFileName + " width = 0");
logger.error("Error. Image " + getImageName() + " width = 0");
}
} catch (IOException e) {
logger.error("Image " + sFileName + " " + e.getLocalizedMessage());
logger.error("Error. Image " + getImageName() + " " + e.getLocalizedMessage());
e.printStackTrace();
}
}
private BufferedImage getJPGImage(BufferedImage resizedImage) {
if (resizedImage.getType() == BufferedImage.TYPE_3BYTE_BGR){
return resizedImage;
}
BufferedImage jpgImage = new BufferedImage(resizedImage.getWidth(), resizedImage.getHeight(), BufferedImage.TYPE_3BYTE_BGR);
int px[] = new int[resizedImage.getWidth() * resizedImage.getHeight()];
resizedImage.getRGB(0, 0, resizedImage.getWidth(), resizedImage.getHeight(), px, 0, resizedImage.getWidth());
jpgImage.setRGB(0, 0, resizedImage.getWidth(), resizedImage.getHeight(), px, 0, resizedImage.getWidth());
return jpgImage;
}
private boolean isNotCropped(int[] offsets) {
return offsets[0] == 0 && offsets[1] == 0 && offsets[2] == 0 && offsets[3] == 0;
}
@ -346,6 +370,16 @@ public class BinaryGraphicsDocument implements OutputFile {
return offsets;
}
public void setImageName(String imageName) {
this.imageName = imageName;
}
public String getImageName() {
if (imageName == null || imageName.isEmpty()) {
return sFileName;
}
return imageName;
}
/** Does this document contain formulas?
*
* @return false - a graphics file does not contain formulas

View file

@ -195,6 +195,7 @@ public final class ImageConverter {
private BinaryGraphicsDocument getImage(Element node, String sName) {
assert(XMLString.DRAW_IMAGE.equals(node.getTagName()));
String imageName = getImageName(node);
// Image data
String sExt = null;
String sMIME = null;
@ -234,8 +235,8 @@ public final class ImageConverter {
// This is a linked image
// TODO: Add option to download image from the URL?
String sFileName = ofr.fixRelativeLink(sHref);
BinaryGraphicsDocument bgd
= new BinaryGraphicsDocument(sFileName,null);
BinaryGraphicsDocument bgd = new BinaryGraphicsDocument(sFileName,null);
bgd.setImageName(imageName);
return bgd;
}
}
@ -281,8 +282,8 @@ public final class ImageConverter {
int[] offlen = new int[2];
if (SVMReader.readSVM(blob,offlen)) {
String sFileName = sName+MIMETypes.EPS_EXT;
BinaryGraphicsDocument bgd
= new BinaryGraphicsDocument(sFileName, MIMETypes.EPS);
BinaryGraphicsDocument bgd = new BinaryGraphicsDocument(sFileName, MIMETypes.EPS);
bgd.setImageName(imageName);
bgd.setData(blob,offlen[0],offlen[1],true);
return bgd;
}
@ -319,6 +320,7 @@ public final class ImageConverter {
if (isAcceptedFormat(sMIME) || bAcceptOtherFormats) {
String sFileName = sName+sExt;
BinaryGraphicsDocument bgd = new BinaryGraphicsDocument(sFileName,sMIME);
bgd.setImageName(imageName);
bgd.setData(blob,isAcceptedFormat(sMIME));
if (sId!=null) {
recycledImages.put(sId, new BinaryGraphicsDocument(bgd));
@ -330,13 +332,23 @@ public final class ImageConverter {
}
}
private Element getAlternativeImage(Element node) {
Node sibling = node.getNextSibling();
if (sibling!=null && Misc.isElement(sibling, XMLString.DRAW_IMAGE)) {
return (Element) sibling;
private String getImageName(Element node) {
Node parent = node.getParentNode();
if (parent == null || parent.getNodeType() != Node.ELEMENT_NODE || parent.getNodeName() != XMLString.DRAW_FRAME) {
return null;
}
return null;
}
Element frame = (Element) parent;
String name = frame.getAttribute(XMLString.DRAW_NAME);
return name;
}
private Element getAlternativeImage(Element node) {
Node sibling = node.getNextSibling();
if (sibling != null && Misc.isElement(sibling, XMLString.DRAW_IMAGE)) {
return (Element) sibling;
}
return null;
}
// Create a fingerprint of a blob. The fingerprint concatenates the MD5 hash with the first 10 bytes of the blob.
private String createId(byte[] blob) {

View file

@ -111,13 +111,13 @@ public class ListCounter {
}
public String getLabelAndSuffix() {
String sLabel="";
if (style != null && style.isNumber(nLevel)) {
String sLabel="";
if (sNumFormat[nLevel]==null) return "";
int nLevels = Misc.getPosInteger(style.getLevelProperty(nLevel,
XMLString.TEXT_DISPLAY_LEVELS),1);
String sSuffix = style.getLevelProperty(nLevel,XMLString.STYLE_NUM_SUFFIX);
String sSpace = "nothing".equals(style.getLevelStyleProperty(nLevel, XMLString.TEXT_LABEL_FOLLOWED_BY)) ? "" : " ";
String sSuffix = getSuffix();
String sSpace = getSpace();
for (int j=nLevel-nLevels+1; j<nLevel; j++) {
sLabel+=formatNumber(nCounter[j],sNumFormat[j],true)+".";
}
@ -125,15 +125,23 @@ public class ListCounter {
sLabel+=formatNumber(nCounter[nLevel],sNumFormat[nLevel],true);
if (sSuffix!=null) { sLabel+=sSuffix; }
if (sLabel.length()>0 && sSpace!=null) { sLabel+=sSpace; }
return sLabel;
}
else if (style != null && style.isBullet(nLevel)) {
return style.getLevelProperty(nLevel,XMLString.TEXT_BULLET_CHAR);
sLabel = style.getLevelProperty(nLevel,XMLString.TEXT_BULLET_CHAR);
String sSpace = getSpace();
if (sLabel.length()>0 && sSpace!=null) { sLabel+=sSpace; }
}
else {
return "";
}
return sLabel;
}
private String getSpace() {
return "nothing".equals(style.getLevelStyleProperty(nLevel, XMLString.TEXT_LABEL_FOLLOWED_BY)) ? "" : " ";
}
private String getSuffix() {
return style.getLevelProperty(nLevel,XMLString.STYLE_NUM_SUFFIX);
}
// Utility method to generate number
private String formatNumber(int number,String sStyle,boolean bLetterSync) {

View file

@ -0,0 +1,73 @@
package w2phtml.pageSplitters;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import pro.litvinovg.w2phtml.gui.ConversionExecutor;
import pro.litvinovg.xml.Debug;
import w2phtml.office.OfficeReader;
import w2phtml.office.StyleWithProperties;
import w2phtml.util.Misc;
import static w2phtml.office.XMLString.TEXT_LIST_ITEM;
import static w2phtml.office.XMLString.TEXT_SOFT_PAGE_BREAK;
import static w2phtml.office.XMLString.TEXT_STYLE_NAME;
import java.util.Iterator;
import static w2phtml.office.XMLString.TEXT_P;
import static w2phtml.office.XMLString.TEXT_H;
import static w2phtml.office.XMLString.FO_BREAK_BEFORE;
public class ListBreaksFix {
private static final Logger logger = LoggerFactory.getLogger(ListBreaksFix.class);
private OfficeReader ofr;
public ListBreaksFix(OfficeReader ofr) {
this.ofr = ofr;
}
// Hack to fix hard breaks splitting in lists
public void addSPBsBeforeBreaksInLists(Node onode) {
try {
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = builderFactory.newDocumentBuilder();
Document document = onode.getOwnerDocument();
XPath xPath = XPathFactory.newInstance().newXPath();
String expression = "//*[starts-with(local-name(),'list-item')]//*[starts-with(local-name(),'p') ]";
NodeList nodeList = (NodeList) xPath.compile(expression).evaluate(document, XPathConstants.NODESET);
for (int i = 0; i < nodeList.getLength(); i++) {
Node paragraph = nodeList.item(i);
if (hasBreakBefore(paragraph)) {
Node spb = document.createElement(TEXT_SOFT_PAGE_BREAK);
paragraph.getParentNode().insertBefore(spb, paragraph);
}
}
} catch (XPathExpressionException e) {
logger.error("Error fixing hard breaks in lists" + e.getLocalizedMessage());
e.printStackTrace();
} catch (ParserConfigurationException e) {
logger.error("Error fixing hard breaks in lists" + e.getLocalizedMessage());
e.printStackTrace();
}
}
private boolean hasBreakBefore(Node node) {
StyleWithProperties style = ofr.getParStyle(Misc.getAttribute(node,TEXT_STYLE_NAME));
if (style != null && "page".equals(style.getProperty(FO_BREAK_BEFORE))) {
return true;
}
return false;
}
}

View file

@ -6,13 +6,11 @@ import static w2phtml.office.XMLString.TEXT_LIST_ITEM;
import static w2phtml.office.XMLString.TEXT_LIST;
import static w2phtml.office.XMLString.TEXT_SOFT_PAGE_BREAK;
import org.apache.commons.lang3.StringUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import pro.litvinovg.xml.Debug;
import w2phtml.office.OfficeReader;
public class ListSplitter extends BasicSplitter implements ISplitter {
@ -60,9 +58,14 @@ public class ListSplitter extends BasicSplitter implements ISplitter {
} else {
list.removeChild(child);
}
} else {
//Debug.printNode(child);
//Found SPB at start of the list
//Add SPB before the list
if (isRootElement(list)) {
parent.insertBefore(softPageBreak, list);
}
}
// Debug.printNode(child);
break;
} else {
// Not with SPB yet, move node, set dataMoved=true
@ -96,7 +99,7 @@ public class ListSplitter extends BasicSplitter implements ISplitter {
while (freeNodes.getLength() > 0) {
Node freeNode = freeNodes.item(i);
String freeNodeName = freeNode.getNodeName();
if (StringUtils.equals(TEXT_LIST, freeNodeName)) {
if (TEXT_LIST.equals(freeNodeName)) {
break;
}
parent.insertBefore(freeNode, list);

View file

@ -37,9 +37,9 @@ public class DocumentPart {
private String parentPath;
private String name = null;
private String order = null;
private Metadata metadata = null;
private MetadataContainer metadata = null;
public DocumentPart(XhtmlDocument document,Metadata metadata) {
public DocumentPart(XhtmlDocument document,MetadataContainer metadata) {
this.excerptDoc = document;
this.metadata = metadata;
extractPath();
@ -50,7 +50,7 @@ public class DocumentPart {
extractAnnotationMetadata();
}
public DocumentPart(String path, Metadata metadata) {
public DocumentPart(String path, MetadataContainer metadata) {
this.path = path;
this.metadata = metadata;
this.name = "";

View file

@ -19,28 +19,28 @@ import org.slf4j.LoggerFactory;
import com.opencsv.CSVReaderHeaderAware;
import com.opencsv.exceptions.CsvValidationException;
public class Metadata {
public class MetadataContainer {
private static final String SUBTITLE = "subtitle";
private static final String FILENAME = "Filename";
private static final String SECTION = "Section";
private static final Logger logger = LoggerFactory.getLogger(Metadata.class);
private static final Logger logger = LoggerFactory.getLogger(MetadataContainer.class);
private HashMap<String, ArrayList<Map<String, String>>> sectionsMetadata;
public Metadata() {
public MetadataContainer() {
sectionsMetadata = new HashMap<String, ArrayList<Map<String, String>>>();
}
public void read(String metadataFilePath) {
if (metadataFilePath == null) {
public void read(String filePath) {
if (filePath == null) {
return;
}
File file = new File(metadataFilePath);
File file = new File(filePath);
if (!file.exists() || !file.canRead()) {
return;
}
readCSVFile(metadataFilePath);
readCSVFile(filePath);
}
private void readCSVFile(String filePath) {

View file

@ -20,6 +20,7 @@ import org.apache.jena.rdf.model.Resource;
import org.apache.jena.vocabulary.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static w2phtml.util.Transliteration.*;
import w2phtml.xhtml.XhtmlConfig;
import w2phtml.xhtml.XhtmlDocument;
@ -27,36 +28,32 @@ import w2phtml.xhtml.XhtmlDocument;
import org.apache.jena.rdf.model.Property;
public class DocumentStructure {
public class RDFDocument {
private static final String FORMAT_RDF = "RDF/XML-ABBREV";
private static final String AFFILIATED_ORGANIZATION_POSTAL_CODE = "affiliated organization postal code";
private static final String AFFILIATED_ORGANIZATION_ADDRESS = "affiliated organization address";
private static final String AFFILIATED_ORGANIZATION_OFFICIAL_NAME = "affiliated organization official name";
private static final String AFFILIATED_ORGANIZATION_NAME = "affiliated organization name";
private static final String AUTHOR_INITIALS = "author initials";
private static final String AUTHOR_EMAIL = "author email";
private static final String AUTHOR_FAMILY = "author family";
private static final Logger logger = LoggerFactory.getLogger(DocumentStructure.class);
private static final Logger logger = LoggerFactory.getLogger(RDFDocument.class);
private static final String AUTHOR_GIVEN_NAME = "author given name";
private static final String MODIFICATION_TIME = "modificationTime";
private static final String HTML_EXCERPT_PROPERTY = "htmlExcerpt";
private static final String TOCITEM = "TOCItem";
private static final String TOC_ITEM = "TOCItem";
private static final String TS = "https://litvinovg.pro/text_structures#";
private static final String PARSERNAME = "w2phtml";
private static final String POINTS_TO = TS + "pointsTo";
private static final String ITEM_NUMBER = TS + "itemNumber";
private static final String HAS_TOC_ITEM = TS + "hasTOCItem";
private static final String HAS_TEXT = TS + "hasText";
//private static final String PARSERNAME = "w2phtml";
private static final String TEXT_EXCERPT = "textExcerpt";
private static final String TOC_LEVEL = "TOCLevel";
private static final String TABLE_OF_CONTENTS = "TOC";
private static final String PARTICIPANT = "publicationParticipant";
private static final String ORGANIZATION = "organization";
private static final String PUBLICATION = "publication";
private static final String BOOK = "book";
private static final String JOURNAL = "journal";
@ -81,10 +78,10 @@ public class DocumentStructure {
private HashMap<String, Resource> tocLevels;
private HashMap<String, DocumentPart> inputParts;
private Metadata metadata;
private MetadataContainer metadata;
private Date currentTime;
public DocumentStructure(Vector<XhtmlDocument> files,String fileName, XhtmlConfig config,Metadata metadata) {
public RDFDocument(Vector<XhtmlDocument> files,String fileName, XhtmlConfig config, MetadataContainer metadata) {
this.tocLevels = new HashMap<String, Resource>();
this.inputParts = new HashMap<String, DocumentPart>();
this.m = ModelFactory.createOntologyModel();
@ -94,11 +91,10 @@ public class DocumentStructure {
this.tocClass = textOntology.createClass(TS + TABLE_OF_CONTENTS);
this.organizationClass = textOntology.createClass(TS + ORGANIZATION);
this.participantClass = textOntology.createClass(TS + PARTICIPANT);
this.itemClass = textOntology.createClass(TS + TOCITEM);
this.docID = fileName;
this.itemClass = textOntology.createClass(TS + TOC_ITEM);
formatDocID(fileName);
this.currentTime = Calendar.getInstance().getTime();
String publicationType = config.getRDFType();
setPublicationType(publicationType);
setPublicationType(config.getRDFType());
this.documentClass = textOntology.createClass(TS + documentType);
this.excerptClass = textOntology.createClass(TS + excerptType);
for(int i = 0 ; i< files.size();i++) {
@ -108,6 +104,12 @@ public class DocumentStructure {
addPart(part);
}
addEmptyParts();
createElements();
createTOCItems();
}
public void printModel(OutputStream os) {
m.write(os,FORMAT_RDF);
}
private void setPublicationType(String publicationType) {
@ -155,37 +157,13 @@ public class DocumentStructure {
}
return emptyPath.toString();
}
public void printModel(String fileName) {
File outFile = new File(fileName + ".rdf");
FileWriter fw = null;
try {
outFile.createNewFile();
fw = new FileWriter(outFile);
m.write(fw,"RDF/XML-ABBREV");
} catch (IOException e) {
System.out.println("File couldn't be created");
e.printStackTrace();
} finally {
try {
fw.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
public void printModel(OutputStream os) {
m.write(os,"RDF/XML-ABBREV");
}
private void addPart(DocumentPart docExcerpt) {
inputParts.put(docExcerpt.getPath(), docExcerpt);
}
private Resource createExcerpt(DocumentPart docExcerpt) {
String excerptName = TS + excerptType + "/" + PARSERNAME + "_" + docID + docExcerpt.getSafePath();
String excerptName = TS + excerptType + "/" + docID + docExcerpt.getSafePath();
Resource excerpt = m.createIndividual(excerptName, excerptClass);
addModificationTime(excerpt);
if (!docExcerpt.getBody().isEmpty()) {
@ -196,7 +174,7 @@ public class DocumentStructure {
}
private void createTOCLevel(DocumentPart docPart) {
String levelName = TS + TOC_LEVEL + "/" + PARSERNAME + "_" + docID + docPart.getSafePath();
String levelName = TS + TOC_LEVEL + "/" + docID + docPart.getSafePath();
Resource level = m.createIndividual(levelName,tocLevelClass);
level.addProperty( RDFS.label, docPart.getName());
tocLevels.put(docPart.getPath(), level);
@ -204,13 +182,13 @@ public class DocumentStructure {
}
private void createDocument(DocumentPart docPart) {
String documentURI = TS + documentType + "/" + PARSERNAME + "_" + docID ;
String documentURI = TS + documentType + "/" + docID ;
Resource mainResource = m.createResource(documentURI, documentClass);
mainResource.addProperty( RDFS.label, docPart.getName());
addModificationTime(mainResource);
String tocURI = TS + TABLE_OF_CONTENTS + "/" + PARSERNAME + "_" + docID ;
String tocURI = TS + TABLE_OF_CONTENTS + "/" + docID ;
Resource toc = m.createResource(tocURI, tocClass);
toc.addProperty( RDFS.label, docPart.getName());
@ -244,7 +222,7 @@ public class DocumentStructure {
+ postfix + " found. Author givenName field is " + givenNameKey );
System.exit(1);
}
String participantURI = TS + PARTICIPANT + "/" + PARSERNAME + "_" + docID + order + "author" + postfix;
String participantURI = TS + PARTICIPANT + "/" + docID + order + "author" + postfix;
Resource participant = m.createResource(participantURI, participantClass);
Property hasAuthor = m.createProperty(TS + "hasAuthor");
excerpt.addProperty(hasAuthor, participant);
@ -273,20 +251,20 @@ public class DocumentStructure {
Property initialsProperty = m.createProperty(TS + "participantInitials");
participant.addProperty( initialsProperty, authorInitials.trim());
}
attachOrganization(participant, map, order, postfix);
addOrganization(participant, map, order, postfix);
}
}
}
}
private void attachOrganization(Resource participant, Map<String, String> map, String order, String postfix) {
private void addOrganization(Resource participant, Map<String, String> map, String order, String postfix) {
String orgName = map.get(AFFILIATED_ORGANIZATION_NAME + postfix);
if (orgName == null) {
System.out.println(orgName + " not found");
logger.warn("No " + AFFILIATED_ORGANIZATION_NAME + postfix + " found.");
return;
}
String organizationUri = TS + ORGANIZATION + "/" + PARSERNAME + "_" + docID + order + "author" + postfix;
String organizationUri = TS + ORGANIZATION + "/" + docID + order + "author" + postfix;
Resource organization = m.createResource(organizationUri, organizationClass);
Property affiliatedWith = m.createProperty(TS + "affiliatedWith");
participant.addProperty(affiliatedWith, organization);
@ -402,19 +380,18 @@ public class DocumentStructure {
return true;
}
private void createTOCItem(DocumentPart docPart) {
String tocItemName = TS + TOCITEM + "/" + PARSERNAME + "_" + docID + docPart.getSafePath();
Resource tocItem = m.createIndividual(tocItemName,itemClass);
String tocItemUri = TS + TOC_ITEM + "/" + docID + docPart.getSafePath();
Resource tocItem = m.createIndividual(tocItemUri,itemClass);
tocItem.addProperty( RDFS.label, docPart.getName());
Property pointsTo = m.createProperty(TS + "pointsTo");
Property itemNumber = m.createProperty(TS + "itemNumber");
Property hasTOCItem = m.createProperty(TS + "hasTOCItem");
Property pointsTo = m.createProperty(POINTS_TO);
Property itemNumber = m.createProperty(ITEM_NUMBER);
Property hasTOCItem = m.createProperty(HAS_TOC_ITEM);
tocItem.addLiteral(itemNumber, docPart.getNumber());
m.add(tocItem, pointsTo, tocLevels.get(docPart.getPath()));
if (!docPart.getPath().isEmpty()) {
Resource parent = tocLevels.get(docPart.getParentPath());
m.add(parent, hasTOCItem, tocItem);
}
}
private void attachExcerpt(DocumentPart docPart, Resource element) {
@ -426,7 +403,7 @@ public class DocumentStructure {
}
Resource excerpt = createExcerpt(docPart);
excerpt.addProperty( RDFS.label, docPart.getName());
Property hasText = m.createProperty(TS + "hasText");
Property hasText = m.createProperty(HAS_TEXT);
element.addProperty(hasText, excerpt);
if (!docPart.isMasterPart()) {
addMetadataProperties(excerpt, docPart);
@ -435,11 +412,6 @@ public class DocumentStructure {
}
}
public void createTree() {
createElements();
createTOCItems();
}
private void createTOCItems() {
Set<String> paths = inputParts.keySet();
for (String path : paths) {
@ -461,5 +433,11 @@ public class DocumentStructure {
}
}
}
private void formatDocID(String fileName) {
String identifier = fileName.replaceAll("\\s+", "_");
identifier = transliterateToEn(identifier);
identifier = identifier.replaceAll("[^a-zA-Z0-9_.-]", "");
this.docID = identifier;
}
}

View file

@ -17,17 +17,15 @@ public class RDFDocumentResult implements OutputFile {
private ConverterResult xhtmlResult;
private String sFileName;
private XhtmlConfig config;
private DocumentStructure rdfStructure = null;
private RDFDocument rdfDocument = null;
public RDFDocumentResult(Vector<XhtmlDocument> outFiles, String fileName, XhtmlConfig config) {
this.sFileName = Misc.removeExtension(fileName);
this.config = config;
Metadata metadata = new Metadata();
MetadataContainer metadata = new MetadataContainer();
metadata.read(config.getCSVMetadataFile());
rdfStructure = new DocumentStructure(outFiles,sFileName,config,metadata);
rdfStructure.createTree();
rdfDocument = new RDFDocument(outFiles,sFileName,config,metadata);
}
@ -48,7 +46,7 @@ public class RDFDocumentResult implements OutputFile {
}
@Override public void write(OutputStream os) throws IOException {
rdfStructure.printModel(os);
rdfDocument.printModel(os);
}
}

View file

@ -1,11 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>The package writer2latex.util</title>
</head>
<body>
<p>Some general utility classes.</p>
</body>
</html>

View file

@ -0,0 +1,41 @@
package w2phtml.util;
public class Transliteration {
public static String transliterateToEn(String fileName) {
return fileName
.replaceAll("[аА]", "a")
.replaceAll("[бБ]", "b")
.replaceAll("[вВ]", "v")
.replaceAll("[гГ]", "g")
.replaceAll("[дД]", "d")
.replaceAll("[еЕ]", "e")
.replaceAll("[ёЁ]", "e")
.replaceAll("[жЖ]", "zh")
.replaceAll("[зЗ]", "z")
.replaceAll("[иИ]", "i")
.replaceAll("[йЙ]", "y")
.replaceAll("[кК]", "k")
.replaceAll("[лЛ]", "l")
.replaceAll("[мМ]", "m")
.replaceAll("[нН]", "n")
.replaceAll("[оО]", "o")
.replaceAll("[пП]", "p")
.replaceAll("[рР]", "r")
.replaceAll("[сС]", "s")
.replaceAll("[тТ]", "t")
.replaceAll("[уУ]", "u")
.replaceAll("[фФ]", "f")
.replaceAll("[хХ]", "kh")
.replaceAll("[цЦ]", "ts")
.replaceAll("[чЧ]", "ch")
.replaceAll("[шШ]", "sh")
.replaceAll("[щЩ]", "sch")
.replaceAll("[ъЪ]", "")
.replaceAll("[ыЫ]", "y")
.replaceAll("[ьЬ]", "")
.replaceAll("[эЭ]", "e")
.replaceAll("[юЮ]", "yu")
.replaceAll("[яЯ]", "ya");
}
}

View file

@ -209,7 +209,7 @@ public class XhtmlConfig extends w2phtml.base.ConfigBase {
else { nValue = ABSOLUTE; }
}
};
options[LIST_FORMATTING] = new IntegerOption("list_formatting","css1_hack") {
options[LIST_FORMATTING] = new IntegerOption("list_formatting","hard_labels") {
@Override public void setString(String sValue) {
super.setString(sValue);
if ("css1_hack".equals(sValue)) { nValue = CSS1_HACK; }

View file

@ -63,8 +63,8 @@ public class ListParser extends Parser {
}
}
protected void insertListLabel(ListStyle style, int nLevel, String sDefaultStyle, String sPrefix, String sLabel, Element hnode) {
if (sLabel!=null && sLabel.length()>0) {
protected void insertListLabel(ListStyle style, String sDefaultStyle, String sPrefix, Element hnode) {
if (sCurrentListLabel!=null && sCurrentListLabel.length()>0) {
if (sPrefix!=null) {
Element prefix = converter.createElement("span");
prefix.setAttribute("class", "chapter-name");
@ -73,7 +73,7 @@ public class ListParser extends Parser {
}
StyleInfo info = new StyleInfo();
if (style!=null) {
String sTextStyleName = style.getLevelProperty(nLevel,TEXT_STYLE_NAME);
String sTextStyleName = style.getLevelProperty(nCurrentListLevel,TEXT_STYLE_NAME);
getTextSP().readStyle(sTextStyleName, info);
}
@ -83,7 +83,8 @@ public class ListParser extends Parser {
Element content = converter.createElement(info.sTagName);
getTextSP().writeStyle(info, content);
hnode.appendChild(content);
content.appendChild( converter.createTextNode(sLabel) );
content.appendChild( converter.createTextNode(sCurrentListLabel) );
sCurrentListLabel = "";
}
}
@ -118,6 +119,7 @@ public class ListParser extends Parser {
Element list = converter.createElement("ul");
StyleInfo listInfo = new StyleInfo();
getListSP().applyStyle(nLevel,sStyleName,listInfo);
getListSP().readParentStyle(nLevel, sStyleName, listInfo);
writeStyle(listInfo,list);
hnode.appendChild(list);
traverseList(onode,nLevel,sStyleName,list);

View file

@ -43,6 +43,7 @@ import w2phtml.office.OfficeStyle;
import w2phtml.office.PageLayout;
import w2phtml.office.StyleWithProperties;
import w2phtml.office.XMLString;
import w2phtml.pageSplitters.ListBreaksFix;
import w2phtml.pageSplitters.SplitFactory;
import w2phtml.util.Misc;
import w2phtml.xhtml.Converter;
@ -73,9 +74,7 @@ public class TextParser extends Parser {
Element[] currentHeading = new Element[7]; // Last headings (repeated when splitting)
// Counters for generated numbers
private String sCurrentListLabel = null;
private ListStyle currentListStyle = null;
private int nCurrentListLevel = 0;
public Separator docSep = null;
@ -174,6 +173,8 @@ public class TextParser extends Parser {
//ODFPageSplitter.splitOfficeText(onode, ofr);
//Debug.prettyPrintXml(onode.getOwnerDocument());
SplitFactory splitters = new SplitFactory(ofr);
ListBreaksFix listBreaksFix = new ListBreaksFix(ofr);
listBreaksFix.addSPBsBeforeBreaksInLists(onode);
splitters.split(onode);
//Debug.prettyPrintXml(onode.getOwnerDocument());
}
@ -599,7 +600,7 @@ public class TextParser extends Parser {
// Prepend numbering
if (!bUnNumbered) {
getListParser().insertListLabel(listStyle, nListLevel, "SectionNumber", null, sLabel, heading);
getListParser().insertListLabel(listStyle, "SectionNumber", null, heading);
}
// Add to toc
@ -664,21 +665,18 @@ public class TextParser extends Parser {
hnode.appendChild(temp.getFirstChild());
// Maybe add to toc
tocParser.handleParagraph((Element)onode, par, sCurrentListLabel);
if (!isEmptyParagraph) {
par = createTextBackground(par, styleName);
if (config.listFormatting()==XhtmlConfig.HARD_LABELS) {
getListParser().insertListLabel(currentListStyle, nCurrentListLevel, "ItemNumber", null, sCurrentListLabel, par);
getListParser().insertListLabel(currentListStyle, "ItemNumber", null, par);
}
sCurrentListLabel = null;
traverseInlineText(onode,par);
}
else {
// An empty paragraph (this includes paragraphs that only contains
// whitespace) is ignored by the browser, hence we add &nbsp;
par.appendChild( converter.createTextNode("\u00A0") );
sCurrentListLabel = null;
}
if (converter.isOPS() && !par.hasChildNodes()) {

View file

@ -6,7 +6,6 @@ import java.util.List;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
@ -25,6 +24,6 @@ public class PageBreaksBeforeHeading {
w2phtml.Application.main(arguments.toArray(new String[0]));
File result = new File("./testdocuments/output/heading_with_page_break_before.html");
File model = new File("./testdocuments/model/heading_with_page_break_before.html");
assertTrue( FileUtils.contentEquals(result, model),"The files differ!");
assertTrue( TestFiles.equals(result, model),"The files differ!");
}
}

View file

@ -0,0 +1,23 @@
package w2phtml.regressionTests;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.Arrays;
public class TestFiles {
public static boolean equals(File file1, File file2) {
byte[] f1;
byte[] f2;
try {
f1 = Files.readAllBytes(file1.toPath());
f2 = Files.readAllBytes(file2.toPath());
return Arrays.equals(f1, f2);
} catch (IOException e) {
e.printStackTrace();
}
return false;
}
}

View file

@ -5,6 +5,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import w2phtml.regressionTests.TestFiles;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.DisplayName;
@ -26,6 +27,6 @@ public class BreakAfterTest {
w2phtml.Application.main(arguments.toArray(new String[0]));
File result = new File("./testdocuments/output/" + name + ".html");
File model = new File("./testdocuments/model/" + name + ".html");
assertTrue(FileUtils.contentEquals(result, model), "The files differ!");
assertTrue(TestFiles.equals(result, model), "The files differ!");
}
}

View file

@ -6,10 +6,11 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import w2phtml.regressionTests.TestFiles;
public class BulletList {
@Test
@DisplayName("List on multiple pages")
@ -26,6 +27,6 @@ public class BulletList {
w2phtml.Application.main(arguments.toArray(new String[0]));
File result = new File("./testdocuments/output/" + name + ".html");
File model = new File("./testdocuments/model/" + name + ".html");
assertTrue(FileUtils.contentEquals(result, model), "The files differ!");
assertTrue(TestFiles.equals(result, model), "The files differ!");
}
}

View file

@ -6,10 +6,11 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import w2phtml.regressionTests.TestFiles;
public class GreenstoneHeadings {
@Test
@DisplayName("Greenstone3 tags headings")
@ -25,6 +26,6 @@ public class GreenstoneHeadings {
w2phtml.Application.main(arguments.toArray(new String[0]));
File result = new File("./testdocuments/output/" + testName + ".html");
File model = new File("./testdocuments/model/" + testName + ".html");
assertTrue(FileUtils.contentEquals(result, model), "The files differ!");
assertTrue(TestFiles.equals(result, model), "The files differ!");
}
}

View file

@ -0,0 +1,32 @@
package w2phtml.regressionTests.html5;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import w2phtml.regressionTests.TestFiles;
public class HardPageBreaksInLists {
@Test
@DisplayName("Hard page breaks inside list")
void testExample() throws Exception {
String name = "list_hpb";
File input = new File("./testdocuments/input/" + name + ".odt");
assertTrue(input.exists());
List<String> arguments = new ArrayList<String>();
arguments.add("-page_break_style");
arguments.add("height:3em;margin-top:1em;margin-bottom:1em;background-color:red;");
arguments.add("-html5");
arguments.add("./testdocuments/input/" + name + ".odt");
arguments.add("./testdocuments/output/" + name + ".html");
w2phtml.Application.main(arguments.toArray(new String[0]));
File result = new File("./testdocuments/output/" + name + ".html");
File model = new File("./testdocuments/model/" + name + ".html");
assertTrue(TestFiles.equals(result, model), "The files differ!");
}
}

View file

@ -6,10 +6,11 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import w2phtml.regressionTests.TestFiles;
public class HeadingWithSections {
@Test
@DisplayName("Heading with sections")
@ -24,6 +25,6 @@ public class HeadingWithSections {
w2phtml.Application.main(arguments.toArray(new String[0]));
File result = new File("./testdocuments/output/"+testName+".html");
File model = new File("./testdocuments/model/"+testName+".html");
assertTrue( FileUtils.contentEquals(result, model),"The files differ!");
assertTrue(TestFiles.equals(result, model),"The files differ!");
}
}

View file

@ -6,10 +6,11 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import w2phtml.regressionTests.TestFiles;
public class ImageAfterSection {
@Test
@DisplayName("image after section")
@ -24,6 +25,6 @@ public class ImageAfterSection {
w2phtml.Application.main(arguments.toArray(new String[0]));
File result = new File("./testdocuments/output/" + testName + ".html");
File model = new File("./testdocuments/model/" + testName + ".html");
assertTrue(FileUtils.contentEquals(result, model), "The files differ!");
assertTrue(TestFiles.equals(result, model), "The files differ!");
}
}

View file

@ -0,0 +1,32 @@
package w2phtml.regressionTests.html5;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import w2phtml.regressionTests.TestFiles;
public class ListAfterText {
@Test
@DisplayName("List after soft page break")
void testExample() throws Exception {
String name = "list_after_spb";
File input = new File("./testdocuments/input/" + name + ".odt");
assertTrue(input.exists());
List<String> arguments = new ArrayList<String>();
arguments.add("-page_break_style");
arguments.add("height:3em;margin-top:1em;margin-bottom:1em;background-color:red;");
arguments.add("-html5");
arguments.add("./testdocuments/input/" + name + ".odt");
arguments.add("./testdocuments/output/" + name + ".html");
w2phtml.Application.main(arguments.toArray(new String[0]));
File result = new File("./testdocuments/output/" + name + ".html");
File model = new File("./testdocuments/model/" + name + ".html");
assertTrue(TestFiles.equals(result, model), "The files differ!");
}
}

View file

@ -6,10 +6,11 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import w2phtml.regressionTests.TestFiles;
public class ListInSection {
@Test
@DisplayName("List in section")
@ -26,6 +27,6 @@ public class ListInSection {
w2phtml.Application.main(arguments.toArray(new String[0]));
File result = new File("./testdocuments/output/" + name + ".html");
File model = new File("./testdocuments/model/" + name + ".html");
assertTrue(FileUtils.contentEquals(result, model), "The files differ!");
assertTrue(TestFiles.equals(result, model), "The files differ!");
}
}

View file

@ -6,10 +6,11 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import w2phtml.regressionTests.TestFiles;
public class ListInTable {
@Test
@DisplayName("list in table")
@ -24,6 +25,6 @@ public class ListInTable {
w2phtml.Application.main(arguments.toArray(new String[0]));
File result = new File("./testdocuments/output/" + testName + ".html");
File model = new File("./testdocuments/model/" + testName + ".html");
assertTrue(FileUtils.contentEquals(result, model), "The files differ!");
assertTrue(TestFiles.equals(result, model), "The files differ!");
}
}

View file

@ -6,10 +6,11 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import w2phtml.regressionTests.TestFiles;
public class ListTableSection {
@Test
@DisplayName("list in table in section")
@ -24,6 +25,6 @@ public class ListTableSection {
w2phtml.Application.main(arguments.toArray(new String[0]));
File result = new File("./testdocuments/output/" + testName + ".html");
File model = new File("./testdocuments/model/" + testName + ".html");
assertTrue(FileUtils.contentEquals(result, model), "The files differ!");
assertTrue(TestFiles.equals(result, model), "The files differ!");
}
}

View file

@ -6,10 +6,11 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import w2phtml.regressionTests.TestFiles;
public class PageStartWith10 {
@Test
@DisplayName("start page from 10 in section")
@ -24,6 +25,6 @@ public class PageStartWith10 {
w2phtml.Application.main(arguments.toArray(new String[0]));
File result = new File("./testdocuments/output/" + testName + ".html");
File model = new File("./testdocuments/model/" + testName + ".html");
assertTrue(FileUtils.contentEquals(result, model), "The files differ!");
assertTrue(TestFiles.equals(result, model), "The files differ!");
}
}

View file

@ -6,10 +6,11 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import w2phtml.regressionTests.TestFiles;
public class PageStartWith10InSection {
@Test
@DisplayName("start page from 10")
@ -24,6 +25,6 @@ public class PageStartWith10InSection {
w2phtml.Application.main(arguments.toArray(new String[0]));
File result = new File("./testdocuments/output/" + testName + ".html");
File model = new File("./testdocuments/model/" + testName + ".html");
assertTrue(FileUtils.contentEquals(result, model), "The files differ!");
assertTrue(TestFiles.equals(result, model), "The files differ!");
}
}

View file

@ -6,10 +6,11 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import w2phtml.regressionTests.TestFiles;
public class SoftPageBreakInListTest {
@Test
@DisplayName("Soft page break in list")
@ -26,6 +27,6 @@ public class SoftPageBreakInListTest {
w2phtml.Application.main(arguments.toArray(new String[0]));
File result = new File("./testdocuments/output/" + name + ".html");
File model = new File("./testdocuments/model/" + name + ".html");
assertTrue(FileUtils.contentEquals(result, model), "The files differ!");
assertTrue(TestFiles.equals(result, model), "The files differ!");
}
}

View file

@ -6,10 +6,11 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import w2phtml.regressionTests.TestFiles;
public class SplitFilesAlignToPages {
@Test
@DisplayName("Split files align to pages")
@ -28,8 +29,8 @@ public class SplitFilesAlignToPages {
File result2 = new File("./testdocuments/output/" + testName + "1.html");
File model1 = new File("./testdocuments/model/" + testName + ".html");
File model2 = new File("./testdocuments/model/" + testName + "1.html");
assertTrue(FileUtils.contentEquals(result1, model1), "The files differ!");
assertTrue(FileUtils.contentEquals(result2, model2), "The files differ!");
assertTrue(TestFiles.equals(result1, model1), "The files differ!");
assertTrue(TestFiles.equals(result2, model2), "The files differ!");
}
}

Binary file not shown.

Binary file not shown.

View file

@ -10,9 +10,9 @@
<body dir="ltr">
<div class="pageNum" page="1">
<div class="pageContainer" style="column-count: 1;">
<ul style="list-style-type:disc;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<ul style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<li>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:3.3333335rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">Text text</p>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:3.3333335rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber"></span>Text text</p>
</li>
</ul>
</div>
@ -20,9 +20,9 @@
<div class="pageBreak" style="height:3em;margin-top:1em;margin-bottom:1em;background-color:red;"> </div>
<div class="pageNum" page="2">
<div class="pageContainer" style="column-count: 1;">
<ul start="2" style="list-style-type:disc;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<ul style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<li>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:3.3333335rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">text adfa </p>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:3.3333335rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber"></span>text adfa </p>
</li>
</ul>
</div>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="ru-RU" xml:lang="ru-RU" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Default</title>
<meta charset="UTF-8" />
<style media="all" type="text/css">
body {margin-left:auto;max-width:800px;font-size:1.0rem;font-family:'IPH Lib Serif';margin-right:auto;}
</style>
</head>
<body dir="ltr">
<div class="pageNum" page="1">
<div class="pageContainer" style="column-count: 1;">
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">text0</p>
</div>
</div>
<div class="pageBreak" style="height:3em;margin-top:1em;margin-bottom:1em;background-color:red;"> </div>
<div class="pageNum" page="2">
<div class="pageContainer" style="column-count: 1;">
<ul class="listlevel1List2" style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0;">
<li>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber"> </span>list1</p>
</li>
</ul>
</div>
</div>
<div class="pageBreak" style="height:3em;margin-top:1em;margin-bottom:1em;background-color:red;"> </div>
<div class="pageNum" page="3">
<div class="pageContainer" style="column-count: 1;">
<ul class="listlevel1List2" style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0;">
<li>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber"> </span>list2</p>
</li>
</ul>
</div>
</div>
<div class="pageBreak" style="height:3em;margin-top:1em;margin-bottom:1em;background-color:red;"> </div>
<div class="pageNum" page="4">
<div class="pageContainer" style="column-count: 1;">
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">text4</p>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,71 @@
<!DOCTYPE html>
<html lang="ru-RU" xml:lang="ru-RU" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Default</title>
<meta charset="UTF-8" />
<style media="all" type="text/css">
body {margin-left:auto;max-width:800px;font-size:1.0rem;font-family:'IPH Lib Serif';margin-right:auto;}
</style>
</head>
<body dir="ltr">
<div class="pageNum" page="1">
<div class="pageContainer" style="column-count: 1;">
<ul style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<li>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:3.3333335rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;page-break-before:always;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber"></span>text 1</p>
</li>
</ul>
</div>
</div>
<div class="pageBreak" style="height:3em;margin-top:1em;margin-bottom:1em;background-color:red;"> </div>
<div class="pageNum" page="2">
<div class="pageContainer" style="column-count: 1;">
<ul style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<li>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:3.3333335rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;page-break-before:always;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber"></span>text 2</p>
</li>
</ul>
</div>
</div>
<div class="pageBreak" style="height:3em;margin-top:1em;margin-bottom:1em;background-color:red;"> </div>
<div class="pageNum" page="3">
<div class="pageContainer" style="column-count: 1;">
<ul style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<li>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:3.3333335rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;page-break-before:always;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber"></span>text 3</p>
</li>
</ul>
</div>
</div>
<div class="pageBreak" style="height:3em;margin-top:1em;margin-bottom:1em;background-color:red;"> </div>
<div class="pageNum" page="4">
<div class="pageContainer" style="column-count: 1;">
<ol style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;margin-bottom:0;">
<li>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:3.3333335rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;page-break-before:always;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber">1. </span>Text1</p>
</li>
</ol>
</div>
</div>
<div class="pageBreak" style="height:3em;margin-top:1em;margin-bottom:1em;background-color:red;"> </div>
<div class="pageNum" page="5">
<div class="pageContainer" style="column-count: 1;">
<ol style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;margin-bottom:0;">
<li>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:3.3333335rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;page-break-before:always;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber">2. </span>Text2 </p>
</li>
</ol>
</div>
</div>
<div class="pageBreak" style="height:3em;margin-top:1em;margin-bottom:1em;background-color:red;"> </div>
<div class="pageNum" page="6">
<div class="pageContainer" style="column-count: 1;">
<ol style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;margin-bottom:0;">
<li>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:3.3333335rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;page-break-before:always;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber">3. </span>Text3</p>
</li>
</ol>
</div>
</div>
</body>
</html>

View file

@ -10,12 +10,12 @@
<body dir="ltr">
<div class="pageNum" page="1">
<div class="pageContainer" style="column-count: 1;">
<ul style="list-style-type:disc;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<ul style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<li>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">List first </p>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber"></span>List first </p>
</li>
<li>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">text text text text text text text text text text text text text text text text text  text text text st1 </p>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber"></span>text text text text text text text text text text text text text text text text text  text text text st1 </p>
</li>
</ul>
</div>
@ -42,9 +42,9 @@
<div class="pageNum" page="3">
<div class="pageContainer" style="column-count: 1;">
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:0;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">3test test test test test test www</p>
<ul start="3" style="list-style-type:disc;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<ul style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<li>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">text</p>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber"></span>text</p>
</li>
</ul>
</div>

View file

@ -16,7 +16,7 @@
</colgroup>
<tbody>
<tr>
<td style="border:0.004166667rem solid #000000;padding:0.11574804rem;vertical-align:top;"><ul style="list-style-type:disc;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;"><li><p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"><span style="font-size:3.3333335rem;font-family:&apos;IPH Astra Serif&apos;,serif;">text tex1 </span></p></li></ul></td>
<td style="border:0.004166667rem solid #000000;padding:0.11574804rem;vertical-align:top;"><ul style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;"><li><p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber"></span><span style="font-size:3.3333335rem;font-family:&apos;IPH Astra Serif&apos;,serif;">text tex1 </span></p></li></ul></td>
</tr>
</tbody>
</table>
@ -37,7 +37,7 @@
</tr>
</tbody>
</table>
<ul start="2" style="list-style-type:disc;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<ul style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<li style="list-style-type:none">
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"> </p>
</li>

View file

@ -20,7 +20,7 @@
<td style="vertical-align:top;">
<p style="margin:0;font-size:1px"> </p>
</td>
<td style="vertical-align:top;"><ul style="list-style-type:disc;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;"><li><p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">List first line</p></li><li><p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">text text text text text text text tex1 </p></li></ul></td>
<td style="vertical-align:top;"><ul style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;"><li><p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber"></span>List first line</p></li><li><p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber"></span>text text text text text text text tex1 </p></li></ul></td>
</tr>
</tbody>
</table>
@ -99,7 +99,7 @@
<td style="vertical-align:top;">
<p style="margin:0;font-size:1px"> </p>
</td>
<td style="vertical-align:top;"><p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:0;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">4text text text text text text text text</p><ul start="3" style="list-style-type:disc;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;"><li><p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"> text text text text4  </p></li></ul></td>
<td style="vertical-align:top;"><p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:0;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">4text text text text text text text text</p><ul style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;"><li><p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber"></span> text text text text4  </p></li></ul></td>
</tr>
</tbody>
</table>
@ -138,9 +138,9 @@
</tr>
</tbody>
</table>
<ul start="4" style="list-style-type:disc;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<ul style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<li>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">Numbering list 2</p>
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber"></span>Numbering list 2</p>
</li>
</ul>
</div>

View file

@ -12,24 +12,16 @@
<body dir="ltr">
<div class="pageNum" page="1">
<div class="pageContainer" style="column-count: 1;">
<ol class="listlevel1Numbering123" style="list-style-type:decimal;clear:left;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0;">
<ol class="listlevel2Numbering123" style="list-style-type:decimal;clear:left;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0;">
<li>
<p class="qwerty" style="margin-left:0;background-color:transparent;border:none;padding:0;text-indent:1.6535434rem;text-decoration:none;font-size:0.8333334rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0;margin-right:0;text-align:justify;"><span lang="en-US" xml:lang="en-US">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Page 1</span></p>
</li>
</ol>
<ol class="listlevel1Numbering123" style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0;">
<li><ol class="listlevel2Numbering123" style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0;"><li><p class="qwerty" style="margin-left:0;background-color:transparent;border:none;padding:0;text-indent:1.6535434rem;text-decoration:none;font-size:0.8333334rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0;margin-right:0;text-align:justify;"><span class="ItemNumber">1. </span><span lang="en-US" xml:lang="en-US">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Page 1</span></p></li></ol></li>
</ol>
</div>
</div>
<div class="pageBreak" style="height:3em;margin-top:1em;margin-bottom:1em;background-color:red;"> </div>
<div class="pageNum" page="2">
<div class="pageContainer" style="column-count: 1;">
<ol class="listlevel1Numbering123" start="2" style="list-style-type:decimal;clear:left;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0;">
<ol class="listlevel2Numbering123" start="2" style="list-style-type:decimal;clear:left;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0;">
<li>
<p class="qwerty" lang="en-US" style="margin-left:0;background-color:transparent;border:none;padding:0;text-indent:1.6535434rem;text-decoration:none;font-size:0.8333334rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0;margin-right:0;text-align:justify;" xml:lang="en-US">Page 2</p>
</li>
</ol>
<ol class="listlevel1Numbering123" style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0;">
<li><ol class="listlevel2Numbering123" style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0;"><li><p class="qwerty" lang="en-US" style="margin-left:0;background-color:transparent;border:none;padding:0;text-indent:1.6535434rem;text-decoration:none;font-size:0.8333334rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0;margin-right:0;text-align:justify;" xml:lang="en-US"><span class="ItemNumber">1. </span>Page 2</p></li></ol></li>
</ol>
</div>
</div>

View file

@ -2,9 +2,9 @@
<description xmlns="http://openoffice.org/extensions/update/2006"
xmlns:xlink="http://www.w3.org/1999/xlink">
<identifier value="pro.litvinovg.writer2paginatedhtml"/>
<version value="0.9.23" />
<version value="0.9.29" />
<update-download>
<src xlink:href="https://dev.litvinovg.pro/litvinovg/w2phtml/uploads/ab5cab080fed87d4f3e31b08961dfd59/w2phtml.oxt" />
<src xlink:href="https://dev.litvinovg.pro/litvinovg/w2phtml/uploads/649b20bfbf3225a7c11ee1a01fdf6cf9/w2phtml.oxt" />
</update-download>
<release-notes>
<src xlink:href="https://dev.litvinovg.pro/litvinovg/w2phtml/-/raw/master/src/main/oxt/releasenotes.txt" lang="en" />