[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source
oox/source/drawingml/fillproperties.cxx |3 +++ oox/source/drawingml/graphicshapecontext.cxx |3 +++ oox/source/drawingml/shape.cxx |2 +- 3 files changed, 7 insertions(+), 1 deletion(-) New commits: commit 5ebcda21d568589574a39c3edcc85f340809cfe4 Author: Radek Doulik Date: Tue Jan 29 10:42:46 2013 +0100 use ole obj preview image Change-Id: I7e88ca553fcb8449a337af36554dd1996bc6dd7d diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index dde28b5..b43f2ab 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -405,6 +405,9 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe } } +rPropMap[ PROP_Graphic ] <<= xGraphic; + +// do we still need to set GraphicURL as well? (TODO) OUString aGraphicUrl = rGraphicHelper.createGraphicObject( xGraphic ); if( !aGraphicUrl.isEmpty() ) rPropMap[ PROP_GraphicURL ] <<= aGraphicUrl; diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx index 8af4e80..678bff0 100644 --- a/oox/source/drawingml/graphicshapecontext.cxx +++ b/oox/source/drawingml/graphicshapecontext.cxx @@ -223,6 +223,9 @@ Reference< XFastContextHandler > OleObjectGraphicDataContext::createFastChildCon OSL_ENSURE( mrOleObjectInfo.mbLinked, "OleObjectGraphicDataContext::createFastChildContext - unexpected child element" ); mrOleObjectInfo.mbAutoUpdate = aAttribs.getBool( XML_updateAutomatic, false ); break; +case PPT_TOKEN( pic ): +xRet.set( new GraphicShapeContext( *this, mpMasterShapePtr, mpShapePtr ) ); +break; } return xRet; } diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 156bc09..fbe1553 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -542,7 +542,7 @@ Reference< XShape > Shape::createAndInsert( // applying properties aShapeProps.assignUsed( getShapeProperties() ); aShapeProps.assignUsed( maDefaultShapeProperties ); -if ( bIsEmbMedia || aServiceName == "com.sun.star.drawing.GraphicObjectShape" ) +if ( bIsEmbMedia || aServiceName == "com.sun.star.drawing.GraphicObjectShape" || aServiceName == "com.sun.star.drawing.OLE2Shape" ) mpGraphicPropertiesPtr->pushToPropMap( aShapeProps, rGraphicHelper ); if ( mpTablePropertiesPtr.get() && aServiceName == "com.sun.star.drawing.TableShape" ) mpTablePropertiesPtr->pushToPropSet( rFilterBase, xSet, mpMasterTextListStyle ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source
oox/source/drawingml/table/tablecell.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 083b2c6dc32569930e1e5d35246e8f80701f8934 Author: Radek Doulik Date: Wed Jan 16 20:37:50 2013 +0100 fix cell border line properties n#793408 Change-Id: Id20fa233b7e7eb0f2f01f4c230d1fe3398f2f4ed diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx index af0105c..45281af 100644 --- a/oox/source/drawingml/table/tablecell.cxx +++ b/oox/source/drawingml/table/tablecell.cxx @@ -83,6 +83,7 @@ void applyLineAttributes( const ::oox::core::XmlFilterBase& rFilterBase, aBorderLine.Color = aColor.getColor( rFilterBase.getGraphicHelper() ); aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 ); aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 ); +aBorderLine.LineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 2 ); aBorderLine.LineDistance = 0; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source
oox/source/vml/vmlshape.cxx |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) New commits: commit 04b32936c55c1fe543f86ac077d75dda7e2fb49b Author: Pierre-Eric Pelloux-Prayer Date: Fri Oct 5 15:30:11 2012 +0200 vml import: only apply width-percent attribute if it's != 0 This fixes an issue with a shape defined with these attributes: mso-width-percent:0;mso-height-percent:0 and mso-width-relative:page;mso-height-relative:page; where all points were then located in (0,0) Change-Id: I51070ad2b2e4e05ab64f16813472ca1d7099fb09 Reviewed-on: https://gerrit.libreoffice.org/775 Reviewed-by: Petr Mladek Tested-by: Petr Mladek diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 1e9573e..fde972c 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -464,7 +464,9 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes if ( maTypeModel.maWidthRelative.isEmpty() || maTypeModel.maWidthRelative.equalsAscii( "page" ) ) { sal_Int16 nWidth = maTypeModel.maWidthPercent.toInt32() / 10; -PropertySet( xShape ).setAnyProperty(PROP_RelativeWidth, makeAny( nWidth ) ); +// Only apply if nWidth != 0 +if ( nWidth ) +PropertySet( xShape ).setAnyProperty(PROP_RelativeWidth, makeAny( nWidth ) ); } } if ( !maTypeModel.maHeightPercent.isEmpty( ) ) @@ -473,7 +475,9 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes if ( maTypeModel.maHeightRelative.isEmpty() || maTypeModel.maHeightRelative.equalsAscii( "page" ) ) { sal_Int16 nHeight = maTypeModel.maHeightPercent.toInt32() / 10; -PropertySet( xShape ).setAnyProperty(PROP_RelativeHeight, makeAny( nHeight ) ); +// Only apply if nHeight != 0 +if ( nHeight ) +PropertySet( xShape ).setAnyProperty(PROP_RelativeHeight, makeAny( nHeight ) ); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source
oox/source/vml/vmltextboxcontext.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 2c9e1123658c1448b8fe0b0e4295578ad1b183b0 Author: Miklos Vajna Date: Mon Dec 10 12:51:01 2012 +0100 oox: v:textbox's inset attribute should be imported in Hmm, not in Emu Trivial reproducer: http://people.freedesktop.org/~vmiklos/2012/simple-textbox.docx Change-Id: I030f7153326affc5a01e7ede1ddf1164fa500071 (cherry picked from commit 5bc835d48f1e5373b3a31bd166fadfdf19b3588f) diff --git a/oox/source/vml/vmltextboxcontext.cxx b/oox/source/vml/vmltextboxcontext.cxx index 841c150..3f188e3 100644 --- a/oox/source/vml/vmltextboxcontext.cxx +++ b/oox/source/vml/vmltextboxcontext.cxx @@ -137,16 +137,16 @@ TextBoxContext::TextBoxContext( ContextHandler2Helper& rParent, TextBox& rTextBo OUString inset = rAttribs.getString( XML_inset ).get(); OUString value; ConversionHelper::separatePair( value, inset, inset, ',' ); -rTextBox.borderDistanceLeft = ConversionHelper::decodeMeasureToEmu( graphicHelper, +rTextBox.borderDistanceLeft = ConversionHelper::decodeMeasureToHmm( graphicHelper, value.isEmpty() ? "0.1in" : value, 0, false, false ); ConversionHelper::separatePair( value, inset, inset, ',' ); -rTextBox.borderDistanceTop = ConversionHelper::decodeMeasureToEmu( graphicHelper, +rTextBox.borderDistanceTop = ConversionHelper::decodeMeasureToHmm( graphicHelper, value.isEmpty() ? "0.05in" : value, 0, false, false ); ConversionHelper::separatePair( value, inset, inset, ',' ); -rTextBox.borderDistanceRight = ConversionHelper::decodeMeasureToEmu( graphicHelper, +rTextBox.borderDistanceRight = ConversionHelper::decodeMeasureToHmm( graphicHelper, value.isEmpty() ? "0.1in" : value, 0, false, false ); ConversionHelper::separatePair( value, inset, inset, ',' ); -rTextBox.borderDistanceBottom = ConversionHelper::decodeMeasureToEmu( graphicHelper, +rTextBox.borderDistanceBottom = ConversionHelper::decodeMeasureToHmm( graphicHelper, value.isEmpty() ? "0.05in" : value, 0, false, false ); rTextBox.borderDistanceSet = true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source
oox/source/drawingml/theme.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 1c0af12bf1bc378e3e0c87be9840f41e89783f22 Author: Radek Doulik Date: Mon Dec 10 16:07:43 2012 +0100 for lnRef idx 0 is valid index into style matrix Change-Id: Idfcaa2539056fdd3712eda4fff1ec2b7cdb3ed30 diff --git a/oox/source/drawingml/theme.cxx b/oox/source/drawingml/theme.cxx index 46f3dbc..f862ea3 100644 --- a/oox/source/drawingml/theme.cxx +++ b/oox/source/drawingml/theme.cxx @@ -46,10 +46,10 @@ Theme::~Theme() namespace { template< typename Type > -const Type* lclGetStyleElement( const RefVector< Type >& rVector, sal_Int32 nIndex ) +const Type* lclGetStyleElement( const RefVector< Type >& rVector, sal_Int32 nIndex, sal_Int32 nLowerLimit = 1 ) { -return (rVector.empty() || (nIndex < 1)) ? 0 : -rVector.get( ::std::min( static_cast< sal_Int32 >( nIndex - 1 ), static_cast< sal_Int32 >( rVector.size() - 1 ) ) ).get(); +return (rVector.empty() || (nIndex < nLowerLimit)) ? 0 : +rVector.get( ::std::min( static_cast< sal_Int32 >( nIndex - nLowerLimit ), static_cast< sal_Int32 >( rVector.size() - 1 ) ) ).get(); } } // namespace @@ -63,7 +63,7 @@ const FillProperties* Theme::getFillStyle( sal_Int32 nIndex ) const const LineProperties* Theme::getLineStyle( sal_Int32 nIndex ) const { - return lclGetStyleElement( maLineStyleList, nIndex ); +return lclGetStyleElement( maLineStyleList, nIndex, 0 ); } const TextCharacterProperties* Theme::getFontStyle( sal_Int32 nSchemeType ) const ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source
oox/source/drawingml/chart/titlecontext.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit be9e8f6ee4a233b28cbe45cc3c3c01a4d9b9d8d7 Author: Miklos Vajna Date: Fri Dec 7 13:03:37 2012 +0100 TextContext::onCharacters: missing rtl:: prefix Change-Id: I8b9b135df739de99afcc79fdb4c56a93189db7b5 diff --git a/oox/source/drawingml/chart/titlecontext.cxx b/oox/source/drawingml/chart/titlecontext.cxx index 1fcb3cc..a368129 100644 --- a/oox/source/drawingml/chart/titlecontext.cxx +++ b/oox/source/drawingml/chart/titlecontext.cxx @@ -80,7 +80,7 @@ void TextContext::onCharacters( const OUString& rChars ) if( isCurrentElement( C_TOKEN( v ) ) ) { // Static text is stored as a single string formula token for Excel document. -OUStringBuffer aBuf; +rtl::OUStringBuffer aBuf; aBuf.append('"').append(rChars).append('"'); mrModel.mxDataSeq.create().maFormula = aBuf.makeStringAndClear(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source
oox/source/drawingml/chart/titlecontext.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit efee17ce9ce538cffac38651a290ead1a832dbe0 Author: Kohei Yoshida Date: Thu Dec 6 23:30:42 2012 -0500 bnc#792528: Play it safe for non-Excel documents. Excel is not the only one that use charts. Let's also store the static label value to maData in case it is used for non-Excel documents. Change-Id: I1faed76e2ff396873039bccb3e1b7dcf27aba8c6 diff --git a/oox/source/drawingml/chart/titlecontext.cxx b/oox/source/drawingml/chart/titlecontext.cxx index 4b921da..1fcb3cc 100644 --- a/oox/source/drawingml/chart/titlecontext.cxx +++ b/oox/source/drawingml/chart/titlecontext.cxx @@ -79,10 +79,13 @@ void TextContext::onCharacters( const OUString& rChars ) { if( isCurrentElement( C_TOKEN( v ) ) ) { -// Static text is stored as a single string formula token. +// Static text is stored as a single string formula token for Excel document. OUStringBuffer aBuf; aBuf.append('"').append(rChars).append('"'); mrModel.mxDataSeq.create().maFormula = aBuf.makeStringAndClear(); + +// Also store it as a single element type for non-Excel document. +mrModel.mxDataSeq->maData[0] <<= rChars; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source sc/source
oox/source/drawingml/chart/titlecontext.cxx | 10 ++- sc/source/core/tool/reftokenhelper.cxx | 91 sc/source/ui/unoobj/chart2uno.cxx |1 3 files changed, 48 insertions(+), 54 deletions(-) New commits: commit 65dad3684c609e89b92714e51c914e9b1afa16a3 Author: Kohei Yoshida Date: Thu Dec 6 14:36:50 2012 -0500 bnc#792528: Import static data series labels from xlsx correctly. Static data series label is a data series label whose value is a string value rather than a cell reference. Also, when inputting static string label in the UI, we don't have to manually check for quotes; the formula compiler will take care of that later. Change-Id: I1657fc9879a7f652bba84898e308c3a5d5ba87a3 diff --git a/oox/source/drawingml/chart/titlecontext.cxx b/oox/source/drawingml/chart/titlecontext.cxx index 100235d..4b921da 100644 --- a/oox/source/drawingml/chart/titlecontext.cxx +++ b/oox/source/drawingml/chart/titlecontext.cxx @@ -33,6 +33,8 @@ #include "oox/drawingml/chart/datasourcecontext.hxx" #include "oox/drawingml/chart/titlemodel.hxx" +#include "rtl/ustrbuf.hxx" + namespace oox { namespace drawingml { namespace chart { @@ -75,9 +77,13 @@ ContextHandlerRef TextContext::onCreateContext( sal_Int32 nElement, const Attrib void TextContext::onCharacters( const OUString& rChars ) { -// store as single string sequence element if( isCurrentElement( C_TOKEN( v ) ) ) -mrModel.mxDataSeq.create().maData[ 0 ] <<= rChars; +{ +// Static text is stored as a single string formula token. +OUStringBuffer aBuf; +aBuf.append('"').append(rChars).append('"'); +mrModel.mxDataSeq.create().maFormula = aBuf.makeStringAndClear(); +} } // diff --git a/sc/source/core/tool/reftokenhelper.cxx b/sc/source/core/tool/reftokenhelper.cxx index 2a32e12..1508df7 100644 --- a/sc/source/core/tool/reftokenhelper.cxx +++ b/sc/source/core/tool/reftokenhelper.cxx @@ -44,25 +44,11 @@ using ::std::vector; using ::std::auto_ptr; using ::rtl::OUString; -static bool lcl_mayBeRangeConstString( const OUString &aRangeStr ) -{ -if( aRangeStr.getLength() >= 3 && aRangeStr.endsWithAsciiL( "\"", 1 ) ) -{ -if( aRangeStr[0] == '"' ) -return true; -else if( aRangeStr[0] == '=' && aRangeStr[1] == '"' ) -return true; -} - -return false; -} - void ScRefTokenHelper::compileRangeRepresentation( vector& rRefTokens, const OUString& rRangeStr, ScDocument* pDoc, const sal_Unicode cSep, FormulaGrammar::Grammar eGrammar) { const sal_Unicode cQuote = '\''; -bool bMayBeConstString = lcl_mayBeRangeConstString( rRangeStr ); // #i107275# ignore parentheses OUString aRangeStr = rRangeStr; @@ -88,48 +74,49 @@ void ScRefTokenHelper::compileRangeRepresentation( if (!nLen) continue; // Should a missing range really be allowed? if (nLen != 1) +{ bFailure = true; -else +break; +} + +pArray->Reset(); +const FormulaToken* p = pArray->Next(); +if (!p) { -pArray->Reset(); -const FormulaToken* p = pArray->Next(); -if (!p) +bFailure = true; +break; +} + +const ScToken* pT = static_cast(p); +switch (pT->GetType()) +{ +case svSingleRef: +if (!pT->GetSingleRef().Valid()) +bFailure = true; +break; +case svDoubleRef: +if (!pT->GetDoubleRef().Valid()) +bFailure = true; +break; +case svExternalSingleRef: +if (!pT->GetSingleRef().ValidExternal()) +bFailure = true; +break; +case svExternalDoubleRef: +if (!pT->GetDoubleRef().ValidExternal()) +bFailure = true; +break; +case svString: +if (!pT->GetString().Len()) +bFailure = true; +break; +default: bFailure = true; -else -{ -const ScToken* pT = static_cast(p); -switch (pT->GetType()) -{ -case svSingleRef: -if (!pT->GetSingleRef().Valid()) -bFailure = true; -break; -case svDoubleRef: -if (!pT->GetDoubleRef().Valid()) -bFailure = true; -break; -case svExternalSingleRef: -if (!pT->GetSingleRef().ValidExternal()) -bFailure = true; -break;
[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source
oox/source/vml/vmlshape.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 66f8a2dc290e62da3537288cac5a3d845a9135d4 Author: LuboÅ¡ LuÅák Date: Thu Nov 8 15:59:32 2012 +0100 I hate sal_Int32, episode #1326. Change-Id: Ibfda2b553bae1ad040f722dde46a352a313218fc diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 5b6b6c5..1e9573e 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -445,10 +445,10 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes PropertySet( xShape ).setAnyProperty( PROP_SizeType, makeAny( maTypeModel.mbAutoHeight ? SizeType::MIN : SizeType::FIX ) ); if( getTextBox()->borderDistanceSet ) { -PropertySet( xShape ).setAnyProperty( PROP_LeftBorderDistance, makeAny( getTextBox()->borderDistanceLeft )); -PropertySet( xShape ).setAnyProperty( PROP_TopBorderDistance, makeAny( getTextBox()->borderDistanceTop )); -PropertySet( xShape ).setAnyProperty( PROP_RightBorderDistance, makeAny( getTextBox()->borderDistanceRight )); -PropertySet( xShape ).setAnyProperty( PROP_BottomBorderDistance, makeAny( getTextBox()->borderDistanceBottom )); +PropertySet( xShape ).setAnyProperty( PROP_LeftBorderDistance, makeAny( sal_Int32( getTextBox()->borderDistanceLeft ))); +PropertySet( xShape ).setAnyProperty( PROP_TopBorderDistance, makeAny( sal_Int32( getTextBox()->borderDistanceTop ))); +PropertySet( xShape ).setAnyProperty( PROP_RightBorderDistance, makeAny( sal_Int32( getTextBox()->borderDistanceRight ))); +PropertySet( xShape ).setAnyProperty( PROP_BottomBorderDistance, makeAny( sal_Int32( getTextBox()->borderDistanceBottom ))); } } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source
oox/source/export/drawingml.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 46d2e0023360f0e69514ad039b05796a222bc3cc Author: Tor Lillqvist Date: Mon Nov 19 21:11:47 2012 +0200 no matching function for call to 'max(int, long int)' Change-Id: I7533098781b0b6987cd852d74a688aac6e0af056 diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 58decbd..07d0172 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1084,7 +1084,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa } else { if( nBulletRelSize && nBulletRelSize != 100 ) mpFS->singleElementNS( XML_a, XML_buSzPct, - XML_val, IS( std::min( 25000, std::max( 40, 1000*( (sal_Int32)nBulletRelSize ) ) ) ), FSEND ); + XML_val, IS( std::min( (sal_Int32)25000, std::max( (sal_Int32)40, 1000*( (sal_Int32)nBulletRelSize ) ) ) ), FSEND ); if( bHasFontDesc ) mpFS->singleElementNS( XML_a, XML_buFont, XML_typeface, OUStringToOString( aFontDesc.Name, RTL_TEXTENCODING_UTF8 ).getStr(), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source
oox/source/ppt/slidefragmenthandler.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a1b0ce05e851e9724c046888a01869eddf9e9db2 Author: Tor Lillqvist Date: Mon Nov 5 11:36:27 2012 +0200 bnc#785727: Add more safety checks, exact bug mechanism unclear Change-Id: Ieef2ce470613f6adfbb134d2bd59f2a6fd4a848d diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx index 6e6ba26..e752a67 100644 --- a/oox/source/ppt/slidefragmenthandler.cxx +++ b/oox/source/ppt/slidefragmenthandler.cxx @@ -187,7 +187,7 @@ SlideFragmentHandler::~SlideFragmentHandler() throw() case A_TOKEN( overrideClrMapping ): case PPT_TOKEN( clrMap ): // CT_ColorMapping { -oox::drawingml::ClrMapPtr pClrMapPtr( ( aElementToken == PPT_TOKEN( clrMap ) || !mpSlidePersistPtr.get() ) ? new oox::drawingml::ClrMap() : new oox::drawingml::ClrMap( *mpSlidePersistPtr->getClrMap() ) ); +oox::drawingml::ClrMapPtr pClrMapPtr( ( aElementToken == PPT_TOKEN( clrMap ) || !mpSlidePersistPtr.get() || !mpSlidePersistPtr->getClrMap().get() ) ? new oox::drawingml::ClrMap() : new oox::drawingml::ClrMap( *mpSlidePersistPtr->getClrMap() ) ); ContextHandlerRef ret = new oox::drawingml::clrMapContext( *this, rAttribs.getFastAttributeList(), *pClrMapPtr ); mpSlidePersistPtr->setClrMap( pClrMapPtr ); return ret; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source
oox/source/drawingml/textbodypropertiescontext.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 91d057474682c52e978e1ea93d05655622cc5914 Author: Muthu Subramanian Date: Thu Oct 25 16:12:16 2012 +0530 n#773048: Adjust rotate in relation to fix for n#783433 diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index 4cd0cfe..8c66aa7 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -104,7 +104,7 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, bool bRtl = aAttribs.getBool( XML_rtl, false ); sal_Int32 tVert = mrTextBodyProp.moVert.get( XML_horz ); if( tVert == XML_vert || tVert == XML_eaVert || tVert == XML_vert270 || tVert == XML_mongolianVert ) -mrTextBodyProp.moRotation = 540*(tVert==XML_vert270?3:1); +mrTextBodyProp.moRotation = -540*(tVert==XML_vert270?3:1); else mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ] <<= ( bRtl ? WritingMode_RL_TB : WritingMode_LR_TB ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source
oox/source/drawingml/shape.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4480fb71ff605fe5325a06c99f737b795111bbba Author: Radek Doulik Date: Wed Oct 10 17:23:52 2012 +0200 fix text rotation for txXfrm element, fixes n#783433 Change-Id: I82a14170ce8d58184b1a86f7fc0f9e9d93238c92 diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 242dd43..792cce4 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -562,7 +562,7 @@ Reference< XShape > Shape::createAndInsert( if( getTextBody() ) { sal_Int32 nTextRotateAngle = static_cast< sal_Int32 >( getTextBody()->getTextProperties().moRotation.get( 0 ) ); -mpCustomShapePropertiesPtr->setTextRotateAngle( -nTextRotateAngle / 6 ); +mpCustomShapePropertiesPtr->setTextRotateAngle( nTextRotateAngle / 6 ); } SAL_INFO("oox", "==cscode== shape name: '" << msName << "'"); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source
oox/source/drawingml/textparagraph.cxx |7 --- oox/source/drawingml/textparagraphproperties.cxx | 19 +-- 2 files changed, 21 insertions(+), 5 deletions(-) New commits: commit 3863ac87f7fcc9b59e2768f5cc9a8779b5d21d17 Author: Muthu Subramanian Date: Thu Oct 11 14:59:33 2012 +0530 n#778854: Fixes quite some issues with bullet points. * Properties needs to be combined before applyed. Rather than applying them separately twice. * ParaMargins set to zero wrongly rather than boost::none This caused its own set of problems. * Hack: Push default zero to tabstops. This makes impress calculate proper values for tabstops using leftmargin. Conflicts: oox/source/drawingml/textparagraph.cxx Change-Id: Ic92b4963525d713cdbe5f1c16abcdfa352c61512 diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx index 1e2d8e2..9f0b29d 100644 --- a/oox/source/drawingml/textparagraph.cxx +++ b/oox/source/drawingml/textparagraph.cxx @@ -112,15 +112,16 @@ void TextParagraph::insertAt( float fCharacterSize = nCharHeight > 0 ? GetFontHeight( nCharHeight ) : 18; if ( pTextParagraphStyle.get() ) { -pTextParagraphStyle->pushToPropSet( &rFilterBase, xProps, aioBulletList, NULL, sal_True, fCharacterSize ); +TextParagraphProperties aParaProp; +aParaProp.apply( *pTextParagraphStyle ); +aParaProp.apply( maProperties ); +aParaProp.pushToPropSet( &rFilterBase, xProps, aioBulletList, &pTextParagraphStyle->getBulletList(), sal_True, fCharacterSize, true ); fCharacterSize = pTextParagraphStyle->getCharHeightPoints( fCharacterSize ); // bullets have same color as following texts by default if( !aioBulletList.hasProperty( PROP_BulletColor ) && maRuns.size() > 0 && (*maRuns.begin())->getTextCharacterProperties().maCharColor.isUsed() ) aioBulletList[ PROP_BulletColor ] <<= (*maRuns.begin())->getTextCharacterProperties().maCharColor.getColor( rFilterBase.getGraphicHelper() ); - -maProperties.pushToPropSet( &rFilterBase, xProps, aioBulletList, &pTextParagraphStyle->getBulletList(), sal_True, fCharacterSize ); } // empty paragraphs do not have bullets in ppt diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index abd0b3b..0ca8641 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include "oox/helper/helper.hxx" #include "oox/helper/propertyset.hxx" @@ -426,12 +427,15 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p if ( noParaLeftMargin ) { rioBulletMap[ PROP_LeftMargin ] <<= static_cast< sal_Int32 >( *noParaLeftMargin ); -noParaLeftMargin = boost::optional< sal_Int32 >( 0 ); +noParaLeftMargin = boost::none; } if ( noFirstLineIndentation ) { +// Force Paragraph property as zero - impress seems to use the value from previous +// (non) bullet line if not set to zero explicitly :( +aPropSet.setProperty( PROP_ParaFirstLineIndent, 0 ); rioBulletMap[ PROP_FirstLineOffset ] <<= static_cast< sal_Int32 >( *noFirstLineIndentation ); -noFirstLineIndentation = boost::optional< sal_Int32 >( 0 ); +noFirstLineIndentation = boost::none; } if ( nNumberingType != NumberingType::BITMAP && !rioBulletMap.hasProperty( PROP_BulletColor ) && pFilterBase ) rioBulletMap[ PROP_BulletColor ] <<= static_cast< sal_Int32 >( maTextCharacterProperties.maCharColor.getColor( pFilterBase->getGraphicHelper())); @@ -467,7 +471,18 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p if ( noParaLeftMargin ) aPropSet.setProperty( PROP_ParaLeftMargin, sal_Int32( *noParaLeftMargin ) ); if ( noFirstLineIndentation ) +{ aPropSet.setProperty( PROP_ParaFirstLineIndent, *noFirstLineIndentation ); +if( bPushDefaultValues ) +{ +// Reset TabStops - these would be auto calculated by Impress +TabStop aTabStop; +aTabStop.Position = 0; +Sequence< TabStop > aSeq(1); +aSeq[0] = aTabStop; +aPropSet.setProperty( PROP_ParaTabStops, aSeq ); +} +} } float TextParagraphProperties::getCharHeightPoints( float fDefault ) const ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits