summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-04-27 15:20:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-04-27 17:12:08 +0100
commitcd962f121586e84eb7d020643dcf134e7e50a1c8 (patch)
tree7f6ecbd07cac9fd2c3eb2703935a114ce43ef658
parent653a4a659624d52945b9bd40647002cf31085fe0 (diff)
manually setting drop down size is unnecessary
and can end up with a font size entry in the toolbar of a different height to the other elements, because the other ones only call it on DataChange, while font size calls it all the time. Change-Id: I495e28dd0d33a093869fd731538e43513a7b8b85
-rw-r--r--include/vcl/combobox.hxx2
-rw-r--r--include/vcl/lstbox.hxx2
-rw-r--r--svx/source/tbxctrls/itemwin.cxx4
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx5
-rw-r--r--svx/source/tbxctrls/tbunocontroller.cxx9
5 files changed, 0 insertions, 22 deletions
diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx
index 34e6702a09bc..95ec9bc9e215 100644
--- a/include/vcl/combobox.hxx
+++ b/include/vcl/combobox.hxx
@@ -114,8 +114,6 @@ public:
virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE;
void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) SAL_OVERRIDE
{ Edit::SetPosSizePixel( rNewPos, rNewSize ); }
- void SetDropDownSizePixel( const Size& rNewSize )
- { if( IsDropDownBox() ) setPosSizePixel( 0, 0, rNewSize.Width(), rNewSize.Height(), WINDOW_POSSIZE_SIZE | WINDOW_POSSIZE_DROPDOWN ); }
Rectangle GetDropDownPosSizePixel() const;
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index 775e72c87d05..3f03f63d1b55 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -103,8 +103,6 @@ public:
long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE;
void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) SAL_OVERRIDE
{ Control::SetPosSizePixel( rNewPos, rNewSize ); }
- void SetDropDownSizePixel( const Size& rNewSize )
- { if( IsDropDownBox() ) setPosSizePixel( 0, 0, rNewSize.Width(), rNewSize.Height(), WINDOW_POSSIZE_SIZE | WINDOW_POSSIZE_DROPDOWN ); }
Rectangle GetDropDownPosSizePixel() const;
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index 92a017f4c25f..449cb7f951dc 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -51,8 +51,6 @@ using namespace ::com::sun::star::util;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
-#define LOGICAL_EDIT_HEIGHT 12
-
SvxLineBox::SvxLineBox( vcl::Window* pParent, const Reference< XFrame >& rFrame, WinBits nBits ) :
LineLB( pParent, nBits ),
nCurPos ( 0 ),
@@ -235,8 +233,6 @@ void SvxLineBox::DataChanged( const DataChangedEvent& rDCEvt )
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{
SetSizePixel(LogicToPixel(aLogicalSize, MAP_APPFONT));
- Size aDropSize( aLogicalSize.Width(), LOGICAL_EDIT_HEIGHT);
- SetDropDownSizePixel(LogicToPixel(aDropSize, MAP_APPFONT));
}
LineLB::DataChanged( rDCEvt );
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 91c5be0dfd1d..6dfadc7ef548 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -93,7 +93,6 @@
#include <svx/xflclit.hxx>
#define MAX_MRU_FONTNAME_ENTRIES 5
-#define LOGICAL_EDIT_HEIGHT 12
// don't make more than 15 entries visible at once
#define MAX_STYLES_ENTRIES static_cast< sal_uInt16 >( 15 )
@@ -529,8 +528,6 @@ void SvxStyleBox_Impl::DataChanged( const DataChangedEvent& rDCEvt )
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{
SetSizePixel(LogicToPixel(aLogicalSize, MAP_APPFONT));
- Size aDropSize( aLogicalSize.Width(), LOGICAL_EDIT_HEIGHT);
- SetDropDownSizePixel(LogicToPixel(aDropSize, MAP_APPFONT));
}
ComboBox::DataChanged( rDCEvt );
@@ -1040,8 +1037,6 @@ void SvxFontNameBox_Impl::DataChanged( const DataChangedEvent& rDCEvt )
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{
SetSizePixel(LogicToPixel(aLogicalSize, MAP_APPFONT));
- Size aDropSize( aLogicalSize.Width(), LOGICAL_EDIT_HEIGHT);
- SetDropDownSizePixel(LogicToPixel(aDropSize, MAP_APPFONT));
}
else if ( ( rDCEvt.GetType() == DataChangedEventType::FONTS ) ||
( rDCEvt.GetType() == DataChangedEventType::DISPLAY ) )
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx
index 680e9a32040d..0344ed8f9837 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -38,8 +38,6 @@
#include <boost/scoped_ptr.hpp>
-#define LOGICAL_EDIT_HEIGHT 12
-
using namespace ::com::sun::star;
namespace {
@@ -132,8 +130,6 @@ SvxFontSizeBox_Impl::SvxFontSizeBox_Impl(
SetText( "" );
}
-
-
void SvxFontSizeBox_Impl::ReleaseFocus_Impl()
{
if ( !m_bRelease )
@@ -263,13 +259,8 @@ void SvxFontSizeBox_Impl::SetOptimalSize()
Size aPrefSize(LogicToPixel(m_aLogicalSize, MAP_APPFONT));
aPrefSize.Width() = get_preferred_size().Width();
SetSizePixel(aPrefSize);
- Size aDropSize(LogicToPixel(Size(0, LOGICAL_EDIT_HEIGHT), MAP_APPFONT));
- aDropSize.Width() = aPrefSize.Width();
- SetDropDownSizePixel(aDropSize);
}
-
-
void SvxFontSizeBox_Impl::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&