[Libreoffice-commits] .: 3 commits - oox/source
Radek DoulÃk
rodo at kemper.freedesktop.org
Wed Jan 12 11:53:46 PST 2011
oox/source/drawingml/customshapeproperties.cxx | 2 -
oox/source/drawingml/textparagraphproperties.cxx | 28 ++++++++++++++++++++---
oox/source/ppt/pptshape.cxx | 2 -
3 files changed, 27 insertions(+), 5 deletions(-)
New commits:
commit dfdd6dcdd979270350a59c96369c02e98b20f427
Author: Radek Doulik <rodo at novell.com>
Date: Wed Jan 12 20:51:18 2011 +0100
fix bullet characters encoding for symbol fonts, n#656934
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx
index 59366db..58ced11 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -76,7 +76,7 @@ bool BulletList::is() const
return mnNumberingType.hasValue();
}
-void BulletList::setBulletChar( const ::rtl::OUString & sChar )
+void BulletList::setBulletChar( const OUString & sChar )
{
mnNumberingType <<= NumberingType::CHAR_SPECIAL;
msBulletChar <<= sChar;
@@ -323,8 +323,30 @@ void BulletList::pushToPropMap( const ::oox::core::XmlFilterBase* pFilterBase, P
rPropMap[ PROP_BulletFontName ] <<= aBulletFontName;
}
}
- if ( msBulletChar.hasValue() )
- rPropMap[ PROP_BulletChar ] = msBulletChar;
+ if ( msBulletChar.hasValue() ) {
+ OUString sBuChar;
+
+ msBulletChar >>= sBuChar;
+
+ if( pFilterBase && sBuChar.getLength() == 1 && maBulletFont.getFontData( aBulletFontName, nBulletFontPitch, nBulletFontFamily, *pFilterBase )
+ && ( aBulletFontName.equalsIgnoreAsciiCaseAscii( "Wingdings" ) ||
+ aBulletFontName.equalsIgnoreAsciiCaseAscii( "Wingdings 2" ) ||
+ aBulletFontName.equalsIgnoreAsciiCaseAscii( "Wingdings 3" ) ||
+ aBulletFontName.equalsIgnoreAsciiCaseAscii( "Monotype Sorts" ) ||
+ aBulletFontName.equalsIgnoreAsciiCaseAscii( "Monotype Sorts 2" ) ||
+ aBulletFontName.equalsIgnoreAsciiCaseAscii( "Webdings" ) ||
+ aBulletFontName.equalsIgnoreAsciiCaseAscii( "StarBats" ) ||
+ aBulletFontName.equalsIgnoreAsciiCaseAscii( "StarMath" ) ||
+ aBulletFontName.equalsIgnoreAsciiCaseAscii( "ZapfDingbats" ) ) )
+ {
+ sal_Unicode nBuChar = sBuChar.toChar();
+ nBuChar &= 0x00ff;
+ nBuChar |= 0xf000;
+ sBuChar = OUString( &nBuChar, 1 );
+ }
+
+ rPropMap[ PROP_BulletChar ] <<= sBuChar;
+ }
if ( maGraphic.hasValue() )
{
Reference< com::sun::star::awt::XBitmap > xBitmap( maGraphic, UNO_QUERY );
commit 870233f8bf190be9103badb450c7e67b5a992b4f
Author: Radek Doulik <rodo at novell.com>
Date: Wed Jan 12 20:46:37 2011 +0100
fix placeholder styles, n#656934
- do not lookup ph indexes which are set to -1
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 5b3a8ff..2336d2d 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -177,7 +177,7 @@ void PPTShape::addShape(
aMasterTextListStyle.reset();
// use placeholder index if possible
- if( mnSubType && getSubTypeIndex() && rSlidePersist.getMasterPersist().get() ) {
+ if( mnSubType && getSubTypeIndex() && getSubTypeIndex() != -1 && rSlidePersist.getMasterPersist().get() ) {
oox::drawingml::ShapePtr pPlaceholder = PPTShape::findPlaceholderByIndex( getSubTypeIndex(), rSlidePersist.getMasterPersist()->getShapes()->getChildren() );
if( pPlaceholder.get() ) {
if( pPlaceholder->getTextBody() ) {
commit 38e26d05e5b01b078c6c68e3ffbdabd506c41f86
Author: Radek Doulik <rodo at novell.com>
Date: Wed Jan 12 20:44:19 2011 +0100
fix crash, happened when loading document from n#657892
- check that the sequence has has at least one item before assigning it
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 8ca10de..6449982 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -132,7 +132,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
aAdjustmentVal.State = PropertyState_DIRECT_VALUE;
aAdjustmentSeq[ nAdjustmentIndex ] = aAdjustmentVal;
}
- } else {
+ } else if ( aAdjustmentSeq.getLength() > 0 ) {
EnhancedCustomShapeAdjustmentValue aAdjustmentVal;
aAdjustmentVal.Value <<= (*aIter).maFormula.toInt32();
aAdjustmentVal.State = PropertyState_DIRECT_VALUE;
More information about the Libreoffice-commits
mailing list