diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-19 19:21:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-20 12:03:50 +0100 |
commit | 35373db02976efff7f640b477d07825e96c6b5a4 (patch) | |
tree | f0e46664d32ab9b2ba09c8b46a14b2fd6fde67dd | |
parent | 6dd844917205a051c880ff7609c28e09698770c8 (diff) |
Related: fdo#38838 remove String::Assign(const sal_Unicode*)
Change-Id: I0dfa34732acfd20e71fa3876466552338332610b
-rw-r--r-- | include/tools/string.hxx | 2 | ||||
-rw-r--r-- | tools/source/string/tustring.cxx | 30 | ||||
-rw-r--r-- | unusedcode.easy | 1 |
3 files changed, 1 insertions, 32 deletions
diff --git a/include/tools/string.hxx b/include/tools/string.hxx index d2e5088c9f92..2203a7da2f3d 100644 --- a/include/tools/string.hxx +++ b/include/tools/string.hxx @@ -135,6 +135,7 @@ private: TOOLS_DLLPRIVATE UniString( const sal_Unicode* pCharStr ); TOOLS_DLLPRIVATE UniString( const sal_Unicode* pCharStr, xub_StrLen nLen ); TOOLS_DLLPRIVATE UniString( sal_Unicode c ); + TOOLS_DLLPRIVATE UniString& Assign( const sal_Unicode* pCharStr ); TOOLS_DLLPRIVATE UniString& Assign( const sal_Unicode* pCharStr, xub_StrLen nLen ); TOOLS_DLLPRIVATE UniString& Append( const sal_Unicode* pCharStr ); TOOLS_DLLPRIVATE UniString& Append( const sal_Unicode* pCharStr, xub_StrLen nLen ); @@ -181,7 +182,6 @@ public: UniString& Assign( const UniString& rStr ); UniString& Assign( const OUString& rStr ); - UniString& Assign( const sal_Unicode* pCharStr ); UniString& Assign( sal_Unicode c ); inline UniString & Assign(char c) // ...but allow "Assign('a')" { return Assign(static_cast< sal_Unicode >(c)); } diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx index 59b80d7016cb..6fd2689fdd3d 100644 --- a/tools/source/string/tustring.cxx +++ b/tools/source/string/tustring.cxx @@ -221,36 +221,6 @@ STRING& STRING::Assign( STRCODE c ) return *this; } -STRING& STRING::Assign( const STRCODE* pCharStr ) -{ - DBG_CHKTHIS( STRING, DBGCHECKSTRING ); - DBG_ASSERT( pCharStr, "String::Assign() - pCharStr is NULL" ); - - xub_StrLen nLen = ImplStringLen( pCharStr ); - - if ( !nLen ) - { - STRING_NEW((STRING_TYPE **)&mpData); - } - else - { - // copy without allocation if string length is identical - if ( (nLen == mpData->mnLen) && (mpData->mnRefCount == 1) ) - memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); - else - { - // free old string - STRING_RELEASE((STRING_TYPE *)mpData); - - // allocate string of new size and copy - mpData = ImplAllocData( nLen ); - memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); - } - } - - return *this; -} - xub_StrLen ImplStringLen( const sal_Char* pStr ) { const sal_Char* pTempStr = pStr; diff --git a/unusedcode.easy b/unusedcode.easy index f96a77885f4a..7e76aceb7a6f 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -63,7 +63,6 @@ SfxGrabBagItem::SetGrabBag(std::__debug::map<rtl::OUString, com::sun::star::uno: SfxTemplatePanelControl::SetParagraphFamily() SmFontPickList::Contains(Font const&) const SmParser::Insert(rtl::OUString const&, int) -String::Assign(unsigned short const*) String::Insert(String const&, unsigned short, unsigned short, unsigned short) String::String(char) SvdProgressInfo::ReportError() |