[Libreoffice-commits] .: 4 commits - accessibility/inc accessibility/source l10ntools/inc l10ntools/source sal/osl unusedcode.easy
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Dec 7 03:37:36 PST 2011
accessibility/inc/accessibility/helper/acc_factory.hxx | 53 ---------
accessibility/source/helper/acc_factory.cxx | 39 +++++-
l10ntools/inc/export.hxx | 12 +-
l10ntools/inc/helpmerge.hxx | 3
l10ntools/inc/lngmerge.hxx | 21 ++-
l10ntools/source/cfgmerge.cxx | 9 +
l10ntools/source/export.cxx | 95 +++++++++--------
l10ntools/source/export2.cxx | 42 +++++--
l10ntools/source/helpmerge.cxx | 9 -
l10ntools/source/lngex.cxx | 5
l10ntools/source/lngmerge.cxx | 51 +++------
l10ntools/source/merge.cxx | 2
l10ntools/source/xrmmerge.cxx | 6 -
sal/osl/unx/system.c | 4
unusedcode.easy | 7 +
15 files changed, 180 insertions(+), 178 deletions(-)
New commits:
commit 42502c8484cd0aef4732cc33fdc4b9a5a333a1f8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 7 11:36:01 2011 +0000
|| -> &&
diff --git a/sal/osl/unx/system.c b/sal/osl/unx/system.c
index d1fc724..bf8607d 100644
--- a/sal/osl/unx/system.c
+++ b/sal/osl/unx/system.c
@@ -201,11 +201,11 @@ int macxp_resolveAlias(char *path, int buflen)
#endif /* NO_PTHREAD_RTL */
-#if defined(LINUX) && defined (__GLIBC__) && __GLIBC__ == 2 || __GLIBC_MINOR__ < 4
+#if defined(LINUX) && defined (__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 4
/* The linux kernel 2.4 getpid implemention always return the pid of the
thread subprocess and not of the main process, the NPTL implementation
with a Linux kernel 2.6 kernel return the pid. So when possibly
- their is the wrong implementation of getpid, we save the pid at startup.
+ there is the wrong implementation of getpid, we save the pid at startup.
FIXME: when our Linux base-line is above:
+ Linux kernel version 2.6 or higher; -> clone() for NTPL
+ glibc2 version 2.4 or higher; -> No longer LinuxThreads, only NPTL
commit 6c335f5754ec1aee70cdba2d332e9cece17a7565
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 7 10:49:55 2011 +0000
convert some archaic l10ntools code
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index ae6c21e..a4d2f80 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -148,7 +148,7 @@ class ResData
{
public:
~ResData();
- sal_Bool SetId( const ByteString &rId, sal_uInt16 nLevel );
+ sal_Bool SetId(const rtl::OString &rId, sal_uInt16 nLevel);
sal_uInt16 nWidth;
sal_uInt16 nChildIndex;
@@ -318,8 +318,8 @@ private:
public:
ParserQueue* pParseQueue; // public ?
- static ByteString sLanguages; // public ?
- static ByteString sForcedLanguages; // public ?
+ static rtl::OString sLanguages; // public ?
+ static rtl::OString sForcedLanguages; // public ?
static bool skipProject( ByteString sPrj ) ;
@@ -352,8 +352,10 @@ public:
static ByteString GetNativeFile( ByteString sSource );
static DirEntry GetTempFile();
- static void DumpExportList( ByteString& sListName , ExportList& aList );
- static ByteString DumpMap( ByteString& sMapName , ByteStringHashMap& aMap );
+ static void DumpExportList(const rtl::OString& rListName,
+ ExportList& aList);
+ static ByteString DumpMap(const rtl::OString& rMapName,
+ ByteStringHashMap& aMap);
private:
static std::vector<ByteString> aLanguages;
diff --git a/l10ntools/inc/helpmerge.hxx b/l10ntools/inc/helpmerge.hxx
index a160b15..aeb61ae 100644
--- a/l10ntools/inc/helpmerge.hxx
+++ b/l10ntools/inc/helpmerge.hxx
@@ -64,7 +64,8 @@ public:
/// Method merges the String from the SDFfile into XMLfile. Both Strings must
/// point to existing files.
- bool Merge( const ByteString &rSDFFile_in, const ByteString &rDestinationFile_in , ByteString& sLanguage , MergeDataFile& aMergeDataFile );
+ bool Merge( const ByteString &rSDFFile_in, const ByteString &rDestinationFile_in ,
+ const rtl::OString& sLanguage , MergeDataFile& aMergeDataFile );
bool Merge( const ByteString &rSDFFile, const ByteString &rPathX , const ByteString &rPathY , bool bISO
, const std::vector<ByteString>& aLanguages , MergeDataFile& aMergeDataFile , bool bCreateDir );
diff --git a/l10ntools/inc/lngmerge.hxx b/l10ntools/inc/lngmerge.hxx
index e658817..285f129 100644
--- a/l10ntools/inc/lngmerge.hxx
+++ b/l10ntools/inc/lngmerge.hxx
@@ -47,23 +47,28 @@ class LngParser
private:
sal_uInt16 nError;
LngLineList *pLines;
- ByteString sSource;
+ rtl::OString sSource;
sal_Bool bDBIsUTF8;
sal_Bool bULF;
bool bQuiet;
std::vector<ByteString> aLanguages;
bool isNextGroup( ByteString &sGroup_out , ByteString &sLine_in);
- void ReadLine( const ByteString &sLine_in , ByteStringHashMap &rText_inout );
- void WriteSDF( SvFileStream &aSDFStream , ByteStringHashMap &rText_inout ,
- const ByteString &rPrj ,
- const ByteString &rRoot , const ByteString &sActFileName , const ByteString &sID );
+ void ReadLine(const rtl::OString &rLine_in,
+ ByteStringHashMap &rText_inout);
+ void WriteSDF(SvFileStream &aSDFStream, ByteStringHashMap &rText_inout,
+ const rtl::OString &rPrj, const rtl::OString &rRoot,
+ const rtl::OString &rActFileName, const rtl::OString &rID);
public:
- LngParser( const ByteString &rLngFile, sal_Bool bUTF8, sal_Bool bULFFormat );
+ LngParser(const rtl::OString &rLngFile, sal_Bool bUTF8,
+ sal_Bool bULFFormat);
~LngParser();
- sal_Bool CreateSDF( const ByteString &rSDFFile, const ByteString &rPrj, const ByteString &rRoot );
- sal_Bool Merge( const ByteString &rSDFFile, const ByteString &rDestinationFile , const ByteString &rPrj );
+ sal_Bool CreateSDF(const rtl::OString &rSDFFile,
+ const rtl::OString &rPrj,
+ const rtl::OString &rRoot);
+ sal_Bool Merge(const rtl::OString &rSDFFile,
+ const rtl::OString &rDestinationFile);
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index f44c1a8..a6fdb98 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -707,15 +707,18 @@ CfgMerge::CfgMerge(
sFilename( rFilename ),
bEnglish( sal_False )
{
- if ( rMergeSource.Len()){
+ if (rMergeSource.Len())
+ {
pMergeDataFile = new MergeDataFile(
rMergeSource, sInputFileName, bErrorLog, true );
- if( Export::sLanguages.EqualsIgnoreCaseAscii("ALL") ){
+ if (Export::sLanguages.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("ALL")))
+ {
Export::SetLanguages( pMergeDataFile->GetLanguages() );
aLanguages = pMergeDataFile->GetLanguages();
}
else aLanguages = Export::GetLanguages();
- }else
+ }
+ else
aLanguages = Export::GetLanguages();
}
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 51177a6..bd1fbfb 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -64,13 +64,13 @@ sal_Bool bErrorLog;
sal_Bool bBreakWhenHelpText;
sal_Bool bUnmerge;
sal_Bool bUTF8;
-ByteString sPrj;
-ByteString sPrjRoot;
-ByteString sActFileName;
-ByteString sOutputFile;
-ByteString sMergeSrc;
-ByteString sTempFile;
-ByteString sFile;
+rtl::OString sPrj;
+rtl::OString sPrjRoot;
+rtl::OString sActFileName;
+rtl::OString sOutputFile;
+rtl::OString sMergeSrc;
+rtl::OString sTempFile;
+rtl::OString sFile;
MergeDataFile *pMergeDataFile;
FILE *pTempFile;
@@ -145,35 +145,36 @@ extern char *GetOutputFile( int argc, char* argv[])
}
break;
case STATE_OUTPUT: {
- sOutputFile = ByteString( argv[ i ]); // the dest. file
+ sOutputFile = rtl::OString(argv[i]); // the dest. file
}
break;
case STATE_PRJ: {
- sPrj = ByteString( argv[ i ]);
+ sPrj = rtl::OString(argv[i]);
}
break;
case STATE_ROOT: {
- sPrjRoot = ByteString( argv[ i ]); // path to project root
+ sPrjRoot = rtl::OString(argv[i]); // path to project root
}
break;
case STATE_MERGESRC: {
- sMergeSrc = ByteString( argv[ i ]);
+ sMergeSrc = rtl::OString(argv[i]);
bMergeMode = sal_True; // activate merge mode, cause merge database found
}
break;
case STATE_LANGUAGES: {
- Export::sLanguages = ByteString( argv[ i ]);
+ Export::sLanguages = rtl::OString(argv[i]);
}
break;
}
}
}
- if( bUnmerge ) sMergeSrc = ByteString();
+ if( bUnmerge )
+ sMergeSrc = rtl::OString();
if ( bInput ) {
// command line is valid
bEnableExport = sal_True;
- char *pReturn = new char[ sOutputFile.Len() + 1 ];
- strcpy( pReturn, sOutputFile.GetBuffer()); // #100211# - checked
+ char *pReturn = new char[ sOutputFile.getLength() + 1 ];
+ strcpy( pReturn, sOutputFile.getStr()); // #100211# - checked
return pReturn;
}
@@ -185,16 +186,21 @@ int InitExport( char *pOutput , char* pFilename )
/*****************************************************************************/
{
// instanciate Export
- ByteString sOutput( pOutput );
- ByteString sFilename( pFilename );
+ rtl::OString sOutput( pOutput );
+ rtl::OString sFilename( pFilename );
- if ( bMergeMode && !bUnmerge ) {
+ if ( bMergeMode && !bUnmerge )
+ {
// merge mode enabled, so read database
- pExport = new Export(sOutput, bEnableExport, sPrj, sPrjRoot, sMergeSrc , sFilename );
+ pExport = new Export(sOutput, bEnableExport, sPrj, sPrjRoot,
+ sMergeSrc , sFilename );
}
else
+ {
// no merge mode, only export
- pExport = new Export( sOutput, bEnableExport, sPrj, sPrjRoot , sFilename );
+ pExport = new Export(sOutput, bEnableExport, sPrj, sPrjRoot,
+ sFilename );
+ }
return 1;
}
@@ -215,17 +221,20 @@ extern FILE *GetNextFile()
/*****************************************************************************/
{
// look for next valid filename in input file list
- if ( sTempFile.Len()) {
+ if ( sTempFile.getLength())
+ {
fclose( pTempFile );
- String sTemp( sTempFile, RTL_TEXTENCODING_ASCII_US );
+ String sTemp(rtl::OStringToOUString(sTempFile,
+ RTL_TEXTENCODING_ASCII_US));
DirEntry aTemp( sTemp );
aTemp.Kill();
}
- while ( !aInputFileList.empty() ) {
+ while ( !aInputFileList.empty() )
+ {
ByteString sFileName( *(aInputFileList[ 0 ]) );
- ByteString sOrigFile( sFileName );
+ rtl::OString sOrigFile( sFileName );
sFileName = Export::GetNativeFile( sFileName );
delete aInputFileList[ 0 ];
@@ -233,7 +242,7 @@ extern FILE *GetNextFile()
if ( sFileName == "" ) {
fprintf( stderr, "ERROR: Could not precompile File %s\n",
- sOrigFile.GetBuffer());
+ sOrigFile.getStr());
return GetNextFile();
}
@@ -250,7 +259,8 @@ extern FILE *GetNextFile()
// this is a valid file which can be opened, so
// create path to project root
- DirEntry aEntry( String( sOrigFile, RTL_TEXTENCODING_ASCII_US ));
+ DirEntry aEntry(rtl::OStringToOUString(sOrigFile,
+ RTL_TEXTENCODING_ASCII_US));
aEntry.ToAbs();
rtl::OString sFullEntry(rtl::OUStringToOString(aEntry.GetFull(),
RTL_TEXTENCODING_ASCII_US));
@@ -264,7 +274,7 @@ extern FILE *GetNextFile()
sActFileName = sFullEntry.copy(sPrjEntry.getLength() + 1);
- sActFileName.SearchAndReplaceAll( "/", "\\" );
+ sActFileName = sActFileName.replace('/', '\\');
sFile = sActFileName;
if ( pExport ) {
@@ -329,12 +339,12 @@ void ResData::Dump(){
printf("sPForm = %s , sResTyp = %s , sId = %s , sGId = %s , sHelpId = %s\n",sPForm.GetBuffer()
,sResTyp.GetBuffer(),sId.GetBuffer(),sGId.GetBuffer(),sHelpId.GetBuffer());
- ByteString a("*pStringList");
- ByteString b("*pUIEntries");
- ByteString c("*pFilterList");
- ByteString d("*pItemList");
- ByteString e("*pPairedList");
- ByteString f("sText");
+ rtl::OString a("*pStringList");
+ rtl::OString b("*pUIEntries");
+ rtl::OString c("*pFilterList");
+ rtl::OString d("*pItemList");
+ rtl::OString e("*pPairedList");
+ rtl::OString f("sText");
Export::DumpMap( f , sText );
@@ -347,7 +357,7 @@ void ResData::Dump(){
}
/*****************************************************************************/
-sal_Bool ResData::SetId( const ByteString &rId, sal_uInt16 nLevel )
+sal_Bool ResData::SetId( const rtl::OString& rId, sal_uInt16 nLevel )
/*****************************************************************************/
{
if ( nLevel > nIdLevel )
@@ -380,10 +390,9 @@ sal_Bool ResData::SetId( const ByteString &rId, sal_uInt16 nLevel )
// class Export
//
-/*****************************************************************************/
-Export::Export( const ByteString &rOutput, sal_Bool bWrite,
- const ByteString &rPrj, const ByteString &rPrjRoot , const ByteString& rFile )
-/*****************************************************************************/
+Export::Export(const ByteString &rOutput, sal_Bool bWrite,
+ const ByteString &rPrj, const ByteString &rPrjRoot,
+ const ByteString& rFile)
:
pWordTransformer( NULL ),
bDefine( sal_False ),
@@ -644,8 +653,8 @@ int Export::Execute( int nToken, const char * pToken )
sToken = comphelper::string::remove(sToken, '{');
while( sToken.SearchAndReplace( "\t", " " ) != STRING_NOTFOUND ) {};
sToken = comphelper::string::stripEnd(sToken, ' ');
- ByteString sT = getToken(sToken, 0, ' ');
- pResData->sResTyp = sT.ToLowerAscii();
+ rtl::OString sTLower = getToken(sToken, 0, ' ').toAsciiLowerCase();
+ pResData->sResTyp = sTLower;
ByteString sId( sToken.Copy( pResData->sResTyp.Len() + 1 ));
ByteString sCondition;
if ( sId.Search( "#" ) != STRING_NOTFOUND )
@@ -1316,11 +1325,9 @@ sal_Bool Export::WriteExportList( ResData *pResData, ExportList *pExportList,
ByteString sTimeStamp( Export::GetTimeStamp());
ByteString sCur;
- for ( size_t i = 0; pExportList != NULL && i < pExportList->size(); i++ ) {
+ for ( size_t i = 0; pExportList != NULL && i < pExportList->size(); i++ )
+ {
ExportListEntry *pEntry = (*pExportList)[ i ];
- // mandatory for export: german and eng. and/or enus
- // ByteString a("Export::WriteExportList::pEntry");
- // Export::DumpMap( a, *pEntry );
ByteString sLID(rtl::OString::valueOf(static_cast<sal_Int64>(i + 1)));
for (unsigned int n = 0; n < aLanguages.size(); ++n)
diff --git a/l10ntools/source/export2.cxx b/l10ntools/source/export2.cxx
index fec515f..873f39c 100644
--- a/l10ntools/source/export2.cxx
+++ b/l10ntools/source/export2.cxx
@@ -89,12 +89,13 @@ ResData::~ResData()
//
/*****************************************************************************/
-ByteString Export::sLanguages;
-ByteString Export::sForcedLanguages;
+rtl::OString Export::sLanguages;
+rtl::OString Export::sForcedLanguages;
/*****************************************************************************/
-void Export::DumpExportList( ByteString& sListName , ExportList& aList ){
- printf( "%s\n", sListName.GetBuffer() );
+void Export::DumpExportList(const rtl::OString& rListName, ExportList& aList)
+{
+ printf( "%s\n", rListName.getStr() );
ByteString l("");
ExportListEntry* aEntry;
for( unsigned int x = 0; x < aList.size() ; x++ ){
@@ -103,12 +104,15 @@ void Export::DumpExportList( ByteString& sListName , ExportList& aList ){
}
printf("\n");
}
-ByteString Export::DumpMap( ByteString& sMapName , ByteStringHashMap& aMap ){
+
+ByteString Export::DumpMap(const rtl::OString& rMapName,
+ ByteStringHashMap& aMap)
+{
ByteStringHashMap::const_iterator idbg;
ByteString sReturn;
- if( sMapName.Len() )
- printf("MapName %s\n", sMapName.GetBuffer());
+ if( rMapName.getLength() )
+ printf("MapName %s\n", rMapName.getStr());
if( aMap.size() < 1 ) return ByteString();
for( idbg = aMap.begin() ; idbg != aMap.end(); ++idbg ){
ByteString a( idbg->first );
@@ -119,6 +123,7 @@ ByteString Export::DumpMap( ByteString& sMapName , ByteStringHashMap& aMap ){
printf("\n");
return sReturn;
}
+
/*****************************************************************************/
void Export::SetLanguages( std::vector<ByteString> val ){
/*****************************************************************************/
@@ -347,17 +352,24 @@ bool Export::isInitialized = false;
/*****************************************************************************/
void Export::InitLanguages( bool bMergeMode ){
/*****************************************************************************/
- if( !isInitialized ){
+ if( !isInitialized )
+ {
ByteString sTmp;
ByteStringBoolHashMap aEnvLangs;
- for ( sal_uInt16 x = 0; x < sLanguages.GetTokenCount( ',' ); x++ ){
- sTmp = getToken(getToken(sLanguages, x, ','), 0, '=');
+
+ sal_Int32 nIndex = 0;
+ do
+ {
+ rtl::OString aToken = sLanguages.getToken(0, ',', nIndex);
+ sTmp = getToken(aToken, 0, '=');
sTmp = comphelper::string::strip(sTmp, ' ');
if( bMergeMode && !isAllowed( sTmp ) ){}
else if( !( (sTmp.GetChar(0)=='x' || sTmp.GetChar(0)=='X') && sTmp.GetChar(1)=='-' ) ){
aLanguages.push_back( sTmp );
}
}
+ while ( nIndex >= 0 );
+
InitForcedLanguages( bMergeMode );
isInitialized = true;
}
@@ -367,13 +379,19 @@ void Export::InitForcedLanguages( bool bMergeMode ){
/*****************************************************************************/
ByteString sTmp;
ByteStringBoolHashMap aEnvLangs;
- for ( sal_uInt16 x = 0; x < sForcedLanguages.GetTokenCount( ',' ); x++ ){
- sTmp = getToken(getToken(sForcedLanguages, x, ','), 0, '=');
+
+ sal_Int32 nIndex = 0;
+ do
+ {
+ rtl::OString aToken = sForcedLanguages.getToken(0, ',', nIndex);
+
+ sTmp = getToken(aToken, 0, '=');
sTmp = comphelper::string::strip(sTmp, ' ');
if( bMergeMode && isAllowed( sTmp ) ){}
else if( !( (sTmp.GetChar(0)=='x' || sTmp.GetChar(0)=='X') && sTmp.GetChar(1)=='-' ) )
aForcedLanguages.push_back( sTmp );
}
+ while ( nIndex >= 0 );
}
/*****************************************************************************/
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 9fae808..8447c9c 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -231,7 +231,7 @@ ByteString HelpParser::makeAbsolutePath( const ByteString& sHelpFile , const Byt
}
bool HelpParser::Merge( const ByteString &rSDFFile, const ByteString &rDestinationFile ,
- ByteString& sLanguage , MergeDataFile& aMergeDataFile )
+ const rtl::OString& rLanguage , MergeDataFile& aMergeDataFile )
{
(void) rSDFFile;
@@ -261,7 +261,7 @@ bool HelpParser::Merge( const ByteString &rSDFFile, const ByteString &rDestinati
XMLFile* xmlfile = ( aParser.Execute( aFile.GetFull() , sOUHelpFile, new XMLFile( '0' ) ) );
printf("Dest file %s\n",rDestinationFile.GetBuffer());
- hasNoError = MergeSingleFile( xmlfile , aMergeDataFile , sLanguage , rDestinationFile );
+ hasNoError = MergeSingleFile( xmlfile , aMergeDataFile , rLanguage , rDestinationFile );
delete xmlfile;
if( !sUsedTempFile.EqualsIgnoreCaseAscii( "" ) ){
DirEntry aTempFile( sUsedTempFile );
@@ -281,16 +281,15 @@ void HelpParser::parse_languages( std::vector<ByteString>& aLanguages , MergeDat
std::vector<ByteString> aTmp;
const ByteString ENUS ("en-US");
- static const ByteString ALL( "ALL" );
Export::InitLanguages( false );
- if( Export::sLanguages.EqualsIgnoreCaseAscii( ALL ) )
+ if (Export::sLanguages.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("ALL")))
{
aLanguages = aMergeDataFile.GetLanguages();
aLanguages.push_back( ENUS );
- if( !Export::sForcedLanguages.Equals("") )
+ if( !Export::sForcedLanguages.isEmpty() )
{
std::vector<ByteString> aFL = Export::GetForcedLanguages();
std::copy( aFL.begin() ,
diff --git a/l10ntools/source/lngex.cxx b/l10ntools/source/lngex.cxx
index 9c56881..7ab8e52 100644
--- a/l10ntools/source/lngex.cxx
+++ b/l10ntools/source/lngex.cxx
@@ -167,7 +167,8 @@ int _cdecl main( int argc, char *argv[] )
#endif
/*****************************************************************************/
{
- if ( !ParseCommandLine( argc, argv )) {
+ if ( !ParseCommandLine( argc, argv ))
+ {
Help();
return 1;
}
@@ -175,7 +176,7 @@ int _cdecl main( int argc, char *argv[] )
if ( sOutputFile.Len()) {
LngParser aParser( sInputFile, bUTF8, bULF );
if ( bMergeMode )
- aParser.Merge( sMergeSrc, sOutputFile , sPrj );
+ aParser.Merge(sMergeSrc, sOutputFile);
else
aParser.CreateSDF( sOutputFile, sPrj, sPrjRoot );
}
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index f07e13e..cb59f07 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -38,15 +38,13 @@ using comphelper::string::getToken;
//
// class LngParser
//
-/*****************************************************************************/
-LngParser::LngParser( const ByteString &rLngFile, sal_Bool bUTF8, sal_Bool bULFFormat )
-/*****************************************************************************/
- :
- nError( LNG_OK ),
- pLines( NULL ),
- sSource( rLngFile ),
- bDBIsUTF8( bUTF8 ),
- bULF( bULFFormat )
+LngParser::LngParser(const rtl::OString &rLngFile, sal_Bool bUTF8,
+ sal_Bool bULFFormat)
+ : nError( LNG_OK )
+ , pLines( NULL )
+ , sSource( rLngFile )
+ , bDBIsUTF8( bUTF8 )
+ , bULF( bULFFormat )
{
pLines = new LngLineList();
DirEntry aEntry( String( sSource, RTL_TEXTENCODING_ASCII_US ));
@@ -78,9 +76,7 @@ LngParser::LngParser( const ByteString &rLngFile, sal_Bool bUTF8, sal_Bool bULFF
nError = LNG_FILE_NOTFOUND;
}
-/*****************************************************************************/
LngParser::~LngParser()
-/*****************************************************************************/
{
for ( size_t i = 0, n = pLines->size(); i < n; i++ )
delete (*pLines)[ i ];
@@ -88,11 +84,8 @@ LngParser::~LngParser()
delete pLines;
}
-/*****************************************************************************/
-sal_Bool LngParser::CreateSDF(
- const ByteString &rSDFFile, const ByteString &rPrj,
- const ByteString &rRoot )
-/*****************************************************************************/
+sal_Bool LngParser::CreateSDF(const rtl::OString &rSDFFile,
+ const rtl::OString &rPrj, const rtl::OString &rRoot)
{
Export::InitLanguages( false );
@@ -141,9 +134,10 @@ sal_Bool LngParser::CreateSDF(
return true;
}
-void LngParser::WriteSDF( SvFileStream &aSDFStream , ByteStringHashMap &rText_inout ,
- const ByteString &rPrj , const ByteString &rRoot ,
- const ByteString &sActFileName , const ByteString &sID )
+void LngParser::WriteSDF(SvFileStream &aSDFStream,
+ ByteStringHashMap &rText_inout, const rtl::OString &rPrj,
+ const rtl::OString &rRoot, const rtl::OString &rActFileName,
+ const rtl::OString &rID)
{
sal_Bool bExport = true;
@@ -157,11 +151,11 @@ void LngParser::WriteSDF( SvFileStream &aSDFStream , ByteStringHashMap &rText_in
sAct = rText_inout[ ByteString("en-US") ];
ByteString sOutput( rPrj ); sOutput += "\t";
- if ( rRoot.Len())
- sOutput += sActFileName;
+ if (rRoot.getLength())
+ sOutput += rActFileName;
sOutput += "\t0\t";
sOutput += "LngText\t";
- sOutput += sID; sOutput += "\t\t\t\t0\t";
+ sOutput += rID; sOutput += "\t\t\t\t0\t";
sOutput += sCur; sOutput += "\t";
sOutput += sAct; sOutput += "\t\t\t\t";
sOutput += sTimeStamp;
@@ -185,22 +179,21 @@ bool LngParser::isNextGroup( ByteString &sGroup_out , ByteString &sLine_in )
return false;
}
-void LngParser::ReadLine( const ByteString &sLine_in , ByteStringHashMap &rText_inout)
+void LngParser::ReadLine(const rtl::OString &rLine_in,
+ ByteStringHashMap &rText_inout)
{
- rtl::OString sLang = getToken(sLine_in, 0, '=');
+ rtl::OString sLang = getToken(rLine_in, 0, '=');
sLang = comphelper::string::stripStart(sLang, ' ');
sLang = comphelper::string::stripEnd(sLang, ' ');
- rtl::OString sText = getToken(getToken(sLine_in, 1, '\"'), 0, '\"');
+ rtl::OString sText = getToken(getToken(rLine_in, 1, '\"'), 0, '\"');
if (!sLang.isEmpty())
rText_inout[ sLang ] = sText;
}
-/*****************************************************************************/
sal_Bool LngParser::Merge(
- const ByteString &rSDFFile, const ByteString &rDestinationFile , const ByteString& rPrj )
-/*****************************************************************************/
+ const rtl::OString &rSDFFile,
+ const rtl::OString &rDestinationFile)
{
- (void) rPrj;
Export::InitLanguages( true );
SvFileStream aDestination(
String( rDestinationFile, RTL_TEXTENCODING_ASCII_US ),
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index f96b483..5141b9b 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -56,7 +56,7 @@ ByteString PFormEntrys::Dump()
{
ByteString sRet( "PFormEntrys\n" );
ByteString a("sText");
- if(sText.size())
+ if (sText.size())
Export::DumpMap(a , sText);
return sRet;
}
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index cc7d540..698027d 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -638,11 +638,13 @@ XRMResMerge::XRMResMerge(
if ( rMergeSource.Len())
pMergeDataFile = new MergeDataFile(
rMergeSource, sInputFileName, bErrorLog);
- if( Export::sLanguages.EqualsIgnoreCaseAscii("ALL") ){
+ if( Export::sLanguages.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("ALL")))
+ {
Export::SetLanguages( pMergeDataFile->GetLanguages() );
aLanguages = pMergeDataFile->GetLanguages();
}
- else aLanguages = Export::GetLanguages();
+ else
+ aLanguages = Export::GetLanguages();
}
/*****************************************************************************/
commit 47690422e42f5fce29b331218a2d05966c13946d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 7 09:57:40 2011 +0000
don't need an extra header, fold into body
diff --git a/accessibility/inc/accessibility/helper/acc_factory.hxx b/accessibility/inc/accessibility/helper/acc_factory.hxx
deleted file mode 100644
index b3dec46..0000000
--- a/accessibility/inc/accessibility/helper/acc_factory.hxx
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef ACCESSIBILITY_HELPER_FACTORY_HXX
-#define ACCESSIBILITY_HELPER_FACTORY_HXX
-
-#include <toolkit/helper/accessiblefactory.hxx>
-#include <svtools/accessiblefactory.hxx>
-
-/** this is the entry point to retrieve a factory for the toolkit-level Accessible/Contexts supplied
- by this library
-
- This function implements the factory function needed in toolkit
- (of type GetStandardAccComponentFactory).
-*/
-extern "C" void* SAL_CALL getStandardAccessibleFactory();
-
-/** this is the entry point to retrieve a factory for the svtools-level Accessible/Contexts supplied
- by this library
-
- This function implements the factory function needed in svtools
- (of type GetSvtAccessibilityComponentFactory).
-*/
-extern "C" void* SAL_CALL getSvtAccessibilityComponentFactory();
-
-#endif // ACCESSIBILITY_HELPER_FACTORY_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx
index 1bbe20c..92ce2cc 100644
--- a/accessibility/source/helper/acc_factory.cxx
+++ b/accessibility/source/helper/acc_factory.cxx
@@ -26,9 +26,9 @@
*
************************************************************************/
-#include <accessibility/helper/acc_factory.hxx>
-
#include <toolkit/awt/vclxwindows.hxx>
+#include <toolkit/helper/accessiblefactory.hxx>
+#include <svtools/accessiblefactory.hxx>
#include <accessibility/standard/vclxaccessiblebutton.hxx>
#include <accessibility/standard/vclxaccessiblecheckbox.hxx>
#include <accessibility/standard/vclxaccessibledropdowncombobox.hxx>
@@ -536,18 +536,37 @@ inline bool hasFloatingChild(Window *pWindow)
//........................................................................
//========================================================================
-extern "C" void* SAL_CALL getStandardAccessibleFactory()
+
+/** this is the entry point to retrieve a factory for the toolkit-level Accessible/Contexts supplied
+ by this library
+
+ This function implements the factory function needed in toolkit
+ (of type GetStandardAccComponentFactory).
+*/
+extern "C"
{
- ::toolkit::IAccessibleFactory* pFactory = new ::accessibility::AccessibleFactory;
- pFactory->acquire();
- return pFactory;
+ SAL_DLLPUBLIC_EXPORT void* SAL_CALL getStandardAccessibleFactory()
+ {
+ ::toolkit::IAccessibleFactory* pFactory = new ::accessibility::AccessibleFactory;
+ pFactory->acquire();
+ return pFactory;
+ }
}
-extern "C" void* SAL_CALL getSvtAccessibilityComponentFactory()
+/** this is the entry point to retrieve a factory for the svtools-level Accessible/Contexts supplied
+ by this library
+
+ This function implements the factory function needed in svtools
+ (of type GetSvtAccessibilityComponentFactory).
+*/
+extern "C"
{
- ::svt::IAccessibleFactory* pFactory = new ::accessibility::AccessibleFactory;
- pFactory->acquire();
- return pFactory;
+ SAL_DLLPUBLIC_EXPORT void* SAL_CALL getSvtAccessibilityComponentFactory()
+ {
+ ::svt::IAccessibleFactory* pFactory = new ::accessibility::AccessibleFactory;
+ pFactory->acquire();
+ return pFactory;
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 13959acbd48951bffd661501b4693ddbe6eef11a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 7 09:46:42 2011 +0000
regenerate list
diff --git a/unusedcode.easy b/unusedcode.easy
index 0d3e98a..b6db194 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -5,6 +5,7 @@ AtomFolder::AtomFolder(AtomPubSession*, std::basic_string<char, std::char_traits
AtomPubSession::getCollectionUrl(Collection::Type)
AtomPubSession::~AtomPubSession()
BitmapWriteAccess::DrawPolygon(Polygon const&)
+BreakPointList::push_back(BreakPoint*)
BufferNode::childAt(int) const
ByteString::Assign(char const*, unsigned short)
ByteString::Assign(char)
@@ -71,7 +72,6 @@ CommunicationLinkList::Insert(CommunicationLink const**, unsigned short)
CommunicationLinkList::Insert(CommunicationLinkList const*, unsigned short, unsigned short)
CommunicationLinkList::Remove(CommunicationLink const*&, unsigned short)
Control::GetLineCount() const
-CurrencyBox::CurrencyBox(Window*, ResId const&)
CurrencyBox::GetValue(unsigned short) const
CurrencyBox::GetValuePos(long) const
CurrencyField::CurrencyField(Window*, ResId const&)
@@ -345,6 +345,9 @@ ScAddInDocs::Remove(ScDocument* const&, unsigned short)
ScAreaLinkSaveCollection::clear()
ScAttrArray::HasLines(int, int, Rectangle&, bool, bool) const
ScCellMergeOption::ScCellMergeOption()
+ScCellObj::SetFormulaResultDouble(double)
+ScCellObj::SetFormulaResultString(rtl::OUString const&)
+ScCellObj::SetFormulaWithGrammar(rtl::OUString const&, rtl::OUString const&, formula::FormulaGrammar::Grammar)
ScChangeActionContent::SetNewValue(String const&, ScDocument*)
ScCompressedArray<int, unsigned char>::GetEntryCount() const
ScCompressedArray<int, unsigned short>::CopyFrom(ScCompressedArray<int, unsigned short> const&, int, int, long)
@@ -2281,6 +2284,8 @@ vcl::PDFWriterImpl::drawPolyPolygon(PolyPolygon const&, int, bool)
vcl::PrintDialog::getCopyCount()
vcl::RowOrColumn::remove(Window*)
vcl::RowOrColumn::remove(boost::shared_ptr<vcl::WindowArranger> const&)
+vcl::unx::GtkPrintWrapper::print_operation_set_has_selection(_GtkPrintOperation*, int) const
+vcl::unx::GtkPrintWrapper::print_operation_set_support_selection(_GtkPrintOperation*, int) const
void ScCompressedArrayIterator<int, unsigned short>::Follow<unsigned char>(ScCompressedArrayIterator<int, unsigned char> const&)
writerfilter::TagLogger::attribute(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, com::sun::star::uno::Any)
writerfilter::TagLogger::attribute(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)
More information about the Libreoffice-commits
mailing list