[Libreoffice-commits] core.git: vcl/win

Noel Grandin noel at peralex.com
Mon Jul 29 05:35:23 PDT 2013


 vcl/win/source/window/salframe.cxx |    4 ++--
 vcl/win/source/window/salmenu.cxx  |   12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit b55efb511bb3862736483245b0eabc79b1ec9bed
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jul 29 14:34:13 2013 +0200

    fix windows build
    
    after my XubString->OUString changes
    
    Change-Id: If62db5a82a01d1883dcc2d4e6efea4668930447b

diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 91a34a9..f290c29 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -4678,7 +4678,7 @@ static int ImplMeasureItem( HWND hWnd, WPARAM wParam, LPARAM lParam )
 
         // menu text and accelerator
         String aStr(pSalMenuItem->mText);
-        if( pSalMenuItem->mAccelText.Len() )
+        if( pSalMenuItem->mAccelText.getLength() )
         {
             aStr.AppendAscii(" ");
             aStr.Append( pSalMenuItem->mAccelText );
@@ -4830,7 +4830,7 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam )
             DST_PREFIXTEXT | (fDisabled && !fSelected ? DSS_DISABLED : DSS_NORMAL) ) )
             ImplWriteLastError(GetLastError(), "ImplDrawItem");
 
-        if( pSalMenuItem->mAccelText.Len() )
+        if( pSalMenuItem->mAccelText.getLength() )
         {
             SIZE strSizeA;
             aStr = pSalMenuItem->mAccelText;
diff --git a/vcl/win/source/window/salmenu.cxx b/vcl/win/source/window/salmenu.cxx
index a82af65..8b8a92b 100644
--- a/vcl/win/source/window/salmenu.cxx
+++ b/vcl/win/source/window/salmenu.cxx
@@ -100,7 +100,7 @@ SalMenuItem* WinSalInstance::CreateMenuItem( const SalItemParams* pItemData )
         pSalMenuItem->mnId    = pItemData->nId;
 
         // 'translate' mnemonics
-        pSalMenuItem->mText.SearchAndReplace( '~', '&' );
+        pSalMenuItem->mText = pSalMenuItem->mText.replaceAll( "~", "&" );
 
         pSalMenuItem->mInfo.fMask = MIIM_TYPE | MIIM_STATE | MIIM_ID | MIIM_DATA;
         pSalMenuItem->mInfo.fType = MFT_STRING;
@@ -109,8 +109,8 @@ SalMenuItem* WinSalInstance::CreateMenuItem( const SalItemParams* pItemData )
             pSalMenuItem->mInfo.fType |= MFT_OWNERDRAW;
         pSalMenuItem->mInfo.fState = MFS_ENABLED;
 #endif
-        pSalMenuItem->mInfo.dwTypeData = (LPWSTR) pSalMenuItem->mText.GetBuffer();
-        pSalMenuItem->mInfo.cch = pSalMenuItem->mText.Len();
+        pSalMenuItem->mInfo.dwTypeData = (LPWSTR) pSalMenuItem->mText.getStr();
+        pSalMenuItem->mInfo.cch = pSalMenuItem->mText.getLength();
 
         pSalMenuItem->mInfo.wID = pItemData->nId;
         pSalMenuItem->mInfo.dwItemData = (ULONG_PTR) pSalMenuItem; // user data
@@ -319,7 +319,7 @@ void WinSalMenu::SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const OU
     WinSalMenuItem* pWItem = static_cast<WinSalMenuItem*>(pSalMenuItem);
         pWItem->mText = rText;
         // 'translate' mnemonics
-        pWItem->mText.SearchAndReplace( '~', '&' );
+        pWItem->mText = pWItem->mText.replaceAll( "~", "&" );
         pWItem->mInfo.fMask = MIIM_TYPE | MIIM_DATA;
         pWItem->mInfo.fType = MFT_STRING;
 #ifdef OWNERDRAW
@@ -329,7 +329,7 @@ void WinSalMenu::SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const OU
 
         // combine text and accelerator text
         XubString aStr( pWItem->mText );
-        if( pWItem->mAccelText.Len() )
+        if( pWItem->mAccelText.getLength() )
         {
             aStr.AppendAscii("\t");
             aStr.Append( pWItem->mAccelText );
@@ -358,7 +358,7 @@ void WinSalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const
 #endif
         // combine text and accelerator text
         XubString aStr( pWItem->mText );
-        if( pWItem->mAccelText.Len() )
+        if( pWItem->mAccelText.getLength() )
         {
             aStr.AppendAscii("\t");
             aStr.Append( pWItem->mAccelText );


More information about the Libreoffice-commits mailing list