cui/source/dialogs/hangulhanjadlg.cxx | 6 +++--- cui/source/inc/hangulhanjadlg.hxx | 6 +++--- include/vcl/svapp.hxx | 4 ++-- vcl/inc/ilstbox.hxx | 4 ++-- vcl/inc/svdata.hxx | 2 +- vcl/source/app/svapp.cxx | 8 ++++---- vcl/source/control/ilstbox.cxx | 22 +++++++++++++++------- 7 files changed, 30 insertions(+), 22 deletions(-)
New commits: commit 2384be536466bba9d05f0546336c52c5b66bd9dc Author: Noel Grandin <[email protected]> Date: Wed Jul 24 16:43:46 2013 +0200 convert some XubString to OUString in Application Change-Id: Ieed48339e9fc01796674691d5b0580a36df6e63e diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index c5a6707..886a414 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -232,8 +232,8 @@ public: static Window* GetTopWindow( long nIndex ); static Window* GetActiveTopWindow(); - static void SetAppName( const String& rUniqueName ); - static String GetAppName(); + static void SetAppName( const OUString& rUniqueName ); + static OUString GetAppName(); static bool LoadBrandBitmap (const char* pName, BitmapEx &rBitmap); // default name of the application for message dialogs and printing diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index e056031..a7db1f7 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -116,7 +116,7 @@ struct ImplSVAppData VclEventListeners* mpEventListeners; // listeners for vcl events (eg, extended toolkit) VclEventListeners* mpKeyListeners; // listeners for key events only (eg, extended toolkit) ImplAccelManager* mpAccelMgr; // Accelerator Manager - XubString* mpAppName; // Application name + OUString* mpAppName; // Application name OUString* mpAppFileName; // Abs. Application FileName OUString* mpDisplayName; // Application Display Name String* mpFontPath; // Additional Fontpath diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 8fd30f4..913a95c 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1225,20 +1225,20 @@ Window* Application::GetActiveTopWindow() // ----------------------------------------------------------------------- -void Application::SetAppName( const XubString& rUniqueName ) +void Application::SetAppName( const OUString& rUniqueName ) { ImplSVData* pSVData = ImplGetSVData(); // create if does not exist if ( !pSVData->maAppData.mpAppName ) - pSVData->maAppData.mpAppName = new XubString( rUniqueName ); + pSVData->maAppData.mpAppName = new OUString( rUniqueName ); else *(pSVData->maAppData.mpAppName) = rUniqueName; } // ----------------------------------------------------------------------- -XubString Application::GetAppName() +OUString Application::GetAppName() { ImplSVData* pSVData = ImplGetSVData(); if ( pSVData->maAppData.mpAppName ) @@ -1270,7 +1270,7 @@ OUString Application::GetDisplayName() else if ( pSVData->maWinData.mpAppWin ) return pSVData->maWinData.mpAppWin->GetText(); else - return ImplGetSVEmptyStr(); + return OUString(""); } // ----------------------------------------------------------------------- commit d7cd7e89e36fc371b6a81d9065b3fa0b65eb822f Author: Noel Grandin <[email protected]> Date: Wed Jul 24 15:39:49 2013 +0200 convert vcl/ilistbox from XubString to OUString Change-Id: Icfaea26c7bb82f449fc796dea80d12ffdf640a14 diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx index 89e2db0..06f8d62 100644 --- a/vcl/inc/ilstbox.hxx +++ b/vcl/inc/ilstbox.hxx @@ -129,8 +129,8 @@ public: ImplEntryType* GetMutableEntryPtr( sal_uInt16 nPos ) const { return GetEntry( nPos ); } void Clear(); - sal_uInt16 FindMatchingEntry( const XubString& rStr, sal_uInt16 nStart = 0, sal_Bool bForward = sal_True, sal_Bool bLazy = sal_True ) const; - sal_uInt16 FindEntry( const XubString& rStr, sal_Bool bSearchMRUArea = sal_False ) const; + sal_uInt16 FindMatchingEntry( const OUString& rStr, sal_uInt16 nStart = 0, sal_Bool bForward = sal_True, sal_Bool bLazy = sal_True ) const; + sal_uInt16 FindEntry( const OUString& rStr, sal_Bool bSearchMRUArea = sal_False ) const; sal_uInt16 FindEntry( const void* pData ) const; /// helper: add up heights up to index nEndIndex. diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index ac76319..f406d28 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -175,7 +175,7 @@ sal_uInt16 ImplEntryList::InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry { const comphelper::string::NaturalStringSorter &rSorter = theSorter::get(); - const XubString& rStr = pNewEntry->maStr; + const OUString& rStr = pNewEntry->maStr; sal_uLong nLow, nHigh, nMid; nHigh = maEntries.size(); @@ -268,7 +268,7 @@ void ImplEntryList::RemoveEntry( sal_uInt16 nPos ) // ----------------------------------------------------------------------- -sal_uInt16 ImplEntryList::FindEntry( const XubString& rString, sal_Bool bSearchMRUArea ) const +sal_uInt16 ImplEntryList::FindEntry( const OUString& rString, sal_Bool bSearchMRUArea ) const { sal_uInt16 nEntries = maEntries.size(); for ( sal_uInt16 n = bSearchMRUArea ? 0 : GetMRUCount(); n < nEntries; n++ ) @@ -282,7 +282,7 @@ sal_uInt16 ImplEntryList::FindEntry( const XubString& rString, sal_Bool bSearchM // ----------------------------------------------------------------------- -sal_uInt16 ImplEntryList::FindMatchingEntry( const XubString& rStr, sal_uInt16 nStart, sal_Bool bForward, sal_Bool bLazy ) const +sal_uInt16 ImplEntryList::FindMatchingEntry( const OUString& rStr, sal_uInt16 nStart, sal_Bool bForward, sal_Bool bLazy ) const { sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND; sal_uInt16 nEntryCount = GetEntryCount(); @@ -296,7 +296,15 @@ sal_uInt16 ImplEntryList::FindMatchingEntry( const XubString& rStr, sal_uInt16 n n--; ImplEntryType* pImplEntry = GetEntry( n ); - bool bMatch = bLazy ? rI18nHelper.MatchString( rStr, pImplEntry->maStr ) != 0 : ( rStr.Match( pImplEntry->maStr ) == STRING_MATCH ); + bool bMatch; + if ( bLazy ) + { + bMatch = rI18nHelper.MatchString( rStr, pImplEntry->maStr ) != 0; + } + else + { + bMatch = rStr.isEmpty() || (rStr == pImplEntry->maStr ); + } if ( bMatch ) { nPos = n; @@ -1878,8 +1886,8 @@ void ImplListBoxWindow::DrawEntry( sal_uInt16 nPos, sal_Bool bDrawImage, sal_Boo { MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL; OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL; - XubString aStr( mpEntryList->GetEntryText( nPos ) ); - if ( aStr.Len() ) + OUString aStr( mpEntryList->GetEntryText( nPos ) ); + if ( !aStr.isEmpty() ) { long nMaxWidth = std::max( static_cast< long >( mnMaxWidth ), GetOutputSizePixel().Width() - 2*mnBorder ); @@ -2687,7 +2695,7 @@ void ImplListBox::SetMRUEntries( const OUString& rEntries, sal_Unicode cSep ) sal_Int32 nIndex = 0; do { - XubString aEntry = rEntries.getToken( 0, cSep, nIndex ); + OUString aEntry = rEntries.getToken( 0, cSep, nIndex ); // Accept only existing entries if ( GetEntryList()->FindEntry( aEntry ) != LISTBOX_ENTRY_NOTFOUND ) { commit d5af396843816b244b47c746d42f3a99afa1af01 Author: Noel Grandin <[email protected]> Date: Wed Jul 24 15:00:55 2013 +0200 convert XubString to OUString Change-Id: I55e676ea50c661aca0e0b33b6a32d513f9e6b0ac diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 8ef8340..5f46b8e 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -464,7 +464,7 @@ namespace svx m_aListBox.Clear(); m_aValueSet.Clear(); } - void SuggestionDisplay::InsertEntry( const XubString& rStr ) + void SuggestionDisplay::InsertEntry( const OUString& rStr ) { sal_uInt16 nItemId = m_aListBox.InsertEntry( rStr ) + 1; //itemid == pos+1 (id 0 has special meaning) m_aValueSet.InsertItem( nItemId ); @@ -480,11 +480,11 @@ namespace svx { return m_aListBox.GetEntryCount(); } - XubString SuggestionDisplay::GetEntry( sal_uInt16 nPos ) const + OUString SuggestionDisplay::GetEntry( sal_uInt16 nPos ) const { return m_aListBox.GetEntry( nPos ); } - XubString SuggestionDisplay::GetSelectEntry() const + OUString SuggestionDisplay::GetSelectEntry() const { return m_aListBox.GetSelectEntry(); } diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx index 48284bc..e469f22 100644 --- a/cui/source/inc/hangulhanjadlg.hxx +++ b/cui/source/inc/hangulhanjadlg.hxx @@ -66,13 +66,13 @@ namespace svx void SetSelectHdl( const Link& rLink ); void Clear(); - void InsertEntry( const XubString& rStr ); + void InsertEntry( const OUString& rStr ); void SelectEntryPos( sal_uInt16 nPos ); sal_uInt16 GetEntryCount() const; - XubString GetEntry( sal_uInt16 nPos ) const; - XubString GetSelectEntry() const; + OUString GetEntry( sal_uInt16 nPos ) const; + OUString GetSelectEntry() const; virtual void StateChanged( StateChangedType nStateChange ); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
