Commits

rt  committed 4be25f1

CWS-TOOLING: integrate CWS cli002

  • Participants
  • Parent commits f6feea9

Comments (0)

Files changed (15)

File cppcanvas/source/mtfrenderer/textaction.cxx

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

File dtrans/source/X11/X11_selection.cxx

 
 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;
 
              );
 #endif
 
-	{
-		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
+    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
 #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 );
 	{
         bool bAdjustTime = false;
         {
-            ClearableMutexGuard aGuard(m_aMutex);
             bool bHandle = false;
 
             if( XCheckTypedEvent( m_pDisplay,
                 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 );

File extensions/source/abpilot/fieldmappingimpl.cxx

 							_rFieldAssignment[ sAddressProgrammatic ] = sDriverUI;
 					}
 					else
+					{
 						DBG_ERROR( "fieldmapping::defaultMapping: invalid driver programmatic name!" );
+					}
 				}
 			}
 			catch( const Exception& )

File extensions/source/dbpilots/commonpagesdbp.cxx

 						setFormConnection( xConn );
 					}
 					else
+					{
 						DBG_ERROR("OTableSelectionPage::implFillTables: invalid data source object returned by the context");
+					}
 				}
 			}
 			catch(SQLContext& e) { aSQLException <<= e; }

File extensions/source/dbpilots/controlwizard.cxx

 				}
 			}
 			else
+			{	
 				DBG_ASSERT(xPage.is(), "OControlWizard::implDeterminePage: can't determine the page (no model)!");
-
+			}
 			m_aContext.xDrawPage = xPage;
 		}
 		catch(Exception&)

File extensions/source/propctrlr/formmetadata.cxx

 			sReturn = aEnumStrings[ nIntValue ];
 		}
 		else
+		{	
 			DBG_ERROR( "DefaultEnumRepresentation::getDescriptionForValue: could not translate an enum value" );
-
+		}
         return sReturn;
     }
     

File extensions/source/propctrlr/genericpropertyhandler.cxx

         if ( ( index >= 0 ) && ( index < (sal_Int32)aDescriptions.size() ) )
             sDescription = aDescriptions[ index ];
         else
-            DBG_ERROR( "EnumRepresentation::getDescriptionForValue: cannot convert!" );
-
+        {
+             DBG_ERROR( "EnumRepresentation::getDescriptionForValue: cannot convert!" );
+        }
         return sDescription;
     }
 

File svtools/source/config/helpopt.cxx

                     }
                 }
                 else
-                    DBG_ERRORFILE( "Wrong Type!" );
+                {
+		    DBG_ERRORFILE( "Wrong Type!" );
+		}
             }
         }
         if ( IsHelpTips() != Help::IsQuickHelpEnabled() )

File svtools/source/config/miscopt.cxx

                 if( seqValues[nProperty] >>= aSymbolsStyle )
                     SetSymbolsStyleName( aSymbolsStyle );
                 else
+                {
                     DBG_ERROR("Wrong type of \"Misc\\SymbolStyle\"!" );
+                }
                 m_bIsSymbolsStyleRO = seqRO[nProperty];
                 break;
             }
                                                             if( seqValues[nProperty] >>= aSymbolsStyle )
                                                                 SetSymbolsStyleName( aSymbolsStyle );
                                                             else
+                                                            {
                                                                 DBG_ERROR("Wrong type of \"Misc\\SymbolStyle\"!" );
+                                                            }
                                                         }
                                                     break;
         }

File svtools/source/config/syslocaleoptions.cxx

                                 if ( pValues[nProp] >>= aStr )
                                     m_aLocaleString = aStr;
                                 else
+                                {
                                     DBG_ERRORFILE( "Wrong property type!" );
+                                }
                                 m_bROLocale = pROStates[nProp];
                             }
                             break;
                                 if ( pValues[nProp] >>= aStr )
                                     m_aCurrencyString = aStr;
                                 else
+                                {
                                     DBG_ERRORFILE( "Wrong property type!" );
+                                }
                                 m_bROCurrency = pROStates[nProp];
                             }
                         break;
                             if ( pValues[nProp] >>= bValue )
                                 m_bDecimalSeparator = bValue;
                             else
+                            {
                                 DBG_ERRORFILE( "Wrong property type!" );
+                            }
                             m_bRODecimalSeparator = pROStates[nProp];
                         }
                         break;

File svtools/source/config/undoopt.cxx

                         if ( pValues[nProp] >>= nTemp )
                             nUndoCount = nTemp;
                         else
+                        {
                             DBG_ERROR( "Wrong Type!" );
+                        }
                         break;
                     }
 

File svtools/source/control/valueacc.cxx

 void ValueSetAcc::ThrowIfDisposed (void)
     throw (::com::sun::star::lang::DisposedException)
 {
-	if (rBHelper.bDisposed || rBHelper.bInDispose)
-	{
+    if (rBHelper.bDisposed || rBHelper.bInDispose)
+    {
         OSL_TRACE ("Calling disposed object. Throwing exception:");
         throw lang::DisposedException (
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("object has been already disposed")),
             static_cast<uno::XWeak*>(this));
     }
     else
+    {
         DBG_ASSERT (mpParent!=NULL, "ValueSetAcc not disposed but mpParent == NULL");
+    }
 }
 
 

File svtools/source/dialogs/addresstemplate.cxx

 				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()
 							);
+			}
 		}
 	}
 

File svtools/source/items1/itempool.cxx

 	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) )
 	else if ( pSecondary )
 		pSecondary->ResetPoolDefaultItem(nWhichId);
 	else
+	{
 		SFX_ASSERT( 0, nWhichId, "unknown Which-Id - cannot set pool default" );
+	}
 }
 
 // -----------------------------------------------------------------------

File svtools/source/numbers/zformat.cxx

         }
     }
     else
-        DBG_ERROR( "SvNumberformat::GetDateOrder: no date" );
+    {
+       DBG_ERROR( "SvNumberformat::GetDateOrder: no date" );
+    }
     return rLoc().getDateFormat();
 }