statusindicator.cxx (0b4ced1d) statusindicator.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

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

71 // ... cast controls to Reference< XControl > and set model ...
72 // ( ProgressBar has no model !!! )
73 Reference< XControl > xTextControl ( m_xText , UNO_QUERY );
74 Reference< XControl > xProgressControl ( m_xProgressBar, UNO_QUERY );
75 xTextControl->setModel( Reference< XControlModel >( xFactory->createInstance( OUString::createFromAscii( FIXEDTEXT_MODELNAME ) ), UNO_QUERY ) );
76 // ... and add controls to basecontainercontrol!
77 addControl( OUString::createFromAscii( CONTROLNAME_TEXT ), xTextControl );
78 addControl( OUString::createFromAscii( CONTROLNAME_PROGRESSBAR ), xProgressControl );
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

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

71 // ... cast controls to Reference< XControl > and set model ...
72 // ( ProgressBar has no model !!! )
73 Reference< XControl > xTextControl ( m_xText , UNO_QUERY );
74 Reference< XControl > xProgressControl ( m_xProgressBar, UNO_QUERY );
75 xTextControl->setModel( Reference< XControlModel >( xFactory->createInstance( OUString::createFromAscii( FIXEDTEXT_MODELNAME ) ), UNO_QUERY ) );
76 // ... and add controls to basecontainercontrol!
77 addControl( OUString::createFromAscii( CONTROLNAME_TEXT ), xTextControl );
78 addControl( OUString::createFromAscii( CONTROLNAME_PROGRESSBAR ), xProgressControl );
79 // FixedText make it automaticly visible by himself ... but not the progressbar !!!
79 // FixedText make it automatically visible by himself ... but not the progressbar !!!
80 // it must be set explicitly
81 Reference< XWindow > xProgressWindow( m_xProgressBar, UNO_QUERY );
82 xProgressWindow->setVisible( sal_True );
83 // Reset to defaults !!!
80 // it must be set explicitly
81 Reference< XWindow > xProgressWindow( m_xProgressBar, UNO_QUERY );
82 xProgressWindow->setVisible( sal_True );
83 // Reset to defaults !!!
84 // (progressbar take automaticly its own defaults)
84 // (progressbar take automatically its own defaults)
85 m_xText->setText( OUString::createFromAscii( DEFAULT_TEXT ) );
86
87 --m_refCount ;
88}
89
90StatusIndicator::~StatusIndicator()
91{
92 // Release all references

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

399 if (
400 ( nWidth != aBasePosSize.Width ) ||
401 ( nHeight != aBasePosSize.Height)
402 )
403 {
404 // calc new layout for controls
405 impl_recalcLayout ( WindowEvent(static_cast< OWeakObject* >(this),0,0,nWidth,nHeight,0,0,0,0) ) ;
406 // clear background (!)
85 m_xText->setText( OUString::createFromAscii( DEFAULT_TEXT ) );
86
87 --m_refCount ;
88}
89
90StatusIndicator::~StatusIndicator()
91{
92 // Release all references

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

399 if (
400 ( nWidth != aBasePosSize.Width ) ||
401 ( nHeight != aBasePosSize.Height)
402 )
403 {
404 // calc new layout for controls
405 impl_recalcLayout ( WindowEvent(static_cast< OWeakObject* >(this),0,0,nWidth,nHeight,0,0,0,0) ) ;
406 // clear background (!)
407 // [Childs was repainted in "recalcLayout" by setPosSize() automaticly!]
407 // [Childs was repainted in "recalcLayout" by setPosSize() automatically!]
408 getPeer()->invalidate(2);
409 // and repaint the control
410 impl_paint ( 0, 0, impl_getGraphicsPeer() ) ;
411 }
412}
413
414//____________________________________________________________________________________________________________
415// impl but public method to register service

--- 139 unchanged lines hidden ---
408 getPeer()->invalidate(2);
409 // and repaint the control
410 impl_paint ( 0, 0, impl_getGraphicsPeer() ) ;
411 }
412}
413
414//____________________________________________________________________________________________________________
415// impl but public method to register service

--- 139 unchanged lines hidden ---