[Libreoffice-commits] .: 2 commits - l10ntools/inc l10ntools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Dec 9 13:41:36 PST 2012
l10ntools/inc/export.hxx | 2 --
l10ntools/source/export.cxx | 23 +++++++++++------------
2 files changed, 11 insertions(+), 14 deletions(-)
New commits:
commit 38364f5adc77c516721ad26297562d0b1bb66b8d
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Sun Dec 9 22:39:21 2012 +0100
Revert "Make sure all list item is stored"
This reverts commit cd8948d1fd4430bc4186b3525eaec7d531da3fb2.
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 061d8e6..c709ace 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -1473,13 +1473,6 @@ sal_Bool Export::PrepareTextToMerge(rtl::OString &rText, sal_uInt16 nTyp,
pResData->sGId = pResData->sGId + rtl::OString('.');
pResData->sGId = pResData->sGId + sOldId;
nTyp = STRING_TYP_TEXT;
- if (rLangIndex == "en-US")
- {
- aOrigListItems.insert(
- std::pair<OString,OString>(
- pResData->sId + pResData->sGId + pResData->sResTyp,
- rText.copy(nStart+1,nEnd-nStart-1)));
- }
}
break;
case STRING_TYP_TEXT :
@@ -1538,6 +1531,7 @@ sal_Bool Export::PrepareTextToMerge(rtl::OString &rText, sal_uInt16 nTyp,
}
PFormEntrys *pEntrys = pMergeDataFile->GetPFormEntrys( pResData );
+ const OString sKey = pResData->sId + pResData->sGId + pResData->sResTyp;
pResData->sId = sOldId;
pResData->sGId = sOldGId;
pResData->sResTyp = sOldTyp;
@@ -1555,6 +1549,9 @@ sal_Bool Export::PrepareTextToMerge(rtl::OString &rText, sal_uInt16 nTyp,
return sal_False; // no data found
}
+ if (rLangIndex == "en-US")
+ aOrigListItems.insert(std::pair<OString,OString>(sKey,rText.copy(nStart+1,nEnd-nStart-1)));
+
if (Export::isSourceLanguage(rLangIndex))
return sal_False;
commit c03c144d4a8453d0b4e94def8d0f5780d07643b7
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Sun Dec 9 22:36:35 2012 +0100
Revert "Make src lists modifiable"
It is more difficult than I think first
and it needs to solve in an other way.
This reverts commit e1a91a9ceda6020bb256739e83dc371a50af3b1d.
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index ecc9e2e..af94c17 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -39,7 +39,6 @@
#include <vector> /* std::vector*/
#include <queue>
#include <string>
-#include <map>
#include <unistd.h>
#ifdef WNT
@@ -330,7 +329,6 @@ public:
private:
static std::vector<rtl::OString> aLanguages;
static std::vector<rtl::OString> aForcedLanguages;
- std::map<OString,OString> aOrigListItems;
sal_Bool WriteData( ResData *pResData, sal_Bool bCreateNew = sal_False );// called befor dest. cur ResData
sal_Bool WriteExportList( ResData *pResData, ExportList *pExportList,
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 8fb78e3..061d8e6 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -988,7 +988,7 @@ sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew )
rtl::OString sList( "pairedlist" );
WriteExportList( pResData, pResData->pPairedList, sList, bCreateNew );
if ( bCreateNew )
- pResData->pPairedList = 0;
+ pResData->pItemList = 0;
}
if ( pResData->pUIEntries ) {
rtl::OString sList( "uientries" );
@@ -1694,12 +1694,14 @@ void Export::MergeRest( ResData *pResData, sal_uInt16 nMode )
if ( pList )
nMaxIndex = pList->GetSourceLanguageListEntryCount();
pEntrys = pMergeDataFile->GetPFormEntrys( pResData );
- while( nLIndex < nMaxIndex ) {
+ while( pEntrys && ( nLIndex < nMaxIndex )) {
rtl::OString sText;
- if( !pEntrys || !pEntrys->GetTransex3Text( sText, STRING_TYP_TEXT, sCur, sal_True ) )
- sText = aOrigListItems.find(pResData->sId + pResData->sGId + pResData->sResTyp)->second;
+ sal_Bool bText;
+ bText = pEntrys->GetTransex3Text( sText, STRING_TYP_TEXT, sCur, sal_True );
+ if( !bText )
+ bText = pEntrys->GetTransex3Text( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , sal_False );
- if (!sText.isEmpty())
+ if ( bText && !sText.isEmpty())
{
if ( nIdx == 1 )
{
More information about the Libreoffice-commits
mailing list