summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--l10ntools/inc/export.hxx9
-rw-r--r--l10ntools/source/export.cxx25
-rw-r--r--l10ntools/source/export2.cxx113
-rw-r--r--l10ntools/source/helpmerge.cxx2
-rw-r--r--l10ntools/source/xrmmerge.cxx1
5 files changed, 1 insertions, 149 deletions
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index 0d707abe9898..aedf7fdfd956 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -345,23 +345,17 @@ public:
static void QuotHTML( ByteString &rString );
static bool CopyFile( const ByteString& source , const ByteString& dest );
- static void QuotHTMLXRM( ByteString &rString );
static void UnquotHTML( ByteString &rString );
static const char* GetEnv( const char *pVar );
- static int getCurrentDirectory( rtl::OUString& base_fqurl , rtl::OUString& base );
static bool isSourceLanguage( const ByteString &sLanguage );
static bool isAllowed( const ByteString &sLanguage );
- static bool LanguageAllowed( const ByteString &nLanguage );
static void Languages( std::vector<ByteString>::const_iterator& begin , std::vector<ByteString>::const_iterator& end );
static void getRandomName( const ByteString& sPrefix , ByteString& sRandStr , const ByteString& sPostfix );
- static void getRandomName( ByteString& sRandStr );
static void getCurrentDir( std::string& dir );
- static void replaceEncoding( ByteString& rString );
-
static ByteString GetFallbackLanguage( const ByteString nLanguage );
static void FillInFallbacks( ResData *pResData );
static void FillInListFallbacks( ExportList *pList, const ByteString &nSource, const ByteString &nFallback );
@@ -377,8 +371,6 @@ private:
static std::vector<ByteString> aLanguages;
static std::vector<ByteString> aForcedLanguages;
- sal_Bool ListExists( ResData *pResData, sal_uInt16 nLst );
-
sal_Bool WriteData( ResData *pResData, sal_Bool bCreateNew = sal_False );// called befor dest. cur ResData
sal_Bool WriteExportList( ResData *pResData, ExportList *pExportList,
const ByteString &rTyp, sal_Bool bCreateNew = sal_False );
@@ -393,7 +385,6 @@ private:
ByteString GetPairedListString ( const ByteString& sText );
ByteString StripList ( const ByteString& sText );
- void UnmergeUTF8( ByteString& sOrig );
void InsertListEntry( const ByteString &rText, const ByteString &rLine );
void CleanValue( ByteString &rValue );
ByteString GetText( const ByteString &rSource, int nToken );
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 6d08da4144f7..2ef0f1467b9f 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -1155,31 +1155,6 @@ void Export::CutComment( ByteString &rText )
}
}
-void Export::UnmergeUTF8( ByteString& sOrig ){
- sal_uInt16 nPos1 = sOrig.Search('\"');
- sal_uInt16 nPos2 = sOrig.SearchBackward('\"');
- if( nPos1 > 0 && nPos2 > 0 && nPos1 < nPos2){
- ByteString sPart = sOrig.Copy(nPos1+1 , nPos2-1);
- ByteString sPartUTF8 = sPart;
- sPartUTF8.Convert( RTL_TEXTENCODING_MS_1252 , RTL_TEXTENCODING_UTF8 );
- sOrig.SearchAndReplace( sPart , sPartUTF8 );
- }
-}
-
-/*****************************************************************************/
-sal_Bool Export::ListExists( ResData *pResData, sal_uInt16 nLst )
-/*****************************************************************************/
-{
- switch ( nLst ) {
- case LIST_STRING: return pResData->pStringList != NULL;
- case LIST_FILTER: return pResData->pFilterList != NULL;
- case LIST_ITEM: return pResData->pItemList != NULL;
- case LIST_PAIRED: return pResData->pPairedList != NULL;
- case LIST_UIENTRIES: return pResData->pUIEntries != NULL;
- }
- return sal_False;
-}
-
/*****************************************************************************/
sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew )
/*****************************************************************************/
diff --git a/l10ntools/source/export2.cxx b/l10ntools/source/export2.cxx
index 0b7fb44d8a95..35e46da64891 100644
--- a/l10ntools/source/export2.cxx
+++ b/l10ntools/source/export2.cxx
@@ -140,75 +140,6 @@ std::vector<ByteString> Export::GetForcedLanguages(){
std::vector<ByteString> Export::aLanguages = std::vector<ByteString>();
std::vector<ByteString> Export::aForcedLanguages = std::vector<ByteString>();
-
-/*****************************************************************************/
-void Export::QuotHTMLXRM( ByteString &rString )
-/*****************************************************************************/
-{
- ByteString sReturn;
- for ( sal_uInt16 i = 0; i < rString.Len(); i++ ) {
- ByteString sTemp = rString.Copy( i );
- if ( sTemp.Search( "<Arg n=" ) == 0 ) {
- while ( i < rString.Len() && rString.GetChar( i ) != '>' ) {
- sReturn += rString.GetChar( i );
- i++;
- }
- if ( rString.GetChar( i ) == '>' ) {
- sReturn += ">";
- i++;
- }
- }
-
- if ( i < rString.Len()) {
- switch ( rString.GetChar( i )) {
- case '<':
- if( i+2 < rString.Len() &&
- (rString.GetChar( i+1 ) == 'b' || rString.GetChar( i+1 ) == 'B') &&
- rString.GetChar( i+2 ) == '>' )
- {
- sReturn +="<b>";
- i += 2;
- }
- else if( i+3 < rString.Len() &&
- rString.GetChar( i+1 ) == '/' &&
- (rString.GetChar( i+2 ) == 'b' || rString.GetChar( i+2 ) == 'B') &&
- rString.GetChar( i+3 ) == '>' )
- {
- sReturn +="</b>";
- i += 3;
- }
- else
- sReturn += "&lt;";
- break;
-
- case '>':
- sReturn += "&gt;";
- break;
-
- case '\"':
- sReturn += "&quot;";
- break;
-
- case '\'':
- sReturn += "&apos;";
- break;
-
- case '&':
- if ((( i + 4 ) < rString.Len()) &&
- ( rString.Copy( i, 5 ) == "&amp;" ))
- sReturn += rString.GetChar( i );
- else
- sReturn += "&amp;";
- break;
-
- default:
- sReturn += rString.GetChar( i );
- break;
- }
- }
- }
- rString = sReturn;
-}
/*****************************************************************************/
void Export::QuotHTML( ByteString &rString )
/*****************************************************************************/
@@ -402,12 +333,6 @@ bool Export::isSourceLanguage( const ByteString &sLanguage )
bool Export::isAllowed( const ByteString &sLanguage ){
return ! ( sLanguage.EqualsIgnoreCaseAscii("en-US") );
}
-/*****************************************************************************/
-bool Export::LanguageAllowed( const ByteString &nLanguage )
-/*****************************************************************************/
-{
- return std::find( aLanguages.begin() , aLanguages.end() , nLanguage ) != aLanguages.end();
-}
bool Export::isInitialized = false;
@@ -452,29 +377,6 @@ ByteString Export::GetFallbackLanguage( const ByteString nLanguage )
return sFallback;
}
-void Export::replaceEncoding( ByteString& rString )
-{
-// &#x2122; -> \u2122
-
- for( xub_StrLen idx = 0; idx <= rString.Len()-8 ; idx++ )
- {
- if( rString.GetChar( idx ) == '&' &&
- rString.GetChar( idx+1 ) == '#' &&
- rString.GetChar( idx+2 ) == 'x' &&
- rString.GetChar( idx+7 ) == ';' )
- {
- ByteString sTmp = rString.Copy( 0 , idx );
- sTmp.Append( "\\u" );
- sTmp.Append( rString.GetChar( idx+3 ) );
- sTmp.Append( rString.GetChar( idx+4 ) );
- sTmp.Append( rString.GetChar( idx+5 ) );
- sTmp.Append( rString.GetChar( idx+6 ) );
- sTmp.Append( rString.Copy( idx+8 , rString.Len() ) );
- rString = sTmp;
- }
- }
-}
-
/*****************************************************************************/
void Export::FillInFallbacks( ResData *pResData )
/*****************************************************************************/
@@ -611,15 +513,6 @@ const char* Export::GetEnv( const char *pVar )
return pRet;
}
-
-int Export::getCurrentDirectory( rtl::OUString& base_fqurl_out, rtl::OUString& base_out )
-{
- DirEntry aDir(".");
- aDir.ToAbs();
- base_out = rtl::OUString( aDir.GetFull() );
- return osl::File::getFileURLFromSystemPath( base_out , base_fqurl_out );
-}
-
void Export::getCurrentDir( string& dir )
{
char buffer[64000];
@@ -667,12 +560,6 @@ void Export::getRandomName( const ByteString& sPrefix , ByteString& sRandStr , c
sRandStr.Append( sPostfix );
}
-void Export::getRandomName( ByteString& sRandStr )
-{
- const ByteString sEmpty;
- getRandomName( sEmpty , sRandStr , sEmpty );
-}
-
/*****************************************************************************/
DirEntry Export::GetTempFile()
/*****************************************************************************/
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 9203fd94b5e7..5a0ffa193edd 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -454,7 +454,7 @@ bool HelpParser::MergeSingleFile( XMLFile* file , MergeDataFile& aMergeDataFile
static const ByteString INPATH = Export::GetEnv( "INPATH" );
Export::getRandomName( sPath , sTempFile , INPATH );
- Export::getRandomName( sPath , sTempFileCopy , INPATH );
+ Export::getRandomName( sPath , sTempFileCopy , INPATH );
// Write in the temp file
bool hasNoError = file->Write ( sTempFile );
if( !hasNoError )
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 875fd457cf93..e682463bf523 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -648,7 +648,6 @@ void XRMResMerge::WorkOnText(
{
rText = sContent;
ConvertStringToXMLFormat( rText );
- //Export::QuotHTMLXRM( rText );
}
}
}