Kaydet (Commit) 0982b526 authored tarafından Jianyuan Li's avatar Jianyuan Li Kaydeden (comit) Caolán McNamara

Resolves: #i120554# Shape Gradient MS2003 import/export Enhancement

Reported by: Jianyuan Li
Patch by: Jianyuan Li
Review by: SunYing

(cherry picked from commit 09c33de8)

Conflicts:
	filter/inc/filter/msfilter/escherex.hxx
	filter/inc/filter/msfilter/msdffimp.hxx
	filter/source/msfilter/escherex.cxx
	filter/source/msfilter/msdffimp.cxx

Change-Id: I80a60af4862eb99523ea59e4f788b685d6de1fbd

WaE fixes: reorder initialization, handle all cases in switch, ...

(cherry picked from commit 350f294b)

Conflicts:
	filter/source/msfilter/msdffimp.cxx

Change-Id: I4f1bde463921d48d1e014d0521427eaa9294663e

Add default to switch statements to avoid compiler warnings.

Patch by: Jianyuan Li

(cherry picked from commit f1302af0)

Change-Id: I4e78e3b565d5922d452d2cfd1bf473af1587d29b
üst bbfc9999
......@@ -1270,13 +1270,22 @@ public:
void CreateGradientProperties( const ::com::sun::star::awt::Gradient & rGradient );
void CreateGradientProperties(
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
sal_Bool bTransparentGradient = sal_False
);
void CreateLineProperties(
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
sal_Bool bEdge
);
void CreateFillProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &, sal_Bool bEdge );
void CreateFillProperties(
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
sal_Bool bEdge,
sal_Bool bTransparentGradient = sal_False );
void CreateFillProperties(
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
sal_Bool bEdge,
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape );
void CreateTextProperties(
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
sal_uInt32 nText,
......
......@@ -86,6 +86,8 @@ class MSFILTER_DLLPUBLIC DffPropertyReader : public DffPropSet
public:
sal_Int32 mnFix16Angle;
sal_Bool mbRotateGranientFillWithAngle;
explicit DffPropertyReader( const SvxMSDffManager& rManager );
~DffPropertyReader();
sal_Int32 Fix16ToAngle( sal_Int32 nAngle ) const;
......@@ -99,6 +101,7 @@ public:
void SetDefaultPropSet( SvStream& rIn, sal_uInt32 nOffDgg ) const;
void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const;
void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObjData& rObjData ) const;
void ImportGradientColor( SfxItemSet& aSet, MSO_FillType eMSO_FillType, double dTrans = 1.0 , double dBackTrans = 1.0 ) const;
};
#define COL_DEFAULT RGB_COLORDATA( 0xFA, 0xFB, 0xFC )
......
......@@ -2183,7 +2183,7 @@ sal_Bool PPTWriter::ImplCreatePresentationPlaceholder( const sal_Bool bMasterPag
aPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x110001 );
aPropOpt.AddOpt( ESCHER_Prop_lineColor, 0x8000001 );
aPropOpt.AddOpt( ESCHER_Prop_shadowColor, 0x8000002 );
aPropOpt.CreateFillProperties( mXPropSet, sal_True );
aPropOpt.CreateFillProperties( mXPropSet, sal_True, mXShape );
sal_uInt32 nLineFlags = 0x90001;
if ( aPropOpt.GetOpt( ESCHER_Prop_fNoLineDrawDash, nLineFlags ) )
nLineFlags |= 0x10001; // draw dashed line if no line
......@@ -2235,7 +2235,7 @@ void PPTWriter::ImplCreateTextShape( EscherPropertyContainer& rPropOpt, EscherSo
mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
ImplCreateShape( ESCHER_ShpInst_TextBox, 0xa00, rSolver );
if ( bFill )
rPropOpt.CreateFillProperties( mXPropSet, sal_True );
rPropOpt.CreateFillProperties( mXPropSet, sal_True, mXShape );
if ( ImplGetText() )
rPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60, sal_False, sal_True );
}
......@@ -2394,7 +2394,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
{
ImplCreateShape( eShapeType, nMirrorFlags | 0xa00, aSolverContainer );
aPropOpt.CreateCustomShapeProperties( eShapeType, mXShape );
aPropOpt.CreateFillProperties( mXPropSet, sal_True );
aPropOpt.CreateFillProperties( mXPropSet, sal_True, mXShape);
if ( ImplGetText() )
{
if ( !aPropOpt.IsFontWork() )
......@@ -2428,7 +2428,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
{
ImplCreateShape( ESCHER_ShpInst_Rectangle, 0xa00, aSolverContainer ); // Flags: Connector | HasSpt
}
aPropOpt.CreateFillProperties( mXPropSet, sal_True );
aPropOpt.CreateFillProperties( mXPropSet, sal_True, mXShape );
if ( ImplGetText() )
aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60, sal_False, sal_False );
}
......@@ -2466,7 +2466,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
{
mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
ImplCreateShape( ESCHER_ShpInst_Ellipse, 0xa00, aSolverContainer ); // Flags: Connector | HasSpt
aPropOpt.CreateFillProperties( mXPropSet, sal_True );
aPropOpt.CreateFillProperties( mXPropSet, sal_True, mXShape );
if ( ImplGetText() )
aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60, sal_False, sal_False );
}
......@@ -2518,7 +2518,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
case POLY_CHORD :
{
if ( aPropOpt.CreatePolygonProperties( mXPropSet, ESCHER_CREATEPOLYGON_POLYPOLYGON, sal_False, aNewRect, &aPolygon ) )
aPropOpt.CreateFillProperties( mXPropSet, sal_True );
aPropOpt.CreateFillProperties( mXPropSet, sal_True , mXShape );
}
break;
......@@ -2729,7 +2729,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
maRect = MapRectangle( aNewRect );
maPosition = ::com::sun::star::awt::Point( maRect.Left(), maRect.Top() );
maSize = ::com::sun::star::awt::Size( maRect.GetWidth(), maRect.GetHeight() );
aPropOpt.CreateFillProperties( mXPropSet, sal_True );
aPropOpt.CreateFillProperties( mXPropSet, sal_True , mXShape );
mnAngle = 0;
}
else if ( bPolyLine )
......@@ -2789,7 +2789,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
maRect = MapRectangle( aNewRect );
maPosition = ::com::sun::star::awt::Point( maRect.Left(), maRect.Top() );
maSize = ::com::sun::star::awt::Size( maRect.GetWidth(), maRect.GetHeight() );
aPropOpt.CreateFillProperties( mXPropSet, sal_True );
aPropOpt.CreateFillProperties( mXPropSet, sal_True , mXShape );
mnAngle = 0;
}
else if ( ( mType == "drawing.GraphicObject" ) || ( mType == "presentation.GraphicObject" ) )
......@@ -2900,7 +2900,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
aPropertyOptions.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x110001 );
aPropertyOptions.AddOpt( ESCHER_Prop_lineColor, 0x8000001 );
aPropertyOptions.AddOpt( ESCHER_Prop_shadowColor, 0x8000002 );
aPropertyOptions.CreateFillProperties( mXPropSet, sal_True );
aPropertyOptions.CreateFillProperties( mXPropSet, sal_True, mXShape );
sal_uInt32 nLineFlags = 0x90001;
if ( aPropertyOptions.GetOpt( ESCHER_Prop_fNoLineDrawDash, nLineFlags ) )
nLineFlags |= 0x10001; // draw dashed line if no line
......@@ -2945,7 +2945,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
nPlaceHolderAtom = rLayout.nTypeOfTitle;
ImplCreateShape( ESCHER_ShpInst_Rectangle, 0x220, aSolverContainer ); // Flags: HaveAnchor | HaveMaster
aPropOpt.AddOpt( ESCHER_Prop_hspMaster, mnShapeMasterTitle );
aPropOpt.CreateFillProperties( mXPropSet, sal_True );
aPropOpt.CreateFillProperties( mXPropSet, sal_True, mXShape );
aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60, sal_False, sal_True );
ImplAdjustFirstLineLineSpacing( aTextObj, aPropOpt );
if ( mbEmptyPresObj )
......@@ -2992,7 +2992,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
aPropOpt2.AddOpt( ESCHER_Prop_lineColor, 0x8000001 );
aPropOpt2.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x90001 );
aPropOpt2.AddOpt( ESCHER_Prop_shadowColor, 0x8000002 );
aPropOpt2.CreateFillProperties( mXPropSet, sal_True );
aPropOpt2.CreateFillProperties( mXPropSet, sal_True, mXShape );
sal_uInt32 nLineFlags = 0x90001;
if ( aPropOpt2.GetOpt( ESCHER_Prop_fNoLineDrawDash, nLineFlags ) )
nLineFlags |= 0x10001; // draw dashed line if no line
......@@ -3042,7 +3042,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
ImplCreateShape( ESCHER_ShpInst_Rectangle, 0x220, aSolverContainer ); // Flags: HaveAnchor | HaveMaster
aPropOpt.AddOpt( ESCHER_Prop_hspMaster, mnShapeMasterBody );
aPropOpt.CreateFillProperties( mXPropSet, sal_True );
aPropOpt.CreateFillProperties( mXPropSet, sal_True, mXShape );
aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60, sal_False, sal_True );
ImplAdjustFirstLineLineSpacing( aTextObj, aPropOpt );
if ( mbEmptyPresObj )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment