[ooo-build-commit] .: patches/dev300
Jan Holesovsky
kendy at kemper.freedesktop.org
Tue Sep 14 05:20:34 PDT 2010
patches/dev300/apply | 33
patches/dev300/toolbar-decorations-fix.diff | 2425 -------------
patches/dev300/toolbar-decorations-rsc.diff | 70
patches/dev300/toolbar-decorations-svx-tables-columns.diff | 745 ---
patches/dev300/toolbar-decorations-svx-undo-redo.diff | 80
patches/dev300/toolbar-decorations-svx.diff | 184
patches/dev300/toolbar-decorations-vcl.diff | 324 -
patches/dev300/vcl-better-fallback.diff | 26
patches/dev300/vcl-bitmap2-negative-height.diff | 71
9 files changed, 6 insertions(+), 3952 deletions(-)
New commits:
commit 9d9a73b4b97e33b1300f1739a81d4d16fadc0603
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Sep 14 13:37:13 2010 +0200
Moved toolbar decoration and some vcl-related patches to git.
diff --git a/patches/dev300/apply b/patches/dev300/apply
index a8ec9c7..3a6542d 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -18,7 +18,7 @@ Common : PreprocessPatches, BuildBits, TemporaryHacks, FixesNotForUpstream, \
OOXML, OOXMLExportDevel, OOXMLExport, FrameworkFeature, UnitTesting, \
PopupRemoval, FedoraCommonFixes, LayoutDialogs, Fuzz, \
CalcRowLimit, Gcc44, Gcc45, BuildFix, WriterDocComparison, \
- Toolbars, MySQL, BorderTypes, WriterNavigation
+ MySQL, BorderTypes, WriterNavigation
LinuxCommon : Common, Defaults, FontConfigTemporaryHacks, \
FedoraLinuxOnlyFixes, LinuxOnly, SystemBits, \
@@ -35,7 +35,7 @@ Experimental: VBAUntested, ArkOnlyExperimental, \
KDE4Experimental, MinGW, CalcExperimental, \
OOXMLExportExperimental, CrossWin32Patches, AutoLayout, \
WriterNavigation \
- HPPA, AXP, Speed, GSoC2010
+ HPPA, AXP, Speed, GSoC2010, Toolbars
DebianLooseSections: DebianBaseNoHelpContent
# Optional sections
Optional : LiberationFontsOnWindows, NovellOnlyExtensionFixes, Win32OnlyExtensionFixes, Linux32OnlyExtensionFixes
@@ -1264,15 +1264,9 @@ crash-startup.diff, i#100171, michael
# Don't let the splash screen take over
no-splash-takeover.diff, i#23609, rodo
-# Better fallback when some of the plugins are not available
-vcl-better-fallback.diff, i#50857, jholesov
-
# prioritize hebrew culmus fonts, Debian bugs #280084, #296152, #300642
hebrew-culmus.diff, noelpwer
-# enable vcl to load bitmaps when height it negative
-vcl-bitmap2-negative-height.diff
-
[ NotDebian ]
# Improve readability of BUILD_VER_STRING in Help:About dialog
@@ -1973,9 +1967,7 @@ sdbc-postgresql-config_office.diff
# FIXME: still needed?
kde4-buildfix-connectivity.diff
-[ Toolbars ]
-# toolbar-decorations-vcl.diff depends on this kde4_fpicker_fixes2.diff
-
+[ KDE4 ]
# Further fixes on top of existing kde4 support
# upstreamed in m65
# FIXME dev300-m77 kde4_fpicker_fixes.diff #disabled
@@ -1984,7 +1976,6 @@ kde4-buildfix-connectivity.diff
# Fixes filter issues and crash when dragging
# FIXME dev300-m77 kde4_fpicker_fixes2.diff #disabled
-[ KDE4 ]
# fixes multiple auto extension checkboxes, fixes override of exising file bug
# FIXME dev300-m77 kde4_fpicker_fixes3.diff #disabled
@@ -3328,22 +3319,10 @@ skip-empty-links-in-pdf.diff, bnc#598816, tml
[ Toolbars ]
SectionOwner => jholesov
+# experimental now
-# Improved toolbar popups
-toolbar-decorations-rsc.diff
-toolbar-decorations-vcl.diff
-toolbar-decorations-svx.diff
-
-# 'New table' toolbar widget rework, and a small update of the 'Colums' widget
-toolbar-decorations-svx-tables-columns.diff
-
-# Update the 'Undo' and 'Redo' widgets
-toolbar-decorations-svx-undo-redo.diff
-
-# The proof-of-concept
-#toolbar-decorations-fix.diff, cbosdo
-# Not too well looking, but might be useful?
-#toolbar-decorations-vcl-nwf.diff
+# Not looking too well, but might be useful?
+toolbar-decorations-vcl-nwf.diff
[ BorderTypes ]
SectionOwner => cbosdo
diff --git a/patches/dev300/toolbar-decorations-fix.diff b/patches/dev300/toolbar-decorations-fix.diff
deleted file mode 100644
index 7466ef4..0000000
--- a/patches/dev300/toolbar-decorations-fix.diff
+++ /dev/null
@@ -1,2425 +0,0 @@
-Toolbar graphical enhancements
-
-From: Cédric Bosdonnat <cedricbosdo at openoffice.org>
-
-
----
-
- svtools/source/control/valueset.cxx | 2
- svx/inc/extrusioncontrols.hxx | 59 +--
- svx/inc/fontworkgallery.hxx | 22 -
- svx/inc/linectrl.hxx | 7
- svx/source/tbxctrls/colorwindow.hxx | 1
- svx/source/tbxctrls/extrusioncontrols.cxx | 591 +++++++++++++++++------------
- svx/source/tbxctrls/extrusioncontrols.src | 32 --
- svx/source/tbxctrls/fontworkgallery.cxx | 163 ++++----
- svx/source/tbxctrls/fontworkgallery.src | 16 -
- svx/source/tbxctrls/linectrl.cxx | 138 ++-----
- svx/source/tbxctrls/tbcontrl.cxx | 147 ++++++-
- vcl/inc/vcl/dockwin.hxx | 2
- vcl/source/window/dockmgr.cxx | 65 ++-
- 13 files changed, 652 insertions(+), 593 deletions(-)
-
-
-diff --git svtools/source/control/valueset.cxx svtools/source/control/valueset.cxx
-index 11cf019..ff8b9a4 100644
---- svtools/source/control/valueset.cxx
-+++ svtools/source/control/valueset.cxx
-@@ -296,8 +296,6 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem )
- maVirDev.SetFillColor( maColor );
- else if ( nStyle & WB_MENUSTYLEVALUESET )
- maVirDev.SetFillColor( rStyleSettings.GetMenuColor() );
-- else if ( IsEnabled() )
-- maVirDev.SetFillColor( rStyleSettings.GetWindowColor() );
- else
- maVirDev.SetFillColor( rStyleSettings.GetFaceColor() );
- maVirDev.DrawRect( aRect );
-diff --git svx/inc/extrusioncontrols.hxx svx/inc/extrusioncontrols.hxx
-index 6bae981..20d7070 100644
---- svx/inc/extrusioncontrols.hxx
-+++ svx/inc/extrusioncontrols.hxx
-@@ -54,8 +54,14 @@ class ExtrusionDirectionWindow : public SfxPopupWindow
- using FloatingWindow::StateChanged;
-
- private:
-- ToolbarMenu* mpMenu;
-+ FixedText* mpTitleTxt;
- ValueSet* mpDirectionSet;
-+ FixedLine* mpSeparator;
-+ PushButton* mpPerspectiveBtn;
-+ FixedText* mpPerspectiveTxt;
-+ PushButton* mpParallelBtn;
-+ FixedText* mpParallelTxt;
-+
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
-
- SfxStatusForwarder* mpDirectionForewarder;
-@@ -69,8 +75,6 @@ private:
- Image maImgParallel;
- Image maImgParallelH;
-
-- bool mbPopupMode;
--
- DECL_LINK( SelectHdl, void * );
- void FillValueSet();
-
-@@ -80,7 +84,6 @@ private:
-
- protected:
- virtual BOOL Close();
-- virtual void PopupModeEnd();
-
- /** This function is called when the window gets the focus. It grabs
- the focus to the line ends value set so that it can be controlled with
-@@ -126,27 +129,15 @@ class ExtrusionDepthWindow : public SfxPopupWindow
- using FloatingWindow::StateChanged;
-
- private:
-- ToolbarMenu* mpMenu;
--
-- Image maImgDepth0;
-- Image maImgDepth1;
-- Image maImgDepth2;
-- Image maImgDepth3;
-- Image maImgDepth4;
-- Image maImgDepthInfinity;
--
-- Image maImgDepth0h;
-- Image maImgDepth1h;
-- Image maImgDepth2h;
-- Image maImgDepth3h;
-- Image maImgDepth4h;
-- Image maImgDepthInfinityh;
-+ FixedText* mpTxtTitle;
-+ PushButton* mpBtnDepths[6];
-+ FixedText* mpTxtDepths[6];
-+ PushButton* mpBtnCustom;
-
- SfxStatusForwarder* mpDepthForewarder;
- SfxStatusForwarder* mpMetricForewarder;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
-
-- bool mbPopupMode;
- FieldUnit meUnit;
- double mfDepth;
- bool mbEnabled;
-@@ -159,7 +150,6 @@ private:
-
- protected:
- virtual BOOL Close();
-- virtual void PopupModeEnd();
-
- /** This function is called when the window gets the focus. It grabs
- the focus to the line ends value set so that it can be controlled with
-@@ -205,8 +195,15 @@ class ExtrusionLightingWindow : public SfxPopupWindow
- using FloatingWindow::StateChanged;
-
- private:
-- ToolbarMenu* mpMenu;
-+ FixedText* mpTitleTxt;
- ValueSet* mpLightingSet;
-+ FixedLine* mpSeparator;
-+ ImageButton* mpBrightBtn;
-+ FixedText* mpBrightTxt;
-+ ImageButton* mpNormalBtn;
-+ FixedText* mpNormalTxt;
-+ ImageButton* mpDimBtn;
-+ FixedText* mpDimTxt;
-
- Image maImgLightingOff[9];
- Image maImgLightingOn[9];
-@@ -227,7 +224,6 @@ private:
- SfxStatusForwarder* mpLightingIntensityForewarder;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
-
-- bool mbPopupMode;
- int mnLevel;
- bool mbLevelEnabled;
- int mnDirection;
-@@ -241,7 +237,6 @@ private:
-
- protected:
- virtual BOOL Close();
-- virtual void PopupModeEnd();
-
- /** This function is called when the window gets the focus. It grabs
- the focus to the line ends value set so that it can be controlled with
-@@ -286,22 +281,13 @@ class ExtrusionSurfaceWindow : public SfxPopupWindow
- {
- using FloatingWindow::StateChanged;
- private:
-- ToolbarMenu* mpMenu;
--
-- Image maImgSurface1;
-- Image maImgSurface2;
-- Image maImgSurface3;
-- Image maImgSurface4;
-- Image maImgSurface1h;
-- Image maImgSurface2h;
-- Image maImgSurface3h;
-- Image maImgSurface4h;
-+ FixedText* mpTitleTxt;
-+ ImageButton* mpSurfacesBtn[4];
-+ FixedText* mpSurfacesTxt[4];
-
- SfxStatusForwarder* mpSurfaceForewarder;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
-
-- bool mbPopupMode;
--
- DECL_LINK( SelectHdl, void * );
-
- void implSetSurface( int nSurface, bool bEnabled );
-@@ -309,7 +295,6 @@ private:
-
- protected:
- virtual BOOL Close();
-- virtual void PopupModeEnd();
-
- /** This function is called when the window gets the focus. It grabs
- the focus to the line ends value set so that it can be controlled with
-diff --git svx/inc/fontworkgallery.hxx svx/inc/fontworkgallery.hxx
-index 5becc11..fa97983 100644
---- svx/inc/fontworkgallery.hxx
-+++ svx/inc/fontworkgallery.hxx
-@@ -62,23 +62,11 @@ class FontWorkAlignmentWindow : public SfxPopupWindow
- {
- using FloatingWindow::StateChanged;
- private:
-- ToolbarMenu* mpMenu;
--
-- Image maImgAlgin1;
-- Image maImgAlgin2;
-- Image maImgAlgin3;
-- Image maImgAlgin4;
-- Image maImgAlgin5;
-- Image maImgAlgin1h;
-- Image maImgAlgin2h;
-- Image maImgAlgin3h;
-- Image maImgAlgin4h;
-- Image maImgAlgin5h;
--
-+ FixedText* mpTitleTxt;
-+ ImageButton* mpAlignsBtn[5];
-+ FixedText* mpAlignsTxt[5];
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
-
-- bool mbPopupMode;
--
- DECL_LINK( SelectHdl, void * );
-
- void implSetAlignment( int nAlignmentMode, bool bEnabled );
-@@ -86,7 +74,6 @@ private:
-
- protected:
- virtual BOOL Close();
-- virtual void PopupModeEnd();
-
- /** This function is called when the window gets the focus. It grabs
- the focus to the line ends value set so that it can be controlled with
-@@ -133,8 +120,6 @@ private:
-
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
-
-- bool mbPopupMode;
--
- DECL_LINK( SelectHdl, void * );
-
- void implSetCharacterSpacing( sal_Int32 nCharacterSpacing, bool bEnabled );
-@@ -143,7 +128,6 @@ private:
-
- protected:
- virtual BOOL Close();
-- virtual void PopupModeEnd();
-
- /** This function is called when the window gets the focus. It grabs
- the focus to the line ends value set so that it can be controlled with
-diff --git svx/inc/linectrl.hxx svx/inc/linectrl.hxx
-index a73ed6f..dc2941b 100644
---- svx/inc/linectrl.hxx
-+++ svx/inc/linectrl.hxx
-@@ -107,14 +107,13 @@ class SvxLineEndWindow : public SfxPopupWindow
- using FloatingWindow::StateChanged;
-
- private:
-+ FixedText aTitle;
- XLineEndList* pLineEndList;
- ValueSet aLineEndSet;
- USHORT nCols;
- USHORT nLines;
- ULONG nLineEndWidth;
- Size aBmpSize;
-- BOOL bPopupMode;
-- bool mbInResize;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
-
-
-@@ -124,16 +123,14 @@ private:
- void implInit();
-
- protected:
-- virtual void Resizing( Size& rSize );
-- virtual void Resize();
- virtual BOOL Close();
-- virtual void PopupModeEnd();
-
- /** This function is called when the window gets the focus. It grabs
- the focus to the line ends value set so that it can be controlled with
- the keyboard.
- */
- virtual void GetFocus (void);
-+ virtual void KeyInput( const KeyEvent& rKEvt );
-
- public:
- SvxLineEndWindow( USHORT nId,
-diff --git svx/source/tbxctrls/colorwindow.hxx svx/source/tbxctrls/colorwindow.hxx
-index 50388d6..9db6499 100644
---- svx/source/tbxctrls/colorwindow.hxx
-+++ svx/source/tbxctrls/colorwindow.hxx
-@@ -20,6 +20,7 @@ class SvxColorWindow_Impl : public SfxPopupWindow
- private:
- const USHORT theSlotId;
- ValueSet aColorSet;
-+ FixedText aLabel;
- rtl::OUString maCommand;
-
- #if _SOLAR__PRIVATE
-diff --git svx/source/tbxctrls/extrusioncontrols.cxx svx/source/tbxctrls/extrusioncontrols.cxx
-index 4bd3ff2..bfaf088 100644
---- svx/source/tbxctrls/extrusioncontrols.cxx
-+++ svx/source/tbxctrls/extrusioncontrols.cxx
-@@ -85,8 +85,7 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow(
- maImgPerspective( SVX_RES( IMG_PERSPECTIVE ) ),
- maImgPerspectiveH( SVX_RES( IMG_PERSPECTIVE_H ) ),
- maImgParallel( SVX_RES( IMG_PARALLEL ) ),
-- maImgParallelH( SVX_RES( IMG_PARALLEL_H ) ),
-- mbPopupMode ( TRUE )
-+ maImgParallelH( SVX_RES( IMG_PARALLEL_H ) )
- {
- implInit();
- }
-@@ -103,15 +102,30 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow(
- maImgPerspective( SVX_RES( IMG_PERSPECTIVE ) ),
- maImgPerspectiveH( SVX_RES( IMG_PERSPECTIVE_H ) ),
- maImgParallel( SVX_RES( IMG_PARALLEL ) ),
-- maImgParallelH( SVX_RES( IMG_PARALLEL_H ) ),
-- mbPopupMode ( TRUE )
-+ maImgParallelH( SVX_RES( IMG_PARALLEL_H ) )
- {
- implInit();
- }
-
- void ExtrusionDirectionWindow::implInit()
- {
-+ ToolBox* pToolbar = dynamic_cast<ToolBox*>( GetParent( ) );
-+ SetText( pToolbar->GetItemText( GetId() ) );
-+
-+ SetStyle( WB_DIALOGCONTROL | WB_SYSTEMWINDOW );
-+ SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor( ) );
-+
- SetHelpId( HID_POPUP_EXTRUSION_DIRECTION );
-+
-+ mpTitleTxt = new FixedText( this );
-+ mpTitleTxt->SetPosPixel( Point( 2, 2 ) );
-+ mpTitleTxt->SetSizePixel( Size( 106, 15 ) );
-+ mpTitleTxt->SetText( GetText( ) );
-+ Font& aFont = const_cast<Font&>( mpTitleTxt->GetFont( ) );
-+ aFont.SetWeight( WEIGHT_BOLD );
-+ mpTitleTxt->SetFont( aFont );
-+ mpTitleTxt->SetBackground( GetBackground( ) );
-+ mpTitleTxt->Show( );
-
- USHORT i;
- for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ )
-@@ -123,16 +137,14 @@ void ExtrusionDirectionWindow::implInit()
- // mpDirectionForewarder = new SfxStatusForwarder( SID_EXTRUSION_DIRECTION, *this );
- // mpProjectionForewarder = new SfxStatusForwarder( SID_EXTRUSION_PROJECTION, *this );
-
-- mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN );
-- mpMenu->SetHelpId( HID_MENU_EXTRUSION_DIRECTION );
-- mpMenu->SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) );
-- mpDirectionSet = new ValueSet( mpMenu, WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT );
-+ mpDirectionSet = new ValueSet( this, WB_TABSTOP | WB_NOBORDER | WB_NO_DIRECTSELECT );
- mpDirectionSet->SetHelpId( HID_VALUESET_EXTRUSION_DIRECTION );
-
- mpDirectionSet->SetHelpId( HID_POPUP_LINEEND_CTRL );
- mpDirectionSet->SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) );
- mpDirectionSet->SetColCount( 3 );
- mpDirectionSet->EnableFullItemMode( FALSE );
-+ mpDirectionSet->Show( );
-
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
-
-@@ -143,16 +155,45 @@ void ExtrusionDirectionWindow::implInit()
- }
-
- mpDirectionSet->SetOutputSizePixel( Size( 72, 72 ) );
--
-- mpMenu->appendEntry( 2, mpDirectionSet );
-- mpMenu->appendSeparator();
-- mpMenu->appendEntry( 0, String( SVX_RES( STR_PERSPECTIVE ) ), bHighContrast ? maImgPerspectiveH : maImgPerspective );
-- mpMenu->appendEntry( 1, String( SVX_RES( STR_PARALLEL ) ), bHighContrast ? maImgParallelH : maImgParallel );
--
-- SetOutputSizePixel( mpMenu->getMenuSize() );
-- mpMenu->SetOutputSizePixel( GetOutputSizePixel() );
--
-- mpMenu->Show();
-+ mpDirectionSet->SetPosPixel( Point( 19, 19 ) );
-+
-+ // Configure FixedLine
-+ mpSeparator = new FixedLine( this );
-+ mpSeparator->SetPosPixel( Point( 2, 93 ) );
-+ mpSeparator->SetSizePixel( Size( 106, 3 ) );
-+ mpSeparator->Show( );
-+
-+ // Configure the Perspective button here
-+ mpPerspectiveBtn = new ImageButton( this, WinBits( WB_TOGGLE ) );
-+ mpPerspectiveBtn->SetModeImage( bHighContrast ? maImgPerspectiveH : maImgPerspective );
-+ mpPerspectiveBtn->SetPosPixel( Point( 2, 99 ) );
-+ mpPerspectiveBtn->SetSizePixel( Size( 24, 24 ) );
-+ mpPerspectiveBtn->SetClickHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) );
-+ mpPerspectiveBtn->Show( );
-+
-+ mpPerspectiveTxt = new FixedText( this );
-+ mpPerspectiveTxt->SetPosPixel( Point( 28, 103 ) );
-+ mpPerspectiveTxt->SetSizePixel( Size( 80, 16 ) );
-+ mpPerspectiveTxt->SetText( String( SVX_RES( STR_PERSPECTIVE ) ) );
-+ mpPerspectiveTxt->SetBackground( GetBackground( ) );
-+ mpPerspectiveTxt->Show( );
-+
-+ // Configure the Parallel button here
-+ mpParallelBtn = new ImageButton( this, WinBits( WB_TOGGLE ) );
-+ mpParallelBtn->SetModeImage( bHighContrast ? maImgParallelH : maImgParallel );
-+ mpParallelBtn->SetPosPixel( Point( 2, 125 ) );
-+ mpParallelBtn->SetSizePixel( Size( 24, 24 ) );
-+ mpParallelBtn->SetClickHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) );
-+ mpParallelBtn->Show( );
-+
-+ mpParallelTxt = new FixedText( this );
-+ mpParallelTxt->SetText( String( SVX_RES( STR_PARALLEL ) ) );
-+ mpParallelTxt->SetPosPixel( Point( 28, 129 ) );
-+ mpParallelTxt->SetSizePixel( Size( 80, 16 ) );
-+ mpParallelTxt->SetBackground( GetBackground( ) );
-+ mpParallelTxt->Show( );
-+
-+ SetOutputSizePixel( Size( 110, 151 ) );
-
- FreeResource();
-
-@@ -179,8 +220,9 @@ void ExtrusionDirectionWindow::DataChanged( const DataChangedEvent& rDCEvt )
- mpDirectionSet->SetItemImage( i+1, bHighContrast ? maImgDirectionH[ i ] : maImgDirection[ i ] );
- }
-
-- mpMenu->setEntryImage( 0, bHighContrast ? maImgPerspectiveH : maImgPerspective );
-- mpMenu->setEntryImage( 1, bHighContrast ? maImgParallelH : maImgParallel );
-+ // TODO Change the images
-+// mpMenu->setEntryImage( 0, bHighContrast ? maImgPerspectiveH : maImgPerspective );
-+// mpMenu->setEntryImage( 1, bHighContrast ? maImgParallelH : maImgParallel );
- }
- }
-
-@@ -188,12 +230,18 @@ void ExtrusionDirectionWindow::DataChanged( const DataChangedEvent& rDCEvt )
-
- ExtrusionDirectionWindow::~ExtrusionDirectionWindow()
- {
-- delete mpMenu;
-+ delete mpTitleTxt;
-+ delete mpDirectionSet;
-+ delete mpSeparator;
-+ delete mpPerspectiveBtn;
-+ delete mpPerspectiveTxt;
-+ delete mpParallelBtn;
-+ delete mpParallelTxt;
- }
-
- // -----------------------------------------------------------------------
-
--void ExtrusionDirectionWindow::implSetDirection( sal_Int32 nSkew, bool bEnabled )
-+void ExtrusionDirectionWindow::implSetDirection( sal_Int32 nSkew, bool /*bEnabled*/ )
- {
- if( mpDirectionSet )
- {
-@@ -213,23 +261,16 @@ void ExtrusionDirectionWindow::implSetDirection( sal_Int32 nSkew, bool bEnabled
- mpDirectionSet->SetNoSelection();
- }
- }
-- if( mpMenu )
-- {
-- mpMenu->enableEntry( 2, bEnabled );
-- }
- }
-
- // -----------------------------------------------------------------------
-
- void ExtrusionDirectionWindow::implSetProjection( sal_Int32 nProjection, bool bEnabled )
- {
-- if( mpMenu )
-- {
-- mpMenu->checkEntry( 0, (nProjection == 0) && bEnabled );
-- mpMenu->checkEntry( 1, (nProjection == 1 ) && bEnabled );
-- mpMenu->enableEntry( 0, bEnabled );
-- mpMenu->enableEntry( 1, bEnabled );
-- }
-+ if ( nProjection == 0 )
-+ mpPerspectiveBtn->SetPressed( bEnabled );
-+ else
-+ mpParallelBtn->SetPressed( bEnabled );
- }
-
- // -----------------------------------------------------------------------
-@@ -273,10 +314,11 @@ void ExtrusionDirectionWindow::StateChanged( USHORT nSID, SfxItemState eState, c
-
- IMPL_LINK( ExtrusionDirectionWindow, SelectHdl, void *, pControl )
- {
-- if ( IsInPopupMode() )
-- EndPopupMode();
--
--// SfxDispatcher* pDisp = GetBindings().GetDispatcher();
-+ if ( GetDockingManager()->IsInPopupMode( this ) )
-+ {
-+ GetDockingManager()->EndPopupMode( this );
-+ doLazyDelete();
-+ }
-
- if( pControl == mpDirectionSet )
- {
-@@ -296,12 +338,15 @@ IMPL_LINK( ExtrusionDirectionWindow, SelectHdl, void *, pControl )
- mxFrame->getController(), UNO_QUERY ),
- aCommand,
- aArgs );
--
--// pDisp->Execute( SID_EXTRUSION_DIRECTION, SFX_CALLMODE_RECORD, &aItem, 0L , 0L );
- }
- else
- {
-- int nProjection = mpMenu->getSelectedEntryId();
-+ int nProjection = -1;
-+ if ( pControl == mpPerspectiveBtn )
-+ nProjection = 0;
-+ else
-+ nProjection = 1;
-+
- if( (nProjection >= 0) && (nProjection < 2 ) )
- {
- SfxInt32Item aItem( SID_EXTRUSION_PROJECTION, nProjection );
-@@ -347,17 +392,6 @@ BOOL ExtrusionDirectionWindow::Close()
-
- // -----------------------------------------------------------------------
-
--void ExtrusionDirectionWindow::PopupModeEnd()
--{
-- if ( IsVisible() )
-- {
-- mbPopupMode = FALSE;
-- }
-- SfxPopupWindow::PopupModeEnd();
--}
--
--// -----------------------------------------------------------------------
--
- void ExtrusionDirectionWindow::GetFocus (void)
- {
- SfxPopupWindow::GetFocus();
-@@ -398,9 +432,10 @@ SfxPopupWindowType ExtrusionDirectionControl::GetPopupWindowType() const
- SfxPopupWindow* ExtrusionDirectionControl::CreatePopupWindow()
- {
- ExtrusionDirectionWindow* pWin = new ExtrusionDirectionWindow( GetId(), m_xFrame, &GetToolBox() );
-- pWin->StartPopupMode( &GetToolBox(), TRUE );
-+
-+ pWin->EnableDocking(true);
-+ pWin->GetDockingManager()->StartPopupMode(&GetToolBox(),pWin);
- pWin->StartSelection();
-- SetPopupWindow( pWin );
- return pWin;
- }
-
-@@ -452,20 +487,7 @@ ExtrusionDepthWindow::ExtrusionDepthWindow(
- SfxPopupWindow( nId,
- rFrame,
- SVX_RES( RID_SVXFLOAT_EXTRUSION_DEPTH )),
-- maImgDepth0( SVX_RES( IMG_DEPTH_0 ) ),
-- maImgDepth1( SVX_RES( IMG_DEPTH_1 ) ),
-- maImgDepth2( SVX_RES( IMG_DEPTH_2 ) ),
-- maImgDepth3( SVX_RES( IMG_DEPTH_3 ) ),
-- maImgDepth4( SVX_RES( IMG_DEPTH_4 ) ),
-- maImgDepthInfinity( SVX_RES( IMG_DEPTH_INFINITY ) ),
-- maImgDepth0h( SVX_RES( IMG_DEPTH_0_H ) ),
-- maImgDepth1h( SVX_RES( IMG_DEPTH_1_H ) ),
-- maImgDepth2h( SVX_RES( IMG_DEPTH_2_H ) ),
-- maImgDepth3h( SVX_RES( IMG_DEPTH_3_H ) ),
-- maImgDepth4h( SVX_RES( IMG_DEPTH_4_H ) ),
-- maImgDepthInfinityh( SVX_RES( IMG_DEPTH_INFINITY_H ) ),
- mxFrame( rFrame ),
-- mbPopupMode ( true ),
- mfDepth( -1.0 ),
- mbEnabled( false )
- {
-@@ -479,20 +501,7 @@ ExtrusionDepthWindow::ExtrusionDepthWindow( USHORT nId,
- rFrame,
- pParentWindow,
- SVX_RES( RID_SVXFLOAT_EXTRUSION_DEPTH )),
-- maImgDepth0( SVX_RES( IMG_DEPTH_0 ) ),
-- maImgDepth1( SVX_RES( IMG_DEPTH_1 ) ),
-- maImgDepth2( SVX_RES( IMG_DEPTH_2 ) ),
-- maImgDepth3( SVX_RES( IMG_DEPTH_3 ) ),
-- maImgDepth4( SVX_RES( IMG_DEPTH_4 ) ),
-- maImgDepthInfinity( SVX_RES( IMG_DEPTH_INFINITY ) ),
-- maImgDepth0h( SVX_RES( IMG_DEPTH_0_H ) ),
-- maImgDepth1h( SVX_RES( IMG_DEPTH_1_H ) ),
-- maImgDepth2h( SVX_RES( IMG_DEPTH_2_H ) ),
-- maImgDepth3h( SVX_RES( IMG_DEPTH_3_H ) ),
-- maImgDepth4h( SVX_RES( IMG_DEPTH_4_H ) ),
-- maImgDepthInfinityh( SVX_RES( IMG_DEPTH_INFINITY_H ) ),
- mxFrame( rFrame ),
-- mbPopupMode ( true ),
- mfDepth( -1.0 ),
- mbEnabled( false )
- {
-@@ -501,31 +510,58 @@ ExtrusionDepthWindow::ExtrusionDepthWindow( USHORT nId,
-
- void ExtrusionDepthWindow::implInit()
- {
-+ ToolBox* pToolbar = dynamic_cast<ToolBox*>( GetParent( ) );
-+ SetText( pToolbar->GetItemText( GetId() ) );
-+
- SetHelpId( HID_POPUP_EXTRUSION_DEPTH );
-
- // mpDepthForewarder = new SfxStatusForwarder( SID_EXTRUSION_DEPTH, *this );
- // mpMetricForewarder = new SfxStatusForwarder( SID_ATTR_METRIC, *this );
-
-- mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN );
-- mpMenu->SetHelpId( HID_MENU_EXTRUSION_DEPTH );
-+ SetStyle( WB_DIALOGCONTROL | WB_SYSTEMWINDOW );
-+ SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor( ) );
-
-- mpMenu->SetSelectHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) );
-+ mpTxtTitle = new FixedText( this );
-+ mpTxtTitle->SetPosPixel( Point( 2, 2 ) );
-+ mpTxtTitle->SetSizePixel( Size( 106, 15 ) );
-+ mpTxtTitle->SetText( GetText( ) );
-+ Font& aFont = const_cast<Font&>( mpTxtTitle->GetFont( ) );
-+ aFont.SetWeight( WEIGHT_BOLD );
-+ mpTxtTitle->SetFont( aFont );
-+ mpTxtTitle->SetBackground( GetBackground( ) );
-+ mpTxtTitle->Show( );
-
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
-
- String aEmpty;
-- mpMenu->appendEntry( 0, aEmpty, bHighContrast ? maImgDepth0h : maImgDepth0 );
-- mpMenu->appendEntry( 1, aEmpty, bHighContrast ? maImgDepth1h : maImgDepth1 );
-- mpMenu->appendEntry( 2, aEmpty, bHighContrast ? maImgDepth2h : maImgDepth2 );
-- mpMenu->appendEntry( 3, aEmpty, bHighContrast ? maImgDepth3h : maImgDepth3 );
-- mpMenu->appendEntry( 4, aEmpty, bHighContrast ? maImgDepth4h : maImgDepth4 );
-- mpMenu->appendEntry( 5, String( SVX_RES( STR_INFINITY ) ), bHighContrast ? maImgDepthInfinityh : maImgDepthInfinity );
-- mpMenu->appendEntry( 6, String( SVX_RES( STR_CUSTOM ) ) );
-+ for ( int i = 0; i < 6; i++ )
-+ {
-+ mpBtnDepths[i] = new ImageButton( this, WinBits( WB_TOGGLE ) );
-+ mpBtnDepths[i]->SetPosPixel( Point( 2, i * 26 + 17 ) );
-+ mpBtnDepths[i]->SetSizePixel( Size( 24, 24 ) );
-+ Image aHcImage = Image( SVX_RES( IMG_DEPTH_0_H + i ) );
-+ Image aImage = Image( SVX_RES( IMG_DEPTH_0 + i ) );
-+ mpBtnDepths[i]->SetModeImage( bHighContrast ? aHcImage : aImage );
-+ mpBtnDepths[i]->SetClickHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) );
-+ mpBtnDepths[i]->Show( );
-+
-+ mpTxtDepths[i] = new FixedText( this );
-+ mpTxtDepths[i]->SetPosPixel( Point( 28, i * 26 + 22 ) );
-+ mpTxtDepths[i]->SetSizePixel( Size( 80, 14 ) );
-+ mpTxtDepths[i]->SetBackground( GetBackground( ) );
-+ mpTxtDepths[i]->Show( );
-+ }
-+
-+ mpTxtDepths[5]->SetText( String( SVX_RES( STR_INFINITY ) ) );
-
-- SetOutputSizePixel( mpMenu->getMenuSize() );
-- mpMenu->SetOutputSizePixel( GetOutputSizePixel() );
-+ mpBtnCustom = new PushButton( this );
-+ mpBtnCustom->SetPosPixel( Point( 2, 173 ) );
-+ mpBtnCustom->SetSizePixel( Size( 106, 24 ) );
-+ mpBtnCustom->SetText( String( SVX_RES( STR_CUSTOM ) ) );
-+ mpBtnCustom->SetClickHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) );
-+ mpBtnCustom->Show( );
-
-- mpMenu->Show();
-+ SetOutputSizePixel( Size( 110, 201 ) );
-
- FreeResource();
-
-@@ -544,10 +580,12 @@ SfxPopupWindow* ExtrusionDepthWindow::Clone() const
-
- ExtrusionDepthWindow::~ExtrusionDepthWindow()
- {
--// delete mpDepthForewarder;
--// delete mpMetricForewarder;
--
-- delete mpMenu;
-+ for ( int i = 0; i < 6; i++ )
-+ {
-+ delete mpBtnDepths[i];
-+ delete mpTxtDepths[i];
-+ }
-+ delete mpBtnCustom;
- }
-
- // -----------------------------------------------------------------------
-@@ -559,20 +597,16 @@ void ExtrusionDepthWindow::implSetDepth( double fDepth, bool bEnabled )
- {
- mbEnabled = bEnabled;
- mfDepth = fDepth;
-- if( mpMenu )
-+ int i;
-+ for( i = 0; i < 6; i++ )
- {
-- int i;
-- for( i = 0; i < 7; i++ )
-+ if( i == 5 )
- {
-- if( i == 5 )
-- {
-- mpMenu->checkEntry( i, (fDepth >= 338666) && bEnabled );
-- }
-- else if( i != 6 )
-- {
-- mpMenu->checkEntry( i, (fDepth == (IsMetric( meUnit ) ? aDepthListMM[i] : aDepthListInch[i]) && bEnabled ) );
-- }
-- mpMenu->enableEntry( i, bEnabled );
-+ mpBtnDepths[i]->SetPressed( (fDepth >= 338666) && bEnabled );
-+ }
-+ else if( i != 6 )
-+ {
-+ mpBtnDepths[i]->SetPressed( (fDepth == (IsMetric( meUnit ) ? aDepthListMM[i] : aDepthListInch[i]) && bEnabled ) );
- }
- }
- }
-@@ -587,7 +621,7 @@ void ExtrusionDepthWindow::implFillStrings( FieldUnit eUnit )
- for( int i = 0; i < 5; i++ )
- {
- String aStr( SVX_RES( nResource + i ) );
-- mpMenu->setEntryText( i, aStr );
-+ mpTxtDepths[ i ]->SetText( aStr );
- };
- }
-
-@@ -634,29 +668,39 @@ void ExtrusionDepthWindow::DataChanged( const DataChangedEvent& rDCEvt )
- {
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
-
-- mpMenu->setEntryImage( 0, bHighContrast ? maImgDepth0h : maImgDepth0 );
-- mpMenu->setEntryImage( 1, bHighContrast ? maImgDepth1h : maImgDepth1 );
-- mpMenu->setEntryImage( 2, bHighContrast ? maImgDepth2h : maImgDepth2 );
-- mpMenu->setEntryImage( 3, bHighContrast ? maImgDepth3h : maImgDepth3 );
-- mpMenu->setEntryImage( 4, bHighContrast ? maImgDepth4h : maImgDepth4 );
-- mpMenu->setEntryImage( 5, bHighContrast ? maImgDepthInfinityh : maImgDepthInfinity );
-+ for ( int i = 0; i < 6; i++ )
-+ {
-+ Image aHcImage = Image( SVX_RES( IMG_DEPTH_0_H + i ) );
-+ Image aImage = Image( SVX_RES( IMG_DEPTH_0 + i ) );
-+ mpBtnDepths[i]->SetModeImage( bHighContrast ? aHcImage : aImage );
-+ }
- }
- }
-
-
- // -----------------------------------------------------------------------
-
--IMPL_LINK( ExtrusionDepthWindow, SelectHdl, void *, EMPTYARG )
-+IMPL_LINK( ExtrusionDepthWindow, SelectHdl, void *, pControl )
- {
- // SfxDispatcher* pDisp = GetBindings().GetDispatcher();
-
-- int nSelected = mpMenu->getSelectedEntryId();
-+ int nSelected = ( pControl == mpBtnCustom ) ? 6 : -1;
-+ int i = 0;
-+ while ( nSelected < 0 && i < 6 )
-+ {
-+ if ( pControl == mpBtnDepths[i] )
-+ nSelected = i;
-+ i++;
-+ }
- if( nSelected != -1 )
- {
- if( nSelected == 6 )
- {
-- if ( IsInPopupMode() )
-- EndPopupMode();
-+ if ( GetDockingManager()->IsInPopupMode( this ) )
-+ {
-+ GetDockingManager()->EndPopupMode( this );
-+ doLazyDelete();
-+ }
-
- SvxDoubleItem aDepthItem( mfDepth, SID_EXTRUSION_DEPTH );
- SfxUInt16Item aMetricItem(
-@@ -706,8 +750,11 @@ IMPL_LINK( ExtrusionDepthWindow, SelectHdl, void *, EMPTYARG )
- aArgs );
- implSetDepth( fDepth, true );
-
-- if ( IsInPopupMode() )
-- EndPopupMode();
-+ if ( GetDockingManager()->IsInPopupMode( this ) )
-+ {
-+ GetDockingManager()->EndPopupMode( this );
-+ doLazyDelete();
-+ }
- }
- }
- return 0;
-@@ -728,24 +775,16 @@ BOOL ExtrusionDepthWindow::Close()
-
- // -----------------------------------------------------------------------
-
--void ExtrusionDepthWindow::PopupModeEnd()
--{
-- if ( IsVisible() )
-- {
-- mbPopupMode = FALSE;
-- }
-- SfxPopupWindow::PopupModeEnd();
--}
--
--// -----------------------------------------------------------------------
--
- void ExtrusionDepthWindow::GetFocus (void)
- {
- SfxPopupWindow::GetFocus();
- // Grab the focus to the line ends value set so that it can be controlled
- // with the keyboard.
-+ // TODO Fix the focus problem
-+#if 0
- if( mpMenu )
- mpMenu->GrabFocus();
-+#endif
- }
-
- // ========================================================================
-@@ -775,9 +814,10 @@ SfxPopupWindowType ExtrusionDepthControl::GetPopupWindowType() const
- SfxPopupWindow* ExtrusionDepthControl::CreatePopupWindow()
- {
- ExtrusionDepthWindow* pWin = new ExtrusionDepthWindow( GetId(), m_xFrame, &GetToolBox() );
-- pWin->StartPopupMode( &GetToolBox(), TRUE );
-+
-+ pWin->EnableDocking(true);
-+ pWin->GetDockingManager()->StartPopupMode(&GetToolBox(),pWin);
- pWin->StartSelection();
-- SetPopupWindow( pWin );
- return pWin;
- }
-
-@@ -809,7 +849,6 @@ ExtrusionLightingWindow::ExtrusionLightingWindow(
- maImgNormalh( SVX_RES( IMG_LIGHTING_NORMAL_H ) ),
- maImgDimh( SVX_RES( IMG_LIGHTING_DIM_H ) ),
- mxFrame( rFrame ),
-- mbPopupMode( true ),
- mnLevel( 0 ),
- mbLevelEnabled( false ),
- mnDirection( FROM_FRONT ),
-@@ -835,7 +874,6 @@ ExtrusionLightingWindow::ExtrusionLightingWindow(
- maImgNormalh( SVX_RES( IMG_LIGHTING_NORMAL_H ) ),
- maImgDimh( SVX_RES( IMG_LIGHTING_DIM_H ) ),
- mxFrame( rFrame ),
-- mbPopupMode( true ),
- mnLevel( 0 ),
- mbLevelEnabled( false ),
- mnDirection( FROM_FRONT ),
-@@ -848,7 +886,23 @@ ExtrusionLightingWindow::ExtrusionLightingWindow(
-
- void ExtrusionLightingWindow::implInit()
- {
-+ ToolBox* pToolbar = dynamic_cast<ToolBox*>( GetParent( ) );
-+ SetText( pToolbar->GetItemText( GetId() ) );
-+
-+ SetStyle( WB_DIALOGCONTROL | WB_SYSTEMWINDOW );
-+ SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor( ) );
-+
- SetHelpId( HID_POPUP_EXTRUSION_LIGHTING );
-+
-+ mpTitleTxt = new FixedText( this );
-+ mpTitleTxt->SetPosPixel( Point( 2, 2 ) );
-+ mpTitleTxt->SetSizePixel( Size( 106, 15 ) );
-+ mpTitleTxt->SetText( GetText( ) );
-+ Font& aFont = const_cast<Font&>( mpTitleTxt->GetFont( ) );
-+ aFont.SetWeight( WEIGHT_BOLD );
-+ mpTitleTxt->SetFont( aFont );
-+ mpTitleTxt->SetBackground( GetBackground( ) );
-+ mpTitleTxt->Show( );
-
- USHORT i;
- for( i = FROM_TOP_LEFT; i <= FROM_BOTTOM_RIGHT; i++ )
-@@ -864,20 +918,14 @@ void ExtrusionLightingWindow::implInit()
- maImgLightingPreviewh[i] = Image( SVX_RES( IMG_LIGHT_PREVIEW_H + i ) );
- }
-
--// mpLightingDirectionForewarder = new SfxStatusForwarder( SID_EXTRUSION_LIGHTING_DIRECTION, *this );
--// mpLightingIntensityForewarder = new SfxStatusForwarder( SID_EXTRUSION_LIGHTING_INTENSITY, *this );
--
-- mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN );
-- mpMenu->SetHelpId( HID_MENU_EXTRUSION_LIGHTING );
-- mpMenu->SetSelectHdl( LINK( this, ExtrusionLightingWindow, SelectHdl ) );
--
-- mpLightingSet = new ValueSet( mpMenu, WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT );
-+ mpLightingSet = new ValueSet( this, WB_TABSTOP | WB_NOBORDER | WB_NO_DIRECTSELECT );
- mpLightingSet->SetHelpId( HID_VALUESET_EXTRUSION_LIGHTING );
-
- mpLightingSet->SetHelpId( HID_POPUP_LINEEND_CTRL );
- mpLightingSet->SetSelectHdl( LINK( this, ExtrusionLightingWindow, SelectHdl ) );
- mpLightingSet->SetColCount( 3 );
- mpLightingSet->EnableFullItemMode( FALSE );
-+ mpLightingSet->Show( );
-
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
-
-@@ -893,17 +941,60 @@ void ExtrusionLightingWindow::implInit()
- }
- }
- mpLightingSet->SetOutputSizePixel( Size( 72, 72 ) );
--
-- mpMenu->appendEntry( 3, mpLightingSet );
-- mpMenu->appendSeparator();
-- mpMenu->appendEntry( 0, String( SVX_RES( STR_BRIGHT ) ), bHighContrast ? maImgBrighth : maImgBright );
-- mpMenu->appendEntry( 1, String( SVX_RES( STR_NORMAL ) ), bHighContrast ? maImgNormalh : maImgNormal );
-- mpMenu->appendEntry( 2, String( SVX_RES( STR_DIM ) ), bHighContrast ? maImgDimh : maImgDim );
--
-- SetOutputSizePixel( mpMenu->getMenuSize() );
-- mpMenu->SetOutputSizePixel( GetOutputSizePixel() );
--
-- mpMenu->Show();
-+ mpLightingSet->SetPosPixel( Point( 19, 19 ) );
-+
-+ // Configure FixedLine
-+ mpSeparator = new FixedLine( this );
-+ mpSeparator->SetPosPixel( Point( 2, 93 ) );
-+ mpSeparator->SetSizePixel( Size( 106, 3 ) );
-+ mpSeparator->Show( );
-+
-+ // Configure the Bright button here
-+ mpBrightBtn = new ImageButton( this, WinBits( WB_TOGGLE ) );
-+ mpBrightBtn->SetModeImage( bHighContrast ? maImgBrighth : maImgBright );
-+ mpBrightBtn->SetPosPixel( Point( 2, 99 ) );
-+ mpBrightBtn->SetSizePixel( Size( 24, 24 ) );
-+ mpBrightBtn->SetClickHdl( LINK( this, ExtrusionLightingWindow, SelectHdl ) );
-+ mpBrightBtn->Show( );
-+
-+ mpBrightTxt = new FixedText( this );
-+ mpBrightTxt->SetPosPixel( Point( 28, 103 ) );
-+ mpBrightTxt->SetSizePixel( Size( 80, 16 ) );
-+ mpBrightTxt->SetText( String( SVX_RES( STR_BRIGHT ) ) );
-+ mpBrightTxt->SetBackground( GetBackground( ) );
-+ mpBrightTxt->Show( );
-+
-+ // Configure the Normal button here
-+ mpNormalBtn = new ImageButton( this, WinBits( WB_TOGGLE ) );
-+ mpNormalBtn->SetModeImage( bHighContrast ? maImgNormalh : maImgNormal );
-+ mpNormalBtn->SetPosPixel( Point( 2, 125 ) );
-+ mpNormalBtn->SetSizePixel( Size( 24, 24 ) );
-+ mpNormalBtn->SetClickHdl( LINK( this, ExtrusionLightingWindow, SelectHdl ) );
-+ mpNormalBtn->Show( );
-+
-+ mpNormalTxt = new FixedText( this );
-+ mpNormalTxt->SetPosPixel( Point( 28, 129 ) );
-+ mpNormalTxt->SetSizePixel( Size( 80, 16 ) );
-+ mpNormalTxt->SetText( String( SVX_RES( STR_NORMAL ) ) );
-+ mpNormalTxt->SetBackground( GetBackground( ) );
-+ mpNormalTxt->Show( );
-+
-+ // Configure the Dim button here
-+ mpDimBtn = new ImageButton( this, WinBits( WB_TOGGLE ) );
-+ mpDimBtn->SetModeImage( bHighContrast ? maImgDimh : maImgDim );
-+ mpDimBtn->SetPosPixel( Point( 2, 151 ) );
-+ mpDimBtn->SetSizePixel( Size( 24, 24 ) );
-+ mpDimBtn->SetClickHdl( LINK( this, ExtrusionLightingWindow, SelectHdl ) );
-+ mpDimBtn->Show( );
-+
-+ mpDimTxt = new FixedText( this );
-+ mpDimTxt->SetPosPixel( Point( 28, 155 ) );
-+ mpDimTxt->SetSizePixel( Size( 80, 16 ) );
-+ mpDimTxt->SetText( String( SVX_RES( STR_DIM ) ) );
-+ mpDimTxt->SetBackground( GetBackground( ) );
-+ mpDimTxt->Show( );
-+
-+ SetOutputSizePixel( Size( 110, 177 ) );
-
- FreeResource();
-
-@@ -922,7 +1013,14 @@ SfxPopupWindow* ExtrusionLightingWindow::Clone() const
-
- ExtrusionLightingWindow::~ExtrusionLightingWindow()
- {
-- delete mpMenu;
-+ delete mpLightingSet;
-+ delete mpSeparator;
-+ delete mpBrightBtn;
-+ delete mpBrightTxt;
-+ delete mpNormalBtn;
-+ delete mpNormalTxt;
-+ delete mpDimBtn;
-+ delete mpDimTxt;
- }
-
- // -----------------------------------------------------------------------
-@@ -931,11 +1029,11 @@ void ExtrusionLightingWindow::implSetIntensity( int nLevel, bool bEnabled )
- {
- mnLevel = nLevel;
- mbLevelEnabled = bEnabled;
-+ ImageButton* buttons[] = { mpBrightBtn, mpNormalBtn, mpDimBtn };
- int i = 0;
- for( i = 0; i < 3; i++ )
- {
-- mpMenu->checkEntry( i, (i == nLevel) && bEnabled );
-- mpMenu->enableEntry( i, bEnabled );
-+ buttons[i]->SetPressed( (i == nLevel) && bEnabled );
- }
- }
-
-@@ -970,8 +1068,6 @@ void ExtrusionLightingWindow::implSetDirection( int nDirection, bool bEnabled )
- }
- }
- }
--
-- mpMenu->enableEntry( 3, bEnabled );
- }
-
- // -----------------------------------------------------------------------
-@@ -1022,9 +1118,9 @@ void ExtrusionLightingWindow::DataChanged( const DataChangedEvent& rDCEvt )
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
-
- implSetDirection( mnDirection, mbDirectionEnabled );
-- mpMenu->setEntryImage( 0, bHighContrast ? maImgBrighth : maImgBright );
-- mpMenu->setEntryImage( 1, bHighContrast ? maImgNormalh : maImgNormal );
-- mpMenu->setEntryImage( 2, bHighContrast ? maImgDimh : maImgDim );
-+ mpBrightBtn->SetModeImage( bHighContrast ? maImgBrighth : maImgBright );
-+ mpNormalBtn->SetModeImage( bHighContrast ? maImgNormalh : maImgNormal );
-+ mpDimBtn->SetModeImage( bHighContrast ? maImgDimh : maImgDim );
- }
- }
-
-@@ -1032,14 +1128,21 @@ void ExtrusionLightingWindow::DataChanged( const DataChangedEvent& rDCEvt )
-
- IMPL_LINK( ExtrusionLightingWindow, SelectHdl, void *, pControl )
- {
-- if ( IsInPopupMode() )
-- EndPopupMode();
-+ if ( GetDockingManager( )->IsInPopupMode( this ) )
-+ GetDockingManager( )->EndPopupMode( this );
-
- // SfxDispatcher* pDisp = GetBindings().GetDispatcher();
-
-- if( pControl == mpMenu )
-+ if( pControl != mpLightingSet )
- {
-- int nLevel = mpMenu->getSelectedEntryId();
-+ int nLevel = -1;
-+ if ( pControl == mpBrightBtn )
-+ nLevel = 0;
-+ else if ( pControl == mpNormalBtn )
-+ nLevel = 1;
-+ else if ( pControl == mpDimBtn )
-+ nLevel = 2;
-+
- if( nLevel >= 0 )
- {
- if( nLevel != 3 )
-@@ -1111,24 +1214,16 @@ BOOL ExtrusionLightingWindow::Close()
-
- // -----------------------------------------------------------------------
-
--void ExtrusionLightingWindow::PopupModeEnd()
--{
-- if ( IsVisible() )
-- {
-- mbPopupMode = FALSE;
-- }
-- SfxPopupWindow::PopupModeEnd();
--}
--
--// -----------------------------------------------------------------------
--
- void ExtrusionLightingWindow::GetFocus (void)
- {
- SfxPopupWindow::GetFocus();
- // Grab the focus to the line ends value set so that it can be controlled
- // with the keyboard.
-+ // TODO Fix the focus
-+#if 0
- if( mpMenu )
- mpMenu->GrabFocus();
-+#endif
- }
-
- // ========================================================================
-@@ -1157,9 +1252,9 @@ SfxPopupWindowType ExtrusionLightingControl::GetPopupWindowType() const
- SfxPopupWindow* ExtrusionLightingControl::CreatePopupWindow()
- {
- ExtrusionLightingWindow* pWin = new ExtrusionLightingWindow( GetId(), m_xFrame, &GetToolBox() );
-- pWin->StartPopupMode( &GetToolBox(), TRUE );
-+ pWin->EnableDocking(true);
-+ pWin->GetDockingManager()->StartPopupMode(&GetToolBox(),pWin);
- pWin->StartSelection();
-- SetPopupWindow( pWin );
- return pWin;
- }
-
-@@ -1185,16 +1280,7 @@ ExtrusionSurfaceWindow::ExtrusionSurfaceWindow(
- SfxPopupWindow( nId,
- rFrame,
- SVX_RES( RID_SVXFLOAT_EXTRUSION_SURFACE )),
-- maImgSurface1( SVX_RES( IMG_WIRE_FRAME ) ),
-- maImgSurface2( SVX_RES( IMG_MATTE ) ),
-- maImgSurface3( SVX_RES( IMG_PLASTIC ) ),
-- maImgSurface4( SVX_RES( IMG_METAL ) ),
-- maImgSurface1h( SVX_RES( IMG_WIRE_FRAME_H ) ),
-- maImgSurface2h( SVX_RES( IMG_MATTE_H ) ),
-- maImgSurface3h( SVX_RES( IMG_PLASTIC_H ) ),
-- maImgSurface4h( SVX_RES( IMG_METAL_H ) ),
-- mxFrame( rFrame ),
-- mbPopupMode( true )
-+ mxFrame( rFrame )
- {
- implInit();
- }
-@@ -1208,16 +1294,7 @@ ExtrusionSurfaceWindow::ExtrusionSurfaceWindow(
- rFrame,
- pParentWindow,
- SVX_RES( RID_SVXFLOAT_EXTRUSION_SURFACE )),
-- maImgSurface1( SVX_RES( IMG_WIRE_FRAME ) ),
-- maImgSurface2( SVX_RES( IMG_MATTE ) ),
-- maImgSurface3( SVX_RES( IMG_PLASTIC ) ),
-- maImgSurface4( SVX_RES( IMG_METAL ) ),
-- maImgSurface1h( SVX_RES( IMG_WIRE_FRAME_H ) ),
-- maImgSurface2h( SVX_RES( IMG_MATTE_H ) ),
-- maImgSurface3h( SVX_RES( IMG_PLASTIC_H ) ),
-- maImgSurface4h( SVX_RES( IMG_METAL_H ) ),
-- mxFrame( rFrame ),
-- mbPopupMode( true )
-+ mxFrame( rFrame )
- {
- implInit();
- }
-@@ -1226,25 +1303,48 @@ ExtrusionSurfaceWindow::ExtrusionSurfaceWindow(
-
- void ExtrusionSurfaceWindow::implInit()
- {
-+ ToolBox* pToolbar = dynamic_cast<ToolBox*>( GetParent( ) );
-+ SetText( pToolbar->GetItemText( GetId() ) );
-+
- SetHelpId( HID_POPUP_EXTRUSION_SURFACE );
-+
-+ SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor( ) );
-
-- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
-+ mpTitleTxt = new FixedText( this );
-+ mpTitleTxt->SetPosPixel( Point( 2, 2 ) );
-+ mpTitleTxt->SetSizePixel( Size( 106, 15 ) );
-+ mpTitleTxt->SetText( GetText( ) );
-+ Font& aFont = const_cast<Font&>( mpTitleTxt->GetFont( ) );
-+ aFont.SetWeight( WEIGHT_BOLD );
-+ mpTitleTxt->SetFont( aFont );
-+ mpTitleTxt->SetBackground( GetBackground( ) );
-+ mpTitleTxt->Show( );
-
--// mpSurfaceForewarder = new SfxStatusForwarder( SID_EXTRUSION_SURFACE, *this );
-
-- mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN );
-- mpMenu->SetHelpId( HID_MENU_EXTRUSION_SURFACE );
-- mpMenu->SetSelectHdl( LINK( this, ExtrusionSurfaceWindow, SelectHdl ) );
-+ bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
-
-- mpMenu->appendEntry( 0, String( SVX_RES( STR_WIREFRAME ) ), bHighContrast ? maImgSurface1h : maImgSurface1 );
-- mpMenu->appendEntry( 1, String( SVX_RES( STR_MATTE ) ), bHighContrast ? maImgSurface2h : maImgSurface2 );
-- mpMenu->appendEntry( 2, String( SVX_RES( STR_PLASTIC ) ), bHighContrast ? maImgSurface3h : maImgSurface3 );
-- mpMenu->appendEntry( 3, String( SVX_RES( STR_METAL ) ), bHighContrast ? maImgSurface4h : maImgSurface4 );
-+// mpSurfaceForewarder = new SfxStatusForwarder( SID_EXTRUSION_SURFACE, *this );
-
-- SetOutputSizePixel( mpMenu->getMenuSize() );
-- mpMenu->SetOutputSizePixel( GetOutputSizePixel() );
-+ for ( int i = 0; i < 4; i++ )
-+ {
-+ mpSurfacesBtn[i] = new ImageButton( this, WinBits( WB_TOGGLE ) );
-+ mpSurfacesBtn[i]->SetPosPixel( Point( 2, i* 26 + 17 ) );
-+ mpSurfacesBtn[i]->SetSizePixel( Size( 24, 24 ) );
-+ Image aHcImage = Image( SVX_RES( IMG_WIRE_FRAME_H + i ) );
-+ Image aImage = Image( SVX_RES( IMG_WIRE_FRAME + i ) );
-+ mpSurfacesBtn[i]->SetModeImage( bHighContrast ? aHcImage : aImage );
-+ mpSurfacesBtn[i]->SetClickHdl( LINK( this, ExtrusionSurfaceWindow, SelectHdl ) );
-+ mpSurfacesBtn[i]->Show( );
-+
-+ mpSurfacesTxt[i] = new FixedText( this );
-+ mpSurfacesTxt[i]->SetText( SVX_RES( STR_WIREFRAME + i ) );
-+ mpSurfacesTxt[i]->SetPosPixel( Point( 28, i * 26 + 22 ) );
-+ mpSurfacesTxt[i]->SetSizePixel( Size( 80, 14 ) );
-+ mpSurfacesTxt[i]->SetBackground( GetBackground( ) );
-+ mpSurfacesTxt[i]->Show( );
-+ }
-
-- mpMenu->Show();
-+ SetOutputSizePixel( Size( 110, 121 ) );
-
- FreeResource();
-
-@@ -1263,22 +1363,22 @@ SfxPopupWindow* ExtrusionSurfaceWindow::Clone() const
-
- ExtrusionSurfaceWindow::~ExtrusionSurfaceWindow()
- {
--// delete mpSurfaceForewarder;
-- delete mpMenu;
-+ delete mpTitleTxt;
-+ for ( int i = 0; i < 4; i++ )
-+ {
-+ delete mpSurfacesBtn[i];
-+ delete mpSurfacesTxt[i];
-+ }
- }
-
- // -----------------------------------------------------------------------
-
- void ExtrusionSurfaceWindow::implSetSurface( int nSurface, bool bEnabled )
- {
-- if( mpMenu )
-+ int i;
-+ for( i = 0; i < 4; i++ )
- {
-- int i;
-- for( i = 0; i < 4; i++ )
-- {
-- mpMenu->checkEntry( i, (i == nSurface) && bEnabled );
-- mpMenu->enableEntry( i, bEnabled );
-- }
-+ mpSurfacesBtn[i]->SetPressed( (i == nSurface) && bEnabled );
- }
- }
-
-@@ -1315,23 +1415,37 @@ void ExtrusionSurfaceWindow::DataChanged( const DataChangedEvent& rDCEvt )
- {
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
-
-- mpMenu->appendEntry( 0, String( SVX_RES( STR_WIREFRAME ) ), bHighContrast ? maImgSurface1h : maImgSurface1 );
-- mpMenu->appendEntry( 1, String( SVX_RES( STR_MATTE ) ), bHighContrast ? maImgSurface2h : maImgSurface2 );
-- mpMenu->appendEntry( 2, String( SVX_RES( STR_PLASTIC ) ), bHighContrast ? maImgSurface3h : maImgSurface3 );
-- mpMenu->appendEntry( 3, String( SVX_RES( STR_METAL ) ), bHighContrast ? maImgSurface4h : maImgSurface4 );
-+ for ( int i = 0; i < 4; i++ )
-+ {
-+ Image aHcImage = Image( SVX_RES( IMG_WIRE_FRAME_H + i ) );
-+ Image aImage = Image( SVX_RES( IMG_WIRE_FRAME + i ) );
-+ mpSurfacesBtn[i]->SetModeImage( bHighContrast ? aHcImage : aImage );
-+ mpSurfacesBtn[i]->SetText( String( SVX_RES( STR_WIREFRAME ) ) );
-+ }
- }
- }
-
- // -----------------------------------------------------------------------
-
--IMPL_LINK( ExtrusionSurfaceWindow, SelectHdl, void *, EMPTYARG )
-+IMPL_LINK( ExtrusionSurfaceWindow, SelectHdl, void *, pControl )
- {
-- if ( IsInPopupMode() )
-- EndPopupMode();
-+ if ( GetDockingManager()->IsInPopupMode( this ) )
-+ {
-+ GetDockingManager()->EndPopupMode( this );
-+ doLazyDelete();
-+ }
-
- // SfxDispatcher* pDisp = GetBindings().GetDispatcher();
-
-- sal_Int32 nSurface = mpMenu->getSelectedEntryId();
-+ sal_Int32 nSurface = -1;
-+ int i = 0;
-+ while ( nSurface < 0 && i < 4 )
-+ {
-+ if ( pControl == mpSurfacesBtn[i] )
-+ nSurface = i;
-+ i++;
-+ }
-+
- if( nSurface >= 0 )
- {
- SfxInt32Item aItem( SID_EXTRUSION_SURFACE, nSurface );
-@@ -1371,24 +1485,16 @@ BOOL ExtrusionSurfaceWindow::Close()
-
- // -----------------------------------------------------------------------
-
--void ExtrusionSurfaceWindow::PopupModeEnd()
--{
-- if ( IsVisible() )
-- {
-- mbPopupMode = FALSE;
-- }
-- SfxPopupWindow::PopupModeEnd();
--}
--
--// -----------------------------------------------------------------------
--
- void ExtrusionSurfaceWindow::GetFocus (void)
- {
- SfxPopupWindow::GetFocus();
- // Grab the focus to the line ends value set so that it can be controlled
- // with the keyboard.
-+ // TODO Fix the focus problem
-+#if 0
- if( mpMenu )
- mpMenu->GrabFocus();
-+#endif
- }
-
- // ========================================================================
-@@ -1418,9 +1524,10 @@ SfxPopupWindowType ExtrusionSurfaceControl::GetPopupWindowType() const
- SfxPopupWindow* ExtrusionSurfaceControl::CreatePopupWindow()
- {
- ExtrusionSurfaceWindow* pWin = new ExtrusionSurfaceWindow( GetId(), m_xFrame, &GetToolBox() );
-- pWin->StartPopupMode( &GetToolBox(), TRUE );
-+
-+ pWin->EnableDocking(true);
-+ pWin->GetDockingManager()->StartPopupMode(&GetToolBox(),pWin);
- pWin->StartSelection();
-- SetPopupWindow( pWin );
- return pWin;
- }
-
-diff --git svx/source/tbxctrls/extrusioncontrols.src svx/source/tbxctrls/extrusioncontrols.src
-index 96c4439..99c3c95 100644
---- svx/source/tbxctrls/extrusioncontrols.src
-+++ svx/source/tbxctrls/extrusioncontrols.src
-@@ -32,14 +32,6 @@
-
- FloatingWindow RID_SVXFLOAT_EXTRUSION_DIRECTION
- {
-- Border = TRUE ;
-- Hide = TRUE ;
-- SVLook = TRUE ;
-- Sizeable = FALSE ;
-- Moveable = TRUE ;
-- Closeable = TRUE ;
-- Zoomable = TRUE ;
--
- Text [ en-US ] = "Extrusion Direction" ;
-
- Image IMG_DIRECTION + DIRECTION_NW
-@@ -202,14 +194,6 @@ FloatingWindow RID_SVXFLOAT_EXTRUSION_DIRECTION
-
- FloatingWindow RID_SVXFLOAT_EXTRUSION_DEPTH
- {
-- Border = TRUE ;
-- Hide = TRUE ;
-- SVLook = TRUE ;
-- Sizeable = FALSE ;
-- Moveable = TRUE ;
-- Closeable = TRUE ;
-- Zoomable = TRUE ;
--
- Text [ en-US ] = "Extrusion Depth" ;
-
- String STR_CUSTOM
-@@ -291,14 +275,6 @@ FloatingWindow RID_SVXFLOAT_EXTRUSION_DEPTH
-
- FloatingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING
- {
-- Border = TRUE ;
-- Hide = TRUE ;
-- SVLook = TRUE ;
-- Sizeable = FALSE ;
-- Moveable = TRUE ;
-- Closeable = TRUE ;
-- Zoomable = TRUE ;
--
- Text [ en-US ] = "Extrusion Lighting" ;
-
- Image IMG_LIGHT_OFF + FROM_TOP_LEFT
-@@ -607,14 +583,6 @@ FloatingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING
-
- FloatingWindow RID_SVXFLOAT_EXTRUSION_SURFACE
- {
-- Border = TRUE ;
-- Hide = TRUE ;
-- SVLook = TRUE ;
-- Sizeable = FALSE ;
-- Moveable = TRUE ;
-- Closeable = TRUE ;
-- Zoomable = TRUE ;
--
- Text [ en-US ] = "Extrusion Surface" ;
-
- String STR_WIREFRAME
-diff --git svx/source/tbxctrls/fontworkgallery.cxx svx/source/tbxctrls/fontworkgallery.cxx
-index 5d4cc29..abeec3b 100644
---- svx/source/tbxctrls/fontworkgallery.cxx
-+++ svx/source/tbxctrls/fontworkgallery.cxx
-@@ -348,18 +348,7 @@ FontWorkAlignmentWindow::FontWorkAlignmentWindow(
- SfxPopupWindow( nId,
- rFrame,
- SVX_RES( RID_SVXFLOAT_FONTWORK_ALIGNMENT )),
-- maImgAlgin1( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16 ) ),
-- maImgAlgin2( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16 ) ),
-- maImgAlgin3( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16 ) ),
-- maImgAlgin4( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16 ) ),
-- maImgAlgin5( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16 ) ),
-- maImgAlgin1h( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16_H ) ),
-- maImgAlgin2h( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16_H ) ),
-- maImgAlgin3h( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16_H ) ),
-- maImgAlgin4h( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16_H ) ),
-- maImgAlgin5h( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16_H ) ),
-- mxFrame( rFrame ),
-- mbPopupMode( true )
-+ mxFrame( rFrame )
- {
- SetHelpId( HID_WIN_FONTWORK_ALIGN );
- implInit();
-@@ -373,18 +362,7 @@ FontWorkAlignmentWindow::FontWorkAlignmentWindow(
- SfxPopupWindow( nId,
- rFrame,
- SVX_RES( RID_SVXFLOAT_FONTWORK_ALIGNMENT )),
-- maImgAlgin1( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16 ) ),
-- maImgAlgin2( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16 ) ),
-- maImgAlgin3( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16 ) ),
-- maImgAlgin4( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16 ) ),
-- maImgAlgin5( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16 ) ),
-- maImgAlgin1h( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16_H ) ),
-- maImgAlgin2h( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16_H ) ),
-- maImgAlgin3h( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16_H ) ),
-- maImgAlgin4h( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16_H ) ),
-- maImgAlgin5h( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16_H ) ),
-- mxFrame( rFrame ),
-- mbPopupMode( true )
-+ mxFrame( rFrame )
- {
- SetHelpId( HID_WIN_FONTWORK_ALIGN );
- implInit();
-@@ -394,22 +372,40 @@ void FontWorkAlignmentWindow::implInit()
- {
- SetHelpId( HID_POPUP_FONTWORK_ALIGN );
-
-- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
-+ SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor( ) );
-
-- mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN );
-- mpMenu->SetHelpId( HID_POPUP_FONTWORK_ALIGN );
-- mpMenu->SetSelectHdl( LINK( this, FontWorkAlignmentWindow, SelectHdl ) );
-+ mpTitleTxt = new FixedText( this );
-+ mpTitleTxt->SetPosPixel( Point( 2, 2 ) );
-+ mpTitleTxt->SetSizePixel( Size( 116, 15 ) );
-+ mpTitleTxt->SetText( GetText( ) );
-+ Font& aFont = const_cast<Font&>( mpTitleTxt->GetFont( ) );
-+ aFont.SetWeight( WEIGHT_BOLD );
-+ mpTitleTxt->SetFont( aFont );
-+ mpTitleTxt->SetBackground( GetBackground( ) );
-+ mpTitleTxt->Show( );
-
-- mpMenu->appendEntry( 0, String( SVX_RES( STR_ALIGN_LEFT ) ), bHighContrast ? maImgAlgin1h : maImgAlgin1 );
-- mpMenu->appendEntry( 1, String( SVX_RES( STR_ALIGN_CENTER ) ), bHighContrast ? maImgAlgin2h : maImgAlgin2 );
-- mpMenu->appendEntry( 2, String( SVX_RES( STR_ALIGN_RIGHT ) ), bHighContrast ? maImgAlgin3h : maImgAlgin3 );
-- mpMenu->appendEntry( 3, String( SVX_RES( STR_ALIGN_WORD ) ), bHighContrast ? maImgAlgin4h : maImgAlgin4 );
-- mpMenu->appendEntry( 4, String( SVX_RES( STR_ALIGN_STRETCH ) ), bHighContrast ? maImgAlgin5h : maImgAlgin5 );
-+ bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
-
-- SetOutputSizePixel( mpMenu->getMenuSize() );
-- mpMenu->SetOutputSizePixel( GetOutputSizePixel() );
-+ for ( int i = 0; i < 5; i++ )
-+ {
-+ mpAlignsBtn[i] = new ImageButton( this, WinBits( WB_TOGGLE ) );
-+ mpAlignsBtn[i]->SetPosPixel( Point( 2, i* 26 + 17 ) );
-+ mpAlignsBtn[i]->SetSizePixel( Size( 24, 24 ) );
-+ Image aHcImage = Image( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16_H + i * 2) );
-+ Image aImage = Image( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16 + i * 2 ) );
-+ mpAlignsBtn[i]->SetModeImage( bHighContrast ? aHcImage : aImage );
-+ mpAlignsBtn[i]->SetClickHdl( LINK( this, FontWorkAlignmentWindow, SelectHdl ) );
-+ mpAlignsBtn[i]->Show( );
-+
-+ mpAlignsTxt[i] = new FixedText( this );
-+ mpAlignsTxt[i]->SetText( SVX_RES( STR_ALIGN_LEFT + i ) );
-+ mpAlignsTxt[i]->SetPosPixel( Point( 28, i * 26 + 22 ) );
-+ mpAlignsTxt[i]->SetSizePixel( Size( 90, 14 ) );
-+ mpAlignsTxt[i]->SetBackground( GetBackground( ) );
-+ mpAlignsTxt[i]->Show( );
-+ }
-
-- mpMenu->Show();
-+ SetOutputSizePixel( Size( 120, 147 ) );
-
- FreeResource();
-
-@@ -425,21 +421,23 @@ SfxPopupWindow* FontWorkAlignmentWindow::Clone() const
-
- FontWorkAlignmentWindow::~FontWorkAlignmentWindow()
- {
-- delete mpMenu;
-+ delete mpTitleTxt;
-+
-+ for ( int i = 0; i < 5; i++ )
-+ {
-+ delete mpAlignsBtn[i];
-+ delete mpAlignsTxt[i];
-+ }
- }
-
- // -----------------------------------------------------------------------
-
- void FontWorkAlignmentWindow::implSetAlignment( int nSurface, bool bEnabled )
- {
-- if( mpMenu )
-+ int i;
-+ for( i = 0; i < 5; i++ )
- {
-- int i;
-- for( i = 0; i < 5; i++ )
-- {
-- mpMenu->checkEntry( i, (i == nSurface) && bEnabled );
-- mpMenu->enableEntry( i, bEnabled );
-- }
-+ mpAlignsBtn[i]->SetPressed( (i == nSurface) && bEnabled );
- }
- }
-
-@@ -476,24 +474,37 @@ void FontWorkAlignmentWindow::DataChanged( const DataChangedEvent& rDCEvt )
- {
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
-
-- mpMenu->appendEntry( 0, String( SVX_RES( STR_ALIGN_LEFT ) ), bHighContrast ? maImgAlgin1h : maImgAlgin1 );
-- mpMenu->appendEntry( 1, String( SVX_RES( STR_ALIGN_CENTER ) ), bHighContrast ? maImgAlgin2h : maImgAlgin2 );
-- mpMenu->appendEntry( 2, String( SVX_RES( STR_ALIGN_RIGHT ) ), bHighContrast ? maImgAlgin3h : maImgAlgin3 );
-- mpMenu->appendEntry( 3, String( SVX_RES( STR_ALIGN_WORD ) ), bHighContrast ? maImgAlgin4h : maImgAlgin4 );
-- mpMenu->appendEntry( 4, String( SVX_RES( STR_ALIGN_STRETCH ) ), bHighContrast ? maImgAlgin5h : maImgAlgin5 );
-+ for ( int i = 0; i < 5; i++ )
-+ {
-+ Image aHcImage = Image( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16_H + i * 2) );
-+ Image aImage = Image( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16 + i * 2 ) );
-+ mpAlignsBtn[i]->SetModeImage( bHighContrast ? aHcImage : aImage );
-+ mpAlignsTxt[i]->SetText( SVX_RES( STR_ALIGN_LEFT + i ) );
-+ }
- }
- }
-
- // -----------------------------------------------------------------------
-
--IMPL_LINK( FontWorkAlignmentWindow, SelectHdl, void *, EMPTYARG )
-+IMPL_LINK( FontWorkAlignmentWindow, SelectHdl, void *, pControl )
- {
-- if ( IsInPopupMode() )
-- EndPopupMode();
-+ if ( GetDockingManager()->IsInPopupMode( this ) )
-+ {
-+ GetDockingManager()->EndPopupMode( this );
-+ doLazyDelete();
-+ }
-
- // SfxDispatcher* pDisp = GetBindings().GetDispatcher();
-
-- sal_Int32 nAlignment = mpMenu->getSelectedEntryId();
-+ sal_Int32 nAlignment = -1;
-+ int i = 0;
-+ while ( i < 5 && nAlignment < 0 )
-+ {
-+ if ( mpAlignsBtn[i] == pControl )
-+ nAlignment = i;
-+ i++;
-+ }
-+
- if( nAlignment >= 0 )
- {
- SfxInt32Item aItem( SID_FONTWORK_ALIGNMENT, nAlignment );
-@@ -532,24 +543,16 @@ BOOL FontWorkAlignmentWindow::Close()
-
- // -----------------------------------------------------------------------
-
--void FontWorkAlignmentWindow::PopupModeEnd()
--{
-- if ( IsVisible() )
-- {
-- mbPopupMode = FALSE;
-- }
-- SfxPopupWindow::PopupModeEnd();
--}
--
--// -----------------------------------------------------------------------
--
- void FontWorkAlignmentWindow::GetFocus (void)
- {
- SfxPopupWindow::GetFocus();
- // Grab the focus to the line ends value set so that it can be controlled
- // with the keyboard.
-+ // TODO Fix the focus problem
-+#if 0
- if( mpMenu )
- mpMenu->GrabFocus();
-+#endif
- }
-
- // ========================================================================
-@@ -579,9 +582,9 @@ SfxPopupWindowType FontWorkAlignmentControl::GetPopupWindowType() const
- SfxPopupWindow* FontWorkAlignmentControl::CreatePopupWindow()
- {
- FontWorkAlignmentWindow* pWin = new FontWorkAlignmentWindow( GetId(), m_xFrame, &GetToolBox() );
-- pWin->StartPopupMode( &GetToolBox(), TRUE );
-+ pWin->EnableDocking( true );
-+ pWin->GetDockingManager()->StartPopupMode( &GetToolBox(), pWin );
- pWin->StartSelection();
-- SetPopupWindow( pWin );
- return pWin;
- }
-
-@@ -607,8 +610,7 @@ FontWorkCharacterSpacingWindow::FontWorkCharacterSpacingWindow(
- SfxPopupWindow( nId,
- rFrame,
- SVX_RES( RID_SVXFLOAT_FONTWORK_CHARSPACING )),
-- mxFrame( rFrame ),
-- mbPopupMode( true )
-+ mxFrame( rFrame )
- {
- SetHelpId( HID_WIN_FONTWORK_CHARSPACE );
- implInit();
-@@ -623,8 +625,7 @@ FontWorkCharacterSpacingWindow::FontWorkCharacterSpacingWindow(
- rFrame,
- pParentWindow,
- SVX_RES( RID_SVXFLOAT_FONTWORK_CHARSPACING )),
-- mxFrame( rFrame ),
-- mbPopupMode( true )
-+ mxFrame( rFrame )
- {
- SetHelpId( HID_WIN_FONTWORK_CHARSPACE );
- implInit();
-@@ -768,8 +769,11 @@ void FontWorkCharacterSpacingWindow::DataChanged( const DataChangedEvent& rDCEvt
-
- IMPL_LINK( FontWorkCharacterSpacingWindow, SelectHdl, void *, EMPTYARG )
- {
-- if ( IsInPopupMode() )
-- EndPopupMode();
-+ if ( GetDockingManager()->IsInPopupMode( this ) )
-+ {
-+ GetDockingManager()->EndPopupMode( this );
-+ doLazyDelete();
-+ }
-
- sal_Int32 nSelection = mpMenu->getSelectedEntryId();
- sal_Int32 nCharacterSpacing;
-@@ -853,17 +857,6 @@ BOOL FontWorkCharacterSpacingWindow::Close()
-
- // -----------------------------------------------------------------------
-
--void FontWorkCharacterSpacingWindow::PopupModeEnd()
--{
-- if ( IsVisible() )
-- {
-- mbPopupMode = FALSE;
-- }
-- SfxPopupWindow::PopupModeEnd();
--}
--
--// -----------------------------------------------------------------------
--
- void FontWorkCharacterSpacingWindow::GetFocus (void)
- {
- SfxPopupWindow::GetFocus();
-@@ -900,9 +893,9 @@ SfxPopupWindowType FontWorkCharacterSpacingControl::GetPopupWindowType() const
- SfxPopupWindow* FontWorkCharacterSpacingControl::CreatePopupWindow()
- {
- FontWorkCharacterSpacingWindow* pWin = new FontWorkCharacterSpacingWindow( GetId(), m_xFrame, &GetToolBox() );
-- pWin->StartPopupMode( &GetToolBox(), TRUE );
-+ pWin->EnableDocking( true );
-+ pWin->GetDockingManager()->StartPopupMode( &GetToolBox(), pWin );
- pWin->StartSelection();
-- SetPopupWindow( pWin );
- return pWin;
- }
-
-diff --git svx/source/tbxctrls/fontworkgallery.src svx/source/tbxctrls/fontworkgallery.src
-index e2e6e47..f37964e 100644
---- svx/source/tbxctrls/fontworkgallery.src
-+++ svx/source/tbxctrls/fontworkgallery.src
-@@ -94,14 +94,6 @@ ModalDialog RID_SVX_MDLG_FONTWORK_GALLERY
-
- FloatingWindow RID_SVXFLOAT_FONTWORK_ALIGNMENT
- {
-- Border = TRUE ;
-- Hide = TRUE ;
-- SVLook = TRUE ;
-- Sizeable = FALSE ;
-- Moveable = TRUE ;
-- Closeable = TRUE ;
-- Zoomable = TRUE ;
--
- Text [ en-US ] = "Fontwork Alignment" ;
-
- String STR_ALIGN_LEFT
-@@ -229,14 +221,6 @@ FloatingWindow RID_SVXFLOAT_FONTWORK_ALIGNMENT
-
- FloatingWindow RID_SVXFLOAT_FONTWORK_CHARSPACING
- {
-- Border = TRUE ;
-- Hide = TRUE ;
-- SVLook = TRUE ;
-- Sizeable = FALSE ;
-- Moveable = TRUE ;
-- Closeable = TRUE ;
-- Zoomable = TRUE ;
--
- Text [ en-US ] = "Fontwork Character Spacing" ;
-
- String STR_CHARS_SPACING_VERY_TIGHT
-diff --git svx/source/tbxctrls/linectrl.cxx svx/source/tbxctrls/linectrl.cxx
-index 2a69a5f..20b73e9 100644
---- svx/source/tbxctrls/linectrl.cxx
-+++ svx/source/tbxctrls/linectrl.cxx
-@@ -382,14 +382,13 @@ SvxLineEndWindow::SvxLineEndWindow(
- const String& rWndTitle ) :
- SfxPopupWindow( nSlotId,
- rFrame,
-- WinBits( WB_BORDER | WB_STDFLOATWIN | WB_SIZEABLE | WB_3DLOOK ) ),
-+ WinBits( WB_DIALOGCONTROL | WB_SYSTEMWINDOW ) ),
-+ aTitle ( this, WinBits( ) ),
- pLineEndList ( NULL ),
- aLineEndSet ( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
- nCols ( 2 ),
- nLines ( 12 ),
- nLineEndWidth ( 400 ),
-- bPopupMode ( TRUE ),
-- mbInResize ( false ),
- mxFrame ( rFrame )
- {
- SetText( rWndTitle );
-@@ -404,14 +403,13 @@ SvxLineEndWindow::SvxLineEndWindow(
- SfxPopupWindow( nSlotId,
- rFrame,
- pParentWindow,
-- WinBits( WB_BORDER | WB_STDFLOATWIN | WB_SIZEABLE | WB_3DLOOK ) ),
-+ WinBits( WB_DIALOGCONTROL | WB_SYSTEMWINDOW ) ),
-+ aTitle ( this, WinBits( ) ),
- pLineEndList ( NULL ),
- aLineEndSet ( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
- nCols ( 2 ),
- nLines ( 12 ),
- nLineEndWidth ( 400 ),
-- bPopupMode ( TRUE ),
-- mbInResize ( false ),
- mxFrame ( rFrame )
- {
- SetText( rWndTitle );
-@@ -423,6 +421,8 @@ void SvxLineEndWindow::implInit()
- SfxObjectShell* pDocSh = SfxObjectShell::Current();
- const SfxPoolItem* pItem = NULL;
-
-+ SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor( ) );
-+
- SetHelpId( HID_POPUP_LINEEND );
- aLineEndSet.SetHelpId( HID_POPUP_LINEEND_CTRL );
-
-@@ -444,10 +444,23 @@ void SvxLineEndWindow::implInit()
- // ValueSet mit Eintraegen der LineEndList fuellen
- FillValueSet();
-
-+ aTitle.SetText( GetText() );
-+ aTitle.SetBackground( GetBackground( ) );
-+ Font& aFont = const_cast<Font&>( aTitle.GetFont( ) );
-+ aFont.SetWeight( WEIGHT_BOLD );
-+ aTitle.SetFont( aFont );
-+ Size aSize = GetOutputSizePixel( );
-+ aSize.Height() = 15;
-+ aTitle.SetSizePixel( aSize );
-+ aTitle.SetPosPixel( Point( 2, 2 ) );
-+ aTitle.Show( );
-+
-+
- AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:LineEndListState" )));
-
- //ChangeHelpId( HID_POPUP_LINEENDSTYLE );
- aLineEndSet.Show();
-+ aLineEndSet.GetFocus();
- }
-
- SfxPopupWindow* SvxLineEndWindow::Clone() const
-@@ -488,8 +501,11 @@ IMPL_LINK( SvxLineEndWindow, SelectHdl, void *, EMPTYARG )
- pLineEndItem = new XLineEndItem( pEntry->GetName(), pEntry->GetLineEnd() );
- }
-
-- if ( IsInPopupMode() )
-- EndPopupMode();
-+ if ( GetDockingManager()->IsInPopupMode( this ) )
-+ {
-+ GetDockingManager()->EndPopupMode( this );
-+ doLazyDelete();
-+ }
-
- Sequence< PropertyValue > aArgs( 1 );
- Any a;
-@@ -574,79 +590,6 @@ void SvxLineEndWindow::FillValueSet()
-
- // -----------------------------------------------------------------------
-
--void SvxLineEndWindow::Resize()
--{
-- // since we change the size inside this call, check if we
-- // are called recursive
-- if( !mbInResize )
-- {
-- mbInResize = true;
-- if ( !IsRollUp() )
-- {
-- aLineEndSet.SetColCount( nCols );
-- aLineEndSet.SetLineCount( nLines );
--
-- SetSize();
--
-- Size aSize = GetOutputSizePixel();
-- aSize.Width() -= 4;
-- aSize.Height() -= 4;
-- aLineEndSet.SetPosSizePixel( Point( 2, 2 ), aSize );
-- }
-- //SfxPopupWindow::Resize();
-- mbInResize = false;
-- }
--}
--
--// -----------------------------------------------------------------------
--
--void __EXPORT SvxLineEndWindow::Resizing( Size& rNewSize )
--{
-- Size aBitmapSize = aBmpSize; // -> Member
-- aBitmapSize.Width() += 6; //
-- aBitmapSize.Height() += 6; //
--
-- Size aItemSize = aLineEndSet.CalcItemSizePixel( aBitmapSize ); // -> Member
-- //Size aOldSize = GetOutputSizePixel(); // fuer Breite
--
-- USHORT nItemCount = aLineEndSet.GetItemCount(); // -> Member
--
-- // Spalten ermitteln
-- long nItemW = aItemSize.Width();
-- long nW = rNewSize.Width();
-- nCols = (USHORT) Max( ( (ULONG)(( nW + nItemW ) / ( nItemW * 2 ) )),
-- (ULONG) 1L );
-- nCols *= 2;
--
-- // Reihen ermitteln
-- long nItemH = aItemSize.Height();
-- long nH = rNewSize.Height();
-- nLines = (USHORT) Max( ( ( nH + nItemH / 2 ) / nItemH ), 1L );
--
-- USHORT nMaxCols = nItemCount / nLines;
-- if( nItemCount % nLines )
-- nMaxCols++;
-- if( nCols > nMaxCols )
-- nCols = nMaxCols;
-- nW = nItemW * nCols;
--
-- // Keine ungerade Anzahl von Spalten
-- if( nCols % 2 )
-- nCols--;
-- nCols = Max( nCols, (USHORT) 2 );
--
-- USHORT nMaxLines = nItemCount / nCols;
-- if( nItemCount % nCols )
-- nMaxLines++;
-- if( nLines > nMaxLines )
-- nLines = nMaxLines;
-- nH = nItemH * nLines;
--
-- rNewSize.Width() = nW;
-- rNewSize.Height() = nH;
--}
--// -----------------------------------------------------------------------
--
- void SvxLineEndWindow::StartSelection()
- {
- aLineEndSet.StartSelection();
-@@ -674,28 +617,12 @@ void SvxLineEndWindow::StateChanged(
-
- aLineEndSet.Clear();
- FillValueSet();
--
-- Size aSize = GetOutputSizePixel();
-- Resizing( aSize );
-- Resize();
- }
- }
- }
-
- // -----------------------------------------------------------------------
-
--void SvxLineEndWindow::PopupModeEnd()
--{
-- if ( IsVisible() )
-- {
-- bPopupMode = FALSE;
-- SetSize();
-- }
-- SfxPopupWindow::PopupModeEnd();
--}
--
--// -----------------------------------------------------------------------
--
- void SvxLineEndWindow::SetSize()
- {
- //if( !bPopupMode )
-@@ -718,12 +645,12 @@ void SvxLineEndWindow::SetSize()
- aSize.Width() += 6;
- aSize.Height() += 6;
- aSize = aLineEndSet.CalcWindowSizePixel( aSize );
-+ aLineEndSet.SetSizePixel( aSize );
- aSize.Width() += 4;
-- aSize.Height() += 4;
-+ aSize.Height() += 21;
- SetOutputSizePixel( aSize );
-- aSize.Height() = aBmpSize.Height();
-- aSize.Height() += 14;
-- //SetMinOutputSizePixel( aSize );
-+
-+ aLineEndSet.SetPosPixel( Point( 2, 19 ) );
- }
-
- void SvxLineEndWindow::GetFocus (void)
-@@ -734,6 +661,11 @@ void SvxLineEndWindow::GetFocus (void)
- aLineEndSet.GrabFocus();
- }
-
-+void SvxLineEndWindow::KeyInput( const KeyEvent& rKEvt )
-+{
-+ aLineEndSet.KeyInput( rKEvt );
-+}
-+
- /*************************************************************************
- |*
- |* SvxLineEndToolBoxControl
-@@ -766,9 +698,9 @@ SfxPopupWindow* SvxLineEndToolBoxControl::CreatePopupWindow()
- {
- SvxLineEndWindow* pLineEndWin =
- new SvxLineEndWindow( GetId(), m_xFrame, &GetToolBox(), SVX_RESSTR( RID_SVXSTR_LINEEND ) );
-- pLineEndWin->StartPopupMode( &GetToolBox(), TRUE );
-+ pLineEndWin->EnableDocking(true);
-+ pLineEndWin->GetDockingManager()->StartPopupMode(&GetToolBox(),pLineEndWin);
- pLineEndWin->StartSelection();
-- SetPopupWindow( pLineEndWin );
- return pLineEndWin;
- }
-
-diff --git svx/source/tbxctrls/tbcontrl.cxx svx/source/tbxctrls/tbcontrl.cxx
-index be75081..eb6cbbf 100644
---- svx/source/tbxctrls/tbcontrl.cxx
-+++ svx/source/tbxctrls/tbcontrl.cxx
-@@ -252,6 +252,7 @@ class SvxFrameWindow_Impl : public SfxPopupWindow
- using FloatingWindow::StateChanged;
-
- private:
-+ FixedText aLabel;
- SvxFrmValueSet_Impl aFrameSet;
- ImageList aImgList;
- sal_Bool bParagraphMode;
-@@ -263,6 +264,7 @@ private:
- protected:
- virtual void Resize();
- virtual BOOL Close();
-+ virtual void KeyInput( const KeyEvent& rKEvt );
- virtual Window* GetPreferredKeyInputWindow();
- virtual void GetFocus();
-
-@@ -291,6 +293,7 @@ class SvxLineWindow_Impl : public SfxPopupWindow
- {
- private:
- ValueSet aLineSet;
-+ FixedText aLabel;
- bool m_bIsWriter;
-
- #if _SOLAR__PRIVATE
-@@ -302,6 +305,7 @@ private:
- protected:
- virtual void Resize();
- virtual BOOL Close();
-+ virtual void KeyInput( const KeyEvent& rKEvt );
- virtual Window* GetPreferredKeyInputWindow();
- virtual void GetFocus();
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
-@@ -831,10 +835,11 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
- const String& rWndTitle,
- Window* pParentWindow ) :
-
-- SfxPopupWindow( nSlotId, rFrame, pParentWindow, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK|WB_DIALOGCONTROL ) ),
-+ SfxPopupWindow( nSlotId, rFrame, pParentWindow, WinBits( WB_DIALOGCONTROL | WB_SYSTEMWINDOW ) ),
-
- theSlotId( nSlotId ),
- aColorSet( this, WinBits( WB_ITEMBORDER | WB_NAMEFIELD | WB_3DLOOK | WB_NO_DIRECTSELECT) ),
-+ aLabel( this, WinBits( ) ),
- maCommand( rCommand )
-
- {
-@@ -844,6 +849,8 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
- BOOL bKillTable = FALSE;
- const Size aSize12( 13, 13 );
-
-+ SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor( ) );
-+
- if ( pDocSh )
- if ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) )
- pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
-@@ -906,16 +913,31 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
- aColorSet.SetLineCount( PALETTE_Y );
-
- lcl_CalcSizeValueSet( *this, aColorSet, aSize12 );
-+
-+ aLabel.SetText( rWndTitle );
-+ aLabel.SetBackground( GetBackground( ) );
-+ Font& aFont = const_cast<Font&>( aLabel.GetFont( ) );
-+ aFont.SetWeight( WEIGHT_BOLD );
-+ aLabel.SetFont( aFont );
-+ Size aSize = GetOutputSizePixel( );
-+ aSize.Height() = 15;
-+ aLabel.SetSizePixel( aSize );
-+ aLabel.SetPosPixel( Point( 2, 2 ) );
-+ aLabel.Show( );
-
- SetHelpId( HID_POPUP_COLOR );
- aColorSet.SetHelpId( HID_POPUP_COLOR_CTRL );
-
- SetText( rWndTitle );
- aColorSet.Show();
-+ aColorSet.GetFocus();
-
- AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ColorTableState" )));
- if ( bKillTable )
- delete pColorTable;
-+
-+ WinBits nBits = GetStyle();
-+ SetStyle( nBits & ~WB_MOVEABLE );
- }
-
- SvxColorWindow_Impl::~SvxColorWindow_Impl()
-@@ -944,8 +966,11 @@ IMPL_LINK( SvxColorWindow_Impl, SelectHdl, void *, EMPTYARG )
- while in Dispatch()), accessing members will crash in this case. */
- aColorSet.SetNoSelection();
-
-- if ( IsInPopupMode() )
-- EndPopupMode();
-+ if ( GetDockingManager()->IsInPopupMode( this ) )
-+ {
-+ GetDockingManager()->EndPopupMode( this );
-+ doLazyDelete();
-+ }
-
- if ( !nItemId && ( SID_ATTR_CHAR_COLOR_BACKGROUND == theSlotId || SID_BACKGROUND_COLOR == theSlotId ) )
- {
-@@ -1057,11 +1082,17 @@ void SvxColorWindow_Impl::StateChanged( USHORT nSID, SfxItemState eState, const
-
- SvxFrameWindow_Impl::SvxFrameWindow_Impl( USHORT nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) :
-
-- SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK | WB_DIALOGCONTROL ) ),
-+ SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_DIALOGCONTROL | WB_SYSTEMWINDOW ) ),
-+ aLabel( this, WinBits( ) ),
- aFrameSet ( this, WinBits( WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
- bParagraphMode(sal_False)
-
- {
-+ WinBits nBits = GetStyle();
-+ SetStyle( nBits & ~WB_MOVEABLE );
-+
-+ SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor( ) );
-+
- BindListener();
- String sCommand(String::CreateFromAscii( ".uno:BorderReducedMode" ));
- AddStatusListener( sCommand );
-@@ -1091,10 +1122,22 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( USHORT nId, const Reference< XFrame >&
- aFrameSet.SetSelectHdl( LINK( this, SvxFrameWindow_Impl, SelectHdl ) );
-
- lcl_CalcSizeValueSet( *this, aFrameSet,Size( 20, 20 ));
-+
-+ aLabel.SetText( SVX_RESSTR( RID_SVXSTR_FRAME ) );
-+ aLabel.SetBackground( GetBackground( ) );
-+ Font& aFont = const_cast<Font&>( aLabel.GetFont( ) );
-+ aFont.SetWeight( WEIGHT_BOLD );
-+ aLabel.SetFont( aFont );
-+ Size aSize = GetOutputSizePixel( );
-+ aSize.Height() = 15;
-+ aLabel.SetSizePixel( aSize );
-+ aLabel.SetPosPixel( Point( 2, 2 ) );
-+ aLabel.Show( );
-
- SetHelpId( HID_POPUP_FRAME );
- SetText( SVX_RESSTR(RID_SVXSTR_FRAME) );
- aFrameSet.Show();
-+ aFrameSet.GetFocus();
- }
- /*-- 22.09.2004 12:27:50---------------------------------------------------
-
-@@ -1110,6 +1153,11 @@ SfxPopupWindow* SvxFrameWindow_Impl::Clone() const
- return new SvxFrameWindow_Impl( GetId(), GetFrame(), GetParent() );
- }
-
-+void SvxFrameWindow_Impl::KeyInput( const KeyEvent& rKEvt )
-+{
-+ aFrameSet.KeyInput(rKEvt);
-+}
-+
- Window* SvxFrameWindow_Impl::GetPreferredKeyInputWindow()
- {
- return &aFrameSet;
-@@ -1151,6 +1199,12 @@ void SvxFrameWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )
- //
- IMPL_LINK( SvxFrameWindow_Impl, SelectHdl, void *, EMPTYARG )
- {
-+ if ( GetDockingManager()->IsInPopupMode( this ) )
-+ {
-+ GetDockingManager()->EndPopupMode( this );
-+ doLazyDelete();
-+ }
-+
- ::Color aColBlack( COL_BLACK );
- SvxBoxItem aBorderOuter( SID_ATTR_BORDER_OUTER );
- SvxBoxInfoItem aBorderInner( SID_ATTR_BORDER_INNER );
-@@ -1238,8 +1292,11 @@ IMPL_LINK( SvxFrameWindow_Impl, SelectHdl, void *, EMPTYARG )
- aBorderInner.SetValid( VALID_DISTANCE, TRUE );
- aBorderInner.SetValid( VALID_DISABLE, FALSE );
-
-- if ( IsInPopupMode() )
-- EndPopupMode();
-+ if ( GetDockingManager()->IsInPopupMode( this ) )
-+ {
-+ GetDockingManager()->EndPopupMode( this );
-+ doLazyDelete();
-+ }
-
- Any a;
- Sequence< PropertyValue > aArgs( 2 );
-@@ -1331,10 +1388,14 @@ BOOL SvxFrameWindow_Impl::Close()
-
- SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) :
-
-- SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK | WB_DIALOGCONTROL ) ),
-+ SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_DIALOGCONTROL | WB_SYSTEMWINDOW ) ),
-
-- aLineSet( this, WinBits( WB_3DLOOK | WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD | WB_NONEFIELD | WB_NO_DIRECTSELECT ) )
-+ aLineSet( this, WinBits( WB_3DLOOK | WB_ITEMBORDER | WB_NAMEFIELD | WB_NONEFIELD | WB_NO_DIRECTSELECT ) ),
-+ aLabel( this, WinBits( ) )
- {
-+ WinBits nBits = GetStyle();
-+ SetStyle( nBits & ~WB_MOVEABLE );
-+
- try
- {
- Reference< lang::XServiceInfo > xServices( rFrame->getController()->getModel(), UNO_QUERY_THROW );
-@@ -1343,6 +1404,7 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& r
- catch(const uno::Exception& )
- {
- }
-+
- Size aBmpSize( 55, 12 );
- CreateBitmaps();
-
-@@ -1351,10 +1413,22 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& r
- aLineSet.SetText( SVX_RESSTR(STR_NONE) );
-
- lcl_CalcSizeValueSet( *this, aLineSet, aBmpSize );
-+
-+ aLabel.SetText( SVX_RESSTR( RID_SVXSTR_FRAME_STYLE ) );
-+ aLabel.SetBackground( GetBackground( ) );
-+ Font& aFont = const_cast<Font&>( aLabel.GetFont( ) );
-+ aFont.SetWeight( WEIGHT_BOLD );
-+ aLabel.SetFont( aFont );
-+ Size aSize = GetOutputSizePixel( );
-+ aSize.Height() = 15;
-+ aLabel.SetSizePixel( aSize );
-+ aLabel.SetPosPixel( Point( 2, 2 ) );
-+ aLabel.Show( );
-
- SetHelpId( HID_POPUP_LINE );
- SetText( SVX_RESSTR(RID_SVXSTR_FRAME_STYLE) );
- aLineSet.Show();
-+ aLineSet.GetFocus();
- }
-
- SfxPopupWindow* SvxLineWindow_Impl::Clone() const
-@@ -1624,8 +1698,11 @@ IMPL_LINK( SvxLineWindow_Impl, SelectHdl, void *, EMPTYARG )
- else
- aLineItem.SetLine( 0 );
-
-- if ( IsInPopupMode() )
-- EndPopupMode();
-+ if ( GetDockingManager()->IsInPopupMode( this ) )
-+ {
-+ GetDockingManager()->EndPopupMode( this );
-+ doLazyDelete();
-+ }
-
- Any a;
- Sequence< PropertyValue > aArgs( 1 );
-@@ -1667,6 +1744,13 @@ BOOL SvxLineWindow_Impl::Close()
-
- // -----------------------------------------------------------------------
-
-+void SvxLineWindow_Impl::KeyInput( const KeyEvent& rKEvt )
-+{
-+ aLineSet.KeyInput( rKEvt );
-+}
-+
-+// -----------------------------------------------------------------------
-+
- Window* SvxLineWindow_Impl::GetPreferredKeyInputWindow()
- {
- return &aLineSet;
-@@ -2374,10 +2458,11 @@ SfxPopupWindow* SvxFontColorToolBoxControl::CreatePopupWindow()
- SVX_RESSTR( RID_SVXITEMS_EXTRAS_CHARCOLOR ),
- &GetToolBox() );
-
-- pColorWin->StartPopupMode( &GetToolBox(),
-- FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF );
-+ pColorWin->EnableDocking(true);
-+ pColorWin->GetDockingManager()->StartPopupMode(&GetToolBox(),pColorWin);
-+
- pColorWin->StartSelection();
-- SetPopupWindow( pColorWin );
-+
- return pColorWin;
- }
-
-@@ -2445,10 +2530,10 @@ SfxPopupWindow* SvxColorToolBoxControl::CreatePopupWindow()
- SVX_RESSTR(nResId),
- &GetToolBox() );
-
-- pColorWin->StartPopupMode( &GetToolBox(),
-- FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF );
-+ pColorWin->EnableDocking(true);
-+ pColorWin->GetDockingManager()->StartPopupMode(&GetToolBox(),pColorWin);
- pColorWin->StartSelection();
-- SetPopupWindow( pColorWin );
-+
- return pColorWin;
- }
-
-@@ -2519,16 +2604,16 @@ SfxPopupWindow* SvxFontColorExtToolBoxControl::CreatePopupWindow()
- m_aCommandURL,
- GetSlotId(),
- m_xFrame,
-- SVX_RESSTR( RID_SVXITEMS_EXTRAS_CHARCOLOR ),
-+ SVX_RESSTR( RID_SVXSTR_EXTRAS_CHARBACKGROUND ),
- &GetToolBox() );
-
- if ( GetSlotId() == SID_ATTR_CHAR_COLOR_BACKGROUND )
- pColorWin->SetText( SVX_RESSTR( RID_SVXSTR_EXTRAS_CHARBACKGROUND ) );
-
-- pColorWin->StartPopupMode( &GetToolBox(),
-- FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF );
-+ pColorWin->EnableDocking(true);
-+ pColorWin->GetDockingManager()->StartPopupMode(&GetToolBox(),pColorWin);
- pColorWin->StartSelection();
-- SetPopupWindow( pColorWin );
-+
- return pColorWin;
- }
-
-@@ -2614,9 +2699,8 @@ SfxPopupWindow* SvxFrameToolBoxControl::CreatePopupWindow()
- SvxFrameWindow_Impl* pFrameWin = new SvxFrameWindow_Impl(
- GetSlotId(), m_xFrame, &GetToolBox() );
-
-- pFrameWin->StartPopupMode( &GetToolBox(), FLOATWIN_POPUPMODE_GRABFOCUS | FLOATWIN_POPUPMODE_ALLOWTEAROFF );
-- pFrameWin->StartSelection();
-- SetPopupWindow( pFrameWin );
-+ pFrameWin->EnableDocking( true );
-+ pFrameWin->GetDockingManager()->StartPopupMode(&GetToolBox(),pFrameWin);
-
- return pFrameWin;
- }
-@@ -2663,9 +2747,13 @@ SfxPopupWindowType SvxFrameLineStyleToolBoxControl::GetPopupWindowType() const
- SfxPopupWindow* SvxFrameLineStyleToolBoxControl::CreatePopupWindow()
- {
- SvxLineWindow_Impl* pLineWin = new SvxLineWindow_Impl( GetSlotId(), m_xFrame, &GetToolBox() );
-+ pLineWin->EnableDocking( true );
-+ pLineWin->GetDockingManager()->StartPopupMode(&GetToolBox(),pLineWin);
-+#if 0
- pLineWin->StartPopupMode( &GetToolBox(), TRUE );
-- pLineWin->StartSelection();
- SetPopupWindow( pLineWin );
-+#endif
-+ pLineWin->StartSelection();
-
- return pLineWin;
- }
-@@ -2726,10 +2814,9 @@ SfxPopupWindow* SvxFrameLineColorToolBoxControl::CreatePopupWindow()
- SVX_RESSTR(RID_SVXSTR_FRAME_COLOR),
- &GetToolBox() );
-
-- pColorWin->StartPopupMode( &GetToolBox(),
-- FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF );
-+ pColorWin->EnableDocking( true );
-+ pColorWin->GetDockingManager()->StartPopupMode(&GetToolBox(),pColorWin);
- pColorWin->StartSelection();
-- SetPopupWindow( pColorWin );
- return pColorWin;
- }
-
-@@ -2845,8 +2932,8 @@ void lcl_ResizeValueSet( Window &rWin, ValueSet &rValueSet )
- {
- Size aSize = rWin.GetOutputSizePixel();
- aSize.Width() -= 4;
-- aSize.Height() -= 4;
-- rValueSet.SetPosSizePixel( Point(2,2), aSize );
-+ aSize.Height() -= 21;
-+ rValueSet.SetPosSizePixel( Point(2,19), aSize );
- }
-
- // -----------------------------------------------------------------------
-@@ -2855,7 +2942,7 @@ void lcl_CalcSizeValueSet( Window &rWin, ValueSet &rValueSet, const Size &aItemS
- {
- Size aSize = rValueSet.CalcWindowSizePixel( aItemSize );
- aSize.Width() += 4;
-- aSize.Height() += 4;
-+ aSize.Height() += 21;
- rWin.SetOutputSizePixel( aSize );
- }
-
-diff --git vcl/inc/vcl/dockwin.hxx vcl/inc/vcl/dockwin.hxx
-index b0be215..8b9686a 100644
---- vcl/inc/vcl/dockwin.hxx
-+++ vcl/inc/vcl/dockwin.hxx
-@@ -153,6 +153,7 @@ public:
- BOOL IsLocked() const;
-
- void StartPopupMode( ToolBox* pParentToolBox );
-+ void EndPopupMode( );
- BOOL IsInPopupMode() const;
-
- void TitleButtonClick( USHORT nButton );
-@@ -234,6 +235,7 @@ public:
- BOOL IsLocked( const Window *pWin );
-
- void StartPopupMode( ToolBox *pParentToolBox, const Window *pWin );
-+ void EndPopupMode( const Window *pWin );
- BOOL IsInPopupMode( const Window *pWin );
-
- // required because those methods are not virtual in Window (!!!) and must
-diff --git vcl/source/window/dockmgr.cxx vcl/source/window/dockmgr.cxx
-index d3adaf7..37fd6fb 100644
---- vcl/source/window/dockmgr.cxx
-+++ vcl/source/window/dockmgr.cxx
-@@ -90,7 +90,6 @@ public:
- virtual void SetPosSizePixel( long nX, long nY,
- long nWidth, long nHeight,
- USHORT nFlags = WINDOW_POSSIZE_ALL );
--
- ULONG GetLastTicks() const { return mnLastTicks; }
- };
-
-@@ -433,6 +432,13 @@ void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWin
- pWrapper->StartPopupMode( pParentToolBox );
- }
-
-+void DockingManager::EndPopupMode( const Window *pWindow )
-+{
-+ ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
-+ if( pWrapper )
-+ pWrapper->EndPopupMode( );
-+}
-+
- BOOL DockingManager::IsInPopupMode( const Window *pWindow )
- {
- ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
-@@ -531,6 +537,7 @@ public:
- virtual void Tracking( const TrackingEvent& rTEvt );
- virtual void Resize();
- virtual Window* GetPreferredKeyInputWindow();
-+ virtual void PopupModeEnd( );
-
- Rectangle GetDragRect() const;
- Point GetToolboxPosition() const;
-@@ -582,7 +589,10 @@ void ImplPopupFloatWin::ImplSetBorder()
- // we're using a special border for the grip
- // by setting those members the method SetOutputSizePixel() can
- // be used to set the proper window size
-- mpWindowImpl->mnTopBorder = 1 + POPUP_DRAGHEIGHT+2;
-+ mpWindowImpl->mnTopBorder = 1;
-+ bool bMoveable = ( mpDockingWin->GetFloatStyle() & WB_MOVEABLE) > 0;
-+ if ( bMoveable )
-+ mpWindowImpl->mnTopBorder = 1 + POPUP_DRAGHEIGHT+2;
- mpWindowImpl->mnBottomBorder = 1;
- mpWindowImpl->mnLeftBorder = 1;
- mpWindowImpl->mnRightBorder = 1;
-@@ -596,7 +606,11 @@ void ImplPopupFloatWin::Resize()
-
- Rectangle ImplPopupFloatWin::GetDragRect() const
- {
-- return Rectangle( 1, 1, GetOutputSizePixel().Width()-1, 2+POPUP_DRAGHEIGHT );
-+ bool bMoveable = ( mpDockingWin->GetFloatStyle() & WB_MOVEABLE) > 0;
-+ Rectangle rect( 0, 0, GetOutputSizePixel().Width() - 1 ,0 );
-+ if ( bMoveable )
-+ rect = Rectangle( 1, 1, GetOutputSizePixel().Width()-1, 2+POPUP_DRAGHEIGHT );
-+ return rect;
- }
-
- Point ImplPopupFloatWin::GetToolboxPosition() const
-@@ -647,19 +661,22 @@ void ImplPopupFloatWin::DrawGrip()
- aRect.nLeft+=3;
- aRect.nRight-=3;
-
-- if( mbHighlight )
-- {
-- Erase( aRect );
-- DrawSelectionBackground( aRect, 2, FALSE, TRUE, FALSE );
-- }
-- else
-- {
-- SetFillColor( GetSettings().GetStyleSettings().GetFaceColor() );
-- SetLineColor();
-- DrawRect( aRect );
-+ bool bMoveable = ( mpDockingWin->GetFloatStyle() & WB_MOVEABLE) > 0;
-+ if ( bMoveable ) {
-+ if( mbHighlight )
-+ {
-+ Erase( aRect );
-+ DrawSelectionBackground( aRect, 2, FALSE, TRUE, FALSE );
-+ }
-+ else
-+ {
-+ SetFillColor( GetSettings().GetStyleSettings().GetFaceColor() );
-+ SetLineColor();
-+ DrawRect( aRect );
-+ }
- }
-
-- if( !ToolBox::AlwaysLocked() ) // no grip if toolboxes are locked
-+ if( bMoveable && !ToolBox::AlwaysLocked() ) // no grip if toolboxes are locked
- {
- #ifdef TEAROFF_DASHED
- // draw single dashed line
-@@ -730,8 +747,7 @@ void ImplPopupFloatWin::Paint( const Rectangle& )
- void ImplPopupFloatWin::MouseMove( const MouseEvent& rMEvt )
- {
- Point aMousePos = rMEvt.GetPosPixel();
--
-- if( !ToolBox::AlwaysLocked() ) // no tear off if locking is enabled
-+ if( ( ( GetStyle( ) & WB_MOVEABLE ) > 0 ) && !ToolBox::AlwaysLocked() ) // no tear off if locking is enabled
- {
- if( rMEvt.IsLeft() && GetDragRect().IsInside( aMousePos ) )
- {
-@@ -793,6 +809,10 @@ void ImplPopupFloatWin::Tracking( const TrackingEvent& rTEvt )
- }
- }
-
-+void ImplPopupFloatWin::PopupModeEnd( )
-+{
-+ mpDockingWin->GetWindow()->doLazyDelete( );
-+}
-
- // =======================================================================
-
-@@ -1235,14 +1255,10 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox )
- ULONG nFlags = FLOATWIN_POPUPMODE_ALLOWTEAROFF |
- FLOATWIN_POPUPMODE_NOFOCUSCLOSE |
- FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE |
-- FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE;
-+ FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE |
-+ FLOATWIN_POPUPMODE_GRABFOCUS;
- // |FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE;
-
-- // if the subtoolbar was opened via keyboard make sure that key events
-- // will go into subtoolbar
-- if( pParentToolBox->IsKeyEvent() )
-- nFlags |= FLOATWIN_POPUPMODE_GRABFOCUS;
--
- mpFloatWin->StartPopupMode( pParentToolBox, nFlags );
- GetWindow()->Show();
-
-@@ -1254,6 +1270,11 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox )
- }
- }
-
-+void ImplDockingWindowWrapper::EndPopupMode( )
-+{
-+ mpFloatWin->EndPopupMode();
-+}
-+
- IMPL_LINK( ImplDockingWindowWrapper, PopupModeEnd, void*, EMPTYARG )
- {
- GetWindow()->Show( FALSE, SHOW_NOFOCUSCHANGE );
diff --git a/patches/dev300/toolbar-decorations-rsc.diff b/patches/dev300/toolbar-decorations-rsc.diff
deleted file mode 100644
index 0802d95..0000000
--- a/patches/dev300/toolbar-decorations-rsc.diff
+++ /dev/null
@@ -1,70 +0,0 @@
----
- rsc/inc/rscdb.hxx | 1 +
- rsc/inc/vclrsc.hxx | 5 +++++
- rsc/source/parser/rscicpx.cxx | 1 +
- rsc/source/parser/rscinit.cxx | 2 ++
- 4 files changed, 9 insertions(+), 0 deletions(-)
-
-diff --git rsc/inc/rscdb.hxx rsc/inc/rscdb.hxx
-index a5c60a3..3b6a235 100644
---- rsc/inc/rscdb.hxx
-+++ rsc/inc/rscdb.hxx
-@@ -97,6 +97,7 @@ class RscTypCont
- Atom nMinimizeId;
- Atom nMaximizeId;
- Atom nCloseableId;
-+ Atom nStdPopupId;
- Atom nAppId;
- Atom nTabstopId;
- Atom nGroupId;
-diff --git rsc/inc/vclrsc.hxx rsc/inc/vclrsc.hxx
-index d565984..6ffd933 100644
---- rsc/inc/vclrsc.hxx
-+++ rsc/inc/vclrsc.hxx
-@@ -84,6 +84,10 @@ typedef sal_Int64 WinBits;
- #define WB_AUTOVSCROLL ((WinBits)0x40000000)
-
- #define WB_HIDE ((WinBits)0x80000000)
-+
-+// system floating window
-+#define WB_POPUP ((WinBits)0x20000000)
-+
- #define WB_HSCROLL WB_HORZ
- #define WB_VSCROLL WB_VERT
- #define WB_TOPIMAGE WB_TOP
-@@ -152,6 +156,7 @@ typedef sal_Int64 WinBits;
- #define WB_STDMODAL (WB_STDDIALOG)
- #define WB_STDTABDIALOG (WB_STDDIALOG)
- #define WB_STDTABCONTROL 0
-+#define WB_STDPOPUP (WB_BORDER | WB_POPUP | WB_SYSTEMWINDOW | WB_3DLOOK | WB_DIALOGCONTROL)
-
- // For TreeListBox
- #define WB_HASBUTTONS ((WinBits)0x00800000)
-diff --git rsc/source/parser/rscicpx.cxx rsc/source/parser/rscicpx.cxx
-index 3fe30fb..ccebdb8 100644
---- rsc/source/parser/rscicpx.cxx
-+++ rsc/source/parser/rscicpx.cxx
-@@ -2218,6 +2218,7 @@ RscTop * RscTypCont::InitClassFloatingWindow( RscTop * pSuper,
- INS_WINBIT(pClassFloatingWindow,Zoomable)
- INS_WINBIT(pClassFloatingWindow,HideWhenDeactivate)
- INS_WINBIT(pClassFloatingWindow,EnableResizing)
-+ INS_WINBIT(pClassFloatingWindow,StdPopup)
-
- return pClassFloatingWindow;
- }
-diff --git rsc/source/parser/rscinit.cxx rsc/source/parser/rscinit.cxx
-index 0974729..7a57b4e 100644
---- rsc/source/parser/rscinit.cxx
-+++ rsc/source/parser/rscinit.cxx
-@@ -374,6 +374,8 @@ void RscTypCont::Init()
- aWinBits.SetConstant( nSingleLineId, sal::static_int_cast<INT32>(WB_SINGLELINE) );
- nSysWinId = pHS->getID( "WB_SYSTEMWINDOW" );
- aWinBits.SetConstant( nSysWinId, sal::static_int_cast<INT32>(WB_SYSTEMWINDOW) );
-+ nStdPopupId = pHS->getID( "WB_STDPOPUP" );
-+ aWinBits.SetConstant( nStdPopupId, sal::static_int_cast<INT32>(WB_STDPOPUP) );
- }
- {
- /********** I n i t B a s i c T y p e s **************************/
---
-1.7.0.1
-
diff --git a/patches/dev300/toolbar-decorations-svx-tables-columns.diff b/patches/dev300/toolbar-decorations-svx-tables-columns.diff
deleted file mode 100644
index 52e0e51..0000000
--- a/patches/dev300/toolbar-decorations-svx-tables-columns.diff
+++ /dev/null
@@ -1,745 +0,0 @@
----
- svx/source/tbxctrls/layctrl.cxx | 488 +++++++++++++++++---------------------
- 1 files changed, 218 insertions(+), 270 deletions(-)
-
-diff --git svx/source/tbxctrls/layctrl.cxx svx/source/tbxctrls/layctrl.cxx
-index 0ffa7de..2f2c1c9 100644
---- svx/source/tbxctrls/layctrl.cxx
-+++ svx/source/tbxctrls/layctrl.cxx
-@@ -32,9 +32,7 @@
-
- #include <string> // HACK: prevent conflict between STLPORT and Workshop headers
- #include <vcl/toolbox.hxx>
--#ifndef _SV_BUTTON_HXX //autogen
- #include <vcl/button.hxx>
--#endif
- #include <svl/intitem.hxx>
- #include <sfx2/dispatch.hxx>
- #include <sfx2/app.hxx>
-@@ -56,51 +54,72 @@ SFX_IMPL_TOOLBOX_CONTROL(SvxColumnsToolBoxControl,SfxUInt16Item);
-
- // class TableWindow -----------------------------------------------------
-
-+const long TABLE_CELL_WIDTH = 15;
-+const long TABLE_CELL_HEIGHT = 15;
-+
-+const long TABLE_CELLS_HORIZ = 10;
-+const long TABLE_CELLS_VERT = 15;
-+
-+const long TABLE_POS_X = 2;
-+const long TABLE_POS_Y = 2;
-+
-+const long TABLE_WIDTH = TABLE_POS_X + TABLE_CELLS_HORIZ*TABLE_CELL_WIDTH;
-+const long TABLE_HEIGHT = TABLE_POS_Y + TABLE_CELLS_VERT*TABLE_CELL_HEIGHT;
-+
- class TableWindow : public SfxPopupWindow
- {
- private:
-+ PushButton aTableButton;
- ::Color aLineColor;
-- ::Color aHighlightLineColor;
- ::Color aFillColor;
- ::Color aHighlightFillColor;
-+ ::Color aBackgroundColor;
- long nCol;
- long nLine;
-- long nWidth;
-- long nHeight;
-- long nMX;
-- long nMY;
-- long nTextHeight;
- BOOL bInitialKeyInput;
- BOOL m_bMod1;
- ToolBox& rTbx;
- Reference< XFrame > mxFrame;
- rtl::OUString maCommand;
-
-- void UpdateSize_Impl( long nNewCol, long nNewLine);
-+ DECL_LINK( SelectHdl, void * );
-
- public:
- TableWindow( USHORT nSlotId,
- const rtl::OUString& rCmd,
-+ const String& rText,
- ToolBox& rParentTbx,
- const Reference< XFrame >& rFrame );
- ~TableWindow();
-
- void KeyInput( const KeyEvent& rKEvt );
- virtual void MouseMove( const MouseEvent& rMEvt );
-- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void MouseButtonUp( const MouseEvent& rMEvt );
- virtual void Paint( const Rectangle& );
- virtual void PopupModeEnd();
- virtual SfxPopupWindow* Clone() const;
-
-- USHORT GetColCount() const { return (USHORT)nCol; }
-- USHORT GetLineCount() const { return (USHORT)nLine; }
-+private:
-+ void Update( long nNewCol, long nNewLine );
-+ void TableDialog( const Sequence< PropertyValue >& rArgs );
-+ void CloseAndShowTableDialog();
- };
-
- // -----------------------------------------------------------------------
-
--TableWindow::TableWindow( USHORT nSlotId, const rtl::OUString& rCmd, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ) :
-- SfxPopupWindow( nSlotId, rFrame, WB_SYSTEMWINDOW ),
-+IMPL_LINK( TableWindow, SelectHdl, void *, EMPTYARG )
-+{
-+ CloseAndShowTableDialog();
-+ return NULL;
-+}
-+
... etc. - the rest is truncated
More information about the ooo-build-commit
mailing list