[ooo-build-commit] .: patches/dev300
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Tue May 4 08:10:48 PDT 2010
patches/dev300/toolbar-decorations-fix.diff | 218 +++++++++++++++++++++++-----
1 file changed, 181 insertions(+), 37 deletions(-)
New commits:
commit 6639c95b0b7ed1ff5a11b6afdbe815cf0d6b4614
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Tue May 4 17:09:37 2010 +0200
Fixed merging of toolbar decoration patches
* patches/dev300/toolbar-decorations-fix.diff:
diff --git a/patches/dev300/toolbar-decorations-fix.diff b/patches/dev300/toolbar-decorations-fix.diff
index 4f21643..4fe0412 100644
--- a/patches/dev300/toolbar-decorations-fix.diff
+++ b/patches/dev300/toolbar-decorations-fix.diff
@@ -1,3 +1,26 @@
+Toolbar decorations 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 | 136 +++++--
+ vcl/inc/vcl/dockwin.hxx | 2
+ vcl/source/window/dockmgr.cxx | 65 ++-
+ 13 files changed, 644 insertions(+), 590 deletions(-)
+
+
diff --git svtools/source/control/valueset.cxx svtools/source/control/valueset.cxx
index 11cf019..ff8b9a4 100644
--- svtools/source/control/valueset.cxx
@@ -1867,10 +1890,10 @@ index 2a69a5f..20b73e9 100644
}
diff --git svx/source/tbxctrls/tbcontrl.cxx svx/source/tbxctrls/tbcontrl.cxx
-index e39ff96..622e04c 100644
+index be75081..6b15a3c 100644
--- svx/source/tbxctrls/tbcontrl.cxx
+++ svx/source/tbxctrls/tbcontrl.cxx
-@@ -250,6 +250,7 @@ class SvxFrameWindow_Impl : public SfxPopupWindow
+@@ -252,6 +252,7 @@ class SvxFrameWindow_Impl : public SfxPopupWindow
using FloatingWindow::StateChanged;
private:
@@ -1878,7 +1901,7 @@ index e39ff96..622e04c 100644
SvxFrmValueSet_Impl aFrameSet;
ImageList aImgList;
sal_Bool bParagraphMode;
-@@ -261,6 +262,7 @@ private:
+@@ -263,6 +264,7 @@ private:
protected:
virtual void Resize();
virtual BOOL Close();
@@ -1886,7 +1909,7 @@ index e39ff96..622e04c 100644
virtual Window* GetPreferredKeyInputWindow();
virtual void GetFocus();
-@@ -289,6 +291,7 @@ class SvxLineWindow_Impl : public SfxPopupWindow
+@@ -291,6 +293,7 @@ class SvxLineWindow_Impl : public SfxPopupWindow
{
private:
ValueSet aLineSet;
@@ -1894,7 +1917,7 @@ index e39ff96..622e04c 100644
bool m_bIsWriter;
#if _SOLAR__PRIVATE
-@@ -300,6 +303,7 @@ private:
+@@ -302,6 +305,7 @@ private:
protected:
virtual void Resize();
virtual BOOL Close();
@@ -1902,7 +1925,12 @@ index e39ff96..622e04c 100644
virtual Window* GetPreferredKeyInputWindow();
virtual void GetFocus();
virtual void DataChanged( const DataChangedEvent& rDCEvt );
-@@ -833,6 +837,7 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
+@@ -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) ),
@@ -1910,7 +1938,7 @@ index e39ff96..622e04c 100644
maCommand( rCommand )
{
-@@ -842,6 +847,8 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
+@@ -844,6 +849,8 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
BOOL bKillTable = FALSE;
const Size aSize12( 13, 13 );
@@ -1919,7 +1947,7 @@ index e39ff96..622e04c 100644
if ( pDocSh )
if ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) )
pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
-@@ -904,12 +911,24 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
+@@ -906,16 +913,31 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
aColorSet.SetLineCount( PALETTE_Y );
lcl_CalcSizeValueSet( *this, aColorSet, aSize12 );
@@ -1944,7 +1972,14 @@ index e39ff96..622e04c 100644
AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ColorTableState" )));
if ( bKillTable )
-@@ -942,8 +961,11 @@ IMPL_LINK( SvxColorWindow_Impl, SelectHdl, void *, EMPTYARG )
+ 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();
@@ -1958,21 +1993,26 @@ index e39ff96..622e04c 100644
if ( !nItemId && ( SID_ATTR_CHAR_COLOR_BACKGROUND == theSlotId || SID_BACKGROUND_COLOR == theSlotId ) )
{
-@@ -1056,10 +1078,13 @@ void SvxColorWindow_Impl::StateChanged( USHORT nSID, SfxItemState eState, const
+@@ -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_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 );
-@@ -1089,10 +1114,22 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( USHORT nId, const Reference< XFrame >&
+@@ -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 ));
@@ -1995,7 +2035,7 @@ index e39ff96..622e04c 100644
}
/*-- 22.09.2004 12:27:50---------------------------------------------------
-@@ -1108,6 +1145,11 @@ SfxPopupWindow* SvxFrameWindow_Impl::Clone() const
+@@ -1110,6 +1153,11 @@ SfxPopupWindow* SvxFrameWindow_Impl::Clone() const
return new SvxFrameWindow_Impl( GetId(), GetFrame(), GetParent() );
}
@@ -2007,7 +2047,7 @@ index e39ff96..622e04c 100644
Window* SvxFrameWindow_Impl::GetPreferredKeyInputWindow()
{
return &aFrameSet;
-@@ -1236,8 +1278,11 @@ IMPL_LINK( SvxFrameWindow_Impl, SelectHdl, void *, EMPTYARG )
+@@ -1238,8 +1286,11 @@ IMPL_LINK( SvxFrameWindow_Impl, SelectHdl, void *, EMPTYARG )
aBorderInner.SetValid( VALID_DISTANCE, TRUE );
aBorderInner.SetValid( VALID_DISABLE, FALSE );
@@ -2021,17 +2061,32 @@ index e39ff96..622e04c 100644
Any a;
Sequence< PropertyValue > aArgs( 2 );
-@@ -1331,7 +1376,8 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& r
+@@ -1331,10 +1382,14 @@ BOOL SvxFrameWindow_Impl::Close()
- SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK | WB_DIALOGCONTROL ) ),
+ 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_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
{
-@@ -1349,10 +1395,22 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& r
+ Reference< lang::XServiceInfo > xServices( rFrame->getController()->getModel(), UNO_QUERY_THROW );
+@@ -1343,6 +1398,7 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& r
+ catch(const uno::Exception& )
+ {
+ }
++
+ Size aBmpSize( 55, 12 );
+ CreateBitmaps();
+
+@@ -1351,10 +1407,22 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& r
aLineSet.SetText( SVX_RESSTR(STR_NONE) );
lcl_CalcSizeValueSet( *this, aLineSet, aBmpSize );
@@ -2054,7 +2109,7 @@ index e39ff96..622e04c 100644
}
SfxPopupWindow* SvxLineWindow_Impl::Clone() const
-@@ -1598,8 +1656,11 @@ IMPL_LINK( SvxLineWindow_Impl, SelectHdl, void *, EMPTYARG )
+@@ -1624,8 +1692,11 @@ IMPL_LINK( SvxLineWindow_Impl, SelectHdl, void *, EMPTYARG )
else
aLineItem.SetLine( 0 );
@@ -2068,7 +2123,7 @@ index e39ff96..622e04c 100644
Any a;
Sequence< PropertyValue > aArgs( 1 );
-@@ -1641,6 +1702,13 @@ BOOL SvxLineWindow_Impl::Close()
+@@ -1667,6 +1738,13 @@ BOOL SvxLineWindow_Impl::Close()
// -----------------------------------------------------------------------
@@ -2082,7 +2137,22 @@ index e39ff96..622e04c 100644
Window* SvxLineWindow_Impl::GetPreferredKeyInputWindow()
{
return &aLineSet;
-@@ -2419,10 +2487,10 @@ SfxPopupWindow* SvxColorToolBoxControl::CreatePopupWindow()
+@@ -2374,10 +2452,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 +2524,10 @@ SfxPopupWindow* SvxColorToolBoxControl::CreatePopupWindow()
SVX_RESSTR(nResId),
&GetToolBox() );
@@ -2096,19 +2166,17 @@ index e39ff96..622e04c 100644
return pColorWin;
}
-@@ -2493,16 +2561,15 @@ SfxPopupWindow* SvxFontColorExtToolBoxControl::CreatePopupWindow()
+@@ -2519,16 +2598,16 @@ SfxPopupWindow* SvxFontColorExtToolBoxControl::CreatePopupWindow()
m_aCommandURL,
GetSlotId(),
m_xFrame,
- SVX_RESSTR( RID_SVXITEMS_EXTRAS_CHARCOLOR ),
-+ SVX_RESSTR( ( GetSlotId() == SID_ATTR_CHAR_COLOR_BACKGROUND )?
-+ RID_SVXSTR_EXTRAS_CHARBACKGROUND:
-+ 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 ) );
--
+ 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);
@@ -2119,7 +2187,22 @@ index e39ff96..622e04c 100644
return pColorWin;
}
-@@ -2700,10 +2767,9 @@ SfxPopupWindow* SvxFrameLineColorToolBoxControl::CreatePopupWindow()
+@@ -2663,9 +2742,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 +2809,9 @@ SfxPopupWindow* SvxFrameLineColorToolBoxControl::CreatePopupWindow()
SVX_RESSTR(RID_SVXSTR_FRAME_COLOR),
&GetToolBox() );
@@ -2132,7 +2215,7 @@ index e39ff96..622e04c 100644
return pColorWin;
}
-@@ -2819,8 +2885,8 @@ void lcl_ResizeValueSet( Window &rWin, ValueSet &rValueSet )
+@@ -2845,8 +2927,8 @@ void lcl_ResizeValueSet( Window &rWin, ValueSet &rValueSet )
{
Size aSize = rWin.GetOutputSizePixel();
aSize.Width() -= 4;
@@ -2143,7 +2226,7 @@ index e39ff96..622e04c 100644
}
// -----------------------------------------------------------------------
-@@ -2829,7 +2895,7 @@ void lcl_CalcSizeValueSet( Window &rWin, ValueSet &rValueSet, const Size &aItemS
+@@ -2855,7 +2937,7 @@ void lcl_CalcSizeValueSet( Window &rWin, ValueSet &rValueSet, const Size &aItemS
{
Size aSize = rValueSet.CalcWindowSizePixel( aItemSize );
aSize.Width() += 4;
@@ -2173,10 +2256,18 @@ index b0be215..8b9686a 100644
// 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..837d7af 100644
+index d3adaf7..37fd6fb 100644
--- vcl/source/window/dockmgr.cxx
+++ vcl/source/window/dockmgr.cxx
-@@ -433,6 +433,13 @@ void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWin
+@@ -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 );
}
@@ -2190,6 +2281,14 @@ index d3adaf7..837d7af 100644
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
@@ -2215,7 +2314,41 @@ index d3adaf7..837d7af 100644
}
Point ImplPopupFloatWin::GetToolboxPosition() const
-@@ -730,8 +744,7 @@ void ImplPopupFloatWin::Paint( const Rectangle& )
+@@ -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();
@@ -2225,7 +2358,18 @@ index d3adaf7..837d7af 100644
{
if( rMEvt.IsLeft() && GetDragRect().IsInside( aMousePos ) )
{
-@@ -1235,14 +1248,10 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox )
+@@ -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 |
@@ -2242,7 +2386,7 @@ index d3adaf7..837d7af 100644
mpFloatWin->StartPopupMode( pParentToolBox, nFlags );
GetWindow()->Show();
-@@ -1254,6 +1263,11 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox )
+@@ -1254,6 +1270,11 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox )
}
}
More information about the ooo-build-commit
mailing list