Fix conv2d+dequantize squash for residual fusion (#19545)

* Fix conv2d+dequantize squash for residual fusion

test=develop

* Change condition

test=develop

--- paddle/fluid/framework/ir/mkldnn/cpu_quantize_squash_pass.cc
+++ paddle/fluid/framework/ir/mkldnn/cpu_quantize_squash_pass.cc
@@ -177,7 +177,10 @@
     GET_IR_NODE_FROM_SUBGRAPH(dequant_out, dequant_out, conv_dequant_pattern);

     // if conv2d has one output
-    if (conv_out->outputs.size() == 1) {
+    // and there is no fuse residual connection
+    // because residual fusion does not support force output with fp32
+    if (conv_out->outputs.size() == 1 &&
+        !(conv_op->Op()->GetAttrIfExists<bool>("fuse_residual_connection"))) {
       conv_op->Op()->SetAttr("force_fp32_output", true);
       conv_op->Op()->SetOutput("Output",
                                std::vector<std::string>({dequant_out->Name()}));


Remove useless assert

Remove useless assert

--- expr_synth.cc
+++ expr_synth.cc
@@ -17,7 +17,7 @@
  *    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 #ifdef HAVE_CVS_IDENT
-#ident "$Id: expr_synth.cc,v 1.83 2007/02/05 01:42:31 steve Exp $"
+#ident "$Id: expr_synth.cc,v 1.84 2007/04/04 02:31:57 steve Exp $"
 #endif

 # include "config.h"
@@ -519,7 +519,6 @@
       osig->data_type(expr_type());
       osig->local_flag(true);

-      assert(op() == 'l');
       NetCLShift*dev = new NetCLShift(scope, scope->local_symbol(),
 				      osig->vector_width(),
 				      rsig->vector_width(),
@@ -914,6 +913,9 @@

 /*
  * $Log: expr_synth.cc,v $
+ * Revision 1.84  2007/04/04 02:31:57  steve
+ *  Remove useless assert
+ *
  * Revision 1.83  2007/02/05 01:42:31  steve
  *  Set some missing local flags.
  *


Only mark the end of dynamic members if the object is dynamic.

--- types/amfobject.hpp
+++ types/amfobject.hpp
@@ -95,8 +95,10 @@
 			buf.insert(buf.end(), value.begin(), value.end());
 		}

+		// only mark the end of *(dynamic-member) if the object is actually dynamic
 		// final dynamic member = UTF-8-empty
-		buf.push_back(0x01);
+		if (traits.dynamic)
+			buf.push_back(0x01);

 		return buf;
 	}


Make removeLock actually work. Fixes a crash on logout.

Mr Backports: I have no clue if this code was the same in Kopete 0.9. If it
was, this needs fixing.

CCMAIL: mattr@kde.org (Mr Backports)

svn path=/trunk/kdenetwork/kopete/; revision=367338

--- protocols/jabber/jabberresourcepool.cpp
+++ protocols/jabber/jabberresourcepool.cpp
@@ -204,7 +204,7 @@
 	{
 		if ( (mResource->jid().userHost().lower() == jid.userHost().lower()) )
 		{
-			mLockList.remove ();
+			mLockList.remove (mResource);
 		}
 	}


Extended Breakpoint primitive to take an id and enable ignoring of selected ids during debugging.

Signed-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>

--- vm/src/primitives/RVMPlugin.cpp
+++ vm/src/primitives/RVMPlugin.cpp
@@ -173,21 +173,32 @@

 void* primitiveBreakpoint() {
   Squeak_Interpreter* const interp = The_Squeak_Interpreter();
+
+  oop_int_t breakId = 0;

   // #breakpoint: msg
-  if (interp->get_argumentCount() == 1) {
-    Oop x = interp->stackTop();
-    if (!x.isBytes()) {
+  // or: #breakpoint: msg id: int
+  if (interp->get_argumentCount() == 1 || interp->get_argumentCount() == 2) {
+
+
+    if (interp->get_argumentCount() == 2) {
+      breakId = interp->stackIntegerValue(0);
+      interp->pop(1);
+    }
+
+
+    Oop msg = interp->stackTop();
+    if (!msg.isBytes()) {
       interp->primitiveFail();
     }
     else {
       stdout_printer->lprintf("breakpoint: ");
-      x.as_object()->print_bytes(stdout_printer);
+      msg.as_object()->print_bytes(stdout_printer);
       stdout_printer->nl();
       interp->pop(1);
     }
   }
-  else if (interp->get_argumentCount() > 1) {
+  else if (interp->get_argumentCount() > 2) {
     interp->primitiveFail();
     stdout_printer->lprintf("breakpoint (unsupported number of parameters)\n");
   }
@@ -196,7 +207,18 @@
     stdout_printer->lprintf("breakpoint\n");
   }

-  breakpoint();
+  static      bool breakHere = true;
+  static oop_int_t ignoreId1 = -1;
+  static oop_int_t ignoreId2 = -1;
+  static oop_int_t ignoreId3 = -1;
+  static oop_int_t ignoreId4 = -1;
+
+  if (breakHere && breakId != ignoreId1
+                && breakId != ignoreId2
+                && breakId != ignoreId3
+                && breakId != ignoreId4)
+    breakpoint();
+
   return NULL;
 }


examples: Fixed timer crash in UDP perf

examples: Fixed timer crash in UDP perf

--- examples/UDP_perf/service.cpp
+++ examples/UDP_perf/service.cpp
@@ -145,8 +145,8 @@
         init_sample_stats();
         printf("Sending to %s!\n", inet.gateway().str().c_str());
         send_data(client, inet);
-        int timer = Timers::periodic(1s, 2s,
-          [&timer, &inet, &client] (uint32_t) {
+        Timers::periodic(1s, 1s,
+          [&inet, &client] (uint32_t timer) {
             static int secs = 0;
             measure_sample_stats();
             send_data(client, inet);


Clean up the disable_ and checks_.

Clean up the disable_ and checks_.

TEST=safebrowsing related tests stay green.
BUG=NONE

Review URL: http://codereview.chromium.org/6578004

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@75957 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/safe_browsing/safe_browsing_service.cc
+++ chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -432,10 +432,12 @@
     const std::vector<SBFullHashResult>& full_hashes,
     bool can_cache) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
-  if (checks_.find(check) == checks_.end())
-    return;
-
-  DCHECK(enabled_);
+
+  if (!enabled_)
+    return;
+
+  // If the service has been shut down, |check| should have been deleted.
+  DCHECK(checks_.find(check) != checks_.end());

   // |start| is set before calling |GetFullHash()|, which should be
   // the only path which gets to here.
@@ -746,10 +748,11 @@
 void SafeBrowsingService::OnCheckDone(SafeBrowsingCheck* check) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));

-  // If we've been shutdown during the database lookup, this check will already
-  // have been deleted (in OnIOShutdown).
-  if (!enabled_ || checks_.find(check) == checks_.end())
-    return;
+  if (!enabled_)
+    return;
+
+  // If the service has been shut down, |check| should have been deleted.
+  DCHECK(checks_.find(check) != checks_.end());

   if (check->client && check->need_get_hash) {
     // We have a partial match so we need to query Google for the full hash.


crash--

crash--

svn path=/trunk/KDE/kdepim/; revision=639561

--- kode/kxforms/listmodel.cpp
+++ kode/kxforms/listmodel.cpp
@@ -152,6 +152,7 @@

 void ListModel::clear()
 {
-  removeRows( 0, rowCount() );
+  if( rowCount() > 0 )
+    removeRows( 0, rowCount() );
 }


add main

add main

--- ThreadsPool.cpp
+++ ThreadsPool.cpp
@@ -59,7 +59,9 @@
 			request_init(r);
 			r->content_size = buff_size;
 			r->content = read_buff;
+			std::cout<<"insert null"<<std::endl;
 			req_pool.insert(std::make_pair<int,Request*>(conn,r));
+			std::cout<<"insert null"<<std::endl;
 			return true;
 		}


log_stdio.cc: add missing switch block for kLogLevelNotice (#8951)

--- Firestore/core/src/util/log_stdio.cc
+++ Firestore/core/src/util/log_stdio.cc
@@ -56,6 +56,9 @@
     case kLogLevelError:
       level_word = "ERROR";
       break;
+    case kLogLevelNotice:
+      level_word = "INFO";
+      break;
     default:
       UNREACHABLE();
       break;


disable a failing test (ExtensionApiTest.Overrides)
TBR: tony

git-svn-id: http://src.chromium.org/svn/trunk/src@24800 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: f7e8e6cce50997c90ba5057e3cc9efadb83e48c8


Few fix in the old  filetransfer protocol (used to send)

Fix the progressbar (thanks to lilachaze)
CCMAIL: 84175-done@bugs.kde.org

Remove some deprecated method

Close the KIO when the transfer is finished.

svn path=/trunk/kdenetwork/kopete/; revision=334550

--- protocols/msn/msnfiletransfersocket.cpp
+++ protocols/msn/msnfiletransfersocket.cpp
@@ -31,6 +31,7 @@

 #include "kopetetransfermanager.h"
 #include "kopetecontact.h"
+#include "kopetemetacontact.h"
 #include "msnmessagemanager.h"
 #include "msnswitchboardsocket.h"

@@ -148,23 +149,32 @@
 	m_file=0L;
 	delete m_server;
 	m_server=0L;
-	if(m_kopeteTransfer && (m_downsize!=m_size  || m_downsize==0 ) )
-		m_kopeteTransfer->setError(KopeteTransfer::Other);
+	if(m_kopeteTransfer)
+	{
+		if( (m_downsize!=m_size  || m_downsize==0 ) )
+			m_kopeteTransfer->slotError(  KIO::ERR_UNKNOWN , i18n( "An unknown error occurred" ) );
+		else
+			m_kopeteTransfer->slotComplete();
+	}
 	emit done(this);
 }

 void MSNFileTransferSocket::slotReadBlock(const QByteArray &block)
 {
 	m_file->writeBlock( block.data(), block.size() );      // write to file
+
 	m_downsize+=block.size();
-	int percent=0;
-	if(m_size!=0)   percent=100*m_downsize/m_size;
-
-	if(m_kopeteTransfer) m_kopeteTransfer->slotProcessed(percent);
-	kdDebug(14140) << "MSNFileTransferSocket  -  " <<percent <<"% done"<<endl;
+	if(m_kopeteTransfer) m_kopeteTransfer->slotProcessed(m_downsize);
+	kdDebug(14140) << "MSNFileTransferSocket  -  " << m_downsize << " of " << m_size <<" done"<<endl;

 	if(m_downsize==m_size)
+	{
+		//the transfer seems to be finished.
 		sendCommand( "BYE" ,"16777989",false);
+		//  if we are not already disconected in 30 seconds, do it.
+		QTimer::singleShot( 30000 , this, SLOT(disconnect() ) );
+
+	}
 }

 void MSNFileTransferSocket::setKopeteTransfer(KopeteTransfer *kt)
@@ -197,7 +207,7 @@
 	if(!accept(m_server))
 	{
 		if( m_kopeteTransfer)
-			m_kopeteTransfer->setError(KopeteTransfer::Other);
+				m_kopeteTransfer->slotError(  KIO::ERR_UNKNOWN , i18n( "An unknown error occurred" ) );
 		emit done(this);
 	}
 }
@@ -209,7 +219,7 @@
 	kdDebug(14140) << "MSNFileTransferSocket::slotTimer: timeout "<<  endl;
 	if( m_kopeteTransfer)
 	{
-		m_kopeteTransfer->setError(KopeteTransfer::Timeout);
+		m_kopeteTransfer->slotError( KIO::ERR_CONNECTION_BROKEN , i18n( "Connection timed out" ) );
 	}

 	MSNMessageManager* manager=dynamic_cast<MSNMessageManager*>(m_contact->manager());
@@ -270,7 +280,12 @@
 {
 //	kdDebug(14140) <<"MSNFileTransferSocket::slotSendFile()" <<endl;
 	if( m_downsize >= m_size)
-		return;
+	{
+		//the transfer seems to be finished.
+		//  if we are not already disconected in 30 seconds, do it.
+		QTimer::singleShot( 30000 , this, SLOT(disconnect() ) );
+		return;
+	}

 	if(ready)
 	{
@@ -292,12 +307,10 @@

 		sendBytes(block);

-		int percent=0;
 		m_downsize+=bytesRead;
-		if(m_size!=0)   percent=100*m_downsize/m_size;
 		if(m_kopeteTransfer)
-			 m_kopeteTransfer->slotProcessed(percent);
-		kdDebug(14140) << "MSNFileTransferSocket::slotSendFile:  " <<percent <<"% done"<<endl;
+			 m_kopeteTransfer->slotProcessed(m_downsize);
+		kdDebug(14140) << "MSNFileTransferSocket::slotSendFile: " << m_downsize << " of " << m_size <<" done"<<endl;
 	}
 	ready=false;

@@ -363,7 +376,7 @@
 			unsigned long int auth = (rand()%(999999))+1;
 			setAuthCookie(QString::number(auth));

-			setKopeteTransfer(KopeteTransferManager::transferManager()->addTransfer(m_contact, fileName(), size(),  m_contact->displayName(), KopeteFileTransferInfo::Outgoing));
+			setKopeteTransfer(KopeteTransferManager::transferManager()->addTransfer(m_contact, fileName(), size(),  m_contact->metaContact() ? m_contact->metaContact()->displayName() : m_contact->contactId() , KopeteFileTransferInfo::Outgoing));

 			MSNMessageManager* manager=dynamic_cast<MSNMessageManager*>(m_contact->manager());
 			if(manager && manager->service())
@@ -390,7 +403,7 @@
 	{
 		MSNInvitation::parseInvitation(msg);
 		if( m_kopeteTransfer)
-			m_kopeteTransfer->setError(KopeteTransfer::CanceledRemote);
+			m_kopeteTransfer->slotError( KIO::ERR_ABORTED , i18n( "The remote user aborted" ) );
 		emit done(this);

 	}
@@ -427,7 +440,7 @@
 	else
 	{
 		if( m_kopeteTransfer)
-			m_kopeteTransfer->setError(KopeteTransfer::Other);
+			m_kopeteTransfer->slotError(  KIO::ERR_UNKNOWN , i18n( "An unknown error occurred" ) );
 		emit done(this);

 	}


Removed the printouts, those are handled by the perf-counter class

Signed-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>

--- vm/src/primitives/RVMPlugin.cpp
+++ vm/src/primitives/RVMPlugin.cpp
@@ -511,15 +511,15 @@
   lprintf( "Safepoint_Mutex: ");
   The_Squeak_Interpreter()->get_safepoint_mutex()->print_stats();

-  lprintf( "interpret_cycles = %lld,  multicore_interrupt_cycles = %lld, mi_cyc_1a = %lld, mi_cyc_1a1 = %lld, mi_cyc_1a2 = %lld, mi_cyc_1b = %lld, mi_cyc_1 = %lld\n",
+/*  lprintf( "interpret_cycles = %lld,  multicore_interrupt_cycles = %lld, mi_cyc_1a = %lld, mi_cyc_1a1 = %lld, mi_cyc_1a2 = %lld, mi_cyc_1b = %lld, mi_cyc_1 = %lld\n",
           The_Squeak_Interpreter()->interpret_cycles,  The_Squeak_Interpreter()->multicore_interrupt_cycles,
           The_Squeak_Interpreter()->mi_cyc_1a, The_Squeak_Interpreter()->mi_cyc_1a1, The_Squeak_Interpreter()->mi_cyc_1a2,
-          The_Squeak_Interpreter()->mi_cyc_1b, The_Squeak_Interpreter()->mi_cyc_1);
-
-  lprintf( "multicore_interrupt_check_count = %d, yield_request_count = %d, data_available_count = %d\n",
+          The_Squeak_Interpreter()->mi_cyc_1b, The_Squeak_Interpreter()->mi_cyc_1);*/
+
+/*  lprintf( "multicore_interrupt_check_count = %d, yield_request_count = %d, data_available_count = %d\n",
             The_Squeak_Interpreter()->multicore_interrupt_check_count,
           The_Squeak_Interpreter()->yield_request_count,
-          The_Squeak_Interpreter()->data_available_count);
+          The_Squeak_Interpreter()->data_available_count);*/

   int rank_on_threads_or_zero_on_processes = Memory_Semantics::rank_on_threads_or_zero_on_processes();

@@ -718,7 +718,7 @@
   The_Squeak_Interpreter()->primitiveFail();
   return 0;

-  // burrow down below OS_Interface level to avoid effect of Dont_Count_Cycles
+  // burrow down below OS_Interface level to avoid effect of Count_Cycles flag
 # elif On_Tilera
   cycles = ::get_cycle_count();


Fixed unused parameter warning.

Fixed unused parameter warning.

--- examples/osgvertexattributes/osgvertexattributes.cpp
+++ examples/osgvertexattributes/osgvertexattributes.cpp
@@ -105,7 +105,7 @@
             shader.setShaderSource(source);
         }

-        void convertFragmentShader(osg::Program& program, osg::Shader& shader)
+        void convertFragmentShader(osg::Program& /*program*/, osg::Shader& /*shader*/)
         {
         }


Removed compiler warnings

Removed compiler warnings

--- examples/texturecubemaparray/texturecubemaparray.cpp
+++ examples/texturecubemaparray/texturecubemaparray.cpp
@@ -309,7 +309,7 @@
 		sampler.mipLodBias = 0.0f;
 		sampler.compareOp = VK_COMPARE_OP_NEVER;
 		sampler.minLod = 0.0f;
-		sampler.maxLod = cubeMapArray.mipLevels;
+		sampler.maxLod = static_cast<float>(cubeMapArray.mipLevels);
 		sampler.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE;
 		sampler.maxAnisotropy = 1.0f;
 		if (vulkanDevice->features.samplerAnisotropy)
@@ -452,7 +452,7 @@
 			// Binding 1 : Fragment shader cubemap sampler
 			vks::initializers::writeDescriptorSet(descriptorSets.object, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, &textureDescriptor)
 		};
-		vkUpdateDescriptorSets(device, writeDescriptorSets.size(), writeDescriptorSets.data(), 0, NULL);
+		vkUpdateDescriptorSets(device, static_cast<uint32_t>(writeDescriptorSets.size()), writeDescriptorSets.data(), 0, nullptr);

 		// Sky box descriptor set
 		VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &allocInfo, &descriptorSets.skybox));
@@ -463,7 +463,7 @@
 			// Binding 1 : Fragment shader cubemap sampler
 			vks::initializers::writeDescriptorSet(descriptorSets.skybox, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, &textureDescriptor)
 		};
-		vkUpdateDescriptorSets(device, writeDescriptorSets.size(), writeDescriptorSets.data(), 0, NULL);
+		vkUpdateDescriptorSets(device, static_cast<uint32_t>(writeDescriptorSets.size()), writeDescriptorSets.data(), 0, nullptr);
 	}

 	void preparePipelines()
@@ -501,7 +501,7 @@
 		pipelineCreateInfo.pViewportState = &viewportState;
 		pipelineCreateInfo.pDepthStencilState = &depthStencilState;
 		pipelineCreateInfo.pDynamicState = &dynamicState;
-		pipelineCreateInfo.stageCount = shaderStages.size();
+		pipelineCreateInfo.stageCount = static_cast<uint32_t>(shaderStages.size());
 		pipelineCreateInfo.pStages = shaderStages.data();
 		pipelineCreateInfo.pVertexInputState = &vertexInputState;


Replacing code that was overwritten by merge with master

--- fem/fespace.cpp
+++ fem/fespace.cpp
@@ -503,16 +503,31 @@
       return R;
    }

-   const FiniteElement *h_fe = this -> GetFE (0);
-   const FiniteElement *l_fe = lfes -> GetFE (0);
+   bool mixedMesh = this->GetMesh()->GetElementBaseGeometry();
+
+   const FiniteElement *h_fe = NULL;
+   const FiniteElement *l_fe = NULL;
    IsoparametricTransformation T;
-   T.SetIdentityTransformation(h_fe->GetGeomType());
-   h_fe->Project(*l_fe, T, loc_restr);
+   if ( !mixedMesh )
+   {
+      h_fe = this -> GetFE (0);
+      l_fe = lfes -> GetFE (0);
+      T.SetIdentityTransformation(h_fe->GetGeomType());
+      h_fe->Project(*l_fe, T, loc_restr);
+   }

    for (int i = 0; i < mesh -> GetNE(); i++)
    {
       this -> GetElementDofs (i, h_dofs);
       lfes -> GetElementDofs (i, l_dofs);
+
+      if ( mixedMesh )
+      {
+         h_fe = this -> GetFE (i);
+         l_fe = lfes -> GetFE (i);
+         T.SetIdentityTransformation(h_fe->GetGeomType());
+         h_fe->Project(*l_fe, T, loc_restr);
+      }

       R -> SetSubMatrix (l_dofs, h_dofs, loc_restr, 1);
    }
@@ -1149,21 +1164,41 @@

    if (mesh->Dimension() == 3 && mesh->GetNE())
    {
-      // Here we assume that all faces in the mesh have the same base
-      // geometry -- the base geometry of the 0-th face element.
-      // The class Mesh assumes the same inside GetFaceBaseGeometry(...).
-      // Thus we do not need to generate all the faces in the mesh
-      // if we do not need them.
-      int fdof = fec->DofForGeometry(mesh->GetFaceBaseGeometry(0));
-      if (fdof > 0)
-      {
+      Geometry::Type face_geom = mesh->GetFaceBaseGeometry(-1);
+      MFEM_VERIFY(face_geom != Geometry::INVALID,
+                  "Invalid face geometry!");
+
+      if ( face_geom != Geometry::MIXED )
+      {
+         // All faces are the same type thus we do not need to generate
+         // all the faces in the mesh since we do not need them.
+         int fdof = fec->DofForGeometry(mesh->GetFaceBaseGeometry(0));
+         if (fdof > 0)
+         {
+            fdofs = new int[mesh->GetNFaces()+1];
+            fdofs[0] = 0;
+            for (int i = 0; i < mesh->GetNFaces(); i++)
+            {
+               nfdofs += fdof;
+               // nfdofs += fec->DofForGeometry(mesh->GetFaceBaseGeometry(i));
+               fdofs[i+1] = nfdofs;
+            }
+         }
+      }
+      else
+      {
+         // All faces are not the same type so we must query each face
+         // to determine its number of degrees of freedom
          fdofs = new int[mesh->GetNFaces()+1];
          fdofs[0] = 0;
          for (int i = 0; i < mesh->GetNFaces(); i++)
          {
-            nfdofs += fdof;
-            // nfdofs += fec->DofForGeometry(mesh->GetFaceBaseGeometry(i));
+            nfdofs += fec->DofForGeometry(mesh->GetFaceBaseGeometry(i));
             fdofs[i+1] = nfdofs;
+         }
+         if (nfdofs == 0)
+         {
+            delete fdofs; fdofs = NULL;
          }
       }
    }


#96957# new handling inserted for context menu and accessibility

--- dbaccess/source/ui/querydesign/querycontroller.cxx
+++ dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: querycontroller.cxx,v $
  *
- *  $Revision: 1.68 $
- *
- *  last change: $Author: fs $ $Date: 2002-02-04 13:46:56 $
+ *  $Revision: 1.69 $
+ *
+ *  last change: $Author: oj $ $Date: 2002-02-06 07:57:18 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -201,6 +201,9 @@
 #endif
 #ifndef DBAUI_TOOLS_HXX
 #include "UITools.hxx"
+#endif
+#ifndef DBAUI_QUERYTABLEVIEW_HXX
+#include "QueryTableView.hxx"
 #endif

 extern "C" void SAL_CALL createRegistryInfo_OQueryControl()
@@ -322,7 +325,10 @@
     {
         case ID_BROWSER_ESACPEPROCESSING:
             aReturn.aState = ::cppu::bool2any(!m_bEsacpeProcessing);
-            aReturn.bEnabled = m_pSqlIterator != NULL;
+            aReturn.bEnabled = m_pSqlIterator != NULL && !m_bDesign;
+            break;
+        case ID_REALTION_ADD_RELATION:
+            aReturn.bEnabled = m_bEditable && m_bDesign && m_vTableData.size() > 1;
             break;
         case ID_BROWSER_SAVEASDOC:
             aReturn.bEnabled = !m_bCreateView && (!m_bDesign || !(m_vTableFieldDesc.empty() || m_vTableData.empty()));
@@ -382,6 +388,13 @@
             // check we have a view and if we could saved it correctly
             if(m_bCreateView && !isModified())
                 closeTask();
+            break;
+        case ID_REALTION_ADD_RELATION:
+            {
+                OJoinDesignView* pView = getJoinView();
+                if( pView )
+                    static_cast<OQueryTableView*>(pView->getTableView())->createNewConnection();
+            }
             break;
         case SID_PRINTDOCDIRECT:
             break;
@@ -681,10 +694,19 @@
 void OQueryController::AddSupportedFeatures()
 {
     OJoinController::AddSupportedFeatures();
-    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:Copy")]        = ID_BROWSER_COPY;
-    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:Cut")]         = ID_BROWSER_CUT;
-    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:Paste")]       = ID_BROWSER_PASTE;
-    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:SaveAsDoc")]   = SID_SAVEASDOC;
+    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:Copy")]                = ID_BROWSER_COPY;
+    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:Cut")]                 = ID_BROWSER_CUT;
+    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:Paste")]               = ID_BROWSER_PASTE;
+    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:SaveAsDoc")]           = SID_SAVEASDOC;
+    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DB/EsacpeProcessing")] = ID_BROWSER_ESACPEPROCESSING;
+    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DB/ViewFunctions")]    = ID_BROWSER_QUERY_VIEW_FUNCTIONS;
+    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DB/ViewTables")]       = ID_BROWSER_QUERY_VIEW_TABLES;
+    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DB/ViewAliases")]      = ID_BROWSER_QUERY_VIEW_ALIASES;
+    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DB/DistinctValues")]   = ID_BROWSER_QUERY_DISTINCT_VALUES;
+    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DB/ChangeDesignMode")] = ID_BROWSER_SQL;
+    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DB/ClearQuery")]       = ID_BROWSER_CLEAR_QUERY;
+    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DB/ExecuteQuery")]     = ID_BROWSER_QUERY_EXECUTE;
+    m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DB/AddRelation")]      = ID_REALTION_ADD_RELATION;
 }
 // -----------------------------------------------------------------------------
 ToolBox* OQueryController::CreateToolBox(Window* _pParent)
@@ -1163,8 +1185,8 @@
         try
         {
             ::rtl::OUString aErrorMsg;
+
             ::connectivity::OSQLParseNode* pNode = m_pSqlParser->parseTree( aErrorMsg, m_sStatement, m_bDesign );
-            //  m_pParseNode = pNode;
             if(pNode)
             {
                 pNode->parseNodeToStr(  sTranslatedStmt,


INTEGRATION: CWS insight01 (1.2.110); FILE MERGED 2004/02/18 14:45:21 oj 1.2.110.1: #111075# fix rfcount problem

--- dbaccess/source/core/dataaccess/SharedConnection.cxx
+++ dbaccess/source/core/dataaccess/SharedConnection.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: SharedConnection.cxx,v $
  *
- *  $Revision: 1.2 $
- *
- *  last change: $Author: oj $ $Date: 2002-08-12 09:21:58 $
+ *  $Revision: 1.3 $
+ *
+ *  last change: $Author: hr $ $Date: 2004-08-02 15:06:11 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -61,6 +61,10 @@
 #ifndef DBA_CORE_SHARED_CONNECTION_HXX
 #include "SharedConnection.hxx"
 #endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+

 namespace dbaccess
 {
@@ -71,6 +75,25 @@
 //  using namespace ::com::sun::star::reflection;
 using namespace connectivity;

+DBG_NAME(OSharedConnection)
+OSharedConnection::OSharedConnection(Reference< XAggregation >& _rxProxyConnection)
+            : OSharedConnection_BASE(m_aMutex)
+{
+    DBG_CTOR(OSharedConnection,NULL);
+    setDelegation(_rxProxyConnection,m_refCount);
+}
+// -----------------------------------------------------------------------------
+OSharedConnection::~OSharedConnection()
+{
+    DBG_DTOR(OSharedConnection,NULL);
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL OSharedConnection::disposing(void)
+{
+    OSharedConnection_BASE::disposing();
+    OConnectionWrapper::disposing();
+}
+// -----------------------------------------------------------------------------
 Reference< XStatement > SAL_CALL OSharedConnection::createStatement(  ) throw(SQLException, RuntimeException)
 {
     ::osl::MutexGuard aGuard( m_aMutex );


Work around another bug in icc with static member templates of
template classes.

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@8660 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/deal.II/source/numerics/error_estimator.cc
+++ deal.II/deal.II/source/numerics/error_estimator.cc
@@ -648,10 +648,25 @@

 				   // split all cells into threads if
 				   // multithreading is used and run
-				   // the whole thing
+				   // the whole thing. use the
+				   // function pointer variable to
+				   // work around another nasty bug in
+				   // icc7
   Threads::ThreadGroup<> threads;
+  void (*estimate_some_ptr) (const Mapping<dim>                  &,
+			     const DoFHandler<dim>               &,
+			     const Quadrature<dim-1>             &,
+			     const typename FunctionMap<dim>::type &,
+			     const std::vector<const InputVector *> &,
+			     const std::vector<bool>               &,
+			     const Function<dim>                 *,
+			     const std::pair<unsigned int, unsigned int>,
+			     FaceIntegrals                       &,
+			     PerThreadData                       &)
+    = &KellyErrorEstimator<dim>::template estimate_some<InputVector>;
+
   for (unsigned int i=0; i<n_threads; ++i)
-    threads += Threads::spawn (&KellyErrorEstimator<dim>::template estimate_some<InputVector>)
+    threads += Threads::spawn (estimate_some_ptr)
                (mapping, dof_handler,
                 quadrature, neumann_bc, solutions,
                 component_mask, coefficients,


INTEGRATION: CWS ooo19126 (1.10.204); FILE MERGED 2005/09/05 17:32:15 rt 1.10.204.1: #i54170# Change license header: remove SISSL

--- dbaccess/source/core/dataaccess/commandcontainer.cxx
+++ dbaccess/source/core/dataaccess/commandcontainer.cxx
@@ -1,61 +1,35 @@
 /*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
  *
  *  $RCSfile: commandcontainer.cxx,v $
  *
- *  $Revision: 1.10 $
+ *  $Revision: 1.11 $
  *
- *  last change: $Author: hr $ $Date: 2004-08-02 15:06:59 $
+ *  last change: $Author: rt $ $Date: 2005-09-08 10:43:21 $
  *
- *  The Contents of this file are made available subject to the terms of
- *  either of the following licenses
- *
- *         - GNU Lesser General Public License Version 2.1
- *         - Sun Industry Standards Source License Version 1.1
- *
- *  Sun Microsystems Inc., October, 2000
- *
- *  GNU Lesser General Public License Version 2.1
- *  =============================================
- *  Copyright 2000 by Sun Microsystems, Inc.
- *  901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License version 2.1, as published by the Free Software Foundation.
- *
- *  This library 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 for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *  MA  02111-1307  USA
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
  *
  *
- *  Sun Industry Standards Source License Version 1.1
- *  =================================================
- *  The contents of this file are subject to the Sun Industry Standards
- *  Source License Version 1.1 (the "License"); You may not use this file
- *  except in compliance with the License. You may obtain a copy of the
- *  License at http://www.openoffice.org/license.html.
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
  *
- *  Software provided under this License is provided on an "AS IS" basis,
- *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- *  See the License for the specific provisions governing your rights and
- *  obligations concerning the Software.
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
  *
- *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *    This library 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 for more details.
  *
- *  Copyright: 2000 by Sun Microsystems, Inc.
- *
- *  All Rights Reserved.
- *
- *  Contributor(s): _______________________________________
- *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
  *
  ************************************************************************/


INTEGRATION: CWS imprec01 (1.7.12); FILE MERGED 2005/02/02 06:20:54 as 1.7.12.4: resolve conflicts after resync 2005/01/12 12:56:23 oj 1.7.12.3: #i39228# send document events 2005/01/11 13:59:33 oj 1.7.12.2: #i39228# send document events 2005/01/11 08:58:23 oj 1.7.12.1: #i39228# send document events

--- dbaccess/source/core/dataaccess/databasedocument.cxx
+++ dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: databasedocument.cxx,v $
  *
- *  $Revision: 1.8 $
- *
- *  last change: $Author: kz $ $Date: 2005-01-21 17:03:37 $
+ *  $Revision: 1.9 $
+ *
+ *  last change: $Author: rt $ $Date: 2005-02-02 14:01:30 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -99,6 +99,9 @@
 #endif
 #ifndef _URLOBJ_HXX
 #include <tools/urlobj.hxx>
+#endif
+#ifndef _COMPHELPER_MEDIADESCRIPTOR_HXX_
+#include <comphelper/mediadescriptor.hxx>
 #endif
 #ifndef _DRAFTS_COM_SUN_STAR_UI_XUICONFIGURATIONSTORAGE_HPP_
 #include <drafts/com/sun/star/ui/XUIConfigurationStorage.hpp>
@@ -213,7 +216,12 @@

     m_bDocumentReadOnly = sal_False;

-    m_aArgs = _aArguments;
+    static ::rtl::OUString s_sStatusIndicator(RTL_CONSTASCII_USTRINGPARAM("StatusIndicator"));
+    static ::rtl::OUString s_sInteractionHandler(RTL_CONSTASCII_USTRINGPARAM("InteractionHandler"));
+    ::comphelper::MediaDescriptor aMedia(_aArguments);
+    aMedia.erase(s_sStatusIndicator);
+    aMedia.erase(s_sInteractionHandler);
+    aMedia >> m_aArgs;
     m_sFileURL = _sURL;
     if ( !m_sName.getLength() )
         m_sName = m_sFileURL;
@@ -223,14 +231,15 @@

     try
     {
-        const PropertyValue* pValue =::std::find_if(m_aArgs.getConstArray(),
-                                                    m_aArgs.getConstArray() + m_aArgs.getLength(),
-                                                    ::std::bind2nd(::comphelper::TPropertyValueEqualFunctor(),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StatusIndicator"))));
+        const PropertyValue* pValue =::std::find_if(_aArguments.getConstArray(),
+                                                    _aArguments.getConstArray() + _aArguments.getLength(),
+                                                    ::std::bind2nd(::comphelper::TPropertyValueEqualFunctor(),s_sStatusIndicator));

         Sequence<Any> aFilterArgs;
-        if ( pValue && pValue != (m_aArgs.getConstArray() + m_aArgs.getLength()) )
-        {
-            Reference<XStatusIndicator> xStatusIndicator(pValue->Value,UNO_QUERY);
+        Reference<XStatusIndicator> xStatusIndicator;
+        if ( pValue && pValue != (_aArguments.getConstArray() + _aArguments.getLength()) )
+        {
+            xStatusIndicator.set(pValue->Value,UNO_QUERY);

             // set progress range and start status indicator
             sal_Int32 nProgressRange(1000000);
@@ -250,7 +259,9 @@
             xImporter->setTargetDocument(xComponent);
             Reference<XFilter> xFilter(xImporter,UNO_QUERY);

-            xFilter->filter(m_aArgs);
+            xFilter->filter(_aArguments);
+            if ( xStatusIndicator.is() )
+                xStatusIndicator->end();
         }
         else
             return sal_False;
@@ -263,6 +274,7 @@
     {
         return sal_False;
     }
+
     return sal_True;
 }
 // -----------------------------------------------------------------------------
@@ -383,6 +395,8 @@
         throw DisposedException();

     store(m_sFileURL,m_aArgs);
+
+    notifyEvent(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OnSaveDone")));
 }
 // -----------------------------------------------------------------------------
 void ODatabaseSource::store(const ::rtl::OUString& sURL, const Sequence< PropertyValue >& lArguments )
@@ -483,7 +497,8 @@

         }
         m_aArgs = lArguments;
-        store();
+        store(m_sFileURL,m_aArgs);
+        notifyEvent(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OnSaveAsDone")));
     }
     else
         throw IOException();
@@ -546,6 +561,7 @@
         m_bModified = _bModified;
         lang::EventObject aEvt(*this);
         NOTIFY_LISTERNERS(m_aModifyListeners,XModifyListener,modified)
+        notifyEvent(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OnModifyChanged")));
     }
 }
 // -----------------------------------------------------------------------------
@@ -837,11 +853,11 @@
     Reference<XStatusIndicator> xStatusIndicator;
     try
     {
-        const PropertyValue* pValue =::std::find_if(m_aArgs.getConstArray(),
-                                                    m_aArgs.getConstArray() + m_aArgs.getLength(),
+        const PropertyValue* pValue =::std::find_if(lArguments.getConstArray(),
+                                                    lArguments.getConstArray() + lArguments.getLength(),
                                                     ::std::bind2nd(::comphelper::TPropertyValueEqualFunctor(),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StatusIndicator"))));

-        if ( pValue && pValue != (m_aArgs.getConstArray() + m_aArgs.getLength()) )
+        if ( pValue && pValue != (lArguments.getConstArray() + lArguments.getLength()) )
         {
             xStatusIndicator.set(pValue->Value,UNO_QUERY);

@@ -1072,6 +1088,15 @@
     m_aFlushListeners.removeInterface(_xListener);
 }
 // -----------------------------------------------------------------------------
+void ODatabaseSource::notifyEvent(const ::rtl::OUString& _sEventName)
+{
+    if ( m_xDocEventBroadcaster.is() )
+    {
+        ::com::sun::star::document::EventObject aEvent(*this, _sEventName);
+        m_xDocEventBroadcaster->notifyEvent(aEvent);
+    }
+}
+// -----------------------------------------------------------------------------
 sal_Bool ODatabaseSource::commitEmbeddedStorage()
 {
     sal_Bool bStore = sal_False;
@@ -1091,6 +1116,7 @@
     }
     return bStore;
 }
+
 //........................................................................
 }   // namespace dbaccess
 //........................................................................


next try

next try

git-svn-id: 353be9ac11a1e711854a13efcc2fc17d9d6b83e7@2187 c36c8488-0289-0348-9b64-b301f74bd9a7

--- BrickCache.cpp
+++ BrickCache.cpp
@@ -32,15 +32,26 @@
   std::shared_ptr<GenericType> gt;
   size_t width;

+  TypeErase(const TypeErase& other)
+    : gt(other.gt)
+    , width(other.width)
+  {}
+
+  TypeErase(TypeErase&& other)
+    : gt(std::move(other.gt))
+    , width(other.width) // width should stay the same right?
+  {}
+
   // this isn't a very good type eraser, because we require that the type has
   // an internal typedef 'value_type' which we can use to obtain the size of
   // it.  not to mention the '.size()' member function that TypeEraser<>
   // requires, above.
   // But that's fine for our usage here; we're really just using this to store
   // vectors and erase the value_type in there anyway.
-  template<typename T> TypeErase(T& t):
-    gt(new TypeEraser<T>(std::forward<T>(t))),
-    width(sizeof(typename T::value_type)) {}
+  template<typename T> TypeErase(T&& t)
+    : gt(new TypeEraser<T>(std::forward<T>(t)))
+    , width(sizeof(typename T::value_type))
+  {}
 };

 struct BrickInfo {


Hopefully fix a bug in arrays that were accessed in the wrong order.

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@1370 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/deal.II/source/numerics/error_estimator.cc
+++ deal.II/deal.II/source/numerics/error_estimator.cc
@@ -317,11 +317,11 @@
     fe_face_values_cell.get_function_grads (solution, psi);
   else
     {
-      vector<vector<Tensor<1,dim> > > tmp (n_components,
-					   psi);
+      vector<vector<Tensor<1,dim> > > tmp (n_q_points,
+					   vector<Tensor<1,dim> >(n_components));
       fe_face_values_cell.get_function_grads (solution, tmp);
-
-      psi.swap (tmp[selected_component]);
+      for (unsigned int i=0; i<n_q_points; ++i)
+	psi[i] = tmp[i][selected_component];
     };

@@ -361,10 +361,11 @@
 	fe_face_values_neighbor.get_function_grads (solution, neighbor_psi);
       else
 	{
-	  vector<vector<Tensor<1,dim> > > tmp (n_components,
-					       neighbor_psi);
+	  vector<vector<Tensor<1,dim> > > tmp (n_q_points,
+					       vector<Tensor<1,dim> >(n_components));
 	  fe_face_values_neighbor.get_function_grads (solution, tmp);
-	  neighbor_psi.swap (tmp[selected_component]);
+	  for (unsigned int i=0; i<n_q_points; ++i)
+	    psi[i] = tmp[i][selected_component];
 	};

@@ -518,10 +519,11 @@
 	fe_subface_values.get_function_grads (solution, psi);
       else
 	{
-	  vector<vector<Tensor<1,dim> > > tmp (n_components,
-					       psi);
+	  vector<vector<Tensor<1,dim> > > tmp (n_q_points,
+					       vector<Tensor<1,dim> >(n_components));
 	  fe_subface_values.get_function_grads (solution, tmp);
-	  psi.swap (tmp[selected_component]);
+	  for (unsigned int i=0; i<n_q_points; ++i)
+	    psi[i] = tmp[i][selected_component];
 	};

 				       // restrict the finite element on the
@@ -533,10 +535,11 @@
 	fe_face_values.get_function_grads (solution, neighbor_psi);
       else
 	{
-	  vector<vector<Tensor<1,dim> > > tmp (n_components,
-					       neighbor_psi);
+	  vector<vector<Tensor<1,dim> > > tmp (n_q_points,
+					       vector<Tensor<1,dim> >(n_components));
 	  fe_face_values.get_function_grads (solution, tmp);
-	  neighbor_psi.swap (tmp[selected_component]);
+	  for (unsigned int i=0; i<n_q_points; ++i)
+	    psi[i] = tmp[i][selected_component];
 	};

 				       // compute the jump in the gradients


Element_Node XML print: correct XML escape of Name field

--- Source/MediaInfo/File__Analyze_Element.cpp
+++ Source/MediaInfo/File__Analyze_Element.cpp
@@ -384,7 +384,7 @@
                 }
                 else
                     Pos++;
-            }
+        }
     }

     if (ToReturn.empty())
@@ -727,11 +727,11 @@
         ss << "<d";

     {
-    size_t MustEscape = Xml_Name_Escape_MustEscape(Name);
+    size_t MustEscape = Xml_Content_Escape_MustEscape(Name);
     if (MustEscape != (size_t)-1)
     {
         std::string str;
-        Xml_Name_Escape(Name, str, MustEscape);
+        Xml_Content_Escape(Name, str, MustEscape);
         ss << " o=\"" << Pos << "\" n=\"" << str << "\"";
     }
     else
@@ -801,11 +801,11 @@
         ss << "<data";

     {
-    size_t MustEscape = Xml_Name_Escape_MustEscape(Name);
+    size_t MustEscape = Xml_Content_Escape_MustEscape(Name);
     if (MustEscape != (size_t)-1)
     {
         std::string str;
-        Xml_Name_Escape(Name, str, MustEscape);
+        Xml_Content_Escape(Name, str, MustEscape);
         ss << " offset=\"" << Pos << "\" name=\"" << str << "\"";
     }
     else


+ Amazon S3 support (REST API v2), fix for FTP

--- Source/MediaInfo/Reader/Reader_libcurl.cpp
+++ Source/MediaInfo/Reader/Reader_libcurl.cpp
@@ -206,11 +206,15 @@
     //Init
     if (!((Reader_libcurl::curl_data*)data)->Init_AlreadyDone)
     {
-        long http_code = 0;
-        if (curl_easy_getinfo (((Reader_libcurl::curl_data*)data)->Curl, CURLINFO_RESPONSE_CODE, &http_code)!=CURLE_OK || http_code != 200)
-        {
-            MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(((Reader_libcurl::curl_data*)data)->File_Name)+__T(", ")+Ztring().From_UTF8(string((char*)ptr, size*nmemb)));
-            return size*nmemb;
+        Http::Url File_URL=Http::Url(Ztring(((Reader_libcurl::curl_data*)data)->File_Name).To_UTF8());
+        if (File_URL.Protocol=="http" || File_URL.Protocol=="https")
+        {
+            long http_code = 0;
+            if (curl_easy_getinfo (((Reader_libcurl::curl_data*)data)->Curl, CURLINFO_RESPONSE_CODE, &http_code)!=CURLE_OK || http_code != 200)
+            {
+                MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(((Reader_libcurl::curl_data*)data)->File_Name)+__T(", ")+Ztring().From_UTF8(string((char*)ptr, size*nmemb)));
+                return size*nmemb;
+            }
         }
         double File_SizeD;
         CURLcode Result=curl_easy_getinfo(((Reader_libcurl::curl_data*)data)->Curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &File_SizeD);


Improve error message in OcclusionBuffer when width is not a power of two.

--- Source/Urho3D/Graphics/OcclusionBuffer.cpp
+++ Source/Urho3D/Graphics/OcclusionBuffer.cpp
@@ -79,7 +79,7 @@

     if (!IsPowerOfTwo((unsigned)width))
     {
-        URHO3D_LOGERROR("Width is not a power of two");
+        URHO3D_LOGERRORF("Requested occlusion buffer width %d is not a power of two", width);
         return false;
     }


FullScreenElementStack should not use confusingAndOftenMisusedAttached()

This code wants Document::isActive() instead.

Review URL: https://codereview.chromium.org/49663003

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@160791 bbb929c8-8fbe-4397-9dbb-9b2b20218538

--- Source/core/dom/FullscreenElementStack.cpp
+++ Source/core/dom/FullscreenElementStack.cpp
@@ -353,7 +353,7 @@

 void FullscreenElementStack::webkitWillEnterFullScreenForElement(Element* element)
 {
-    if (!document()->confusingAndOftenMisusedAttached())
+    if (!document()->isActive())
         return;

     ASSERT(element);
@@ -393,7 +393,7 @@
     if (!m_fullScreenElement)
         return;

-    if (!document()->confusingAndOftenMisusedAttached())
+    if (!document()->isActive())
         return;

     m_fullScreenElement->didBecomeFullscreenElement();
@@ -406,7 +406,7 @@
     if (!m_fullScreenElement)
         return;

-    if (!document()->confusingAndOftenMisusedAttached())
+    if (!document()->isActive())
         return;

     m_fullScreenElement->willStopBeingFullscreenElement();
@@ -417,7 +417,7 @@
     if (!m_fullScreenElement)
         return;

-    if (!document()->confusingAndOftenMisusedAttached())
+    if (!document()->isActive())
         return;

     m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false);


STYLE: Conform to VTK's formatting guidelines

Change-Id: I1e38aea8d0c88f675be87ded36268803dec2fa0a

--- Graphics/vtkDataSetSurfaceFilter.cxx
+++ Graphics/vtkDataSetSurfaceFilter.cxx
@@ -898,16 +898,15 @@

       if( checkVisibility && grid->IsCellVisible(inId) )
         {
-          outId = outPolys->InsertNextCell(4);
-          outPolys->InsertCellPoint(outPtId);
-          outPolys->InsertCellPoint(outPtId+cOutInc);
-          outPolys->InsertCellPoint(outPtId+cOutInc+1);
-          outPolys->InsertCellPoint(outPtId+1);
-          // Copy cell data.
-          outCD->CopyData(inCD,inId,outId);
-          this->RecordOrigCellId(outId, inId);
+        outId = outPolys->InsertNextCell(4);
+        outPolys->InsertCellPoint(outPtId);
+        outPolys->InsertCellPoint(outPtId+cOutInc);
+        outPolys->InsertCellPoint(outPtId+cOutInc+1);
+        outPolys->InsertCellPoint(outPtId+1);
+        // Copy cell data.
+        outCD->CopyData(inCD,inId,outId);
+        this->RecordOrigCellId(outId, inId);
         }
-
       }
     }


Added rectangle support for property values

layer.clippingBox = [ 2,54,56,4];
was failing

Change-Id: I5f438bbd24d169b5081a66635d14e459a5124e79

--- plugins/dali-script-v8/src/object/property-value-wrapper.cpp
+++ plugins/dali-script-v8/src/object/property-value-wrapper.cpp
@@ -724,6 +724,15 @@
       }
       break;
     }
+    case Dali::Property::RECTANGLE:
+    {
+      if( array.GetType() == Dali::Property::VECTOR4)
+      {
+        Vector4 vec4( array.Get<Vector4>());
+        daliPropertyValue = Property::Value(Rect<int>( vec4.x,vec4.y, vec4.z, vec4.w ));
+      }
+      break;
+    }
     case Dali::Property::ROTATION:
     {
       if( array.GetType() == Dali::Property::VECTOR4)


INTEGRATION: CWS warnings01 (1.9.28); FILE MERGED 2005/11/16 12:59:12 fs 1.9.28.2: #i57457# warning free code 2005/11/07 14:43:45 fs 1.9.28.1: #i57457# warning-free code

--- connectivity/source/drivers/mozab/MPreparedStatement.cxx
+++ connectivity/source/drivers/mozab/MPreparedStatement.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: MPreparedStatement.cxx,v $
  *
- *  $Revision: 1.9 $
- *
- *  last change: $Author: rt $ $Date: 2005-09-08 06:19:09 $
+ *  $Revision: 1.10 $
+ *
+ *  last change: $Author: hr $ $Date: 2006-06-20 01:43:52 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -63,6 +63,9 @@
 #endif
 #ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
 #include <com/sun/star/sdbc/ColumnValue.hpp>
+#endif
+#ifndef CONNECTIVITY_DIAGNOSE_EX_H
+#include "diagnose_ex.h"
 #endif

 #if OSL_DEBUG_LEVEL > 0
@@ -88,9 +91,9 @@

 OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const ::rtl::OUString& sql)
     :OStatement_BASE2(_pConnection)
+    ,m_nNumParams(0)
+    ,m_sSqlStatement(sql)
     ,m_bPrepared(sal_False)
-    ,m_sSqlStatement(sql)
-    ,m_nNumParams(0)
     ,m_pResultSet( NULL )
 {
 }
@@ -124,7 +127,7 @@
      ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
 {
     OSL_TRACE("in :: OPreparedStatement::parseSql()");
-    if (!OStatement_Base::parseSql( sql ))
+    if (!OStatement_Base::parseSql( sql, bAdjusted ))
         return sal_False;

     m_xParamColumns = new OSQLColumns();
@@ -149,7 +152,7 @@
 OResultSet* OPreparedStatement::createResultSet( )
 {
     OSL_TRACE("In/Out : OPreparedStatement::createResultSet( )");
-    return new OResultSet( this, m_aSQLIterator );
+    return new OResultSet( this, *m_pSQLIterator );
 }

 // -----------------------------------------------------------------------------
@@ -196,7 +199,7 @@
     if (m_pResultSet)
         bReadOnly = m_pResultSet->determineReadOnly();
     if(!m_xMetaData.is())
-        m_xMetaData = new OResultSetMetaData( m_aSQLIterator.getSelectColumns(), m_aSQLIterator.getTables().begin()->first ,m_pTable,bReadOnly );
+        m_xMetaData = new OResultSetMetaData( m_pSQLIterator->getSelectColumns(), m_pSQLIterator->getTables().begin()->first ,m_pTable,bReadOnly );
     return m_xMetaData;
 }
 // -------------------------------------------------------------------------
@@ -275,62 +278,62 @@
 }
 // -------------------------------------------------------------------------

-void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool x ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date& aData ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-
-
-void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time& aVal ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const DateTime& aVal ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 aVal ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 sqlType ) throw(SQLException, RuntimeException)
+void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 /*parameterIndex*/, sal_Bool /*x*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setBoolean", *this );
+}
+// -------------------------------------------------------------------------
+void SAL_CALL OPreparedStatement::setByte( sal_Int32 /*parameterIndex*/, sal_Int8 /*x*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setByte", *this );
+}
+// -------------------------------------------------------------------------
+
+void SAL_CALL OPreparedStatement::setDate( sal_Int32 /*parameterIndex*/, const Date& /*aData*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setDate", *this );
+}
+// -------------------------------------------------------------------------
+
+
+void SAL_CALL OPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const Time& /*aVal*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setTime", *this );
+}
+// -------------------------------------------------------------------------
+
+void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 /*parameterIndex*/, const DateTime& /*aVal*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setTimestamp", *this );
+}
+// -------------------------------------------------------------------------
+
+void SAL_CALL OPreparedStatement::setDouble( sal_Int32 /*parameterIndex*/, double /*x*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setDouble", *this );
+}
+
+// -------------------------------------------------------------------------
+
+void SAL_CALL OPreparedStatement::setFloat( sal_Int32 /*parameterIndex*/, float /*x*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setFloat", *this );
+}
+// -------------------------------------------------------------------------
+
+void SAL_CALL OPreparedStatement::setInt( sal_Int32 /*parameterIndex*/, sal_Int32 /*x*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setInt", *this );
+}
+// -------------------------------------------------------------------------
+
+void SAL_CALL OPreparedStatement::setLong( sal_Int32 /*parameterIndex*/, sal_Int64 /*aVal*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setLong", *this );
+}
+// -------------------------------------------------------------------------
+
+void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 /*sqlType*/ ) throw(SQLException, RuntimeException)
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(OStatement_BASE::rBHelper.bDisposed);
@@ -341,37 +344,37 @@
 }
 // -------------------------------------------------------------------------

-void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Reference< XClob >& x ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Reference< XBlob >& x ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Reference< XArray >& x ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Reference< XRef >& x ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName ) throw(SQLException, RuntimeException)
+void SAL_CALL OPreparedStatement::setClob( sal_Int32 /*parameterIndex*/, const Reference< XClob >& /*x*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setClob", *this );
+}
+// -------------------------------------------------------------------------
+
+void SAL_CALL OPreparedStatement::setBlob( sal_Int32 /*parameterIndex*/, const Reference< XBlob >& /*x*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setBlob", *this );
+}
+// -------------------------------------------------------------------------
+
+void SAL_CALL OPreparedStatement::setArray( sal_Int32 /*parameterIndex*/, const Reference< XArray >& /*x*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setArray", *this );
+}
+// -------------------------------------------------------------------------
+
+void SAL_CALL OPreparedStatement::setRef( sal_Int32 /*parameterIndex*/, const Reference< XRef >& /*x*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setRef", *this );
+}
+// -------------------------------------------------------------------------
+
+void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 /*parameterIndex*/, const Any& /*x*/, sal_Int32 /*sqlType*/, sal_Int32 /*scale*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setObjectWithInfo", *this );
+}
+// -------------------------------------------------------------------------
+
+void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& /*typeName*/ ) throw(SQLException, RuntimeException)
 {
     setNull(parameterIndex,sqlType);
 }
@@ -383,28 +386,28 @@
 }
 // -------------------------------------------------------------------------

