Kaydet (Commit) 250015d1 authored tarafından Miklos Vajna's avatar Miklos Vajna

When in Rome, do as the Romans do

Change-Id: I1529d035edb2f1453dc72a32df5c2750dc526672
üst 8ab55311
......@@ -806,7 +806,8 @@ void DocxExport::WriteCustomXml()
}
}
for (sal_Int32 j = 1; j < customXmlDomlist.getLength(); j++) {
for (sal_Int32 j = 1; j < customXmlDomlist.getLength(); j++)
{
uno::Reference<xml::dom::XDocument> customXmlDom = customXmlDomlist[j];
if ( customXmlDom.is() )
......
......@@ -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++;
......
......@@ -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;
}
......
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