summaryrefslogtreecommitdiff
path: root/svtools/source/edit
diff options
context:
space:
mode:
authorAndrew Higginson <at.higginsonAtgmail.com>2012-04-10 12:43:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-04-10 12:49:49 +0100
commit8a3aae9b694deb2b41157509e84815a5b7fb7655 (patch)
tree330c03bb0b312ac25f3ac7174261eedc9f6a642c /svtools/source/edit
parent65cf853589958a51a3a30f6e03dc578c01c320bc (diff)
Resolves: fdo#31022 about dialog is suboptimal
Diffstat (limited to 'svtools/source/edit')
-rw-r--r--svtools/source/edit/svmedit.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/svtools/source/edit/svmedit.cxx b/svtools/source/edit/svmedit.cxx
index 69de5c617789..76544e6e17c3 100644
--- a/svtools/source/edit/svmedit.cxx
+++ b/svtools/source/edit/svmedit.cxx
@@ -69,6 +69,7 @@ private:
sal_Bool mbIgnoreTab;
sal_Bool mbActivePopup;
sal_Bool mbSelectOnTab;
+ sal_Bool mbTextSelectable;
public:
TextWindow( Window* pParent );
@@ -96,7 +97,9 @@ public:
sal_Bool IsIgnoreTab() const { return mbIgnoreTab; }
void SetIgnoreTab( sal_Bool bIgnore ) { mbIgnoreTab = bIgnore; }
- void DisableSelectionOnFocus() {mbSelectOnTab = sal_False;}
+ void DisableSelectionOnFocus() { mbSelectOnTab = sal_False; }
+
+ void SetTextSelectable( sal_Bool bTextSelectable ) { mbTextSelectable = bTextSelectable; }
virtual
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
@@ -737,6 +740,7 @@ TextWindow::TextWindow( Window* pParent ) : Window( pParent )
mbIgnoreTab = sal_False;
mbActivePopup = sal_False;
mbSelectOnTab = sal_True;
+ mbTextSelectable = sal_True;
SetPointer( Pointer( POINTER_TEXT ) );
@@ -769,6 +773,9 @@ void TextWindow::MouseMove( const MouseEvent& rMEvt )
void TextWindow::MouseButtonDown( const MouseEvent& rMEvt )
{
+ if ( !mbTextSelectable )
+ return;
+
mbInMBDown = sal_True; // Dann im GetFocus nicht alles selektieren wird
mpExtTextView->MouseButtonDown( rMEvt );
Window::MouseButtonDown( rMEvt );
@@ -1002,6 +1009,7 @@ MultiLineEdit::MultiLineEdit( Window* pParent, const ResId& rResId )
// MultiLineEdit's version while in the base Edit ctor:
if ((GetStyle() & WB_HIDE) == 0)
Show();
+
}
MultiLineEdit::~MultiLineEdit()
@@ -1604,4 +1612,9 @@ void MultiLineEdit::DisableSelectionOnFocus()
pImpSvMEdit->GetTextWindow()->DisableSelectionOnFocus();
}
+void MultiLineEdit::SetTextSelectable( sal_Bool bTextSelectable )
+{
+ pImpSvMEdit->GetTextWindow()->SetTextSelectable( bTextSelectable );
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */