diff options
-rw-r--r-- | vcl/source/app/dbggui.cxx | 2 | ||||
-rw-r--r-- | vcl/source/app/help.cxx | 1 | ||||
-rw-r--r-- | vcl/source/app/settings.cxx | 4 | ||||
-rw-r--r-- | vcl/source/control/button.cxx | 292 | ||||
-rw-r--r-- | vcl/source/control/combobox.cxx | 147 | ||||
-rw-r--r-- | vcl/source/control/ctrl.cxx | 75 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 185 | ||||
-rw-r--r-- | vcl/source/control/fixedhyper.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/group.cxx | 29 | ||||
-rw-r--r-- | vcl/source/control/ilstbox.cxx | 1 | ||||
-rw-r--r-- | vcl/source/control/lstbox.cxx | 70 | ||||
-rw-r--r-- | vcl/source/control/scrbar.cxx | 22 | ||||
-rw-r--r-- | vcl/source/control/slider.cxx | 56 | ||||
-rw-r--r-- | vcl/source/control/spinfld.cxx | 54 | ||||
-rw-r--r-- | vcl/source/control/tabctrl.cxx | 127 | ||||
-rw-r--r-- | vcl/source/filter/sgvtext.cxx | 11 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winmtf.hxx | 9 | ||||
-rw-r--r-- | vcl/source/fontsubset/cff.cxx | 9 |
18 files changed, 25 insertions, 1071 deletions
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index 0cfe966a83f1..379bc32a7062 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -343,6 +343,7 @@ private: void GetAssertionEntryRange( sal_uInt16 nInbetweenEntry, sal_uInt16& nFirst, sal_uInt16& nLast ); }; + class DbgInfoDialog : public ModalDialog { private: @@ -356,6 +357,7 @@ public: void SetInfoText( const OUString& rStr ); }; + class DbgDialog : public ModalDialog { private: diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index b84364e00b24..77b655ab65d5 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -464,6 +464,7 @@ OUString HelpTextWindow::GetText() const return FloatingWindow::CreateAccessible(); } + void ImplShowHelpWindow( Window* pParent, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle, const OUString& rHelpText, const OUString& rStatusText, const Point& rScreenPos, const Rectangle* pHelpArea ) diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 991f9decf543..68314006da6f 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -892,15 +892,11 @@ void ImplStyleData::SetStandardStyles() maWorkspaceGradient = Wallpaper( aGrad ); } -// ----------------------------------------------------------------------- - StyleSettings::StyleSettings() : mpData(boost::make_shared<ImplStyleData>()) { } -// ----------------------------------------------------------------------- - StyleSettings::~StyleSettings() { } diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 660256fa8d22..fa061d73af39 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -85,13 +85,10 @@ mbSmallSymbol(false), maImage(), meImageAlign(IMAGEALIGN_TOP), meSymbolAlign(SYM { } - ImplCommonButtonData::~ImplCommonButtonData() { } - - Button::Button( WindowType nType ) : Control( nType ) { @@ -99,21 +96,16 @@ Button::Button( WindowType nType ) : } - Button::~Button() { delete mpButtonData; } - - void Button::Click() { ImplCallEventListenersAndHandler( VCLEVENT_BUTTON_CLICK, maClickHdl, this ); } - - OUString Button::GetStandardText( StandardButtonType eButton ) { static struct @@ -181,7 +173,6 @@ bool Button::HasImage() const return !!(mpButtonData->maImage); } - void Button::SetImageAlign( ImageAlign eAlign ) { if ( mpButtonData->meImageAlign != eAlign ) @@ -191,21 +182,16 @@ void Button::SetImageAlign( ImageAlign eAlign ) } } - ImageAlign Button::GetImageAlign() const { return mpButtonData->meImageAlign; } - - void Button::SetFocusRect( const Rectangle& rFocusRect ) { ImplSetFocusRect( rFocusRect ); } - - long Button::ImplGetSeparatorX() const { return mpButtonData->mnSeparatorX; @@ -216,8 +202,6 @@ void Button::ImplSetSeparatorX( long nX ) mpButtonData->mnSeparatorX = nX; } - - sal_uInt16 Button::ImplGetTextStyle( OUString& rText, WinBits nWinStyle, sal_uLong nDrawFlags ) { @@ -246,8 +230,6 @@ sal_uInt16 Button::ImplGetTextStyle( OUString& rText, WinBits nWinStyle, return nTextStyle; } - - void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos, Size& rSize, bool bLayout, sal_uLong nImageSep, sal_uLong nDrawFlags, @@ -520,7 +502,6 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos, } } - void Button::ImplSetFocusRect( const Rectangle &rFocusRect ) { Rectangle aFocusRect = rFocusRect; @@ -542,25 +523,21 @@ void Button::ImplSetFocusRect( const Rectangle &rFocusRect ) mpButtonData->maFocusRect = aFocusRect; } - const Rectangle& Button::ImplGetFocusRect() const { return mpButtonData->maFocusRect; } - sal_uInt16& Button::ImplGetButtonState() { return mpButtonData->mnButtonState; } - sal_uInt16 Button::ImplGetButtonState() const { return mpButtonData->mnButtonState; } - void Button::ImplSetSymbolAlign( SymbolAlign eAlign ) { if ( mpButtonData->meSymbolAlign != eAlign ) @@ -570,13 +547,11 @@ void Button::ImplSetSymbolAlign( SymbolAlign eAlign ) } } - void Button::SetSmallSymbol(bool bSmall) { mpButtonData->mbSmallSymbol = bSmall; } - void Button::EnableImageDisplay( bool bEnable ) { if( bEnable ) @@ -585,7 +560,6 @@ void Button::EnableImageDisplay( bool bEnable ) mpButtonData->mnButtonState |= BUTTON_DRAW_NOIMAGE; } - void Button::EnableTextDisplay( bool bEnable ) { if( bEnable ) @@ -619,8 +593,6 @@ bool Button::set_property(const OString &rKey, const OString &rValue) return true; } - - void PushButton::ImplInitPushButtonData() { mpWindowImpl->mbPushButton = true; @@ -633,8 +605,6 @@ void PushButton::ImplInitPushButtonData() mbInUserDraw = false; } - - void PushButton::ImplInit( Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle ); @@ -646,8 +616,6 @@ void PushButton::ImplInit( Window* pParent, WinBits nStyle ) ImplInitSettings( true, true, true ); } - - WinBits PushButton::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ) { if ( !(nStyle & WB_NOTABSTOP) ) @@ -669,21 +637,16 @@ WinBits PushButton::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ) return nStyle; } - - const Font& PushButton::GetCanonicalFont( const StyleSettings& _rStyle ) const { return _rStyle.GetPushButtonFont(); } - const Color& PushButton::GetCanonicalTextColor( const StyleSettings& _rStyle ) const { return _rStyle.GetButtonTextColor(); } - - void PushButton::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { @@ -714,8 +677,6 @@ void PushButton::ImplInitSettings( bool bFont, } } - - void PushButton::ImplDrawPushButtonFrame( Window* pDev, Rectangle& rRect, sal_uInt16 nStyle ) { @@ -742,8 +703,6 @@ void PushButton::ImplDrawPushButtonFrame( Window* pDev, rRect = aDecoView.DrawButton( rRect, nStyle ); } - - bool PushButton::ImplHitTestPushButton( Window* pDev, const Point& rPos ) { @@ -753,8 +712,6 @@ bool PushButton::ImplHitTestPushButton( Window* pDev, return aTestRect.IsInside( rPos ); } - - sal_uInt16 PushButton::ImplGetTextStyle( sal_uLong nDrawFlags ) const { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -790,8 +747,6 @@ sal_uInt16 PushButton::ImplGetTextStyle( sal_uLong nDrawFlags ) const return nTextStyle; } - - static void ImplDrawBtnDropDownArrow( OutputDevice* pDev, long nX, long nY, Color& rColor, bool bBlack ) @@ -818,8 +773,6 @@ static void ImplDrawBtnDropDownArrow( OutputDevice* pDev, pDev->SetFillColor( aOldFillColor ); } - - void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawFlags, const Rectangle& rRect, bool bLayout, @@ -940,14 +893,10 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawF pDev->Pop(); // restore clipregion } - - void PushButton::UserDraw( const UserDrawEvent& ) { } - - void PushButton::ImplDrawPushButton( bool bLayout ) { if( !bLayout ) @@ -1183,23 +1132,17 @@ void PushButton::ImplSetDefButton( bool bSet ) Invalidate(); } - - bool PushButton::ImplIsDefButton() const { return (ImplGetButtonState() & BUTTON_DRAW_DEFAULT) != 0; } - - PushButton::PushButton( WindowType nType ) : Button( nType ) { ImplInitPushButtonData(); } - - PushButton::PushButton( Window* pParent, WinBits nStyle ) : Button( WINDOW_PUSHBUTTON ) { @@ -1207,8 +1150,6 @@ PushButton::PushButton( Window* pParent, WinBits nStyle ) : ImplInit( pParent, nStyle ); } - - PushButton::PushButton( Window* pParent, const ResId& rResId ) : Button( WINDOW_PUSHBUTTON ) { @@ -1222,14 +1163,10 @@ PushButton::PushButton( Window* pParent, const ResId& rResId ) : Show(); } - - PushButton::~PushButton() { } - - void PushButton::MouseButtonDown( const MouseEvent& rMEvt ) { if ( rMEvt.IsLeft() && @@ -1250,8 +1187,6 @@ void PushButton::MouseButtonDown( const MouseEvent& rMEvt ) } } - - void PushButton::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) @@ -1316,8 +1251,6 @@ void PushButton::Tracking( const TrackingEvent& rTEvt ) } } - - void PushButton::KeyInput( const KeyEvent& rKEvt ) { KeyCode aKeyCode = rKEvt.GetKeyCode(); @@ -1344,8 +1277,6 @@ void PushButton::KeyInput( const KeyEvent& rKEvt ) Button::KeyInput( rKEvt ); } - - void PushButton::KeyUp( const KeyEvent& rKEvt ) { KeyCode aKeyCode = rKEvt.GetKeyCode(); @@ -1378,23 +1309,17 @@ void PushButton::KeyUp( const KeyEvent& rKEvt ) Button::KeyUp( rKEvt ); } - - void PushButton::FillLayoutData() const { mpControlData->mpLayoutData = new vcl::ControlLayoutData(); const_cast<PushButton*>(this)->ImplDrawPushButton( true ); } - - void PushButton::Paint( const Rectangle& ) { ImplDrawPushButton(); } - - void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) { @@ -1438,16 +1363,12 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->Pop(); } - - void PushButton::Resize() { Control::Resize(); Invalidate(); } - - void PushButton::GetFocus() { ShowFocus( ImplGetFocusRect() ); @@ -1455,8 +1376,6 @@ void PushButton::GetFocus() Button::GetFocus(); } - - void PushButton::LoseFocus() { EndSelection(); @@ -1464,8 +1383,6 @@ void PushButton::LoseFocus() Button::LoseFocus(); } - - void PushButton::StateChanged( StateChangedType nType ) { Button::StateChanged( nType ); @@ -1514,8 +1431,6 @@ void PushButton::StateChanged( StateChangedType nType ) } } - - void PushButton::DataChanged( const DataChangedEvent& rDCEvt ) { Button::DataChanged( rDCEvt ); @@ -1530,8 +1445,6 @@ void PushButton::DataChanged( const DataChangedEvent& rDCEvt ) } } - - bool PushButton::PreNotify( NotifyEvent& rNEvt ) { const MouseEvent* pMouseEvt = NULL; @@ -1597,15 +1510,11 @@ bool PushButton::PreNotify( NotifyEvent& rNEvt ) return Button::PreNotify(rNEvt); } - - void PushButton::Toggle() { ImplCallEventListenersAndHandler( VCLEVENT_PUSHBUTTON_TOGGLE, maToggleHdl, this ); } - - void PushButton::SetSymbol( SymbolType eSymbol ) { if ( meSymbol != eSymbol ) @@ -1615,14 +1524,11 @@ void PushButton::SetSymbol( SymbolType eSymbol ) } } - void PushButton::SetSymbolAlign( SymbolAlign eAlign ) { ImplSetSymbolAlign( eAlign ); } - - void PushButton::SetDropDown( sal_uInt16 nStyle ) { if ( mnDDStyle != nStyle ) @@ -1632,8 +1538,6 @@ void PushButton::SetDropDown( sal_uInt16 nStyle ) } } - - void PushButton::SetState( TriState eState ) { if ( meState != eState ) @@ -1657,8 +1561,6 @@ void PushButton::SetState( TriState eState ) } } - - void PushButton::SetPressed( bool bPressed ) { if ( mbPressed != bPressed ) @@ -1668,8 +1570,6 @@ void PushButton::SetPressed( bool bPressed ) } } - - void PushButton::EndSelection() { EndTracking( ENDTRACK_CANCEL ); @@ -1681,8 +1581,6 @@ void PushButton::EndSelection() } } - - Size PushButton::CalcMinimumSize( long nMaxWidth ) const { Size aSize; @@ -1740,9 +1638,6 @@ bool PushButton::set_property(const OString &rKey, const OString &rValue) return true; } - - - void OKButton::ImplInit( Window* pParent, WinBits nStyle ) { PushButton::ImplInit( pParent, nStyle ); @@ -1750,16 +1645,12 @@ void OKButton::ImplInit( Window* pParent, WinBits nStyle ) SetText( Button::GetStandardText( BUTTON_OK ) ); } - - OKButton::OKButton( Window* pParent, WinBits nStyle ) : PushButton( WINDOW_OKBUTTON ) { ImplInit( pParent, nStyle ); } - - OKButton::OKButton( Window* pParent, const ResId& rResId ) : PushButton( WINDOW_OKBUTTON ) { @@ -1772,8 +1663,6 @@ OKButton::OKButton( Window* pParent, const ResId& rResId ) : Show(); } - - void OKButton::Click() { // close parent if no link set @@ -1806,8 +1695,6 @@ void OKButton::Click() } } - - void CancelButton::ImplInit( Window* pParent, WinBits nStyle ) { PushButton::ImplInit( pParent, nStyle ); @@ -1815,16 +1702,12 @@ void CancelButton::ImplInit( Window* pParent, WinBits nStyle ) SetText( Button::GetStandardText( BUTTON_CANCEL ) ); } - - CancelButton::CancelButton( Window* pParent, WinBits nStyle ) : PushButton( WINDOW_CANCELBUTTON ) { ImplInit( pParent, nStyle ); } - - CancelButton::CancelButton( Window* pParent, const ResId& rResId ) : PushButton( WINDOW_CANCELBUTTON ) { @@ -1837,8 +1720,6 @@ CancelButton::CancelButton( Window* pParent, const ResId& rResId ) : Show(); } - - void CancelButton::Click() { // close parent if link not set @@ -1877,8 +1758,6 @@ CloseButton::CloseButton( Window* pParent, WinBits nStyle ) SetText( Button::GetStandardText( BUTTON_CLOSE ) ); } - - void HelpButton::ImplInit( Window* pParent, WinBits nStyle ) { PushButton::ImplInit( pParent, nStyle | WB_NOPOINTERFOCUS ); @@ -1886,16 +1765,12 @@ void HelpButton::ImplInit( Window* pParent, WinBits nStyle ) SetText( Button::GetStandardText( BUTTON_HELP ) ); } - - HelpButton::HelpButton( Window* pParent, WinBits nStyle ) : PushButton( WINDOW_HELPBUTTON ) { ImplInit( pParent, nStyle ); } - - HelpButton::HelpButton( Window* pParent, const ResId& rResId ) : PushButton( WINDOW_HELPBUTTON ) { @@ -1908,8 +1783,6 @@ HelpButton::HelpButton( Window* pParent, const ResId& rResId ) : Show(); } - - void HelpButton::Click() { // trigger help if no link set @@ -1925,8 +1798,6 @@ void HelpButton::Click() PushButton::Click(); } - - void RadioButton::ImplInitRadioButtonData() { mbChecked = false; @@ -1935,8 +1806,6 @@ void RadioButton::ImplInitRadioButtonData() mbStateChanged = false; } - - void RadioButton::ImplInit( Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle ); @@ -1945,8 +1814,6 @@ void RadioButton::ImplInit( Window* pParent, WinBits nStyle ) ImplInitSettings( true, true, true ); } - - WinBits RadioButton::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ) { if ( !(nStyle & WB_NOGROUP) && @@ -1962,21 +1829,16 @@ WinBits RadioButton::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ) return nStyle; } - - const Font& RadioButton::GetCanonicalFont( const StyleSettings& _rStyle ) const { return _rStyle.GetRadioCheckFont(); } - const Color& RadioButton::GetCanonicalTextColor( const StyleSettings& _rStyle ) const { return _rStyle.GetRadioCheckTextColor(); } - - void RadioButton::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { @@ -2014,8 +1876,6 @@ void RadioButton::DrawRadioButtonState( ) ImplDrawRadioButtonState( ); } - - void RadioButton::ImplInvalidateOrDrawRadioButtonState() { if( ImplGetSVData()->maNWFData.mbCheckBoxNeedsErase ) @@ -2140,8 +2000,6 @@ void RadioButton::ImplDrawRadioButtonState() } } - - void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize, const Size& rImageSize, Rectangle& rStateRect, @@ -2278,8 +2136,6 @@ void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, pDev->Pop(); } - - void RadioButton::ImplDrawRadioButton( bool bLayout ) { if( !bLayout ) @@ -2348,8 +2204,6 @@ void RadioButton::group(RadioButton &rOther) ImplUncheckAllOther(); } -// .----------------------------------------------------------------------- - std::vector< RadioButton* > RadioButton::GetRadioButtonGroup(bool bIncludeThis) const { if (m_xGroup) @@ -2395,8 +2249,6 @@ std::vector< RadioButton* > RadioButton::GetRadioButtonGroup(bool bIncludeThis) return aGroup; } - - void RadioButton::ImplUncheckAllOther() { mpWindowImpl->mnStyle |= WB_TABSTOP; @@ -2421,8 +2273,6 @@ void RadioButton::ImplUncheckAllOther() } } - - void RadioButton::ImplCallClick( bool bGrabFocus, sal_uInt16 nFocusFlags ) { mbStateChanged = !mbChecked; @@ -2450,8 +2300,6 @@ void RadioButton::ImplCallClick( bool bGrabFocus, sal_uInt16 nFocusFlags ) mbStateChanged = false; } - - RadioButton::RadioButton( Window* pParent, WinBits nStyle ) : Button( WINDOW_RADIOBUTTON ), mbLegacyNoTextAlign( false ) { @@ -2459,8 +2307,6 @@ RadioButton::RadioButton( Window* pParent, WinBits nStyle ) : ImplInit( pParent, nStyle ); } - - RadioButton::RadioButton( Window* pParent, const ResId& rResId ) : Button( WINDOW_RADIOBUTTON ), mbLegacyNoTextAlign( false ) { @@ -2474,8 +2320,6 @@ RadioButton::RadioButton( Window* pParent, const ResId& rResId ) : Show(); } - - void RadioButton::ImplLoadRes( const ResId& rResId ) { Button::ImplLoadRes( rResId ); @@ -2486,8 +2330,6 @@ void RadioButton::ImplLoadRes( const ResId& rResId ) SetState( true ); } - - RadioButton::~RadioButton() { if (m_xGroup) @@ -2497,8 +2339,6 @@ RadioButton::~RadioButton() } } - - void RadioButton::MouseButtonDown( const MouseEvent& rMEvt ) { if ( rMEvt.IsLeft() && maMouseRect.IsInside( rMEvt.GetPosPixel() ) ) @@ -2512,8 +2352,6 @@ void RadioButton::MouseButtonDown( const MouseEvent& rMEvt ) Button::MouseButtonDown( rMEvt ); } - - void RadioButton::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) @@ -2553,8 +2391,6 @@ void RadioButton::Tracking( const TrackingEvent& rTEvt ) } } - - void RadioButton::KeyInput( const KeyEvent& rKEvt ) { KeyCode aKeyCode = rKEvt.GetKeyCode(); @@ -2576,8 +2412,6 @@ void RadioButton::KeyInput( const KeyEvent& rKEvt ) Button::KeyInput( rKEvt ); } - - void RadioButton::KeyUp( const KeyEvent& rKEvt ) { KeyCode aKeyCode = rKEvt.GetKeyCode(); @@ -2591,23 +2425,17 @@ void RadioButton::KeyUp( const KeyEvent& rKEvt ) Button::KeyUp( rKEvt ); } - - void RadioButton::FillLayoutData() const { mpControlData->mpLayoutData = new vcl::ControlLayoutData(); const_cast<RadioButton*>(this)->ImplDrawRadioButton( true ); } - - void RadioButton::Paint( const Rectangle& ) { ImplDrawRadioButton(); } - - void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) { @@ -2682,16 +2510,12 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize } } - - void RadioButton::Resize() { Control::Resize(); Invalidate(); } - - void RadioButton::GetFocus() { ShowFocus( ImplGetFocusRect() ); @@ -2699,8 +2523,6 @@ void RadioButton::GetFocus() Button::GetFocus(); } - - void RadioButton::LoseFocus() { if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) @@ -2713,8 +2535,6 @@ void RadioButton::LoseFocus() Button::LoseFocus(); } - - void RadioButton::StateChanged( StateChangedType nType ) { Button::StateChanged( nType ); @@ -2762,8 +2582,6 @@ void RadioButton::StateChanged( StateChangedType nType ) } } - - void RadioButton::DataChanged( const DataChangedEvent& rDCEvt ) { Button::DataChanged( rDCEvt ); @@ -2778,8 +2596,6 @@ void RadioButton::DataChanged( const DataChangedEvent& rDCEvt ) } } - - bool RadioButton::PreNotify( NotifyEvent& rNEvt ) { const MouseEvent* pMouseEvt = NULL; @@ -2806,15 +2622,11 @@ bool RadioButton::PreNotify( NotifyEvent& rNEvt ) return Button::PreNotify(rNEvt); } - - void RadioButton::Toggle() { ImplCallEventListenersAndHandler( VCLEVENT_RADIOBUTTON_TOGGLE, maToggleHdl, this ); } - - bool RadioButton::SetModeRadioImage( const Image& rImage ) { if ( rImage != maImage ) @@ -2826,15 +2638,11 @@ bool RadioButton::SetModeRadioImage( const Image& rImage ) return true; } - - const Image& RadioButton::GetModeRadioImage( ) const { return maImage; } - - void RadioButton::SetState( bool bCheck ) { // TabStop-Flag richtig mitfuehren @@ -2890,8 +2698,6 @@ bool RadioButton::set_property(const OString &rKey, const OString &rValue) return true; } - - void RadioButton::Check( bool bCheck ) { // TabStop-Flag richtig mitfuehren @@ -2917,8 +2723,6 @@ void RadioButton::Check( bool bCheck ) } } - - long RadioButton::ImplGetImageToTextDistance() const { // 4 pixels, but take zoom into account, so the text doesn't "jump" relative to surrounding elements, @@ -2926,8 +2730,6 @@ long RadioButton::ImplGetImageToTextDistance() const return CalcZoom( 4 ); } - - Size RadioButton::ImplGetRadioImageSize() const { Size aSize; @@ -3037,8 +2839,6 @@ Image RadioButton::GetRadioImage( const AllSettings& rSettings, sal_uInt16 nFlag return pSVData->maCtrlData.mpRadioImgList->GetImage( nId ); } - - void RadioButton::ImplSetMinimumNWFSize() { Push( PUSH_MAPMODE ); @@ -3066,8 +2866,6 @@ void RadioButton::ImplSetMinimumNWFSize() Pop(); } - - Size RadioButton::CalcMinimumSize( long nMaxWidth ) const { Size aSize; @@ -3118,15 +2916,11 @@ Size RadioButton::CalcMinimumSize( long nMaxWidth ) const return CalcWindowSize( aSize ); } - - Size RadioButton::GetOptimalSize() const { return CalcMinimumSize(); } - - void CheckBox::ImplInitCheckBoxData() { meState = TRISTATE_FALSE; @@ -3134,8 +2928,6 @@ void CheckBox::ImplInitCheckBoxData() mbTriState = false; } - - void CheckBox::ImplInit( Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle ); @@ -3144,8 +2936,6 @@ void CheckBox::ImplInit( Window* pParent, WinBits nStyle ) ImplInitSettings( true, true, true ); } - - WinBits CheckBox::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ) { if ( !(nStyle & WB_NOTABSTOP) ) @@ -3156,21 +2946,16 @@ WinBits CheckBox::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ) return nStyle; } - - const Font& CheckBox::GetCanonicalFont( const StyleSettings& _rStyle ) const { return _rStyle.GetRadioCheckFont(); } - const Color& CheckBox::GetCanonicalTextColor( const StyleSettings& _rStyle ) const { return _rStyle.GetRadioCheckTextColor(); } - - void CheckBox::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { @@ -3203,8 +2988,6 @@ void CheckBox::ImplInitSettings( bool bFont, } } - - void CheckBox::ImplLoadRes( const ResId& rResId ) { Button::ImplLoadRes( rResId ); @@ -3218,8 +3001,6 @@ void CheckBox::ImplLoadRes( const ResId& rResId ) } } - - void CheckBox::ImplInvalidateOrDrawCheckBoxState() { if( ImplGetSVData()->maNWFData.mbCheckBoxNeedsErase ) @@ -3278,8 +3059,6 @@ void CheckBox::ImplDrawCheckBoxState() } } - - void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize, const Size& rImageSize, Rectangle& rStateRect, @@ -3383,8 +3162,6 @@ void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, pDev->Pop(); } - - void CheckBox::ImplDrawCheckBox( bool bLayout ) { Size aImageSize = ImplGetCheckImageSize(); @@ -3405,8 +3182,6 @@ void CheckBox::ImplDrawCheckBox( bool bLayout ) } } - - void CheckBox::ImplCheck() { TriState eNewState; @@ -3433,8 +3208,6 @@ void CheckBox::ImplCheck() Click(); } - - CheckBox::CheckBox( Window* pParent, WinBits nStyle ) : Button( WINDOW_CHECKBOX ), mbLegacyNoTextAlign( false ) { @@ -3442,8 +3215,6 @@ CheckBox::CheckBox( Window* pParent, WinBits nStyle ) : ImplInit( pParent, nStyle ); } - - CheckBox::CheckBox( Window* pParent, const ResId& rResId ) : Button( WINDOW_CHECKBOX ), mbLegacyNoTextAlign( false ) { @@ -3457,8 +3228,6 @@ CheckBox::CheckBox( Window* pParent, const ResId& rResId ) : Show(); } - - void CheckBox::MouseButtonDown( const MouseEvent& rMEvt ) { if ( rMEvt.IsLeft() && maMouseRect.IsInside( rMEvt.GetPosPixel() ) ) @@ -3472,8 +3241,6 @@ void CheckBox::MouseButtonDown( const MouseEvent& rMEvt ) Button::MouseButtonDown( rMEvt ); } - - void CheckBox::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) @@ -3513,8 +3280,6 @@ void CheckBox::Tracking( const TrackingEvent& rTEvt ) } } - - void CheckBox::KeyInput( const KeyEvent& rKEvt ) { KeyCode aKeyCode = rKEvt.GetKeyCode(); @@ -3536,8 +3301,6 @@ void CheckBox::KeyInput( const KeyEvent& rKEvt ) Button::KeyInput( rKEvt ); } - - void CheckBox::KeyUp( const KeyEvent& rKEvt ) { KeyCode aKeyCode = rKEvt.GetKeyCode(); @@ -3551,23 +3314,17 @@ void CheckBox::KeyUp( const KeyEvent& rKEvt ) Button::KeyUp( rKEvt ); } - - void CheckBox::FillLayoutData() const { mpControlData->mpLayoutData = new vcl::ControlLayoutData(); const_cast<CheckBox*>(this)->ImplDrawCheckBox( true ); } - - void CheckBox::Paint( const Rectangle& ) { ImplDrawCheckBox(); } - - void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) { @@ -3666,16 +3423,12 @@ void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->Pop(); } - - void CheckBox::Resize() { Control::Resize(); Invalidate(); } - - void CheckBox::GetFocus() { if ( GetText().isEmpty() || (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) ) @@ -3698,8 +3451,6 @@ void CheckBox::GetFocus() Button::GetFocus(); } - - void CheckBox::LoseFocus() { if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) @@ -3725,8 +3476,6 @@ void CheckBox::LoseFocus() } } - - void CheckBox::StateChanged( StateChangedType nType ) { Button::StateChanged( nType ); @@ -3774,8 +3523,6 @@ void CheckBox::StateChanged( StateChangedType nType ) } } - - void CheckBox::DataChanged( const DataChangedEvent& rDCEvt ) { Button::DataChanged( rDCEvt ); @@ -3790,8 +3537,6 @@ void CheckBox::DataChanged( const DataChangedEvent& rDCEvt ) } } - - bool CheckBox::PreNotify( NotifyEvent& rNEvt ) { const MouseEvent* pMouseEvt = NULL; @@ -3818,15 +3563,11 @@ bool CheckBox::PreNotify( NotifyEvent& rNEvt ) return Button::PreNotify(rNEvt); } - - void CheckBox::Toggle() { ImplCallEventListenersAndHandler( VCLEVENT_CHECKBOX_TOGGLE, maToggleHdl, this ); } - - void CheckBox::SetState( TriState eState ) { if ( !mbTriState && (eState == TRISTATE_INDET) ) @@ -3849,8 +3590,6 @@ bool CheckBox::set_property(const OString &rKey, const OString &rValue) return true; } - - void CheckBox::EnableTriState( bool bTriState ) { if ( mbTriState != bTriState ) @@ -3862,8 +3601,6 @@ void CheckBox::EnableTriState( bool bTriState ) } } - - long CheckBox::ImplGetImageToTextDistance() const { // 4 pixels, but take zoom into account, so the text doesn't "jump" relative to surrounding elements, @@ -3871,8 +3608,6 @@ long CheckBox::ImplGetImageToTextDistance() const return CalcZoom( 4 ); } - - Size CheckBox::ImplGetCheckImageSize() const { Size aSize; @@ -3961,8 +3696,6 @@ Image CheckBox::GetCheckImage( const AllSettings& rSettings, sal_uInt16 nFlags ) return pSVData->maCtrlData.mpCheckImgList->GetImage( nId ); } - - void CheckBox::ImplSetMinimumNWFSize() { Push( PUSH_MAPMODE ); @@ -3990,8 +3723,6 @@ void CheckBox::ImplSetMinimumNWFSize() Pop(); } - - Size CheckBox::CalcMinimumSize( long nMaxWidth ) const { Size aSize = ImplGetCheckImageSize(); @@ -4025,23 +3756,17 @@ Size CheckBox::CalcMinimumSize( long nMaxWidth ) const return CalcWindowSize( aSize ); } - - Size CheckBox::GetOptimalSize() const { return CalcMinimumSize(); } - - ImageButton::ImageButton( Window* pParent, WinBits nStyle ) : PushButton( pParent, nStyle ) { ImplInitStyle(); } - - ImageButton::ImageButton( Window* pParent, const ResId& rResId ) : PushButton( pParent, rResId.SetRT( RSC_IMAGEBUTTON ) ) { @@ -4062,13 +3787,10 @@ ImageButton::ImageButton( Window* pParent, const ResId& rResId ) : ImplInitStyle(); } - - ImageButton::~ImageButton() { } - void ImageButton::ImplInitStyle() { WinBits nStyle = GetStyle(); @@ -4082,42 +3804,30 @@ void ImageButton::ImplInitStyle() SetStyle( nStyle ); } - - ImageRadioButton::ImageRadioButton( Window* pParent, WinBits nStyle ) : RadioButton( pParent, nStyle ) { } - - ImageRadioButton::~ImageRadioButton() { } - - TriStateBox::TriStateBox( Window* pParent, WinBits nStyle ) : CheckBox( pParent, nStyle ) { EnableTriState( true ); } - - TriStateBox::~TriStateBox() { } - - DisclosureButton::DisclosureButton( Window* pParent, WinBits nStyle ) : CheckBox( pParent, nStyle ) { } - - void DisclosureButton::ImplDrawCheckBoxState() { /* HACK: DisclosureButton is currently assuming, that the disclosure sign @@ -4168,8 +3878,6 @@ void DisclosureButton::ImplDrawCheckBoxState() } } - - void DisclosureButton::KeyInput( const KeyEvent& rKEvt ) { KeyCode aKeyCode = rKEvt.GetKeyCode(); diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index ce9400fb7c01..64a8e5f56dbc 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -33,8 +33,6 @@ #include <ilstbox.hxx> #include <controldata.hxx> - - static void lcl_GetSelectedEntries( ::std::set< sal_uInt16 >& rSelectedPos, const OUString& rText, sal_Unicode cTokenSep, const ImplEntryList* pEntryList ) { for (sal_Int32 n = comphelper::string::getTokenCount(rText, cTokenSep); n;) @@ -47,8 +45,6 @@ static void lcl_GetSelectedEntries( ::std::set< sal_uInt16 >& rSelectedPos, cons } } - - ComboBox::ComboBox( WindowType nType ) : Edit( nType ) { @@ -56,8 +52,6 @@ ComboBox::ComboBox( WindowType nType ) : SetWidthInChars(-1); } - - ComboBox::ComboBox( Window* pParent, WinBits nStyle ) : Edit( WINDOW_COMBOBOX ) { @@ -66,8 +60,6 @@ ComboBox::ComboBox( Window* pParent, WinBits nStyle ) : SetWidthInChars(-1); } - - ComboBox::ComboBox( Window* pParent, const ResId& rResId ) : Edit( WINDOW_COMBOBOX ) { @@ -82,8 +74,6 @@ ComboBox::ComboBox( Window* pParent, const ResId& rResId ) : Show(); } - - ComboBox::~ComboBox() { SetSubEdit( NULL ); @@ -97,8 +87,6 @@ ComboBox::~ComboBox() delete mpBtn; } - - void ComboBox::ImplInitComboBoxData() { mpSubEdit = NULL; @@ -114,8 +102,6 @@ void ComboBox::ImplInitComboBoxData() m_nMaxWidthChars = -1; } - - void ComboBox::ImplCalcEditHeight() { sal_Int32 nLeft, nTop, nRight, nBottom; @@ -140,8 +126,6 @@ void ComboBox::ImplCalcEditHeight() } } - - void ComboBox::ImplInit( Window* pParent, WinBits nStyle ) { ImplInitStyle( nStyle ); @@ -219,8 +203,6 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle ) SetCompoundControl( true ); } - - WinBits ComboBox::ImplInitStyle( WinBits nStyle ) { if ( !(nStyle & WB_NOTABSTOP) ) @@ -230,8 +212,6 @@ WinBits ComboBox::ImplInitStyle( WinBits nStyle ) return nStyle; } - - void ComboBox::ImplLoadRes( const ResId& rResId ) { Edit::ImplLoadRes( rResId ); @@ -247,8 +227,6 @@ void ComboBox::ImplLoadRes( const ResId& rResId ) } } - - void ComboBox::EnableAutocomplete( bool bEnable, bool bMatchCase ) { mbMatchCase = bMatchCase; @@ -259,15 +237,11 @@ void ComboBox::EnableAutocomplete( bool bEnable, bool bMatchCase ) mpSubEdit->SetAutocompleteHdl( Link() ); } - - bool ComboBox::IsAutocompleteEnabled() const { return mpSubEdit->GetAutocompleteHdl().IsSet(); } - - IMPL_LINK_NOARG(ComboBox, ImplClickBtnHdl) { ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN ); @@ -288,8 +262,6 @@ IMPL_LINK_NOARG(ComboBox, ImplClickBtnHdl) return 0; } - - IMPL_LINK_NOARG(ComboBox, ImplPopupModeEndHdl) { if( mpFloatWin->IsPopupModeCanceled() ) @@ -313,8 +285,6 @@ IMPL_LINK_NOARG(ComboBox, ImplPopupModeEndHdl) return 0; } - - IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit ) { Selection aSel = pEdit->GetSelection(); @@ -370,8 +340,6 @@ IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit ) return 0; } - - IMPL_LINK_NOARG(ComboBox, ImplSelectHdl) { bool bPopup = IsInDropDown(); @@ -476,8 +444,6 @@ IMPL_LINK_NOARG(ComboBox, ImplCancelHdl) return 1; } - - IMPL_LINK( ComboBox, ImplSelectionChangedHdl, void*, n ) { if ( !mpImplLB->IsTrackingSelect() ) @@ -489,16 +455,12 @@ IMPL_LINK( ComboBox, ImplSelectionChangedHdl, void*, n ) return 1; } - - IMPL_LINK_NOARG(ComboBox, ImplDoubleClickHdl) { DoubleClick(); return 0; } - - void ComboBox::ToggleDropDown() { if( IsDropDownBox() ) @@ -521,22 +483,16 @@ void ComboBox::ToggleDropDown() } } - - void ComboBox::Select() { ImplCallEventListenersAndHandler( VCLEVENT_COMBOBOX_SELECT, maSelectHdl, this ); } - - void ComboBox::DoubleClick() { ImplCallEventListenersAndHandler( VCLEVENT_COMBOBOX_DOUBLECLICK, maDoubleClickHdl, this ); } - - void ComboBox::EnableAutoSize( bool bAuto ) { mbDDAutoSize = bAuto; @@ -554,32 +510,24 @@ void ComboBox::EnableAutoSize( bool bAuto ) } } - - void ComboBox::EnableDDAutoWidth( bool b ) { if ( mpFloatWin ) mpFloatWin->SetAutoWidth( b ); } - - void ComboBox::SetDropDownLineCount( sal_uInt16 nLines ) { if ( mpFloatWin ) mpFloatWin->SetDropDownLineCount( nLines ); } - - void ComboBox::AdaptDropDownLineCountToMaximum() { // adapt to maximum allowed number SetDropDownLineCount(GetSettings().GetStyleSettings().GetListBoxMaximumLineCount()); } - - sal_uInt16 ComboBox::GetDropDownLineCount() const { sal_uInt16 nLines = 0; @@ -588,8 +536,6 @@ sal_uInt16 ComboBox::GetDropDownLineCount() const return nLines; } - - void ComboBox::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) { @@ -609,8 +555,6 @@ void ComboBox::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, Edit::setPosSizePixel( nX, nY, nWidth, nHeight, nFlags ); } - - void ComboBox::Resize() { Control::Resize(); @@ -637,8 +581,6 @@ void ComboBox::Resize() mpFloatWin->SetSizePixel( mpFloatWin->CalcFloatSize() ); } - - void ComboBox::FillLayoutData() const { mpControlData->mpLayoutData = new vcl::ControlLayoutData(); @@ -661,8 +603,6 @@ void ComboBox::FillLayoutData() const } } - - void ComboBox::StateChanged( StateChangedType nType ) { Edit::StateChanged( nType ); @@ -727,8 +667,6 @@ void ComboBox::StateChanged( StateChangedType nType ) } } - - void ComboBox::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); @@ -751,16 +689,12 @@ void ComboBox::DataChanged( const DataChangedEvent& rDCEvt ) } } - - bool ComboBox::PreNotify( NotifyEvent& rNEvt ) { return Edit::PreNotify( rNEvt ); } - - bool ComboBox::Notify( NotifyEvent& rNEvt ) { bool nDone = false; @@ -844,8 +778,6 @@ bool ComboBox::Notify( NotifyEvent& rNEvt ) return nDone || Edit::Notify( rNEvt ); } - - void ComboBox::SetText( const OUString& rStr ) { ImplCallEventListeners( VCLEVENT_COMBOBOX_SETTEXT ); @@ -854,8 +786,6 @@ void ComboBox::SetText( const OUString& rStr ) ImplUpdateFloatSelection(); } - - void ComboBox::SetText( const OUString& rStr, const Selection& rNewSelection ) { ImplCallEventListeners( VCLEVENT_COMBOBOX_SETTEXT ); @@ -864,8 +794,6 @@ void ComboBox::SetText( const OUString& rStr, const Selection& rNewSelection ) ImplUpdateFloatSelection(); } - - void ComboBox::Modify() { if ( !mbSyntheticModify ) @@ -874,8 +802,6 @@ void ComboBox::Modify() Edit::Modify(); } - - void ComboBox::ImplUpdateFloatSelection() { // move text in the ListBox into the visible region @@ -925,8 +851,6 @@ void ComboBox::ImplUpdateFloatSelection() mpImplLB->SetCallSelectionChangedHdl( true ); } - - sal_uInt16 ComboBox::InsertEntry(const OUString& rStr, sal_uInt16 const nPos) { sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr ); @@ -935,8 +859,6 @@ sal_uInt16 ComboBox::InsertEntry(const OUString& rStr, sal_uInt16 const nPos) return nRealPos; } - - void ComboBox::InsertEntryWithImage( const OUString& rStr, const Image& rImage, sal_uInt16 const nPos) { @@ -945,30 +867,23 @@ void ComboBox::InsertEntryWithImage( CallEventListeners( VCLEVENT_COMBOBOX_ITEMADDED, (void*) sal_IntPtr(nRealPos) ); } - - void ComboBox::RemoveEntry( const OUString& rStr ) { RemoveEntryAt(GetEntryPos(rStr)); } - - void ComboBox::RemoveEntryAt(sal_uInt16 const nPos) { mpImplLB->RemoveEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() ); CallEventListeners( VCLEVENT_COMBOBOX_ITEMREMOVED, (void*) sal_IntPtr(nPos) ); } - - void ComboBox::Clear() { mpImplLB->Clear(); CallEventListeners( VCLEVENT_COMBOBOX_ITEMREMOVED, (void*) sal_IntPtr(-1) ); } - Image ComboBox::GetEntryImage( sal_uInt16 nPos ) const { if ( mpImplLB->GetEntryList()->HasEntryImage( nPos ) ) @@ -976,8 +891,6 @@ Image ComboBox::GetEntryImage( sal_uInt16 nPos ) const return Image(); } - - sal_uInt16 ComboBox::GetEntryPos( const OUString& rStr ) const { sal_uInt16 nPos = mpImplLB->GetEntryList()->FindEntry( rStr ); @@ -986,65 +899,47 @@ sal_uInt16 ComboBox::GetEntryPos( const OUString& rStr ) const return nPos; } - - OUString ComboBox::GetEntry( sal_uInt16 nPos ) const { return mpImplLB->GetEntryList()->GetEntryText( nPos + mpImplLB->GetEntryList()->GetMRUCount() ); } - - sal_uInt16 ComboBox::GetEntryCount() const { return mpImplLB->GetEntryList()->GetEntryCount() - mpImplLB->GetEntryList()->GetMRUCount(); } - - bool ComboBox::IsTravelSelect() const { return mpImplLB->IsTravelSelect(); } - - bool ComboBox::IsInDropDown() const { return mpFloatWin && mpFloatWin->IsInPopupMode(); } - - void ComboBox::EnableMultiSelection( bool bMulti ) { mpImplLB->EnableMultiSelection( bMulti, false ); mpImplLB->SetMultiSelectionSimpleMode( true ); } - - bool ComboBox::IsMultiSelectionEnabled() const { return mpImplLB->IsMultiSelectionEnabled(); } - - long ComboBox::CalcWindowSizePixel( sal_uInt16 nLines ) const { return mpImplLB->GetEntryHeight() * nLines; } - - Size ComboBox::GetOptimalSize() const { return CalcMinimumSize(); } - - long ComboBox::getMaxWidthScrollBarAndDownButton() const { long nButtonDownWidth = 0; @@ -1105,8 +1000,6 @@ Size ComboBox::CalcMinimumSize() const return aSz; } - - Size ComboBox::CalcAdjustedSize( const Size& rPrefSize ) const { Size aSz = rPrefSize; @@ -1132,8 +1025,6 @@ Size ComboBox::CalcAdjustedSize( const Size& rPrefSize ) const return aSz; } - - Size ComboBox::CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const { // show ScrollBars where appropriate @@ -1174,8 +1065,6 @@ Size ComboBox::CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const return aSz; } - - void ComboBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const { long nCharWidth = GetTextWidth(OUString(static_cast<sal_Unicode>('x'))); @@ -1193,8 +1082,6 @@ void ComboBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines } } - - void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) { mpImplLB->GetMainWindow()->ImplInitSettings( true, true, true ); @@ -1299,72 +1186,52 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, s } - - IMPL_LINK( ComboBox, ImplUserDrawHdl, UserDrawEvent*, pEvent ) { UserDraw( *pEvent ); return 1; } - - void ComboBox::UserDraw( const UserDrawEvent& ) { } - - void ComboBox::SetUserItemSize( const Size& rSz ) { mpImplLB->GetMainWindow()->SetUserItemSize( rSz ); } - - void ComboBox::EnableUserDraw( bool bUserDraw ) { mpImplLB->GetMainWindow()->EnableUserDraw( bUserDraw ); } - - void ComboBox::DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos ) { DBG_ASSERT( rEvt.GetDevice() == mpImplLB->GetMainWindow(), "DrawEntry?!" ); mpImplLB->GetMainWindow()->DrawEntry( rEvt.GetItemId(), bDrawImage, bDrawText, bDrawTextAtImagePos ); } - - void ComboBox::SetSeparatorPos( sal_uInt16 n ) { mpImplLB->SetSeparatorPos( n ); } - - void ComboBox::SetMRUEntries( const OUString& rEntries, sal_Unicode cSep ) { mpImplLB->SetMRUEntries( rEntries, cSep ); } - - OUString ComboBox::GetMRUEntries( sal_Unicode cSep ) const { return mpImplLB->GetMRUEntries( cSep ); } - - void ComboBox::SetMaxMRUCount( sal_uInt16 n ) { mpImplLB->SetMaxMRUCount( n ); } - - sal_uInt16 ComboBox::GetMaxMRUCount() const { return mpImplLB->GetMaxMRUCount(); @@ -1375,29 +1242,21 @@ sal_uInt16 ComboBox::GetMRUCount() const return mpImplLB->GetEntryList()->GetMRUCount(); } - - sal_uInt16 ComboBox::GetDisplayLineCount() const { return mpImplLB->GetDisplayLineCount(); } - - void ComboBox::SetEntryData( sal_uInt16 nPos, void* pNewData ) { mpImplLB->SetEntryData( nPos + mpImplLB->GetEntryList()->GetMRUCount(), pNewData ); } - - void* ComboBox::GetEntryData( sal_uInt16 nPos ) const { return mpImplLB->GetEntryList()->GetEntryData( nPos + mpImplLB->GetEntryList()->GetMRUCount() ); } - - sal_uInt16 ComboBox::GetTopEntry() const { sal_uInt16 nPos = GetEntryCount() ? mpImplLB->GetTopEntry() : LISTBOX_ENTRY_NOTFOUND; @@ -1406,22 +1265,16 @@ sal_uInt16 ComboBox::GetTopEntry() const return nPos; } - - void ComboBox::SetProminentEntryType( ProminentEntry eType ) { mpImplLB->SetProminentEntryType( eType ); } - - Rectangle ComboBox::GetDropDownPosSizePixel() const { return mpFloatWin ? mpFloatWin->GetWindowExtentsRelative( const_cast<ComboBox*>(this) ) : Rectangle(); } - - const Wallpaper& ComboBox::GetDisplayBackground() const { if( ! mpSubEdit->IsBackground() ) diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index db925454b191..2fe5c0bd9a87 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -32,27 +32,20 @@ #include <svdata.hxx> #include <controldata.hxx> - using namespace vcl; - - void Control::ImplInitControlData() { mbHasControlFocus = false; mpControlData = new ImplControlData; } - - Control::Control( WindowType nType ) : Window( nType ) { ImplInitControlData(); } - - Control::Control( Window* pParent, WinBits nStyle ) : Window( WINDOW_CONTROL ) { @@ -73,81 +66,58 @@ Control::Control( Window* pParent, const ResId& rResId ) : Show(); } - - Control::~Control() { delete mpControlData, mpControlData = NULL; } - - void Control::GetFocus() { Window::GetFocus(); } - - void Control::LoseFocus() { Window::LoseFocus(); } - - void Control::Resize() { ImplClearLayoutData(); Window::Resize(); } - - void Control::FillLayoutData() const { } - - void Control::CreateLayoutData() const { DBG_ASSERT( !mpControlData->mpLayoutData, "Control::CreateLayoutData: should be called with non-existent layout data only!" ); mpControlData->mpLayoutData = new ::vcl::ControlLayoutData(); } - - bool Control::HasLayoutData() const { return mpControlData->mpLayoutData != NULL; } - - ::vcl::ControlLayoutData* Control::GetLayoutData() const { return mpControlData->mpLayoutData; } - - void Control::SetText( const OUString& rStr ) { ImplClearLayoutData(); Window::SetText( rStr ); } - - Rectangle ControlLayoutData::GetCharacterBounds( long nIndex ) const { return (nIndex >= 0 && nIndex < (long) m_aUnicodeBoundRects.size()) ? m_aUnicodeBoundRects[ nIndex ] : Rectangle(); } - - - Rectangle Control::GetCharacterBounds( long nIndex ) const { if( !HasLayoutData() ) @@ -155,8 +125,6 @@ Rectangle Control::GetCharacterBounds( long nIndex ) const return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->GetCharacterBounds( nIndex ) : Rectangle(); } - - long ControlLayoutData::GetIndexForPoint( const Point& rPoint ) const { long nIndex = -1; @@ -174,8 +142,6 @@ long ControlLayoutData::GetIndexForPoint( const Point& rPoint ) const return nIndex; } - - long Control::GetIndexForPoint( const Point& rPoint ) const { if( ! HasLayoutData() ) @@ -183,8 +149,6 @@ long Control::GetIndexForPoint( const Point& rPoint ) const return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->GetIndexForPoint( rPoint ) : -1; } - - long ControlLayoutData::GetLineCount() const { long nLines = m_aLineIndices.size(); @@ -193,8 +157,6 @@ long ControlLayoutData::GetLineCount() const return nLines; } - - Pair ControlLayoutData::GetLineStartEnd( long nLine ) const { Pair aPair( -1, -1 ); @@ -218,8 +180,6 @@ Pair ControlLayoutData::GetLineStartEnd( long nLine ) const return aPair; } - - Pair Control::GetLineStartEnd( long nLine ) const { if( !HasLayoutData() ) @@ -227,8 +187,6 @@ Pair Control::GetLineStartEnd( long nLine ) const return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->GetLineStartEnd( nLine ) : Pair( -1, -1 ); } - - long ControlLayoutData::ToRelativeLineIndex( long nIndex ) const { // is the index sensible at all ? @@ -261,8 +219,6 @@ long ControlLayoutData::ToRelativeLineIndex( long nIndex ) const return nIndex; } - - long Control::ToRelativeLineIndex( long nIndex ) const { if( !HasLayoutData() ) @@ -270,8 +226,6 @@ long Control::ToRelativeLineIndex( long nIndex ) const return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->ToRelativeLineIndex( nIndex ) : -1; } - - OUString Control::GetDisplayText() const { if( !HasLayoutData() ) @@ -279,8 +233,6 @@ OUString Control::GetDisplayText() const return mpControlData->mpLayoutData ? OUString(mpControlData->mpLayoutData->m_aDisplayText) : GetText(); } - - bool Control::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == EVENT_GETFOCUS ) @@ -313,8 +265,6 @@ bool Control::Notify( NotifyEvent& rNEvt ) return Window::Notify( rNEvt ); } - - void Control::StateChanged( StateChangedType nStateChange ) { if( nStateChange == STATE_CHANGE_INITSHOW || @@ -329,8 +279,6 @@ void Control::StateChanged( StateChangedType nStateChange ) Window::StateChanged( nStateChange ); } - - void Control::AppendLayoutData( const Control& rSubControl ) const { if( !rSubControl.HasLayoutData() ) @@ -355,8 +303,6 @@ void Control::AppendLayoutData( const Control& rSubControl ) const } } - - bool Control::ImplCallEventListenersAndHandler( sal_uLong nEvent, const Link& rHandler, void* pCaller ) { ImplDelData aCheckDelete; @@ -376,8 +322,6 @@ bool Control::ImplCallEventListenersAndHandler( sal_uLong nEvent, const Link& r return true; } - - void Control::SetLayoutDataParent( const Control* pParent ) const { if( HasLayoutData() ) @@ -385,14 +329,11 @@ void Control::SetLayoutDataParent( const Control* pParent ) const } - void Control::ImplClearLayoutData() const { delete mpControlData->mpLayoutData, mpControlData->mpLayoutData = NULL; } - - void Control::ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect ) { // use a deco view to draw the frame @@ -420,8 +361,6 @@ void Control::ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect ) pDev->OutputDevice::SetSettings( aOriginalSettings ); } - - void Control::DataChanged( const DataChangedEvent& rDCEvt) { // we don't want to loose some style settings for controls created with the @@ -447,24 +386,18 @@ void Control::DataChanged( const DataChangedEvent& rDCEvt) } } - - ControlLayoutData::~ControlLayoutData() { if( m_pParent ) m_pParent->ImplClearLayoutData(); } - - Size Control::GetOptimalSize() const { return Size( GetTextWidth( GetText() ) + 2 * 12, GetTextHeight() + 2 * 6 ); } - - void Control::SetReferenceDevice( OutputDevice* _referenceDevice ) { if ( mpControlData->mpReferenceDevice == _referenceDevice ) @@ -474,27 +407,21 @@ void Control::SetReferenceDevice( OutputDevice* _referenceDevice ) Invalidate(); } - - OutputDevice* Control::GetReferenceDevice() const { return mpControlData->mpReferenceDevice; } - - const Font& Control::GetCanonicalFont( const StyleSettings& _rStyle ) const { return _rStyle.GetLabelFont(); } - const Color& Control::GetCanonicalTextColor( const StyleSettings& _rStyle ) const { return _rStyle.GetLabelTextColor(); } - void Control::ImplInitSettings( const bool _bFont, const bool _bForeground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -519,8 +446,6 @@ void Control::ImplInitSettings( const bool _bFont, const bool _bForeground ) } } - - void Control::DrawControlText( OutputDevice& _rTargetDevice, Rectangle& _io_rRect, const OUString& _rStr, sal_uInt16 _nStyle, MetricVector* _pVector, OUString* _pDisplayText ) const { diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index a3af7ecf7f5e..0e89eca8e9bb 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -68,9 +68,6 @@ #include <officecfg/Office/Common.hxx> - - - using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -79,12 +76,8 @@ using namespace ::rtl; // - Redo // - Bei Tracking-Cancel DefaultSelection wieder herstellen - - static FncGetSpecialChars pImplFncGetSpecialChars = NULL; - - #define EDIT_ALIGN_LEFT 1 #define EDIT_ALIGN_CENTER 2 #define EDIT_ALIGN_RIGHT 3 @@ -96,8 +89,6 @@ static FncGetSpecialChars pImplFncGetSpecialChars = NULL; #define EDIT_DELMODE_RESTOFWORD 12 #define EDIT_DELMODE_RESTOFCONTENT 13 - - struct DDInfo { Cursor aCursor; @@ -120,7 +111,6 @@ struct DDInfo }; - struct Impl_IMEInfos { OUString aOldTextAfterStartPos; @@ -138,7 +128,6 @@ struct Impl_IMEInfos }; - Impl_IMEInfos::Impl_IMEInfos(sal_Int32 nP, const OUString& rOldTextAfterStartPos) : aOldTextAfterStartPos(rOldTextAfterStartPos) { @@ -149,15 +138,11 @@ Impl_IMEInfos::Impl_IMEInfos(sal_Int32 nP, const OUString& rOldTextAfterStartPos bWasCursorOverwrite = false; } - - Impl_IMEInfos::~Impl_IMEInfos() { delete[] pAttribs; } - - void Impl_IMEInfos::CopyAttribs(const sal_uInt16* pA, sal_Int32 nL) { nLen = nL; @@ -166,8 +151,6 @@ void Impl_IMEInfos::CopyAttribs(const sal_uInt16* pA, sal_Int32 nL) memcpy( pAttribs, pA, nL*sizeof(sal_uInt16) ); } - - void Impl_IMEInfos::DestroyAttribs() { delete[] pAttribs; @@ -175,16 +158,12 @@ void Impl_IMEInfos::DestroyAttribs() nLen = 0; } - - Edit::Edit( WindowType nType ) : Control( nType ) { ImplInitEditData(); } - - Edit::Edit( Window* pParent, WinBits nStyle ) : Control( WINDOW_EDIT ) { @@ -264,8 +243,6 @@ bool Edit::set_property(const OString &rKey, const OString &rValue) return true; } - - Edit::~Edit() { delete mpDDInfo; @@ -298,8 +275,6 @@ Edit::~Edit() } } - - void Edit::ImplInitEditData() { mpSubEdit = NULL; @@ -330,8 +305,6 @@ void Edit::ImplInitEditData() mxDnDListener = pDnDWrapper; } - - bool Edit::ImplUseNativeBorder( WinBits nStyle ) { bool bRet = @@ -385,8 +358,6 @@ void Edit::ImplInit( Window* pParent, WinBits nStyle ) } } - - WinBits Edit::ImplInitStyle( WinBits nStyle ) { if ( !(nStyle & WB_NOTABSTOP) ) @@ -397,8 +368,6 @@ WinBits Edit::ImplInitStyle( WinBits nStyle ) return nStyle; } - - bool Edit::IsCharInput( const KeyEvent& rKeyEvent ) { // In the future we must use new Unicode functions for this @@ -409,16 +378,12 @@ bool Edit::IsCharInput( const KeyEvent& rKeyEvent ) !rKeyEvent.GetKeyCode().IsMod1() ); } - - void Edit::ImplModified() { mbModified = true; Modify(); } - - void Edit::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -461,8 +426,6 @@ void Edit::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) } } - - long Edit::ImplGetExtraOffset() const { // MT 09/2002: nExtraOffsetX should become a member, instead of checking every time, @@ -475,9 +438,6 @@ long Edit::ImplGetExtraOffset() const return nExtraOffset; } - - - OUString Edit::ImplGetText() const { if ( mcEchoChar || (GetStyle() & WB_PASSWORD) ) @@ -495,8 +455,6 @@ OUString Edit::ImplGetText() const return maText.toString(); } - - void Edit::ImplInvalidateOrRepaint() { if( IsPaintTransparent() ) @@ -510,8 +468,6 @@ void Edit::ImplInvalidateOrRepaint() ImplRepaint(); } - - long Edit::ImplGetTextYPosition() const { if ( GetStyle() & WB_TOP ) @@ -521,8 +477,6 @@ long Edit::ImplGetTextYPosition() const return ( GetOutputSizePixel().Height() - GetTextHeight() ) / 2; } - - void Edit::ImplRepaint(bool bLayout) { if ( !IsReallyVisible() ) @@ -743,8 +697,6 @@ void Edit::ImplRepaint(bool bLayout) delete [] pDXBuffer; } - - void Edit::ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uInt8 nMode ) { OUString aText = ImplGetText(); @@ -813,8 +765,6 @@ void Edit::ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uI mbInternModified = true; } - - OUString Edit::ImplGetValidString( const OUString& rString ) const { OUString aValidString( rString ); @@ -824,7 +774,6 @@ OUString Edit::ImplGetValidString( const OUString& rString ) const return aValidString; } - uno::Reference < i18n::XBreakIterator > Edit::ImplGetBreakIterator() const { //!! since we don't want to become incompatible in the next minor update @@ -834,7 +783,6 @@ uno::Reference < i18n::XBreakIterator > Edit::ImplGetBreakIterator() const return i18n::BreakIterator::create(xContext); } - uno::Reference < i18n::XExtendedInputSequenceChecker > Edit::ImplGetInputSequenceChecker() { if ( !mxISC.is() ) @@ -845,8 +793,6 @@ uno::Reference < i18n::XExtendedInputSequenceChecker > Edit::ImplGetInputSequenc return mxISC; } - - void Edit::ShowTruncationWarning( Window* pParent ) { ResMgr* pResMgr = ImplGetResMgr(); @@ -857,8 +803,6 @@ void Edit::ShowTruncationWarning( Window* pParent ) } } - - bool Edit::ImplTruncateToMaxLen( OUString& rStr, sal_Int32 nSelectionLen ) const { bool bWasTruncated = false; @@ -871,8 +815,6 @@ bool Edit::ImplTruncateToMaxLen( OUString& rStr, sal_Int32 nSelectionLen ) const return bWasTruncated; } - - void Edit::ImplInsertText( const OUString& rStr, const Selection* pNewSel, bool bIsUserInput ) { Selection aSelection( maSelection ); @@ -974,8 +916,6 @@ void Edit::ImplInsertText( const OUString& rStr, const Selection* pNewSel, bool mbInternModified = true; } - - void Edit::ImplSetText( const OUString& rText, const Selection* pNewSelection ) { // we delete text by "selecting" the old text completely then calling InsertText; this is flicker free @@ -1009,8 +949,6 @@ void Edit::ImplSetText( const OUString& rText, const Selection* pNewSelection ) } } - - int Edit::ImplGetNativeControlType() const { int nCtrl = 0; @@ -1140,8 +1078,6 @@ void Edit::ImplPaintBorder( long nXStart, long nXEnd ) } } - - void Edit::ImplShowCursor( bool bOnlyIfVisible ) { if ( !IsUpdateMode() || ( bOnlyIfVisible && !IsReallyVisible() ) ) @@ -1222,8 +1158,6 @@ void Edit::ImplShowCursor( bool bOnlyIfVisible ) delete [] pDXBuffer; } - - void Edit::ImplAlign() { long nTextWidth = GetTextWidth( ImplGetText() ); @@ -1261,9 +1195,6 @@ void Edit::ImplAlign() } } - - - void Edit::ImplAlignAndPaint() { ImplAlign(); @@ -1271,8 +1202,6 @@ void Edit::ImplAlignAndPaint() ImplShowCursor(); } - - sal_Int32 Edit::ImplGetCharPos( const Point& rWindowPos ) const { sal_Int32 nIndex = EDIT_NOLIMIT; @@ -1332,8 +1261,6 @@ sal_Int32 Edit::ImplGetCharPos( const Point& rWindowPos ) const return nIndex; } - - void Edit::ImplSetCursorPos( sal_Int32 nChar, bool bSelect ) { Selection aSelection( maSelection ); @@ -1343,8 +1270,6 @@ void Edit::ImplSetCursorPos( sal_Int32 nChar, bool bSelect ) ImplSetSelection( aSelection ); } - - void Edit::ImplLoadRes( const ResId& rResId ) { Control::ImplLoadRes( rResId ); @@ -1354,8 +1279,6 @@ void Edit::ImplLoadRes( const ResId& rResId ) SetMaxTextLen( nTextLength ); } - - void Edit::ImplCopyToSelectionClipboard() { if ( GetSelection().Len() ) @@ -1370,8 +1293,6 @@ void Edit::ImplCopy( uno::Reference< datatransfer::clipboard::XClipboard >& rxCl ::vcl::unohelper::TextDataObject::CopyStringTo( GetSelected(), rxClipboard ); } - - void Edit::ImplPaste( uno::Reference< datatransfer::clipboard::XClipboard >& rxClipboard ) { if ( rxClipboard.is() ) @@ -1410,8 +1331,6 @@ void Edit::ImplPaste( uno::Reference< datatransfer::clipboard::XClipboard >& rxC } } - - void Edit::MouseButtonDown( const MouseEvent& rMEvt ) { if ( mpSubEdit ) @@ -1455,8 +1374,6 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt ) mbInMBDown = false; } - - void Edit::MouseButtonUp( const MouseEvent& rMEvt ) { if ( mbClickedInSelection && rMEvt.IsLeft() ) @@ -1474,8 +1391,6 @@ void Edit::MouseButtonUp( const MouseEvent& rMEvt ) } } - - void Edit::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) @@ -1504,8 +1419,6 @@ void Edit::Tracking( const TrackingEvent& rTEvt ) mpUpdateDataTimer->Start();//do not update while the user is still travelling in the control } - - bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) { bool bDone = false; @@ -1837,8 +1750,6 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) return bDone; } - - void Edit::KeyInput( const KeyEvent& rKEvt ) { if ( mpUpdateDataTimer && !mbIsSubEdit && mpUpdateDataTimer->IsActive() ) @@ -1848,24 +1759,18 @@ void Edit::KeyInput( const KeyEvent& rKEvt ) Control::KeyInput( rKEvt ); } - - void Edit::FillLayoutData() const { mpControlData->mpLayoutData = new vcl::ControlLayoutData(); const_cast<Edit*>(this)->ImplRepaint(true); } - - void Edit::Paint( const Rectangle& ) { if ( !mpSubEdit ) ImplRepaint(); } - - void Edit::Resize() { if ( !mpSubEdit && IsReallyVisible() ) @@ -1879,8 +1784,6 @@ void Edit::Resize() } } - - void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) { ImplInitSettings( true, true, true ); @@ -1968,8 +1871,6 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_u } } - - void Edit::ImplInvalidateOutermostBorder( Window* pWin ) { // allow control to show focused state @@ -2036,8 +1937,6 @@ void Edit::GetFocus() Control::GetFocus(); } - - Window* Edit::GetPreferredKeyInputWindow() { if ( mpSubEdit ) @@ -2046,8 +1945,6 @@ Window* Edit::GetPreferredKeyInputWindow() return this; } - - void Edit::LoseFocus() { if ( mpUpdateDataTimer && !mbIsSubEdit && mpUpdateDataTimer->IsActive() ) @@ -2075,8 +1972,6 @@ void Edit::LoseFocus() Control::LoseFocus(); } - - void Edit::Command( const CommandEvent& rCEvt ) { if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ) @@ -2314,8 +2209,6 @@ void Edit::Command( const CommandEvent& rCEvt ) Control::Command( rCEvt ); } - - void Edit::StateChanged( StateChangedType nType ) { if ( nType == STATE_CHANGE_INITSHOW ) @@ -2415,8 +2308,6 @@ void Edit::StateChanged( StateChangedType nType ) Control::StateChanged( nType ); } - - void Edit::DataChanged( const DataChangedEvent& rDCEvt ) { if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || @@ -2435,8 +2326,6 @@ void Edit::DataChanged( const DataChangedEvent& rDCEvt ) Control::DataChanged( rDCEvt ); } - - void Edit::ImplShowDDCursor() { if ( !mpDDInfo->bVisCursor ) @@ -2452,8 +2341,6 @@ void Edit::ImplShowDDCursor() } } - - void Edit::ImplHideDDCursor() { if ( mpDDInfo && mpDDInfo->bVisCursor ) @@ -2463,8 +2350,6 @@ void Edit::ImplHideDDCursor() } } - - void Edit::Modify() { if ( mbIsSubEdit ) @@ -2493,23 +2378,17 @@ void Edit::Modify() } } - - void Edit::UpdateData() { maUpdateDataHdl.Call( this ); } - - IMPL_LINK_NOARG(Edit, ImplUpdateDataHdl) { UpdateData(); return 0; } - - void Edit::EnableUpdateData( sal_uLong nTimeout ) { if ( !nTimeout ) @@ -2526,8 +2405,6 @@ void Edit::EnableUpdateData( sal_uLong nTimeout ) } } - - void Edit::SetEchoChar( sal_Unicode c ) { mcEchoChar = c; @@ -2535,8 +2412,6 @@ void Edit::SetEchoChar( sal_Unicode c ) mpSubEdit->SetEchoChar( c ); } - - void Edit::SetReadOnly( sal_Bool bReadOnly ) { if ( mbReadOnly != bool(bReadOnly) ) @@ -2549,8 +2424,6 @@ void Edit::SetReadOnly( sal_Bool bReadOnly ) } } - - void Edit::SetAutocompleteHdl( const Link& rHdl ) { maAutocompleteHdl = rHdl; @@ -2558,8 +2431,6 @@ void Edit::SetAutocompleteHdl( const Link& rHdl ) mpSubEdit->SetAutocompleteHdl( rHdl ); } - - void Edit::SetInsertMode( bool bInsert ) { if ( bInsert != mbInsertMode ) @@ -2572,8 +2443,6 @@ void Edit::SetInsertMode( bool bInsert ) } } - - bool Edit::IsInsertMode() const { if ( mpSubEdit ) @@ -2582,8 +2451,6 @@ bool Edit::IsInsertMode() const return mbInsertMode; } - - void Edit::SetMaxTextLen(sal_Int32 nMaxLen) { mnMaxTextLen = nMaxLen ? nMaxLen : EDIT_NOLIMIT; @@ -2597,8 +2464,6 @@ void Edit::SetMaxTextLen(sal_Int32 nMaxLen) } } - - void Edit::SetSelection( const Selection& rSelection ) { // If the selection was changed from outside, e.g. by MouseButtonDown, don't call Tracking() @@ -2611,8 +2476,6 @@ void Edit::SetSelection( const Selection& rSelection ) ImplSetSelection( rSelection ); } - - void Edit::ImplSetSelection( const Selection& rSelection, bool bPaint ) { if ( mpSubEdit ) @@ -2675,8 +2538,6 @@ void Edit::ImplSetSelection( const Selection& rSelection, bool bPaint ) } } - - const Selection& Edit::GetSelection() const { if ( mpSubEdit ) @@ -2685,8 +2546,6 @@ const Selection& Edit::GetSelection() const return maSelection; } - - void Edit::ReplaceSelected( const OUString& rStr ) { if ( mpSubEdit ) @@ -2695,8 +2554,6 @@ void Edit::ReplaceSelected( const OUString& rStr ) ImplInsertText( rStr ); } - - void Edit::DeleteSelected() { if ( mpSubEdit ) @@ -2708,8 +2565,6 @@ void Edit::DeleteSelected() } } - - OUString Edit::GetSelected() const { if ( mpSubEdit ) @@ -2722,8 +2577,6 @@ OUString Edit::GetSelected() const } } - - void Edit::Cut() { if ( !(GetStyle() & WB_PASSWORD ) ) @@ -2733,8 +2586,6 @@ void Edit::Cut() } } - - void Edit::Copy() { if ( !(GetStyle() & WB_PASSWORD ) ) @@ -2744,16 +2595,12 @@ void Edit::Copy() } } - - void Edit::Paste() { ::com::sun::star::uno::Reference<com::sun::star::datatransfer::clipboard::XClipboard> aClipboard(GetClipboard()); ImplPaste( aClipboard ); } - - void Edit::Undo() { if ( mpSubEdit ) @@ -2768,8 +2615,6 @@ void Edit::Undo() } } - - void Edit::SetText( const OUString& rStr ) { if ( mpSubEdit ) @@ -2781,8 +2626,6 @@ void Edit::SetText( const OUString& rStr ) } } - - void Edit::SetText( const OUString& rStr, const Selection& rSelection ) { if ( mpSubEdit ) @@ -2791,8 +2634,6 @@ void Edit::SetText( const OUString& rStr, const Selection& rSelection ) ImplSetText( rStr, &rSelection ); } - - OUString Edit::GetText() const { if ( mpSubEdit ) @@ -2801,8 +2642,6 @@ OUString Edit::GetText() const return maText.toString(); } - - void Edit::SetPlaceholderText( const OUString& rStr ) { if ( mpSubEdit ) @@ -2815,8 +2654,6 @@ void Edit::SetPlaceholderText( const OUString& rStr ) } } - - OUString Edit::GetPlaceholderText() const { if ( mpSubEdit ) @@ -2825,8 +2662,6 @@ OUString Edit::GetPlaceholderText() const return maPlaceholderText; } - - void Edit::SetModifyFlag() { if ( mpSubEdit ) @@ -2835,8 +2670,6 @@ void Edit::SetModifyFlag() mbModified = true; } - - void Edit::ClearModifyFlag() { if ( mpSubEdit ) @@ -2845,8 +2678,6 @@ void Edit::ClearModifyFlag() mbModified = false; } - - void Edit::SetSubEdit( Edit* pEdit ) { mpSubEdit = pEdit; @@ -2927,15 +2758,11 @@ Size Edit::GetMinimumEditSize() return aSize; } - - Size Edit::GetOptimalSize() const { return CalcMinimumSize(); } - - Size Edit::CalcSize(sal_Int32 nChars) const { // width for N characters, independent from content. @@ -2947,8 +2774,6 @@ Size Edit::CalcSize(sal_Int32 nChars) const return aSz; } - - sal_Int32 Edit::GetMaxVisChars() const { const Window* pW = mpSubEdit ? mpSubEdit : this; @@ -2957,29 +2782,21 @@ sal_Int32 Edit::GetMaxVisChars() const return nCharWidth ? nOutWidth/nCharWidth : 0; } - - sal_Int32 Edit::GetCharPos( const Point& rWindowPos ) const { return ImplGetCharPos( rWindowPos ); } - - void Edit::SetGetSpecialCharsFunction( FncGetSpecialChars fn ) { pImplFncGetSpecialChars = fn; } - - FncGetSpecialChars Edit::GetGetSpecialCharsFunction() { return pImplFncGetSpecialChars; } - - PopupMenu* Edit::CreatePopupMenu() { ResMgr* pResMgr = ImplGetResMgr(); @@ -3005,8 +2822,6 @@ PopupMenu* Edit::CreatePopupMenu() return pPopup; } - - void Edit::DeletePopupMenu( PopupMenu* pMenu ) { delete pMenu; diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx index 78ad694d2c10..36d055bf847e 100644 --- a/vcl/source/control/fixedhyper.cxx +++ b/vcl/source/control/fixedhyper.cxx @@ -19,8 +19,6 @@ #include <vcl/fixedhyper.hxx> -// class FixedHyperlink -------------------------------------------------- - FixedHyperlink::FixedHyperlink(Window* pParent, const ResId& rResId) : FixedText(pParent, rResId) , m_nTextLen(0) diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx index 2dcbe33cd2e2..d9fdb2d75c67 100644 --- a/vcl/source/control/group.cxx +++ b/vcl/source/control/group.cxx @@ -26,15 +26,11 @@ #include <controldata.hxx> - - #define GROUP_BORDER 12 #define GROUP_TEXT_BORDER 2 #define GROUP_VIEW_STYLE (WB_3DLOOK | WB_NOLABEL) - - void GroupBox::ImplInit( Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle( nStyle ); @@ -43,8 +39,6 @@ void GroupBox::ImplInit( Window* pParent, WinBits nStyle ) ImplInitSettings( true, true, true ); } - - WinBits GroupBox::ImplInitStyle( WinBits nStyle ) { if ( !(nStyle & WB_NOGROUP) ) @@ -52,21 +46,16 @@ WinBits GroupBox::ImplInitStyle( WinBits nStyle ) return nStyle; } - - const Font& GroupBox::GetCanonicalFont( const StyleSettings& _rStyle ) const { return _rStyle.GetGroupFont(); } - const Color& GroupBox::GetCanonicalTextColor( const StyleSettings& _rStyle ) const { return _rStyle.GetGroupTextColor(); } - - void GroupBox::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { @@ -98,16 +87,12 @@ void GroupBox::ImplInitSettings( bool bFont, } } - - GroupBox::GroupBox( Window* pParent, WinBits nStyle ) : Control( WINDOW_GROUPBOX ) { ImplInit( pParent, nStyle ); } - - GroupBox::GroupBox( Window* pParent, const ResId& rResId ) : Control( WINDOW_GROUPBOX ) { @@ -120,8 +105,6 @@ GroupBox::GroupBox( Window* pParent, const ResId& rResId ) : Show(); } - - void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize, bool bLayout ) { @@ -212,23 +195,17 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, DrawControlText( *pDev, aRect, aText, nTextStyle, pVector, pDisplayText ); } - - void GroupBox::FillLayoutData() const { mpControlData->mpLayoutData = new vcl::ControlLayoutData(); const_cast<GroupBox*>(this)-> ImplDraw( const_cast<GroupBox*>(this), 0, Point(), GetOutputSizePixel(), true ); } - - void GroupBox::Paint( const Rectangle& ) { ImplDraw( this, 0, Point(), GetOutputSizePixel() ); } - - void GroupBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) { @@ -249,16 +226,12 @@ void GroupBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->Pop(); } - - void GroupBox::Resize() { Control::Resize(); Invalidate(); } - - void GroupBox::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); @@ -295,8 +268,6 @@ void GroupBox::StateChanged( StateChangedType nType ) } } - - void GroupBox::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index db96da42b1be..6ece054b39df 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -478,6 +478,7 @@ sal_uInt16 ImplEntryList::FindFirstSelectable( sal_uInt16 nPos, bool bForward /* return LISTBOX_ENTRY_NOTFOUND; } + ImplListBoxWindow::ImplListBoxWindow( Window* pParent, WinBits nWinStyle ) : Control( pParent, 0 ), maQuickSelectionEngine( *this ) diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index c7fe6133825a..f77ffe074f2d 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -21,7 +21,6 @@ #include "tools/rc.h" #include "tools/debug.hxx" - #include "vcl/decoview.hxx" #include "vcl/dialog.hxx" #include "vcl/event.hxx" @@ -183,7 +182,6 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle ) SetCompoundControl( true ); } - WinBits ListBox::ImplInitStyle( WinBits nStyle ) { if ( !(nStyle & WB_NOTABSTOP) ) @@ -193,7 +191,6 @@ WinBits ListBox::ImplInitStyle( WinBits nStyle ) return nStyle; } - void ListBox::ImplLoadRes( const ResId& rResId ) { Control::ImplLoadRes( rResId ); @@ -214,7 +211,6 @@ void ListBox::ImplLoadRes( const ResId& rResId ) SelectEntryPos( nSelPos ); } - IMPL_LINK_NOARG(ListBox, ImplSelectHdl) { bool bPopup = IsInDropDown(); @@ -330,7 +326,6 @@ IMPL_LINK_NOARG(ListBox, ImplClickBtnHdl) return 0; } - IMPL_LINK_NOARG(ListBox, ImplPopupModeEndHdl) { if( mpFloatWin->IsPopupModeCanceled() ) @@ -364,7 +359,6 @@ IMPL_LINK_NOARG(ListBox, ImplPopupModeEndHdl) return 0; } - void ListBox::ToggleDropDown() { if( IsDropDownBox() ) @@ -382,7 +376,6 @@ void ListBox::ToggleDropDown() } } - void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) { mpImplLB->GetMainWindow()->ImplInitSettings( true, true, true ); @@ -506,7 +499,6 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sa pDev->Pop(); } - void ListBox::GetFocus() { if ( mpImplLB ) @@ -520,7 +512,6 @@ void ListBox::GetFocus() Control::GetFocus(); } - Window* ListBox::GetPreferredKeyInputWindow() { if ( mpImplLB ) @@ -534,7 +525,6 @@ Window* ListBox::GetPreferredKeyInputWindow() return Control::GetPreferredKeyInputWindow(); } - void ListBox::LoseFocus() { if( IsDropDownBox() ) @@ -545,7 +535,6 @@ void ListBox::LoseFocus() Control::LoseFocus(); } - void ListBox::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); @@ -575,7 +564,6 @@ void ListBox::DataChanged( const DataChangedEvent& rDCEvt ) } } - void ListBox::EnableAutoSize( bool bAuto ) { mbDDAutoSize = bAuto; @@ -593,14 +581,12 @@ void ListBox::EnableAutoSize( bool bAuto ) } } - void ListBox::EnableDDAutoWidth( bool b ) { if ( mpFloatWin ) mpFloatWin->SetAutoWidth( b ); } - void ListBox::SetDropDownLineCount( sal_uInt16 nLines ) { mnLineCount = nLines; @@ -608,15 +594,12 @@ void ListBox::SetDropDownLineCount( sal_uInt16 nLines ) mpFloatWin->SetDropDownLineCount( mnLineCount ); } - void ListBox::AdaptDropDownLineCountToMaximum() { // adapt to maximum allowed number SetDropDownLineCount(GetSettings().GetStyleSettings().GetListBoxMaximumLineCount()); } - - sal_uInt16 ListBox::GetDropDownLineCount() const { if ( mpFloatWin ) @@ -624,7 +607,6 @@ sal_uInt16 ListBox::GetDropDownLineCount() const return mnLineCount; } - void ListBox::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) { if( IsDropDownBox() && ( nFlags & WINDOW_POSSIZE_SIZE ) ) @@ -643,7 +625,6 @@ void ListBox::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_ Control::setPosSizePixel( nX, nY, nWidth, nHeight, nFlags ); } - void ListBox::Resize() { Size aOutSz = GetOutputSizePixel(); @@ -796,7 +777,6 @@ long ListBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const return nIndex; } - void ListBox::StateChanged( StateChangedType nType ) { if( nType == STATE_CHANGE_READONLY ) @@ -903,7 +883,6 @@ void ListBox::StateChanged( StateChangedType nType ) Control::StateChanged( nType ); } - bool ListBox::PreNotify( NotifyEvent& rNEvt ) { bool nDone = false; @@ -989,19 +968,16 @@ bool ListBox::PreNotify( NotifyEvent& rNEvt ) return nDone || Control::PreNotify( rNEvt ); } - void ListBox::Select() { ImplCallEventListenersAndHandler( VCLEVENT_LISTBOX_SELECT, maSelectHdl, this ); } - void ListBox::DoubleClick() { ImplCallEventListenersAndHandler( VCLEVENT_LISTBOX_DOUBLECLICK, maDoubleClickHdl, this ); } - void ListBox::Clear() { mpImplLB->Clear(); @@ -1016,7 +992,6 @@ void ListBox::Clear() CallEventListeners( VCLEVENT_LISTBOX_ITEMREMOVED, (void*) sal_IntPtr(-1) ); } - void ListBox::SetNoSelection() { mpImplLB->SetNoSelection(); @@ -1031,7 +1006,6 @@ void ListBox::SetNoSelection() ImplCallEventListeners(VCLEVENT_LISTBOX_STATEUPDATE); } - sal_uInt16 ListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos ) { sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr ); @@ -1040,7 +1014,6 @@ sal_uInt16 ListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos ) return nRealPos; } - sal_uInt16 ListBox::InsertEntry( const OUString& rStr, const Image& rImage, sal_uInt16 nPos ) { sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage ); @@ -1049,20 +1022,17 @@ sal_uInt16 ListBox::InsertEntry( const OUString& rStr, const Image& rImage, sal_ return nRealPos; } - void ListBox::RemoveEntry( const OUString& rStr ) { RemoveEntry( GetEntryPos( rStr ) ); } - void ListBox::RemoveEntry( sal_uInt16 nPos ) { mpImplLB->RemoveEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() ); CallEventListeners( VCLEVENT_LISTBOX_ITEMREMOVED, (void*) sal_IntPtr(nPos) ); } - Image ListBox::GetEntryImage( sal_uInt16 nPos ) const { if ( mpImplLB->GetEntryList()->HasEntryImage( nPos ) ) @@ -1070,7 +1040,6 @@ Image ListBox::GetEntryImage( sal_uInt16 nPos ) const return Image(); } - sal_uInt16 ListBox::GetEntryPos( const OUString& rStr ) const { sal_uInt16 nPos = mpImplLB->GetEntryList()->FindEntry( rStr ); @@ -1079,7 +1048,6 @@ sal_uInt16 ListBox::GetEntryPos( const OUString& rStr ) const return nPos; } - sal_uInt16 ListBox::GetEntryPos( const void* pData ) const { sal_uInt16 nPos = mpImplLB->GetEntryList()->FindEntry( pData ); @@ -1088,31 +1056,26 @@ sal_uInt16 ListBox::GetEntryPos( const void* pData ) const return nPos; } - OUString ListBox::GetEntry( sal_uInt16 nPos ) const { return mpImplLB->GetEntryList()->GetEntryText( nPos + mpImplLB->GetEntryList()->GetMRUCount() ); } - sal_uInt16 ListBox::GetEntryCount() const { return mpImplLB->GetEntryList()->GetEntryCount() - mpImplLB->GetEntryList()->GetMRUCount(); } - OUString ListBox::GetSelectEntry(sal_uInt16 nIndex) const { return GetEntry( GetSelectEntryPos( nIndex ) ); } - sal_uInt16 ListBox::GetSelectEntryCount() const { return mpImplLB->GetEntryList()->GetSelectEntryCount(); } - sal_uInt16 ListBox::GetSelectEntryPos( sal_uInt16 nIndex ) const { sal_uInt16 nPos = mpImplLB->GetEntryList()->GetSelectEntryPos( nIndex ); @@ -1125,25 +1088,21 @@ sal_uInt16 ListBox::GetSelectEntryPos( sal_uInt16 nIndex ) const return nPos; } - bool ListBox::IsEntrySelected(const OUString& rStr) const { return IsEntryPosSelected( GetEntryPos( rStr ) ); } - bool ListBox::IsEntryPosSelected( sal_uInt16 nPos ) const { return mpImplLB->GetEntryList()->IsEntryPosSelected( nPos + mpImplLB->GetEntryList()->GetMRUCount() ); } - void ListBox::SelectEntry( const OUString& rStr, bool bSelect ) { SelectEntryPos( GetEntryPos( rStr ), bSelect ); } - void ListBox::SelectEntryPos( sal_uInt16 nPos, bool bSelect ) { if ( nPos < mpImplLB->GetEntryList()->GetEntryCount() ) @@ -1163,37 +1122,31 @@ void ListBox::SelectEntryPos( sal_uInt16 nPos, bool bSelect ) } } - void ListBox::SetEntryData( sal_uInt16 nPos, void* pNewData ) { mpImplLB->SetEntryData( nPos + mpImplLB->GetEntryList()->GetMRUCount(), pNewData ); } - void* ListBox::GetEntryData( sal_uInt16 nPos ) const { return mpImplLB->GetEntryList()->GetEntryData( nPos + mpImplLB->GetEntryList()->GetMRUCount() ); } - void ListBox::SetEntryFlags( sal_uInt16 nPos, long nFlags ) { mpImplLB->SetEntryFlags( nPos + mpImplLB->GetEntryList()->GetMRUCount(), nFlags ); } - long ListBox::GetEntryFlags( sal_uInt16 nPos ) const { return mpImplLB->GetEntryList()->GetEntryFlags( nPos + mpImplLB->GetEntryList()->GetMRUCount() ); } - void ListBox::SetTopEntry( sal_uInt16 nPos ) { mpImplLB->SetTopEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() ); } - sal_uInt16 ListBox::GetTopEntry() const { sal_uInt16 nPos = GetEntryCount() ? mpImplLB->GetTopEntry() : LISTBOX_ENTRY_NOTFOUND; @@ -1202,19 +1155,16 @@ sal_uInt16 ListBox::GetTopEntry() const return nPos; } - bool ListBox::IsTravelSelect() const { return mpImplLB->IsTravelSelect(); } - bool ListBox::IsInDropDown() const { return mpFloatWin && mpFloatWin->IsInPopupMode(); } - Rectangle ListBox::GetBoundingRectangle( sal_uInt16 nItem ) const { Rectangle aRect = mpImplLB->GetMainWindow()->GetBoundingRectangle( nItem ); @@ -1223,7 +1173,6 @@ Rectangle ListBox::GetBoundingRectangle( sal_uInt16 nItem ) const return aRect; } - void ListBox::EnableMultiSelection( bool bMulti ) { EnableMultiSelection( bMulti, false ); @@ -1244,13 +1193,11 @@ void ListBox::EnableMultiSelection( bool bMulti, bool bStackSelection ) mpImplLB->GetMainWindow()->AllowGrabFocus( bMulti ); } - bool ListBox::IsMultiSelectionEnabled() const { return mpImplLB->IsMultiSelectionEnabled(); } - Size ListBox::CalcMinimumSize() const { Size aSz; @@ -1337,13 +1284,11 @@ Size ListBox::CalcSubEditSize() const return aSz; } - Size ListBox::GetOptimalSize() const { return CalcMinimumSize(); } - Size ListBox::CalcAdjustedSize( const Size& rPrefSize ) const { Size aSz = rPrefSize; @@ -1368,7 +1313,6 @@ Size ListBox::CalcAdjustedSize( const Size& rPrefSize ) const return aSz; } - Size ListBox::CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const { // ScrollBars are shown if needed @@ -1409,7 +1353,6 @@ Size ListBox::CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const return aSz; } - void ListBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const { long nCharWidth = GetTextWidth( OUString(static_cast<sal_Unicode>('x')) ); @@ -1427,19 +1370,16 @@ void ListBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines } } - IMPL_LINK( ListBox, ImplUserDrawHdl, UserDrawEvent*, pEvent ) { UserDraw( *pEvent ); return 1; } - void ListBox::UserDraw( const UserDrawEvent& ) { } - void ListBox::DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos ) { if ( rEvt.GetDevice() == mpImplLB->GetMainWindow() ) @@ -1448,7 +1388,6 @@ void ListBox::DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawT mpImplWin->DrawEntry( bDrawImage, bDrawText, bDrawTextAtImagePos ); } - void ListBox::SetUserItemSize( const Size& rSz ) { mpImplLB->GetMainWindow()->SetUserItemSize( rSz ); @@ -1456,7 +1395,6 @@ void ListBox::SetUserItemSize( const Size& rSz ) mpImplWin->SetUserItemSize( rSz ); } - void ListBox::EnableUserDraw( bool bUserDraw ) { mpImplLB->GetMainWindow()->EnableUserDraw( bUserDraw ); @@ -1464,7 +1402,6 @@ void ListBox::EnableUserDraw( bool bUserDraw ) mpImplWin->EnableUserDraw( bUserDraw ); } - void ListBox::SetReadOnly( bool bReadOnly ) { if ( mpImplLB->IsReadOnly() != bReadOnly ) @@ -1474,25 +1411,21 @@ void ListBox::SetReadOnly( bool bReadOnly ) } } - bool ListBox::IsReadOnly() const { return mpImplLB->IsReadOnly(); } - void ListBox::SetSeparatorPos( sal_uInt16 n ) { mpImplLB->SetSeparatorPos( n ); } - sal_uInt16 ListBox::GetSeparatorPos() const { return mpImplLB->GetSeparatorPos(); } - sal_uInt16 ListBox::GetDisplayLineCount() const { return mpImplLB->GetDisplayLineCount(); @@ -1503,7 +1436,6 @@ void ListBox::EnableMirroring() mpImplLB->EnableMirroring(); } - Rectangle ListBox::GetDropDownPosSizePixel() const { return mpFloatWin ? mpFloatWin->GetWindowExtentsRelative( const_cast<ListBox*>(this) ) : Rectangle(); @@ -1536,8 +1468,6 @@ bool ListBox::set_property(const OString &rKey, const OString &rValue) return true; } - - void ListBox::SetEdgeBlending(bool bNew) { if(mbEdgeBlending != bNew) diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 386c57e0b030..d270b241178c 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -29,8 +29,6 @@ #include "rtl/string.hxx" #include "tools/rc.h" - - /* #i77549# HACK: for scrollbars in case of thumb rect, page up and page down rect we abuse the HitTestNativeControl interface. All theming engines but OS X @@ -50,8 +48,6 @@ #include "thumbpos.hxx" - - #define SCRBAR_DRAW_BTN1 ((sal_uInt16)0x0001) #define SCRBAR_DRAW_BTN2 ((sal_uInt16)0x0002) #define SCRBAR_DRAW_PAGE1 ((sal_uInt16)0x0004) @@ -114,7 +110,6 @@ void ScrollBar::ImplInit( Window* pParent, WinBits nStyle ) SetBackground(); } - void ScrollBar::ImplInitStyle( WinBits nStyle ) { if ( nStyle & WB_DRAG ) @@ -123,14 +118,12 @@ void ScrollBar::ImplInitStyle( WinBits nStyle ) mbFullDrag = (GetSettings().GetStyleSettings().GetDragFullOptions() & DRAGFULL_OPTION_SCROLL) != 0; } - ScrollBar::ScrollBar( Window* pParent, WinBits nStyle ) : Control( WINDOW_SCROLLBAR ) { ImplInit( pParent, nStyle ); } - ScrollBar::ScrollBar( Window* pParent, const ResId& rResId ) : Control( WINDOW_SCROLLBAR ) { @@ -143,13 +136,11 @@ ScrollBar::ScrollBar( Window* pParent, const ResId& rResId ) : Show(); } - ScrollBar::~ScrollBar() { delete mpData; } - void ScrollBar::ImplLoadRes( const ResId& rResId ) { Control::ImplLoadRes( rResId ); @@ -168,7 +159,6 @@ void ScrollBar::ImplLoadRes( const ResId& rResId ) SetThumbPos( nThumbPos ); } - void ScrollBar::ImplUpdateRects( bool bUpdate ) { sal_uInt16 nOldStateFlags = mnStateFlags; @@ -270,7 +260,6 @@ void ScrollBar::ImplUpdateRects( bool bUpdate ) } } - long ScrollBar::ImplCalcThumbPos( long nPixPos ) { // Calculate position @@ -281,7 +270,6 @@ long ScrollBar::ImplCalcThumbPos( long nPixPos ) return nCalcThumbPos; } - long ScrollBar::ImplCalcThumbPosPix( long nPos ) { long nCalcThumbPos; @@ -301,7 +289,6 @@ long ScrollBar::ImplCalcThumbPosPix( long nPos ) return nCalcThumbPos; } - void ScrollBar::ImplCalc( bool bUpdate ) { const Size aSize = GetOutputSizePixel(); @@ -492,7 +479,6 @@ void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& /* rSiz mbCalcSize = true; } - bool ScrollBar::ImplDrawNative( sal_uInt16 nDrawFlags ) { ScrollbarValue scrValue; @@ -769,7 +755,6 @@ void ScrollBar::ImplDraw( sal_uInt16 nDrawFlags, OutputDevice* pOutDev ) } } - long ScrollBar::ImplScroll( long nNewPos, bool bCallEndScroll ) { long nOldPos = mnThumbPos; @@ -786,7 +771,6 @@ long ScrollBar::ImplScroll( long nNewPos, bool bCallEndScroll ) return nDelta; } - long ScrollBar::ImplDoAction( bool bCallEndScroll ) { long nDelta = 0; @@ -815,7 +799,6 @@ long ScrollBar::ImplDoAction( bool bCallEndScroll ) return nDelta; } - void ScrollBar::ImplDoMouseAction( const Point& rMousePos, bool bCallAction ) { sal_uInt16 nOldStateFlags = mnStateFlags; @@ -1046,7 +1029,6 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt ) } } - void ScrollBar::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) @@ -1346,19 +1328,16 @@ bool ScrollBar::PreNotify( NotifyEvent& rNEvt ) return Control::PreNotify(rNEvt); } - void ScrollBar::Scroll() { ImplCallEventListenersAndHandler( VCLEVENT_SCROLLBAR_SCROLL, maScrollHdl, this ); } - void ScrollBar::EndScroll() { ImplCallEventListenersAndHandler( VCLEVENT_SCROLLBAR_ENDSCROLL, maEndScrollHdl, this ); } - long ScrollBar::DoScroll( long nNewPos ) { if ( meScrollType != SCROLL_DONTKNOW ) @@ -1371,7 +1350,6 @@ long ScrollBar::DoScroll( long nNewPos ) return nDelta; } - long ScrollBar::DoScrollAction( ScrollType eScrollType ) { if ( (meScrollType != SCROLL_DONTKNOW) || diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx index 5c2a7ab96165..a52ede4551ce 100644 --- a/vcl/source/control/slider.cxx +++ b/vcl/source/control/slider.cxx @@ -78,16 +78,12 @@ void Slider::ImplInit( Window* pParent, WinBits nStyle ) SetSizePixel( CalcWindowSizePixel() ); } - - Slider::Slider( Window* pParent, WinBits nStyle ) : Control( WINDOW_SLIDER ) { ImplInit( pParent, nStyle ); } - - void Slider::ImplInitSettings() { Window* pParent = GetParent(); @@ -111,8 +107,6 @@ void Slider::ImplInitSettings() } } - - void Slider::ImplUpdateRects( bool bUpdate ) { Rectangle aOldThumbRect = maThumbRect; @@ -220,8 +214,6 @@ void Slider::ImplUpdateRects( bool bUpdate ) } } - - long Slider::ImplCalcThumbPos( long nPixPos ) { // calculate position @@ -231,8 +223,6 @@ long Slider::ImplCalcThumbPos( long nPixPos ) return nCalcThumbPos; } - - long Slider::ImplCalcThumbPosPix( long nPos ) { // calculate position @@ -248,8 +238,6 @@ long Slider::ImplCalcThumbPosPix( long nPos ) return nCalcThumbPos+mnThumbPixOffset; } - - void Slider::ImplCalc( bool bUpdate ) { bool bInvalidateAll = false; @@ -319,8 +307,6 @@ void Slider::ImplCalc( bool bUpdate ) ImplUpdateRects( bUpdate ); } - - void Slider::ImplDraw( sal_uInt16 nDrawFlags ) { DecorationView aDecoView( this ); @@ -459,8 +445,6 @@ void Slider::ImplDraw( sal_uInt16 nDrawFlags ) } } - - bool Slider::ImplIsPageUp( const Point& rPos ) { Size aSize = GetOutputSizePixel(); @@ -478,8 +462,6 @@ bool Slider::ImplIsPageUp( const Point& rPos ) return aRect.IsInside( rPos ); } - - bool Slider::ImplIsPageDown( const Point& rPos ) { Size aSize = GetOutputSizePixel(); @@ -497,8 +479,6 @@ bool Slider::ImplIsPageDown( const Point& rPos ) return aRect.IsInside( rPos ); } - - long Slider::ImplSlide( long nNewPos, bool bCallEndSlide ) { long nOldPos = mnThumbPos; @@ -515,8 +495,6 @@ long Slider::ImplSlide( long nNewPos, bool bCallEndSlide ) return nDelta; } - - long Slider::ImplDoAction( bool bCallEndSlide ) { long nDelta = 0; @@ -549,8 +527,6 @@ long Slider::ImplDoAction( bool bCallEndSlide ) return nDelta; } - - void Slider::ImplDoMouseAction( const Point& rMousePos, bool bCallAction ) { sal_uInt16 nOldStateFlags = mnStateFlags; @@ -611,8 +587,6 @@ void Slider::ImplDoMouseAction( const Point& rMousePos, bool bCallAction ) ImplDraw( mnDragDraw ); } - - long Slider::ImplDoSlide( long nNewPos ) { if ( meScrollType != SCROLL_DONTKNOW ) @@ -624,8 +598,6 @@ long Slider::ImplDoSlide( long nNewPos ) return nDelta; } - - long Slider::ImplDoSlideAction( ScrollType eScrollType ) { if ( (meScrollType != SCROLL_DONTKNOW) || @@ -639,8 +611,6 @@ long Slider::ImplDoSlideAction( ScrollType eScrollType ) return nDelta; } - - void Slider::MouseButtonDown( const MouseEvent& rMEvt ) { if ( rMEvt.IsLeft() ) @@ -700,8 +670,6 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt ) } } - - void Slider::MouseButtonUp( const MouseEvent& ) { if( SCROLL_SET == meScrollType ) @@ -720,8 +688,6 @@ void Slider::MouseButtonUp( const MouseEvent& ) } } - - void Slider::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) @@ -807,8 +773,6 @@ void Slider::Tracking( const TrackingEvent& rTEvt ) } } - - void Slider::KeyInput( const KeyEvent& rKEvt ) { if ( !rKEvt.GetKeyCode().GetModifier() ) @@ -849,15 +813,11 @@ void Slider::KeyInput( const KeyEvent& rKEvt ) Control::KeyInput( rKEvt ); } - - void Slider::Paint( const Rectangle& ) { ImplDraw( SLIDER_DRAW_ALL ); } - - void Slider::Resize() { Control::Resize(); @@ -867,15 +827,11 @@ void Slider::Resize() Invalidate(); } - - void Slider::RequestHelp( const HelpEvent& rHEvt ) { Control::RequestHelp( rHEvt ); } - - void Slider::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); @@ -920,8 +876,6 @@ void Slider::StateChanged( StateChangedType nType ) } } - - void Slider::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); @@ -934,22 +888,16 @@ void Slider::DataChanged( const DataChangedEvent& rDCEvt ) } } - - void Slider::Slide() { maSlideHdl.Call( this ); } - - void Slider::EndSlide() { maEndSlideHdl.Call( this ); } - - void Slider::SetRange( const Range& rRange ) { // adjust Range @@ -975,8 +923,6 @@ void Slider::SetRange( const Range& rRange ) } } - - void Slider::SetThumbPos( long nNewThumbPos ) { if ( nNewThumbPos < mnMinRange ) @@ -991,8 +937,6 @@ void Slider::SetThumbPos( long nNewThumbPos ) } } - - Size Slider::CalcWindowSizePixel() { long nWidth = mnMaxRange-mnMinRange+(SLIDER_THUMB_HALFSIZE*2)+1; diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 67dacbd6fa74..5c6c2028ff43 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -288,8 +288,6 @@ void ImplDrawSpinButton( OutputDevice* pOutDev, aDecoView.DrawSymbol( aLowRect, eType2, rStyleSettings.GetButtonTextColor(), nSymStyle ); } - - void SpinField::ImplInitSpinFieldData() { mpEdit = NULL; @@ -303,8 +301,6 @@ void SpinField::ImplInitSpinFieldData() mbInDropDown = false; } - - void SpinField::ImplInit( Window* pParent, WinBits nWinStyle ) { Edit::ImplInit( pParent, nWinStyle ); @@ -339,16 +335,12 @@ void SpinField::ImplInit( Window* pParent, WinBits nWinStyle ) } } - - SpinField::SpinField( WindowType nTyp ) : Edit( nTyp ) { ImplInitSpinFieldData(); } - - SpinField::SpinField( Window* pParent, WinBits nWinStyle ) : Edit( WINDOW_SPINFIELD ) { @@ -369,43 +361,31 @@ SpinField::SpinField( Window* pParent, const ResId& rResId ) : Show(); } - - SpinField::~SpinField() { delete mpEdit; } - - void SpinField::Up() { ImplCallEventListenersAndHandler( VCLEVENT_SPINFIELD_UP, maUpHdlLink, this ); } - - void SpinField::Down() { ImplCallEventListenersAndHandler( VCLEVENT_SPINFIELD_DOWN, maDownHdlLink, this ); } - - void SpinField::First() { ImplCallEventListenersAndHandler( VCLEVENT_SPINFIELD_FIRST, maFirstHdlLink, this ); } - - void SpinField::Last() { ImplCallEventListenersAndHandler( VCLEVENT_SPINFIELD_LAST, maLastHdlLink, this ); } - - void SpinField::MouseButtonDown( const MouseEvent& rMEvt ) { if ( !HasFocus() && ( !mpEdit || !mpEdit->HasFocus() ) ) @@ -448,8 +428,6 @@ void SpinField::MouseButtonDown( const MouseEvent& rMEvt ) Edit::MouseButtonDown( rMEvt ); } - - void SpinField::MouseButtonUp( const MouseEvent& rMEvt ) { ReleaseMouse(); @@ -475,8 +453,6 @@ void SpinField::MouseButtonUp( const MouseEvent& rMEvt ) Edit::MouseButtonUp( rMEvt ); } - - void SpinField::MouseMove( const MouseEvent& rMEvt ) { if ( rMEvt.IsLeft() ) @@ -522,8 +498,6 @@ void SpinField::MouseMove( const MouseEvent& rMEvt ) Edit::MouseMove( rMEvt ); } - - bool SpinField::Notify( NotifyEvent& rNEvt ) { bool nDone = false; @@ -610,15 +584,11 @@ bool SpinField::Notify( NotifyEvent& rNEvt ) return nDone || Edit::Notify( rNEvt ); } - - void SpinField::Command( const CommandEvent& rCEvt ) { Edit::Command( rCEvt ); } - - void SpinField::FillLayoutData() const { if( mbSpin ) @@ -631,8 +601,6 @@ void SpinField::FillLayoutData() const Edit::FillLayoutData(); } - - void SpinField::Paint( const Rectangle& rRect ) { if ( mbSpin ) @@ -662,8 +630,6 @@ void SpinField::Paint( const Rectangle& rRect ) Edit::Paint( rRect ); } - - void SpinField::ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rectangle& rDDArea, Rectangle& rSpinUpArea, Rectangle& rSpinDownArea ) { const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings(); @@ -747,8 +713,6 @@ void SpinField::ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rec } } - - void SpinField::Resize() { if ( mbSpin ) @@ -808,8 +772,6 @@ void SpinField::Resize() } } - - void SpinField::StateChanged( StateChangedType nType ) { Edit::StateChanged( nType ); @@ -872,8 +834,6 @@ void SpinField::StateChanged( StateChangedType nType ) } } - - void SpinField::DataChanged( const DataChangedEvent& rDCEvt ) { Edit::DataChanged( rDCEvt ); @@ -886,8 +846,6 @@ void SpinField::DataChanged( const DataChangedEvent& rDCEvt ) } } - - Rectangle* SpinField::ImplFindPartRect( const Point& rPt ) { if( maUpperRect.IsInside( rPt ) ) @@ -947,16 +905,12 @@ bool SpinField::PreNotify( NotifyEvent& rNEvt ) return Edit::PreNotify(rNEvt); } - - void SpinField::EndDropDown() { mbInDropDown = false; Paint( Rectangle( Point(), GetOutputSizePixel() ) ); } - - bool SpinField::ShowDropDown( sal_Bool ) { return false; @@ -996,15 +950,11 @@ Size SpinField::CalcMinimumSize() const return CalcMinimumSizeForText(GetText()); } - - Size SpinField::GetOptimalSize() const { return CalcMinimumSize(); } - - Size SpinField::CalcSize(sal_Int32 nChars) const { Size aSz = Edit::CalcSize( nChars ); @@ -1017,8 +967,6 @@ Size SpinField::CalcSize(sal_Int32 nChars) const return aSz; } - - IMPL_LINK( SpinField, ImplTimeout, Timer*, pTimer ) { if ( pTimer->GetTimeout() == GetSettings().GetMouseSettings().GetButtonStartRepeat() ) @@ -1036,8 +984,6 @@ IMPL_LINK( SpinField, ImplTimeout, Timer*, pTimer ) return 0; } - - void SpinField::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) { Edit::Draw( pDev, rPos, rSize, nFlags ); diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index e6284892fa62..3080f23edf24 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -64,7 +64,6 @@ struct ImplTabItem }; - struct ImplTabCtrlData { boost::unordered_map< int, int > maLayoutPageIdToLine; @@ -76,7 +75,6 @@ struct ImplTabCtrlData }; - #define TAB_OFFSET 3 #define TAB_TABOFFSET_X 3 #define TAB_TABOFFSET_Y 3 @@ -89,8 +87,6 @@ struct ImplTabCtrlData // for the Tab positions #define TAB_PAGERECT 0xFFFF - - void TabControl::ImplInit( Window* pParent, WinBits nStyle ) { mbLayoutDirty = true; @@ -117,7 +113,6 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle ) mpTabCtrlData = new ImplTabCtrlData; mpTabCtrlData->mpListBox = NULL; - ImplInitSettings( true, true, true ); if( (nStyle & WB_DROPDOWN) ) @@ -137,8 +132,6 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle ) pParent->AddChildEventListener( LINK( this, TabControl, ImplWindowEventListener ) ); } - - const Font& TabControl::GetCanonicalFont( const StyleSettings& _rStyle ) const { return _rStyle.GetAppFont(); @@ -150,8 +143,6 @@ const Color& TabControl::GetCanonicalTextColor( const StyleSettings& _rStyle ) c return _rStyle.GetButtonTextColor(); } - - void TabControl::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { @@ -188,8 +179,6 @@ void TabControl::ImplInitSettings( bool bFont, } } - - void TabControl::ImplFreeLayoutData() { if( HasLayoutData() ) @@ -200,8 +189,6 @@ void TabControl::ImplFreeLayoutData() } } - - TabControl::TabControl( Window* pParent, WinBits nStyle ) : Control( WINDOW_TABCONTROL ) { @@ -209,8 +196,6 @@ TabControl::TabControl( Window* pParent, WinBits nStyle ) : OSL_TRACE("*** TABCONTROL no notabs? %s", ( GetStyle() & WB_NOBORDER ) ? "true" : "false" ); } - - TabControl::TabControl( Window* pParent, const ResId& rResId ) : Control( WINDOW_TABCONTROL ) { @@ -223,8 +208,6 @@ TabControl::TabControl( Window* pParent, const ResId& rResId ) : Show(); } - - void TabControl::ImplLoadRes( const ResId& rResId ) { Control::ImplLoadRes( rResId ); @@ -244,8 +227,6 @@ void TabControl::ImplLoadRes( const ResId& rResId ) } } - - TabControl::~TabControl() { if ( GetParent()->IsDialog() ) @@ -262,8 +243,6 @@ TabControl::~TabControl() } } - - ImplTabItem* TabControl::ImplGetItem( sal_uInt16 nId ) const { for( std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin(); @@ -276,8 +255,6 @@ ImplTabItem* TabControl::ImplGetItem( sal_uInt16 nId ) const return NULL; } - - Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth ) { pItem->maFormatText = pItem->maText; @@ -627,8 +604,6 @@ Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHe return size_t(nItemPos) < mpTabCtrlData->maItemList.size() ? mpTabCtrlData->maItemList[nItemPos].maRect : Rectangle(); } - - void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId ) { ImplFreeLayoutData(); @@ -733,8 +708,6 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId ) Invalidate( aRect ); } - - bool TabControl::ImplPosCurTabPage() { // resize/position current TabPage @@ -755,8 +728,6 @@ bool TabControl::ImplPosCurTabPage() return false; } - - void TabControl::ImplActivateTabPage( bool bNext ) { sal_uInt16 nCurPos = GetPagePos( GetCurPageId() ); @@ -774,8 +745,6 @@ void TabControl::ImplActivateTabPage( bool bNext ) SelectTabPage( GetPageId( nCurPos ) ); } - - void TabControl::ImplShowFocus() { if ( !GetPageCount() || mpTabCtrlData->mpListBox ) @@ -826,8 +795,6 @@ void TabControl::ImplShowFocus() ShowFocus( aRect ); } - - void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bool bLayout, bool bFirstInGroup, bool bLastInGroup, bool /* bIsCurrentItem */ ) { if ( pItem->maRect.IsEmpty() ) @@ -1026,8 +993,6 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo } } - - bool TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent ) { bool nRet = false; @@ -1061,17 +1026,12 @@ bool TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent ) return nRet; } - - - IMPL_LINK_NOARG(TabControl, ImplListBoxSelectHdl) { SelectTabPage( GetPageId( mpTabCtrlData->mpListBox->GetSelectEntryPos() ) ); return 0; } - - IMPL_LINK( TabControl, ImplWindowEventListener, VclSimpleEvent*, pEvent ) { if ( pEvent && pEvent->ISA( VclWindowEvent ) && (pEvent->GetId() == VCLEVENT_WINDOW_KEYINPUT) ) @@ -1087,9 +1047,6 @@ IMPL_LINK( TabControl, ImplWindowEventListener, VclSimpleEvent*, pEvent ) return 0; } - - - void TabControl::MouseButtonDown( const MouseEvent& rMEvt ) { if( mpTabCtrlData->mpListBox == NULL ) @@ -1104,8 +1061,6 @@ void TabControl::MouseButtonDown( const MouseEvent& rMEvt ) } } - - void TabControl::KeyInput( const KeyEvent& rKEvt ) { if( mpTabCtrlData->mpListBox ) @@ -1125,16 +1080,12 @@ void TabControl::KeyInput( const KeyEvent& rKEvt ) Control::KeyInput( rKEvt ); } - - void TabControl::Paint( const Rectangle& rRect ) { if ( !( GetStyle() & WB_NOBORDER ) ) ImplPaint( rRect, false ); } - - void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout ) { if( ! bLayout ) @@ -1315,8 +1266,6 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout ) mbSmallInvalidate = true; } - - void TabControl::setAllocation(const Size &rAllocation) { ImplFreeLayoutData(); @@ -1407,8 +1356,6 @@ void TabControl::Resize() setAllocation(Control::GetOutputSizePixel()); } - - void TabControl::GetFocus() { if( ! mpTabCtrlData->mpListBox ) @@ -1424,8 +1371,6 @@ void TabControl::GetFocus() Control::GetFocus(); } - - void TabControl::LoseFocus() { if( ! mpTabCtrlData->mpListBox ) @@ -1433,8 +1378,6 @@ void TabControl::LoseFocus() Control::LoseFocus(); } - - void TabControl::RequestHelp( const HelpEvent& rHEvt ) { sal_uInt16 nItemId = rHEvt.KeyboardActivated() ? mnCurPageId : GetPageId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) ); @@ -1518,8 +1461,6 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt ) Control::RequestHelp( rHEvt ); } - - void TabControl::Command( const CommandEvent& rCEvt ) { if( (mpTabCtrlData->mpListBox == NULL) && (rCEvt.GetCommand() == COMMAND_CONTEXTMENU) && (GetPageCount() > 1) ) @@ -1559,8 +1500,6 @@ void TabControl::Command( const CommandEvent& rCEvt ) Control::Command( rCEvt ); } - - void TabControl::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); @@ -1594,8 +1533,6 @@ void TabControl::StateChanged( StateChangedType nType ) } } - - void TabControl::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); @@ -1610,8 +1547,6 @@ void TabControl::DataChanged( const DataChangedEvent& rDCEvt ) } } - - Rectangle* TabControl::ImplFindPartRect( const Point& rPt ) { ImplTabItem* pFoundItem = NULL; @@ -1678,8 +1613,6 @@ bool TabControl::PreNotify( NotifyEvent& rNEvt ) return Control::PreNotify(rNEvt); } - - bool TabControl::Notify( NotifyEvent& rNEvt ) { bool nRet = false; @@ -1690,22 +1623,16 @@ bool TabControl::Notify( NotifyEvent& rNEvt ) return nRet || Control::Notify( rNEvt ); } - - void TabControl::ActivatePage() { maActivateHdl.Call( this ); } - - bool TabControl::DeactivatePage() { return !maDeactivateHdl.IsSet() || maDeactivateHdl.Call( this ); } - - void TabControl::SetTabPageSizePixel( const Size& rSize ) { ImplFreeLayoutData(); @@ -1718,16 +1645,12 @@ void TabControl::SetTabPageSizePixel( const Size& rSize ) Window::SetOutputSizePixel( aNewSize ); } - - Size TabControl::GetTabPageSizePixel() const { Rectangle aRect = ((TabControl*)this)->ImplGetTabRect( TAB_PAGERECT ); return aRect.GetSize(); } - - void TabControl::InsertPage( const ResId& rResId, sal_uInt16 nPos ) { GetRes( rResId.SetRT( RSC_TABCONTROLITEM ) ); @@ -1753,8 +1676,6 @@ void TabControl::InsertPage( const ResId& rResId, sal_uInt16 nPos ) } } - - void TabControl::InsertPage( sal_uInt16 nPageId, const OUString& rText, sal_uInt16 nPos ) { @@ -1807,8 +1728,6 @@ void TabControl::InsertPage( sal_uInt16 nPageId, const OUString& rText, ImplCallEventListeners( VCLEVENT_TABPAGE_INSERTED, (void*) (sal_uLong)nPageId ); } - - void TabControl::RemovePage( sal_uInt16 nPageId ) { sal_uInt16 nPos = GetPagePos( nPageId ); @@ -1855,8 +1774,6 @@ void TabControl::RemovePage( sal_uInt16 nPageId ) } } - - void TabControl::Clear() { // clear item list @@ -1874,8 +1791,6 @@ void TabControl::Clear() ImplCallEventListeners( VCLEVENT_TABPAGE_REMOVEDALL ); } - - void TabControl::EnablePage( sal_uInt16 i_nPageId, bool i_bEnable ) { ImplTabItem* pItem = ImplGetItem( i_nPageId ); @@ -1897,15 +1812,11 @@ void TabControl::EnablePage( sal_uInt16 i_nPageId, bool i_bEnable ) } } - - sal_uInt16 TabControl::GetPageCount() const { return (sal_uInt16)mpTabCtrlData->maItemList.size(); } - - sal_uInt16 TabControl::GetPageId( sal_uInt16 nPos ) const { if( size_t(nPos) < mpTabCtrlData->maItemList.size() ) @@ -1913,8 +1824,6 @@ sal_uInt16 TabControl::GetPageId( sal_uInt16 nPos ) const return 0; } - - sal_uInt16 TabControl::GetPagePos( sal_uInt16 nPageId ) const { for( std::vector< ImplTabItem >::const_iterator it = mpTabCtrlData->maItemList.begin(); @@ -1927,8 +1836,6 @@ sal_uInt16 TabControl::GetPagePos( sal_uInt16 nPageId ) const return TAB_PAGE_NOTFOUND; } - - sal_uInt16 TabControl::GetPageId( const Point& rPos ) const { for( size_t i = 0; i < mpTabCtrlData->maItemList.size(); ++i ) @@ -1964,8 +1871,6 @@ sal_uInt16 TabControl::GetPageId( const OString& rName ) const return 0; } - - void TabControl::SetCurPageId( sal_uInt16 nPageId ) { sal_uInt16 nPos = GetPagePos( nPageId ); @@ -2001,8 +1906,6 @@ void TabControl::SetCurPageId( sal_uInt16 nPageId ) } } - - sal_uInt16 TabControl::GetCurPageId() const { if ( mnActPageId ) @@ -2011,8 +1914,6 @@ sal_uInt16 TabControl::GetCurPageId() const return mnCurPageId; } - - void TabControl::SelectTabPage( sal_uInt16 nPageId ) { if ( nPageId && (nPageId != mnCurPageId) ) @@ -2035,8 +1936,6 @@ void TabControl::SelectTabPage( sal_uInt16 nPageId ) } } - - void TabControl::SetTabPage( sal_uInt16 nPageId, TabPage* pTabPage ) { ImplTabItem* pItem = ImplGetItem( nPageId ); @@ -2065,8 +1964,6 @@ void TabControl::SetTabPage( sal_uInt16 nPageId, TabPage* pTabPage ) } } - - TabPage* TabControl::GetTabPage( sal_uInt16 nPageId ) const { ImplTabItem* pItem = ImplGetItem( nPageId ); @@ -2077,8 +1974,6 @@ TabPage* TabControl::GetTabPage( sal_uInt16 nPageId ) const return NULL; } - - void TabControl::SetPageText( sal_uInt16 nPageId, const OUString& rText ) { ImplTabItem* pItem = ImplGetItem( nPageId ); @@ -2100,8 +1995,6 @@ void TabControl::SetPageText( sal_uInt16 nPageId, const OUString& rText ) } } - - OUString TabControl::GetPageText( sal_uInt16 nPageId ) const { ImplTabItem* pItem = ImplGetItem( nPageId ); @@ -2111,8 +2004,6 @@ OUString TabControl::GetPageText( sal_uInt16 nPageId ) const return pItem->maText; } - - void TabControl::SetHelpText( sal_uInt16 nPageId, const OUString& rText ) { ImplTabItem* pItem = ImplGetItem( nPageId ); @@ -2122,8 +2013,6 @@ void TabControl::SetHelpText( sal_uInt16 nPageId, const OUString& rText ) pItem->maHelpText = rText; } - - const OUString& TabControl::GetHelpText( sal_uInt16 nPageId ) const { ImplTabItem* pItem = ImplGetItem( nPageId ); @@ -2139,8 +2028,6 @@ const OUString& TabControl::GetHelpText( sal_uInt16 nPageId ) const return pItem->maHelpText; } - - void TabControl::SetHelpId( sal_uInt16 nPageId, const OString& rId ) const { ImplTabItem* pItem = ImplGetItem( nPageId ); @@ -2177,8 +2064,6 @@ OString TabControl::GetPageName( sal_uInt16 nPageId ) const return OString(); } - - void TabControl::SetPageImage( sal_uInt16 i_nPageId, const Image& i_rImage ) { ImplTabItem* pItem = ImplGetItem( i_nPageId ); @@ -2192,8 +2077,6 @@ void TabControl::SetPageImage( sal_uInt16 i_nPageId, const Image& i_rImage ) } } - - Rectangle TabControl::GetCharacterBounds( sal_uInt16 nPageId, long nIndex ) const { Rectangle aRet; @@ -2215,8 +2098,6 @@ Rectangle TabControl::GetCharacterBounds( sal_uInt16 nPageId, long nIndex ) cons return aRet; } - - long TabControl::GetIndexForPoint( const Point& rPoint, sal_uInt16& rPageId ) const { long nRet = -1; @@ -2248,8 +2129,6 @@ long TabControl::GetIndexForPoint( const Point& rPoint, sal_uInt16& rPageId ) co return nRet; } - - void TabControl::FillLayoutData() const { mpTabCtrlData->maLayoutLineToPageId.clear(); @@ -2257,8 +2136,6 @@ void TabControl::FillLayoutData() const const_cast<TabControl*>(this)->ImplPaint( Rectangle(), true ); } - - Rectangle TabControl::GetTabBounds( sal_uInt16 nPageId ) const { Rectangle aRet; @@ -2270,8 +2147,6 @@ Rectangle TabControl::GetTabBounds( sal_uInt16 nPageId ) const return aRet; } - - void TabControl::SetItemsOffset( const Point& rOffs ) { if( mpTabCtrlData ) @@ -2286,8 +2161,6 @@ Point TabControl::GetItemsOffset() const return Point(); } - - Size TabControl::calculateRequisition() const { Size aOptimalPageSize(0, 0); diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index 644286c70894..3262cdc43657 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -179,7 +179,7 @@ short hPoint2Sgf(short a) // Start of AbsRead.Pas // Function GetTopToBaseLine() Function GetBaseLineToBtm() - +// // Calculate distance from ascender of line to baseline or from baseline to // descender. All in SGF-units. @@ -191,7 +191,7 @@ sal_uInt16 GetTopToBaseLine(sal_uInt16 MaxGrad) } // Function GetTextChar() Function GetTextCharConv() - +// // Reads a character from textbuffer, in doing so escape sequences // are evaluated and accordingly the input/output parameter AktAtr is set. // Index is incremented accordingly. @@ -200,12 +200,13 @@ sal_uInt16 GetTopToBaseLine(sal_uInt16 MaxGrad) // Otherwise the hyphenation does not work. If the constand NoTrenn // is used instaed, no hyphenation is done. To the contrary then // constant DoTrenn triggers hyphenation where a soft-break is present. - +// // Soft separators are converted to a minus sign. // On top GetTextCharConv() converts HardSpace and AbsatzEnde // in spaces, including HardTrenner in minus signs. TextEnde is // always returned as Char(0). + UCHAR ConvertTextChar(UCHAR c) { if (c<32) { @@ -407,9 +408,9 @@ UCHAR GetTextCharConv(UCHAR* TBuf, sal_uInt16& Index, // Function GetLineFeed() - +// // Required line spacing in SGF-Units. ChrVPos is taken into account. - +// ====================================================================== sal_uInt16 GetLineFeed(UCHAR* TBuf, sal_uInt16 Index, ObjTextType Atr0, ObjTextType AktAtr, sal_uInt16 nChar, sal_uInt16& LF, sal_uInt16& MaxGrad) { diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx index b2b19df25374..73e78a5aa79c 100644 --- a/vcl/source/filter/wmf/winmtf.hxx +++ b/vcl/source/filter/wmf/winmtf.hxx @@ -327,7 +327,7 @@ struct WinMtfFontStyle WinMtfFontStyle( LOGFONTW& rLogFont ); }; - +// ----------------------------------------------------------------------------- typedef enum { FillStyleSolid, @@ -394,6 +394,7 @@ struct WinMtfFillStyle } }; + struct WinMtfLineStyle { Color aLineColor; @@ -444,6 +445,7 @@ struct WinMtfLineStyle } }; + struct XForm { float eM11; @@ -459,6 +461,7 @@ struct XForm } }; + struct SaveStruct { sal_uInt32 nBkMode, nMapMode, nGfxMode, nTextLayoutMode; @@ -485,6 +488,7 @@ struct SaveStruct typedef ::boost::shared_ptr< SaveStruct > SaveStructPtr; + struct BSaveStruct { Bitmap aBmp; @@ -507,6 +511,7 @@ struct BSaveStruct typedef ::std::vector< BSaveStruct* > BSaveStructList_impl; + enum GDIObjectType { GDI_DUMMY = 0, GDI_PEN = 1, @@ -560,6 +565,7 @@ struct GDIObj } }; + class WinMtfOutput { WinMtfPathObj aPathObj; @@ -746,6 +752,7 @@ public: virtual ~WinMtfOutput(); }; + class WinMtf { protected: diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index bfcf0780d51c..c4b50b157acd 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -256,6 +256,7 @@ struct TYPE2OP }; }; + struct CffGlobal { explicit CffGlobal(); @@ -284,6 +285,7 @@ struct CffGlobal int mnFamilyNameSID; }; + struct CffLocal { explicit CffLocal(); @@ -315,6 +317,7 @@ struct CffLocal bool mbForceBold; }; + class SubsetterContext { public: @@ -329,6 +332,7 @@ public: SubsetterContext::~SubsetterContext( void) {} + class CffSubsetterContext : public SubsetterContext , private CffGlobal @@ -519,7 +523,7 @@ void CffSubsetterContext::addHints( bool bVerticalHints) // copy the remaining values to the hint arrays // assert( (mnStackIdx & 1) == 0); // depends on called subrs - if( mnStackIdx & 1) --mnStackIdx; + if( mnStackIdx & 1) --mnStackIdx;//####### // TODO: if( !bSubr) assert( mnStackIdx >= 2); assert( (mnHintSize + mnStackIdx) <= 2*NMAXHINTS); @@ -1278,7 +1282,7 @@ int CffSubsetterContext::convert2Type1Ops( CffLocal* pCffLocal, const U8* const mbSawError = false; mbNeedClose = false; mbIgnoreHints = false; -mnHintSize=mnHorzHintSize=mnStackIdx=0; maCharWidth=-1; +mnHintSize=mnHorzHintSize=mnStackIdx=0; maCharWidth=-1;//####### mnCntrMask = 0; while( mpReadPtr < mpReadEnd) convertOneTypeOp(); @@ -1452,6 +1456,7 @@ void CffSubsetterContext::seekIndexEnd( int nIndexBase) assert( mpReadEnd <= mpBaseEnd); } + // initialize FONTDICT specific values CffLocal::CffLocal( void) : mnPrivDictBase( 0) |