IDEMPIERE-1440:line description alignment wrong on document printing / apply same patch from hieplq in other Pattern.compile
This commit is contained in:
parent
d67471319f
commit
d4b9295e70
|
@ -76,7 +76,7 @@ public class LocationElement extends GridElement
|
||||||
else if (ml.isAddressLinesReverse())
|
else if (ml.isAddressLinesReverse())
|
||||||
{
|
{
|
||||||
setData(index++, 0, ml.getCountry(true, language), font, color);
|
setData(index++, 0, ml.getCountry(true, language), font, color);
|
||||||
String[] lines = Pattern.compile("$", Pattern.MULTILINE).split(ml.getCityRegionPostal());
|
String[] lines = Pattern.compile("\n", Pattern.MULTILINE).split(ml.getCityRegionPostal());
|
||||||
for (int i = 0; i < lines.length; i++)
|
for (int i = 0; i < lines.length; i++)
|
||||||
setData(index++, 0, lines[i], font, color);
|
setData(index++, 0, lines[i], font, color);
|
||||||
if (ml.getAddress4() != null && ml.getAddress4().length() > 0)
|
if (ml.getAddress4() != null && ml.getAddress4().length() > 0)
|
||||||
|
@ -98,7 +98,7 @@ public class LocationElement extends GridElement
|
||||||
setData(index++, 0, ml.getAddress3(), font, color);
|
setData(index++, 0, ml.getAddress3(), font, color);
|
||||||
if (ml.getAddress4() != null && ml.getAddress4().length() > 0)
|
if (ml.getAddress4() != null && ml.getAddress4().length() > 0)
|
||||||
setData(index++, 0, ml.getAddress4(), font, color);
|
setData(index++, 0, ml.getAddress4(), font, color);
|
||||||
String[] lines = Pattern.compile("$", Pattern.MULTILINE).split(ml.getCityRegionPostal());
|
String[] lines = Pattern.compile("\n", Pattern.MULTILINE).split(ml.getCityRegionPostal());
|
||||||
for (int i = 0; i < lines.length; i++)
|
for (int i = 0; i < lines.length; i++)
|
||||||
setData(index++, 0, lines[i], font, color);
|
setData(index++, 0, lines[i], font, color);
|
||||||
setData(index++, 0, ml.getCountry(true, language), font, color);
|
setData(index++, 0, ml.getCountry(true, language), font, color);
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class StringElement extends PrintElement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_ID = ID;
|
m_ID = ID;
|
||||||
String[] lines = Pattern.compile("$", Pattern.MULTILINE).split(inText);
|
String[] lines = Pattern.compile("\n", Pattern.MULTILINE).split(inText);
|
||||||
m_string_paper = new AttributedString[lines.length];
|
m_string_paper = new AttributedString[lines.length];
|
||||||
m_string_view = new AttributedString[lines.length];
|
m_string_view = new AttributedString[lines.length];
|
||||||
for (int i = 0; i < lines.length; i++)
|
for (int i = 0; i < lines.length; i++)
|
||||||
|
@ -155,7 +155,7 @@ public class StringElement extends PrintElement
|
||||||
endOffset = labelSuffix.length();
|
endOffset = labelSuffix.length();
|
||||||
}
|
}
|
||||||
m_ID = ID;
|
m_ID = ID;
|
||||||
String[] lines = Pattern.compile("$", Pattern.MULTILINE).split(text);
|
String[] lines = Pattern.compile("\n", Pattern.MULTILINE).split(text);
|
||||||
m_string_paper = new AttributedString[lines.length];
|
m_string_paper = new AttributedString[lines.length];
|
||||||
m_string_view = new AttributedString[lines.length];
|
m_string_view = new AttributedString[lines.length];
|
||||||
for (int i = 0; i < lines.length; i++)
|
for (int i = 0; i < lines.length; i++)
|
||||||
|
@ -230,7 +230,7 @@ public class StringElement extends PrintElement
|
||||||
return;
|
return;
|
||||||
String inText = Msg.parseTranslation(ctx, m_originalString);
|
String inText = Msg.parseTranslation(ctx, m_originalString);
|
||||||
// log.fine( "StringElement.translate", inText);
|
// log.fine( "StringElement.translate", inText);
|
||||||
String[] lines = Pattern.compile("$", Pattern.MULTILINE).split(inText);
|
String[] lines = Pattern.compile("\n", Pattern.MULTILINE).split(inText);
|
||||||
m_string_paper = new AttributedString[lines.length];
|
m_string_paper = new AttributedString[lines.length];
|
||||||
for (int i = 0; i < lines.length; i++)
|
for (int i = 0; i < lines.length; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -431,7 +431,7 @@ public class TableElement extends PrintElement
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
String[] lines = Pattern.compile("$", Pattern.MULTILINE).split(string);
|
String[] lines = Pattern.compile("\n", Pattern.MULTILINE).split(string);
|
||||||
for (int lineNo = 0; lineNo < lines.length; lineNo++)
|
for (int lineNo = 0; lineNo < lines.length; lineNo++)
|
||||||
{
|
{
|
||||||
AttributedString aString = new AttributedString(lines[lineNo]);
|
AttributedString aString = new AttributedString(lines[lineNo]);
|
||||||
|
@ -503,7 +503,7 @@ public class TableElement extends PrintElement
|
||||||
{
|
{
|
||||||
float height = 0;
|
float height = 0;
|
||||||
//
|
//
|
||||||
String[] lines = Pattern.compile("$", Pattern.MULTILINE).split(string);
|
String[] lines = Pattern.compile("\n", Pattern.MULTILINE).split(string);
|
||||||
for (int lineNo = 0; lineNo < lines.length; lineNo++)
|
for (int lineNo = 0; lineNo < lines.length; lineNo++)
|
||||||
{
|
{
|
||||||
AttributedString aString = new AttributedString(lines[lineNo]);
|
AttributedString aString = new AttributedString(lines[lineNo]);
|
||||||
|
|
|
@ -247,7 +247,8 @@ public class ConfigOracle implements IDatabaseConfig
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
ArrayList<String> list = new ArrayList<String>();
|
ArrayList<String> list = new ArrayList<String>();
|
||||||
Pattern pattern = Pattern.compile("$", Pattern.MULTILINE);
|
Pattern pattern = Pattern.compile("\n", Pattern.MULTILINE);
|
||||||
|
System.out.println(tnsnames);
|
||||||
String[] lines = pattern.split(tnsnames);
|
String[] lines = pattern.split(tnsnames);
|
||||||
for (int i = 0; i < lines.length; i++)
|
for (int i = 0; i < lines.length; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue