--- svx.orig/inc/msocximex.hxx	2006-10-12 12:46:13.000000000 +0100
+++ svx/inc/msocximex.hxx	2006-11-03 15:06:55.000000000 +0000
@@ -1309,6 +1309,28 @@ public:
 };
 
 
+class OCX_ProgressBar : public OCX_Control
+{
+public:
+	explicit            OCX_ProgressBar();
+	
+	static OCX_Control* Create();
+	
+	virtual sal_Bool    Read( SvStorageStream *pS );
+	virtual sal_Bool Import(com::sun::star::uno::Reference<
+			com::sun::star::beans::XPropertySet> &rPropSet);
+        // No Font record
+	virtual sal_Bool ReadFontData(SvStorageStream* /*pS*/) { return sal_True; }
+private:
+	sal_uInt16	nIdentifier;
+	sal_uInt16	nFixedAreaLen;
+	sal_uInt32      nMax;
+	sal_uInt32      nMin;   
+	sal_uInt8	pBlockFlags[4];
+	bool		b3d;
+	bool		bFixedSingle;
+	bool		bEnabled;
+};
 
 class OCX_SpinButton : public OCX_Control
 {

--- svx.orig/source/msfilter/msocximex.cxx	2006-10-12 13:59:04.000000000 +0100
+++ svx/source/msfilter/msocximex.cxx	2006-11-03 15:52:21.000000000 +0000
@@ -620,6 +626,7 @@ static const ::sal_uInt16 TOGGLEBUTTON =
 static const ::sal_uInt16 SCROLLBAR = (sal_uInt16)0x2F;
 
 static const ::sal_uInt16 MULTIPAGE = (sal_uInt16)0x39;
+static const ::sal_uInt16 PROGRESSBAR = (sal_uInt16)0x8000;
 
 typedef std::vector< ContainerRecord > ContainerRecordList;
 
@@ -698,6 +705,11 @@ class ContainerRecReader
                 ReadAlign( pS, pS->Tell() - nStartPos, 4 );
                 *pS >> nTipLen;
             }
+
+            sal_uInt32 nCntrlIdLen = 0;
+            if( nContentFlags & 0x00001000 )
+                *pS >> nCntrlIdLen;
+
             // length of control source name
             sal_uInt32 nCtrlSrcLen = 0;
             if( nContentFlags & 0x00002000 )
@@ -737,6 +749,13 @@ class ContainerRecReader
                 ReadAlign( pS, pS->Tell() - nStartPos, 4 );
                 pS->SeekRel( nTipBufSize );
             }
+            // control id
+            sal_uInt32 nCntrlIdSize = lclGetBufferSize( nCntrlIdLen );
+            if( nCntrlIdSize > 0 )
+            {
+                ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+                pS->SeekRel( nCntrlIdSize );
+            }
             // control source name
             sal_uInt32 nCtrlSrcBufSize = lclGetBufferSize( nCtrlSrcLen );
             if( nCtrlSrcBufSize > 0 )
@@ -3553,6 +3572,9 @@ bool OCX_ContainerControl::createFromCon
             case SCROLLBAR: //ScrollBar
                 pControl = new OCX_ScrollBar;
                 break;
+            case PROGRESSBAR: //ProgressBar Active X control
+                pControl = new OCX_ProgressBar;
+                break;
             default:
                 OSL_TRACE( "**** Unknown control 0x%x", record.nTypeIdent );
                 DBG_ERROR( "Unknown control");
@@ -4447,7 +4486,9 @@ OCX_map aOCXTab[] =
     {&OCX_ScrollBar::Create,"DFD181E0-5E2F-11CE-a449-00aa004a803d",
         form::FormComponentType::SCROLLBAR,"ScrollBar"},
 	{&OCX_GroupBox::Create,"",
-		form::FormComponentType::GROUPBOX,""}
+		form::FormComponentType::GROUPBOX,""},
+	{&OCX_ProgressBar::Create,"",
+		form::FormComponentType::CONTROL,""},
 };
 
 const int NO_OCX = sizeof( aOCXTab ) / sizeof( *aOCXTab );
@@ -5893,6 +5934,65 @@ sal_Bool OCX_ScrollBar::WriteContents(
     return WriteData( *rObj );
 }
 
+OCX_ProgressBar::OCX_ProgressBar() :
+    OCX_Control( OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressBar" ) ) ), nIdentifier( 0 ), nFixedAreaLen( 0 ), nMax( 0 ), nMin( 0 ), b3d( true ), bFixedSingle(true), bEnabled( true )
+{
+	msDialogType = C2U("com.sun.star.awt.UnoControlProgressBarModel");
+	bSetInDialog = true;
+}
+
+sal_Bool
+OCX_ProgressBar::Read( SvStorageStream *pS )
+{
+	*pS >> nIdentifier;
+	*pS >> nFixedAreaLen;    // ahem its definitely not a FixedAreaLen
+	pS->Read(pBlockFlags,4); // and this looks more like an id
+	*pS >> nWidth;
+	*pS >> nHeight;
+	pS->SeekRel( 0xC ); 
+
+	float fMin,fMax;
+	*pS >> fMin;
+	*pS >> fMax;
+	nMax = static_cast< sal_Int32 >( fMax );
+	nMin = static_cast< sal_Int32 >( fMin );
+	bool bVisible = true;
+	sal_uInt8 pUnknownFlags[4];
+	pS->Read(pUnknownFlags,4);
+
+	// complete guess, but we don't handle visible anyway
+	if ( ( pUnknownFlags[2] & 0x8 ) &&  (  pUnknownFlags[2] & 0x2 ) )
+		bVisible = false;
+         
+	sal_uInt8	fMiscFlags; // appearance, borderstyle & enabled
+	*pS >>  fMiscFlags;
+
+	// seems these work out
+	bFixedSingle = (fMiscFlags&0x01);
+	bEnabled = (fMiscFlags&0x02)>>1;
+	b3d = (fMiscFlags&0x04)>>2;
+       	 
+	return true;
+}
+
+OCX_Control* OCX_ProgressBar::Create()
+{
+    return new OCX_ProgressBar;
+}
+
+sal_Bool OCX_ProgressBar::Import(uno::Reference< beans::XPropertySet > &rPropSet)
+{
+	uno::Any aTmp(&sName,getCppuType((OUString *)0));
+	rPropSet->setPropertyValue( WW8_ASCII2STR("Name"), aTmp );
+	aTmp <<= nMax;
+	rPropSet->setPropertyValue( WW8_ASCII2STR("ProgressValueMax"), aTmp );
+	aTmp <<= nMin;
+	rPropSet->setPropertyValue( WW8_ASCII2STR("ProgressValueMin"), aTmp );
+	
+	if ( !bEnabled )
+		rPropSet->setPropertyValue( WW8_ASCII2STR("Enabled"), uno::makeAny( sal_False ) );
+	return sal_True;
+}
 // ============================================================================
 
 /* vi:set tabstop=4 shiftwidth=4 expandtab: */
