l10ntools/source/localize.cxx | 14 +++++++------- l10ntools/source/po.cxx | 22 +++++++++++----------- l10ntools/source/renewpo.cxx | 8 ++++---- 3 files changed, 22 insertions(+), 22 deletions(-)
New commits: commit ecfa813595cb577781668219d9e17a0494f92bea Author: Zolnai Tamás <[email protected]> Date: Wed Aug 29 12:58:29 2012 +0200 Some cleanup Use normal integer types when it's unecessary to use sal_int types. Delete some hack from code. Change-Id: I93f0b1f260578d3aa9609b7e9d8a79053693971b Reviewed-on: https://gerrit.libreoffice.org/510 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx index bef2444..598eccf 100644 --- a/l10ntools/source/localize.cxx +++ b/l10ntools/source/localize.cxx @@ -194,13 +194,13 @@ void handleCommand( throw false; //TODO } rtl::OUStringBuffer buf( - //getEnvironment( - //rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SOLARVER")))); - //buf.append('/'); - //buf.append( - //getEnvironment( - rtl::OUString("/home/zolnai/git/libo/solver/unxlngi6.pro")); - // RTL_CONSTASCII_USTRINGPARAM("INPATH_FOR_BUILD")))); + getEnvironment( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SOLARVER")))); + buf.append('/'); + buf.append( + getEnvironment( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("INPATH_FOR_BUILD")))); buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("/bin/")); buf.append(executable); buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(" -e -p ")); diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx index c488c87..472e876 100644 --- a/l10ntools/source/po.cxx +++ b/l10ntools/source/po.cxx @@ -45,7 +45,7 @@ OString ImplGenKeyId(const OString& rGenerator) OString sKeyId = ""; while ( sKeyId.getLength() < 4 ) { - //Concat a char from the [33,126] intervallum of ASCII + //Concat a char from the [33,126] interval of ASCII sKeyId += OString(char(int(double(nCRC & 255)/255*93)+33)); nCRC >>= 8; } @@ -59,10 +59,10 @@ OString ImplEscapeText(const OString& rText, { if(rEscaped.getLength()!=2*rUnEscaped.getLength()) throw; OString sResult = rText; - sal_Int32 nCount = 0; - for(sal_Int32 nIndex=0; nIndex<rText.getLength(); ++nIndex) + int nCount = 0; + for(int nIndex=0; nIndex<rText.getLength(); ++nIndex) { - sal_Int32 nActChar = rUnEscaped.indexOf(rText[nIndex]); + int nActChar = rUnEscaped.indexOf(rText[nIndex]); if(nActChar!=-1) sResult = sResult.replaceAt((nIndex)+(nCount++),1, rEscaped.copy(2*nActChar,2)); @@ -77,10 +77,10 @@ OString ImplUnEscapeText(const OString& rText, { if(rEscaped.getLength()!=2*rUnEscaped.getLength()) throw; OString sResult = rText; - sal_Int32 nCount = 0; - for(sal_Int32 nIndex=0; nIndex<rText.getLength()-1; ++nIndex) + int nCount = 0; + for(int nIndex=0; nIndex<rText.getLength()-1; ++nIndex) { - sal_Int32 nActChar = rEscaped.indexOf(rText.copy(nIndex,2)); + int nActChar = rEscaped.indexOf(rText.copy(nIndex,2)); if(nActChar % 2 == 0) sResult = sResult.replaceAt((nIndex++)-(nCount++),2, rUnEscaped.copy(nActChar/2,1)); @@ -95,7 +95,7 @@ OString ImplGenMsgString(const OString& rSource) return "\"\""; OString sResult = "\"" + rSource + "\""; - sal_Int32 nIndex = 0; + int nIndex = 0; while((nIndex=sResult.indexOf("\\n",nIndex))!=-1) { if( sResult.copy(nIndex-1,3) != "\\\\n" ) @@ -160,12 +160,12 @@ void GenPoEntry::writeToFile(std::ofstream& io_rOFStream) //Class PoEntry //Split string at the delimiter char -void ImplSplitAt(const OString& rSource, const sal_Int32 nDelimiter, +void ImplSplitAt(const OString& rSource, const char nDelimiter, std::vector<OString>& o_vParts) { o_vParts.resize( 0 ); - sal_Int32 nActIndex( 0 ); - sal_Int32 nLastSplit( 0 ); + int nActIndex( 0 ); + int nLastSplit( 0 ); while( nActIndex < rSource.getLength() ) { if ( rSource[nActIndex] == nDelimiter ) diff --git a/l10ntools/source/renewpo.cxx b/l10ntools/source/renewpo.cxx index f68250e..20738b1 100644 --- a/l10ntools/source/renewpo.cxx +++ b/l10ntools/source/renewpo.cxx @@ -61,8 +61,8 @@ OString GetPath(const OString& rPath, const OString& rLine) OString DelLocalId(const OString& rLine) { - sal_uInt16 nTabIndex = 0; - for(sal_uInt16 nComponent=0; nComponent<PoEntry::LOCALID; ++nComponent) + unsigned nTabIndex = 0; + for(unsigned nComponent=0; nComponent<PoEntry::LOCALID; ++nComponent) { nTabIndex = rLine.indexOf('\t',nTabIndex); ++nTabIndex; @@ -138,8 +138,8 @@ void HandleLanguage(struct dirent* pLangEntry, const OString& rPath, const vector<PoEntry::TYPE> vTypes = { PoEntry::TTEXT, PoEntry::TQUICKHELPTEXT, PoEntry::TTITLE }; - sal_uInt16 nDummyBit = 0; - for( sal_uInt16 nIndex=0; nIndex<vTypes.size(); ++nIndex) + unsigned short nDummyBit = 0; + for( unsigned nIndex=0; nIndex<vTypes.size(); ++nIndex) { if (!sActUnTrans.getToken(vTypes[nIndex],'\t').isEmpty()) {
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
