diff options
Diffstat (limited to 'svtools/source/control/toolbarmenu.cxx')
-rw-r--r-- | svtools/source/control/toolbarmenu.cxx | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index 08503e372f1a..66a0aad73276 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -63,7 +63,6 @@ static vcl::Window* GetTopMostParentSystemWindow( vcl::Window* pWindow ) } - void ToolbarMenuEntry::init( int nEntryId, MenuItemBits nBits ) { mnEntryId = nEntryId; @@ -78,7 +77,6 @@ void ToolbarMenuEntry::init( int nEntryId, MenuItemBits nBits ) } - ToolbarMenuEntry::ToolbarMenuEntry( ToolbarMenu& rMenu, int nEntryId, const OUString& rText, MenuItemBits nBits ) : mrMenu( rMenu ) { @@ -89,7 +87,6 @@ ToolbarMenuEntry::ToolbarMenuEntry( ToolbarMenu& rMenu, int nEntryId, const OUSt } - ToolbarMenuEntry::ToolbarMenuEntry( ToolbarMenu& rMenu, int nEntryId, const Image& rImage, const OUString& rText, MenuItemBits nBits ) : mrMenu( rMenu ) { @@ -103,7 +100,6 @@ ToolbarMenuEntry::ToolbarMenuEntry( ToolbarMenu& rMenu, int nEntryId, const Imag } - ToolbarMenuEntry::ToolbarMenuEntry( ToolbarMenu& rMenu, int nEntryId, Control* pControl, MenuItemBits nBits ) : mrMenu( rMenu ) { @@ -117,7 +113,6 @@ ToolbarMenuEntry::ToolbarMenuEntry( ToolbarMenu& rMenu, int nEntryId, Control* p } - ToolbarMenuEntry::~ToolbarMenuEntry() { if( mxAccContext.is() ) @@ -131,7 +126,6 @@ ToolbarMenuEntry::~ToolbarMenuEntry() } - const Reference< XAccessibleContext >& ToolbarMenuEntry::GetAccessible( bool bCreate /* = false */ ) { if( !mxAccContext.is() && bCreate ) @@ -150,7 +144,6 @@ const Reference< XAccessibleContext >& ToolbarMenuEntry::GetAccessible( bool bCr } - sal_Int32 ToolbarMenuEntry::getAccessibleChildCount() throw (RuntimeException) { if( mpControl ) @@ -165,7 +158,6 @@ sal_Int32 ToolbarMenuEntry::getAccessibleChildCount() throw (RuntimeException) } - Reference< XAccessible > ToolbarMenuEntry::getAccessibleChild( sal_Int32 index ) throw (IndexOutOfBoundsException, RuntimeException) { const Reference< XAccessibleContext >& xContext = GetAccessible( true ); @@ -187,7 +179,6 @@ Reference< XAccessible > ToolbarMenuEntry::getAccessibleChild( sal_Int32 index ) } - ToolbarMenu_Impl::ToolbarMenu_Impl( ToolbarMenu& rMenu, const css::uno::Reference< css::frame::XFrame >& xFrame ) : mrMenu( rMenu ) , mxFrame( xFrame ) @@ -201,14 +192,12 @@ ToolbarMenu_Impl::ToolbarMenu_Impl( ToolbarMenu& rMenu, const css::uno::Referenc } - ToolbarMenu_Impl::~ToolbarMenu_Impl() { setAccessible( nullptr ); } - void ToolbarMenu_Impl::setAccessible( ToolbarMenuAcc* pAccessible ) { if( mxAccessible.get() != pAccessible ) @@ -221,7 +210,6 @@ void ToolbarMenu_Impl::setAccessible( ToolbarMenuAcc* pAccessible ) } - void ToolbarMenu_Impl::fireAccessibleEvent( short nEventId, const css::uno::Any& rOldValue, const css::uno::Any& rNewValue ) { if( mxAccessible.is() ) @@ -229,14 +217,12 @@ void ToolbarMenu_Impl::fireAccessibleEvent( short nEventId, const css::uno::Any& } - bool ToolbarMenu_Impl::hasAccessibleListeners() { return( mxAccessible.is() && mxAccessible->HasAccessibleListeners() ); } - sal_Int32 ToolbarMenu_Impl::getAccessibleChildCount() throw (RuntimeException) { sal_Int32 nCount = 0; @@ -261,7 +247,6 @@ sal_Int32 ToolbarMenu_Impl::getAccessibleChildCount() throw (RuntimeException) } - Reference< XAccessible > ToolbarMenu_Impl::getAccessibleChild( sal_Int32 index ) throw (IndexOutOfBoundsException, RuntimeException) { const int nEntryCount = maEntryVector.size(); @@ -283,7 +268,6 @@ Reference< XAccessible > ToolbarMenu_Impl::getAccessibleChild( sal_Int32 index ) } - Reference< XAccessible > ToolbarMenu_Impl::getAccessibleChild( Control* pControl, sal_Int32 childIndex ) throw (IndexOutOfBoundsException, RuntimeException) { const int nEntryCount = maEntryVector.size(); @@ -300,7 +284,6 @@ Reference< XAccessible > ToolbarMenu_Impl::getAccessibleChild( Control* pControl } - void ToolbarMenu_Impl::selectAccessibleChild( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { const int nEntryCount = maEntryVector.size(); @@ -331,7 +314,6 @@ void ToolbarMenu_Impl::selectAccessibleChild( sal_Int32 nChildIndex ) throw (Ind } - bool ToolbarMenu_Impl::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { const int nEntryCount = maEntryVector.size(); @@ -365,7 +347,6 @@ bool ToolbarMenu_Impl::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw } - void ToolbarMenu_Impl::clearAccessibleSelection() { if( mnHighlightedEntry != -1 ) @@ -376,8 +357,6 @@ void ToolbarMenu_Impl::clearAccessibleSelection() } - - void ToolbarMenu_Impl::notifyHighlightedEntry() { if( hasAccessibleListeners() ) @@ -414,7 +393,6 @@ void ToolbarMenu_Impl::notifyHighlightedEntry() } - ToolbarMenuEntry* ToolbarMenu_Impl::implGetEntry( int nEntry ) const { if( (nEntry < 0) || (nEntry >= (int)maEntryVector.size() ) ) @@ -424,8 +402,6 @@ ToolbarMenuEntry* ToolbarMenu_Impl::implGetEntry( int nEntry ) const } - - IMPL_LINK_NOARG_TYPED( ToolbarMenu, HighlightHdl, ValueSet*, void ) { mpImpl->notifyHighlightedEntry(); @@ -452,7 +428,6 @@ void ToolbarMenu::implInit(const Reference< XFrame >& rFrame) } - ToolbarMenu::~ToolbarMenu() { disposeOnce(); @@ -485,7 +460,6 @@ void ToolbarMenu::dispose() } - int ToolbarMenu::getSelectedEntryId() const { ToolbarMenuEntry* pEntry = implGetEntry( mpImpl->mnSelectedEntry ); @@ -493,7 +467,6 @@ int ToolbarMenu::getSelectedEntryId() const } - int ToolbarMenu::getHighlightedEntryId() const { ToolbarMenuEntry* pEntry = implGetEntry( mpImpl->mnHighlightedEntry ); @@ -501,7 +474,6 @@ int ToolbarMenu::getHighlightedEntryId() const } - void ToolbarMenu::checkEntry( int nEntryId, bool bChecked ) { ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId ); @@ -513,7 +485,6 @@ void ToolbarMenu::checkEntry( int nEntryId, bool bChecked ) } - void ToolbarMenu::enableEntry( int nEntryId, bool bEnable ) { ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId ); @@ -532,7 +503,6 @@ void ToolbarMenu::enableEntry( int nEntryId, bool bEnable ) } - void ToolbarMenu::setEntryText( int nEntryId, const OUString& rStr ) { ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId ); @@ -546,7 +516,6 @@ void ToolbarMenu::setEntryText( int nEntryId, const OUString& rStr ) } - void ToolbarMenu::setEntryImage( int nEntryId, const Image& rImage ) { ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId ); @@ -560,7 +529,6 @@ void ToolbarMenu::setEntryImage( int nEntryId, const Image& rImage ) } - void ToolbarMenu::initWindow() { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -576,7 +544,6 @@ void ToolbarMenu::initWindow() } - static long ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, long& rCheckHeight, long& rRadioHeight, long &rMaxWidth ) { rMaxWidth = rCheckHeight = rRadioHeight = 0; @@ -742,14 +709,12 @@ Size ToolbarMenu::implCalcSize() } - void ToolbarMenu::highlightFirstEntry() { implChangeHighlightEntry( 0 ); } - void ToolbarMenu::GetFocus() { if( mpImpl->mnHighlightedEntry == -1 ) @@ -759,7 +724,6 @@ void ToolbarMenu::GetFocus() } - void ToolbarMenu::LoseFocus() { if( mpImpl && mpImpl->mnHighlightedEntry != -1 ) @@ -769,28 +733,24 @@ void ToolbarMenu::LoseFocus() } - void ToolbarMenu::appendEntry( int nEntryId, const OUString& rStr, MenuItemBits nItemBits ) { appendEntry( new ToolbarMenuEntry( *this, nEntryId, rStr, nItemBits ) ); } - void ToolbarMenu::appendEntry( int nEntryId, const OUString& rStr, const Image& rImage, MenuItemBits nItemBits ) { appendEntry( new ToolbarMenuEntry( *this, nEntryId, rImage, rStr, nItemBits ) ); } - void ToolbarMenu::appendEntry( int nEntryId, Control* pControl, MenuItemBits nItemBits ) { appendEntry( new ToolbarMenuEntry( *this, nEntryId, pControl, nItemBits ) ); } - void ToolbarMenu::appendEntry( ToolbarMenuEntry* pEntry ) { mpImpl->maEntryVector.push_back(pEntry); @@ -800,14 +760,12 @@ void ToolbarMenu::appendEntry( ToolbarMenuEntry* pEntry ) } - void ToolbarMenu::appendSeparator() { appendEntry( nullptr ); } - /** creates an empty ValueSet that is initialized and can be inserted with appendEntry. */ VclPtr<ValueSet> ToolbarMenu::createEmptyValueSetControl() { @@ -819,14 +777,12 @@ VclPtr<ValueSet> ToolbarMenu::createEmptyValueSetControl() } - ToolbarMenuEntry* ToolbarMenu::implGetEntry( int nEntry ) const { return mpImpl->implGetEntry( nEntry ); } - ToolbarMenuEntry* ToolbarMenu::implSearchEntry( int nEntryId ) const { const int nEntryCount = mpImpl->maEntryVector.size(); @@ -844,7 +800,6 @@ ToolbarMenuEntry* ToolbarMenu::implSearchEntry( int nEntryId ) const } - void ToolbarMenu::implHighlightEntry(vcl::RenderContext& rRenderContext, int nHighlightEntry, bool bHighlight) { Size aSz(GetOutputSizePixel()); @@ -940,7 +895,6 @@ void ToolbarMenu::implHighlightEntry(vcl::RenderContext& rRenderContext, int nHi } - void ToolbarMenu::implSelectEntry( int nSelectedEntry ) { mpImpl->mnSelectedEntry = nSelectedEntry; @@ -954,7 +908,6 @@ void ToolbarMenu::implSelectEntry( int nSelectedEntry ) } - void ToolbarMenu::MouseButtonDown( const MouseEvent& rMEvt ) { implHighlightAtPosition(rMEvt, true); @@ -962,13 +915,11 @@ void ToolbarMenu::MouseButtonDown( const MouseEvent& rMEvt ) } - void ToolbarMenu::MouseButtonUp( const MouseEvent& ) { } - void ToolbarMenu::MouseMove( const MouseEvent& rMEvt ) { if (!IsVisible()) @@ -978,7 +929,6 @@ void ToolbarMenu::MouseMove( const MouseEvent& rMEvt ) } - void ToolbarMenu::implHighlightAtPosition(const MouseEvent& rMEvt, bool /*bMBDown*/) { long nMouseY = rMEvt.GetPosPixel().Y(); @@ -1025,7 +975,6 @@ void ToolbarMenu::implHighlightAtPosition(const MouseEvent& rMEvt, bool /*bMBDow } - void ToolbarMenu::implChangeHighlightEntry(int nEntry) { mpImpl->mnHighlightedEntry = nEntry; @@ -1035,7 +984,6 @@ void ToolbarMenu::implChangeHighlightEntry(int nEntry) } - static bool implCheckSubControlCursorMove( Control* pControl, bool bUp, int& nLastColumn ) { ValueSet* pValueSet = dynamic_cast< ValueSet* >( pControl ); @@ -1065,7 +1013,6 @@ static bool implCheckSubControlCursorMove( Control* pControl, bool bUp, int& nLa } - ToolbarMenuEntry* ToolbarMenu::implCursorUpDown( bool bUp, bool bHomeEnd ) { int n = 0, nLoop = 0; @@ -1143,7 +1090,6 @@ ToolbarMenuEntry* ToolbarMenu::implCursorUpDown( bool bUp, bool bHomeEnd ) } - void ToolbarMenu_Impl::implHighlightControl( sal_uInt16 nCode, Control* pControl ) { ValueSet* pValueSet = dynamic_cast< ValueSet* >( pControl ); @@ -1176,7 +1122,6 @@ void ToolbarMenu_Impl::implHighlightControl( sal_uInt16 nCode, Control* pControl } - void ToolbarMenu::KeyInput( const KeyEvent& rKEvent ) { Control* pForwardControl = nullptr; @@ -1469,14 +1414,12 @@ void ToolbarMenu::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) } - void ToolbarMenu::RequestHelp( const HelpEvent& rHEvt ) { DockingWindow::RequestHelp( rHEvt ); } - void ToolbarMenu::StateChanged( StateChangedType nType ) { DockingWindow::StateChanged( nType ); @@ -1489,7 +1432,6 @@ void ToolbarMenu::StateChanged( StateChangedType nType ) } - void ToolbarMenu::DataChanged( const DataChangedEvent& rDCEvt ) { DockingWindow::DataChanged( rDCEvt ); @@ -1505,7 +1447,6 @@ void ToolbarMenu::DataChanged( const DataChangedEvent& rDCEvt ) } - void ToolbarMenu::Command( const CommandEvent& rCEvt ) { if ( rCEvt.GetCommand() == CommandEventId::Wheel ) @@ -1519,7 +1460,6 @@ void ToolbarMenu::Command( const CommandEvent& rCEvt ) } - Reference< css::accessibility::XAccessible > ToolbarMenu::CreateAccessible() { mpImpl->setAccessible( new ToolbarMenuAcc( *mpImpl ) ); @@ -1527,7 +1467,6 @@ Reference< css::accessibility::XAccessible > ToolbarMenu::CreateAccessible() } - // todo: move to new base class that will replace SfxPopupWindo void ToolbarMenu::AddStatusListener( const OUString& rCommandURL ) { @@ -1536,13 +1475,11 @@ void ToolbarMenu::AddStatusListener( const OUString& rCommandURL ) } - void ToolbarMenu::statusChanged( const css::frame::FeatureStateEvent& /*Event*/ ) throw ( css::uno::RuntimeException, std::exception ) { } - class ToolbarMenuStatusListener : public svt::FrameStatusListener { public: @@ -1556,7 +1493,6 @@ public: }; - ToolbarMenuStatusListener::ToolbarMenuStatusListener( const css::uno::Reference< css::frame::XFrame >& xFrame, ToolbarMenu& rToolbarMenu ) @@ -1566,7 +1502,6 @@ ToolbarMenuStatusListener::ToolbarMenuStatusListener( } - void SAL_CALL ToolbarMenuStatusListener::dispose() throw (css::uno::RuntimeException, std::exception) { mpMenu.clear(); @@ -1574,7 +1509,6 @@ void SAL_CALL ToolbarMenuStatusListener::dispose() throw (css::uno::RuntimeExcep } - void SAL_CALL ToolbarMenuStatusListener::statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException, std::exception ) { if( mpMenu ) @@ -1582,7 +1516,6 @@ void SAL_CALL ToolbarMenuStatusListener::statusChanged( const css::frame::Featur } - void ToolbarMenu::initStatusListener() { if( !mpImpl->mxStatusListener.is() ) @@ -1590,35 +1523,30 @@ void ToolbarMenu::initStatusListener() } - bool ToolbarMenu::IsInPopupMode() { return GetDockingManager()->IsInPopupMode(this); } - void ToolbarMenu::EndPopupMode() { GetDockingManager()->EndPopupMode(this); } - const Size& ToolbarMenu::getMenuSize() const { return mpImpl->maSize; } - void ToolbarMenu::SetSelectHdl( const Link<ToolbarMenu*,void>& rLink ) { mpImpl->maSelectHdl = rLink; } - } |