[Libreoffice-commits] .: cui/source sfx2/source sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Jan 21 12:50:49 PST 2013


 cui/source/dialogs/SpellDialog.cxx |    2 +-
 sfx2/source/dialog/dinfdlg.cxx     |    3 ++-
 sw/source/ui/docvw/SidebarWin.cxx  |    3 +--
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit f55deeb525dd22194d4438f8b791bc344a77521e
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jan 21 21:40:52 2013 +0100

    fix previous string conversion:
    
    - unconverted assertion in dinfdlg.cxx
    - wrong replaceAt in SidebarWin.cxx
    - obsolete cast in SpellDialog.cxx
    
    Change-Id: I18450c0c6fdd275b7f81a7fce58cdf98bb806e27

diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 135e9c0c..135f33d 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1491,7 +1491,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
                     sal_Int32 nStart = pErrorAttr->GetStart();
                     sal_Int32 nEnd = pErrorAttr->GetEnd();
                     pTextEngine->RemoveAttrib( 0, *pErrorAttr );
-                    nStart = nStart - (sal_uInt16)nAddedChars;
+                    nStart = nStart - nAddedChars;
                     SetAttrib( *pNewError, 0, nStart - nAddedChars, nEnd );
                     //only if the error is active the mark is moved here
                     if(bIsErrorActive)
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index bef196a..c765515 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1340,7 +1340,8 @@ sal_Bool SfxInternetPage::FillItemSet( SfxItemSet& rSet )
             nDelay = static_cast<sal_uIntPtr>(m_pNFReload->GetValue());
             break;
         case S_Forward:
-            DBG_ASSERT( m_pEDForwardURL->GetText().Len(), "+SfxInternetPage::FillItemSet(): empty URL should be not possible for forward option!" );
+            SAL_WARN_IF(m_pEDForwardURL->GetText().isEmpty(), "sfx2",
+                "+SfxInternetPage::FillItemSet(): empty URL should be not possible for forward option!");
 
             bEnableReload = sal_True;
             SAL_WNODEPRECATED_DECLARATIONS_PUSH
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index 4ee633b..0d128ee 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -384,8 +384,7 @@ void SwSidebarWin::CheckMetaText()
     }
     else if (sMeta.getLength() > 22)
     {
-        sMeta.replaceAt(20, sMeta.getLength()-20, "");
-        sMeta = sMeta + OUString("...");
+        sMeta = sMeta.copy(0, 20) + OUString("...");
     }
     if ( mpMetadataAuthor->GetText() != sMeta )
     {


More information about the Libreoffice-commits mailing list