summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu11
-rw-r--r--[-rwxr-xr-x]sfx2/source/doc/sfxacldetect.cxx0
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx7
-rw-r--r--[-rwxr-xr-x]shell/prj/d.lst0
-rw-r--r--[-rwxr-xr-x]shell/source/backends/kdebe/kdeinetlayer.hxx0
-rw-r--r--[-rwxr-xr-x]svx/inc/svx/EnhancedCustomShapeFunctionParser.hxx0
-rw-r--r--svx/inc/svx/sdr/overlay/overlaybitmapex.hxx5
-rw-r--r--svx/inc/svx/svdhdl.hxx13
-rw-r--r--svx/inc/svx/svdmrkv.hxx1
-rw-r--r--svx/inc/svx/toolbarmenu.hxx (renamed from svx/source/tbxctrls/toolbarmenu.hxx)114
-rw-r--r--svx/prj/d.lst1
-rw-r--r--[-rwxr-xr-x]svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx0
-rw-r--r--svx/source/sdr/overlay/overlaybitmapex.cxx15
-rw-r--r--svx/source/svdraw/svdedxv.cxx2
-rw-r--r--svx/source/svdraw/svdhdl.cxx19
-rw-r--r--svx/source/svdraw/svdmrkv.cxx44
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx4
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx2
-rw-r--r--svx/source/tbxctrls/toolbarmenu.cxx48
19 files changed, 218 insertions, 68 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index 2925c2a97802..aedc3f40f725 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -966,7 +966,16 @@
<value>1</value>
</prop>
</node>
- <node oor:name=".uno:NotesMode" oor:op="replace">
+ <node oor:name=".uno:AssignLayout" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Slide Layout</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:NotesMode" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Notes ~Page</value>
diff --git a/sfx2/source/doc/sfxacldetect.cxx b/sfx2/source/doc/sfxacldetect.cxx
index b156d409c9be..b156d409c9be 100755..100644
--- a/sfx2/source/doc/sfxacldetect.cxx
+++ b/sfx2/source/doc/sfxacldetect.cxx
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 29e6b85d67d2..ab682c604833 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -893,6 +893,7 @@ void SfxToolBoxControl::createAndPositionSubToolBar( const ::rtl::OUString& rSub
Window* pParentTbxWindow( pImpl->pBox );
Window* pTbxWindow = VCLUnoHelper::GetWindow( xSubToolBar );
+
ToolBox* pToolBar( 0 );
if ( pTbxWindow && pTbxWindow->GetType() == WINDOW_TOOLBOX )
pToolBar = (ToolBox *)pTbxWindow;
@@ -907,10 +908,10 @@ void SfxToolBoxControl::createAndPositionSubToolBar( const ::rtl::OUString& rSub
aSize = pToolBar->CalcPopupWindowSizePixel();
}
pToolBar->SetSizePixel( aSize );
-
- // open subtoolbox in popup mode
- Window::GetDockingManager()->StartPopupMode( pImpl->pBox, pToolBar );
}
+
+ // open subtoolbox in popup mode
+ Window::GetDockingManager()->StartPopupMode( pImpl->pBox, pTbxWindow );
}
}
}
diff --git a/shell/prj/d.lst b/shell/prj/d.lst
index eee13ef34fe9..eee13ef34fe9 100755..100644
--- a/shell/prj/d.lst
+++ b/shell/prj/d.lst
diff --git a/shell/source/backends/kdebe/kdeinetlayer.hxx b/shell/source/backends/kdebe/kdeinetlayer.hxx
index 1a7427b1cb2c..1a7427b1cb2c 100755..100644
--- a/shell/source/backends/kdebe/kdeinetlayer.hxx
+++ b/shell/source/backends/kdebe/kdeinetlayer.hxx
diff --git a/svx/inc/svx/EnhancedCustomShapeFunctionParser.hxx b/svx/inc/svx/EnhancedCustomShapeFunctionParser.hxx
index 411a16d60e31..411a16d60e31 100755..100644
--- a/svx/inc/svx/EnhancedCustomShapeFunctionParser.hxx
+++ b/svx/inc/svx/EnhancedCustomShapeFunctionParser.hxx
diff --git a/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx b/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx
index 96295d0f9f80..053f87452788 100644
--- a/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx
+++ b/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx
@@ -50,13 +50,16 @@ namespace sdr
sal_uInt16 mnCenterX;
sal_uInt16 mnCenterY;
+ // optional transparency
+ double mfAlpha;
+
virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
public:
OverlayBitmapEx(
const basegfx::B2DPoint& rBasePos,
const BitmapEx& rBitmapEx,
- sal_uInt16 nCenX = 0, sal_uInt16 nCenY = 0);
+ sal_uInt16 nCenX = 0, sal_uInt16 nCenY = 0, double fAlpha = 0.0 );
virtual ~OverlayBitmapEx();
const BitmapEx& getBitmapEx() const { return maBitmapEx; }
diff --git a/svx/inc/svx/svdhdl.hxx b/svx/inc/svx/svdhdl.hxx
index 8d7d4552ea6c..88fb7e073aff 100644
--- a/svx/inc/svx/svdhdl.hxx
+++ b/svx/inc/svx/svdhdl.hxx
@@ -187,6 +187,9 @@ protected:
// cleanup marker if one exists
void GetRidOfIAObject();
+private:
+ bool mbMouseOver; // is true if the mouse is over this handle
+
protected:
::sdr::overlay::OverlayObject* CreateOverlayObject(
const basegfx::B2DPoint& rPos,
@@ -244,6 +247,16 @@ public:
virtual BOOL IsFocusHdl() const;
void SetMoveOutside( bool bMoveOutside );
+
+ /** is called when the mouse enters the area of this handle. If the handle changes his
+ visualisation during mouse over it must override this method and call Touch(). */
+ virtual void onMouseEnter();
+
+ /** is called when the mouse leaves the area of this handle. If the handle changes his
+ visualisation during mouse over it must override this method and call Touch(). */
+ virtual void onMouseLeave();
+
+ bool isMouseOver() const;
};
////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/svx/inc/svx/svdmrkv.hxx b/svx/inc/svx/svdmrkv.hxx
index 88d0b941273d..0d443346e664 100644
--- a/svx/inc/svx/svdmrkv.hxx
+++ b/svx/inc/svx/svdmrkv.hxx
@@ -172,6 +172,7 @@ protected:
virtual void SetMarkRects(); // Rects an den PageViews
virtual void CheckMarked(); // MarkList nach Del und Lock Layer durchsuchen...
virtual void AddDragModeHdl(SdrDragMode eMode);
+ virtual BOOL MouseMove(const MouseEvent& rMEvt, Window* pWin);
// add custom handles (used by other apps, e.g. AnchorPos)
virtual void AddCustomHdl();
diff --git a/svx/source/tbxctrls/toolbarmenu.hxx b/svx/inc/svx/toolbarmenu.hxx
index 30f56c92b943..4299ddb4c943 100644
--- a/svx/source/tbxctrls/toolbarmenu.hxx
+++ b/svx/inc/svx/toolbarmenu.hxx
@@ -1,48 +1,48 @@
-#include <vcl/ctrl.hxx>
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: colrctrl.hxx,v $
+ * $Revision: 1.3.76.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_TOOLBARMENU_HXX_
+#define _SVX_TOOLBARMENU_HXX_
#include <vector>
+#include <vcl/ctrl.hxx>
+#include <vcl/menu.hxx>
+
+#include "svx/svxdllapi.h"
+
class ToolbarMenuEntry;
typedef std::vector< ToolbarMenuEntry * > ToolbarMenuEntryVector;
-class ToolbarMenu : public Control
+class SVX_DLLPUBLIC ToolbarMenu : public Control
{
-private:
- ToolbarMenuEntryVector maEntryVector;
-
- int mnCheckPos;
- int mnImagePos;
- int mnTextPos;
-
- int mnHighlightedEntry;
- int mnSelectedEntry;
-
- Size maSize;
-
- Link maHighlightHdl;
- Link maSelectHdl;
-
- void StateChanged( StateChangedType nType );
- void DataChanged( const DataChangedEvent& rDCEvt );
-
- void initWindow();
-
- Size implCalcSize();
-
- void appendEntry( ToolbarMenuEntry* pEntry );
-
- void implPaint( ToolbarMenuEntry* pThisOnly = NULL, bool bHighlight = false );
-
- void implHighlightEntry( int nHighlightEntry, bool bHighlight );
- void implHighlightEntry( const MouseEvent& rMEvt, bool bMBDown );
-
- void implChangeHighlightEntry( int nEntry );
- void implSelectEntry( int nSelectedEntry );
-
- ToolbarMenuEntry* implCursorUpDown( bool bUp, bool bHomeEnd );
- ToolbarMenuEntry* implGetEntry( int nEntry ) const;
- ToolbarMenuEntry* implSearchEntry( int nEntryId ) const;
-
public:
ToolbarMenu( Window* pParent, WinBits nStyle );
~ToolbarMenu();
@@ -87,4 +87,42 @@ public:
int getSelectedEntryId() const;
int getHighlightedEntryId() const;
+
+private:
+ ToolbarMenuEntryVector maEntryVector;
+
+ int mnCheckPos;
+ int mnImagePos;
+ int mnTextPos;
+
+ int mnHighlightedEntry;
+ int mnSelectedEntry;
+
+ Size maSize;
+
+ Link maHighlightHdl;
+ Link maSelectHdl;
+
+ void StateChanged( StateChangedType nType );
+ void DataChanged( const DataChangedEvent& rDCEvt );
+
+ void initWindow();
+
+ Size implCalcSize();
+
+ void appendEntry( ToolbarMenuEntry* pEntry );
+
+ void implPaint( ToolbarMenuEntry* pThisOnly = NULL, bool bHighlight = false );
+
+ void implHighlightEntry( int nHighlightEntry, bool bHighlight );
+ void implHighlightEntry( const MouseEvent& rMEvt, bool bMBDown );
+
+ void implChangeHighlightEntry( int nEntry );
+ void implSelectEntry( int nSelectedEntry );
+
+ ToolbarMenuEntry* implCursorUpDown( bool bUp, bool bHomeEnd );
+ ToolbarMenuEntry* implGetEntry( int nEntry ) const;
+ ToolbarMenuEntry* implSearchEntry( int nEntryId ) const;
};
+
+#endif
diff --git a/svx/prj/d.lst b/svx/prj/d.lst
index 8b4675feb3e9..537193f3190b 100644
--- a/svx/prj/d.lst
+++ b/svx/prj/d.lst
@@ -686,6 +686,7 @@ mkdir: %_DEST%\inc%_EXT%\svx\sdr\table
..\inc\svx\selectioncontroller.hxx %_DEST%\inc%_EXT%\svx\selectioncontroller.hxx
..\inc\svx\helperhittest3d.hxx %_DEST%\inc%_EXT%\svx\helperhittest3d.hxx
..\inc\svx\optimprove.hxx %_DEST%\inc%_EXT%\svx\optimprove.hxx
+..\inc\svx\toolbarmenu.hxx %_DEST%\inc%_EXT%\svx\toolbarmenu.hxx
..\inc\svx\msvbahelper.hxx %_DEST%\inc%_EXT%\svx\msvbahelper.hxx
..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.*
diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
index ee848c95192a..ee848c95192a 100755..100644
--- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
diff --git a/svx/source/sdr/overlay/overlaybitmapex.cxx b/svx/source/sdr/overlay/overlaybitmapex.cxx
index cd50c9149b27..c5208710f0df 100644
--- a/svx/source/sdr/overlay/overlaybitmapex.cxx
+++ b/svx/source/sdr/overlay/overlaybitmapex.cxx
@@ -30,6 +30,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
+#include <drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx>
#include <svx/sdr/overlay/overlaybitmapex.hxx>
#include <vcl/salbtype.hxx>
#include <vcl/outdev.hxx>
@@ -44,24 +45,32 @@ namespace sdr
{
drawinglayer::primitive2d::Primitive2DSequence OverlayBitmapEx::createOverlayObjectPrimitive2DSequence()
{
- const drawinglayer::primitive2d::Primitive2DReference aReference(
+ drawinglayer::primitive2d::Primitive2DReference aReference(
new drawinglayer::primitive2d::OverlayBitmapExPrimitive(
getBitmapEx(),
getBasePosition(),
getCenterX(),
getCenterY()));
+ if(basegfx::fTools::more(mfAlpha, 0.0))
+ {
+ const drawinglayer::primitive2d::Primitive2DSequence aNewTransPrimitiveVector(&aReference, 1L);
+ aReference = drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::UnifiedAlphaPrimitive2D(aNewTransPrimitiveVector, mfAlpha));
+ }
+
return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
}
OverlayBitmapEx::OverlayBitmapEx(
const basegfx::B2DPoint& rBasePos,
const BitmapEx& rBitmapEx,
- sal_uInt16 nCenX, sal_uInt16 nCenY)
+ sal_uInt16 nCenX, sal_uInt16 nCenY, double fAlpha)
: OverlayObjectWithBasePosition(rBasePos, Color(COL_WHITE)),
maBitmapEx(rBitmapEx),
mnCenterX(nCenX),
- mnCenterY(nCenY)
+ mnCenterY(nCenY),
+ mfAlpha(fAlpha)
{
}
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index e3d2f3390201..f78690b76dcc 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1167,7 +1167,7 @@ BOOL SdrObjEditView::KeyInput(const KeyEvent& rKEvt, Window* pWin)
#endif
if (pTextEditOutlinerView->PostKeyEvent(rKEvt))
{
- if( pMod && !pMod->IsChanged() )
+ if( pMod /* && !pMod->IsChanged() */ )
{
if( pTextEditOutliner && pTextEditOutliner->IsModified() )
pMod->SetChanged( sal_True );
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index d3202e389f83..884057321899 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -309,7 +309,8 @@ SdrHdl::SdrHdl():
bSelect(FALSE),
b1PixMore(FALSE),
bPlusHdl(FALSE),
- mbMoveOutside(false)
+ mbMoveOutside(false),
+ mbMouseOver(false)
{
}
@@ -327,7 +328,8 @@ SdrHdl::SdrHdl(const Point& rPnt, SdrHdlKind eNewKind):
bSelect(FALSE),
b1PixMore(FALSE),
bPlusHdl(FALSE),
- mbMoveOutside(false)
+ mbMoveOutside(false),
+ mbMouseOver(false)
{
}
@@ -949,6 +951,19 @@ BOOL SdrHdl::IsFocusHdl() const
}
}
+void SdrHdl::onMouseEnter()
+{
+}
+
+void SdrHdl::onMouseLeave()
+{
+}
+
+bool SdrHdl::isMouseOver() const
+{
+ return mbMouseOver;
+}
+
////////////////////////////////////////////////////////////////////////////////////////////////////
// class SdrHdlColor
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index f80b14503914..feb6c91765e3 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -209,9 +209,9 @@ void __EXPORT SdrMarkView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
bMarkedPointsRectsDirty=TRUE;
}
/* removed for now since this breaks existing code who iterates over the mark list and sequentially replaces objects
- if( eKind==HINT_OBJREMOVED && IsObjMarked( const_cast<SdrObject*>(pSdrHint->GetObject()) ) )
- {
- MarkObj( const_cast<SdrObject*>(pSdrHint->GetObject()), GetSdrPageView(), TRUE );
+ if( eKind==HINT_OBJREMOVED && IsObjMarked( const_cast<SdrObject*>(pSdrHint->GetObject()) ) )
+ {
+ MarkObj( const_cast<SdrObject*>(pSdrHint->GetObject()), GetSdrPageView(), TRUE );
}
*/
}
@@ -1063,6 +1063,44 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
}
}
+/** handle mouse over effects for handles */
+BOOL SdrMarkView::MouseMove(const MouseEvent& rMEvt, Window* pWin)
+{
+ const ULONG nHdlCount = aHdl.GetHdlCount();
+ if( nHdlCount )
+ {
+ SdrHdl* pMouseOverHdl = 0;
+ if( !rMEvt.IsLeaveWindow() && pWin )
+ {
+ Point aMDPos( pWin->PixelToLogic( rMEvt.GetPosPixel() ) );
+ pMouseOverHdl = PickHandle(aMDPos);
+ }
+
+ // notify last mouse over handle that he lost the mouse
+ for(ULONG nHdl = 0; nHdl < nHdlCount; nHdl++ )
+ {
+ SdrHdl* pCurrentHdl = GetHdl(nHdl);
+ if( pCurrentHdl->mbMouseOver )
+ {
+ if( pCurrentHdl != pMouseOverHdl )
+ {
+ pCurrentHdl->mbMouseOver = false;
+ pCurrentHdl->onMouseLeave();
+ }
+ break;
+ }
+ }
+
+ // notify current mouse over handle
+ if( pMouseOverHdl && !pMouseOverHdl->mbMouseOver )
+ {
+ pMouseOverHdl->mbMouseOver = true;
+ pMouseOverHdl->onMouseEnter();
+ }
+ }
+ return SdrSnapView::MouseMove(rMEvt, pWin);
+}
+
void SdrMarkView::ForceRefToMarked()
{
switch(eDragMode)
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index 3b484d770397..bbb2861091b4 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -56,7 +56,7 @@
#include "extrusioncontrols.hxx"
#include "extrusioncontrols.hrc"
#include <svx/sdasitm.hxx>
-#include "toolbarmenu.hxx"
+#include "svx/toolbarmenu.hxx"
#include "colorwindow.hxx"
#include <svx/tbxcolorupdate.hxx>
@@ -132,7 +132,6 @@ void ExtrusionDirectionWindow::implInit()
mpDirectionSet = new ValueSet( mpMenu, WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | 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 );
@@ -877,7 +876,6 @@ void ExtrusionLightingWindow::implInit()
mpLightingSet = new ValueSet( mpMenu, WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | 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 );
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 13a01b6dc31b..9c4a4af5c836 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -47,7 +47,7 @@
#include <svx/svdoutl.hxx>
#include <svx/eeitem.hxx>
#include <svx/frmdiritem.hxx>
-#include "toolbarmenu.hxx"
+#include "svx/toolbarmenu.hxx"
#include "fontworkgallery.hxx"
#include "fontworkgallery.hrc"
diff --git a/svx/source/tbxctrls/toolbarmenu.cxx b/svx/source/tbxctrls/toolbarmenu.cxx
index 28867a30685d..24f93ea13a6e 100644
--- a/svx/source/tbxctrls/toolbarmenu.cxx
+++ b/svx/source/tbxctrls/toolbarmenu.cxx
@@ -31,14 +31,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
+
#include <vcl/menu.hxx>
#include <vcl/decoview.hxx>
#include <vcl/image.hxx>
-#include "toolbarmenu.hxx"
+#include "svx/toolbarmenu.hxx"
const int EXTRAITEMHEIGHT = 4;
const int SEPARATOR_HEIGHT = 8;
+const int TITLE_ID = -1;
class ToolbarMenuEntry
{
@@ -556,7 +558,6 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight )
aRect.Right() -= nFontHeight + nFontHeight/4;
}
DrawRect( aRect );
- implPaint( p, bHighlight );
if( bHighlight && ((p->mpControl == NULL) || (p->mbHasText)) )
{
@@ -566,6 +567,9 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight )
aRect.nRight -= 1;
DrawSelectionBackground( aRect, true, false, TRUE, TRUE );
}
+
+ implPaint( p, bHighlight );
+
/*
if( bRestoreLineColor )
SetLineColor( oldLineColor );
@@ -628,7 +632,7 @@ void ToolbarMenu::implHighlightEntry( const MouseEvent& rMEvt, bool bMBDown )
for( nEntry = 0; nEntry < nEntryCount; nEntry++ )
{
ToolbarMenuEntry* pEntry = maEntryVector[nEntry];
- if( pEntry )
+ if( pEntry && (pEntry->mnEntryId != TITLE_ID) )
{
long nOldY = nY;
nY += pEntry->maSize.Height();
@@ -716,8 +720,8 @@ ToolbarMenuEntry* ToolbarMenu::implCursorUpDown( bool bUp, bool bHomeEnd )
else
if( mnHighlightedEntry == -1 )
n = maEntryVector.size()-1;
-// else
-// break;
+ else
+ break;
}
else
{
@@ -726,12 +730,12 @@ ToolbarMenuEntry* ToolbarMenu::implCursorUpDown( bool bUp, bool bHomeEnd )
else
if( mnHighlightedEntry == -1 )
n = 0;
-// else
-// break;
+ else
+ break;
}
ToolbarMenuEntry* pData = maEntryVector[n];
- if( pData )
+ if( pData && (pData->mnEntryId != TITLE_ID) )
{
implChangeHighlightEntry( n );
return pData;
@@ -809,7 +813,7 @@ void ToolbarMenu::KeyInput( const KeyEvent& rKEvent )
case KEY_RETURN:
{
ToolbarMenuEntry* pEntry = implGetEntry( mnHighlightedEntry );
- if ( pEntry && pEntry->mbEnabled )
+ if ( pEntry && pEntry->mbEnabled && (pEntry->mnEntryId != TITLE_ID) )
{
if( pEntry->mpControl )
{
@@ -908,8 +912,31 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
{
if( !pThisOnly || ( pEntry == pThisOnly ) )
{
+ const bool bTitle = pEntry->mnEntryId == TITLE_ID;
+
if( pThisOnly && bHighlighted )
SetTextColor( rSettings.GetMenuHighlightTextColor() );
+ else
+ SetTextColor( rSettings.GetMenuTextColor() );
+
+ if( bTitle )
+ {
+ Rectangle aRect( aTopLeft, Size( aOutSz.Width(), pEntry->maSize.Height() ) );
+
+ // fill the background
+ Color aColor (rSettings.GetDialogColor());
+
+ SetFillColor (aColor);
+ SetLineColor ();
+ DrawRect(aRect);
+
+ // Erase the four corner pixels to make the rectangle appear rounded.
+ SetLineColor( rSettings.GetMenuColor());
+ DrawPixel( aRect.TopLeft());
+ DrawPixel( Point(aRect.Right(), aRect.Top()));
+ DrawPixel( Point(aRect.Left(), aRect.Bottom()));
+ DrawPixel( Point(aRect.Right(), aRect.Bottom()));
+ }
long nTextOffsetY = ((pEntry->maSize.Height()-nFontHeight)/2);
@@ -971,9 +998,6 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
aDecoView.DrawSymbol( aRect, eSymbol, GetTextColor(), nSymbolStyle );
}
}
-
- if( pThisOnly && bHighlighted )
- SetTextColor( rSettings.GetMenuTextColor() );
}
aTopLeft.Y() += pEntry->maSize.Height();