filter/source/msfilter/msdffimp.cxx | 68 ++++++++++++++++++++-------------- svx/source/svdraw/svdotext.cxx | 8 +--- svx/source/svdraw/svdundo.cxx | 70 +++++++++++++++++++++++++++++------- svx/source/table/tableundo.cxx | 7 +++ sw/source/ui/docvw/SidebarWin.cxx | 3 + 5 files changed, 107 insertions(+), 49 deletions(-)
New commits: commit 88b1d35131b0ea44ac6ba6f7edeab82d1c29a39f Author: Armin Le Grand <a...@apache.org> Date: Wed Mar 26 15:38:38 2014 +0000 i120201 added forcing TableLayouter to take action in table undo/redo (CellUndo) diff --git a/svx/source/table/tableundo.cxx b/svx/source/table/tableundo.cxx index fe9eae5..361bd9d 100644 --- a/svx/source/table/tableundo.cxx +++ b/svx/source/table/tableundo.cxx @@ -136,8 +136,13 @@ void CellUndo::setDataToCell( const Data& rData ) mxCell->mnRowSpan = rData.mnRowSpan; mxCell->mnColSpan = rData.mnColSpan; - if( mxObjRef.is() ) + if(mxObjRef.is()) + { + // #120201# ActionChanged is not enough, we need to trigger TableLayouter::UpdateBorderLayout() + // and this is done best using ReformatText() for table objects mxObjRef->ActionChanged(); + mxObjRef->NbcReformatText(); + } } void CellUndo::getDataFromCell( Data& rData ) commit b8c793949e416432619d3c7d7611fc44694c3b77 Author: Oliver-Rainer Wittmann <o...@apache.org> Date: Wed Mar 26 13:52:38 2014 +0000 124514: show/hide Overlay object to highlight annotated text range according the according view option which show/hides the annotations/comments diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx index cdcbcb7..6ab8561 100644 --- a/sw/source/ui/docvw/SidebarWin.cxx +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -579,7 +579,8 @@ void SwSidebarWin::SetPosAndSize() } // text range overlay - if ( mrSidebarItem.maLayoutInfo.mnStartNodeIdx != 0 + if ( mrMgr.ShowNotes() + && mrSidebarItem.maLayoutInfo.mnStartNodeIdx != 0 && mrSidebarItem.maLayoutInfo.mnStartContent != STRING_NOTFOUND ) { std::vector< basegfx::B2DRange > aAnnotationTextRanges; commit c55d29bd33ece4b96fd8bf6babcfa4c99dfc468d Author: Armin Le Grand <a...@apache.org> Date: Wed Mar 26 12:48:17 2014 +0000 i124389 correct TextFrame layout for tables not when new text is set, but in UNdo/Redo directly for performance reasons diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 59cf55b..41eee32 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -63,7 +63,6 @@ #include <drawinglayer/geometry/viewinformation2d.hxx> #include <vcl/virdev.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> -#include <svx/svdotable.hxx> ////////////////////////////////////////////////////////////////////////////// @@ -1501,11 +1500,8 @@ void SdrTextObj::NbcSetOutlinerParaObjectForText( OutlinerParaObject* pTextObjec } SetTextSizeDirty(); - - // #124389# also need to call NbcAdjustTextFrameWidthAndHeight when we are a table object (triggered from undo) - if((IsTextFrame() || 0 != dynamic_cast< sdr::table::SdrTableObj* >(this)) && (IsAutoGrowHeight() || IsAutoGrowWidth())) - { - // adapt text frame + if (IsTextFrame() && (IsAutoGrowHeight() || IsAutoGrowWidth())) + { // Textrahmen anpassen! NbcAdjustTextFrameWidthAndHeight(); } if (!IsTextFrame()) diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index f5ec0e9..bc8619f 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -46,6 +46,9 @@ #include <svx/svdograf.hxx> #include <svx/sdr/contact/viewcontactofgraphic.hxx> +// #124389# +#include <svx/svdotable.hxx> + //////////////////////////////////////////////////////////////////////////////////////////////////// // iterates over all views and unmarks this SdrObject if it is marked @@ -1187,49 +1190,92 @@ void SdrUndoObjSetText::AfterSetText() void SdrUndoObjSetText::Undo() { + // only works with SdrTextObj + SdrTextObj* pTarget = dynamic_cast< SdrTextObj* >(pObj); + + if(!pTarget) + { + OSL_ENSURE(false, "SdrUndoObjSetText::Undo with SdrObject not based on SdrTextObj (!)"); + return; + } + // #94278# Trigger PageChangeCall ImpShowPageOfThisObject(); // alten Text sichern fuer Redo - if (!bNewTextAvailable) + if(!bNewTextAvailable) + { AfterSetText(); + } // Text fuer Undo kopieren, denn SetOutlinerParaObject() ist Eigentumsuebereignung OutlinerParaObject* pText1 = pOldText; + if(pText1) + { pText1 = new OutlinerParaObject(*pText1); + } - SdrText* pText = static_cast< SdrTextObj*>( pObj )->getText(mnText); - if( pText ) - static_cast< SdrTextObj* >( pObj )->NbcSetOutlinerParaObjectForText( pText1, pText ); + SdrText* pText = pTarget->getText(mnText); - pObj->SetEmptyPresObj( bEmptyPresObj ); - pObj->ActionChanged(); + if(pText) + { + pTarget->NbcSetOutlinerParaObjectForText(pText1, pText); + } + + pTarget->SetEmptyPresObj(bEmptyPresObj); + pTarget->ActionChanged(); + + // #124389# if it's a table, als oneed to relayout TextFrame + if(0 != dynamic_cast< sdr::table::SdrTableObj* >(pTarget)) + { + pTarget->NbcAdjustTextFrameWidthAndHeight(); + } // #122410# SetOutlinerParaObject at SdrText does not trigger a // BroadcastObjectChange, but it is needed to make evtl. SlideSorters // update their preview. - pObj->BroadcastObjectChange(); + pTarget->BroadcastObjectChange(); } void SdrUndoObjSetText::Redo() { + // only works with SdrTextObj + SdrTextObj* pTarget = dynamic_cast< SdrTextObj* >(pObj); + + if(!pTarget) + { + OSL_ENSURE(false, "SdrUndoObjSetText::Redo with SdrObject not based on SdrTextObj (!)"); + return; + } + // Text fuer Undo kopieren, denn SetOutlinerParaObject() ist Eigentumsuebereignung OutlinerParaObject* pText1 = pNewText; if(pText1) + { pText1 = new OutlinerParaObject(*pText1); + } + + SdrText* pText = pTarget->getText(mnText); - SdrText* pText = static_cast< SdrTextObj*>( pObj )->getText(mnText); - if( pText ) - static_cast< SdrTextObj* >( pObj )->NbcSetOutlinerParaObjectForText( pText1, pText ); + if(pText) + { + pTarget->NbcSetOutlinerParaObjectForText(pText1, pText); + } - pObj->ActionChanged(); + pTarget->ActionChanged(); + + // #124389# if it's a table, als oneed to relayout TextFrame + if(0 != dynamic_cast< sdr::table::SdrTableObj* >(pTarget)) + { + pTarget->NbcAdjustTextFrameWidthAndHeight(); + } // #122410# NbcSetOutlinerParaObjectForText at SdrTextObj does not trigger a // BroadcastObjectChange, but it is needed to make evtl. SlideSorters // update their preview. - pObj->BroadcastObjectChange(); + pTarget->BroadcastObjectChange(); // #94278# Trigger PageChangeCall ImpShowPageOfThisObject(); commit 5fb2c24bd0cfc0b911aa2d0389960c5ee3d14c4a Author: Armin Le Grand <a...@apache.org> Date: Wed Mar 26 12:08:21 2014 +0000 i124477 set object shadow always at PPT import, it may be applied to object text diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index b16fd3a..3066357 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -2706,38 +2706,48 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj } if ( bHasShadow ) { - // #160376# sj: activating shadow only if fill and or linestyle is used - // this is required because of the latest drawing layer core changes. - // Issue i104085 is related to this. - sal_uInt32 nLineFlags(GetPropertyValue( DFF_Prop_fNoLineDrawDash )); - if(!IsHardAttribute( DFF_Prop_fLine ) && !IsCustomShapeStrokedByDefault( rObjData.eShapeType )) - nLineFlags &= ~0x08; - sal_uInt32 nFillFlags(GetPropertyValue( DFF_Prop_fNoFillHitTest )); - if(!IsHardAttribute( DFF_Prop_fFilled ) && !IsCustomShapeFilledByDefault( rObjData.eShapeType )) - nFillFlags &= ~0x10; - if ( nFillFlags & 0x10 ) - { - MSO_FillType eMSO_FillType = (MSO_FillType)GetPropertyValue( DFF_Prop_fillType, mso_fillSolid ); - switch( eMSO_FillType ) + static bool bCheckShadow(false); + + // #124477# Found no reason not to set shadow, esp. since it is applied to evtl. existing text + // and will lead to an error of in PPT someone used text and added the object shadow to the + // object carryintg that text. I found no cases where this leads to problems (the old bugtracker + // task #160376# from sj is unfortunately no longer available). Keeping the code for now + // to allow easy fallback when this shows problems in the future + if(bCheckShadow) + { + // #160376# sj: activating shadow only if fill and or linestyle is used + // this is required because of the latest drawing layer core changes. + // Issue i104085 is related to this. + sal_uInt32 nLineFlags(GetPropertyValue( DFF_Prop_fNoLineDrawDash )); + if(!IsHardAttribute( DFF_Prop_fLine ) && !IsCustomShapeStrokedByDefault( rObjData.eShapeType )) + nLineFlags &= ~0x08; + sal_uInt32 nFillFlags(GetPropertyValue( DFF_Prop_fNoFillHitTest )); + if(!IsHardAttribute( DFF_Prop_fFilled ) && !IsCustomShapeFilledByDefault( rObjData.eShapeType )) + nFillFlags &= ~0x10; + if ( nFillFlags & 0x10 ) { - case mso_fillSolid : - case mso_fillPattern : - case mso_fillTexture : - case mso_fillPicture : - case mso_fillShade : - case mso_fillShadeCenter : - case mso_fillShadeShape : - case mso_fillShadeScale : - case mso_fillShadeTitle : - break; - // case mso_fillBackground : - default: - nFillFlags &=~0x10; // no fillstyle used - break; + MSO_FillType eMSO_FillType = (MSO_FillType)GetPropertyValue( DFF_Prop_fillType, mso_fillSolid ); + switch( eMSO_FillType ) + { + case mso_fillSolid : + case mso_fillPattern : + case mso_fillTexture : + case mso_fillPicture : + case mso_fillShade : + case mso_fillShadeCenter : + case mso_fillShadeShape : + case mso_fillShadeScale : + case mso_fillShadeTitle : + break; + // case mso_fillBackground : + default: + nFillFlags &=~0x10; // no fillstyle used + break; + } } + if ( ( ( nLineFlags & 0x08 ) == 0 ) && ( ( nFillFlags & 0x10 ) == 0 ) && ( rObjData.eShapeType != mso_sptPictureFrame )) // if there is no fillstyle and linestyle + bHasShadow = sal_False; // we are turning shadow off. } - if ( ( ( nLineFlags & 0x08 ) == 0 ) && ( ( nFillFlags & 0x10 ) == 0 ) && ( rObjData.eShapeType != mso_sptPictureFrame )) // if there is no fillstyle and linestyle - bHasShadow = sal_False; // we are turning shadow off. if ( bHasShadow ) rSet.Put( SdrShadowItem( bHasShadow ) ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits