basecontainercontrol.cxx (0b4ced1d) | basecontainercontrol.cxx (b4abecfe) |
---|---|
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 --- 530 unchanged lines hidden (view full) --- 539void SAL_CALL BaseContainerControl::setVisible ( sal_Bool bVisible ) throw( RuntimeException ) 540{ 541 // override baseclass definition 542 BaseControl::setVisible ( bVisible ) ; 543 544 // is it a top window ? 545 if ( !getContext().is() && bVisible ) 546 { | 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 --- 530 unchanged lines hidden (view full) --- 539void SAL_CALL BaseContainerControl::setVisible ( sal_Bool bVisible ) throw( RuntimeException ) 540{ 541 // override baseclass definition 542 BaseControl::setVisible ( bVisible ) ; 543 544 // is it a top window ? 545 if ( !getContext().is() && bVisible ) 546 { |
547 // then show it automaticly | 547 // then show it automatically |
548 createPeer ( Reference< XToolkit > (), Reference< XWindowPeer > () ) ; 549 } 550} 551 552//____________________________________________________________________________________________________________ 553// protected method 554//____________________________________________________________________________________________________________ 555 --- 61 unchanged lines hidden (view full) --- 617{ 618 // Get count of listitems. 619 sal_uInt32 nMaxCount = m_pControlInfoList->Count () ; 620 sal_uInt32 nCount = 0 ; 621 622 // Delete all items. 623 for ( nCount = 0; nCount < nMaxCount; ++nCount ) 624 { | 548 createPeer ( Reference< XToolkit > (), Reference< XWindowPeer > () ) ; 549 } 550} 551 552//____________________________________________________________________________________________________________ 553// protected method 554//____________________________________________________________________________________________________________ 555 --- 61 unchanged lines hidden (view full) --- 617{ 618 // Get count of listitems. 619 sal_uInt32 nMaxCount = m_pControlInfoList->Count () ; 620 sal_uInt32 nCount = 0 ; 621 622 // Delete all items. 623 for ( nCount = 0; nCount < nMaxCount; ++nCount ) 624 { |
625 // Delete everytime first element of list! | 625 // Delete every time first element of list! |
626 // We count from 0 to MAX, where "MAX=count of items" BEFORE we delete some elements! 627 // If we use "GetObject ( nCount )" ... it can be, that we have an index greater then count of current elements! 628 629 IMPL_ControlInfo* pSearchControl = m_pControlInfoList->GetObject ( 0 ) ; 630 delete pSearchControl ; 631 } 632 633 // Delete list himself. 634 m_pControlInfoList->Clear () ; 635 delete m_pControlInfoList ; 636} 637 638} // namespace unocontrols | 626 // We count from 0 to MAX, where "MAX=count of items" BEFORE we delete some elements! 627 // If we use "GetObject ( nCount )" ... it can be, that we have an index greater then count of current elements! 628 629 IMPL_ControlInfo* pSearchControl = m_pControlInfoList->GetObject ( 0 ) ; 630 delete pSearchControl ; 631 } 632 633 // Delete list himself. 634 m_pControlInfoList->Clear () ; 635 delete m_pControlInfoList ; 636} 637 638} // namespace unocontrols |