CWS-TOOLING: integrate CWS cli002

This commit is contained in:
Rüdiger Timm 2008-10-28 15:03:16 +00:00
parent 216e0048e4
commit ada35cded0
10 changed files with 65 additions and 48 deletions

View File

@ -2307,7 +2307,7 @@ namespace cppcanvas
}
}
#if defined __GNUC__
#if __GNUC__ == 4 && __GNUC_MINOR__ == 1
#if __GNUC__ == 4 && __GNUC_MINOR__ >= 1
// Unreachable; to avoid bogus warning:
return ActionSharedPtr();
#endif

View File

@ -889,6 +889,7 @@ OUString SelectionManager::convertTypeFromNative( Atom nType, Atom selection, in
bool SelectionManager::getPasteData( Atom selection, Atom type, Sequence< sal_Int8 >& rData )
{
ResettableMutexGuard aGuard(m_aMutex);
::std::hash_map< Atom, Selection* >::iterator it;
bool bSuccess = false;
@ -901,45 +902,41 @@ bool SelectionManager::getPasteData( Atom selection, Atom type, Sequence< sal_In
);
#endif
if( ! m_pDisplay )
return false;
it = m_aSelections.find( selection );
if( it == m_aSelections.end() )
return false;
Window aSelectionOwner = XGetSelectionOwner( m_pDisplay, selection );
if( aSelectionOwner == None )
return false;
if( aSelectionOwner == m_aWindow )
{
MutexGuard aGuard(m_aMutex);
if( ! m_pDisplay )
return false;
it = m_aSelections.find( selection );
if( it == m_aSelections.end() )
return false;
Window aSelectionOwner = XGetSelectionOwner( m_pDisplay, selection );
if( aSelectionOwner == None )
return false;
if( aSelectionOwner == m_aWindow )
{
// probably bad timing led us here
// probably bad timing led us here
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "Innere Nabelschau\n" );
fprintf( stderr, "Innere Nabelschau\n" );
#endif
return false;
}
// ICCCM recommends to destroy property before convert request unless
// parameters are transported; we do only in case of MULTIPLE,
// so destroy property unless target is MULTIPLE
if( type != m_nMULTIPLEAtom )
XDeleteProperty( m_pDisplay, m_aWindow, selection );
XConvertSelection( m_pDisplay, selection, type, selection, m_aWindow, selection == m_nXdndSelection ? m_nDropTime : CurrentTime );
it->second->m_eState = Selection::WaitingForResponse;
it->second->m_aRequestedType = type;
it->second->m_aData = Sequence< sal_Int8 >();
it->second->m_aDataArrived.reset();
// really start the request; if we don't flush the
// queue the request won't leave it because there are no more
// X calls after this until the data arrived or timeout
XFlush( m_pDisplay );
return false;
}
// ICCCM recommends to destroy property before convert request unless
// parameters are transported; we do only in case of MULTIPLE,
// so destroy property unless target is MULTIPLE
if( type != m_nMULTIPLEAtom )
XDeleteProperty( m_pDisplay, m_aWindow, selection );
XConvertSelection( m_pDisplay, selection, type, selection, m_aWindow, selection == m_nXdndSelection ? m_nDropTime : CurrentTime );
it->second->m_eState = Selection::WaitingForResponse;
it->second->m_aRequestedType = type;
it->second->m_aData = Sequence< sal_Int8 >();
it->second->m_aDataArrived.reset();
// really start the request; if we don't flush the
// queue the request won't leave it because there are no more
// X calls after this until the data arrived or timeout
XFlush( m_pDisplay );
// do a reschedule
struct timeval tv_last, tv_current;
gettimeofday( &tv_last, NULL );
@ -950,7 +947,6 @@ bool SelectionManager::getPasteData( Atom selection, Atom type, Sequence< sal_In
{
bool bAdjustTime = false;
{
ClearableMutexGuard aGuard(m_aMutex);
bool bHandle = false;
if( XCheckTypedEvent( m_pDisplay,
@ -995,12 +991,15 @@ bool SelectionManager::getPasteData( Atom selection, Atom type, Sequence< sal_In
TimeValue aTVal;
aTVal.Seconds = 0;
aTVal.Nanosec = 100000000;
aGuard.clear();
osl_waitThread( &aTVal );
aGuard.reset();
}
if( bHandle )
{
aGuard.clear();
handleXEvent( aEvent );
aGuard.reset();
}
}
gettimeofday( &tv_current, NULL );

View File

@ -269,7 +269,9 @@ void SvtHelpOptions_Impl::Load(const uno::Sequence< ::rtl::OUString>& rProperty
}
}
else
DBG_ERRORFILE( "Wrong Type!" );
{
DBG_ERRORFILE( "Wrong Type!" );
}
}
}
if ( IsHelpTips() != Help::IsQuickHelpEnabled() )

View File

@ -392,7 +392,9 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
if( seqValues[nProperty] >>= aSymbolsStyle )
SetSymbolsStyleName( aSymbolsStyle );
else
{
DBG_ERROR("Wrong type of \"Misc\\SymbolStyle\"!" );
}
m_bIsSymbolsStyleRO = seqRO[nProperty];
break;
}
@ -492,7 +494,9 @@ void SvtMiscOptions_Impl::Load( const Sequence< OUString >& rPropertyNames )
if( seqValues[nProperty] >>= aSymbolsStyle )
SetSymbolsStyleName( aSymbolsStyle );
else
{
DBG_ERROR("Wrong type of \"Misc\\SymbolStyle\"!" );
}
}
break;
}

