summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/ximpshap.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-02-09 11:48:11 +0100
committerMichael Stahl <mstahl@redhat.com>2017-02-09 13:17:42 +0100
commit6b198399090ae5a963ad5075f396716252ccdea1 (patch)
treee772deccd0fc48dd250e55f974cabcf56226b1ec /xmloff/source/draw/ximpshap.cxx
parentdbc31190532be3d3f0d8fb313b9d7247c2eb6135 (diff)
xmloff: remove onDemandRescueUsefulDataFromTemporary
This workaround, which is both complex and quite incomplete, should no longer be necessary because the fixes for tdf#103567 should also fix i#124143, see unit test in previous commit. Change-Id: I038f238d5e3cf5cadfc666196380b7b351543982
Diffstat (limited to 'xmloff/source/draw/ximpshap.cxx')
-rw-r--r--xmloff/source/draw/ximpshap.cxx68
1 files changed, 0 insertions, 68 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index c49c55aae6a2..48928069d36f 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -931,74 +931,6 @@ bool SdXMLShapeContext::isPresentationShape() const
return false;
}
-void SdXMLShapeContext::onDemandRescueUsefulDataFromTemporary( const SvXMLImportContext& rCandidate )
-{
- const SdXMLShapeContext* pCandidate = dynamic_cast< const SdXMLShapeContext* >(&rCandidate);
-
- if(!mxGluePoints.is() && pCandidate)
- {
- // try to rescue GluePoints from rCandidate to local if we not yet have GluePoints by copying them
- uno::Reference< drawing::XGluePointsSupplier > xSourceSupplier( pCandidate->getShape(), uno::UNO_QUERY );
- if( !xSourceSupplier.is() )
- return;
-
- uno::Reference< container::XIdentifierAccess > xSourceGluePoints( xSourceSupplier->getGluePoints(), uno::UNO_QUERY );
- if( !xSourceGluePoints.is() )
- return;
-
- uno::Sequence< sal_Int32 > aSourceIdSequence( xSourceGluePoints->getIdentifiers() );
- const sal_Int32 nSourceCount(aSourceIdSequence.getLength());
- rtl::Reference< XMLShapeImportHelper > xSourceShapeImportHelper(const_cast< SdXMLShapeContext* >(pCandidate)->GetImport().GetShapeImport());
-
- if(nSourceCount)
- {
- // rCandidate has GluePoints; prepare the GluePoint container for the local shape
- uno::Reference< drawing::XGluePointsSupplier > xSupplier( mxShape, uno::UNO_QUERY );
- if( !xSupplier.is() )
- return;
-
- mxGluePoints.set( xSupplier->getGluePoints(), UNO_QUERY );
-
- if( !mxGluePoints.is() )
- return;
-
- drawing::GluePoint2 aSourceGluePoint;
-
- for( sal_Int32 nSourceIndex(0); nSourceIndex < nSourceCount; nSourceIndex++ )
- {
- const sal_Int32 nSourceIdentifier = aSourceIdSequence[nSourceIndex];
-
- // loop over GluePoints which are UserDefined (avoid the auto mapped ones)
- if((xSourceGluePoints->getByIdentifier( nSourceIdentifier ) >>= aSourceGluePoint)
- && aSourceGluePoint.IsUserDefined)
- {
- // get original mappingID back, this is the draw:id imported with a draw:glue-point
- const sal_Int32 nDestinnationId = xSourceShapeImportHelper->findGluePointMapping(
- pCandidate->getShape(),
- nSourceIdentifier );
-
- if(-1 != nSourceIdentifier)
- {
- // if we got that we are able to add a copy of that GluePoint to the local
- // context and xShape since we have all information that the source shape
- // and context had at import time
- try
- {
- const sal_Int32 nInternalId = mxGluePoints->insert( uno::makeAny( aSourceGluePoint ) );
- GetImport().GetShapeImport()->addGluePointMapping( mxShape, nDestinnationId, nInternalId );
- }
- catch (const uno::Exception& e)
- {
- SAL_WARN("xmloff", "exception during setting of glue points: " << e.Message);
- }
- }
- }
- }
- }
- }
-}
-
-
SdXMLRectShapeContext::SdXMLRectShapeContext(
SvXMLImport& rImport,
sal_uInt16 nPrfx,