diff options
author | Noel Grandin <noel@peralex.com> | 2013-08-06 15:49:32 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-08-12 11:56:43 +0200 |
commit | ed55bea114561e3fbcbd472964527ccddcb34af2 (patch) | |
tree | 6ff83d91b8ff7880ae36da498b0b53d98a219bc9 /vcl | |
parent | 4c3cfe059057f403de3de8889ddead963e4b6952 (diff) |
convert vcl mnemonicengine.hxx and quickselectionengine.hxx
.. from String to OUString.
These 2 API's are tied together, necessitating their conversion in
one step.
Change-Id: Ibcc05d8d3617253adf49edb4a244542d32b38224
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/ilstbox.hxx | 4 | ||||
-rw-r--r-- | vcl/source/control/combobox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/ilstbox.cxx | 10 | ||||
-rw-r--r-- | vcl/source/control/quickselectionengine.cxx | 12 | ||||
-rw-r--r-- | vcl/source/window/mnemonicengine.cxx | 2 |
5 files changed, 15 insertions, 15 deletions
diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx index 06f8d625e087..3cf1c239c094 100644 --- a/vcl/inc/ilstbox.hxx +++ b/vcl/inc/ilstbox.hxx @@ -385,8 +385,8 @@ public: protected: // ISearchableStringList - virtual ::vcl::StringEntryIdentifier CurrentEntry( String& _out_entryText ) const; - virtual ::vcl::StringEntryIdentifier NextEntry( ::vcl::StringEntryIdentifier _currentEntry, String& _out_entryText ) const; + virtual ::vcl::StringEntryIdentifier CurrentEntry( OUString& _out_entryText ) const; + virtual ::vcl::StringEntryIdentifier NextEntry( ::vcl::StringEntryIdentifier _currentEntry, OUString& _out_entryText ) const; virtual void SelectEntry( ::vcl::StringEntryIdentifier _entry ); }; diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 805d7a1b6236..994229a21c97 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1456,7 +1456,7 @@ void ComboBox::SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect) void ComboBox::SetNoSelection() { mpImplLB->SetNoSelection(); - mpSubEdit->SetText( String() ); + mpSubEdit->SetText( OUString() ); } // ----------------------------------------------------------------------------- Rectangle ComboBox::GetBoundingRectangle( sal_uInt16 nItem ) const diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index f406d285b16c..68c01ea787b0 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -273,7 +273,7 @@ sal_uInt16 ImplEntryList::FindEntry( const OUString& rString, sal_Bool bSearchMR sal_uInt16 nEntries = maEntries.size(); for ( sal_uInt16 n = bSearchMRUArea ? 0 : GetMRUCount(); n < nEntries; n++ ) { - String aComp( vcl::I18nHelper::filterFormattingChars( maEntries[n].maStr ) ); + OUString aComp( vcl::I18nHelper::filterFormattingChars( maEntries[n].maStr ) ); if ( aComp == rString ) return n; } @@ -758,7 +758,7 @@ void ImplListBoxWindow::ImplCallSelect() // Insert the selected entry as MRU, if not already first MRU sal_uInt16 nSelected = GetEntryList()->GetSelectEntryPos( 0 ); sal_uInt16 nMRUCount = GetEntryList()->GetMRUCount(); - String aSelected = GetEntryList()->GetEntryText( nSelected ); + OUString aSelected = GetEntryList()->GetEntryText( nSelected ); sal_uInt16 nFirstMatchingEntryPos = GetEntryList()->FindEntry( aSelected, sal_True ); if ( nFirstMatchingEntryPos || !nMRUCount ) { @@ -1704,7 +1704,7 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) // ----------------------------------------------------------------------- namespace { - static ::vcl::StringEntryIdentifier lcl_getEntry( const ImplEntryList& _rList, sal_uInt16 _nPos, String& _out_entryText ) + static ::vcl::StringEntryIdentifier lcl_getEntry( const ImplEntryList& _rList, sal_uInt16 _nPos, OUString& _out_entryText ) { OSL_PRECOND( ( _nPos != LISTBOX_ENTRY_NOTFOUND ), "lcl_getEntry: invalid position!" ); sal_uInt16 nEntryCount( _rList.GetEntryCount() ); @@ -1725,13 +1725,13 @@ namespace } // ----------------------------------------------------------------------- -::vcl::StringEntryIdentifier ImplListBoxWindow::CurrentEntry( String& _out_entryText ) const +::vcl::StringEntryIdentifier ImplListBoxWindow::CurrentEntry( OUString& _out_entryText ) const { return lcl_getEntry( *GetEntryList(), ( mnCurrentPos == LISTBOX_ENTRY_NOTFOUND ) ? 0 : mnCurrentPos + 1, _out_entryText ); } // ----------------------------------------------------------------------- -::vcl::StringEntryIdentifier ImplListBoxWindow::NextEntry( ::vcl::StringEntryIdentifier _currentEntry, String& _out_entryText ) const +::vcl::StringEntryIdentifier ImplListBoxWindow::NextEntry( ::vcl::StringEntryIdentifier _currentEntry, OUString& _out_entryText ) const { sal_uInt16 nNextPos = lcl_getEntryPos( _currentEntry ) + 1; return lcl_getEntry( *GetEntryList(), nNextPos, _out_entryText ); diff --git a/vcl/source/control/quickselectionengine.cxx b/vcl/source/control/quickselectionengine.cxx index 2f379661dd79..5ee2cfaf2981 100644 --- a/vcl/source/control/quickselectionengine.cxx +++ b/vcl/source/control/quickselectionengine.cxx @@ -32,7 +32,7 @@ namespace vcl struct QuickSelectionEngine_Data { ISearchableStringList& rEntryList; - String sCurrentSearchString; + OUString sCurrentSearchString; ::boost::optional< sal_Unicode > aSingleSearchChar; Timer aSearchTimeout; @@ -58,7 +58,7 @@ namespace vcl { static void lcl_reset( QuickSelectionEngine_Data& _data ) { - _data.sCurrentSearchString.Erase(); + _data.sCurrentSearchString = ""; _data.aSingleSearchChar.reset(); _data.aSearchTimeout.Stop(); } @@ -75,7 +75,7 @@ namespace vcl const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetLocaleI18nHelper(); // TODO: do we really need the Window's settings here? The original code used it ... - String sEntryText; + OUString sEntryText; // get the "current + 1" entry StringEntryIdentifier pSearchEntry = _engineData.rEntryList.CurrentEntry( sEntryText ); if ( pSearchEntry ) @@ -110,14 +110,14 @@ namespace vcl if ( ( c >= 32 ) && ( c != 127 ) && !_keyEvent.GetKeyCode().IsMod2() ) { - m_pData->sCurrentSearchString += c; + m_pData->sCurrentSearchString += OUString(c); OSL_TRACE( "QuickSelectionEngine::HandleKeyEvent: searching for %s", OUStringToOString(m_pData->sCurrentSearchString, RTL_TEXTENCODING_UTF8).getStr() ); - if ( m_pData->sCurrentSearchString.Len() == 1 ) + if ( m_pData->sCurrentSearchString.getLength() == 1 ) { // first character in the search -> remmeber m_pData->aSingleSearchChar.reset( c ); } - else if ( m_pData->sCurrentSearchString.Len() > 1 ) + else if ( m_pData->sCurrentSearchString.getLength() > 1 ) { if ( !!m_pData->aSingleSearchChar && ( *m_pData->aSingleSearchChar != c ) ) // we already have a "single char", but the current one is different -> reset diff --git a/vcl/source/window/mnemonicengine.cxx b/vcl/source/window/mnemonicengine.cxx index 1c834804e7e6..fce1a76df1ff 100644 --- a/vcl/source/window/mnemonicengine.cxx +++ b/vcl/source/window/mnemonicengine.cxx @@ -43,7 +43,7 @@ namespace vcl const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); - String sEntryText; + OUString sEntryText; const void* pSearchEntry = _rEntryList.FirstSearchEntry( sEntryText ); const void* pFirstFoundEntry = NULL; |