extensions/source/scanner/sanedlg.cxx | 12 ++++++------ extensions/source/scanner/sanedlg.src | 1 - 2 files changed, 6 insertions(+), 7 deletions(-)
New commits: commit 1fbda7a5eda2c3ef2b0bd779ae81c38d83714503 Author: Caolán McNamara <[email protected]> Date: Wed Jun 11 14:50:04 2014 +0100 Changing scanners has no effect I guess no-one ever tested with multiple scanners but it just happens that my laptops webcam is presented as a (non-functional) scanner alongside the real one (cherry picked from commit ab713ba1ffd00952ef8957f9b524e4e44f382f13) Conflicts: extensions/source/scanner/sanedlg.cxx Change-Id: Ie36651cfc867027ef19e272dbabe46de6c4261ee diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index eb25a21..a39a7ad 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -160,8 +160,8 @@ void SaneDlg::InitDevices() maDeviceBox.InsertEntry( Sane::GetName( i ) ); if( Sane::CountDevices() ) { - mrSane.Open( 0 ); - maDeviceBox.SelectEntry( Sane::GetName( 0 ) ); + mrSane.Open(0); + maDeviceBox.SelectEntryPos(0); } } @@ -490,12 +490,12 @@ IMPL_LINK( SaneDlg, SelectHdl, ListBox*, pListBox ) { if( pListBox == &maDeviceBox && Sane::IsSane() && Sane::CountDevices() ) { - OUString aNewDevice = maDeviceBox.GetSelectEntry(); - int nNumber; - if( aNewDevice == Sane::GetName( nNumber = mrSane.GetDeviceNumber() ) ) + int nNewNumber = maDeviceBox.GetSelectEntryPos(); + int nOldNumber = mrSane.GetDeviceNumber(); + if (nNewNumber != nOldNumber) { mrSane.Close(); - mrSane.Open( nNumber ); + mrSane.Open(nNewNumber); InitFields(); } } diff --git a/extensions/source/scanner/sanedlg.src b/extensions/source/scanner/sanedlg.src index 242d1ea..03ef49d 100644 --- a/extensions/source/scanner/sanedlg.src +++ b/extensions/source/scanner/sanedlg.src @@ -141,7 +141,6 @@ ModalDialog RID_SANE_DIALOG HelpID = "extensions:ListBox:RID_SANE_DIALOG:RID_DEVICE_BOX"; Border = TRUE ; Dropdown = TRUE ; - Sort = TRUE ; Pos = MAP_APPFONT ( SECOND_COLUMN + 70 , 6 ) ; Size = MAP_APPFONT ( 60 , 80 ) ; };
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
