From 5819bec966782b844eb2953f6636a84a01212234 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 17 Jun 2012 12:17:35 +0100 Subject: ditch last (?) String::String(const sal_Unicode*) Change-Id: I47ce16581a9923729a7e5e1e5cedaf91e4b215ac --- sd/source/filter/eppt/epptso.cxx | 5 ++--- unusedcode.easy | 1 + vcl/inc/vcl/edit.hxx | 2 +- vcl/inc/vcl/i18nhelp.hxx | 4 ++-- vcl/source/app/i18nhelp.cxx | 6 +++--- vcl/source/control/edit.cxx | 12 ++++++------ vcl/source/control/field2.cxx | 8 ++++---- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 70cf9a420e2b..dcb752f6a9ed 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -1209,9 +1209,8 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u aFile = aUrl.PathToFileName(); else if ( INET_PROT_SMB == aUrl.GetProtocol() ) { - // Convert smb notation to '\\' - aFile = aUrl.GetMainURL( INetURLObject::NO_DECODE ); - aFile = String( aFile.GetBuffer() + 4 ); // skip the 'smb:' part + // Convert smb notation to '\\' and skip the 'smb:' part + aFile = aUrl.GetMainURL(INetURLObject::NO_DECODE).copy(4); aFile.SearchAndReplaceAll( '/', '\\' ); aTarget = aFile; } diff --git a/unusedcode.easy b/unusedcode.easy index 4d6601a7b1c8..da7c66401ce9 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -70,6 +70,7 @@ SrchAttrItemList::Replace(SearchAttrItem const&, unsigned short) SrchAttrItemList::Replace(SearchAttrItem const*, unsigned short, unsigned short) SrchAttrItemList::_ForEach(unsigned short, unsigned short, unsigned char (*)(SearchAttrItem const&, void*), void*) StgCache::Pos2Page(int) +String::String(unsigned short const*) SvLBoxButton::Check(SvLBox*, SvLBoxEntry*, unsigned char) SvPtrarr::Replace(void* const*, unsigned short, unsigned short) SvStringsISortDtor::Insert(String* const*, unsigned short) diff --git a/vcl/inc/vcl/edit.hxx b/vcl/inc/vcl/edit.hxx index 9632f9eca4a5..16c0e2fae9db 100644 --- a/vcl/inc/vcl/edit.hxx +++ b/vcl/inc/vcl/edit.hxx @@ -102,7 +102,7 @@ private: SAL_DLLPRIVATE void ImplInvalidateOrRepaint( xub_StrLen nStart = 0, xub_StrLen nEnd = STRING_LEN ); SAL_DLLPRIVATE void ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uInt8 nMode ); SAL_DLLPRIVATE void ImplSetText( const XubString& rStr, const Selection* pNewSelection = 0 ); - SAL_DLLPRIVATE void ImplInsertText( const XubString& rStr, const Selection* pNewSelection = 0, sal_Bool bIsUserInput = sal_False ); + SAL_DLLPRIVATE void ImplInsertText( const rtl::OUString& rStr, const Selection* pNewSelection = 0, sal_Bool bIsUserInput = sal_False ); SAL_DLLPRIVATE String ImplGetValidString( const String& rString ) const; SAL_DLLPRIVATE void ImplClearBackground( long nXStart, long nXEnd ); SAL_DLLPRIVATE void ImplShowCursor( sal_Bool bOnlyIfVisible = sal_True ); diff --git a/vcl/inc/vcl/i18nhelp.hxx b/vcl/inc/vcl/i18nhelp.hxx index 610f5cffeaeb..0d1afb060054 100644 --- a/vcl/inc/vcl/i18nhelp.hxx +++ b/vcl/inc/vcl/i18nhelp.hxx @@ -79,9 +79,9 @@ public: I18nHelper( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMSF, const ::com::sun::star::lang::Locale& rLocale ); ~I18nHelper(); - sal_Int32 CompareString( const String& rStr1, const String& rStr2 ) const; + sal_Int32 CompareString( const rtl::OUString& rStr1, const rtl::OUString& rStr2 ) const; - sal_Bool MatchString( const String& rStr1, const String& rStr2 ) const; + sal_Bool MatchString( const rtl::OUString& rStr1, const rtl::OUString& rStr2 ) const; sal_Bool MatchMnemonic( const String& rString, sal_Unicode cMnemonicChar ) const; String GetNum( long nNumber, sal_uInt16 nDecimals, sal_Bool bUseThousandSep = sal_True, sal_Bool bTrailingZeros = sal_True ) const; diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx index ea4eb34e8213..7e43afa2f87b 100644 --- a/vcl/source/app/i18nhelp.cxx +++ b/vcl/source/app/i18nhelp.cxx @@ -118,7 +118,7 @@ String vcl::I18nHelper::filterFormattingChars( const String& rStr ) return aBuf.makeStringAndClear(); } -sal_Int32 vcl::I18nHelper::CompareString( const String& rStr1, const String& rStr2 ) const +sal_Int32 vcl::I18nHelper::CompareString( const rtl::OUString& rStr1, const rtl::OUString& rStr2 ) const { ::osl::Guard< ::osl::Mutex > aGuard( ((vcl::I18nHelper*)this)->maMutex ); @@ -137,7 +137,7 @@ sal_Int32 vcl::I18nHelper::CompareString( const String& rStr1, const String& rSt return ImplGetTransliterationWrapper().compareString( aStr1, aStr2 ); } -sal_Bool vcl::I18nHelper::MatchString( const String& rStr1, const String& rStr2 ) const +sal_Bool vcl::I18nHelper::MatchString( const rtl::OUString& rStr1, const rtl::OUString& rStr2 ) const { ::osl::Guard< ::osl::Mutex > aGuard( ((vcl::I18nHelper*)this)->maMutex ); @@ -164,7 +164,7 @@ sal_Bool vcl::I18nHelper::MatchMnemonic( const String& rString, sal_Unicode cMne if ( n != STRING_NOTFOUND ) { String aMatchStr( rString, n+1, STRING_LEN ); // not only one char, because of transliteration... - bEqual = MatchString( cMnemonicChar, aMatchStr ); + bEqual = MatchString( rtl::OUString(cMnemonicChar), aMatchStr ); } return bEqual; } diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index ca56cfdef2d9..a18208c911ed 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -857,7 +857,7 @@ bool Edit::ImplTruncateToMaxLen( rtl::OUString& rStr, sal_uInt32 nSelectionLen ) // ----------------------------------------------------------------------- -void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_Bool bIsUserInput ) +void Edit::ImplInsertText( const rtl::OUString& rStr, const Selection* pNewSel, sal_Bool bIsUserInput ) { Selection aSelection( maSelection ); aSelection.Justify(); @@ -873,9 +873,9 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_ maText.Erase( (xub_StrLen)aSelection.Max(), 1 ); // take care of input-sequence-checking now - if (bIsUserInput && rStr.Len()) + if (bIsUserInput && !rStr.isEmpty()) { - DBG_ASSERT( rStr.Len() == 1, "unexpected string length. User input is expected to providse 1 char only!" ); + DBG_ASSERT( rStr.getLength() == 1, "unexpected string length. User input is expected to providse 1 char only!" ); // determine if input-sequence-checking should be applied or not // @@ -920,7 +920,7 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_ } // uno::Reference < i18n::XBreakIterator > xBI( ImplGetBreakIterator(), UNO_QUERY ); - bIsInputSequenceChecking = rStr.Len() == 1 && + bIsInputSequenceChecking = rStr.getLength() == 1 && bCTLFontEnabled && bCTLSequenceChecking && aSelection.Min() > 0 && /* first char needs not to be checked */ @@ -930,7 +930,7 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_ uno::Reference < i18n::XExtendedInputSequenceChecker > xISC; if (bIsInputSequenceChecking && (xISC = ImplGetInputSequenceChecker()).is()) { - sal_Unicode cChar = rStr.GetChar(0); + sal_Unicode cChar = rStr[0]; xub_StrLen nTmpPos = static_cast< xub_StrLen >( aSelection.Min() ); sal_Int16 nCheckMode = bCTLSequenceCheckingRestricted ? i18n::InputSequenceCheckMode::STRICT : i18n::InputSequenceCheckMode::BASIC; @@ -1826,7 +1826,7 @@ sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) bDone = sal_True; // Auch bei ReadOnly die Zeichen schlucken. if ( !mbReadOnly ) { - ImplInsertText( rKEvt.GetCharCode(), 0, sal_True ); + ImplInsertText(rtl::OUString(rKEvt.GetCharCode()), 0, sal_True); if ( maAutocompleteHdl.IsSet() ) { if ( (maSelection.Min() == maSelection.Max()) && (maSelection.Min() == maText.Len()) ) diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index e625a1f5641c..67b82700dcc2 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -163,10 +163,10 @@ static int ImplIsPatternChar( xub_Unicode cChar, sal_Char cEditMask ) try { - String aCharStr( cChar ); - nType = ImplGetCharClass()->getStringType( aCharStr, 0, aCharStr.Len(), Application::GetSettings().GetLocale() ); + rtl::OUString aCharStr(cChar); + nType = ImplGetCharClass()->getStringType( aCharStr, 0, aCharStr.getLength(), Application::GetSettings().GetLocale() ); } - catch ( ::com::sun::star::uno::Exception& ) + catch (const ::com::sun::star::uno::Exception&) { SAL_WARN( "vcl.control", "ImplIsPatternChar: Exception caught!" ); return sal_False; @@ -213,7 +213,7 @@ static xub_Unicode ImplPatternChar( xub_Unicode cChar, sal_Char cEditMask ) (cEditMask == EDITMASK_UPPERALPHANUM) || ( cEditMask == EDITMASK_UPPERALLCHAR ) ) { - cChar = ImplGetCharClass()->toUpper( String(cChar),0,1,Application::GetSettings().GetLocale() )[0]; + cChar = ImplGetCharClass()->toUpper(rtl::OUString(cChar), 0, 1, Application::GetSettings().GetLocale())[0]; } return cChar; } -- cgit lyFrame'>feature/RotateFlyFrame LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/sot
AgeCommit message (Expand)Author
2017-02-01inline macrosJochen Nitschke
2017-01-31teach lolugin:stringconstant about calling constructorsNoel Grandin
2017-01-26Remove dynamic exception specificationsStephan Bergmann
2017-01-25loplugin: unnecessary destructor sfx2..storeNoel Grandin
2017-01-22cppcheck: useInitializationListJochen Nitschke
2017-01-21coverity#1399018 Logically dead codeCaolán McNamara
2017-01-20this field should be std::unique_ptr to sal_uInt8[], not sal_uInt8Noel Grandin
2017-01-19New loplugin:dynexcspec: Add @throws documentation, sotStephan Bergmann
2017-01-19new loplugin: useuniqueptr: sot..toolsNoel Grandin
2017-01-17manage SvRefBase subclass with tools::SvRefNoel Grandin
2017-01-09defaults are good enoughCaolán McNamara
2017-01-09tdf#101828 handle rtf/richtext correctlyOliver Specht
2016-12-05convert DecodeMechanism to scoped enumNoel Grandin
2016-12-05convert INetURLObject::EncodeMechanism to scoped enumNoel Grandin
2016-11-21loplugin:countusersofdefaultparams in include/sot..svlNoel Grandin
2016-11-18includes should be at the top of the fileNoel Grandin
2016-11-15loplugin:constantparamNoel Grandin
2016-11-13sot: fix loplugin:cppunitassertequals warningsMiklos Vajna
2016-10-27loplugin:expandablemethods in sot..starmathNoel Grandin
2016-10-15clang-cl loplugin: sotStephan Bergmann
2016-10-14loplugin:countusersofdefaultparams in sot..svtoolsNoel Grandin
2016-10-10tdf#89307: Removed SvRef::operator T*()Jacek Fraczek
2016-09-30loplugin:constantparamNoel Grandin
2016-09-15replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)Michael Stahl
2016-09-14loplugin:constantparamNoel Grandin
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
2016-09-09loplugin:constantparam in sot..svlNoel Grandin
2016-08-27put StreamMode masks in scope of enum classJochen Nitschke
2016-08-12loplugin:unusedenumconstants in forms..sotNoel Grandin
2016-08-05loplugin:countusersofdefaultparams in sfx2..svgioNoel Grandin
2016-08-01loplugin:countusersofdefaultparams in shell..starmathNoel Grandin
2016-07-12new loplugin fragiledestructorNoel Grandin
2016-07-08loplugin:redundantcast: redundant static_casts in sotStephan Bergmann
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann