basmgr.cxx (e1f63238) basmgr.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

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

265}
266
267// XContainerListener
268//----------------------------------------------------------------------------
269
270void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent& Event )
271 throw( RuntimeException )
272{
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

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

265}
266
267// XContainerListener
268//----------------------------------------------------------------------------
269
270void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent& Event )
271 throw( RuntimeException )
272{
273 sal_Bool bLibContainer = ( maLibName.getLength() == 0 );
273 sal_Bool bLibContainer = maLibName.isEmpty();
274 ::rtl::OUString aName;
275 Event.Accessor >>= aName;
276
277 mpMgr->mpImpl->mbModifiedByLibraryContainer = sal_True;
278
279 if( bLibContainer )
280 {
281 Reference< XLibraryContainer > xScriptCont( Event.Source, UNO_QUERY );

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

321{
322 ::rtl::OUString aName;
323 Event.Accessor >>= aName;
324
325 mpMgr->mpImpl->mbModifiedByLibraryContainer = sal_True;
326
327 // Replace not possible for library container
328#ifdef DBG_UTIL
274 ::rtl::OUString aName;
275 Event.Accessor >>= aName;
276
277 mpMgr->mpImpl->mbModifiedByLibraryContainer = sal_True;
278
279 if( bLibContainer )
280 {
281 Reference< XLibraryContainer > xScriptCont( Event.Source, UNO_QUERY );

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

321{
322 ::rtl::OUString aName;
323 Event.Accessor >>= aName;
324
325 mpMgr->mpImpl->mbModifiedByLibraryContainer = sal_True;
326
327 // Replace not possible for library container
328#ifdef DBG_UTIL
329 sal_Bool bLibContainer = ( maLibName.getLength() == 0 );
329 sal_Bool bLibContainer = maLibName.isEmpty();
330#endif
331 DBG_ASSERT( !bLibContainer, "library container fired elementReplaced()");
332
333 StarBASIC* pLib = mpMgr->GetLib( maLibName );
334 if( pLib )
335 {
336 SbModule* pMod = pLib->FindModule( aName );
337 ::rtl::OUString aMod;

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

351void SAL_CALL BasMgrContainerListenerImpl::elementRemoved( const ContainerEvent& Event )
352 throw( RuntimeException )
353{
354 ::rtl::OUString aName;
355 Event.Accessor >>= aName;
356
357 mpMgr->mpImpl->mbModifiedByLibraryContainer = sal_True;
358
330#endif
331 DBG_ASSERT( !bLibContainer, "library container fired elementReplaced()");
332
333 StarBASIC* pLib = mpMgr->GetLib( maLibName );
334 if( pLib )
335 {
336 SbModule* pMod = pLib->FindModule( aName );
337 ::rtl::OUString aMod;

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

351void SAL_CALL BasMgrContainerListenerImpl::elementRemoved( const ContainerEvent& Event )
352 throw( RuntimeException )
353{
354 ::rtl::OUString aName;
355 Event.Accessor >>= aName;
356
357 mpMgr->mpImpl->mbModifiedByLibraryContainer = sal_True;
358
359 sal_Bool bLibContainer = ( maLibName.getLength() == 0 );
359 sal_Bool bLibContainer = maLibName.isEmpty();
360 if( bLibContainer )
361 {
362 StarBASIC* pLib = mpMgr->GetLib( aName );
363 if( pLib )
364 {
365 sal_uInt16 nLibId = mpMgr->GetLibId( aName );
366 mpMgr->RemoveLib( nLibId, sal_False );
367 }

--- 2231 unchanged lines hidden ---
360 if( bLibContainer )
361 {
362 StarBASIC* pLib = mpMgr->GetLib( aName );
363 if( pLib )
364 {
365 sal_uInt16 nLibId = mpMgr->GetLibId( aName );
366 mpMgr->RemoveLib( nLibId, sal_False );
367 }

--- 2231 unchanged lines hidden ---