summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-07 17:16:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-08 08:08:35 +0200
commita209172669e7a2de6065486e385e4e3007b74bd2 (patch)
tree4a7e008cf700fb23ecc6e4cd44de1c6a08a9b7e7 /l10ntools
parent2675cbf042130f24fe7ea299b85b8f5f4794a667 (diff)
loplugin:constantparam
Change-Id: Ib92aba17c46a4ada75c2a0630f281759d995f32e Reviewed-on: https://gerrit.libreoffice.org/40843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/inc/export.hxx2
-rw-r--r--l10ntools/source/cfgmerge.cxx2
-rw-r--r--l10ntools/source/helpmerge.cxx2
-rw-r--r--l10ntools/source/lngmerge.cxx4
-rw-r--r--l10ntools/source/merge.cxx30
-rw-r--r--l10ntools/source/propmerge.cxx2
-rw-r--r--l10ntools/source/treemerge.cxx2
-rw-r--r--l10ntools/source/xrmmerge.cxx6
8 files changed, 15 insertions, 35 deletions
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index 8127305423c7..40f8c27ff6df 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -123,7 +123,7 @@ public:
sTitle[ rId ] = rTitle;
bTitleFirst[ rId ] = true;
}
- bool GetText( OString &rReturn, StringType nTyp, const OString &nLangIndex, bool bDel = false );
+ bool GetText( OString &rReturn, const OString &nLangIndex, bool bDel = false );
/**
Generate QTZ string with ResData
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index e7596e85d0fc..8e4868471f01 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -470,7 +470,7 @@ void CfgMerge::WorkOnResourceEnd()
sCur = aLanguages[ i ];
OString sContent;
- pEntrys->GetText( sContent, StringType::Text, sCur , true );
+ pEntrys->GetText( sContent, sCur, true );
if (
( !sCur.equalsIgnoreAsciiCase("en-US") ) && !sContent.isEmpty())
{
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index af48e3c86c85..1933afdd6325 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -235,7 +235,7 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa
pEntrys = pMergeDataFile->GetMergeEntrys( pResData );
if( pEntrys != nullptr)
{
- pEntrys->GetText( sNewText, StringType::Text, sCur, true );
+ pEntrys->GetText( sNewText, sCur, true );
if (helper::isWellFormedXML(XMLUtil::QuotHTML(sNewText)))
{
sNewdata = sSourceText.copy(0,nPreSpaces) + sNewText;
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index b412f882e914..347972c91a06 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -230,7 +230,7 @@ bool LngParser::Merge(
if( !sLang.isEmpty() )
{
OString sNewText;
- pEntrys->GetText( sNewText, StringType::Text, sLang, true );
+ pEntrys->GetText( sNewText, sLang, true );
if( sLang == "qtz" )
continue;
@@ -268,7 +268,7 @@ bool LngParser::Merge(
{
OString sNewText;
- pEntrys->GetText( sNewText, StringType::Text, sCur, true );
+ pEntrys->GetText( sNewText, sCur, true );
if( sCur == "qtz" )
continue;
if ( !sNewText.isEmpty() && sCur != "x-comment")
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index af4ffb8d308c..eba518a8165d 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -78,32 +78,14 @@ ResData::ResData( const OString &rGId, const OString &rFilename)
bool MergeEntrys::GetText( OString &rReturn,
- StringType nTyp, const OString &nLangIndex, bool bDel )
+ const OString &nLangIndex, bool bDel )
{
bool bReturn = true;
- switch ( nTyp ) {
- case StringType::Text :
- rReturn = sText[ nLangIndex ];
- if ( bDel )
- sText[ nLangIndex ] = "";
- bReturn = bTextFirst[ nLangIndex ];
- bTextFirst[ nLangIndex ] = false;
- break;
- case StringType::QuickHelpText :
- rReturn = sQuickHelpText[ nLangIndex ];
- if ( bDel )
- sQuickHelpText[ nLangIndex ] = "";
- bReturn = bQuickHelpTextFirst[ nLangIndex ];
- bQuickHelpTextFirst[ nLangIndex ] = false;
- break;
- case StringType::Title :
- rReturn = sTitle[ nLangIndex ];
- if ( bDel )
- sTitle[ nLangIndex ] = "";
- bReturn = bTitleFirst[ nLangIndex ];
- bTitleFirst[ nLangIndex ] = false;
- break;
- }
+ rReturn = sText[ nLangIndex ];
+ if ( bDel )
+ sText[ nLangIndex ] = "";
+ bReturn = bTextFirst[ nLangIndex ];
+ bTextFirst[ nLangIndex ] = false;
return bReturn;
}
diff --git a/l10ntools/source/propmerge.cxx b/l10ntools/source/propmerge.cxx
index bb58876c5d14..15850d911001 100644
--- a/l10ntools/source/propmerge.cxx
+++ b/l10ntools/source/propmerge.cxx
@@ -205,7 +205,7 @@ void PropParser::Merge( const OString &rMergeSrc, const OString &rDestinationFil
MergeEntrys* pEntrys = pMergeDataFile->GetMergeEntrys( &aResData );
if( pEntrys )
{
- pEntrys->GetText( sNewText, StringType::Text, m_sLang );
+ pEntrys->GetText( sNewText, m_sLang );
}
}
if( !sNewText.isEmpty() )
diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx
index 95b6ab2595dc..582017dbd2a3 100644
--- a/l10ntools/source/treemerge.cxx
+++ b/l10ntools/source/treemerge.cxx
@@ -168,7 +168,7 @@ namespace
pMergeDataFile->GetMergeEntrys( &aResData );
if( pEntrys )
{
- pEntrys->GetText( sNewText, StringType::Text, rLang );
+ pEntrys->GetText( sNewText, rLang );
}
}
else if( rLang == "qtz" )
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 84aec0313b45..e3dc7777c9e2 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -410,8 +410,7 @@ void XRMResMerge::WorkOnDesc(
sCur = aLanguages[ n ];
OString sContent;
if ( !sCur.equalsIgnoreAsciiCase("en-US") &&
- ( pEntrys->GetText(
- sContent, StringType::Text, sCur, true )) &&
+ ( pEntrys->GetText( sContent, sCur, true )) &&
!sContent.isEmpty())
{
OString sText( sContent );
@@ -498,8 +497,7 @@ void XRMResMerge::EndOfText(
sCur = aLanguages[ n ];
OString sContent;
if (!sCur.equalsIgnoreAsciiCase("en-US") &&
- ( pEntrys->GetText(
- sContent, StringType::Text, sCur, true )) &&
+ ( pEntrys->GetText( sContent, sCur, true )) &&
!sContent.isEmpty() &&
helper::isWellFormedXML( sContent ))
{