summaryrefslogtreecommitdiff
path: root/xmloff
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
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')
-rw-r--r--xmloff/source/core/xmlictxt.cxx4
-rw-r--r--xmloff/source/core/xmlmultiimagehelper.cxx7
-rw-r--r--xmloff/source/draw/ximpshap.cxx68
-rw-r--r--xmloff/source/draw/ximpshap.hxx3
4 files changed, 0 insertions, 82 deletions
diff --git a/xmloff/source/core/xmlictxt.cxx b/xmloff/source/core/xmlictxt.cxx
index 509e7d919eb8..63025083d78f 100644
--- a/xmloff/source/core/xmlictxt.cxx
+++ b/xmloff/source/core/xmlictxt.cxx
@@ -160,10 +160,6 @@ void SAL_CALL SvXMLImportContext::characters(const OUString &rChars)
mrImport.Characters( rChars );
}
-void SvXMLImportContext::onDemandRescueUsefulDataFromTemporary( const SvXMLImportContext& )
-{
-}
-
void SvXMLImportContext::AddFirstRef()
{
acquire();
diff --git a/xmloff/source/core/xmlmultiimagehelper.cxx b/xmloff/source/core/xmlmultiimagehelper.cxx
index 723cc5d2b396..3b58451840ba 100644
--- a/xmloff/source/core/xmlmultiimagehelper.cxx
+++ b/xmloff/source/core/xmlmultiimagehelper.cxx
@@ -120,13 +120,6 @@ SvXMLImportContextRef MultiImageImportHelper::solveMultipleImages()
{
SvXMLImportContext& rCandidate = *maImplContextVector[a].get();
- if(pContext.is())
- {
- // #i124143# evtl. copy imported GluePoints before deprecating
- // this graphic and context
- pContext->onDemandRescueUsefulDataFromTemporary(rCandidate);
- }
-
removeGraphicFromImportContext(rCandidate);
}
// re-insert it so that solveMultipleImages is idempotent
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,
diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx
index fab0c537e29a..dc8e219d6344 100644
--- a/xmloff/source/draw/ximpshap.hxx
+++ b/xmloff/source/draw/ximpshap.hxx
@@ -119,9 +119,6 @@ public:
// this is called from the parent group for each unparsed attribute in the attribute list
virtual void processAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rValue );
- // allow to copy evtl. useful data from another temporary import context, e.g. used to
- // support multiple images
- virtual void onDemandRescueUsefulDataFromTemporary( const SvXMLImportContext& rCandidate ) override;
};
// draw:rect context