Index: sfx2/inc/sfxsids.hrc =================================================================== RCS file: /cvs/framework/sfx2/inc/sfxsids.hrc,v retrieving revision 1.50 diff -u -r1.50 sfxsids.hrc --- sfx2/inc/sfxsids.hrc 16 May 2003 14:14:50 -0000 1.50 +++ sfx2/inc/sfxsids.hrc 20 Aug 2003 21:41:32 -0000 @@ -1141,6 +1141,7 @@ #define SID_HYPERLINK_SETLINK (SID_SVX_START + 362) #define SID_ZOOM (SID_SVX_START + 289) +#define SID_ATTR_ZOOM (SID_SVX_START + 0) #define SID_ZOOM_TOOLBOX (SID_SVX_START + 96) #define SID_ZOOM_OUT (SID_SVX_START + 97) #define SID_ZOOM_IN (SID_SVX_START + 98) 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; }; cvs server: Diffing svx cvs server: Diffing svx/inc Index: svx/inc/dialogs.hrc =================================================================== RCS file: /cvs/graphics/svx/inc/dialogs.hrc,v retrieving revision 1.48 diff -u -r1.48 dialogs.hrc --- svx/inc/dialogs.hrc 17 Apr 2003 17:39:50 -0000 1.48 +++ svx/inc/dialogs.hrc 17 Aug 2003 16:31:10 -0000 @@ -248,6 +248,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) 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 @@ -526,6 +526,7 @@ #define HID_HANGULDLG_BUTTON_CHANGEALL (HID_SVX_EXT0_START + 25) #define HID_SPLDLG_EDIT_NEWWORD (HID_SVX_EXT0_START + 26) #define HID_HANGULDLG_EDIT_NEWWORD (HID_SVX_EXT0_START + 27) +#define HID_ZOOM_COMBOBOX (HID_SVX_EXT0_START + 28) // ----------------------------------------------------------------------- @@ -540,7 +541,7 @@ // overrun check 2 -#define ACT_SVX_HID_END2 HID_OPTIONS_CTL +#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/makefile.mk =================================================================== RCS file: /cvs/graphics/svx/source/tbxctrls/makefile.mk,v retrieving revision 1.4 diff -u -r1.4 makefile.mk --- svx/source/tbxctrls/makefile.mk 2 May 2001 12:17:05 -0000 1.4 +++ svx/source/tbxctrls/makefile.mk 17 Aug 2003 16:31:32 -0000 @@ -102,7 +102,8 @@ $(SLO)$/tbxalign.obj \ $(SLO)$/tbxdraw.obj \ $(SLO)$/tbxdrctl.obj \ - $(SLO)$/verttexttbxctrl.obj + $(SLO)$/verttexttbxctrl.obj \ + $(SLO)$/zoomtbxctrl.obj SRCFILES = \ colrctrl.src \ 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" ; --- /dev/null 2003-02-11 15:36:20.000000000 +0100 +++ svx/inc/zoomtbxctrl.hxx 2003-08-17 18:25:11.000000000 +0200 @@ -0,0 +1,83 @@ +/************************************************************************* + * + * $RCSfile$ + * + * $Revision$ + * + * last change: $Author$ $Date$ + * + * 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 +#endif + +class SvxZoomToolBoxControl : public SfxToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + + SvxZoomToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings ); + ~SvxZoomToolBoxControl(); + + virtual void StateChanged( USHORT nSID, + SfxItemState eState, + const SfxPoolItem* pState ); + + virtual Window* CreateItemWindow( Window *pParent ); +}; + +#endif // _SVX_ZOOMTBXCTRL_HXX --- /dev/null 2003-02-11 15:36:20.000000000 +0100 +++ svx/source/tbxctrls/zoomtbxctrl.cxx 2003-08-17 18:27:29.000000000 +0200 @@ -0,0 +1,236 @@ +/************************************************************************* + * + * $RCSfile$ + * + * $Revision$ + * + * last change: $Author$ $Date$ + * + * 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 // HACK: prevent conflict between STLPORT and Workshop headers + +#ifndef _SV_TOOLBOX_HXX +#include +#endif +#ifndef _SFXAPP_HXX +#include +#endif +#ifndef _SFXDISPATCH_HXX +#include +#endif +#ifndef _SFXVIEWSH_HXX +#include +#endif +#ifndef _SV_COMBOBOX_HXX +#include +#endif + +#include "dialogs.hrc" + +#include "zoomtbxctrl.hxx" +#include "zoomitem.hxx" +#include "dialmgr.hxx" + +#define MINZOOM 20 +#define MAXZOOM 600 + +SFX_IMPL_TOOLBOX_CONTROL( SvxZoomToolBoxControl, SvxZoomItem); + +class SvxZoomBox_Impl : public ComboBox +{ + USHORT nSlotId; + SfxBindings& rBindings; + BOOL bRelease; +public: + SvxZoomBox_Impl( Window* pParent, USHORT nSlot, SfxBindings& rBind ); + ~SvxZoomBox_Impl(); + +protected: + virtual void Select(); + virtual long Notify( NotifyEvent& rNEvt ); + + void ReleaseFocus(); + +}; + +SvxZoomBox_Impl::SvxZoomBox_Impl( Window* pParent, USHORT nSlot, SfxBindings& rBind ): + ComboBox(pParent, SVX_RES(RID_SVXTBX_ZOOM)), + nSlotId(nSlot), + rBindings(rBind), + bRelease(TRUE) +{ + 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); + } +} + +SvxZoomBox_Impl::~SvxZoomBox_Impl() +{} + +void SvxZoomBox_Impl::Select() +{ + if ( !IsTravelSelect() ) + { + String sEntry( GetText() ); + sEntry.EraseAllChars( '%' ); + USHORT nZoom = (USHORT)sEntry.ToInt32(); + + if( nZoom < MINZOOM ) + nZoom = MINZOOM; + if( nZoom > MAXZOOM ) + nZoom = MAXZOOM; + + SvxZoomItem aItem( SVX_ZOOM_PERCENT, nZoom, nSlotId ); + rBindings.GetDispatcher()->Execute( + nSlotId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L ); + + 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 nId, + ToolBox& rTbx, + SfxBindings& rBind ) : + SfxToolBoxControl( nId, rTbx, rBind ) +{ +} + +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 SfxUInt16Item*)pState)->GetValue() ) ); + sZoom += '%'; + pBox->SetText( sZoom ); + pBox->SaveValue(); + } +} + +Window* SvxZoomToolBoxControl::CreateItemWindow( Window *pParent ) +{ + SvxZoomBox_Impl* pRet = new SvxZoomBox_Impl( pParent, GetId(), GetBindings() ); + return pRet; +} diff -Nur -x CVS -x unxlngi4.pro -x '*.bmp' -x ooo-convert-stamp sw/source/ui/app/swmodule.cxx sw/source/ui/app/swmodule.cxx --- 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 #endif +#ifndef _SVX_ZOOMTBXCTRL_HXX +#include +#endif #ifndef _CONTDLG_HXX_ //autogen #include #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 #include #include +#include #include #include #include @@ -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 #endif +#ifndef _SVX_ZOOMTBXCTRL_HXX //autogen +#include +#endif #ifndef _SVX_PSZCTRL_HXX //autogen #include #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 #endif +#ifndef _SVX_ZOOMTBXCTRL_HXX //autogen +#include +#endif #ifndef _SFX_OBJFAC_HXX #include #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 ); cvs server: Diffing starmath/util cvs server: Diffing starmath/xml 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