Commit a0704feb authored by konovalovsergey's avatar konovalovsergey

fix bug 33053

parent 348c5780
......@@ -1138,7 +1138,7 @@ namespace BinDocxRW
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
switch(TabItem.m_oVal.get().GetValue())
{
case SimpleTypes::tabjcEnd: break;
case SimpleTypes::tabjcEnd:
case SimpleTypes::tabjcRight:
m_oBcw.m_oStream.WriteBYTE(g_tabtype_right);
bRight = true;
......
......@@ -95,12 +95,21 @@ namespace PPTX
static const bool operator ==(const CString& type, const FileType& file)
{
return (type == file.RelationType());
//RelationType
//http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument
//http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument
//is valid and equal so compare tail
int nIndexType = type.ReverseFind('/');
CString relationType = file.RelationType();
int nIndexFile = relationType.ReverseFind('/');
CString tempType = (-1 == nIndexType) ? type : type.Right(type.GetLength() - nIndexType);
CString tempFile = (-1 == nIndexFile) ? relationType : relationType.Right(relationType.GetLength() - nIndexFile);
return (tempType == tempFile);
}
static const bool operator ==(const FileType& file, const CString& type)
{
return (file.RelationType() == type);
return type == file;
}
} // namespace PPTX
#endif // OOX_FILE_TYPE_INCLUDE_H_
\ No newline at end of file
#endif // OOX_FILE_TYPE_INCLUDE_H_
......@@ -281,8 +281,8 @@ namespace PPTX
CString type = it->second->type().RelationType();
CString name = it->second->type().DefaultFileName().m_strFilename;
return (((type == PPTX::FileTypes::ExternalAudio.RelationType()) || (type == PPTX::FileTypes::ExternalImage.RelationType())
|| (type == PPTX::FileTypes::ExternalVideo.RelationType())) && (name == _T("")));
return (((type == PPTX::FileTypes::ExternalAudio) || (type == PPTX::FileTypes::ExternalImage)
|| (type == PPTX::FileTypes::ExternalVideo)) && (name == _T("")));
}
return true;
}
......
......@@ -108,12 +108,21 @@ namespace OOX
static const bool operator ==(const CString& type, const FileType& file)
{
return (type == file.RelationType());
//RelationType
//http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument
//http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument
//is valid and equal so compare tail
int nIndexType = type.ReverseFind('/');
CString relationType = file.RelationType();
int nIndexFile = relationType.ReverseFind('/');
CString tempType = (-1 == nIndexType) ? type : type.Right(type.GetLength() - nIndexType);
CString tempFile = (-1 == nIndexFile) ? relationType : relationType.Right(relationType.GetLength() - nIndexFile);
return (tempType == tempFile);
}
static const bool operator ==(const FileType& file, const CString& type)
{
return (file.RelationType() == type);
return type == file;
}
} // namespace OOX
#endif // OOX_FILE_TYPE_INCLUDE_H_
\ No newline at end of file
#endif // OOX_FILE_TYPE_INCLUDE_H_
......@@ -277,7 +277,7 @@ namespace OOX
CString sType = it->second->type().RelationType();
CString sName = it->second->type().DefaultFileName().m_strFilename;
return (( ( sType == OOX::FileTypes::ExternalAudio.RelationType() ) || ( sType == OOX::FileTypes::ExternalImage.RelationType() ) || ( sType == OOX::FileTypes::ExternalVideo.RelationType() ) ) && ( sName == _T("") ) );
return (( ( sType == OOX::FileTypes::ExternalAudio ) || ( sType == OOX::FileTypes::ExternalImage ) || ( sType == OOX::FileTypes::ExternalVideo ) ) && ( sName == _T("") ) );
}
return true;
}
......
......@@ -235,7 +235,7 @@ namespace OOX
CString sType = pPair->second->type().RelationType();
CString sName = pPair->second->type().DefaultFileName().m_strFilename;
return (( ( sType == OOX::FileTypes::ExternalAudio.RelationType() ) || ( sType == OOX::FileTypes::ExternalImage.RelationType() ) || ( sType == OOX::FileTypes::ExternalVideo.RelationType() ) ) && ( sName == _T("") ) );
return (( ( sType == OOX::FileTypes::ExternalAudio ) || ( sType == OOX::FileTypes::ExternalImage ) || ( sType == OOX::FileTypes::ExternalVideo ) ) && ( sName == _T("") ) );
}
return true;
}
......
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