edit.cxx (79aad27f) edit.cxx (ad3a95a3)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 2484 unchanged lines hidden (view full) ---

2493 if ( mpUpdateDataTimer )
2494 mpUpdateDataTimer->Start();
2495
2496 if ( ImplCallEventListenersAndHandler( VCLEVENT_EDIT_MODIFY, maModifyHdl, this ) )
2497 // have been destroyed while calling into the handlers
2498 return;
2499
2500 // #i13677# notify edit listeners about caret position change
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 2484 unchanged lines hidden (view full) ---

2493 if ( mpUpdateDataTimer )
2494 mpUpdateDataTimer->Start();
2495
2496 if ( ImplCallEventListenersAndHandler( VCLEVENT_EDIT_MODIFY, maModifyHdl, this ) )
2497 // have been destroyed while calling into the handlers
2498 return;
2499
2500 // #i13677# notify edit listeners about caret position change
2501 ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
2502
2501//IAccessibility2 Implementation 2009-----
2502 //ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
2503 ImplCallEventListeners( VCLEVENT_EDIT_CARETCHANGED );
2504//-----IAccessibility2 Implementation 2009
2503 // FIXME: this is currently only on aqua
2504 // check for other platforms that need similar handling
2505 if( ImplGetSVData()->maNWFData.mbNoFocusRects &&
2506 IsNativeWidgetEnabled() &&
2507 IsNativeControlSupported( CTRL_EDITBOX, PART_ENTIRE_CONTROL ) )
2508 {
2509 ImplInvalidateOutermostBorder( this );
2510 }

--- 138 unchanged lines hidden (view full) ---

2649 if ( aNew.Min() < 0 )
2650 aNew.Min() = 0;
2651 if ( aNew.Max() < 0 )
2652 aNew.Max() = 0;
2653
2654 if ( aNew != maSelection )
2655 {
2656 ImplClearLayoutData();
2505 // FIXME: this is currently only on aqua
2506 // check for other platforms that need similar handling
2507 if( ImplGetSVData()->maNWFData.mbNoFocusRects &&
2508 IsNativeWidgetEnabled() &&
2509 IsNativeControlSupported( CTRL_EDITBOX, PART_ENTIRE_CONTROL ) )
2510 {
2511 ImplInvalidateOutermostBorder( this );
2512 }

--- 138 unchanged lines hidden (view full) ---

2651 if ( aNew.Min() < 0 )
2652 aNew.Min() = 0;
2653 if ( aNew.Max() < 0 )
2654 aNew.Max() = 0;
2655
2656 if ( aNew != maSelection )
2657 {
2658 ImplClearLayoutData();
2659//IAccessibility2 Implementation 2009-----
2660 Selection aTemp = maSelection;
2661//-----IAccessibility2 Implementation 2009
2657 maSelection = aNew;
2658
2659 if ( bPaint && ( aOld.Len() || aNew.Len() || IsPaintTransparent() ) )
2660 ImplInvalidateOrRepaint( 0, maText.Len() );
2661 ImplShowCursor();
2662 maSelection = aNew;
2663
2664 if ( bPaint && ( aOld.Len() || aNew.Len() || IsPaintTransparent() ) )
2665 ImplInvalidateOrRepaint( 0, maText.Len() );
2666 ImplShowCursor();
2662 if ( mbIsSubEdit )
2663 ((Edit*)GetParent())->ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
2664 else
2665 ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
2667//IAccessibility2 Implementation 2009-----
2668 sal_Bool bCaret = sal_False, bSelection = sal_False;
2669 long nB=aNew.Max(), nA=aNew.Min(),oB=aTemp.Max(), oA=aTemp.Min();
2670 long nGap = nB-nA, oGap = oB-oA;
2671 if (nB != oB)
2672 bCaret = sal_True;
2673 if (nGap != 0 || oGap != 0)
2674 bSelection = sal_True;
2675 if (bCaret)
2676 {
2677 if ( mbIsSubEdit )
2678 ((Edit*)GetParent())->ImplCallEventListeners( VCLEVENT_EDIT_CARETCHANGED );
2679 else
2680 ImplCallEventListeners( VCLEVENT_EDIT_CARETCHANGED );
2681 }
2682 if (bSelection)
2683 {
2684 if ( mbIsSubEdit )
2685 ((Edit*)GetParent())->ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
2686 else
2687 ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
2688 }
2689//-----IAccessibility2 Implementation 2009
2666 // #103511# notify combobox listeners of deselection
2667 if( !maSelection && GetParent() && GetParent()->GetType() == WINDOW_COMBOBOX )
2668 ((Edit*)GetParent())->ImplCallEventListeners( VCLEVENT_COMBOBOX_DESELECT );
2669 }
2670 }
2671 }
2672}
2673

--- 483 unchanged lines hidden ---
2690 // #103511# notify combobox listeners of deselection
2691 if( !maSelection && GetParent() && GetParent()->GetType() == WINDOW_COMBOBOX )
2692 ((Edit*)GetParent())->ImplCallEventListeners( VCLEVENT_COMBOBOX_DESELECT );
2693 }
2694 }
2695 }
2696}
2697

--- 483 unchanged lines hidden ---