editeng/source/uno/unonrule.cxx | 6 + filter/inc/filter/msfilter/svdfppt.hxx | 9 + filter/source/msfilter/escherex.cxx | 104 ++++++++++++++++------ filter/source/msfilter/svdfppt.cxx | 58 +++++++++++- sd/source/filter/eppt/epptso.cxx | 31 +++++- sd/source/ui/animations/CustomAnimationDialog.cxx | 19 ++-- sw/source/core/text/itrpaint.cxx | 10 +- sw/source/filter/ww8/wrtww8.cxx | 30 +++++- sw/source/filter/ww8/wrtww8gr.cxx | 17 +++ sw/source/filter/ww8/ww8atr.cxx | 2 10 files changed, 237 insertions(+), 49 deletions(-)
New commits: commit a72e3ed81a0d619b81074cb80d7ef9d3d11feda6 Author: Armin Le Grand <a...@apache.org> Date: Thu Sep 27 14:24:57 2012 +0000 Fix #121074# Added support for bitmap attributes transparency, red, green, blue and gamma for ppt export (cherry picked from commit df0f83c87148769ca7cbcfc3d1cb9ccf9d5c0540) Conflicts: filter/source/msfilter/escherex.cxx Change-Id: If413df9bac6d0144f6650f5d9ae99834f6a33642 diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index e68b87e..330f7c0 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1008,11 +1008,6 @@ void EscherPropertyContainer::ImplCreateGraphicAttributes( const ::com::sun::sta ::com::sun::star::drawing::ColorMode eColorMode( ::com::sun::star::drawing::ColorMode_STANDARD ); sal_Int16 nLuminance = 0; sal_Int32 nContrast = 0; - sal_Int16 nRed = 0; - sal_Int16 nGreen = 0; - sal_Int16 nBlue = 0; - double fGamma = 1.0; - sal_Int16 nTransparency = 0; if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, OUString( "GraphicColorMode" ) ) ) aAny >>= eColorMode; @@ -1024,16 +1019,6 @@ void EscherPropertyContainer::ImplCreateGraphicAttributes( const ::com::sun::sta aAny >>= nC; nContrast = nC; } - if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, OUString( "AdjustRed" ) ) ) - aAny >>= nRed; - if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, OUString( "AdjustGreen" ) ) ) - aAny >>= nGreen; - if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, OUString( "AdjustBlue" ) ) ) - aAny >>= nBlue; - if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, OUString( "Gamma" ) ) ) - aAny >>= fGamma; - if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, OUString( "Transparency" ) ) ) - aAny >>= nTransparency; if ( eColorMode == ::com::sun::star::drawing::ColorMode_WATERMARK ) { @@ -1286,6 +1271,12 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( OUString aGraphicUrl; OString aUniqueId; bool bIsGraphicMtf(false); + // #121074# + sal_Int16 nTransparency(0); + sal_Int16 nRed(0); + sal_Int16 nGreen(0); + sal_Int16 nBlue(0); + double fGamma(1.0); ::com::sun::star::drawing::BitmapMode eBitmapMode( ::com::sun::star::drawing::BitmapMode_NO_REPEAT ); ::com::sun::star::uno::Any aAny; @@ -1365,6 +1356,33 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, OUString( "IsMirrored" ), sal_True ) ) aAny >>= bMirrored; + // #121074# transparency of graphic is not supported in MS formats, get and apply it + // in the GetTransformedGraphic call in GetBlibID + if(EscherPropertyValueHelper::GetPropertyValue(aAny, rXPropSet, String(RTL_CONSTASCII_USTRINGPARAM("Transparency")))) + { + aAny >>= nTransparency; + } + + if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "AdjustRed" ) ) ) ) + { + aAny >>= nRed; + } + + if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "AdjustGreen" ) ) ) ) + { + aAny >>= nGreen; + } + + if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "AdjustBlue" ) ) ) ) + { + aAny >>= nBlue; + } + + if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Gamma" ) ) ) ) + { + aAny >>= fGamma; + } + if ( bCreateFillBitmap && bFillBitmapModeAllowed ) { if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, OUString( "FillBitmapMode" ), sal_True ) ) @@ -1401,7 +1419,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( const sal_uInt16 nFormat = aDescriptor.GetFileFormat(); // can MSO handle it? - if ( bMirrored || nAngle || + if ( bMirrored || nAngle || nTransparency || nRed || nGreen || nBlue || (1.0 != fGamma) || (nFormat != GFF_BMP && nFormat != GFF_GIF && nFormat != GFF_JPG && @@ -1448,13 +1466,45 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( if ( aGraphicUrl.getLength() || !aUniqueId.isEmpty() ) { - if ( bMirrored || nAngle ) + if(bMirrored || nTransparency || nRed || nGreen || nBlue || (1.0 != fGamma)) { pGraphicAttr = new GraphicAttr; - if ( bMirrored ) - pGraphicAttr->SetMirrorFlags( BMP_MIRROR_HORZ ); - if ( bIsGraphicMtf ) - AddOpt( ESCHER_Prop_Rotation, ( ( ((sal_Int32)nAngle << 16 ) / 10 ) + 0x8000 ) &~ 0xffff ); + + if(bMirrored) + { + pGraphicAttr->SetMirrorFlags(BMP_MIRROR_HORZ); + } + + // #121074# + if(nTransparency) + { + pGraphicAttr->SetTransparency((nTransparency * 255) / 100); + } + + if(nRed) + { + pGraphicAttr->SetChannelR(nRed); + } + + if(nGreen) + { + pGraphicAttr->SetChannelG(nGreen); + } + + if(nBlue) + { + pGraphicAttr->SetChannelB(nBlue); + } + + if(1.0 != fGamma) + { + pGraphicAttr->SetGamma(fGamma); + } + } + + if(nAngle && bIsGraphicMtf) + { + AddOpt( ESCHER_Prop_Rotation, ( ( ((sal_Int32)nAngle << 16 ) / 10 ) + 0x8000 ) &~ 0xffff ); } if ( eBitmapMode == ::com::sun::star::drawing::BitmapMode_REPEAT ) @@ -1498,18 +1548,20 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect ) { Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() ); + const sal_uInt32 nBlibId(pGraphicProvider->GetBlibID(*pPicOutStrm, aUniqueId, aRect, NULL, pGraphicAttr)); - sal_uInt32 nBlibId = 0; - nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, aRect, NULL, pGraphicAttr ); - if ( nBlibId ) + if(nBlibId) { - if ( bCreateFillBitmap ) - AddOpt( ESCHER_Prop_fillBlip, nBlibId, sal_True ); + if(bCreateFillBitmap) + { + AddOpt(ESCHER_Prop_fillBlip, nBlibId, sal_True); + } else { AddOpt( ESCHER_Prop_pib, nBlibId, sal_True ); ImplCreateGraphicAttributes( rXPropSet, nBlibId, bCreateCroppingAttributes ); } + bRetValue = sal_True; } } commit ed6d89dd55cff5ca91ecbfc8716a4e6c584be165 Author: Andre Fischer <a...@apache.org> Date: Wed Jun 13 06:57:37 2012 +0000 Fix #i119532# Fixed export of bullet color. Patch by: SunYing Review and minor changes by: Andre Fischer Conflicts: filter/source/msfilter/svdfppt.cxx Change-Id: I2841e041b571ed5cfa848ad1029c57fc547a621a diff --git a/filter/inc/filter/msfilter/svdfppt.hxx b/filter/inc/filter/msfilter/svdfppt.hxx index fffcc86b..2fbf096 100644 --- a/filter/inc/filter/msfilter/svdfppt.hxx +++ b/filter/inc/filter/msfilter/svdfppt.hxx @@ -914,6 +914,14 @@ struct ImplPPTCharPropSet struct PPTCharPropSet { + //when the bullet text has more than two color,next the text following with bullet has been set hyperlink. + //now,the bullet color should be set original hyperlink text's color + //so "mbHardHylinkOrigColor" hold the original hyperlink text's color. + sal_uInt32 mnHylinkOrigColor; + //the bullet text weather has a hyperlink. + sal_Bool mbIsHyperlink; + //the hyperlink text weather has a custom color. + sal_Bool mbHardHylinkOrigColor; sal_uInt32 mnOriginalTextPos; sal_uInt32 mnParagraph; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 4301299..93aaeaf 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -4384,11 +4384,17 @@ PPTCharPropSet::PPTCharPropSet( sal_uInt32 nParagraph ) : mpFieldItem ( NULL ), pCharSet ( new ImplPPTCharPropSet ) { + mnHylinkOrigColor = 0; + mbIsHyperlink = sal_False; + mbHardHylinkOrigColor = sal_False; mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = 0; } PPTCharPropSet::PPTCharPropSet( const PPTCharPropSet& rCharPropSet ) { + mnHylinkOrigColor = rCharPropSet.mnHylinkOrigColor; + mbIsHyperlink = rCharPropSet.mbIsHyperlink; + mbHardHylinkOrigColor = rCharPropSet.mbHardHylinkOrigColor; pCharSet = rCharPropSet.pCharSet; pCharSet->mnRefCount++; @@ -4406,6 +4412,10 @@ PPTCharPropSet::PPTCharPropSet( const PPTCharPropSet& rCharPropSet, sal_uInt32 n pCharSet = rCharPropSet.pCharSet; pCharSet->mnRefCount++; + mnHylinkOrigColor = rCharPropSet.mnHylinkOrigColor; + mbIsHyperlink = rCharPropSet.mbIsHyperlink; + mbHardHylinkOrigColor = rCharPropSet.mbHardHylinkOrigColor; + mnParagraph = nParagraph; mnOriginalTextPos = rCharPropSet.mnOriginalTextPos; maString = rCharPropSet.maString; @@ -5952,8 +5962,18 @@ sal_Bool PPTParagraphObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& nRetValue, sa if (!m_PortionList.empty()) { PPTPortionObj const& rPortion = m_PortionList.front(); - bIsHardAttribute = rPortion.GetAttrib( - PPT_CharAttr_FontColor, nRetValue, nDestinationInstance); + if (rPortion.mbIsHyperlink ) + { + if( rPortion.mbHardHylinkOrigColor ) + nRetValue = rPortion.mnHylinkOrigColor; + else + nRetValue = mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ pParaSet->mnDepth ].mnFontColor; + bIsHardAttribute = sal_True; + } + else + { + bIsHardAttribute = rPortion.GetAttrib( PPT_CharAttr_FontColor, nRetValue, nDestinationInstance ); + } } else { @@ -6892,6 +6912,10 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport const SvxURLField* pField = (const SvxURLField*)(*FE)->pField1->GetField(); + pCurrent->mbIsHyperlink=sal_True; + pCurrent->mnHylinkOrigColor=pCurrent->pCharSet->mnColor; + pCurrent->mbHardHylinkOrigColor= ( ( pCurrent->pCharSet->mnAttrSet >>PPT_CharAttr_FontColor ) & 1)>0; + if ( pCurrent->mpFieldItem ) { pCurrent->SetColor( PPT_COLSCHEME_A_UND_HYPERLINK ); commit b86cf0421b432ebbf964960f0fcd2e6a5360f979 Author: Zhe Wang <wangz...@apache.org> Date: Mon Jun 25 05:04:59 2012 +0000 for #120049#(cherry picked from commit 9b4e6064f9598c834a9c36c39932f3e326419d44) diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index 797cd68..14722bb 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -2323,15 +2323,20 @@ void CustomAnimationTextAnimTabPage::update( STLPropertySet* pSet ) pSet->setPropertyValue( nHandleTextGroupingAuto, makeAny( fTextGroupingAuto ) ); } } + //bug 120049 + //[crash] Aoo crash when modify the "Random effects" animation effect's trigger condition to "Start effect on click of" . + //If this control is disabled, we should ignore its value + if (maCBXAnimateForm.IsEnabled()) + { + sal_Bool bAnimateForm = maCBXAnimateForm.IsChecked(); + sal_Bool bOldAnimateForm = !bAnimateForm; - sal_Bool bAnimateForm = maCBXAnimateForm.IsChecked(); - sal_Bool bOldAnimateForm = !bAnimateForm; - - if(mpSet->getPropertyState( nHandleAnimateForm ) != STLPropertyState_AMBIGUOUS) - mpSet->getPropertyValue( nHandleAnimateForm ) >>= bOldAnimateForm; + if(mpSet->getPropertyState( nHandleAnimateForm ) != STLPropertyState_AMBIGUOUS) + mpSet->getPropertyValue( nHandleAnimateForm ) >>= bOldAnimateForm; - if( bAnimateForm != bOldAnimateForm ) - pSet->setPropertyValue( nHandleAnimateForm, makeAny( bAnimateForm ) ); + if( bAnimateForm != bOldAnimateForm ) + pSet->setPropertyValue( nHandleAnimateForm, makeAny( bAnimateForm ) ); + } } void CustomAnimationTextAnimTabPage::updateControlStates() commit 7ec7a9a68b4a9c5600840a34434fc800cda3d815 Author: Lei De Bin <le...@apache.org> Date: Thu Jul 19 01:26:26 2012 +0000 Fix #120224# Mapping the text rotation in Writer table cell with MSO Reported by: Yan Ji Patch by: Chen Zuo Jun Review by: Lei De Bin Conflicts: sw/source/filter/ww8/wrtww8.cxx Change-Id: I4d830cbedc033ec7abb6d0d1d4e1572ce5f45c26 diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 550e1af..e997d61 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -109,6 +109,7 @@ #include <rtl/random.h> #include <vcl/svapp.hxx> #include "WW8Sttbf.hxx" +#include <editeng/charrotateitem.hxx> #include "WW8FibData.hxx" #include "numrule.hxx"//For i120928 @@ -1969,7 +1970,7 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa } } -static sal_uInt16 lcl_TCFlags(const SwTableBox * pBox, sal_Int32 nRowSpan) +static sal_uInt16 lcl_TCFlags(SwDoc &rDoc, const SwTableBox * pBox, sal_Int32 nRowSpan) { sal_uInt16 nFlags = 0; @@ -1992,6 +1993,31 @@ static sal_uInt16 lcl_TCFlags(const SwTableBox * pBox, sal_Int32 nRowSpan) default: break; } + const SwStartNode * pSttNd = pBox->GetSttNd(); + if(pSttNd) + { + SwNodeIndex aIdx( *pSttNd ); + const SwCntntNode * pCNd = pSttNd->GetNodes().GoNext( &aIdx ); + if( pCNd && pCNd->IsTxtNode()) + { + SfxItemSet aCoreSet(rDoc.GetAttrPool(), RES_CHRATR_ROTATE, RES_CHRATR_ROTATE); + ((SwTxtNode*)pCNd)->GetAttr( aCoreSet, 0, !((SwTxtNode*)pCNd)->GetTxt().isEmpty()); + const SvxCharRotateItem * pRotate = NULL; + const SfxPoolItem * pRotItem; + if ( SFX_ITEM_SET == aCoreSet.GetItemState(RES_CHRATR_ROTATE, sal_True, &pRotItem)) + { + pRotate = (SvxCharRotateItem*)pRotItem; + if(pRotate && pRotate->GetValue() == 900) + { + nFlags = nFlags | 0x0004 | 0x0008; + } + else if(pRotate && pRotate->GetValue() == 2700 ) + { + nFlags = nFlags | 0x0004 | 0x0010; + } + } + } + } } return nFlags; @@ -2264,7 +2290,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t if ( m_rWW8Export.bWrtWW8 ) { sal_uInt16 nFlags = - lcl_TCFlags(pTabBox1, *aItRowSpans); + lcl_TCFlags(*m_rWW8Export.pDoc, pTabBox1, *aItRowSpans); m_rWW8Export.InsUInt16( nFlags ); } commit ad2651af85181235a0c3a44bf93d7ecb08dd9353 Author: Lei De Bin <le...@apache.org> Date: Fri Jul 20 01:11:03 2012 +0000 Fix #120233# fix ppt import bullet size error Reported by: liu ping tan Patch by: Sun Ying Review by: Lei De Bin(cherry picked from commit 7025f6c6441b49093504874925f37ca0e61f34f9) Conflicts: filter/inc/filter/msfilter/svdfppt.hxx Change-Id: I6f72599bc897d5d7bf46fa88c8b2899b3a2e0c15 diff --git a/filter/inc/filter/msfilter/svdfppt.hxx b/filter/inc/filter/msfilter/svdfppt.hxx index fcc704f..fffcc86b 100644 --- a/filter/inc/filter/msfilter/svdfppt.hxx +++ b/filter/inc/filter/msfilter/svdfppt.hxx @@ -786,6 +786,7 @@ public: sal_uInt32 nLevel, sal_Bool bFirst ); + void UpdateBulletRelSize( sal_uInt32 nLevel, sal_uInt16 nFontHeight ); }; class PPTParagraphObj; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 0921f64..4301299 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -4002,6 +4002,18 @@ void PPTParaSheet::Read( SdrPowerPointImport& } } +void PPTParaSheet::UpdateBulletRelSize( sal_uInt32 nLevel, sal_uInt16 nFontHeight ) +{ + if ( maParaLevel[ nLevel ].mnBulletHeight > 0x7fff ) // a negative value is the absolute bullet height + { + sal_Int16 nBulletRelSize = ( sal_Int16 )maParaLevel[ nLevel ].mnBulletHeight; + nBulletRelSize = nFontHeight ? ((-nBulletRelSize) * 100 ) / nFontHeight : 100; + if ( nBulletRelSize < 0 ) //bullet size over flow + nBulletRelSize = 100; + maParaLevel[ nLevel ].mnBulletHeight = nBulletRelSize; + } +} + PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, SdrPowerPointImport& rManager, const PPTTextCharacterStyleAtomInterpreter& /*rTxCFStyle*/, const PPTTextParagraphStyleAtomInterpreter& rTxPFStyle, const PPTTextSpecInfo& rTextSpecInfo ) : @@ -4072,6 +4084,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd } } mpCharSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->Read( rIn, sal_True, nLev, bFirst ); + mpParaSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->UpdateBulletRelSize( nLev, mpCharSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->maCharLevel[ nLev ].mnFontHeight ); bFirst = sal_False; nLev++; } @@ -4160,6 +4173,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd } mpParaSheet[ nInstance ]->Read( rManager, rIn, sal_True, nLev, bFirst ); mpCharSheet[ nInstance ]->Read( rIn, sal_True, nLev, bFirst ); + mpParaSheet[ nInstance ]->UpdateBulletRelSize( nLev, mpCharSheet[ nInstance ]->maCharLevel[ nLev ].mnFontHeight ); bFirst = sal_False; nLev++; } @@ -4254,6 +4268,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd } } mpCharSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->Read( rIn, sal_True, nLev, bFirst ); + mpParaSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->UpdateBulletRelSize( nLev, mpCharSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->maCharLevel[ nLev ].mnFontHeight ); bFirst = sal_False; nLev++; } commit 8b5cd38aae487dc2a84a1ee0f56e25daca851b02 Author: Jian Hong Cheng <chen...@apache.org> Date: Wed Aug 22 04:35:05 2012 +0000 Fix issue #i119650: Font size increased if saved by AOO * sw/source/filter/ww8/ww8atr.cxx MS Word Binary compatibility Patch by: Chen Peng,<chenpeng2...@gmail.com> Found by: Yan Ji,<yanji...@gmail.com> Review by: Jian Hong Cheng,<chen...@apache.org>(cherry picked from commit 980ee15bad53f765a0df1a4507befc9184fc0c63) Conflicts: sw/source/filter/ww8/ww8atr.cxx Change-Id: I6f2d3bcd4cea6718e1291c3297fd4a3681c07ee8 diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 7c8560c..b212337 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -937,6 +937,8 @@ void WW8AttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe TableInfoRow( pTextNodeInfoInner ); m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->size(), m_rWW8Export.pO->data()); m_rWW8Export.pO->clear(); + //For Bug 119650, should break the properties of CHP PLC after a paragraph end. + m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->size(), m_rWW8Export.pO->data()); } } } commit 844e62d5ab9ddc77a1ea859653549ea71bcb6656 Author: Sun Ying <suny...@apache.org> Date: Thu Aug 16 04:20:44 2012 +0000 Fix #119523# fix the indent and left margin attribute lost when save as .ppt Reported by: liupingtan Patch by: Ying Sun Review by: Jian Yuan Li(cherry picked from commit 6fa2e38b9cd3ce0df5876d849bcba7d879a6e329) Conflicts: sd/source/filter/eppt/epptso.cxx Change-Id: I41150838d153c3b99e603924127787f5556ef383 diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index cb8cce6..0921f64 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -4876,9 +4876,15 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport& if ( nMask & 0x4000 ) // pfSpaceAfter rIn >> aSet.mpArry[ PPT_ParaAttr_LowerDist ]; if ( nMask & 0x100 ) // pfLeftMargin - rIn >> nDummy16; + { + rIn >> aSet.mpArry[ PPT_ParaAttr_TextOfs ]; + aSet.mnAttrSet |= 1 << PPT_ParaAttr_TextOfs; + } if ( nMask & 0x400 ) // pfIndent - rIn >> nDummy16; + { + rIn >> aSet.mpArry[ PPT_ParaAttr_BulletOfs ]; + aSet.mnAttrSet |= 1 << PPT_ParaAttr_BulletOfs; + } if ( nMask & 0x8000 ) // pfDefaultTabSize rIn >> nDummy16; if ( nMask & 0x100000 ) // pfTabStops @@ -4910,9 +4916,10 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport& else nCharCount = nStringLen; - if ( rRuler.GetTextOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_TextOfs ] ) ) + //if the textofs attr has been read at above, need not to reset. + if ( ( !( aSet.mnAttrSet & 1 << PPT_ParaAttr_TextOfs ) ) && rRuler.GetTextOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_TextOfs ] ) ) aSet.mnAttrSet |= 1 << PPT_ParaAttr_TextOfs; - if ( rRuler.GetBulletOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_BulletOfs ] ) ) + if ( ( !( aSet.mnAttrSet & 1 << PPT_ParaAttr_BulletOfs ) ) && rRuler.GetBulletOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_BulletOfs ] ) ) aSet.mnAttrSet |= 1 << PPT_ParaAttr_BulletOfs; if ( rRuler.GetDefaultTab( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_DefaultTab ] ) ) aSet.mnAttrSet |= 1 << PPT_ParaAttr_DefaultTab; diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 0533283..16f9ae0 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -798,6 +798,13 @@ void PPTWriter::ImplWriteParagraphs( SvStream& rOut, TextObj& rTextObj ) nPropertyFlags |= 1; // turn off bullet explicit nBulletFlags = 0; } + + // Write nTextOfs and nBullets + if ( mpStyleSheet->IsHardAttribute( nInstance, nDepth, ParaAttr_TextOfs, pPara->nTextOfs ) ) + nPropertyFlags |= 0x100; + if ( mpStyleSheet->IsHardAttribute( nInstance, nDepth, ParaAttr_BulletOfs, pPara->nBulletOfs )) + nPropertyFlags |= 0x400; + FontCollectionEntry aFontDescEntry( pPara->aFontDesc.Name, pPara->aFontDesc.Family, pPara->aFontDesc.Pitch, pPara->aFontDesc.CharSet ); sal_uInt16 nFontId = (sal_uInt16)maFontCollection.GetId( aFontDescEntry ); @@ -836,6 +843,10 @@ void PPTWriter::ImplWriteParagraphs( SvStream& rOut, TextObj& rTextObj ) rOut << (sal_uInt16)( pPara->mnLineSpacingTop ); if ( nPropertyFlags & 0x00004000 ) rOut << (sal_uInt16)( pPara->mnLineSpacingBottom ); + if ( nPropertyFlags & 0x100 ) + rOut << (sal_uInt16)(pPara->nTextOfs); + if ( nPropertyFlags & 0x400 ) + rOut << (sal_uInt16)(pPara->nBulletOfs); if ( nPropertyFlags & 0x000e0000 ) { sal_uInt16 nAsianSettings = 0; commit b619ffdbb3656bc01a603afb26caea8a483bc5ec Author: Sun Ying <suny...@apache.org> Date: Thu Aug 16 02:22:49 2012 +0000 #119515# fix the numbering bullet in table cell changed when saved to .ppt file Reported by: liupingtan Patch by: Ying Sun Review by: Jian Yuan Li diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index a67fbdf..0533283 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -3701,15 +3701,27 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc ImplWriteTextStyleAtom( aClientTextBox, EPP_TEXTTYPE_Other, 0, NULL, aExtBu, &aPropOptSp ); + // need write client data for extend bullet + if ( aExtBu.Tell() ) + { + SvMemoryStream* pClientData = new SvMemoryStream( 0x200, 0x200 ); + ImplProgTagContainer( pClientData, &aExtBu ); + *mpStrm << (sal_uInt32)( ( ESCHER_ClientData << 16 ) | 0xf ) + << (sal_uInt32)pClientData->Tell(); + + mpStrm->Write( pClientData->GetData(), pClientData->Tell() ); + delete pClientData, pClientData = NULL; + } + aPropOptSp.Commit( *mpStrm ); mpPptEscherEx->AddAtom( 16, ESCHER_ChildAnchor ); *mpStrm << nLeft - << nTop - << nRight - << nBottom; + << nTop + << nRight + << nBottom; *mpStrm << (sal_uInt32)( ( ESCHER_ClientTextbox << 16 ) | 0xf ) - << (sal_uInt32)aClientTextBox.Tell(); + << (sal_uInt32)aClientTextBox.Tell(); mpStrm->Write( aClientTextBox.GetData(), aClientTextBox.Tell() ); mpPptEscherEx->CloseContainer(); commit 461c262eb93412b46cc73a28932afdcbaeb34748 Author: Jian Hong Cheng <chen...@apache.org> Date: Fri Aug 24 02:14:25 2012 +0000 Fix issue #i120568: Hyperlink of Graphihc with Anchor Type "As Character" lost after save as doc format * main/sw/source/filter/ww8/wrtww8gr.cxx MS Word Binary compatibility Patch by: Huaidong Qiu,<qiuhuaid...@gmail.com> Found by: Huaidong Qiu,<qiuhuaid...@gmail.com> Review by: Jian Hong Cheng,<chen...@apache.org> (cherry picked from commit bf1449731638d6432fb9adfef3a8a303ad9bf76b) Conflicts: sw/source/filter/ww8/wrtww8gr.cxx Change-Id: I6a5923a015eefc8aaadeacd897848cf1a2f15362 diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index 61632d5..74f46da 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -60,6 +60,9 @@ #include "wrtww8.hxx" #include "ww8par.hxx" #include "escher.hxx" +//Added for i120568 +#include "ww8attributeoutput.hxx" +#include "fmturl.hxx" #include "docsh.hxx" #include <cstdio> @@ -381,6 +384,16 @@ void WW8Export::OutputLinkedOLE( const OUString& rOleId ) void WW8Export::OutGrf(const sw::Frame &rFrame) { + //Added for i120568,the hyperlink info within a graphic whose anchor type is "As character" + //will be exported to ensure the fidelity + const SwFmtURL& rURL = rFrame.GetFrmFmt().GetAttrSet().GetURL(); + bool bURLStarted = false; + if( rURL.GetURL().Len() && rFrame.GetWriterType() == sw::Frame::eGraphic) + { + bURLStarted = true; + m_pAttrOutput->StartURL( rURL.GetURL(), rURL.GetTargetFrameName() ); + } + // Store the graphic settings in GrfNode so they may be written-out later pGrf->Insert(rFrame); @@ -498,6 +511,10 @@ void WW8Export::OutGrf(const sw::Frame &rFrame) { OutputField( 0, ww::eINCLUDEPICTURE, String(), WRITEFIELD_CLOSE ); } + //Added for i120568,the hyperlink info within a graphic whose anchor type is + //"As character" will be exported to ensure the fidelity + if( bURLStarted ) + m_pAttrOutput->EndURL(); } GraphicDetails& GraphicDetails::operator=(const GraphicDetails &rOther) commit 67f9ccaebf0f79f9e51717d5365aee1b9bcbd486 Author: Jian Hong Cheng <chen...@apache.org> Date: Tue Sep 4 06:09:46 2012 +0000 Fix issue #i120769: Color of underline display wrongly * sw/source/core/text/itrpaint.cxx Core function and MS Word Binary compatibility Patch by: Jane Kang,<kangjane2...@gmail.com> Found by: Yan Ji,<yanji...@gmail.com> Review by: Jian Hong Cheng,<chen...@apache.org> (cherry picked from commit 70f7599d7ec5f3c14a42cd5dc94519fead070cfd) diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index 981c2df..3043bf4 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -497,11 +497,13 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor, // If current underline matches the common underline font, we continue // to use the common underline font. + //Bug 120769:Color of underline display wrongly + Color aAutoCo(COL_AUTO); if ( GetInfo().GetUnderFnt() && - GetInfo().GetUnderFnt()->GetFont().GetUnderline() == - GetFnt()->GetUnderline() ) - return; - + GetInfo().GetUnderFnt()->GetFont().GetUnderline() == GetFnt()->GetUnderline() && + GetInfo().GetFont() && GetInfo().GetFont()->GetUnderColor() != aAutoCo ) + return; + //Bug 120769(End) // calculate the new common underline font SwFont* pUnderlineFnt = 0; Point aCommonBaseLine; commit 7a90044df279e1ec2336e7c398fa938a6fa3ad56 Author: Armin Le Grand <a...@apache.org> Date: Thu Sep 6 11:41:07 2012 +0000 #120650# truncate mis-sized bullet sizes to useful values Patch by: Tang Meng Review by: alg(cherry picked from commit e5720990bd3691222363bb2d674b7d39a0d8829f) diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx index a69fdc7..ea028e1 100644 --- a/editeng/source/uno/unonrule.cxx +++ b/editeng/source/uno/unonrule.cxx @@ -439,6 +439,12 @@ void SvxUnoNumberingRules::setNumberingRuleByIndex( const Sequence< beans::Prope sal_Int16 nSize = sal_Int16(); if( aVal >>= nSize ) { + // [Bug 120650] the slide content corrupt when open in Aoo + if ((nSize>250)||(nSize<=0)) + { + nSize = 100; + } + aFmt.SetBulletRelSize( (short)nSize ); continue; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits