Index: sfx2/source/appl/app.src
===================================================================
RCS file: /cvs/framework/sfx2/source/appl/app.src,v
retrieving revision 1.88
diff -u -r1.88 app.src
--- sfx2/source/appl/app.src	17 Jul 2003 13:14:26 -0000	1.88
+++ sfx2/source/appl/app.src	20 Aug 2003 21:36:38 -0000
@@ -3657,6 +3657,14 @@
 		};
 		ToolBoxItem
 		{
+			Identifier = SID_ATTR_ZOOM ;
+		};
+		ToolBoxItem
+		{
+			Type = TOOLBOXITEM_SEPARATOR ;
+		};
+		ToolBoxItem
+		{
 			Identifier = SID_CLOSEDOC;
 			Hide = TRUE;
 		};
Index: svx/inc/helpid.hrc
===================================================================
RCS file: /cvs/graphics/svx/inc/helpid.hrc,v
retrieving revision 1.38
diff -u -r1.38 helpid.hrc
--- svx/inc/helpid.hrc	30 Apr 2003 08:23:57 -0000	1.38
+++ svx/inc/helpid.hrc	17 Aug 2003 16:31:26 -0000
@@ -768,6 +768,7 @@
 #define HID_SVX_NEW_TOOLBAR_ITEM                    (HID_SVX_EXT0_START + 184)
 #define HID_SVX_CONFIG_MENU_LISTBOX                 (HID_SVX_EXT0_START + 185)
 #define HID_SVX_OPTIONS_ONLINEUPDATE                (HID_SVX_EXT0_START + 186)
+#define HID_ZOOM_COMBOBOX                           (HID_SVX_EXT0_START + 187)
 
 // please adjust ACT_SVX_HID_END2 below if you add entries here!
 
@@ -806,7 +806,7 @@
 #endif
 
 // overrun check 2
-#define ACT_SVX_HID_END2        HID_SVX_OPTIONS_ONLINEUPDATE
+#define ACT_SVX_HID_END2        HID_ZOOM_COMBOBOX
 
 #if ACT_SVX_HID2_END > HID_SVX_EXT0_END
 #error resource overrun in #line, #file
Index: svx/source/tbxctrls/tbcontrl.src
===================================================================
RCS file: /cvs/graphics/svx/source/tbxctrls/tbcontrl.src,v
retrieving revision 1.35
diff -u -r1.35 tbcontrl.src
--- svx/source/tbxctrls/tbcontrl.src	17 Jul 2003 11:33:35 -0000	1.35
+++ svx/source/tbxctrls/tbcontrl.src	17 Aug 2003 16:31:38 -0000
@@ -263,6 +263,16 @@
 	Border = TRUE ;
 	Hide = TRUE ;
 };
+ComboBox RID_SVXTBX_ZOOM
+{
+	HelpId = HID_ZOOM_COMBOBOX ;
+	Size = MAP_APPFONT ( 30 , 86 ) ;
+	DropDown = TRUE ;
+	AutoHScroll = TRUE ;
+	DDExtraWidth = TRUE ;
+	Border = TRUE ;
+	Hide = TRUE ;
+};
 String RID_SVXSTR_EXTRAS_CHARBACKGROUND
 {
 	Text = "Zeichenhintergrund" ;

--- sw/source/ui/app/swmodule.cxx	2003-07-07 18:10:23.000000000 +0200
+++ sw/source/ui/app/swmodule.cxx	2003-08-13 22:52:29.000000000 +0200
@@ -121,6 +121,9 @@
 #ifndef _SVX_VERT_TEXT_TBXCTRL_HXX
 #include <svx/verttexttbxctrl.hxx>
 #endif
+#ifndef _SVX_ZOOMTBXCTRL_HXX
+#include <svx/zoomtbxctrl.hxx>
+#endif
 #ifndef _CONTDLG_HXX_ //autogen
 #include <svx/contdlg.hxx>
 #endif
@@ -573,6 +576,7 @@
 	SvxFontSizeMenuControl::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT, pMod );
 
 	SwZoomControl::RegisterControl(SID_ATTR_ZOOM, pMod );
+	SvxZoomToolBoxControl::RegisterControl(SID_ATTR_ZOOM, pMod);
     SwPreviewZoomControl::RegisterControl(FN_PREVIEW_ZOOM, pMod);
 	SwHyperlinkControl::RegisterControl(FN_STAT_HYPERLINKS, pMod );
 	SvxPosSizeStatusBarControl::RegisterControl(0, pMod );

Index: sw/source/ui/uiview/pview.src
===================================================================
RCS file: /cvs/sw/sw/source/ui/uiview/pview.src,v
retrieving revision 1.28
diff -u -r1.28 pview.src
--- sw/source/ui/uiview/pview.src	17 Jul 2003 12:04:56 -0000	1.28
+++ sw/source/ui/uiview/pview.src	20 Aug 2003 21:47:00 -0000
@@ -1043,11 +1043,6 @@
             Identifier = SID_ZOOM_IN;
             HelpID = SID_ZOOM_IN ;
         };
-        ToolBoxItem
-		{
-			Identifier = FN_PREVIEW_ZOOM;
-			HelpID = HID_PREVIEW_ZOOM ;
-		};
 		ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
 		ToolBoxItem
 		{
Index: sc/source/ui/app/scdll.cxx
===================================================================
RCS file: /cvs/sc/sc/source/ui/app/scdll.cxx,v
retrieving revision 1.14
diff -u -r1.14 scdll.cxx
--- sc/source/ui/app/scdll.cxx	26 Mar 2003 18:05:47 -0000	1.14
+++ sc/source/ui/app/scdll.cxx	18 Aug 2003 19:08:47 -0000
@@ -105,6 +105,7 @@
 #include <svx/selctrl.hxx>
 #include <svx/insctrl.hxx>
 #include <svx/zoomctrl.hxx>
+#include <svx/zoomtbxctrl.hxx>
 #include <svx/flditem.hxx>
 #include <svx/modctrl.hxx>
 #include <svx/pszctrl.hxx>
@@ -243,6 +244,7 @@
 	SvxInsertStatusBarControl		::RegisterControl(SID_ATTR_INSERT,		pMod);
 	SvxSelectionModeControl			::RegisterControl(SID_STATUS_SELMODE,	pMod);
 	SvxZoomStatusBarControl			::RegisterControl(SID_ATTR_ZOOM,		pMod);
+	SvxZoomToolBoxControl			::RegisterControl(SID_ATTR_ZOOM,		pMod);
 	SvxModifyControl 				::RegisterControl(SID_DOC_MODIFIED,		pMod);
 	SvxPosSizeStatusBarControl		::RegisterControl(SID_ATTR_SIZE,		pMod);
 
Index: sd/source/ui/app/sddll2.cxx
===================================================================
RCS file: /cvs/graphics/sd/source/ui/app/sddll2.cxx,v
retrieving revision 1.10
diff -u -r1.10 sddll2.cxx
--- sd/source/ui/app/sddll2.cxx	13 Sep 2002 13:42:54 -0000	1.10
+++ sd/source/ui/app/sddll2.cxx	18 Aug 2003 19:03:03 -0000
@@ -114,6 +114,9 @@
 #ifndef _SVX_ZOOMCTRL_HXX //autogen
 #include <svx/zoomctrl.hxx>
 #endif
+#ifndef _SVX_ZOOMTBXCTRL_HXX //autogen
+#include <svx/zoomtbxctrl.hxx>
+#endif
 #ifndef _SVX_PSZCTRL_HXX //autogen
 #include <svx/pszctrl.hxx>
 #endif
@@ -242,6 +245,7 @@
 
 	// StatusBarControls registrieren
 	SvxZoomStatusBarControl::RegisterControl( SID_ATTR_ZOOM, pMod );
+	SvxZoomToolBoxControl::RegisterControl( SID_ATTR_ZOOM, pMod );
 	SvxPosSizeStatusBarControl::RegisterControl( SID_ATTR_SIZE, pMod );
 	SvxModifyControl::RegisterControl( SID_DOC_MODIFIED, pMod );
 	//SvxInsertStatusBarControl::RegisterControl(0, pModd);
Index: starmath/source/smdll.cxx
===================================================================
RCS file: /cvs/sw/starmath/source/smdll.cxx,v
retrieving revision 1.5
diff -u -r1.5 smdll.cxx
--- starmath/source/smdll.cxx	12 Oct 2001 15:54:37 -0000	1.5
+++ starmath/source/smdll.cxx	18 Aug 2003 19:10:56 -0000
@@ -73,6 +73,9 @@
 #ifndef _SVX_ZOOMCTRL_HXX //autogen
 #include <svx/zoomctrl.hxx>
 #endif
+#ifndef _SVX_ZOOMTBXCTRL_HXX //autogen
+#include <svx/zoomtbxctrl.hxx>
+#endif
 #ifndef _SFX_OBJFAC_HXX
 #include <sfx2/docfac.hxx>
 #endif
@@ -147,6 +150,7 @@
 	SmViewShell::RegisterInterface(pp);
 
 	SvxZoomStatusBarControl::RegisterControl( SID_ATTR_ZOOM, pp );
+	SvxZoomToolBoxControl::RegisterControl( SID_ATTR_ZOOM, pp );
 	SvxModifyControl::RegisterControl( SID_TEXTSTATUS, pp );
 	SvxUndoRedoControl::RegisterControl( SID_UNDO, pp );
 	SvxUndoRedoControl::RegisterControl( SID_REDO, pp );
Index: svx/prj/d.lst
===================================================================
RCS file: /cvs/graphics/svx/prj/d.lst,v
retrieving revision 1.74
diff -u -3 -p -r1.74 d.lst
--- svx/prj/d.lst	29 Apr 2003 16:30:00 -0000	1.74
+++ svx/prj/d.lst	19 Aug 2003 15:25:12 -0000
@@ -487,6 +487,7 @@ hedabu: ..\inc\xexch.hxx %_DEST%\inc%_EX
 hedabu: ..\inc\zoom.hxx %_DEST%\inc%_EXT%\svx\zoom.hxx
 hedabu: ..\inc\zoomctrl.hxx %_DEST%\inc%_EXT%\svx\zoomctrl.hxx
 hedabu: ..\inc\zoomitem.hxx %_DEST%\inc%_EXT%\svx\zoomitem.hxx
+hedabu: ..\inc\zoomtbxctrl.hxx %_DEST%\inc%_EXT%\svx\zoomtbxctrl.hxx
 hedabu: ..\source\items\boxobj.hxx %_DEST%\inc%_EXT%\svx\boxobj.hxx
 hedabu: ..\inc\itemtype.hxx %_DEST%\inc%_EXT%\svx\itemtype.hxx
 hedabu: ..\inc\outliner.hxx %_DEST%\inc%_EXT%\svx\outliner.hxx

--- sfx2/inc/sfxsids.hrc	2005-02-07 22:41:53.005932054 -0800
+++ sfx2/inc/sfxsids.hrc	2005-02-07 22:42:55.732927520 -0800
@@ -1114,6 +1116,7 @@
 
 #define SID_SVX_START                       (SID_LIB_START +   0)
 
+#define SID_ATTR_ZOOM                       (SID_SVX_START +   0)
 #define SID_ATTR_CHAR                       (SID_SVX_START +   6)
 #define SID_ATTR_CHAR_FONT                  (SID_SVX_START +   7)
 #define SID_ATTR_CHAR_POSTURE               (SID_SVX_START +   8)

--- svx/inc/svxids.hrc	8 Sep 2005 19:01:37 -0000	1.102
+++ svx/inc/svxids.hrc	24 Oct 2005 14:48:34 -0000
@@ -434,7 +434,7 @@
 // --------------------------------------------------------------------------
 
 
-#define SID_ATTR_ZOOM                                   ( SID_SVX_START + 0 )
+//#define SID_ATTR_ZOOM                                   ( SID_SVX_START + 0 )     -> sfxsids.hrc
 #define SID_ATTR_BRUSH                                  ( SID_SVX_START + 1 )
 #define SID_ATTR_TABSTOP                                ( SID_SVX_START + 2 )
 #define SID_ATTR_TABSTOP_DEFAULTS                       ( SID_SVX_START + 3 )

--- svx/source/tbxctrls/makefile.mk	2005-02-10 21:18:28.391273964 -0800
+++ svx/source/tbxctrls/makefile.mk	2005-02-10 21:18:58.339248608 -0800
@@ -97,7 +97,8 @@
         $(SLO)$/tbxdrctl.obj    \
         $(SLO)$/verttexttbxctrl.obj \
         $(SLO)$/toolbarmenu.obj \
-        $(SLO)$/tbxcolor.obj
+        $(SLO)$/tbxcolor.obj	\
+	$(SLO)$/zoomtbxctrl.obj	
 
 SRS1NAME=$(TARGET)
 SRC1FILES = \

--- svx/source/dialog/zoom.src	2004-06-25 17:36:12.000000000 +0530
+++ svx/source/dialog/zoom.src	2005-03-29 14:29:01.000000000 +0530
@@ -75,26 +75,17 @@
 	{
         Pos = MAP_APPFONT ( 12 , 14 ) ;
 		Size = MAP_APPFONT ( 80 , 10 ) ;
-		Text [ de ] = "~Ganze Seite" ;
-		Text [ en-US ] = "~Entire Page" ;
-		Text [ x-comment ] = " ";
 	};
 	RadioButton BTN_PAGE_WIDTH
 	{
         Pos = MAP_APPFONT ( 12 , 27 ) ;
 		Size = MAP_APPFONT ( 80 , 10 ) ;
-		Text [ de ] = "Seiten~breite" ;
-		Text [ en-US ] = "~Page Width" ;
-		Text [ x-comment ] = " ";
 	};
 	RadioButton BTN_OPTIMAL
 	{
         Pos = MAP_APPFONT ( 12 , 40 ) ;
 		Size = MAP_APPFONT ( 80 , 10 ) ;
-		Text [ de ] = "~Optimal" ;
-		Text [ en-US ] = "~Optimal" ;
-		Text [ x-comment ] = " ";
 	};
 	RadioButton BTN_200
 	{

--- svx/source/dialog/zoom.cxx	2005-01-21 22:26:06.000000000 +0530
+++ svx/source/dialog/zoom.cxx	2005-03-29 17:57:10.766137558 +0530
@@ -291,7 +291,11 @@
 	aOKBtn.SetClickHdl( LINK( this, SvxZoomDialog, OKHdl ) );
 	aUserEdit.SetModifyHdl( LINK( this, SvxZoomDialog, SpinHdl ) );
 
+	aOptimalBtn.SetText( String( SVX_RESSTR ( RID_SVX_ZOOM_OPTIMAL  ) ) );
+	aPageWidthBtn.SetText( String( SVX_RESSTR ( RID_SVX_ZOOM_PAGEWIDTH ) ) );
+	aWholePageBtn.SetText( String( SVX_RESSTR ( RID_SVX_ZOOM_WHOLEPAGE  ) ) );
+
 	// Default-Werte
 	USHORT nValue = 100;
 	USHORT nMin = 10;

--- svx/inc/dialogs.hrc	2005-02-02 19:27:13.000000000 +0530
+++ svx/inc/dialogs.hrc	2005-03-29 14:16:08.000000000 +0530
@@ -243,6 +243,8 @@
 
 // fuer ToolboxControl-Style
 #define RID_SVXTBX_STYLE                    (RID_SVX_START + 120)
+// for Zoom Toolbox Control
+#define RID_SVXTBX_ZOOM						(RID_SVX_START + 121)
 
 #define RID_SVXDLG_HYPERLINK                (RID_SVX_START + 140)
 #define RID_SVXDLG_PASSWORD					(RID_SVX_START + 141)
@@ -1133,6 +1135,11 @@
 #define RID_SVXSTR_COLOR_CONFIG_SAVE2       (RID_SVX_START + 854)
 #define RID_SVXSTR_COLOR_CONFIG_DELETE      (RID_SVX_START + 855)
 
+// Zoom ComboBox Strings
+#define RID_SVX_ZOOM_PAGEWIDTH					(RID_SVX_START + 856)
+#define RID_SVX_ZOOM_WHOLEPAGE					(RID_SVX_START + 857)
+#define RID_SVX_ZOOM_OPTIMAL					(RID_SVX_START + 858)
+
 // Accessibility strings.  The actual string ids are defined in
 // svx/inc/accessibility.hrc, the strings are defined in
 // svx/source/accessibility/accessibility.src

--- svx/source/tbxctrls/tbcontrl.src	2005-03-30 13:53:11.000000000 +0530
+++ svx/source/tbxctrls/tbcontrl.src	2005-03-29 14:28:57.000000000 +0530
@@ -165,6 +165,33 @@
     Text [ de ] = "Seiten";
     Text [ en-US ] = "Pages";
 };
+String RID_SVX_ZOOM_WHOLEPAGE
+{
+	Text [ de ] = "~Ganze Seite" ;
+	Text [ en-US ] = "~Entire Page" ;
+   Text [ cs ] = "Celá stránka" ;
+   Text [ sk ] = "Celá strana" ;
+	Text [ x-comment ] = " ";
+
+};
+String RID_SVX_ZOOM_PAGEWIDTH
+{
+	Text [ de ] = "Seiten~breite" ;
+	Text [ en-US ] = "~Page Width" ;
+   Text [ cs ] = "Šířka stránky" ;
+   Text [ sk ] = "Šírka strany" ;
+	Text [ x-comment ] = " ";
+
+};
+String RID_SVX_ZOOM_OPTIMAL
+{
+	Text [ de ] = "~Optimal" ;
+	Text [ en-US ] = "~Optimal" ;
+   Text [ cs ] = "Optimální" ;
+   Text [ sk ] = "Optimálny" ;
+	Text [ x-comment ] = " ";
+
+};
 Image RID_SVXIMG_GRAF_RED
 {
 	ImageBitmap = Bitmap { File = "sc10865.bmp" ; };

--- /dev/null	2004-08-25 23:04:59.000000000 +0530
+++ svx/source/tbxctrls/zoomtbxctrl.cxx	2005-04-01 15:02:35.346989875 +0530
@@ -0,0 +1,291 @@
+/*************************************************************************
+ *
+ *  $RCSfile: zoom-combobox.diff,v $
+ *
+ *  $Revision: 1.13 $
+ *
+ *  last change: $Author: rvojta $ $Date: 2006/10/02 13:54:29 $
+ *
+ *  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
+ *
+ *
+ *  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.
+ *
+ *  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.
+ *
+ *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ *  Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ *  All Rights Reserved.
+ *
+ *  Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
+
+#ifndef _SV_TOOLBOX_HXX
+#include <vcl/toolbox.hxx>
+#endif
+#ifndef _SFXAPP_HXX
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SFXVIEWSH_HXX
+#include <sfx2/viewsh.hxx>
+#endif
+#ifndef _SV_COMBOBOX_HXX
+#include <vcl/combobox.hxx>
+#endif
+                       
+#include "dialogs.hrc"
+
+#include "zoomtbxctrl.hxx"
+#include "zoomitem.hxx"
+#include "dialmgr.hxx"
+
+#define MINZOOM 20
+#define MAXZOOM 600
+#define DEFAULT_ZOOM 100
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::frame;
+
+using namespace ::com::sun::star::frame;
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxZoomToolBoxControl, SvxZoomItem);
+
+class SvxZoomBox_Impl : public ComboBox
+{
+    USHORT          nSlotId;
+    BOOL            bRelease;
+    OUString          maWholePage;
+    OUString          maOptimal;
+    OUString          maPageWidth;
+
+    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xDispatchProvider;
+
+public:
+    SvxZoomBox_Impl( Window* pParent, USHORT nSlot, const Reference< XDispatchProvider >& rDispatchProvider );
+    ~SvxZoomBox_Impl();
+
+protected:
+    virtual void    Select();
+    virtual long    Notify( NotifyEvent& rNEvt );
+
+    void ReleaseFocus();
+
+};
+
+static String RemoveTilda( USHORT nId )
+{
+    return String( SVX_RESSTR ( nId ) ).EraseAllChars('~');
+}
+
+SvxZoomBox_Impl::SvxZoomBox_Impl( 
+    Window* pParent, 
+    USHORT nSlot, 
+    const Reference< XDispatchProvider >& rDispatchProvider ):
+    ComboBox( pParent, SVX_RES(RID_SVXTBX_ZOOM)),
+    nSlotId(nSlot),
+    bRelease(TRUE),
+    m_xDispatchProvider( rDispatchProvider ),
+    maPageWidth( RemoveTilda ( RID_SVX_ZOOM_PAGEWIDTH ) ),
+    maOptimal( RemoveTilda ( RID_SVX_ZOOM_OPTIMAL  ) ),
+    maWholePage( RemoveTilda ( RID_SVX_ZOOM_WHOLEPAGE ) )
+{
+	EnableAutocomplete( FALSE );
+	USHORT aZoomValues[] =
+	    {25, 50, 75, 100, 150, 200 };
+	for(USHORT i = 0; i < sizeof(aZoomValues)/sizeof(USHORT); i++)
+	{
+	String sEntry = String::CreateFromInt32( aZoomValues[i] );
+	sEntry += '%';
+	InsertEntry( sEntry );
+	}
+	InsertEntry( maPageWidth );
+	InsertEntry( maOptimal );
+	InsertEntry( maWholePage );
+}
+
+SvxZoomBox_Impl::~SvxZoomBox_Impl()
+{}
+
+void    SvxZoomBox_Impl::Select()
+{
+    if ( !IsTravelSelect() )
+    {
+        String sEntry( GetText() );
+        sEntry.EraseAllChars( '%' );
+	SvxZoomType ZoomType; 
+        USHORT nZoom = DEFAULT_ZOOM;
+	if( maWholePage == OUString( sEntry ) )
+	{
+	    nSlotId = SID_SIZE_PAGE;
+	    ZoomType = SVX_ZOOM_WHOLEPAGE;
+	}
+	else if( maPageWidth == OUString( sEntry ) )
+	{
+	    nSlotId = SID_SIZE_PAGE_WIDTH;
+	    ZoomType = SVX_ZOOM_PAGEWIDTH;
+	}
+	else if( maOptimal == OUString( sEntry ) )
+	{
+	    nSlotId = SID_SIZE_ALL;
+	    ZoomType = SVX_ZOOM_OPTIMAL;
+	}
+	else
+	{
+	    nZoom = (USHORT)sEntry.ToInt32();
+	    if(nZoom < MINZOOM)
+		nZoom = MINZOOM;
+	    if(nZoom > MAXZOOM)
+		nZoom = MAXZOOM;
+
+	    nSlotId =  SID_ATTR_ZOOM;
+	    ZoomType = SVX_ZOOM_PERCENT;
+	}
+
+	SvxZoomItem aItem ( ZoomType , nZoom, nSlotId );
+	Any a;
+	Sequence< PropertyValue > aArgs( 1 );
+	aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Zoom" ));
+	aItem.QueryValue( a );
+	aArgs[0].Value = a;
+	SfxToolBoxControl::Dispatch( 
+	    m_xDispatchProvider,
+	    rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Zoom" )),
+	    aArgs );
+    }
+    ReleaseFocus();
+}
+
+
+long SvxZoomBox_Impl::Notify( NotifyEvent& rNEvt )
+{
+    long nHandled = 0;
+    if ( rNEvt.GetType() == EVENT_KEYINPUT )
+    {
+        USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
+        switch ( nCode )
+        {
+            case KEY_RETURN:
+            case KEY_TAB:
+            {
+                if ( KEY_TAB == nCode )
+                    bRelease = FALSE;
+                else
+                    nHandled = 1;
+                Select();
+                break;
+            }
+
+            case KEY_ESCAPE:
+                SetText( GetSavedValue() );
+                ReleaseFocus();
+                break;
+        }
+    }
+    else if ( EVENT_LOSEFOCUS == rNEvt.GetType() )
+    {
+        Window* pFocusWin = Application::GetFocusWindow();
+        if ( !HasFocus() && GetSubEdit() != pFocusWin )
+            SetText( GetSavedValue() );
+    }
+
+    return nHandled ? nHandled : ComboBox::Notify( rNEvt );
+}
+
+void SvxZoomBox_Impl::ReleaseFocus()
+{
+    if ( !bRelease )
+    {
+        bRelease = TRUE;
+        return;
+    }
+    SfxViewShell* pCurSh = SfxViewShell::Current();
+
+    if ( pCurSh )
+    {
+        Window* pShellWnd = pCurSh->GetWindow();
+
+        if ( pShellWnd )
+            pShellWnd->GrabFocus();
+    }
+}
+
+SvxZoomToolBoxControl::SvxZoomToolBoxControl(  USHORT          nSlotID,
+    USHORT          nID,
+    ToolBox&        rBox  )
+:  SfxToolBoxControl( nSlotID, nID, rBox )
+{
+}
+
+SvxZoomToolBoxControl::~SvxZoomToolBoxControl()
+{
+}
+
+void SvxZoomToolBoxControl::StateChanged( USHORT nSID,
+                                         SfxItemState eState,
+                                         const SfxPoolItem* pState )
+{
+    USHORT nId = GetId();
+    GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) );
+    SvxZoomBox_Impl* pBox = (SvxZoomBox_Impl*)GetToolBox().GetItemWindow( GetId() );
+    if(SFX_ITEM_AVAILABLE <= eState)
+    {  
+        String sZoom(String::CreateFromInt32(((const SvxZoomItem*)pState)->GetValue()));
+        sZoom += '%';
+        pBox->SetText(sZoom);
+        pBox->SaveValue();
+    }
+}    
+
+Window* SvxZoomToolBoxControl::CreateItemWindow( Window *pParent )
+{
+
+    SvxZoomBox_Impl* pRet = new SvxZoomBox_Impl( pParent, GetSlotId(), Reference< XDispatchProvider >( m_xFrame->getController(), UNO_QUERY ));
+    
+    return pRet;
+}

--- /dev/null	2004-08-25 23:04:59.000000000 +0530
+++ svx/inc/zoomtbxctrl.hxx	2005-04-07 16:50:49.483537921 +0530
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *	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
+ *
+ *
+ *	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.
+ *
+ *	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.
+ *
+ *	The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ *	Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ *	All Rights Reserved.
+ *
+ *	Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_ZOOMTBXCTRL_HXX
+#define _SVX_ZOOMTBXCTRL_HXX
+
+#ifndef _SFXTBXCTRL_HXX
+#include <sfx2/tbxctrl.hxx>
+#endif
+
+#ifndef INCLUDED_SVXDLLAPI_H
+#include <svx/svxdllapi.h>
+#endif
+
+class SVX_DLLPUBLIC SvxZoomToolBoxControl : public SfxToolBoxControl
+{
+public:
+	SFX_DECL_TOOLBOX_CONTROL();
+
+	SvxZoomToolBoxControl(  USHORT          nSlotID,
+    USHORT          nID,
+    ToolBox&        rBox
+     );
+	~SvxZoomToolBoxControl();
+
+	virtual void	StateChanged( USHORT nSID,
+								  SfxItemState eState,
+								  const SfxPoolItem* pState );
+
+	virtual Window*	CreateItemWindow( Window *pParent );
+};
+
+#endif // _SVX_ZOOMTBXCTRL_HXX
