svmedit.cxx (4d7c9de0) | svmedit.cxx (e8a7c477) |
---|---|
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 --- 927 unchanged lines hidden (view full) --- 936 { 937 mpExtTextView->Command( rCEvt ); 938 } 939 Window::Command( rCEvt ); 940} 941 942void TextWindow::GetFocus() 943{ | 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 --- 927 unchanged lines hidden (view full) --- 936 { 937 mpExtTextView->Command( rCEvt ); 938 } 939 Window::Command( rCEvt ); 940} 941 942void TextWindow::GetFocus() 943{ |
944 //Window::GetFocus(); 945 if ( !mbActivePopup ) 946 { 947 sal_Bool bGotoCursor = !mpExtTextView->IsReadOnly(); 948 if ( mbFocusSelectionHide && IsReallyVisible() && !mpExtTextView->IsReadOnly() 949 && ( mbSelectOnTab && 950 (!mbInMBDown || ( GetSettings().GetStyleSettings().GetSelectionOptions() & SELECTION_OPTION_FOCUS ) )) ) 951 { 952 // Alles selektieren, aber nicht scrollen 953 sal_Bool bAutoScroll = mpExtTextView->IsAutoScroll(); 954 mpExtTextView->SetAutoScroll( sal_False ); 955 mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFF, 0xFFFF ) ) ); 956 mpExtTextView->SetAutoScroll( bAutoScroll ); 957 bGotoCursor = sal_False; 958 } 959 mpExtTextView->SetPaintSelection( sal_True ); 960 mpExtTextView->ShowCursor( bGotoCursor ); 961 } | 944 Window::GetFocus(); 945 946 if ( !mbActivePopup ) 947 { 948 sal_Bool bGotoCursor = !mpExtTextView->IsReadOnly(); 949 if ( mbFocusSelectionHide 950 && IsReallyVisible() 951 && !mpExtTextView->IsReadOnly() 952 && ( mbSelectOnTab 953 && ( !mbInMBDown 954 || ( GetSettings().GetStyleSettings().GetSelectionOptions() & SELECTION_OPTION_FOCUS ) ) ) ) 955 { 956 // Alles selektieren, aber nicht scrollen 957 sal_Bool bAutoScroll = mpExtTextView->IsAutoScroll(); 958 mpExtTextView->SetAutoScroll( sal_False ); 959 mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFF, 0xFFFF ) ) ); 960 mpExtTextView->SetAutoScroll( bAutoScroll ); 961 bGotoCursor = sal_False; 962 } 963 mpExtTextView->SetPaintSelection( sal_True ); 964 mpExtTextView->ShowCursor( bGotoCursor ); 965 } |
962} 963 | 966} 967 |
968 |
|
964void TextWindow::LoseFocus() 965{ | 969void TextWindow::LoseFocus() 970{ |
966 Window::LoseFocus(); | 971 Window::LoseFocus(); |
967 | 972 |
968 if ( mbFocusSelectionHide && !mbActivePopup ) 969 mpExtTextView->SetPaintSelection( sal_False ); | 973 if ( mbFocusSelectionHide && !mbActivePopup ) 974 mpExtTextView->SetPaintSelection( sal_False ); |
970} 971 | 975} 976 |
977 |
|
972// virtual 973::css::uno::Reference< ::css::awt::XWindowPeer > 974TextWindow::GetComponentInterface(sal_Bool bCreate) 975{ 976 ::css::uno::Reference< ::css::awt::XWindowPeer > xPeer( 977 Window::GetComponentInterface(false)); 978 if (!xPeer.is() && bCreate) 979 { --- 261 unchanged lines hidden (view full) --- 1241 1242void MultiLineEdit::Resize() 1243{ 1244 pImpSvMEdit->Resize(); 1245} 1246 1247void MultiLineEdit::GetFocus() 1248{ | 978// virtual 979::css::uno::Reference< ::css::awt::XWindowPeer > 980TextWindow::GetComponentInterface(sal_Bool bCreate) 981{ 982 ::css::uno::Reference< ::css::awt::XWindowPeer > xPeer( 983 Window::GetComponentInterface(false)); 984 if (!xPeer.is() && bCreate) 985 { --- 261 unchanged lines hidden (view full) --- 1247 1248void MultiLineEdit::Resize() 1249{ 1250 pImpSvMEdit->Resize(); 1251} 1252 1253void MultiLineEdit::GetFocus() 1254{ |
1249 if ( !pImpSvMEdit ) // might be called from within the dtor, when pImpSvMEdit == NULL is a valid state | 1255 if ( pImpSvMEdit == NULL ) // might be called from within the dtor, when pImpSvMEdit == NULL is a valid state |
1250 return; | 1256 return; |
1251 //Disable the focused event on scroll pane 1252 //Edit::GetFocus(); | 1257 1258 Edit::GetFocus(); 1259 |
1253 pImpSvMEdit->GetFocus(); 1254} 1255 | 1260 pImpSvMEdit->GetFocus(); 1261} 1262 |
1263 |
|
1256void MultiLineEdit::SetSelection( const Selection& rSelection ) 1257{ 1258 pImpSvMEdit->SetSelection( rSelection ); 1259} 1260 1261const Selection& MultiLineEdit::GetSelection() const 1262{ 1263 return pImpSvMEdit->GetSelection(); --- 389 unchanged lines hidden --- | 1264void MultiLineEdit::SetSelection( const Selection& rSelection ) 1265{ 1266 pImpSvMEdit->SetSelection( rSelection ); 1267} 1268 1269const Selection& MultiLineEdit::GetSelection() const 1270{ 1271 return pImpSvMEdit->GetSelection(); --- 389 unchanged lines hidden --- |