Kaydet (Commit) ddec70f3 authored tarafından Joseph Powers's avatar Joseph Powers Kaydeden (comit) Norbert Thiebaud

Macro Cleanup in UNO land.

üst a62ff01d
This diff is collapsed.
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _UNOCONTROLS_DEFINES_CTRL_HXX
#define _UNOCONTROLS_DEFINES_CTRL_HXX
//-------------------------------------------------------------------------------------------------------------------
// includes
#include <limits.h> // defines for min/max of INT
namespace unocontrols{
//-------------------------------------------------------------------------------------------------------------------
// global defines for all UnoControls
//-------------------------------------------------------------------------------------------------------------------
#define UNOCONTROLS_TRGB_COLORDATA( t,r,g,b ) ((INT32)(((UINT32)((UINT8)(b))))|(((UINT32)((UINT8)(g)))<<8)|(((UINT32)((UINT8)(r)))<<16)|(((UINT32)((UINT8)(t)))<<24))
//-------------------------------------------------------------------------------------------------------------------
// defines for BaseControl
#ifdef _UNOCONTROLS_BASECONTROL_CTRL_HXX
#define BASECONTROL_IDLCLASSNAME "BaseControl"
#define BASECONTROL_DEFAULT_PMULTIPLEXER NULL
#define BASECONTROL_DEFAULT_X 0
#define BASECONTROL_DEFAULT_Y 0
#define BASECONTROL_DEFAULT_WIDTH 100
#define BASECONTROL_DEFAULT_HEIGHT 100
#define BASECONTROL_DEFAULT_VISIBLE FALSE
#define BASECONTROL_DEFAULT_INDESIGNMODE FALSE
#define BASECONTROL_DEFAULT_ENABLE TRUE
#define BASECONTROL_SERVICE_VCLTOOLKIT "com.sun.star.awt.VclToolkit"
#endif
//-------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------
// defines for BaseContainerControl
#ifdef _UNOCONTROLS_BASECONTAINERCONTROL_CTRL_HXX
#define BASECONTAINERCONTROL_IDLCLASSNAME "BaseContainerControl"
#endif
//-------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------
// defines for ProgressBar
#ifdef _UNOCONTROLS_PROGRESSBAR_CTRL_HXX
#define PROGRESSBAR_IDLCLASSNAME "XProgressbar"
#define PROGRESSBAR_SERVICENAME "com.sun.star.awt.XProgressBar"
#define PROGRESSBAR_IMPLEMENTATIONNAME "stardiv.UnoControls.ProgressBar"
#define PROGRESSBAR_FREEBORDER 2
#define PROGRESSBAR_DEFAULT_HORIZONTAL TRUE
#define PROGRESSBAR_DEFAULT_BLOCKDIMENSION Size(1,1)
#define PROGRESSBAR_DEFAULT_BACKGROUNDCOLOR UNOCONTROLS_TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 ) // lightgray
#define PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR UNOCONTROLS_TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x80 ) // blue
#define PROGRESSBAR_DEFAULT_MINRANGE INT_MIN
#define PROGRESSBAR_DEFAULT_MAXRANGE INT_MAX
#define PROGRESSBAR_DEFAULT_BLOCKVALUE 1
#define PROGRESSBAR_DEFAULT_VALUE PROGRESSBAR_DEFAULT_MINRANGE
#define PROGRESSBAR_LINECOLOR_BRIGHT UNOCONTROLS_TRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF ) // white
#define PROGRESSBAR_LINECOLOR_SHADOW UNOCONTROLS_TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 ) // black
#endif
//-------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------
// defines for FrameControl
#ifdef _UNOCONTROLS_FRAMECONTROL_CTRL_HXX
#define FRAMECONTROL_IDLCLASSNAME "FrameControl"
#define FRAMECONTROL_SERVICENAME "com.sun.star.frame.FrameControl"
#define FRAMECONTROL_IMPLEMENTATIONNAME "stardiv.UnoControls.FrameControl"
#define FRAMECONTROL_DEFAULT_COMPONENTURL "private:factory/swriter"
#define FRAMECONTROL_PROPERTYNAME_LOADERARGUMENTS "LoaderArguments"
#define FRAMECONTROL_PROPERTYNAME_COMPONENTURL "ComponentURL"
#define FRAMECONTROL_PROPERTYNAME_FRAME "Frame"
#define FRAMECONTROL_PROPERTYNAME_IDLCLASSES "IDLClasses"
#define FRAMECONTROL_ERRORTEXT_VOSENSHURE "This is an invalid property handle."
#define FRAMECONTROL_PROPERTY_COUNT 4 // you must count the propertys
#define FRAMECONTROL_PROPERTY_COMPONENTURL 0 // Id must be the index into the array
#define FRAMECONTROL_PROPERTY_FRAME 1
#define FRAMECONTROL_PROPERTY_IDLCLASSES 2
#define FRAMECONTROL_PROPERTY_LOADERARGUMENTS 3
#endif
//-------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------
// defines for ProgressMonitor
#ifdef _UNOCONTROLS_PROGRESSMONITOR_CTRL_HXX
#define PROGRESSMONITOR_IDLCLASSNAME "XProgressMonitor"
#define PROGRESSMONITOR_SERVICENAME "com.sun.star.awt.XProgressMonitor"
#define PROGRESSMONITOR_IMPLEMENTATIONNAME "stardiv.UnoControls.ProgressMonitor"
#define PROGRESSMONITOR_FREEBORDER 10 // border around and between the controls
#define PROGRESSMONITOR_WIDTH_RELATION 4 // reserve 1/4 for button width and rest for progressbar width
#define PROGRESSMONITOR_HEIGHT_RELATION 5 // reserve 1/5 for button and progressbar heigth and rest for text height
#define PROGRESSMONITOR_FIXEDTEXT_SERVICENAME "com.sun.star.awt.UnoControlFixedText"
#define PROGRESSMONITOR_BUTTON_SERVICENAME "com.sun.star.awt.UnoControlButton"
#define PROGRESSMONITOR_FIXEDTEXT_MODELNAME "com.sun.star.awt.UnoControlFixedTextModel"
#define PROGRESSMONITOR_BUTTON_MODELNAME "com.sun.star.awt.UnoControlButtonModel"
#define PROGRESSMONITOR_CONTROLNAME_TEXT "Text" // identifier the control in container
#define PROGRESSMONITOR_CONTROLNAME_BUTTON "Button" // -||-
#define PROGRESSMONITOR_CONTROLNAME_PROGRESSBAR "ProgressBar" // -||-
#define PROGRESSMONITOR_DEFAULT_BUTTONLABEL "Abbrechen"
#define PROGRESSMONITOR_DEFAULT_TOPIC "\0"
#define PROGRESSMONITOR_DEFAULT_TEXT "\0"
#define PROGRESSMONITOR_BACKGROUNDCOLOR UNOCONTROLS_TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 ) // lighgray
#define PROGRESSMONITOR_LINECOLOR_BRIGHT UNOCONTROLS_TRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF ) // white
#define PROGRESSMONITOR_LINECOLOR_SHADOW UNOCONTROLS_TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 ) // black
#define PROGRESSMONITOR_HEIGHT_PROGRESSBAR 15
#define PROGRESSMONITOR_DEFAULT_WIDTH 350
#define PROGRESSMONITOR_DEFAULT_HEIGHT 100
#endif
//-------------------------------------------------------------------------------------------------------------------
} // namespace unocontrols
#endif // #ifndef _UNOCONTROLS_DEFINES_CTRL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
...@@ -164,14 +164,14 @@ Sequence< Type > SAL_CALL BaseControl::getTypes() throw( RuntimeException ) ...@@ -164,14 +164,14 @@ Sequence< Type > SAL_CALL BaseControl::getTypes() throw( RuntimeException )
if ( pTypeCollection == NULL ) if ( pTypeCollection == NULL )
{ {
// Create a static typecollection ... // Create a static typecollection ...
static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XPaintListener >*)NULL ) , static OTypeCollection aTypeCollection( ::getCppuType(( const Reference< XPaintListener >*)NULL ) ,
::getCppuType(( const Reference< XWindowListener>*)NULL ) , ::getCppuType(( const Reference< XWindowListener>*)NULL ) ,
::getCppuType(( const Reference< XView >*)NULL ) , ::getCppuType(( const Reference< XView >*)NULL ) ,
::getCppuType(( const Reference< XWindow >*)NULL ) , ::getCppuType(( const Reference< XWindow >*)NULL ) ,
::getCppuType(( const Reference< XServiceInfo >*)NULL ) , ::getCppuType(( const Reference< XServiceInfo >*)NULL ) ,
::getCppuType(( const Reference< XControl >*)NULL ) , ::getCppuType(( const Reference< XControl >*)NULL ) ,
OComponentHelper::getTypes() OComponentHelper::getTypes()
); );
// ... and set his address to static pointer! // ... and set his address to static pointer!
pTypeCollection = &aTypeCollection ; pTypeCollection = &aTypeCollection ;
......
...@@ -112,7 +112,7 @@ using namespace ::com::sun::star::registry ; ...@@ -112,7 +112,7 @@ using namespace ::com::sun::star::registry ;
sKeyName += OUString::createFromAscii( "/UNO/SERVICES" ); \ sKeyName += OUString::createFromAscii( "/UNO/SERVICES" ); \
\ \
/* Create new key with new name. */ \ /* Create new key with new name. */ \
xNewKey = xKey->createKey( sKeyName ); \ xNewKey = xKey->createKey( sKeyName ); \
\ \
/* If this new key valid ... */ \ /* If this new key valid ... */ \
if ( xNewKey.is () ) \ if ( xNewKey.is () ) \
......
...@@ -57,10 +57,11 @@ namespace unocontrols{ ...@@ -57,10 +57,11 @@ namespace unocontrols{
// construct/destruct // construct/destruct
//______________________________________________________________________________________________________________ //______________________________________________________________________________________________________________
OConnectionPointHelper::OConnectionPointHelper( Mutex& aMutex , OConnectionPointHelper::OConnectionPointHelper(
OConnectionPointContainerHelper* pContainerImplementation , Mutex& aMutex ,
UNO3_TYPE aType ) OConnectionPointContainerHelper* pContainerImplementation ,
: m_aSharedMutex ( aMutex ) Type aType
) : m_aSharedMutex ( aMutex )
, m_oContainerWeakReference ( pContainerImplementation ) , m_oContainerWeakReference ( pContainerImplementation )
, m_pContainerImplementation ( pContainerImplementation ) , m_pContainerImplementation ( pContainerImplementation )
, m_aInterfaceType ( aType ) , m_aInterfaceType ( aType )
...@@ -82,7 +83,7 @@ Any SAL_CALL OConnectionPointHelper::queryInterface( const Type& aType ) throw( ...@@ -82,7 +83,7 @@ Any SAL_CALL OConnectionPointHelper::queryInterface( const Type& aType ) throw(
// Ask for my own supported interfaces ... // Ask for my own supported interfaces ...
Any aReturn ( ::cppu::queryInterface( aType , Any aReturn ( ::cppu::queryInterface( aType ,
static_cast< XConnectionPoint* > ( this ) static_cast< XConnectionPoint* > ( this )
) )
); );
......
...@@ -67,14 +67,14 @@ namespace unocontrols{ ...@@ -67,14 +67,14 @@ namespace unocontrols{
ProgressBar::ProgressBar( const Reference< XMultiServiceFactory >& xFactory ) ProgressBar::ProgressBar( const Reference< XMultiServiceFactory >& xFactory )
: BaseControl ( xFactory ) : BaseControl ( xFactory )
, m_bHorizontal ( DEFAULT_HORIZONTAL ) , m_bHorizontal ( PROGRESSBAR_DEFAULT_HORIZONTAL )
, m_aBlockSize ( DEFAULT_BLOCKDIMENSION ) , m_aBlockSize ( PROGRESSBAR_DEFAULT_BLOCKDIMENSION )
, m_nForegroundColor ( DEFAULT_FOREGROUNDCOLOR ) , m_nForegroundColor ( PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR )
, m_nBackgroundColor ( DEFAULT_BACKGROUNDCOLOR ) , m_nBackgroundColor ( PROGRESSBAR_DEFAULT_BACKGROUNDCOLOR )
, m_nMinRange ( DEFAULT_MINRANGE ) , m_nMinRange ( PROGRESSBAR_DEFAULT_MINRANGE )
, m_nMaxRange ( DEFAULT_MAXRANGE ) , m_nMaxRange ( PROGRESSBAR_DEFAULT_MAXRANGE )
, m_nBlockValue ( DEFAULT_BLOCKVALUE ) , m_nBlockValue ( PROGRESSBAR_DEFAULT_BLOCKVALUE )
, m_nValue ( DEFAULT_VALUE ) , m_nValue ( PROGRESSBAR_DEFAULT_VALUE )
{ {
} }
...@@ -153,9 +153,9 @@ Sequence< Type > SAL_CALL ProgressBar::getTypes() throw( RuntimeException ) ...@@ -153,9 +153,9 @@ Sequence< Type > SAL_CALL ProgressBar::getTypes() throw( RuntimeException )
if ( pTypeCollection == NULL ) if ( pTypeCollection == NULL )
{ {
// Create a static typecollection ... // Create a static typecollection ...
static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XControlModel >*)NULL ) , static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XControlModel >*) NULL ) ,
::getCppuType(( const Reference< XProgressBar >*)NULL ) , ::getCppuType(( const Reference< XProgressBar >*) NULL ) ,
BaseControl::getTypes() BaseControl::getTypes()
); );
// ... and set his address to static pointer! // ... and set his address to static pointer!
pTypeCollection = &aTypeCollection ; pTypeCollection = &aTypeCollection ;
...@@ -174,8 +174,8 @@ Any SAL_CALL ProgressBar::queryAggregation( const Type& aType ) throw( RuntimeEx ...@@ -174,8 +174,8 @@ Any SAL_CALL ProgressBar::queryAggregation( const Type& aType ) throw( RuntimeEx
// Ask for my own supported interfaces ... // Ask for my own supported interfaces ...
// Attention: XTypeProvider and XInterface are supported by OComponentHelper! // Attention: XTypeProvider and XInterface are supported by OComponentHelper!
Any aReturn ( ::cppu::queryInterface( aType , Any aReturn ( ::cppu::queryInterface( aType ,
static_cast< XControlModel* > ( this ) , static_cast< XControlModel* > ( this ) ,
static_cast< XProgressBar* > ( this ) static_cast< XProgressBar* > ( this )
) )
); );
...@@ -312,7 +312,13 @@ sal_Int32 SAL_CALL ProgressBar::getValue () throw( RuntimeException ) ...@@ -312,7 +312,13 @@ sal_Int32 SAL_CALL ProgressBar::getValue () throw( RuntimeException )
// XWindow // XWindow
//____________________________________________________________________________________________________________ //____________________________________________________________________________________________________________
void SAL_CALL ProgressBar::setPosSize ( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nFlags ) throw( RuntimeException ) void SAL_CALL ProgressBar::setPosSize (
sal_Int32 nX,
sal_Int32 nY,
sal_Int32 nWidth,
sal_Int32 nHeight,
sal_Int16 nFlags
) throw( RuntimeException )
{ {
// Take old size BEFORE you set the new values at baseclass! // Take old size BEFORE you set the new values at baseclass!
// You will control changes. At the other way, the values are the same! // You will control changes. At the other way, the values are the same!
...@@ -409,9 +415,9 @@ void ProgressBar::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGra ...@@ -409,9 +415,9 @@ void ProgressBar::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGra
for ( sal_Int16 i=1; i<=nBlockCount; ++i ) for ( sal_Int16 i=1; i<=nBlockCount; ++i )
{ {
// step free field // step free field
nBlockStart += FREESPACE ; nBlockStart += PROGRESSBAR_FREESPACE ;
// paint block // paint block
rGraphics->drawRect (nBlockStart, nY+FREESPACE, m_aBlockSize.Width, m_aBlockSize.Height) ; rGraphics->drawRect (nBlockStart, nY+PROGRESSBAR_FREESPACE, m_aBlockSize.Width, m_aBlockSize.Height) ;
// step next free field // step next free field
nBlockStart += m_aBlockSize.Width ; nBlockStart += m_aBlockSize.Width ;
} }
...@@ -427,20 +433,20 @@ void ProgressBar::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGra ...@@ -427,20 +433,20 @@ void ProgressBar::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGra
for ( sal_Int16 i=1; i<=nBlockCount; ++i ) for ( sal_Int16 i=1; i<=nBlockCount; ++i )
{ {
// step free field // step free field
nBlockStart -= FREESPACE ; nBlockStart -= PROGRESSBAR_FREESPACE ;
// paint block // paint block
rGraphics->drawRect (nX+FREESPACE, nBlockStart, m_aBlockSize.Width, m_aBlockSize.Height) ; rGraphics->drawRect (nX+PROGRESSBAR_FREESPACE, nBlockStart, m_aBlockSize.Width, m_aBlockSize.Height) ;
// step next free field // step next free field
nBlockStart -= m_aBlockSize.Height; nBlockStart -= m_aBlockSize.Height;
} }
} }
// Paint shadow border around the progressbar // Paint shadow border around the progressbar
rGraphics->setLineColor ( LINECOLOR_SHADOW ) ; rGraphics->setLineColor ( PROGRESSBAR_LINECOLOR_SHADOW ) ;
rGraphics->drawLine ( nX, nY, impl_getWidth(), nY ) ; rGraphics->drawLine ( nX, nY, impl_getWidth(), nY ) ;
rGraphics->drawLine ( nX, nY, nX , impl_getHeight() ) ; rGraphics->drawLine ( nX, nY, nX , impl_getHeight() ) ;
rGraphics->setLineColor ( LINECOLOR_BRIGHT ) ; rGraphics->setLineColor ( PROGRESSBAR_LINECOLOR_BRIGHT ) ;
rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, impl_getWidth()-1, nY ) ; rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, impl_getWidth()-1, nY ) ;
rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, nX , impl_getHeight()-1 ) ; rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, nX , impl_getHeight()-1 ) ;
} }
...@@ -463,16 +469,16 @@ void ProgressBar::impl_recalcRange () ...@@ -463,16 +469,16 @@ void ProgressBar::impl_recalcRange ()
if( nWindowWidth > nWindowHeight ) if( nWindowWidth > nWindowHeight )
{ {
m_bHorizontal = sal_True ; m_bHorizontal = sal_True ;
fBlockHeight = (nWindowHeight-(2*FREESPACE)) ; fBlockHeight = (nWindowHeight-(2*PROGRESSBAR_FREESPACE)) ;
fBlockWidth = fBlockHeight ; fBlockWidth = fBlockHeight ;
fMaxBlocks = nWindowWidth/(fBlockWidth+FREESPACE); fMaxBlocks = nWindowWidth/(fBlockWidth+PROGRESSBAR_FREESPACE);
} }
else else
{ {
m_bHorizontal = sal_False ; m_bHorizontal = sal_False ;
fBlockWidth = (nWindowWidth-(2*FREESPACE)) ; fBlockWidth = (nWindowWidth-(2*PROGRESSBAR_FREESPACE)) ;
fBlockHeight = fBlockWidth ; fBlockHeight = fBlockWidth ;
fMaxBlocks = nWindowHeight/(fBlockHeight+FREESPACE); fMaxBlocks = nWindowHeight/(fBlockHeight+PROGRESSBAR_FREESPACE);
} }
double fRange = m_nMaxRange-m_nMinRange ; double fRange = m_nMaxRange-m_nMinRange ;
...@@ -481,79 +487,6 @@ void ProgressBar::impl_recalcRange () ...@@ -481,79 +487,6 @@ void ProgressBar::impl_recalcRange ()
m_nBlockValue = fBlockValue ; m_nBlockValue = fBlockValue ;
m_aBlockSize.Height = (sal_Int32)fBlockHeight; m_aBlockSize.Height = (sal_Int32)fBlockHeight;
m_aBlockSize.Width = (sal_Int32)fBlockWidth ; m_aBlockSize.Width = (sal_Int32)fBlockWidth ;
/*
// Calculate count of blocks for actual size
// (prevent error "division by zero")
if ( nHeight == 0 )
{
nHeight = 1 ;
}
nMaxBlock = nWidth / nHeight ;
nMaxBlock *= 2 ;
// prevent error "division by zero"
if ( nMaxBlock == 0 )
{
nMaxBlock = 1 ;
}
// Calculate new value and new size for ONE block.
// Do not a calculation like this: "m_nBlockValue=(m_nMaxRange-m_nMinRange)/nMaxBlock" !
// If difference between m_nMaxRange and m_nMinRange to large, it give an overflow and a
// following error "division by zero" in method "paint() ... nBlockCount=nDifference/m_nBlockValue ..."
// Overflow ? => example: _I32_MAX - _I32_MIN = -1 and not _UI32_MAX !!!
m_nBlockValue = ( m_nMaxRange / nMaxBlock ) - ( m_nMinRange / nMaxBlock ) ;
m_aBlockSize.Height = ( nHeight - ( FREESPACE * 2 ) ) ;
m_aBlockSize.Width = ( ( nWidth / nMaxBlock ) - FREESPACE ) ;
}
else
{
// Don't forget to save this state! Used in "ProgressBar::paint()"
m_bHorizontal = sal_False ;
double fBlockWidth = (nHeight-(2*FREESPACE)) ;
double fBlockHeight = fBlockWidth ;
double fRange = m_nMaxRange-m_nMinRange ;
double fBlockValue = fRange/(fBlockWidth+FREESPACE);
m_nBlockValue = fBlockValue ;
m_aBlockSize.Height = (sal_Int32)fBlockHeight;
m_aBlockSize.Width = (sal_Int32)fBlockWidth ;
// Calculate count of blocks for actual size
// (prevent error "division by zero")
if ( nWidth == 0 )
{
nWidth = 1 ;
}
nMaxBlock = nHeight / nWidth ;
nMaxBlock *= 2 ;
// prevent error "division by zero"
if ( nMaxBlock == 0 )
{
nMaxBlock = 1 ;
}
// Calculate new value and new size for ONE block.
// Do not a calculation like this: "m_nBlockValue=(m_nMaxRange-m_nMinRange)/nMaxBlock" !
// If difference between m_nMaxRange and m_nMinRange to large, it give an overflow and a
// following error "division by zero" in method "paint() ... nBlockCount=nDifference/m_nBlockValue ..."
// Overflow ? => example: _I32_MAX - _I32_MIN = -1 and not _UI32_MAX !!!
m_nBlockValue = ( m_nMaxRange / nMaxBlock ) - ( m_nMinRange / nMaxBlock ) ;
m_aBlockSize.Height = ( ( nHeight / nMaxBlock ) - FREESPACE ) ;
m_aBlockSize.Width = ( nWidth - ( FREESPACE * 2 ) ) ;
}
*/
} }
} // namespace unocontrols } // namespace unocontrols
......
...@@ -87,7 +87,7 @@ StatusIndicator::StatusIndicator( const Reference< XMultiServiceFactory >& xFact ...@@ -87,7 +87,7 @@ StatusIndicator::StatusIndicator( const Reference< XMultiServiceFactory >& xFact
xProgressWindow->setVisible( sal_True ); xProgressWindow->setVisible( sal_True );
// Reset to defaults !!! // Reset to defaults !!!
// (progressbar take automaticly its own defaults) // (progressbar take automaticly its own defaults)
m_xText->setText( OUString::createFromAscii( DEFAULT_TEXT ) ); m_xText->setText( OUString::createFromAscii( STATUSINDICATOR_DEFAULT_TEXT ) );
--m_refCount ; --m_refCount ;
} }
...@@ -170,9 +170,9 @@ Sequence< Type > SAL_CALL StatusIndicator::getTypes() throw( RuntimeException ) ...@@ -170,9 +170,9 @@ Sequence< Type > SAL_CALL StatusIndicator::getTypes() throw( RuntimeException )
if ( pTypeCollection == NULL ) if ( pTypeCollection == NULL )
{ {
// Create a static typecollection ... // Create a static typecollection ...
static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XLayoutConstrains >*)NULL ) , static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XLayoutConstrains >*)NULL ) ,
::getCppuType(( const Reference< XStatusIndicator >*)NULL ) , ::getCppuType(( const Reference< XStatusIndicator >*)NULL ) ,
BaseContainerControl::getTypes() BaseContainerControl::getTypes()
); );
// ... and set his address to static pointer! // ... and set his address to static pointer!
pTypeCollection = &aTypeCollection ; pTypeCollection = &aTypeCollection ;
...@@ -190,9 +190,9 @@ Any SAL_CALL StatusIndicator::queryAggregation( const Type& aType ) throw( Runti ...@@ -190,9 +190,9 @@ Any SAL_CALL StatusIndicator::queryAggregation( const Type& aType ) throw( Runti
{ {
// Ask for my own supported interfaces ... // Ask for my own supported interfaces ...
// Attention: XTypeProvider and XInterface are supported by OComponentHelper! // Attention: XTypeProvider and XInterface are supported by OComponentHelper!
Any aReturn ( ::cppu::queryInterface( aType , Any aReturn ( ::cppu::queryInterface( aType ,
static_cast< XLayoutConstrains* > ( this ) , static_cast< XLayoutConstrains* > ( this ) ,
static_cast< XStatusIndicator* > ( this ) static_cast< XStatusIndicator* > ( this )
) )
); );
...@@ -284,7 +284,7 @@ void SAL_CALL StatusIndicator::reset() throw( RuntimeException ) ...@@ -284,7 +284,7 @@ void SAL_CALL StatusIndicator::reset() throw( RuntimeException )
Size SAL_CALL StatusIndicator::getMinimumSize () throw( RuntimeException ) Size SAL_CALL StatusIndicator::getMinimumSize () throw( RuntimeException )
{ {
return Size (DEFAULT_WIDTH, DEFAULT_HEIGHT) ; return Size (STATUSINDICATOR_DEFAULT_WIDTH, STATUSINDICATOR_DEFAULT_HEIGHT) ;
} }
//____________________________________________________________________________________________________________ //____________________________________________________________________________________________________________
...@@ -304,16 +304,16 @@ Size SAL_CALL StatusIndicator::getPreferredSize () throw( RuntimeException ) ...@@ -304,16 +304,16 @@ Size SAL_CALL StatusIndicator::getPreferredSize () throw( RuntimeException )
// calc preferred size of status indicator // calc preferred size of status indicator
sal_Int32 nWidth = impl_getWidth() ; sal_Int32 nWidth = impl_getWidth() ;
sal_Int32 nHeight = (2*FREEBORDER)+aTextSize.Height ; sal_Int32 nHeight = (2*STATUSINDICATOR_FREEBORDER)+aTextSize.Height ;
// norm to minimum // norm to minimum
if ( nWidth<DEFAULT_WIDTH ) if ( nWidth<STATUSINDICATOR_DEFAULT_WIDTH )
{ {
nWidth = DEFAULT_WIDTH ; nWidth = STATUSINDICATOR_DEFAULT_WIDTH ;
} }
if ( nHeight<DEFAULT_HEIGHT ) if ( nHeight<STATUSINDICATOR_DEFAULT_HEIGHT )
{ {
nHeight = DEFAULT_HEIGHT ; nHeight = STATUSINDICATOR_DEFAULT_HEIGHT ;
} }
// return to caller // return to caller
...@@ -333,7 +333,10 @@ Size SAL_CALL StatusIndicator::calcAdjustedSize ( const Size& /*rNewSize*/ ) thr ...@@ -333,7 +333,10 @@ Size SAL_CALL StatusIndicator::calcAdjustedSize ( const Size& /*rNewSize*/ ) thr
// XControl // XControl
//____________________________________________________________________________________________________________ //____________________________________________________________________________________________________________
void SAL_CALL StatusIndicator::createPeer ( const Reference< XToolkit > & rToolkit, const Reference< XWindowPeer > & rParent ) throw( RuntimeException ) void SAL_CALL StatusIndicator::createPeer (
const Reference< XToolkit > & rToolkit,
const Reference< XWindowPeer > & rParent
) throw( RuntimeException )
{ {
if( getPeer().is() == sal_False ) if( getPeer().is() == sal_False )
{ {
...@@ -395,7 +398,13 @@ void SAL_CALL StatusIndicator::dispose () throw( RuntimeException ) ...@@ -395,7 +398,13 @@ void SAL_CALL StatusIndicator::dispose () throw( RuntimeException )
// XWindow // XWindow
//____________________________________________________________________________________________________________ //____________________________________________________________________________________________________________
void SAL_CALL StatusIndicator::setPosSize ( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nFlags ) throw( RuntimeException ) void SAL_CALL StatusIndicator::setPosSize (
sal_Int32 nX,
sal_Int32 nY,
sal_Int32 nWidth,
sal_Int32 nHeight,
sal_Int16 nFlags
) throw( RuntimeException )
{ {
Rectangle aBasePosSize = getPosSize () ; Rectangle aBasePosSize = getPosSize () ;
BaseContainerControl::setPosSize (nX, nY, nWidth, nHeight, nFlags) ; BaseContainerControl::setPosSize (nX, nY, nWidth, nHeight, nFlags) ;
...@@ -473,25 +482,25 @@ void StatusIndicator::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< ...@@ -473,25 +482,25 @@ void StatusIndicator::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference<
// background = gray // background = gray
Reference< XWindowPeer > xPeer( impl_getPeerWindow(), UNO_QUERY ); Reference< XWindowPeer > xPeer( impl_getPeerWindow(), UNO_QUERY );
if( xPeer.is() == sal_True ) if( xPeer.is() == sal_True )
xPeer->setBackground( BACKGROUNDCOLOR ); xPeer->setBackground( STATUSINDICATOR_BACKGROUNDCOLOR );
// FixedText background = gray // FixedText background = gray
Reference< XControl > xTextControl( m_xText, UNO_QUERY ); Reference< XControl > xTextControl( m_xText, UNO_QUERY );
xPeer = xTextControl->getPeer(); xPeer = xTextControl->getPeer();
if( xPeer.is() == sal_True ) if( xPeer.is() == sal_True )
xPeer->setBackground( BACKGROUNDCOLOR ); xPeer->setBackground( STATUSINDICATOR_BACKGROUNDCOLOR );
// Progress background = gray // Progress background = gray
xPeer = Reference< XWindowPeer >( m_xProgressBar, UNO_QUERY ); xPeer = Reference< XWindowPeer >( m_xProgressBar, UNO_QUERY );
if( xPeer.is() == sal_True ) if( xPeer.is() == sal_True )
xPeer->setBackground( BACKGROUNDCOLOR ); xPeer->setBackground( STATUSINDICATOR_BACKGROUNDCOLOR );
// paint shadow border // paint shadow border
rGraphics->setLineColor ( LINECOLOR_BRIGHT ); rGraphics->setLineColor ( STATUSINDICATOR_LINECOLOR_BRIGHT );
rGraphics->drawLine ( nX, nY, impl_getWidth(), nY ); rGraphics->drawLine ( nX, nY, impl_getWidth(), nY );
rGraphics->drawLine ( nX, nY, nX , impl_getHeight() ); rGraphics->drawLine ( nX, nY, nX , impl_getHeight() );
rGraphics->setLineColor ( LINECOLOR_SHADOW ); rGraphics->setLineColor ( STATUSINDICATOR_LINECOLOR_SHADOW );
rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, impl_getWidth()-1, nY ); rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, impl_getWidth()-1, nY );
rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, nX , impl_getHeight()-1 ); rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, nX , impl_getHeight()-1 );
} }
...@@ -520,24 +529,24 @@ void StatusIndicator::impl_recalcLayout ( const WindowEvent& aEvent ) ...@@ -520,24 +529,24 @@ void StatusIndicator::impl_recalcLayout ( const WindowEvent& aEvent )
Reference< XLayoutConstrains > xTextLayout ( m_xText, UNO_QUERY ); Reference< XLayoutConstrains > xTextLayout ( m_xText, UNO_QUERY );
Size aTextSize = xTextLayout->getPreferredSize(); Size aTextSize = xTextLayout->getPreferredSize();
if( aWindowSize.Width < DEFAULT_WIDTH ) if( aWindowSize.Width < STATUSINDICATOR_DEFAULT_WIDTH )
{ {
aWindowSize.Width = DEFAULT_WIDTH; aWindowSize.Width = STATUSINDICATOR_DEFAULT_WIDTH;
} }
if( aWindowSize.Height < DEFAULT_HEIGHT ) if( aWindowSize.Height < STATUSINDICATOR_DEFAULT_HEIGHT )
{ {
aWindowSize.Height = DEFAULT_HEIGHT; aWindowSize.Height = STATUSINDICATOR_DEFAULT_HEIGHT;
} }
// calc position and size of child controls // calc position and size of child controls
nX_Text = FREEBORDER ; nX_Text = STATUSINDICATOR_FREEBORDER ;
nY_Text = FREEBORDER ; nY_Text = STATUSINDICATOR_FREEBORDER ;
nWidth_Text = aTextSize.Width ; nWidth_Text = aTextSize.Width ;
nHeight_Text = aTextSize.Height ; nHeight_Text = aTextSize.Height ;
nX_ProgressBar = nX_Text+nWidth_Text+FREEBORDER ; nX_ProgressBar = nX_Text+nWidth_Text+STATUSINDICATOR_FREEBORDER ;
nY_ProgressBar = nY_Text ; nY_ProgressBar = nY_Text ;
nWidth_ProgressBar = aWindowSize.Width-nWidth_Text-(3*FREEBORDER) ; nWidth_ProgressBar = aWindowSize.Width-nWidth_Text-(3*STATUSINDICATOR_FREEBORDER) ;
nHeight_ProgressBar = nHeight_Text ; nHeight_ProgressBar = nHeight_Text ;
// Set new position and size on all controls // Set new position and size on all controls
...@@ -548,14 +557,6 @@ void StatusIndicator::impl_recalcLayout ( const WindowEvent& aEvent ) ...@@ -548,14 +557,6 @@ void StatusIndicator::impl_recalcLayout ( const WindowEvent& aEvent )
xProgressWindow->setPosSize ( nX_ProgressBar, nY_ProgressBar, nWidth_ProgressBar, nHeight_ProgressBar , 15 ) ; xProgressWindow->setPosSize ( nX_ProgressBar, nY_ProgressBar, nWidth_ProgressBar, nHeight_ProgressBar , 15 ) ;
} }
//____________________________________________________________________________________________________________
// debug methods
//____________________________________________________________________________________________________________
#if OSL_DEBUG_LEVEL > 1
#endif // #if OSL_DEBUG_LEVEL > 1
} // namespace unocontrols } // namespace unocontrols
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -48,20 +48,8 @@ ...@@ -48,20 +48,8 @@
namespace unocontrols{ namespace unocontrols{
#define UNO3_ANY ::com::sun::star::uno::Any #define CSS_UNO ::com::sun::star::uno
#define UNO3_SEQUENCE ::com::sun::star::uno::Sequence #define CSS_LANG ::com::sun::star::lang
#define UNO3_TYPE ::com::sun::star::uno::Type
#define UNO3_REFERENCE ::com::sun::star::uno::Reference
#define UNO3_XCONNECTIONPOINTCONTAINER ::com::sun::star::lang::XConnectionPointContainer
#define UNO3_XCONNECTIONPOINT ::com::sun::star::lang::XConnectionPoint
#define UNO3_MUTEX ::osl::Mutex
#define UNO3_RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
#define UNO3_XINTERFACE ::com::sun::star::uno::XInterface
#define UNO3_OMULTITYPEINTERFACECONTAINERHELPER ::cppu::OMultiTypeInterfaceContainerHelper
#define UNO3_LISTENEREXISTEXCEPTION ::com::sun::star::lang::ListenerExistException
#define UNO3_INVALIDLISTENEREXCEPTION ::com::sun::star::lang::InvalidListenerException
#define UNO3_WEAKREFERENCE ::com::sun::star::uno::WeakReference
#define UNO3_OWEAKOBJECT ::cppu::OWeakObject
//______________________________________________________________________________________________________________ //______________________________________________________________________________________________________________
// defines // defines
...@@ -71,8 +59,8 @@ namespace unocontrols{ ...@@ -71,8 +59,8 @@ namespace unocontrols{
// class declaration OConnectionPointContainerHelper // class declaration OConnectionPointContainerHelper
//______________________________________________________________________________________________________________ //______________________________________________________________________________________________________________
class OConnectionPointContainerHelper : public UNO3_XCONNECTIONPOINTCONTAINER class OConnectionPointContainerHelper : public CSS_LANG::XConnectionPointContainer
, public UNO3_OWEAKOBJECT , public ::cppu::OWeakObject
{ {
//______________________________________________________________________________________________________________ //______________________________________________________________________________________________________________
...@@ -98,7 +86,7 @@ public: ...@@ -98,7 +86,7 @@ public:
@onerror @onerror
*/ */
OConnectionPointContainerHelper( UNO3_MUTEX& aMutex ); OConnectionPointContainerHelper( ::osl::Mutex& aMutex );
/**_________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________
@short @short
...@@ -132,7 +120,8 @@ public: ...@@ -132,7 +120,8 @@ public:
@onerror A RuntimeException is thrown. @onerror A RuntimeException is thrown.
*/ */
virtual UNO3_ANY SAL_CALL queryInterface( const UNO3_TYPE& aType ) throw( UNO3_RUNTIMEEXCEPTION ); virtual CSS_UNO::Any SAL_CALL queryInterface( const CSS_UNO::Type& aType )
throw( CSS_UNO::RuntimeException );
/**_______________________________________________________________________________________________________ /**_______________________________________________________________________________________________________
@short increment refcount @short increment refcount
...@@ -183,7 +172,8 @@ public: ...@@ -183,7 +172,8 @@ public:
@onerror @onerror
*/ */
virtual UNO3_SEQUENCE< UNO3_TYPE > SAL_CALL getConnectionPointTypes() throw( UNO3_RUNTIMEEXCEPTION ); virtual CSS_UNO::Sequence< CSS_UNO::Type > SAL_CALL getConnectionPointTypes()
throw( CSS_UNO::RuntimeException );
/**_________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________
@short @short
...@@ -198,7 +188,9 @@ public: ...@@ -198,7 +188,9 @@ public:
@onerror @onerror
*/ */
virtual UNO3_REFERENCE< UNO3_XCONNECTIONPOINT > SAL_CALL queryConnectionPoint( const UNO3_TYPE& aType ) throw( UNO3_RUNTIMEEXCEPTION ); virtual CSS_UNO::Reference< CSS_LANG::XConnectionPoint > SAL_CALL queryConnectionPoint(
const CSS_UNO::Type& aType
) throw( CSS_UNO::RuntimeException );
/**_________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________
@short @short
...@@ -213,8 +205,10 @@ public: ...@@ -213,8 +205,10 @@ public:
@onerror @onerror
*/ */
virtual void SAL_CALL advise( const UNO3_TYPE& aType , virtual void SAL_CALL advise(
const UNO3_REFERENCE< UNO3_XINTERFACE >& xListener ) throw( UNO3_RUNTIMEEXCEPTION ); const CSS_UNO::Type& aType ,
const CSS_UNO::Reference< CSS_UNO::XInterface >& xListener
) throw( CSS_UNO::RuntimeException );
/**_________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________
@short @short
...@@ -229,8 +223,10 @@ public: ...@@ -229,8 +223,10 @@ public:
@onerror @onerror
*/ */
virtual void SAL_CALL unadvise( const UNO3_TYPE& aType , virtual void SAL_CALL unadvise(
const UNO3_REFERENCE< UNO3_XINTERFACE >& xListener ) throw( UNO3_RUNTIMEEXCEPTION ); const CSS_UNO::Type& aType ,
const CSS_UNO::Reference< CSS_UNO::XInterface >& xListener
) throw( CSS_UNO::RuntimeException );
/**_________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________
@short @short
...@@ -245,7 +241,7 @@ public: ...@@ -245,7 +241,7 @@ public:
@onerror @onerror
*/ */
UNO3_OMULTITYPEINTERFACECONTAINERHELPER& impl_getMultiTypeContainer(); ::cppu::OMultiTypeInterfaceContainerHelper& impl_getMultiTypeContainer();
//______________________________________________________________________________________________________________ //______________________________________________________________________________________________________________
// private variables // private variables
...@@ -253,11 +249,15 @@ public: ...@@ -253,11 +249,15 @@ public:
private: private:
UNO3_MUTEX& m_aSharedMutex ; ::osl::Mutex& m_aSharedMutex ;
UNO3_OMULTITYPEINTERFACECONTAINERHELPER m_aMultiTypeContainer ; // Container to hold listener ::cppu::OMultiTypeInterfaceContainerHelper m_aMultiTypeContainer ; // Container to hold listener
}; // class OConnectionPointContainerHelper }; // class OConnectionPointContainerHelper
// The namespace aliases are only used in this header
#undef CSS_UNO
#undef CSS_LANG
} // namespace unocontrols } // namespace unocontrols
#endif // #ifndef _OCONNECTIONPOINTCONTAINERHELPER_HXX #endif // #ifndef _OCONNECTIONPOINTCONTAINERHELPER_HXX
......
...@@ -49,21 +49,8 @@ ...@@ -49,21 +49,8 @@
namespace unocontrols{ namespace unocontrols{
#define UNO3_ANY ::com::sun::star::uno::Any #define CSS_UNO ::com::sun::star::uno
#define UNO3_SEQUENCE ::com::sun::star::uno::Sequence #define CSS_LANG ::com::sun::star::lang
#define UNO3_TYPE ::com::sun::star::uno::Type
#define UNO3_REFERENCE ::com::sun::star::uno::Reference
#define UNO3_XCONNECTIONPOINTCONTAINER ::com::sun::star::lang::XConnectionPointContainer
#define UNO3_XCONNECTIONPOINT ::com::sun::star::lang::XConnectionPoint
#define UNO3_MUTEX ::osl::Mutex
#define UNO3_RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
#define UNO3_XINTERFACE ::com::sun::star::uno::XInterface
#define UNO3_OMULTITYPEINTERFACECONTAINERHELPER ::cppu::OMultiTypeInterfaceContainerHelper
#define UNO3_LISTENEREXISTEXCEPTION ::com::sun::star::lang::ListenerExistException
#define UNO3_INVALIDLISTENEREXCEPTION ::com::sun::star::lang::InvalidListenerException
#define UNO3_WEAKREFERENCE ::com::sun::star::uno::WeakReference
#define UNO3_OWEAKOBJECT ::cppu::OWeakObject
#define UNO3_OCONNECTIONPOINTCONTAINERHELPER OConnectionPointContainerHelper
//______________________________________________________________________________________________________________ //______________________________________________________________________________________________________________
// defines // defines
...@@ -73,8 +60,8 @@ namespace unocontrols{ ...@@ -73,8 +60,8 @@ namespace unocontrols{
// class declaration OConnectionPointHelper // class declaration OConnectionPointHelper
//______________________________________________________________________________________________________________ //______________________________________________________________________________________________________________
class OConnectionPointHelper : public UNO3_XCONNECTIONPOINT class OConnectionPointHelper : public CSS_LANG::XConnectionPoint
, public UNO3_OWEAKOBJECT , public ::cppu::OWeakObject
{ {
//______________________________________________________________________________________________________________ //______________________________________________________________________________________________________________
...@@ -100,9 +87,9 @@ public: ...@@ -100,9 +87,9 @@ public:
@onerror @onerror
*/ */
OConnectionPointHelper( UNO3_MUTEX& aMutex , OConnectionPointHelper( ::osl::Mutex& aMutex ,
UNO3_OCONNECTIONPOINTCONTAINERHELPER* pContainerImplementation , OConnectionPointContainerHelper* pContainerImplementation ,
UNO3_TYPE aType ); CSS_UNO::Type aType );
/**_________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________
@short @short
...@@ -136,7 +123,8 @@ public: ...@@ -136,7 +123,8 @@ public:
@onerror A RuntimeException is thrown. @onerror A RuntimeException is thrown.
*/ */
virtual UNO3_ANY SAL_CALL queryInterface( const UNO3_TYPE& aType ) throw( UNO3_RUNTIMEEXCEPTION ); virtual CSS_UNO::Any SAL_CALL queryInterface( const CSS_UNO::Type& aType )
throw( CSS_UNO::RuntimeException );
/**_______________________________________________________________________________________________________ /**_______________________________________________________________________________________________________
@short increment refcount @short increment refcount
...@@ -187,7 +175,8 @@ public: ...@@ -187,7 +175,8 @@ public:
@onerror @onerror
*/ */
virtual UNO3_TYPE SAL_CALL getConnectionType() throw( UNO3_RUNTIMEEXCEPTION ); virtual CSS_UNO::Type SAL_CALL getConnectionType()
throw( CSS_UNO::RuntimeException );
/**_________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________
@short @short
...@@ -202,7 +191,8 @@ public: ...@@ -202,7 +191,8 @@ public:
@onerror @onerror
*/ */
virtual UNO3_REFERENCE< UNO3_XCONNECTIONPOINTCONTAINER > SAL_CALL getConnectionPointContainer() throw( UNO3_RUNTIMEEXCEPTION ); virtual CSS_UNO::Reference< CSS_LANG::XConnectionPointContainer > SAL_CALL getConnectionPointContainer()
throw( CSS_UNO::RuntimeException );
/**_________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________
@short @short
...@@ -217,9 +207,13 @@ public: ...@@ -217,9 +207,13 @@ public:
@onerror @onerror
*/ */
virtual void SAL_CALL advise( const UNO3_REFERENCE< UNO3_XINTERFACE >& xListener ) throw( UNO3_LISTENEREXISTEXCEPTION , virtual void SAL_CALL advise(
UNO3_INVALIDLISTENEREXCEPTION , const CSS_UNO::Reference< CSS_UNO::XInterface >& xListener
UNO3_RUNTIMEEXCEPTION ); ) throw (
CSS_LANG::ListenerExistException,
CSS_LANG::InvalidListenerException ,
CSS_UNO::RuntimeException
);
/**_________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________
@short @short
...@@ -234,7 +228,8 @@ public: ...@@ -234,7 +228,8 @@ public:
@onerror @onerror
*/ */
virtual void SAL_CALL unadvise( const UNO3_REFERENCE< UNO3_XINTERFACE >& xListener ) throw( UNO3_RUNTIMEEXCEPTION ); virtual void SAL_CALL unadvise( const CSS_UNO::Reference< CSS_UNO::XInterface >& xListener )
throw( CSS_UNO::RuntimeException );
/**_________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________
@short @short
...@@ -249,7 +244,8 @@ public: ...@@ -249,7 +244,8 @@ public:
@onerror @onerror
*/ */
virtual UNO3_SEQUENCE< UNO3_REFERENCE< UNO3_XINTERFACE > > SAL_CALL getConnections() throw( UNO3_RUNTIMEEXCEPTION ); virtual CSS_UNO::Sequence< CSS_UNO::Reference< CSS_UNO::XInterface > > SAL_CALL getConnections()
throw( CSS_UNO::RuntimeException );
//______________________________________________________________________________________________________________ //______________________________________________________________________________________________________________
// private methods // private methods
...@@ -293,15 +289,19 @@ private: ...@@ -293,15 +289,19 @@ private:
private: private:
UNO3_MUTEX& m_aSharedMutex ; ::osl::Mutex& m_aSharedMutex ;
UNO3_WEAKREFERENCE< UNO3_XCONNECTIONPOINTCONTAINER > m_oContainerWeakReference ; // Reference to container-class!. Don't use Reference<...> CSS_UNO::WeakReference< CSS_LANG::XConnectionPointContainer > m_oContainerWeakReference ; // Reference to container-class!. Don't use Reference<...>
// It is a ring-reference => and must be a wekreference! // It is a ring-reference => and must be a wekreference!
UNO3_OCONNECTIONPOINTCONTAINERHELPER* m_pContainerImplementation ; OConnectionPointContainerHelper* m_pContainerImplementation ;
UNO3_TYPE m_aInterfaceType ; CSS_UNO::Type m_aInterfaceType ;
UNO3_REFERENCE< UNO3_XINTERFACE > m_xLock ; CSS_UNO::Reference< CSS_UNO::XInterface > m_xLock ;
}; // class OConnectionPointHelper }; // class OConnectionPointHelper
// The namespace aliases are only used in this header
#undef CSS_UNO
#undef CSS_LANG
} // namespace unocontrols } // namespace unocontrols
#endif // #ifndef _OCONNECTIONPOINTHELPER_HXX #endif // #ifndef _OCONNECTIONPOINTHELPER_HXX
......
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