diff options
Diffstat (limited to 'l10ntools/source/propmerge.cxx')
-rw-r--r-- | l10ntools/source/propmerge.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/l10ntools/source/propmerge.cxx b/l10ntools/source/propmerge.cxx index 91ea78b048ee..a4440e96d79d 100644 --- a/l10ntools/source/propmerge.cxx +++ b/l10ntools/source/propmerge.cxx @@ -182,13 +182,15 @@ void PropParser::Merge( const OString &rMergeSrc, const OString &rDestinationFil MergeDataFile aMergeDataFile( rMergeSrc, m_sSource, false ); - const std::vector<OString> aLanguages = aMergeDataFile.GetLanguages(); - if( m_sLang != "qtz" && !aLanguages.empty() && aLanguages[0] != m_sLang ) + const std::vector<OString> vLanguages = aMergeDataFile.GetLanguages(); + if( m_sLang != "qtz" && vLanguages.size()>=2 && + vLanguages[vLanguages[0]!="qtz" ? 0 : 1] != m_sLang ) { std::cerr << "Propex error: given language conflicts with " << "language of Mergedata file: " - << m_sLang.getStr() << " - " << aLanguages[0].getStr() << std::endl; + << m_sLang.getStr() << " - " + << vLanguages[vLanguages[0]!="qtz" ? 0 : 1].getStr() << std::endl; return; } |