scriptcont.cxx (e1f63238) scriptcont.cxx (0848378b)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 290 unchanged lines hidden (view full) ---

299 ErrorHandler::HandleError( nErrorCode );
300 }
301
302 aRetAny <<= aMod.aCode;
303
304 // TODO: Check language
305 // aMod.aLanguage
306 // aMod.aName ignored
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 290 unchanged lines hidden (view full) ---

299 ErrorHandler::HandleError( nErrorCode );
300 }
301
302 aRetAny <<= aMod.aCode;
303
304 // TODO: Check language
305 // aMod.aLanguage
306 // aMod.aName ignored
307 if( aMod.aModuleType.getLength() > 0 )
307 if( !aMod.aModuleType.isEmpty() )
308 {
309 /* If in VBA compatibility mode, force creation of the VBA Globals
310 object. Each application will create an instance of its own
311 implementation and store it in its Basic manager. Implementations
312 will do all necessary additional initialization, such as
313 registering the global "This***Doc" UNO constant, starting the
314 document events processor etc.
315 */

--- 153 unchanged lines hidden (view full) ---

469 const OUString& OldPassword, const OUString& NewPassword )
470 throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
471{
472 LibraryContainerMethodGuard aGuard( *this );
473 SfxLibrary* pImplLib = getImplLib( Name );
474 if( OldPassword == NewPassword )
475 return;
476
308 {
309 /* If in VBA compatibility mode, force creation of the VBA Globals
310 object. Each application will create an instance of its own
311 implementation and store it in its Basic manager. Implementations
312 will do all necessary additional initialization, such as
313 registering the global "This***Doc" UNO constant, starting the
314 document events processor etc.
315 */

--- 153 unchanged lines hidden (view full) ---

469 const OUString& OldPassword, const OUString& NewPassword )
470 throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
471{
472 LibraryContainerMethodGuard aGuard( *this );
473 SfxLibrary* pImplLib = getImplLib( Name );
474 if( OldPassword == NewPassword )
475 return;
476
477 sal_Bool bOldPassword = ( OldPassword.getLength() > 0 );
478 sal_Bool bNewPassword = ( NewPassword.getLength() > 0 );
477 sal_Bool bOldPassword = !OldPassword.isEmpty();
478 sal_Bool bNewPassword = !NewPassword.isEmpty();
479 sal_Bool bStorage = mxStorage.is() && !pImplLib->mbLink;
480
481 if( pImplLib->mbReadOnly || (bOldPassword && !pImplLib->mbPasswordProtected) )
482 throw IllegalArgumentException();
483
484 // Library must be loaded
485 loadLibrary( Name );
486

--- 772 unchanged lines hidden (view full) ---

1259 // No resources
1260 (void)xStorage;
1261}
1262
1263bool SfxScriptLibrary::containsValidModule( const Any& aElement )
1264{
1265 OUString sModuleText;
1266 aElement >>= sModuleText;
479 sal_Bool bStorage = mxStorage.is() && !pImplLib->mbLink;
480
481 if( pImplLib->mbReadOnly || (bOldPassword && !pImplLib->mbPasswordProtected) )
482 throw IllegalArgumentException();
483
484 // Library must be loaded
485 loadLibrary( Name );
486

--- 772 unchanged lines hidden (view full) ---

1259 // No resources
1260 (void)xStorage;
1261}
1262
1263bool SfxScriptLibrary::containsValidModule( const Any& aElement )
1264{
1265 OUString sModuleText;
1266 aElement >>= sModuleText;
1267 return ( sModuleText.getLength() > 0 );
1267 return ( !sModuleText.isEmpty() );
1268}
1269
1270bool SAL_CALL SfxScriptLibrary::isLibraryElementValid( ::com::sun::star::uno::Any aElement ) const
1271{
1272 return SfxScriptLibrary::containsValidModule( aElement );
1273}
1274
1275IMPLEMENT_FORWARD_XINTERFACE2( SfxScriptLibrary, SfxLibrary, SfxScriptLibrary_BASE );

--- 41 unchanged lines hidden ---
1268}
1269
1270bool SAL_CALL SfxScriptLibrary::isLibraryElementValid( ::com::sun::star::uno::Any aElement ) const
1271{
1272 return SfxScriptLibrary::containsValidModule( aElement );
1273}
1274
1275IMPLEMENT_FORWARD_XINTERFACE2( SfxScriptLibrary, SfxLibrary, SfxScriptLibrary_BASE );

--- 41 unchanged lines hidden ---