summaryrefslogtreecommitdiff
path: root/l10ntools/source/cfgmerge.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'l10ntools/source/cfgmerge.cxx')
-rw-r--r--l10ntools/source/cfgmerge.cxx77
1 files changed, 39 insertions, 38 deletions
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index ae75f973724f..e02e497d5d21 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -347,29 +347,30 @@ CfgExport::~CfgExport()
void CfgExport::WorkOnResourceEnd()
{
- if ( bLocalize ) {
- if ( !pStackData->sText["en-US"].isEmpty() )
- {
- OString sXComment = pStackData->sText[OString("x-comment")];
- OString sLocalId = pStackData->sIdentifier;
- OString sGroupId;
- if ( aStack.size() == 1 ) {
- sGroupId = sLocalId;
- sLocalId = "";
- }
- else {
- sGroupId = aStack.GetAccessPath( aStack.size() - 2 );
- }
+ if ( !bLocalize )
+ return;
+
+ if ( pStackData->sText["en-US"].isEmpty() )
+ return;
+
+ OString sXComment = pStackData->sText[OString("x-comment")];
+ OString sLocalId = pStackData->sIdentifier;
+ OString sGroupId;
+ if ( aStack.size() == 1 ) {
+ sGroupId = sLocalId;
+ sLocalId = "";
+ }
+ else {
+ sGroupId = aStack.GetAccessPath( aStack.size() - 2 );
+ }
- OString sText = pStackData->sText[ "en-US" ];
- sText = helper::UnQuotHTML( sText );
+ OString sText = pStackData->sText[ "en-US" ];
+ sText = helper::UnQuotHTML( sText );
- common::writePoEntry(
- "Cfgex", pOutputStream, sPath, pStackData->sResTyp,
- sGroupId, sLocalId, sXComment, sText);
- }
- }
+ common::writePoEntry(
+ "Cfgex", pOutputStream, sPath, pStackData->sResTyp,
+ sGroupId, sLocalId, sXComment, sText);
}
void CfgExport::WorkOnText(
@@ -418,27 +419,27 @@ CfgMerge::~CfgMerge()
void CfgMerge::WorkOnText(OString &, const OString& rLangIndex)
{
-
- if ( pMergeDataFile && bLocalize ) {
- if ( !pResData ) {
- OString sLocalId = pStackData->sIdentifier;
- OString sGroupId;
- if ( aStack.size() == 1 ) {
- sGroupId = sLocalId;
- sLocalId.clear();
- }
- else {
- sGroupId = aStack.GetAccessPath( aStack.size() - 2 );
- }
-
- pResData.reset( new ResData( sGroupId, sFilename ) );
- pResData->sId = sLocalId;
- pResData->sResTyp = pStackData->sResTyp;
+ if ( !(pMergeDataFile && bLocalize) )
+ return;
+
+ if ( !pResData ) {
+ OString sLocalId = pStackData->sIdentifier;
+ OString sGroupId;
+ if ( aStack.size() == 1 ) {
+ sGroupId = sLocalId;
+ sLocalId.clear();
+ }
+ else {
+ sGroupId = aStack.GetAccessPath( aStack.size() - 2 );
}
- if (rLangIndex.equalsIgnoreAsciiCase("en-US"))
- bEnglish = true;
+ pResData.reset( new ResData( sGroupId, sFilename ) );
+ pResData->sId = sLocalId;
+ pResData->sResTyp = pStackData->sResTyp;
}
+
+ if (rLangIndex.equalsIgnoreAsciiCase("en-US"))
+ bEnglish = true;
}
void CfgMerge::Output(const OString& rOutput)