<changes>
<release version="3.8-beta6" date="2012-??-??">
+ <action dev="poi-developers" type="fix">52682 - allow setting text with trailing carriage return in HSLF</action>
<action dev="poi-developers" type="fix">52244 - use correct text attributes when presentation has multiple TxMasterStyleAtoms of the same type</action>
<action dev="poi-developers" type="add">support setting background color of sheet tab in XSSF</action>
<action dev="poi-developers" type="add">51564 - support for enforcing fields update in XWPF</action>
* touch the stylings.
*/
private void storeText(String s) {
- // Remove a single trailing \r, as there is an implicit one at the
- // end of every record
- if(s.endsWith("\r")) {
- s = s.substring(0, s.length()-1);
- }
-
// Store in the appropriate record
if(_isUnicode) {
// The atom can safely convert to unicode
run.setText(changeTo);
assertEquals(changeTo, run.getText());
- // Ensure trailing \n's get stripped
+ // Ensure trailing \n's are NOT stripped, it is legal to set a text with a trailing '\r'
run.setText(changeTo + "\n");
- assertEquals(changeTo, run.getText());
+ assertEquals(changeTo + "\n", run.getText());
}
/**