summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2012-05-24 16:49:55 +0100
committerNoel Power <noel.power@novell.com>2012-05-25 11:34:05 +0100
commit3ed479a1d83916cb5dc3be0eee0aa6fbe65a844a (patch)
tree6c71f2ed6746fc6820baf87c9f7d68d92798ccd1 /sc/source/filter/oox
parent0a8de8d937ea1e9cb26ea7c89951f559961b49de (diff)
Revert "fix bad import positions of shapes & controls fdo#49430"
This reverts commit 9dc4fa1b22a533ba0a6ce0353112c55eef8a14ef.
Diffstat (limited to 'sc/source/filter/oox')
-rw-r--r--sc/source/filter/oox/drawingbase.cxx5
-rw-r--r--sc/source/filter/oox/drawingfragment.cxx7
2 files changed, 3 insertions, 9 deletions
diff --git a/sc/source/filter/oox/drawingbase.cxx b/sc/source/filter/oox/drawingbase.cxx
index c7ff392f00dd..4a30a1520b26 100644
--- a/sc/source/filter/oox/drawingbase.cxx
+++ b/sc/source/filter/oox/drawingbase.cxx
@@ -161,7 +161,6 @@ void ShapeAnchor::setCellPos( sal_Int32 nElement, sal_Int32 nParentContext, cons
void ShapeAnchor::importVmlAnchor( const OUString& rAnchor )
{
meAnchorType = ANCHOR_VML;
- meCellAnchorType = CELLANCHOR_PIXEL;
::std::vector< OUString > aTokens;
sal_Int32 nIndex = 0;
@@ -279,16 +278,16 @@ ShapeAnchor::getFromCell() const
void
ShapeAnchor::applyToXShape( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape>& rxShape )
{
- if ( ( meAnchorType == ANCHOR_VML || meAnchorType == ANCHOR_TWOCELL || meAnchorType == ANCHOR_ONECELL ) && getFromCell().is() )
+ if ( ( meAnchorType == ANCHOR_TWOCELL || meAnchorType == ANCHOR_ONECELL ) && getFromCell().is() )
{
PropertySet aShapeProp( rxShape );
+ aShapeProp.setProperty( PROP_Anchor, getFromCell() );
CellAnchorModel offSets;
offSets.mnColOffset = maFrom.mnColOffset;
offSets.mnRowOffset = maFrom.mnRowOffset;
EmuPoint aPos = calcCellAnchorEmu( offSets );
aShapeProp.setProperty( PROP_HoriOrientPosition, lclEmuToHmm( aPos.X ) );
aShapeProp.setProperty( PROP_VertOrientPosition, lclEmuToHmm( aPos.Y ) );
- aShapeProp.setProperty( PROP_Anchor, getFromCell() );
}
}
diff --git a/sc/source/filter/oox/drawingfragment.cxx b/sc/source/filter/oox/drawingfragment.cxx
index 012c9a19a3d0..f04128762507 100644
--- a/sc/source/filter/oox/drawingfragment.cxx
+++ b/sc/source/filter/oox/drawingfragment.cxx
@@ -614,12 +614,7 @@ Reference< XShape > VmlDrawing::createAndInsertClientXShape( const ::oox::vml::S
getBaseFilter().getVbaProject().registerMacroAttacher( xAttacher );
}
}
- if ( !pClientData->maAnchor.isEmpty() )
- {
- ShapeAnchor aAnchor( *this );
- aAnchor.importVmlAnchor( pClientData->maAnchor );
- aAnchor.applyToXShape( xShape );
- }
+
return xShape;
}
}