Kaydet (Commit) 291c3ae7 authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Markus Mohrhard

fix OOXML strict import

fix the problem introduced by 6536826f

Change-Id: I6c499f8490d92badda0f086d48c2347fa112bb4e
üst b09957e6
...@@ -178,7 +178,7 @@ public: ...@@ -178,7 +178,7 @@ public:
const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &
getDiagramDoms() { return maDiagramDoms; } getDiagramDoms() { return maDiagramDoms; }
void setDiagramDoms(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rDiagramDoms) { maDiagramDoms = rDiagramDoms; } void setDiagramDoms(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rDiagramDoms) { maDiagramDoms = rDiagramDoms; }
com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< com::sun::star::uno::Any > >resolveRelationshipsOfType( com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< com::sun::star::uno::Any > >resolveRelationshipsOfTypeFromOfficeDoc(
core::XmlFilterBase& rFilter, OUString sFragment, OUString sType ); core::XmlFilterBase& rFilter, OUString sFragment, OUString sType );
protected: protected:
......
...@@ -421,8 +421,8 @@ void loadDiagram( ShapePtr& pShape, ...@@ -421,8 +421,8 @@ void loadDiagram( ShapePtr& pShape,
pDiagram, pDiagram,
xRefDataModel); xRefDataModel);
pDiagram->getDataRelsMap() = pShape->resolveRelationshipsOfType( rFilter, xRefDataModel->getFragmentPath(), pDiagram->getDataRelsMap() = pShape->resolveRelationshipsOfTypeFromOfficeDoc( rFilter,
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" ); xRefDataModel->getFragmentPath(), "image" );
// Pass the info to pShape // Pass the info to pShape
......
...@@ -1200,7 +1200,7 @@ void Shape::putPropertiesToGrabBag( const Sequence< PropertyValue >& aProperties ...@@ -1200,7 +1200,7 @@ void Shape::putPropertiesToGrabBag( const Sequence< PropertyValue >& aProperties
} }
} }
uno::Sequence< uno::Sequence< uno::Any > > Shape::resolveRelationshipsOfType(core::XmlFilterBase& rFilter, OUString sFragment, OUString sType ) uno::Sequence< uno::Sequence< uno::Any > > Shape::resolveRelationshipsOfTypeFromOfficeDoc(core::XmlFilterBase& rFilter, OUString sFragment, OUString sType )
{ {
uno::Sequence< uno::Sequence< uno::Any > > xRelListTemp; uno::Sequence< uno::Sequence< uno::Any > > xRelListTemp;
sal_Int32 counter = 0; sal_Int32 counter = 0;
...@@ -1208,7 +1208,7 @@ uno::Sequence< uno::Sequence< uno::Any > > Shape::resolveRelationshipsOfType(co ...@@ -1208,7 +1208,7 @@ uno::Sequence< uno::Sequence< uno::Any > > Shape::resolveRelationshipsOfType(co
core::RelationsRef xRels = rFilter.importRelations( sFragment ); core::RelationsRef xRels = rFilter.importRelations( sFragment );
if ( xRels ) if ( xRels )
{ {
core::RelationsRef xImageRels = xRels->getRelationsFromType( sType ); core::RelationsRef xImageRels = xRels->getRelationsFromTypeFromOfficeDoc( sType );
if ( xImageRels ) if ( xImageRels )
{ {
xRelListTemp.realloc( xImageRels->size() ); xRelListTemp.realloc( xImageRels->size() );
......
...@@ -433,8 +433,8 @@ ShapeContextHandler::getShape() throw (uno::RuntimeException, std::exception) ...@@ -433,8 +433,8 @@ ShapeContextHandler::getShape() throw (uno::RuntimeException, std::exception)
aValue.realloc(length+1); aValue.realloc(length+1);
diagramDrawing[0] = uno::makeAny( mxFilterBase->importFragment( aFragmentPath ) ); diagramDrawing[0] = uno::makeAny( mxFilterBase->importFragment( aFragmentPath ) );
diagramDrawing[1] = uno::makeAny( pShapePtr->resolveRelationshipsOfType( *mxFilterBase, aFragmentPath, diagramDrawing[1] = uno::makeAny( pShapePtr->resolveRelationshipsOfTypeFromOfficeDoc(
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" ) ); *mxFilterBase, aFragmentPath, "image" ) );
beans::PropertyValue* pValue = aValue.getArray(); beans::PropertyValue* pValue = aValue.getArray();
pValue[length].Name = "OOXDrawing"; pValue[length].Name = "OOXDrawing";
......
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