From 5acc994f4ed3e118453fb493226b751a6d9d3bce Mon Sep 17 00:00:00 2001 From: Zolnai Tamás Date: Sat, 13 Apr 2013 06:37:05 +0200 Subject: Remove obsolote 'empty string -> "-"' behaviour Change-Id: I1d81d4c5716c397b84c0a8959b21beacbbbf1138 --- l10ntools/source/cfgmerge.cxx | 7 ++----- l10ntools/source/export.cxx | 28 +++++++++++++++------------- l10ntools/source/lngmerge.cxx | 3 +-- l10ntools/source/xrmmerge.cxx | 7 +++---- 4 files changed, 21 insertions(+), 24 deletions(-) (limited to 'l10ntools') diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx index 44f9896e5361..dcbcfb94957a 100644 --- a/l10ntools/source/cfgmerge.cxx +++ b/l10ntools/source/cfgmerge.cxx @@ -500,8 +500,7 @@ void CfgMerge::WorkOnText(OString &rText, const OString& rLangIndex) OString sContent; pEntrys->GetText( sContent, STRING_TYP_TEXT, rLangIndex ); - if ( !rLangIndex.equalsIgnoreAsciiCase("en-US") && - ( sContent != "-" ) && !sContent.isEmpty()) + if ( !rLangIndex.equalsIgnoreAsciiCase("en-US") && !sContent.isEmpty()) { rText = helper::QuotHTML( rText ); } @@ -530,9 +529,7 @@ void CfgMerge::WorkOnResourceEnd() OString sContent; pEntrys->GetText( sContent, STRING_TYP_TEXT, sCur , sal_True ); if ( - ( !sCur.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("en-US")) ) && - - ( sContent != "-" ) && !sContent.isEmpty()) + ( !sCur.equalsIgnoreAsciiCase("en-US") ) && !sContent.isEmpty()) { OString sText = helper::QuotHTML( sContent); diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx index 1cbb426ca369..d4d6e043bd6b 100644 --- a/l10ntools/source/export.cxx +++ b/l10ntools/source/export.cxx @@ -919,26 +919,28 @@ sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew ) sXQHText = pResData->sQuickHelpText[ SOURCE_LANGUAGE ]; sXTitle = pResData->sTitle[ SOURCE_LANGUAGE ]; - if (sXText.isEmpty()) - sXText = "-"; - - ConvertExportContent(sXText); - ConvertExportContent(sXHText); - ConvertExportContent(sXQHText); - ConvertExportContent(sXTitle); - - common::writePoEntry( - "Transex3", *aOutput.mPo, global::inputPathname, - pResData->sResTyp, sGID, sLID, sXHText, sXText); + if( !sXText.isEmpty() ) + { + ConvertExportContent(sXText); + ConvertExportContent(sXHText); + common::writePoEntry( + "Transex3", *aOutput.mPo, global::inputPathname, + pResData->sResTyp, sGID, sLID, sXHText, sXText); + } if( !sXQHText.isEmpty() ) + { + ConvertExportContent(sXQHText); common::writePoEntry( "Transex3", *aOutput.mPo, global::inputPathname, pResData->sResTyp, sGID, sLID, OString(), sXQHText, PoEntry::TQUICKHELPTEXT ); - + } if( !sXTitle.isEmpty() ) + { + ConvertExportContent(sXTitle); common::writePoEntry( "Transex3", *aOutput.mPo, global::inputPathname, pResData->sResTyp, sGID, sLID, OString(), sXTitle, PoEntry::TTITLE ); + } if ( bCreateNew ) { pResData->sText[ SOURCE_LANGUAGE ] = ""; @@ -1508,7 +1510,7 @@ void Export::ResData2Output( MergeEntrys *pEntry, sal_uInt16 nType, const OStrin OString sText; sal_Bool bText = pEntry->GetText( sText, nType, sCur , sal_True ); - if ( bText && !sText.isEmpty() && sText != "-" ) { + if ( bText && !sText.isEmpty() ) { OString sOutput; if ( bNextMustBeDefineEOL) { if ( bFirst ) diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx index f343b26c378b..273fe190f42c 100644 --- a/l10ntools/source/lngmerge.cxx +++ b/l10ntools/source/lngmerge.cxx @@ -297,8 +297,7 @@ sal_Bool LngParser::Merge( pEntrys->GetText( sNewText, STRING_TYP_TEXT, sCur, sal_True ); if( sCur == "qtz" ) sNewText = sNewText.copy(sNewText.indexOf("|") + 2); - if (( !sNewText.isEmpty()) && - !(( sCur.equalsL(RTL_CONSTASCII_STRINGPARAM("x-comment"))) && ( sNewText == "-" ))) + if ( !sNewText.isEmpty() && sCur != "x-comment") { OString sLine; sLine += sCur; diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx index 012d916d92d7..218765ba8b8c 100644 --- a/l10ntools/source/xrmmerge.cxx +++ b/l10ntools/source/xrmmerge.cxx @@ -472,7 +472,7 @@ void XRMResMerge::WorkOnDesc( if ( !sCur.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("en-US")) && ( pEntrys->GetText( sContent, STRING_TYP_TEXT, sCur, sal_True )) && - ( sContent != "-" ) && !sContent.isEmpty()) + !sContent.isEmpty()) { OString sText( sContent ); OString sAdditionalLine( "\n " ); @@ -547,8 +547,7 @@ void XRMResMerge::WorkOnText( OString sContent; if ( !sLang.equalsIgnoreAsciiCase("en-US") && ( pEntrys->GetText( - sContent, STRING_TYP_TEXT, sLang )) && - ( sContent != "-" ) && !sContent.isEmpty() && + sContent, STRING_TYP_TEXT, sLang )) && !sContent.isEmpty() && helper::isWellFormedXML( sContent )) { rText = sContent; @@ -584,7 +583,7 @@ void XRMResMerge::EndOfText( if (!sCur.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("en-US")) && ( pEntrys->GetText( sContent, STRING_TYP_TEXT, sCur, sal_True )) && - ( sContent != "-" ) && !sContent.isEmpty() && + !sContent.isEmpty() && helper::isWellFormedXML( sContent )) { OString sText( sContent ); -- cgit