Various work...

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@51 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2010-03-12 10:35:05 +00:00
parent 5311ac0b6b
commit 144b59f561
15 changed files with 368 additions and 126 deletions

View file

@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* Copyright: 2002-2008 by Henrik Just
* Copyright: 2002-2010 by Henrik Just
*
* All Rights Reserved.
*
* Version 1.0 (2008-11-23)
* Version 1.2 (2010-03-12)
*
*/
@ -179,7 +179,9 @@ public class ParConverter extends StyleConverter {
// Add newline if *between* paragraphs
if (!bLastInBlock) { ba.add("","\n"); }
context.setVerbatim(false);
if (context.isInSimpleTable()) {
if (config.formatting()!=LaTeXConfig.IGNORE_ALL) {
// only character formatting!
@ -191,6 +193,20 @@ public class ParConverter extends StyleConverter {
}
}
}
else if (config.getParStyleMap().contains(ofr.getParStyles().getDisplayName(sName))) {
// We have a style map in the configuration
StyleMap sm = config.getParStyleMap();
String sDisplayName = ofr.getParStyles().getDisplayName(sName);
String sBefore = sm.getBefore(sDisplayName);
String sAfter = sm.getAfter(sDisplayName);
ba.add(sBefore, sAfter);
// Add line breaks inside?
if (sm.getLineBreak(sDisplayName)) {
if (sBefore.length()>0) { ba.add("\n",""); }
if (sAfter.length()>0 && !"}".equals(sAfter)) { ba.add("","\n"); }
}
if (sm.getVerbatim(sDisplayName)) { context.setVerbatim(true); }
}
else if (bNoTextPar && (config.formatting()==LaTeXConfig.CONVERT_BASIC || config.formatting()==LaTeXConfig.IGNORE_MOST) ) {
// only alignment!
StyleWithProperties style = ofr.getParStyle(sName);
@ -251,7 +267,6 @@ public class ParConverter extends StyleConverter {
StyleWithProperties style = ofr.getParStyle(sName);
if (style==null) { return; }
context.updateFormattingFromStyle(style);
context.setVerbatim(styleMap.getVerbatim(sName));
}