diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-05 16:05:42 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-05 16:08:02 +0100 |
commit | 250015d1107eabb2e4fdb9e762b3bd06b6c1739b (patch) | |
tree | d13c433bd991930a71fc36e9783d1a5e482d5e11 /writerfilter | |
parent | 8ab553117e038ec1eab76ac1c3d8a0b5aa968baa (diff) |
When in Rome, do as the Romans do
Change-Id: I1529d035edb2f1453dc72a32df5c2750dc526672
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 9 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLStreamImpl.cxx | 12 |
2 files changed, 14 insertions, 7 deletions
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index f3ba17947554..776344779ae1 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -406,7 +406,8 @@ void OOXMLDocumentImpl::resolve(Stream & rStream) #endif } -void OOXMLDocumentImpl::resolveCustomXmlStream(Stream & rStream){ +void OOXMLDocumentImpl::resolveCustomXmlStream(Stream & rStream) +{ // Resolving all item[n].xml files from CustomXml folder. uno::Reference<embed::XRelationshipAccess> mxRelationshipAccess; mxRelationshipAccess.set((*dynamic_cast<OOXMLStreamImpl *>(mpStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW); @@ -429,13 +430,15 @@ void OOXMLDocumentImpl::resolveCustomXmlStream(Stream & rStream){ // Skipping other files. if (aPair.Second.compareTo(sCustomType) == 0) bFound = true; - else if(aPair.First.compareTo(sTarget) == 0 && bFound){ + else if(aPair.First.compareTo(sTarget) == 0 && bFound) + { // Adding value to extern variable customTarget. It will be used in ooxmlstreamimpl // to ensure customxml target is visited in lcl_getTarget. customTarget = aPair.Second; } } - if(bFound){ + if(bFound) + { uno::Reference<xml::dom::XDocument> temp = importSubStream(OOXMLStream::CUSTOMXML); mxCustomXmlDomListTemp[counter] = temp; counter++; diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx index 293b69528da6..c1cb79811ea9 100644 --- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx @@ -179,12 +179,15 @@ bool OOXMLStreamImpl::lcl_getTarget(uno::Reference<embed::XRelationshipAccess> else if (aPair.First.compareTo(sId) == 0 && aPair.Second.compareTo(rId) == 0) bFound = true; - else if (aPair.First.compareTo(sTarget) == 0){ + else if (aPair.First.compareTo(sTarget) == 0) + { // checking item[n].xml is not visited already. - if(customTarget != aPair.Second && sStreamType == sCustomType){ + if(customTarget != aPair.Second && sStreamType == sCustomType) + { bFound = false; } - else { + else + { sMyTarget = aPair.Second; } } @@ -272,7 +275,8 @@ uno::Reference<io::XInputStream> OOXMLStreamImpl::getDocumentStream() } // Giving access to mxDocumentStream. It is needed by resolving custom xml to get list of customxml's used in document. -uno::Reference<io::XStream> OOXMLStreamImpl::accessDocumentStream(){ +uno::Reference<io::XStream> OOXMLStreamImpl::accessDocumentStream() +{ return mxDocumentStream; } |