View File

@ -186,7 +186,9 @@ SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl()
if ( pValues[nProp] >>= aStr )
m_aLocaleString = aStr;
else
{
DBG_ERRORFILE( "Wrong property type!" );
}
m_bROLocale = pROStates[nProp];
}
break;
@ -196,7 +198,9 @@ SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl()
if ( pValues[nProp] >>= aStr )
m_aCurrencyString = aStr;
else
{
DBG_ERRORFILE( "Wrong property type!" );
}
m_bROCurrency = pROStates[nProp];
}
break;
@ -206,7 +210,9 @@ SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl()
if ( pValues[nProp] >>= bValue )
m_bDecimalSeparator = bValue;
else
{
DBG_ERRORFILE( "Wrong property type!" );
}
m_bRODecimalSeparator = pROStates[nProp];
}
break;

View File

@ -140,7 +140,9 @@ void SvtUndoOptions_Impl::Load()
if ( pValues[nProp] >>= nTemp )
nUndoCount = nTemp;
else
{
DBG_ERROR( "Wrong Type!" );
}
break;
}

View File

@ -745,7 +745,9 @@ void ValueSetAcc::ThrowIfDisposed (void)
static_cast<uno::XWeak*>(this));
}
else
{
DBG_ASSERT (mpParent!=NULL, "ValueSetAcc not disposed but mpParent == NULL");
}
}

View File

@ -196,11 +196,13 @@ public:
m_aAliases[ pFields->ProgrammaticName ] = pFields->Alias;
}
else
{
DBG_ERROR ( ( ::rtl::OString("AssigmentTransientData::AssigmentTransientData: unknown programmatic name (")
+= ::rtl::OString(pFields->ProgrammaticName.getStr(), pFields->ProgrammaticName.getLength(), RTL_TEXTENCODING_ASCII_US)
+= ::rtl::OString(")!")
).getStr()
);
}
}
}

View File

@ -673,20 +673,16 @@ void SfxItemPool::SetPoolDefaultItem(const SfxPoolItem &rItem)
else if ( pSecondary )
pSecondary->SetPoolDefaultItem(rItem);
else
{
SFX_ASSERT( 0, rItem.Which(), "unknown Which-Id - cannot set pool default" );
}
}
// ----------------------------------------------------------------------
/*
* Resets the default of the given <Which-Id> back to the static default.
* If a pool default exists it is removed.
*/
void SfxItemPool::ResetPoolDefaultItem( USHORT nWhichId )
/* [Beschreibung]
Diese Methode setzt den Default f"ur die angegeben <Which-Id> zur"uck
auf den statischen Default. Falls ein Pool-Default exisitiert, wird
dieser gel"oscht.
*/
{
DBG_CHKTHIS(SfxItemPool, 0);
if ( IsInRange(nWhichId) )
@ -702,7 +698,9 @@ void SfxItemPool::ResetPoolDefaultItem( USHORT nWhichId )
else if ( pSecondary )
pSecondary->ResetPoolDefaultItem(nWhichId);
else
{
SFX_ASSERT( 0, nWhichId, "unknown Which-Id - cannot set pool default" );
}
}
// -----------------------------------------------------------------------

View File

@ -3945,7 +3945,9 @@ DateFormat SvNumberformat::GetDateOrder() const
}
}
else
DBG_ERROR( "SvNumberformat::GetDateOrder: no date" );
{
DBG_ERROR( "SvNumberformat::GetDateOrder: no date" );
}
return rLoc().getDateFormat();
}