-void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-
-
-void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
-{
-    ::dbtools::throwInvalidIndexException(*this);
+void SAL_CALL OPreparedStatement::setShort( sal_Int32 /*parameterIndex*/, sal_Int16 /*x*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setShort", *this );
+}
+// -------------------------------------------------------------------------
+
+void SAL_CALL OPreparedStatement::setBytes( sal_Int32 /*parameterIndex*/, const Sequence< sal_Int8 >& /*x*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setBytes", *this );
+}
+// -------------------------------------------------------------------------
+
+
+void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 /*parameterIndex*/, const Reference< ::com::sun::star::io::XInputStream >& /*x*/, sal_Int32 /*length*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setCharacterStream", *this );
+}
+// -------------------------------------------------------------------------
+
+void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 /*parameterIndex*/, const Reference< ::com::sun::star::io::XInputStream >& /*x*/, sal_Int32 /*length*/ ) throw(SQLException, RuntimeException)
+{
+    ::dbtools::throwFeatureNotImplementedException( "XParameters::setBinaryStream", *this );
 }
 // -------------------------------------------------------------------------

@@ -461,13 +464,16 @@
 //------------------------------------------------------------------
 sal_uInt32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Reference<XPropertySet>& _xCol)
 {
-
+    OSL_UNUSED( pParameter );
     // Nr. des neu hinzuzufuegenden Parameters:
     sal_uInt32 nParameter = m_xParamColumns->size()+1;

     OSL_ENSURE(SQL_ISRULE(pParameter,parameter),"OResultSet::AddParameter: Argument ist kein Parameter");
     OSL_ENSURE(pParameter->count() > 0,"OResultSet: Fehler im Parse Tree");
+#if OSL_DEBUG_LEVEL > 0
     OSQLParseNode * pMark = pParameter->getChild(0);
+    OSL_UNUSED( pMark );
+#endif

     ::rtl::OUString sParameterName;

@@ -499,7 +505,7 @@
                                                     ,sal_False
                                                     ,sal_False
                                                     ,sal_False
-                                                    ,m_aSQLIterator.isCaseSensitive());
+                                                    ,m_pSQLIterator->isCaseSensitive());
     m_xParamColumns->push_back(xParaColumn);
     return nParameter;
 }
