Kaydet (Commit) a8647dd0 authored tarafından Takeshi Abe's avatar Takeshi Abe

sal_Bool to bool

Change-Id: I427e9bb30cab4698a2495de7445a4a4982abd7b4
üst 32dafb74
...@@ -68,7 +68,7 @@ SbiSymDef* SbiParser::VarDecl( SbiDimList** ppDim, bool bStatic, bool bConst ) ...@@ -68,7 +68,7 @@ SbiSymDef* SbiParser::VarDecl( SbiDimList** ppDim, bool bStatic, bool bConst )
// Resolving of a AS-Type-Declaration // Resolving of a AS-Type-Declaration
// The data type were inserted into the handed over variable // The data type were inserted into the handed over variable
void SbiParser::TypeDecl( SbiSymDef& rDef, sal_Bool bAsNewAlreadyParsed ) void SbiParser::TypeDecl( SbiSymDef& rDef, bool bAsNewAlreadyParsed )
{ {
SbxDataType eType = rDef.GetType(); SbxDataType eType = rDef.GetType();
if( bAsNewAlreadyParsed || Peek() == AS ) if( bAsNewAlreadyParsed || Peek() == AS )
...@@ -239,7 +239,7 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic ) ...@@ -239,7 +239,7 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic )
bNewGblDefs = false; bNewGblDefs = false;
} }
Next(); Next();
DefProc( sal_False, bPrivate ); DefProc( false, bPrivate );
return; return;
} }
else if( eCurTok == ENUM ) else if( eCurTok == ENUM )
...@@ -547,10 +547,10 @@ void SbiParser::Erase() ...@@ -547,10 +547,10 @@ void SbiParser::Erase()
void SbiParser::Type() void SbiParser::Type()
{ {
DefType( sal_False ); DefType( false );
} }
void SbiParser::DefType( sal_Bool bPrivate ) void SbiParser::DefType( bool bPrivate )
{ {
// TODO: Use bPrivate // TODO: Use bPrivate
(void)bPrivate; (void)bPrivate;
...@@ -671,10 +671,10 @@ void SbiParser::DefType( sal_Bool bPrivate ) ...@@ -671,10 +671,10 @@ void SbiParser::DefType( sal_Bool bPrivate )
void SbiParser::Enum() void SbiParser::Enum()
{ {
DefEnum( sal_False ); DefEnum( false );
} }
void SbiParser::DefEnum( sal_Bool bPrivate ) void SbiParser::DefEnum( bool bPrivate )
{ {
// Read a the new Token. It had to be a symbol // Read a the new Token. It had to be a symbol
if (!TestSymbol()) if (!TestSymbol())
...@@ -937,10 +937,10 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl ) ...@@ -937,10 +937,10 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl )
void SbiParser::Declare() void SbiParser::Declare()
{ {
DefDeclare( sal_False ); DefDeclare( false );
} }
void SbiParser::DefDeclare( sal_Bool bPrivate ) void SbiParser::DefDeclare( bool bPrivate )
{ {
Next(); Next();
if( eCurTok != SUB && eCurTok != FUNCTION ) if( eCurTok != SUB && eCurTok != FUNCTION )
...@@ -1071,12 +1071,12 @@ void SbiParser::Call() ...@@ -1071,12 +1071,12 @@ void SbiParser::Call()
void SbiParser::SubFunc() void SbiParser::SubFunc()
{ {
DefProc( sal_False, sal_False ); DefProc( false, false );
} }
// Read in of a procedure // Read in of a procedure
void SbiParser::DefProc( sal_Bool bStatic, sal_Bool bPrivate ) void SbiParser::DefProc( bool bStatic, bool bPrivate )
{ {
sal_uInt16 l1 = nLine, l2 = nLine; sal_uInt16 l1 = nLine, l2 = nLine;
bool bSub = ( eCurTok == SUB ); bool bSub = ( eCurTok == SUB );
...@@ -1181,10 +1181,10 @@ void SbiParser::DefProc( sal_Bool bStatic, sal_Bool bPrivate ) ...@@ -1181,10 +1181,10 @@ void SbiParser::DefProc( sal_Bool bStatic, sal_Bool bPrivate )
void SbiParser::Static() void SbiParser::Static()
{ {
DefStatic( sal_False ); DefStatic( false );
} }
void SbiParser::DefStatic( sal_Bool bPrivate ) void SbiParser::DefStatic( bool bPrivate )
{ {
switch( Peek() ) switch( Peek() )
{ {
...@@ -1199,7 +1199,7 @@ void SbiParser::DefStatic( sal_Bool bPrivate ) ...@@ -1199,7 +1199,7 @@ void SbiParser::DefStatic( sal_Bool bPrivate )
bNewGblDefs = false; bNewGblDefs = false;
} }
Next(); Next();
DefProc( sal_True, bPrivate ); DefProc( true, bPrivate );
break; break;
default: { default: {
if( !pProc ) if( !pProc )
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
// test if there's an I/O channel // test if there's an I/O channel
sal_Bool SbiParser::Channel( sal_Bool bAlways ) bool SbiParser::Channel( bool bAlways )
{ {
sal_Bool bRes = sal_False; bool bRes = false;
Peek(); Peek();
if( IsHash() ) if( IsHash() )
{ {
...@@ -33,7 +33,7 @@ sal_Bool SbiParser::Channel( sal_Bool bAlways ) ...@@ -33,7 +33,7 @@ sal_Bool SbiParser::Channel( sal_Bool bAlways )
Next(); Next();
aExpr.Gen(); aExpr.Gen();
aGen.Gen( _CHANNEL ); aGen.Gen( _CHANNEL );
bRes = sal_True; bRes = true;
} }
else if( bAlways ) else if( bAlways )
Error( SbERR_EXPECTED, "#" ); Error( SbERR_EXPECTED, "#" );
...@@ -45,7 +45,7 @@ sal_Bool SbiParser::Channel( sal_Bool bAlways ) ...@@ -45,7 +45,7 @@ sal_Bool SbiParser::Channel( sal_Bool bAlways )
void SbiParser::Print() void SbiParser::Print()
{ {
sal_Bool bChan = Channel(); bool bChan = Channel();
while( !bAbort ) while( !bAbort )
{ {
...@@ -76,7 +76,7 @@ void SbiParser::Print() ...@@ -76,7 +76,7 @@ void SbiParser::Print()
void SbiParser::Write() void SbiParser::Write()
{ {
sal_Bool bChan = Channel(); bool bChan = Channel();
while( !bAbort ) while( !bAbort )
{ {
...@@ -128,7 +128,7 @@ void SbiParser::Line() ...@@ -128,7 +128,7 @@ void SbiParser::Line()
void SbiParser::LineInput() void SbiParser::LineInput()
{ {
Channel( sal_True ); Channel( true );
SbiExpression* pExpr = new SbiExpression( this, SbOPERAND ); SbiExpression* pExpr = new SbiExpression( this, SbOPERAND );
if( !pExpr->IsVariable() ) if( !pExpr->IsVariable() )
Error( SbERR_VAR_EXPECTED ); Error( SbERR_VAR_EXPECTED );
...@@ -145,7 +145,7 @@ void SbiParser::LineInput() ...@@ -145,7 +145,7 @@ void SbiParser::LineInput()
void SbiParser::Input() void SbiParser::Input()
{ {
aGen.Gen( _RESTART ); aGen.Gen( _RESTART );
Channel( sal_True ); Channel( true );
SbiExpression* pExpr = new SbiExpression( this, SbOPERAND ); SbiExpression* pExpr = new SbiExpression( this, SbOPERAND );
while( !bAbort ) while( !bAbort )
{ {
......
...@@ -242,49 +242,49 @@ void SbiParser::Exit() ...@@ -242,49 +242,49 @@ void SbiParser::Exit()
Error( SbERR_BAD_EXIT ); Error( SbERR_BAD_EXIT );
} }
sal_Bool SbiParser::TestSymbol( sal_Bool bKwdOk ) bool SbiParser::TestSymbol( bool bKwdOk )
{ {
Peek(); Peek();
if( eCurTok == SYMBOL || ( bKwdOk && IsKwd( eCurTok ) ) ) if( eCurTok == SYMBOL || ( bKwdOk && IsKwd( eCurTok ) ) )
{ {
Next(); return sal_True; Next(); return true;
} }
Error( SbERR_SYMBOL_EXPECTED ); Error( SbERR_SYMBOL_EXPECTED );
return sal_False; return false;
} }
sal_Bool SbiParser::TestToken( SbiToken t ) bool SbiParser::TestToken( SbiToken t )
{ {
if( Peek() == t ) if( Peek() == t )
{ {
Next(); return sal_True; Next(); return true;
} }
else else
{ {
Error( SbERR_EXPECTED, t ); Error( SbERR_EXPECTED, t );
return sal_False; return false;
} }
} }
sal_Bool SbiParser::TestComma() bool SbiParser::TestComma()
{ {
SbiToken eTok = Peek(); SbiToken eTok = Peek();
if( IsEoln( eTok ) ) if( IsEoln( eTok ) )
{ {
Next(); Next();
return sal_False; return false;
} }
else if( eTok != COMMA ) else if( eTok != COMMA )
{ {
Error( SbERR_EXPECTED, COMMA ); Error( SbERR_EXPECTED, COMMA );
return sal_False; return false;
} }
Next(); Next();
return sal_True; return true;
} }
...@@ -315,9 +315,9 @@ void SbiParser::StmntBlock( SbiToken eEnd ) ...@@ -315,9 +315,9 @@ void SbiParser::StmntBlock( SbiToken eEnd )
sal_Bool SbiParser::Parse() bool SbiParser::Parse()
{ {
if( bAbort ) return sal_False; if( bAbort ) return false;
EnableErrors(); EnableErrors();
...@@ -333,13 +333,13 @@ sal_Bool SbiParser::Parse() ...@@ -333,13 +333,13 @@ sal_Bool SbiParser::Parse()
// can be another nGblChain, so ask for it before. // can be another nGblChain, so ask for it before.
if( bNewGblDefs && nGblChain == 0 ) if( bNewGblDefs && nGblChain == 0 )
nGblChain = aGen.Gen( _JUMP, 0 ); nGblChain = aGen.Gen( _JUMP, 0 );
return sal_False; return false;
} }
if( IsEoln( eCurTok ) ) if( IsEoln( eCurTok ) )
{ {
Next(); return sal_True; Next(); return true;
} }
if( !bSingleLineIf && MayBeLabel( sal_True ) ) if( !bSingleLineIf && MayBeLabel( sal_True ) )
...@@ -353,7 +353,7 @@ sal_Bool SbiParser::Parse() ...@@ -353,7 +353,7 @@ sal_Bool SbiParser::Parse()
if( IsEoln( eCurTok ) ) if( IsEoln( eCurTok ) )
{ {
Next(); return sal_True; Next(); return true;
} }
} }
...@@ -366,13 +366,13 @@ sal_Bool SbiParser::Parse() ...@@ -366,13 +366,13 @@ sal_Bool SbiParser::Parse()
Next(); Next();
if( eCurTok != NIL ) if( eCurTok != NIL )
aGen.Statement(); aGen.Statement();
return sal_False; return false;
} }
// comment? // comment?
if( eCurTok == REM ) if( eCurTok == REM )
{ {
Next(); return sal_True; Next(); return true;
} }
// In vba it's possible to do Error.foobar ( even if it results in // In vba it's possible to do Error.foobar ( even if it results in
...@@ -458,7 +458,7 @@ sal_Bool SbiParser::Parse() ...@@ -458,7 +458,7 @@ sal_Bool SbiParser::Parse()
} }
// The parser aborts at the end, the // The parser aborts at the end, the
// next token has not been fetched yet! // next token has not been fetched yet!
return sal_True; return true;
} }
...@@ -772,9 +772,9 @@ void SbiParser::Option() ...@@ -772,9 +772,9 @@ void SbiParser::Option()
{ {
SbiToken eTok = Next(); SbiToken eTok = Next();
if( eTok == BINARY ) if( eTok == BINARY )
bText = sal_False; bText = false;
else if( eTok == SYMBOL && GetSym().equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("text")) ) else if( eTok == SYMBOL && GetSym().equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("text")) )
bText = sal_True; bText = true;
else else
Error( SbERR_EXPECTED, "Text/Binary" ); Error( SbERR_EXPECTED, "Text/Binary" );
break; break;
...@@ -784,7 +784,7 @@ void SbiParser::Option() ...@@ -784,7 +784,7 @@ void SbiParser::Option()
break; break;
case CLASSMODULE: case CLASSMODULE:
bClassModule = sal_True; bClassModule = true;
aGen.GetModule().SetModuleType( com::sun::star::script::ModuleType::CLASS ); aGen.GetModule().SetModuleType( com::sun::star::script::ModuleType::CLASS );
break; break;
case VBASUPPORT: // Option VBASupport used to override the module mode ( in fact this must reset the mode case VBASUPPORT: // Option VBASupport used to override the module mode ( in fact this must reset the mode
......
...@@ -384,7 +384,7 @@ SbiProcDef::SbiProcDef( SbiParser* pParser, const String& rName, ...@@ -384,7 +384,7 @@ SbiProcDef::SbiProcDef( SbiParser* pParser, const String& rName,
nLine1 = nLine1 =
nLine2 = 0; nLine2 = 0;
mePropMode = PROPERTY_MODE_NONE; mePropMode = PROPERTY_MODE_NONE;
bPublic = sal_True; bPublic = true;
bCdecl = sal_False; bCdecl = sal_False;
bStatic = sal_False; bStatic = sal_False;
// For return values the first element of the parameter // For return values the first element of the parameter
......
...@@ -272,7 +272,7 @@ protected: ...@@ -272,7 +272,7 @@ protected:
const ::rtl::OUString& aTargetURL, const ::rtl::OUString& aTargetURL,
const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 > xToUseSFI ); const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 > xToUseSFI );
sal_Bool implLoadLibraryIndexFile( SfxLibrary* pLib, bool implLoadLibraryIndexFile( SfxLibrary* pLib,
::xmlscript::LibDescriptor& rLib, ::xmlscript::LibDescriptor& rLib,
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
const ::rtl::OUString& aIndexFileName ); const ::rtl::OUString& aIndexFileName );
......
...@@ -45,17 +45,17 @@ class SbiParser : public SbiTokenizer ...@@ -45,17 +45,17 @@ class SbiParser : public SbiTokenizer
SbiSymDef* VarDecl( SbiDimList**, bool, bool ); SbiSymDef* VarDecl( SbiDimList**, bool, bool );
SbiProcDef* ProcDecl(bool bDecl); SbiProcDef* ProcDecl(bool bDecl);
void DefStatic( sal_Bool bPrivate ); void DefStatic( bool bPrivate );
void DefProc( sal_Bool bStatic, sal_Bool bPrivate ); // read in procedure void DefProc( bool bStatic, bool bPrivate ); // read in procedure
void DefVar( SbiOpcode eOp, bool bStatic ); // read in DIM/REDIM void DefVar( SbiOpcode eOp, bool bStatic ); // read in DIM/REDIM
void TypeDecl( SbiSymDef&, sal_Bool bAsNewAlreadyParsed=sal_False ); // AS-declaration void TypeDecl( SbiSymDef&, bool bAsNewAlreadyParsed=false ); // AS-declaration
void OpenBlock( SbiToken, SbiExprNode* = NULL ); void OpenBlock( SbiToken, SbiExprNode* = NULL );
void CloseBlock(); void CloseBlock();
sal_Bool Channel( sal_Bool=sal_False ); // parse channel number bool Channel( bool bAlways=false ); // parse channel number
void StmntBlock( SbiToken ); void StmntBlock( SbiToken );
void DefType( sal_Bool bPrivate ); // Parse type declaration void DefType( bool bPrivate ); // Parse type declaration
void DefEnum( sal_Bool bPrivate ); // Parse enum declaration void DefEnum( bool bPrivate ); // Parse enum declaration
void DefDeclare( sal_Bool bPrivate ); void DefDeclare( bool bPrivate );
void EnableCompatibility(); void EnableCompatibility();
public: public:
SbxArrayRef rTypeArray; SbxArrayRef rTypeArray;
...@@ -70,15 +70,15 @@ public: ...@@ -70,15 +70,15 @@ public:
SbiSymPool* pPool; SbiSymPool* pPool;
SbiExprType eCurExpr; SbiExprType eCurExpr;
short nBase; // OPTION BASE-value short nBase; // OPTION BASE-value
sal_Bool bText; // OPTION COMPARE TEXT bool bText; // OPTION COMPARE TEXT
bool bExplicit; // true: OPTION EXPLICIT bool bExplicit; // true: OPTION EXPLICIT
sal_Bool bClassModule; // sal_True: OPTION ClassModule bool bClassModule; // true: OPTION ClassModule
StringVector aIfaceVector; // Holds all interfaces implemented by a class module StringVector aIfaceVector; // Holds all interfaces implemented by a class module
StringVector aRequiredTypes; // Types used in Dim As New <type> outside subs StringVector aRequiredTypes; // Types used in Dim As New <type> outside subs
SbxDataType eDefTypes[26]; // DEFxxx data types SbxDataType eDefTypes[26]; // DEFxxx data types
SbiParser( StarBASIC*, SbModule* ); SbiParser( StarBASIC*, SbModule* );
sal_Bool Parse(); bool Parse();
SbiExprNode* GetWithVar(); SbiExprNode* GetWithVar();
// from 31.3.1996, search symbol in the runtime-library // from 31.3.1996, search symbol in the runtime-library
...@@ -87,9 +87,9 @@ public: ...@@ -87,9 +87,9 @@ public:
bool HasGlobalCode(); bool HasGlobalCode();
sal_Bool TestToken( SbiToken ); bool TestToken( SbiToken );
sal_Bool TestSymbol( sal_Bool=sal_False ); bool TestSymbol( bool bKwdOk=false );
sal_Bool TestComma(); bool TestComma();
void TestEoln(); void TestEoln();
void Symbol( const KeywordSymbolInfo* pKeywordSymbolInfo = NULL ); // let or call void Symbol( const KeywordSymbolInfo* pKeywordSymbolInfo = NULL ); // let or call
......
...@@ -181,7 +181,7 @@ class SbiProcDef : public SbiSymDef { // procedure definition (from basic): ...@@ -181,7 +181,7 @@ class SbiProcDef : public SbiSymDef { // procedure definition (from basic):
PropertyMode mePropMode; // Marks if this is a property procedure and which PropertyMode mePropMode; // Marks if this is a property procedure and which
String maPropName; // Property name if property procedure (!= proc name) String maPropName; // Property name if property procedure (!= proc name)
sal_Bool bCdecl : 1; // sal_True: CDECL given sal_Bool bCdecl : 1; // sal_True: CDECL given
sal_Bool bPublic : 1; // sal_True: proc is PUBLIC bool bPublic : 1; // true: proc is PUBLIC
sal_Bool mbProcDecl : 1; // sal_True: instanciated by SbiParser::ProcDecl sal_Bool mbProcDecl : 1; // sal_True: instanciated by SbiParser::ProcDecl
public: public:
SbiProcDef( SbiParser*, const String&, sal_Bool bProcDecl=false ); SbiProcDef( SbiParser*, const String&, sal_Bool bProcDecl=false );
...@@ -193,8 +193,8 @@ public: ...@@ -193,8 +193,8 @@ public:
SbiSymPool& GetLocals() { return GetPool();} SbiSymPool& GetLocals() { return GetPool();}
String& GetLib() { return aLibName; } String& GetLib() { return aLibName; }
String& GetAlias() { return aAlias; } String& GetAlias() { return aAlias; }
void SetPublic( sal_Bool b ) { bPublic = b; } void SetPublic( bool b ) { bPublic = b; }
sal_Bool IsPublic() const { return bPublic; } bool IsPublic() const { return bPublic; }
void SetCdecl( sal_Bool b = sal_True) { bCdecl = b; } void SetCdecl( sal_Bool b = sal_True) { bCdecl = b; }
sal_Bool IsCdecl() const { return bCdecl; } sal_Bool IsCdecl() const { return bCdecl; }
sal_Bool IsUsedForProcDecl() const { return mbProcDecl; } sal_Bool IsUsedForProcDecl() const { return mbProcDecl; }
......
...@@ -662,7 +662,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, ...@@ -662,7 +662,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
uno::Reference< io::XInputStream > xInput; uno::Reference< io::XInputStream > xInput;
mxStorage = xStorage; mxStorage = xStorage;
sal_Bool bStorage = mxStorage.is(); bool bStorage = mxStorage.is();
// #110009: Scope to force the StorageRefs to be destructed and // #110009: Scope to force the StorageRefs to be destructed and
...@@ -904,7 +904,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, ...@@ -904,7 +904,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
if( !pImplLib->mbInitialised && (!bStorage || xLibraryStor.is()) ) if( !pImplLib->mbInitialised && (!bStorage || xLibraryStor.is()) )
{ {
OUString aIndexFileName; OUString aIndexFileName;
sal_Bool bLoaded = implLoadLibraryIndexFile( pImplLib, rLib, xLibraryStor, aIndexFileName ); bool bLoaded = implLoadLibraryIndexFile( pImplLib, rLib, xLibraryStor, aIndexFileName );
SAL_WARN_IF( SAL_WARN_IF(
bLoaded && aLibName != rLib.aName, "basic", bLoaded && aLibName != rLib.aName, "basic",
("Different library names in library container and" ("Different library names in library container and"
...@@ -1150,7 +1150,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, ...@@ -1150,7 +1150,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
uno::Reference< embed::XStorage > xDummyStor; uno::Reference< embed::XStorage > xDummyStor;
::xmlscript::LibDescriptor aLibDesc; ::xmlscript::LibDescriptor aLibDesc;
/*sal_Bool bReadIndexFile =*/ implLoadLibraryIndexFile implLoadLibraryIndexFile
( pNewLib, aLibDesc, xDummyStor, pNewLib->maLibInfoFileURL ); ( pNewLib, aLibDesc, xDummyStor, pNewLib->maLibInfoFileURL );
implImportLibDescriptor( pNewLib, aLibDesc ); implImportLibDescriptor( pNewLib, aLibDesc );
} }
...@@ -1356,7 +1356,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib, ...@@ -1356,7 +1356,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
const Reference< XInteractionHandler >& xHandler ) const Reference< XInteractionHandler >& xHandler )
{ {
sal_Bool bLink = pLib->mbLink; sal_Bool bLink = pLib->mbLink;
sal_Bool bStorage = xStorage.is() && !bLink; bool bStorage = xStorage.is() && !bLink;
Sequence< OUString > aElementNames = pLib->getElementNames(); Sequence< OUString > aElementNames = pLib->getElementNames();
sal_Int32 nNameCount = aElementNames.getLength(); sal_Int32 nNameCount = aElementNames.getLength();
...@@ -1512,7 +1512,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, ...@@ -1512,7 +1512,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
} }
sal_Bool bLink = pLib->mbLink; sal_Bool bLink = pLib->mbLink;
sal_Bool bStorage = xStorage.is() && !bLink; bool bStorage = xStorage.is() && !bLink;
// Write info file // Write info file
uno::Reference< io::XOutputStream > xOut; uno::Reference< io::XOutputStream > xOut;
...@@ -1601,7 +1601,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, ...@@ -1601,7 +1601,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
} }
sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib, bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
::xmlscript::LibDescriptor& rLib, const uno::Reference< embed::XStorage >& xStorage, const OUString& aIndexFileName ) ::xmlscript::LibDescriptor& rLib, const uno::Reference< embed::XStorage >& xStorage, const OUString& aIndexFileName )
{ {
Reference< XParser > xParser( mxMSF->createInstance( Reference< XParser > xParser( mxMSF->createInstance(
...@@ -1609,11 +1609,11 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib, ...@@ -1609,11 +1609,11 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
if( !xParser.is() ) if( !xParser.is() )
{ {
SAL_WARN("basic", "couldn't create sax parser component"); SAL_WARN("basic", "couldn't create sax parser component");
return sal_False; return false;
} }
sal_Bool bLink = sal_False; sal_Bool bLink = sal_False;
sal_Bool bStorage = sal_False; bool bStorage = false;
if( pLib ) if( pLib )
{ {
bLink = pLib->mbLink; bLink = pLib->mbLink;
...@@ -1666,7 +1666,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib, ...@@ -1666,7 +1666,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
} }
if( !xInput.is() ) if( !xInput.is() )
{ {
return sal_False; return false;
} }
InputSource source; InputSource source;
...@@ -1684,7 +1684,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib, ...@@ -1684,7 +1684,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aLibInfoPath ); SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aLibInfoPath );
sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL; sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL;
ErrorHandler::HandleError( nErrorCode ); ErrorHandler::HandleError( nErrorCode );
return sal_False; return false;
} }
if( !pLib ) if( !pLib )
...@@ -1699,7 +1699,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib, ...@@ -1699,7 +1699,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
implImportLibDescriptor( pLib, rLib ); implImportLibDescriptor( pLib, rLib );
} }
return sal_True; return true;
} }
void SfxLibraryContainer::implImportLibDescriptor void SfxLibraryContainer::implImportLibDescriptor
...@@ -1746,7 +1746,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto ...@@ -1746,7 +1746,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
boost::scoped_ptr< ::xmlscript::LibDescriptorArray > pLibArray(new ::xmlscript::LibDescriptorArray(nLibsToSave)); boost::scoped_ptr< ::xmlscript::LibDescriptorArray > pLibArray(new ::xmlscript::LibDescriptorArray(nLibsToSave));
// Write to storage? // Write to storage?
sal_Bool bStorage = i_rStorage.is(); bool bStorage = i_rStorage.is();
uno::Reference< embed::XStorage > xSourceLibrariesStor; uno::Reference< embed::XStorage > xSourceLibrariesStor;
uno::Reference< embed::XStorage > xTargetLibrariesStor; uno::Reference< embed::XStorage > xTargetLibrariesStor;
::rtl::OUString sTempTargetStorName; ::rtl::OUString sTempTargetStorName;
...@@ -2153,7 +2153,7 @@ Reference< XNameAccess > SAL_CALL SfxLibraryContainer::createLibraryLink ...@@ -2153,7 +2153,7 @@ Reference< XNameAccess > SAL_CALL SfxLibraryContainer::createLibraryLink
OUString aInitFileName; OUString aInitFileName;
uno::Reference< embed::XStorage > xDummyStor; uno::Reference< embed::XStorage > xDummyStor;
::xmlscript::LibDescriptor aLibDesc; ::xmlscript::LibDescriptor aLibDesc;
/*sal_Bool bReadIndexFile = */implLoadLibraryIndexFile( pNewLib, aLibDesc, xDummyStor, aInitFileName ); implLoadLibraryIndexFile( pNewLib, aLibDesc, xDummyStor, aInitFileName );
implImportLibDescriptor( pNewLib, aLibDesc ); implImportLibDescriptor( pNewLib, aLibDesc );
Reference< XNameAccess > xRet = static_cast< XNameAccess* >( pNewLib ); Reference< XNameAccess > xRet = static_cast< XNameAccess* >( pNewLib );
...@@ -2272,7 +2272,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name ) ...@@ -2272,7 +2272,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name )
} }
sal_Bool bLink = pImplLib->mbLink; sal_Bool bLink = pImplLib->mbLink;
sal_Bool bStorage = mxStorage.is() && !bLink; bool bStorage = mxStorage.is() && !bLink;
uno::Reference< embed::XStorage > xLibrariesStor; uno::Reference< embed::XStorage > xLibrariesStor;
uno::Reference< embed::XStorage > xLibraryStor; uno::Reference< embed::XStorage > xLibraryStor;
...@@ -2464,7 +2464,7 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU ...@@ -2464,7 +2464,7 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU
bool bMovedSuccessful = true; bool bMovedSuccessful = true;
// Rename files // Rename files
sal_Bool bStorage = mxStorage.is(); bool bStorage = mxStorage.is();
if( !bStorage && !pImplLib->mbLink ) if( !bStorage && !pImplLib->mbLink )
{ {
bMovedSuccessful = false; bMovedSuccessful = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment