bugzilla 52244 - use correct text attributes when presentation has multiple TxMasterStyleAtoms of the same type
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1295478 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e9d31e7b3e
commit
cee330b145
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
<changes>
|
<changes>
|
||||||
<release version="3.8-beta6" date="2012-??-??">
|
<release version="3.8-beta6" date="2012-??-??">
|
||||||
|
<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">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>
|
<action dev="poi-developers" type="add">51564 - support for enforcing fields update in XWPF</action>
|
||||||
<action dev="poi-developers" type="add">51673 - support grouping rows in SXSSF</action>
|
<action dev="poi-developers" type="add">51673 - support grouping rows in SXSSF</action>
|
||||||
|
@ -124,7 +124,8 @@ public final class SlideMaster extends MasterSheet {
|
|||||||
|
|
||||||
TxMasterStyleAtom[] txrec = ((MainMaster)getSheetContainer()).getTxMasterStyleAtoms();
|
TxMasterStyleAtom[] txrec = ((MainMaster)getSheetContainer()).getTxMasterStyleAtoms();
|
||||||
for (int i = 0; i < txrec.length; i++) {
|
for (int i = 0; i < txrec.length; i++) {
|
||||||
_txmaster[txrec[i].getTextType()] = txrec[i];
|
int txType = txrec[i].getTextType();
|
||||||
|
if(_txmaster[txType] == null) _txmaster[txType] = txrec[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -531,4 +531,21 @@ public final class TestTextRun extends TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void test52244() throws IOException {
|
||||||
|
SlideShow ppt = new SlideShow(_slTests.openResourceAsStream("52244.ppt"));
|
||||||
|
Slide slide = ppt.getSlides()[0];
|
||||||
|
TextRun[] runs = slide.getTextRuns();
|
||||||
|
|
||||||
|
assertEquals("Arial", runs[0].getRichTextRuns()[0].getFontName());
|
||||||
|
assertEquals(36, runs[0].getRichTextRuns()[0].getFontSize());
|
||||||
|
|
||||||
|
assertEquals("Arial", runs[1].getRichTextRuns()[0].getFontName());
|
||||||
|
assertEquals(24, runs[1].getRichTextRuns()[0].getFontSize());
|
||||||
|
|
||||||
|
assertEquals("Arial", runs[2].getRichTextRuns()[0].getFontName());
|
||||||
|
assertEquals(32, runs[2].getRichTextRuns()[0].getFontSize());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
BIN
test-data/slideshow/52244.ppt
Normal file
BIN
test-data/slideshow/52244.ppt
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user