summaryrefslogtreecommitdiff
path: root/l10ntools/source/lngmerge.cxx
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2013-03-25 11:57:39 +0100
committerZolnai Tamás <zolnaitamas2000@gmail.com>2013-03-25 12:01:59 +0100
commit56a52889e65a17e324fc10cf341690385f5a9dd9 (patch)
tree00b1b49b1ea5fc63c2ab01838a55afb5d420c1ad /l10ntools/source/lngmerge.cxx
parent2d8547d095897037388b27075fd7dc182a4e4912 (diff)
Remove unneeded project and projectroot parameters
Plus avoid use of Export::sLanguages member outside of the class. Change-Id: I33702816fdb4980d690cfe8fcd8cc3fbd0df1dd8
Diffstat (limited to 'l10ntools/source/lngmerge.cxx')
-rw-r--r--l10ntools/source/lngmerge.cxx20
1 files changed, 9 insertions, 11 deletions
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index 36580440a4ba..8586a8a84914 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -80,11 +80,11 @@ LngParser::~LngParser()
delete pLines;
}
-sal_Bool LngParser::CreatePO( const rtl::OString &rPOFile )
+sal_Bool LngParser::CreatePO(
+ const OString &rPOFile,
+ const OString &rLanguage )
{
-
- Export::InitLanguages( false );
- aLanguages = Export::GetLanguages();
+ aLanguages.push_back(rLanguage);
PoOfstream aPOStream( rPOFile, PoOfstream::APP );
if (!aPOStream.isOpen()) {
std::cerr << "Ulfex error: Can't open po file:" << rPOFile.getStr() << "\n";
@@ -161,10 +161,10 @@ void LngParser::ReadLine(const rtl::OString &rLine_in,
}
sal_Bool LngParser::Merge(
- const rtl::OString &rPOFile,
- const rtl::OString &rDestinationFile)
+ const OString &rPOFile,
+ const OString &rDestinationFile,
+ const OString &rLanguage )
{
- Export::InitLanguages( true );
std::ofstream aDestination(
rDestinationFile.getStr(), std::ios_base::out | std::ios_base::trunc);
if (!aDestination.is_open()) {
@@ -173,10 +173,8 @@ sal_Bool LngParser::Merge(
nError = LNG_OK;
MergeDataFile aMergeDataFile( rPOFile, sSource, false, true );
- rtl::OString sTmp( Export::sLanguages );
- if( sTmp.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("ALL")) )
- Export::SetLanguages( aMergeDataFile.GetLanguages() );
- aLanguages = Export::GetLanguages();
+ if( rLanguage.equalsIgnoreAsciiCase("ALL") )
+ aLanguages = aMergeDataFile.GetLanguages();
size_t nPos = 0;
sal_Bool bGroup = sal_False;