tdf#108012 - Clicking in the font field should select the contents
Change-Id: I1276976e031b419ca5cc3cc8e848f2af58ce4cfb Reviewed-on: https://gerrit.libreoffice.org/56865 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
This commit is contained in:
parent
9f01dca60e
commit
11b60b1673
5 changed files with 21 additions and 3 deletions
|
@ -90,7 +90,7 @@ public:
|
|||
virtual void RemoveEntryAt(sal_Int32 nPos);
|
||||
|
||||
void Clear();
|
||||
|
||||
void EnableSelectAll();
|
||||
sal_Int32 GetEntryPos( const OUString& rStr ) const;
|
||||
sal_Int32 GetEntryPos( const void* pData ) const;
|
||||
Image GetEntryImage( sal_Int32 nPos ) const;
|
||||
|
|
|
@ -88,6 +88,7 @@ private:
|
|||
sal_Int32 mnMaxWidthChars;
|
||||
sal_Unicode mcEchoChar;
|
||||
bool mbModified:1,
|
||||
mbSelectAllSingleClick:1,
|
||||
mbInternModified:1,
|
||||
mbReadOnly:1,
|
||||
mbInsertMode:1,
|
||||
|
@ -201,6 +202,9 @@ public:
|
|||
virtual void SetReadOnly( bool bReadOnly = true );
|
||||
virtual bool IsReadOnly() const { return mbReadOnly; }
|
||||
|
||||
void SetSelectAllSingleClick( bool bSelectAllSingleClick );
|
||||
bool IsSelectAllSingleClick() const { return mbSelectAllSingleClick; }
|
||||
|
||||
void SetInsertMode( bool bInsert );
|
||||
bool IsInsertMode() const;
|
||||
|
||||
|
|
|
@ -669,6 +669,7 @@ void LineListBox::DataChanged( const DataChangedEvent& rDCEvt )
|
|||
FontNameBox::FontNameBox( vcl::Window* pParent, WinBits nWinStyle ) :
|
||||
ComboBox( pParent, nWinStyle )
|
||||
{
|
||||
EnableSelectAll();
|
||||
mbWYSIWYG = false;
|
||||
InitFontMRUEntriesFile();
|
||||
}
|
||||
|
|
|
@ -507,7 +507,10 @@ void ComboBox::EnableAutoSize( bool bAuto )
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ComboBox::EnableSelectAll()
|
||||
{
|
||||
m_pImpl->m_pSubEdit->SetSelectAllSingleClick(true);
|
||||
}
|
||||
void ComboBox::EnableDDAutoWidth( bool b )
|
||||
{
|
||||
if (m_pImpl->m_pFloatWin)
|
||||
|
|
|
@ -272,6 +272,7 @@ void Edit::ImplInitEditData()
|
|||
mbModified = false;
|
||||
mbInternModified = false;
|
||||
mbReadOnly = false;
|
||||
mbSelectAllSingleClick = false;
|
||||
mbInsertMode = true;
|
||||
mbClickedInSelection = false;
|
||||
mbActivePopup = false;
|
||||
|
@ -1318,7 +1319,7 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt )
|
|||
if ( rMEvt.GetClicks() < 4 )
|
||||
{
|
||||
mbClickedInSelection = false;
|
||||
if ( rMEvt.GetClicks() == 3 )
|
||||
if ( rMEvt.GetClicks() == 3 || mbSelectAllSingleClick )
|
||||
{
|
||||
ImplSetSelection( Selection( 0, EDIT_NOLIMIT) );
|
||||
ImplCopyToSelectionClipboard();
|
||||
|
@ -2413,6 +2414,15 @@ void Edit::SetReadOnly( bool bReadOnly )
|
|||
}
|
||||
}
|
||||
|
||||
void Edit::SetSelectAllSingleClick( bool bSelectAllSingleClick )
|
||||
{
|
||||
if ( mbSelectAllSingleClick != bSelectAllSingleClick )
|
||||
{
|
||||
mbSelectAllSingleClick = bSelectAllSingleClick;
|
||||
if ( mpSubEdit )
|
||||
mpSubEdit->SetSelectAllSingleClick( bSelectAllSingleClick );
|
||||
}
|
||||
}
|
||||
void Edit::SetInsertMode( bool bInsert )
|
||||
{
|
||||
if ( bInsert != mbInsertMode )
|
||||
|
|
Loading…
Reference in a new issue