[Libreoffice-commits] core.git: 3 commits - include/tools include/vcl tools/source unusedcode.easy vcl/source
Caolán McNamara
caolanm at redhat.com
Sat Aug 10 13:52:05 PDT 2013
include/tools/string.hxx | 4 ++--
include/vcl/button.hxx | 1 -
tools/source/string/strimp.cxx | 16 ----------------
tools/source/string/tustring.cxx | 11 -----------
unusedcode.easy | 1 -
vcl/source/control/button.cxx | 12 ------------
vcl/source/control/combobox.cxx | 8 ++++----
vcl/source/control/morebtn.cxx | 2 --
vcl/source/window/btndlg.cxx | 1 -
9 files changed, 6 insertions(+), 50 deletions(-)
New commits:
commit 9891cb881b68d643bcae6160e2284be4728a3612
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Aug 10 12:30:11 2013 +0100
Related: fdo#38838 remove String::Equals(const sal_Unicode* ...)
Change-Id: I6eeede3261e7b6f5ad81a4d2fa9ecc6c07002dbb
diff --git a/include/tools/string.hxx b/include/tools/string.hxx
index e185480..9de7baa 100644
--- a/include/tools/string.hxx
+++ b/include/tools/string.hxx
@@ -134,6 +134,8 @@ private:
TOOLS_DLLPRIVATE UniString( sal_Unicode c );
TOOLS_DLLPRIVATE UniString& Assign( const sal_Unicode* pCharStr, xub_StrLen nLen );
TOOLS_DLLPRIVATE UniString& Expand( xub_StrLen nCount, sal_Unicode cExpandChar );
+ TOOLS_DLLPRIVATE sal_Bool Equals( const sal_Unicode* pCharStr,
+ xub_StrLen nIndex, xub_StrLen nLen ) const;
public:
UniString();
UniString( const ResId& rResId );
@@ -242,8 +244,6 @@ public:
sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const;
sal_Bool Equals( const UniString& rStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- sal_Bool Equals( const sal_Unicode* pCharStr,
- xub_StrLen nIndex, xub_StrLen nLen ) const;
sal_Bool EqualsAscii( const sal_Char* pAsciiStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
sal_Bool EqualsIgnoreCaseAscii( const UniString& rStr,
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index 3c47dab..6fbb280 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -17,22 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-static sal_Int32 ImplStringCompare( const STRCODE* pStr1, const STRCODE* pStr2,
- xub_StrLen nCount )
-{
- sal_Int32 nRet = 0;
- while ( nCount &&
- ((nRet = ((sal_Int32)((STRCODEU)*pStr1))-((sal_Int32)((STRCODEU)*pStr2))) == 0) &&
- *pStr2 )
- {
- ++pStr1,
- ++pStr2,
- --nCount;
- }
-
- return nRet;
-}
-
static sal_Int32 ImplStringCompareWithoutZero( const STRCODE* pStr1, const STRCODE* pStr2,
sal_Int32 nCount )
{
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index ac4bb4a..4d3d8c7 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -412,17 +412,6 @@ sal_Bool STRING::Equals( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen
return (ImplStringCompareWithoutZero( mpData->maStr+nIndex, rStr.mpData->maStr, nLen ) == 0);
}
-sal_Bool STRING::Equals( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
- // Are there enough codes for comparing?
- if ( nIndex > mpData->mnLen )
- return (*pCharStr == 0);
-
- return (ImplStringCompare( mpData->maStr+nIndex, pCharStr, nLen ) == 0);
-}
-
xub_StrLen STRING::Match( const STRING& rStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
diff --git a/unusedcode.easy b/unusedcode.easy
index 07246c1c..30b8cd9 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -75,7 +75,6 @@ SmFontPickList::Contains(Font const&) const
StatusBar::CopyItems(StatusBar const&)
StatusBar::HideItems()
StatusBar::ShowItems()
-String::Equals(unsigned short const*, unsigned short, unsigned short) const
SvFileStream::GetFileHandle() const
SvdProgressInfo::ReportError()
SvpSalInstance::PostEvent(SalFrame const*, void*, unsigned short)
commit ce6b095ce310c1bd6c9b3120497a3af511186d2b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Aug 10 12:36:04 2013 +0100
Button::GetStandardHelpText returns empty string, its all a noop
Change-Id: I651b19840aabf67b3083cd855c2851ac4c96741e
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index fae8240..4869d1c 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -72,7 +72,6 @@ public:
const Link& GetClickHdl() const { return maClickHdl; }
static OUString GetStandardText( StandardButtonType eButton );
- static XubString GetStandardHelpText( StandardButtonType eButton );
sal_Bool SetModeImage( const Image& rImage );
const Image GetModeImage( ) const;
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 8b89cd6..fb2e982 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -156,14 +156,6 @@ OUString Button::GetStandardText( StandardButtonType eButton )
}
// -----------------------------------------------------------------------
-
-XubString Button::GetStandardHelpText( StandardButtonType /* eButton */ )
-{
- XubString aHelpText;
- return aHelpText;
-}
-
-// -----------------------------------------------------------------------
sal_Bool Button::SetModeImage( const Image& rImage )
{
if ( rImage != mpButtonData->maImage )
@@ -1753,7 +1745,6 @@ void OKButton::ImplInit( Window* pParent, WinBits nStyle )
PushButton::ImplInit( pParent, nStyle );
SetText( Button::GetStandardText( BUTTON_OK ) );
- SetHelpText( Button::GetStandardHelpText( BUTTON_OK ) );
}
// -----------------------------------------------------------------------
@@ -1819,7 +1810,6 @@ void CancelButton::ImplInit( Window* pParent, WinBits nStyle )
PushButton::ImplInit( pParent, nStyle );
SetText( Button::GetStandardText( BUTTON_CANCEL ) );
- SetHelpText( Button::GetStandardHelpText( BUTTON_CANCEL ) );
}
// -----------------------------------------------------------------------
@@ -1882,7 +1872,6 @@ CloseButton::CloseButton( Window* pParent, WinBits nStyle )
: CancelButton(pParent, nStyle)
{
SetText( Button::GetStandardText( BUTTON_CLOSE ) );
- SetHelpText( Button::GetStandardHelpText( BUTTON_CLOSE ) );
}
// =======================================================================
@@ -1892,7 +1881,6 @@ void HelpButton::ImplInit( Window* pParent, WinBits nStyle )
PushButton::ImplInit( pParent, nStyle | WB_NOPOINTERFOCUS );
SetText( Button::GetStandardText( BUTTON_HELP ) );
- SetHelpText( Button::GetStandardHelpText( BUTTON_HELP ) );
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index 82c4193..0e69776 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -45,8 +45,6 @@ void MoreButton::ImplInit( Window* pParent, WinBits nStyle )
mpMBData->maMoreText = Button::GetStandardText( BUTTON_MORE );
mpMBData->maLessText = Button::GetStandardText( BUTTON_LESS );
- SetHelpText( Button::GetStandardHelpText( BUTTON_MORE ) );
-
ShowState();
SetSymbolAlign(SYMBOLALIGN_RIGHT);
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index 02e338f..84694be 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -306,7 +306,6 @@ void ButtonDialog::AddButton( StandardButtonType eType, sal_uInt16 nId,
!((eType == BUTTON_HELP) && (pItem->mpPushButton->GetType() == WINDOW_HELPBUTTON)) )
{
pItem->mpPushButton->SetText( Button::GetStandardText( eType ) );
- pItem->mpPushButton->SetHelpText( Button::GetStandardHelpText( eType ) );
}
if ( nBtnFlags & BUTTONDIALOG_FOCUSBUTTON )
commit 068d43071385a0a08dacdd5232e0778be2154778
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Aug 10 12:34:30 2013 +0100
XubString->OUString
Change-Id: I9a6aef3f5e143ccd6187e3a7f42b041249348870
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index b46213d..805d7a1 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -876,13 +876,13 @@ void ComboBox::ImplUpdateFloatSelection()
mpImplLB->SetCallSelectionChangedHdl( sal_False );
if ( !IsMultiSelectionEnabled() )
{
- XubString aSearchStr( mpSubEdit->GetText() );
- sal_uInt16 nSelect = LISTBOX_ENTRY_NOTFOUND;
- sal_Bool bSelect = sal_True;
+ OUString aSearchStr( mpSubEdit->GetText() );
+ sal_uInt16 nSelect = LISTBOX_ENTRY_NOTFOUND;
+ sal_Bool bSelect = sal_True;
if ( mpImplLB->GetCurrentPos() != LISTBOX_ENTRY_NOTFOUND )
{
- XubString aCurrent = mpImplLB->GetEntryList()->GetEntryText( mpImplLB->GetCurrentPos() );
+ OUString aCurrent = mpImplLB->GetEntryList()->GetEntryText( mpImplLB->GetCurrentPos() );
if ( aCurrent == aSearchStr )
nSelect = mpImplLB->GetCurrentPos();
}
More information about the Libreoffice-commits
mailing list