summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-02-15 19:21:06 +0200
committerStefan Weiberg <stefan.weiberg@muenchen.de>2017-06-13 10:58:45 +0200
commit64ae3d14c63ee54dee2c5dcac88f606eebf54165 (patch)
tree2a1d8c9a3243db1295209d5697cffe6d48f41422 /sd
parent408240412628b95f1f6865d4a91b2c935b9397f5 (diff)
tdf#106304: Fix newline and empty paragraph font size issues in .pptx export
Output <a:br> instead of &#10; for hard newlines. This fixes the problem that the line before the hard newline in the .pptx export is not centred. The fix for the sd_export_tests is a bit hacky, but then so is the code in question. Don't unnecessarily use bogus default char size for a:endParaRPr. Instead use the size last used for an a:rPr below the same WriteText() call. I am not exactly sure about how this hangs together, but this has the desired effect on the exported .pptx. Change-Id: Ie23e0c33e6efb303b183d3b2efce6866d0dda4e8 Reviewed-on: https://gerrit.libreoffice.org/34888 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/export-tests.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index c23d098a1b90..d4fd59dae66f 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -392,11 +392,11 @@ void SdExportTest::testN828390_4()
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pObj );
CPPUNIT_ASSERT( pTxtObj );
const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject();
- aEdit.GetCharAttribs(1, rLst);
+ aEdit.GetCharAttribs(0, rLst);
for( std::vector<EECharAttrib>::reverse_iterator it = rLst.rbegin(); it!=rLst.rend(); ++it)
{
const SvxFontHeightItem * pFontHeight = dynamic_cast<const SvxFontHeightItem *>((*it).pAttr);
- if( pFontHeight )
+ if( pFontHeight && (*it).nStart == 18 )
CPPUNIT_ASSERT_MESSAGE( "Font height is wrong", pFontHeight->GetHeight() == 1129 );
const SvxFontItem *pFont = dynamic_cast<const SvxFontItem *>((*it).pAttr);
if( pFont )
@@ -405,7 +405,7 @@ void SdExportTest::testN828390_4()
bPassed = true;
}
const SvxWeightItem *pWeight = dynamic_cast<const SvxWeightItem *>((*it).pAttr);
- if( pWeight )
+ if( pWeight && (*it).nStart == 18 )
CPPUNIT_ASSERT_MESSAGE( "Font Weight is wrong", pWeight->GetWeight() == WEIGHT_BOLD);
}
}