summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-08-06 15:49:32 +0200
committerNoel Grandin <noel@peralex.com>2013-08-12 11:56:43 +0200
commited55bea114561e3fbcbd472964527ccddcb34af2 (patch)
tree6ff83d91b8ff7880ae36da498b0b53d98a219bc9
parent4c3cfe059057f403de3de8889ddead963e4b6952 (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
-rw-r--r--include/svtools/treelistbox.hxx8
-rw-r--r--include/vcl/mnemonicengine.hxx6
-rw-r--r--include/vcl/quickselectionengine.hxx4
-rw-r--r--svtools/source/contnr/treelistbox.cxx8
-rw-r--r--vcl/inc/ilstbox.hxx4
-rw-r--r--vcl/source/control/combobox.cxx2
-rw-r--r--vcl/source/control/ilstbox.cxx10
-rw-r--r--vcl/source/control/quickselectionengine.cxx12
-rw-r--r--vcl/source/window/mnemonicengine.cxx2
9 files changed, 28 insertions, 28 deletions
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 662788865d06..cc9a27ba898f 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -326,14 +326,14 @@ protected:
void OnCurrentEntryChanged();
// IMnemonicEntryList
- virtual const void* FirstSearchEntry( String& _rEntryText ) const;
- virtual const void* NextSearchEntry( const void* _pCurrentSearchEntry, String& _rEntryText ) const;
+ virtual const void* FirstSearchEntry( OUString& _rEntryText ) const;
+ virtual const void* NextSearchEntry( const void* _pCurrentSearchEntry, OUString& _rEntryText ) const;
virtual void SelectSearchEntry( const void* _pEntry );
virtual void ExecuteSearchEntry( const void* _pEntry ) const;
// 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 );
public:
diff --git a/include/vcl/mnemonicengine.hxx b/include/vcl/mnemonicengine.hxx
index e1def2d8d98e..e72fe276db86 100644
--- a/include/vcl/mnemonicengine.hxx
+++ b/include/vcl/mnemonicengine.hxx
@@ -24,10 +24,10 @@
#include <sal/config.h>
#include <sal/types.h>
+#include <rtl/ustring.hxx>
#include <memory>
-class String;
class KeyEvent;
//........................................................................
@@ -51,7 +51,7 @@ namespace vcl
If this value is <NULL/>, searching stops.
*/
- virtual const void* FirstSearchEntry( String& _rEntryText ) const = 0;
+ virtual const void* FirstSearchEntry( OUString& _rEntryText ) const = 0;
/** returns the next list entry for the mnemonic search
@@ -66,7 +66,7 @@ namespace vcl
to <member>FirstSearchEntry</member> (i.e. you cycled
around), then searching stops, too.
*/
- virtual const void* NextSearchEntry( const void* _pCurrentSearchEntry, String& _rEntryText ) const = 0;
+ virtual const void* NextSearchEntry( const void* _pCurrentSearchEntry, OUString& _rEntryText ) const = 0;
/** "selects" a given entry.
diff --git a/include/vcl/quickselectionengine.hxx b/include/vcl/quickselectionengine.hxx
index 631f0c40aa95..3bfa7a9e34d4 100644
--- a/include/vcl/quickselectionengine.hxx
+++ b/include/vcl/quickselectionengine.hxx
@@ -46,14 +46,14 @@ namespace vcl
Search operations will start with this entry.
*/
- virtual StringEntryIdentifier CurrentEntry( String& _out_entryText ) const = 0;
+ virtual StringEntryIdentifier CurrentEntry( OUString& _out_entryText ) const = 0;
/** returns the next entry in the list.
The implementation is expected to wrap around. That is, if the given entry denotes the last
entry in the list, then NextEntry should return the first entry.
*/
- virtual StringEntryIdentifier NextEntry( StringEntryIdentifier _currentEntry, String& _out_entryText ) const = 0;
+ virtual StringEntryIdentifier NextEntry( StringEntryIdentifier _currentEntry, OUString& _out_entryText ) const = 0;
/** selects a given entry
*/
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 3991cc93be78..779837941fa0 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -1117,7 +1117,7 @@ SvTreeListEntry* SvTreeListBox::CreateEntry() const
return new SvTreeListEntry;
}
-const void* SvTreeListBox::FirstSearchEntry( String& _rEntryText ) const
+const void* SvTreeListBox::FirstSearchEntry( OUString& _rEntryText ) const
{
SvTreeListEntry* pEntry = GetCurEntry();
if ( pEntry )
@@ -1135,7 +1135,7 @@ const void* SvTreeListBox::FirstSearchEntry( String& _rEntryText ) const
return pEntry;
}
-const void* SvTreeListBox::NextSearchEntry( const void* _pCurrentSearchEntry, String& _rEntryText ) const
+const void* SvTreeListBox::NextSearchEntry( const void* _pCurrentSearchEntry, OUString& _rEntryText ) const
{
SvTreeListEntry* pEntry = const_cast< SvTreeListEntry* >( static_cast< const SvTreeListEntry* >( _pCurrentSearchEntry ) );
@@ -1178,7 +1178,7 @@ void SvTreeListBox::ExecuteSearchEntry( const void* /*_pEntry*/ ) const
// nothing to do here, we have no "execution"
}
-::vcl::StringEntryIdentifier SvTreeListBox::CurrentEntry( String& _out_entryText ) const
+::vcl::StringEntryIdentifier SvTreeListBox::CurrentEntry( OUString& _out_entryText ) const
{
// always accept the current entry if there is one
SvTreeListEntry* pCurrentEntry( GetCurEntry() );
@@ -1190,7 +1190,7 @@ void SvTreeListBox::ExecuteSearchEntry( const void* /*_pEntry*/ ) const
return FirstSearchEntry( _out_entryText );
}
-::vcl::StringEntryIdentifier SvTreeListBox::NextEntry( ::vcl::StringEntryIdentifier _currentEntry, String& _out_entryText ) const
+::vcl::StringEntryIdentifier SvTreeListBox::NextEntry( ::vcl::StringEntryIdentifier _currentEntry, OUString& _out_entryText ) const
{
return NextSearchEntry( _currentEntry, _out_entryText );
}
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;