@@ -511,7 +517,7 @@
     if(SQL_ISRULE(_pNode,column_ref))
     {
         ::rtl::OUString sColumnName,sTableRange;
-        m_aSQLIterator.getColumnRange(_pNode,sColumnName,sTableRange);
+        m_pSQLIterator->getColumnRange(_pNode,sColumnName,sTableRange);
         if(sColumnName.getLength())
         {
             Reference<XNameAccess> xNameAccess = _xTable->getColumns();
@@ -531,7 +537,7 @@
     if(aParseNodes.size())
     {
         m_xParamColumns = new OSQLColumns();
-        const OSQLTables& xTabs = m_aSQLIterator.getTables();
+        const OSQLTables& xTabs = m_pSQLIterator->getTables();
         if(xTabs.size())
         {
             OSQLTable xTable = xTabs.begin()->second;


add Getters; week4 complete

add Getters; week4 complete

--- etc/Point.cpp
+++ etc/Point.cpp
@@ -38,4 +38,10 @@
         double length() const {
             return sqrt(*this * *this):
         }
+        double getX() const {
+            return x;
+        }
+        double getY() const {
+            return y;
+        }
 };


works for 2cores, baseline, w/ file

works for 2cores, baseline, w/ file

--- pintool/BufferManager.cpp
+++ pintool/BufferManager.cpp
@@ -14,43 +14,78 @@

 handshake_container_t* BufferManager::front(THREADID tid)
 {
+  checkFirstAccess(tid);
+  return queueFronts_[tid];
+}
+
+handshake_container_t* BufferManager::back(THREADID tid)
+{
+  checkFirstAccess(tid);
+  assert(queueSizes_[tid] > 0);
+
+  if(queueBacks_[tid] != NULL) {
+    return queueBacks_[tid];
+  }
+
+  // if only one element in queue, it will be in queueFronts,
+  // even though it is back()
+  assert(queueFronts_[tid] != NULL);
+  return queueFronts_[tid];
+}
+
+bool BufferManager::empty(THREADID tid)
+{
   checkFirstAccess(tid);
-  return handshake_buffer_[tid].front();
-}
-
-handshake_container_t* BufferManager::back(THREADID tid)
-{
-  checkFirstAccess(tid);
-  return handshake_buffer_[tid].back();
-}
-
-bool BufferManager::empty(THREADID tid)
-{
-  checkFirstAccess(tid);
+  return queueSizes_[tid] == 0;
   return handshake_buffer_[tid].empty();
 }

 void BufferManager::push(THREADID tid, handshake_container_t* handshake)
 {
   checkFirstAccess(tid);
-  handshake_buffer_[tid].push(handshake);
+  if(queueSizes_[tid] == 0) {
+    queueFronts_[tid] = handshake;
+  }
+  else if(queueSizes_[tid] == 1) {
+    queueBacks_[tid] = handshake;
+  }
+  else {
+    assert(queueBacks_[tid] != NULL);
+    pushToFile(tid, &(queueBacks_[tid]));
+    queueBacks_[tid] = handshake;
+  }
+
+  queueBacks_[tid] = handshake;
+  queueSizes_[tid]++;
 }

 void BufferManager::pop(THREADID tid)
 {
-  checkFirstAccess(tid);
-  handshake_buffer_[tid].pop();
+  checkFirstAccess(tid);
+  assert(queueSizes_[tid] > 0);
+
+  if(queueSizes_[tid] == 1) {
+    queueFronts_[tid] = NULL;
+  }
+  else if(queueSizes_[tid] == 2) {
+    queueFronts_[tid] = queueBacks_[tid];
+    queueBacks_[tid] = NULL;
+  }
+  else {
+    popFromFile(tid, &(queueFronts_[tid]));
+  }
+
+  queueSizes_[tid]--;
 }

 bool BufferManager::hasThread(THREADID tid)
 {
-  checkFirstAccess(tid);
-  return handshake_buffer_.count(tid) != 0;
+  return (queueSizes_.count(tid) != 0);
 }

 unsigned int BufferManager::size()
 {
-  return handshake_buffer_.size();
+  return queueSizes_.size();
 }

 void BufferManager::nullifyFront(THREADID tid)
@@ -66,12 +101,22 @@
 void BufferManager::checkFirstAccess(THREADID tid)
 {
   if(queueSizes_.count(tid) == 0) {
-    handshake_container_t* new_handshake;
-
+    char str[50];
+    sprintf(str, "%d", tid);
+
+    fileNames_[tid] = tempnam("/dev/shm/", "sima");
+    bogusFileNames_[tid] = tempnam("/dev/shm/", "simb");
+
+    system(("/bin/rm -f " + fileNames_[tid]).c_str());
+    system(("/bin/touch " + fileNames_[tid]).c_str());
+    system(("/bin/chmod 777 " + fileNames_[tid]).c_str());
+
     queueSizes_[tid] = 0;
-
+    queueFronts_[tid] = NULL;
+    queueBacks_[tid] = NULL;
+
     for (int i=0; i < 2000; i++) {
-      new_handshake = new handshake_container_t();
+      handshake_container_t* new_handshake = new handshake_container_t();
       if (i > 0) {
 	new_handshake->isFirstInsn = false;
       }
@@ -80,12 +125,14 @@
       }
       handshake_pool_[tid].push(new_handshake);
     }
+
+    locks_[tid] = new pthread_mutex_t();
+    pthread_mutex_init(locks_[tid], 0);
   }
 }

 void BufferManager::pushToFile(THREADID tid, handshake_container_t** handshake)
 {
-  assert(false);
   pthread_mutex_lock(locks_[tid]);
   pipeWriters_[tid] = open(fileNames_[tid].c_str(), O_WRONLY | O_APPEND);
   if(pipeWriters_[tid] == -1) {
@@ -94,6 +141,7 @@
     abort();
   }

+  cerr << "Pushing to file!" << endl;
   realPush(tid, handshake);

   close(pipeWriters_[tid]);
@@ -102,7 +150,6 @@

 void BufferManager::realPush(THREADID tid, handshake_container_t** handshake)
 {
-  assert(false);
   int bytesWritten = write(pipeWriters_[tid], &((*handshake)->handshake), sizeof(P2Z_HANDSHAKE));
   if(bytesWritten == -1) {
     cerr << "Pipe write error: " << bytesWritten << " Errcode:" << strerror(errno) << endl;
@@ -144,7 +191,8 @@

 void BufferManager::popFromFile(THREADID tid, handshake_container_t** handshake)
 {
-    assert(false);
+  cerr << "Pop from file!" << endl;
+
   pthread_mutex_lock(locks_[tid]);
   system(("/bin/rm -f " + bogusFileNames_[tid]).c_str());
   system(("/bin/touch " + bogusFileNames_[tid]).c_str());
@@ -273,10 +321,9 @@
     PIN_Yield();
     GetLock(&simbuffer_lock, tid+1);
     spins++;
-    if(spins >= 7000000000LL) {
+    if(spins >= 70000LL) {
       cerr << "[getPooledHandshake()]: That's a lot of spins!" << endl;
       spins = 0;
-      //assert(false);
     }
   }


Disable TaskManagerBrowserTest.ShutdownWhileOpen on Linux
Crashes, see bug.

BUG=92297
TEST=TaskManagerBrowserTest.ShutdownWhileOpen
TBR=yoshiki@chromium.org

Review URL: http://codereview.chromium.org/8343002

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@106073 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/task_manager/task_manager_browsertest.cc
+++ chrome/browser/task_manager/task_manager_browsertest.cc
@@ -59,7 +59,7 @@

 // Flaky crashes on ChromeOS (triggers pure virtual function call), see
 // http://crbug.com/92297 for details
-#if defined(OS_CHROMEOS) || defined(OS_MACOSX)
+#if defined(OS_CHROMEOS) || defined(OS_MACOSX) || defined(OS_LINUX)
 #define MAYBE_ShutdownWhileOpen DISABLED_ShutdownWhileOpen
 #else
 #define MAYBE_ShutdownWhileOpen ShutdownWhileOpen


yes, I did...

yes, I did...

svn path=/trunk/kdepim/; revision=331001

--- kontact/src/mainwindow.cpp
+++ kontact/src/mainwindow.cpp
@@ -498,7 +498,7 @@
       for ( it = mPlugins.begin(); it != mPlugins.end(); ++it ) {
         action = (*it)->newActions()->first();
         if ( action ) {
-          mNewActions->setIconSet( action->iconSet() );
+          mNewActions->setIcon( action->icon() );
           mNewActions->setText( action->text() );
           break;
         }


Show X button on DevTools window in undocked mode.

BUG=46408
TEST=See bug description.

Review URL: http://codereview.chromium.org/2882007

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@51391 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/views/frame/opaque_browser_frame_view.cc
+++ chrome/browser/views/frame/opaque_browser_frame_view.cc
@@ -954,22 +954,6 @@

 void OpaqueBrowserFrameView::LayoutWindowControls() {
   bool is_maximized = frame_->GetWindow()->IsMaximized();
-#if defined(OS_CHROMEOS)
-  minimize_button_->SetVisible(!is_maximized);
-  restore_button_->SetVisible(!is_maximized);
-  maximize_button_->SetVisible(!is_maximized);
-  close_button_->SetVisible(!is_maximized);
-  if (is_maximized) {
-    // Set the bounds of the minimize button so that we don't have to change
-    // other places that rely on the bounds. Put it slightly to the right
-    // of the edge of the view, so that when we remove the spacing it lines
-    // up with the edge.
-    minimize_button_->SetBounds(
-        width() - FrameBorderThickness() + kNewTabCaptionMaximizedSpacing, 0, 0,
-        0);
-    return;
-  }
-#endif
   close_button_->SetImageAlignment(views::ImageButton::ALIGN_LEFT,
                                    views::ImageButton::ALIGN_BOTTOM);
   int caption_y = CaptionButtonY();
@@ -983,6 +967,28 @@
       right_extra_width - close_button_size.width(), caption_y,
       close_button_size.width() + right_extra_width,
       close_button_size.height());
+
+#if defined(OS_CHROMEOS)
+  minimize_button_->SetVisible(!is_maximized);
+  restore_button_->SetVisible(!is_maximized);
+  maximize_button_->SetVisible(!is_maximized);
+
+  if (browser_view_->browser()->type() == Browser::TYPE_DEVTOOLS)
+    close_button_->SetVisible(true);
+  else
+    close_button_->SetVisible(!is_maximized);
+
+  if (is_maximized) {
+    // Set the bounds of the minimize button so that we don't have to change
+    // other places that rely on the bounds. Put it slightly to the right
+    // of the edge of the view, so that when we remove the spacing it lines
+    // up with the edge.
+    minimize_button_->SetBounds(
+        width() - FrameBorderThickness() + kNewTabCaptionMaximizedSpacing, 0, 0,
+        0);
+    return;
+  }
+#endif

   // When the window is restored, we show a maximized button; otherwise, we show
   // a restore button.


Disable SyncSetupWizardTest again.

Disable SyncSetupWizardTest again.

TBR=cmp
BUG=19002

Review URL: http://codereview.chromium.org/165400

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@23213 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

--- chrome/browser/views/sync/sync_setup_wizard_unittest.cc
+++ chrome/browser/views/sync/sync_setup_wizard_unittest.cc
@@ -1,6 +1,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.

+// TODO(timsteele): Re-enable ASAP.  http://crbug.com/19002
+#if 0
 #ifdef CHROME_PERSONALIZATION

 #include "testing/gtest/include/gtest/gtest.h"
@@ -342,4 +344,4 @@
 }

 #endif  // CHROME_PERSONALIZATION
-
+#endif


Demo uses now new GraphicsContextDC and own text routines.

svn path=/trunk/; revision=8464

--- examples/c++/wxPLplotDemo.cpp
+++ examples/c++/wxPLplotDemo.cpp
@@ -155,7 +155,8 @@
 	// add the wxPLplot
 	wxPanel* panel = new wxPanel( this );
 	wxBoxSizer* box = new wxBoxSizer( wxVERTICAL );
-	plotwindow = new wxPLplotwindow( panel, -1, wxDefaultPosition, wxDefaultSize, 0, wxPLPLOT_BACKEND_GC );
+	plotwindow = new wxPLplotwindow( panel, -1, wxDefaultPosition, wxDefaultSize, 0,
+                                   wxPLPLOT_BACKEND_GC | wxPLPLOT_DRAW_TEXT );

 	box->Add( plotwindow, 1, wxALL | wxEXPAND, 0 );
   panel->SetSizer( box );


Gamepad: Add support for "2Axes 8Keys".

Gamepad: Add support for "2Axes 8Keys".

This patch adds support for the unbranded controller which identifies
itself as "2Axes 8Keys Game Pad". It's a SNES controller clone.

I tested this change with the "Gamepad Example" from NaCl and all
buttons appear to work correctly.

BUG=180881

Review URL: https://chromiumcodereview.appspot.com/12621002

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@186804 0039d316-1c4b-4281-b951-d872f2087c98

--- content/browser/gamepad/gamepad_standard_mappings_win.cc
+++ content/browser/gamepad/gamepad_standard_mappings_win.cc
@@ -78,6 +78,24 @@
   mapped->axesLength = 0;
 }

+void Mapper2Axes8Keys(
+    const WebKit::WebGamepad& input,
+    WebKit::WebGamepad* mapped) {
+  *mapped = input;
+  mapped->buttons[kButtonLeftTrigger] = 0;  // Not present
+  mapped->buttons[kButtonRightTrigger] = 0;  // Not present
+  mapped->buttons[8] = input.buttons[6];
+  mapped->buttons[9] = input.buttons[7];
+  mapped->buttons[kButtonLeftThumbstick] = 0;  // Not present
+  mapped->buttons[kButtonRightThumbstick] = 0;  // Not present
+  mapped->buttons[12] = AxisNegativeAsButton(input.axes[1]);
+  mapped->buttons[13] = AxisPositiveAsButton(input.axes[1]);
+  mapped->buttons[14] = AxisNegativeAsButton(input.axes[0]);
+  mapped->buttons[15] = AxisPositiveAsButton(input.axes[0]);
+  mapped->buttonsLength = 16;
+  mapped->axesLength = 0;
+}
+
 struct MappingData {
   const char* const vendor_id;
   const char* const product_id;
@@ -87,6 +105,7 @@
   { "0079", "0006", MapperDragonRiseGeneric },  // DragonRise Generic USB
   { "046d", "c216", MapperLogitechDualAction },  // Logitech DualAction
   { "046d", "c21a", MapperLogitechPrecision },  // Logitech Precision
+  { "12bd", "d012", Mapper2Axes8Keys },  // 2Axes 8Keys Game Pad
 };

 }  // namespace