basic/source/classes/image.cxx | 7 +-- basic/source/sbx/sbxexec.cxx | 2 - connectivity/source/drivers/flat/ETable.cxx | 4 +- cui/source/dialogs/scriptdlg.cxx | 2 - dbaccess/source/ui/browser/unodatbr.cxx | 6 +-- dbaccess/source/ui/dlg/DbAdminImpl.cxx | 2 - dbaccess/source/ui/dlg/dbfindex.cxx | 7 +-- dbaccess/source/ui/dlg/paramdialog.cxx | 2 - dbaccess/source/ui/dlg/queryfilter.cxx | 2 - editeng/inc/editeng/unotext.hxx | 2 - formula/source/core/api/token.cxx | 4 +- sc/inc/cellsuno.hxx | 8 +--- sc/source/core/data/global.cxx | 4 +- sc/source/core/tool/address.cxx | 4 +- sc/source/core/tool/cellkeytranslator.cxx | 2 - sc/source/core/tool/compiler.cxx | 8 ++-- sc/source/core/tool/interpr4.cxx | 2 - sc/source/core/tool/token.cxx | 12 +++--- sc/source/filter/dif/difimp.cxx | 22 +++++------ sc/source/filter/excel/xecontent.cxx | 2 - sc/source/filter/inc/worksheethelper.hxx | 3 - sc/source/filter/oox/worksheethelper.cxx | 5 -- sc/source/ui/docshell/impex.cxx | 23 ++++------- sfx2/source/appl/sfxpicklist.cxx | 2 - sfx2/source/doc/docfac.cxx | 2 - sfx2/source/doc/oleprops.cxx | 2 - svtools/source/dialogs/insdlg.cxx | 2 - svtools/source/edit/svmedit.cxx | 12 +++--- svtools/source/filter/wmf/enhwmf.cxx | 2 - svx/inc/svx/fntctrl.hxx | 1 svx/source/dialog/fntctrl.cxx | 24 ++---------- svx/source/form/fmsrcimp.cxx | 2 - sw/source/filter/ascii/parasc.cxx | 8 ++-- sw/source/filter/xml/xmlimpit.cxx | 2 - sw/source/ui/docvw/extedit.cxx | 2 - toolkit/source/awt/vclxwindows.cxx | 8 ++-- unotools/source/config/fontcfg.cxx | 14 +++---- unotools/source/misc/fontdefs.cxx | 2 - unusedcode.easy | 13 ++++-- vcl/inc/vcl/font.hxx | 2 - vcl/source/gdi/font.cxx | 2 - vcl/source/gdi/gdimtf.cxx | 4 +- vcl/source/gdi/pdfwriter_impl.cxx | 2 - vcl/source/helper/strhelper.cxx | 6 +-- vcl/unx/generic/app/i18n_status.cxx | 2 - writerfilter/source/doctok/WW8ResourceModelImpl.cxx | 40 -------------------- xmloff/source/style/xmlnumfi.cxx | 3 - 47 files changed, 110 insertions(+), 184 deletions(-)
New commits: commit e80b5f0a88db0acda3cfe6abc221ee4b3b264e90 Author: Caolán McNamara <[email protected]> Date: Wed Jun 13 09:38:33 2012 +0100 error C2227: left of ´->acquire´ must point to class/struct/union type Change-Id: I6c6e395a87cc25f2ec2f01e6508be8a1214f4d02 diff --git a/editeng/inc/editeng/unotext.hxx b/editeng/inc/editeng/unotext.hxx index 162a73a..2bc6e89 100644 --- a/editeng/inc/editeng/unotext.hxx +++ b/editeng/inc/editeng/unotext.hxx @@ -271,7 +271,7 @@ class EDITENG_DLLPUBLIC SvxUnoTextRangeBase : public SvxUnoTextRangeBase_Base, private osl::DebugBase<SvxUnoTextRangeBase> { friend class SvxUnoTextRangeEnumeration; - friend class accessibility::AccessibleEditableTextPara; + friend class ::accessibility::AccessibleEditableTextPara; protected: SvxEditSource* mpEditSource; diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx index dce437d..a035aae 100644 --- a/sc/inc/cellsuno.hxx +++ b/sc/inc/cellsuno.hxx @@ -32,8 +32,9 @@ #include "global.hxx" // ScRange, ScAddress #include "rangelst.hxx" // ScRangeList -#include "formula/grammar.hxx" -#include "rtl/ref.hxx" +#include <editeng/unotext.hxx> +#include <formula/grammar.hxx> +#include <rtl/ref.hxx> #include <tools/link.hxx> #include <svl/lstner.hxx> #include <svl/listener.hxx> @@ -100,9 +101,7 @@ #include <cppuhelper/implbase3.hxx> #include <boost/ptr_container/ptr_vector.hpp> -#ifndef __SGI_STL_VECTOR #include <vector> -#endif class ScDocShell; class ScMarkData; @@ -110,7 +109,6 @@ class ScMemChart; class ScPrintRangeSaver; class ScAttrRectIterator; class ScCellRangeObj; -class SvxUnoText; class ScLinkListener; class ScPatternAttr; class SvxBoxItem; commit f86919e4815dc717663dada67c9ff530b8903fdf Author: Caolán McNamara <[email protected]> Date: Tue Jun 12 22:08:26 2012 +0100 callcatcher: update unused code list Change-Id: I76860ac9a823cde1c9e87e08da7bb6884840f826 diff --git a/sc/source/filter/inc/worksheethelper.hxx b/sc/source/filter/inc/worksheethelper.hxx index 3a2de85..3c994c9 100644 --- a/sc/source/filter/inc/worksheethelper.hxx +++ b/sc/source/filter/inc/worksheethelper.hxx @@ -216,9 +216,6 @@ public: /** Returns the XCellRange interface for the passed cell range address. */ ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > getCellRange( const ::com::sun::star::table::CellRangeAddress& rRange ) const; - /** Returns the XSheetCellRanges interface for the passed cell range addresses. */ - ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > - getCellRangeList( const ApiCellRangeList& rRanges ) const; /** Returns the XDrawPage interface of the draw page of the current sheet. */ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 8563048..cfd9695 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -1392,11 +1392,6 @@ Reference< XCellRange > WorksheetHelper::getCellRange( const CellRangeAddress& r return mrSheetGlob.getCellRange( rRange ); } -Reference< XSheetCellRanges > WorksheetHelper::getCellRangeList( const ApiCellRangeList& rRanges ) const -{ - return mrSheetGlob.getCellRangeList( rRanges ); -} - Reference< XDrawPage > WorksheetHelper::getDrawPage() const { return mrSheetGlob.getDrawPage(); diff --git a/unusedcode.easy b/unusedcode.easy index f7f94ed..750d7a7 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -37,8 +37,12 @@ ScCompressedArray<int, unsigned short>::Remove(int, unsigned long) ScCompressedArray<int, unsigned short>::ScCompressedArray(int, unsigned short const&, unsigned long) ScCompressedArray<int, unsigned short>::ScCompressedArray(int, unsigned short const*, unsigned long) ScCompressedArray<int, unsigned short>::SetValue(int, unsigned short const&) +ScCondFormatList::ScCondFormatList(Window*, ResId const&, ScDocument*) +ScCondFrmtItem::ScCondFrmtItem(unsigned short, ScConditionalFormat const&) ScCsvControl::ScCsvControl(Window*, ScCsvLayoutData const&, long) ScDBCollection::AnonDBs::erase(boost::void_ptr_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<void**, std::__cxx1998::vector<void*, std::allocator<void*> > >, std::__debug::vector<void*, std::allocator<void*> > >, ScDBData>) +ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window*, ScDataBarFormat*) +ScDocument::FindConditionalFormat(unsigned long, short, ScRangeList&) ScHTMLColOffset::Insert(ScHTMLColOffset const*, unsigned short, unsigned short) ScHTMLColOffset::Insert(unsigned long const&, unsigned short&) ScHTMLColOffset::Insert(unsigned long const*, unsigned short) @@ -69,14 +73,10 @@ ScVbaFormat<ooo::vba::excel::XStyle>::getAddIndent() ScVbaFormat<ooo::vba::excel::XStyle>::getXServiceInfo() ScVbaFormat<ooo::vba::excel::XStyle>::setAddIndent(com::sun::star::uno::Any const&) ScVbaFormat<ooo::vba::excel::XStyle>::setNumberFormat(com::sun::star::lang::Locale, rtl::OUString const&) +ScViewFunc::SetConditionalFormat(ScConditionalFormat const&) SecurityEnvironment_NssImpl::getImplementation(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>) SfxDockingWrapper::GetChildWindowId() SfxFilterPtrArr::DeleteAndDestroy(unsigned short, unsigned short) -SfxFoundCacheArr_Impl::Insert(SfxFoundCacheArr_Impl const*, unsigned short, unsigned short) -SfxFoundCacheArr_Impl::Insert(SfxFoundCache_Impl const*&, unsigned short&) -SfxFoundCacheArr_Impl::Insert(SfxFoundCache_Impl const**, unsigned short) -SfxFoundCacheArr_Impl::Remove(SfxFoundCache_Impl const*&, unsigned short) -SfxFoundCacheArr_Impl::Remove(unsigned short, unsigned short) SfxModuleArr_Impl::DeleteAndDestroy(unsigned short, unsigned short) SfxNavigatorWrapper::GetChildWindowId() SfxPartChildWnd_Impl::GetChildWindowId() @@ -228,6 +228,7 @@ VbaFoundFilesEnum::SetFileList(com::sun::star::uno::Sequence<rtl::OUString>&) VbaFoundFilesEnum::VbaFoundFilesEnum() VclEventListeners2::~VclEventListeners2() ViewShell::getIDocumentFieldsAccess() const +VirtualDevice::SetOutputSizePixelAndBuffer(Size const&, boost::shared_array<unsigned char> const&) Window::PostUserEvent(unsigned long&, unsigned long, void*) X11SalGraphics::SetMask(int&, int&, unsigned int&, unsigned int&, int&, int&, unsigned long) X509Certificate_NssImpl::getImplementation(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>) @@ -242,6 +243,7 @@ XMLTextListAutoStylePoolNames_Impl::GetPos(rtl::OUString const*) const XMLTextListAutoStylePoolNames_Impl::Remove(rtl::OUString*) XMLTextListAutoStylePool_Impl::GetPos(XMLTextListAutoStylePoolEntry_Impl const*) const XMLTextListAutoStylePool_Impl::Remove(XMLTextListAutoStylePoolEntry_Impl*) +XclExpColorScale::XclExpColorScale(XclExpRoot const&, ScColorScaleFormat const&) XclExpPivotCache::GetFieldAcc(rtl::OUString const&) _CpyTabFrms::Insert(_CpyTabFrm const&, unsigned short&) _CpyTabFrms::Insert(_CpyTabFrm const*, unsigned short) @@ -670,6 +672,7 @@ std::__cxx1998::multimap<_xmlNode*, com::sun::star::uno::Reference<com::sun::sta std::__cxx1998::vector<OrderedEntry*, std::allocator<OrderedEntry*> >::~vector() std::__cxx1998::vector<ServiceInfo*, std::allocator<ServiceInfo*> >::~vector() std::__cxx1998::vector<SfxFilter*, std::allocator<SfxFilter*> >::~vector() +std::__cxx1998::vector<SfxItemDesruptor_Impl*, std::allocator<SfxItemDesruptor_Impl*> >::~vector() std::__cxx1998::vector<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::~vector() svxform::DataNavigatorManager::GetChildWindowId() svxform::FmFilterNavigatorWinMgr::GetChildWindowId() commit 523bf7fcdf5d874ad72a4c7b470dadadad772453 Author: Caolán McNamara <[email protected]> Date: Tue Jun 12 22:07:38 2012 +0100 callcatcher: unused duplicate WW8TableManager class Change-Id: I6c4395712cb4bb6b28e2997b4af24ab423573f4a diff --git a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx index bbbcc68..c80ed54 100644 --- a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx +++ b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx @@ -113,46 +113,6 @@ void WW8TableDataHandler::endCell(const string & end) output.addItem("</tabledata.cell>"); } -// ----- WW8TableDataManager ------------------------------- - -class WW8TableManager : - public TableManager<string, TablePropsPointer_t> -{ - typedef TableDataHandler<string, TablePropsPointer_t> - TableDataHandlerPointer_t; - -public: - WW8TableManager(); - virtual ~WW8TableManager() {} - virtual void endParagraphGroup(); - virtual bool sprm(Sprm & rSprm); -}; - -WW8TableManager::WW8TableManager() -{ - TableDataHandler<string, TablePropsPointer_t>::Pointer_t pHandler(new WW8TableDataHandler()); - setHandler(pHandler); -} - -bool WW8TableManager::sprm(Sprm & rSprm) -{ - TableManager<string, TablePropsPointer_t>::sprm(rSprm); - output.setDepth(getTableDepthNew()); - return true; -} - -void WW8TableManager::endParagraphGroup() -{ - string tmpStr = "<tabledepth depth=\""; - char sBuffer[256]; - snprintf(sBuffer, sizeof(sBuffer), "%" SAL_PRIdINT32, getTableDepthNew()); - tmpStr += sBuffer; - tmpStr += "\"/>"; - output.addItem(tmpStr); - TableManager<string, TablePropsPointer_t>::endParagraphGroup(); -} - - //-------- WW8TableReference ----------------------------------- void WW8TableReference::resolve(Table & /*rHandler*/) commit 14b81851592a31dad02699870938f676885c7c11 Author: Caolán McNamara <[email protected]> Date: Tue Jun 12 21:41:48 2012 +0100 SetDrawBaseLine is never used so bDrawBaseLine is always true since removal of sc/source/ui/attrdlg/condfrmt.cxx Change-Id: Iba794cd62fc4872dbb9dc7c3d7591cdd5ab5519e diff --git a/svx/inc/svx/fntctrl.hxx b/svx/inc/svx/fntctrl.hxx index e71816d..f292fa5 100644 --- a/svx/inc/svx/fntctrl.hxx +++ b/svx/inc/svx/fntctrl.hxx @@ -75,7 +75,6 @@ public: void ResetColor(); void SetBackColor( const Color& rColor ); void UseResourceText( sal_Bool bUse = sal_True ); - void SetDrawBaseLine( sal_Bool bSet = sal_True ); void Paint( const Rectangle& ); sal_Bool IsTwoLines() const; diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index de0e9c7..f7db5c9 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -166,7 +166,6 @@ class FontPrevWin_Impl sal_Bool bSelection : 1, bGetSelection : 1, bUseResText : 1, - bDrawBaseLine : 1, bPreviewBackgroundToCharacter : 1, bTwoLines : 1, bUseFontNameAsText : 1, @@ -183,7 +182,7 @@ public: pColor( NULL ), pBackColor( 0 ), nAscent( 0 ), cStartBracket( 0 ), cEndBracket( 0 ), nFontWidthScale( 100 ), bSelection( sal_False ), bGetSelection( sal_False ), bUseResText( sal_False ), - bDrawBaseLine( sal_True ), bPreviewBackgroundToCharacter( sal_False ), bTwoLines( sal_False ), + bPreviewBackgroundToCharacter( sal_False ), bTwoLines( sal_False ), bUseFontNameAsText( sal_False ), bTextInited( sal_False ) { SvtLanguageOptions aLanguageOptions; @@ -632,13 +631,6 @@ void SvxFontPrevWindow::UseResourceText( sal_Bool bUse ) // ----------------------------------------------------------------------- -void SvxFontPrevWindow::SetDrawBaseLine( sal_Bool bSet ) -{ - pImpl->bDrawBaseLine = bSet; -} - -// ----------------------------------------------------------------------- - void SvxFontPrevWindow::Paint( const Rectangle& ) { Printer* pPrinter = pImpl->pPrinter; @@ -785,11 +777,8 @@ void SvxFontPrevWindow::Paint( const Rectangle& ) nResultWidth += nTextWidth; long _nX = (aLogSize.Width() - nResultWidth) / 2; - if ( pImpl->bDrawBaseLine ) - { - DrawLine( Point( 0, nY ), Point( _nX, nY ) ); - DrawLine( Point( _nX + nResultWidth, nY ), Point( aLogSize.Width(), nY ) ); - } + DrawLine( Point( 0, nY ), Point( _nX, nY ) ); + DrawLine( Point( _nX + nResultWidth, nY ), Point( aLogSize.Width(), nY ) ); long nSmallAscent = pImpl->nAscent; long nOffset = (nStdAscent - nSmallAscent ) / 2; @@ -821,11 +810,8 @@ void SvxFontPrevWindow::Paint( const Rectangle& ) Color aLineCol = GetLineColor(); SetLineColor( rFont.GetColor() ); - if ( pImpl->bDrawBaseLine ) - { - DrawLine( Point( 0, nY ), Point( nX, nY ) ); - DrawLine( Point( nX + aTxtSize.Width(), nY ), Point( aLogSize.Width(), nY ) ); - } + DrawLine( Point( 0, nY ), Point( nX, nY ) ); + DrawLine( Point( nX + aTxtSize.Width(), nY ), Point( aLogSize.Width(), nY ) ); SetLineColor( aLineCol ); Point aTmpPoint( nX, nY ); commit 6191fa0847ac5b27083efe1a8c6cd84d080a638c Author: Caolán McNamara <[email protected]> Date: Tue Jun 12 13:40:45 2012 +0100 reduce use of UniString ctor from null-terminated unicodearray Change-Id: I98361309ada084d8f78517ce88f210d785f59cc0 diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index af93ade..5aecb53 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -480,12 +480,9 @@ String SbiImage::GetString( short nId ) const } } else - { - String aStr( pStr ); - return aStr; - } + return rtl::OUString(pStr); } - return String(); + return rtl::OUString(); } const SbxObject* SbiImage::FindType (String aTypeName) const diff --git a/basic/source/sbx/sbxexec.cxx b/basic/source/sbx/sbxexec.cxx index 7fe4f67..b891298 100644 --- a/basic/source/sbx/sbxexec.cxx +++ b/basic/source/sbx/sbxexec.cxx @@ -153,7 +153,7 @@ static SbxVariable* Operand { // A number could be scanned in directly! sal_uInt16 nLen; - if( !refVar->Scan( XubString( p ), &nLen ) ) + if( !refVar->Scan( rtl::OUString( p ), &nLen ) ) refVar.Clear(); else p += nLen; diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index b7f61ed..f47f697 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -504,11 +504,11 @@ String OFlatTable::getEntry() } xDir->beforeFirst(); // move back to before first record } - catch(Exception&) + catch(const Exception&) { OSL_ASSERT(0); } - return sURL.getStr(); + return sURL; } // ------------------------------------------------------------------------- void OFlatTable::refreshColumns() diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 8dc87a9..3a8b075 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -535,7 +535,7 @@ SvxScriptOrgDialog::SvxScriptOrgDialog( Window* pParent, ::rtl::OUString languag // must be a neater way to deal with the strings than as above // append the language to the dialog title String winTitle( GetText() ); - winTitle.SearchAndReplace( String::CreateFromAscii( "%MACROLANG" ), language.pData->buffer ); + winTitle.SearchAndReplace( String::CreateFromAscii( "%MACROLANG" ), m_sLanguage ); SetText( winTitle ); aScriptsBox.SetSelectHdl( LINK( this, SvxScriptOrgDialog, ScriptSelectHdl ) ); diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 9db7af8..9ceb555 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -1857,7 +1857,7 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const } ::rtl::OUString aName; xProp->getPropertyValue(PROPERTY_COMMAND) >>= aName; - String sObject(aName.getStr()); + String sObject(aName); sTitle.SearchAndReplace('#',sObject); aReturn.sTitle = sTitle; @@ -2873,7 +2873,7 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven SvLBoxEntry* pContainer = getEntryFromContainer(xNames); if ( pContainer ) { // a query or table has been removed - String aName = ::comphelper::getString(_rEvent.Accessor).getStr(); + String aName = ::comphelper::getString(_rEvent.Accessor); if ( isCurrentlyDisplayedChanged( aName, pContainer) ) { // the element displayed currently has been replaced @@ -2924,7 +2924,7 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve SvLBoxEntry* pContainer = getEntryFromContainer(xNames); if ( pContainer ) { // a table or query as been replaced - String aName = ::comphelper::getString(_rEvent.Accessor).getStr(); + String aName = ::comphelper::getString(_rEvent.Accessor); if ( isCurrentlyDisplayedChanged( aName, pContainer) ) { // the element displayed currently has been replaced diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index e7a876f..0ebb507 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -971,7 +971,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet { ::rtl::OUString sValue; _rValue >>= sValue; - _rSet.Put(SfxStringItem(_nId, sValue.getStr())); + _rSet.Put(SfxStringItem(_nId, sValue)); } else { OSL_FAIL( diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 9f73597..4d860ac 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -350,7 +350,6 @@ void ODbaseIndexDialog::Init() ::std::vector< String > aUsedIndexes; - String aExt; const ::rtl::OUString *pBegin = aFolderContent.getConstArray(); const ::rtl::OUString *pEnd = pBegin + aFolderContent.getLength(); aURL.SetSmartProtocol(INET_PROT_FILE); @@ -359,12 +358,12 @@ void ODbaseIndexDialog::Init() rtl::OUString aName; ::utl::LocalFileHelper::ConvertURLToPhysicalName(pBegin->getStr(),aName); aURL.SetSmartURL(aName); - aExt = aURL.getExtension(); - if(aExt == aIndexExt.getStr()) + rtl::OUString aExt = aURL.getExtension(); + if (aExt == aIndexExt) { m_aFreeIndexList.push_back( OTableIndex(aURL.getName()) ); } - else if(aExt == aTableExt.getStr()) + else if (aExt == aTableExt) { m_aTableInfoList.push_back( OTableInfo(aURL.getName()) ); OTableInfo& rTabInfo = m_aTableInfoList.back(); diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx index d580349..666dd9f 100644 --- a/dbaccess/source/ui/dlg/paramdialog.cxx +++ b/dbaccess/source/ui/dlg/paramdialog.cxx @@ -231,7 +231,7 @@ DBG_NAME(OParameterDialog) LocalResourceAccess aDummy(DLG_PARAMETERS, RSC_MODALDIALOG); sMessage = String(ModuleRes(STR_COULD_NOT_CONVERT_PARAM)); } - sMessage.SearchAndReplaceAll(String::CreateFromAscii("$name$"), sName.getStr()); + sMessage.SearchAndReplaceAll(String::CreateFromAscii("$name$"), sName); ErrorBox(NULL, WB_OK, sMessage).Execute(); m_aParam.GrabFocus(); return 1L; diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index 51bbed9..7d4e0e0 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -485,7 +485,7 @@ void DlgFilterCrit::SetLine( sal_uInt16 nIdx,const PropertyValue& _rItem,sal_Boo DBG_CHKTHIS(DlgFilterCrit,NULL); ::rtl::OUString aCondition; _rItem.Value >>= aCondition; - String aStr = aCondition.getStr(); + String aStr = aCondition; ::Replace_SQL_PlaceHolder(aStr); aStr = comphelper::string::stripEnd(aStr, ' '); diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index f426a31..dfc3107 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -746,7 +746,7 @@ FormulaToken* FormulaTokenArray::Add( FormulaToken* t ) FormulaToken* FormulaTokenArray::AddString( const sal_Unicode* pStr ) { - return AddString( String( pStr ) ); + return AddString( rtl::OUString( pStr ) ); } FormulaToken* FormulaTokenArray::AddString( const String& rStr ) @@ -761,7 +761,7 @@ FormulaToken* FormulaTokenArray::AddDouble( double fVal ) FormulaToken* FormulaTokenArray::AddExternal( const sal_Unicode* pStr ) { - return AddExternal( String( pStr ) ); + return AddExternal( rtl::OUString( pStr ) ); } FormulaToken* FormulaTokenArray::AddExternal( const String& rStr, diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 1ea9f8a..635281c 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -813,7 +813,7 @@ void ScGlobal::AddQuotes( String& rString, sal_Unicode cQuote, bool bEscapeEmbed sal_Unicode pQ[3]; pQ[0] = pQ[1] = cQuote; pQ[2] = 0; - String aQuotes( pQ ); + rtl::OUString aQuotes( pQ ); rString.SearchAndReplaceAll( cQuote, aQuotes); } rString.Insert( cQuote, 0 ).Append( cQuote ); @@ -829,7 +829,7 @@ void ScGlobal::EraseQuotes( String& rString, sal_Unicode cQuote, bool bUnescapeE sal_Unicode pQ[3]; pQ[0] = pQ[1] = cQuote; pQ[2] = 0; - String aQuotes( pQ ); + rtl::OUString aQuotes( pQ ); rString.SearchAndReplaceAll( aQuotes, cQuote); } } diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index aeab79e..72a30e9 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -1071,8 +1071,8 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd } else { - String aTmp( p ); - long n = aTmp.ToInt32() - 1; + rtl::OUString aTmp( p ); + long n = aTmp.toInt32() - 1; while (CharClass::isAsciiDigit( *p )) p++; if( n < 0 || n > MAXROW ) diff --git a/sc/source/core/tool/cellkeytranslator.cxx b/sc/source/core/tool/cellkeytranslator.cxx index 41fbe77..f32234c 100644 --- a/sc/source/core/tool/cellkeytranslator.cxx +++ b/sc/source/core/tool/cellkeytranslator.cxx @@ -234,7 +234,7 @@ void ScCellKeywordTranslator::addToMap(const String& rKey, const sal_Char* pName void ScCellKeywordTranslator::addToMap(const TransItem* pItems, const Locale& rLocale) { for (sal_uInt16 i = 0; pItems[i].from != NULL; ++i) - addToMap(String(pItems[i].from), pItems[i].to, rLocale, pItems[i].func); + addToMap(rtl::OUString(pItems[i].from), pItems[i].to, rLocale, pItems[i].func); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index a1bc598..7833786 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -3494,7 +3494,7 @@ void ScCompiler::AutoCorrectParsedSymbol() const sal_Unicode* p = aRef[j].GetBuffer(); while ( *p && CharClass::isAsciiNumeric( *p ) ) aStr2 += *p++; - aRef[j] = String( p ); + aRef[j] = rtl::OUString( p ); aRef[j] += aStr2; if ( bColons || aRef[j] != aOld ) { @@ -3561,7 +3561,7 @@ bool ScCompiler::NextNewToken( bool bInArray ) // Short cut for references when reading ODF to speedup things. if (mnPredetectedReference) { - String aStr( cSymbol); + rtl::OUString aStr( cSymbol); if (!IsPredetectedReference( aStr) && !IsExternalNamedRange( aStr)) { /* TODO: it would be nice to generate a #REF! error here, which @@ -3571,7 +3571,7 @@ bool ScCompiler::NextNewToken( bool bInArray ) * information if not ODFF (in that case it was already handled). * */ ScRawToken aToken; - aToken.SetString( aStr.GetBuffer() ); + aToken.SetString( aStr.getStr() ); aToken.NewOpCode( ocBad ); pRawToken = aToken.Clone(); } @@ -3625,7 +3625,7 @@ bool ScCompiler::NextNewToken( bool bInArray ) do { mbRewind = false; - const String aOrg( cSymbol ); + const rtl::OUString aOrg( cSymbol ); if (bAsciiNonAlnum) { diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index a6d1693..c914daf 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -1898,7 +1898,7 @@ void ScInterpreter::PushStringBuffer( const sal_Unicode* pString ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PushStringBuffer" ); if ( pString ) - PushString( String( pString ) ); + PushString( rtl::OUString(pString) ); else PushString( EMPTY_STRING ); } diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index b29e48d..800d952 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -364,9 +364,9 @@ FormulaToken* ScRawToken::CreateToken() const return new FormulaDoubleToken( nValue ); case svString : if (eOp == ocPush) - return new FormulaStringToken( String( cStr ) ); + return new FormulaStringToken( rtl::OUString( cStr ) ); else - return new FormulaStringOpToken( eOp, String( cStr ) ); + return new FormulaStringOpToken( eOp, rtl::OUString( cStr ) ); case svSingleRef : if (eOp == ocPush) return new ScSingleRefToken( aRef.Ref1 ); @@ -384,23 +384,23 @@ FormulaToken* ScRawToken::CreateToken() const return new FormulaIndexToken( eOp, name.nIndex, name.bGlobal); case svExternalSingleRef: { - String aTabName(extref.cTabName); + rtl::OUString aTabName(extref.cTabName); return new ScExternalSingleRefToken(extref.nFileId, aTabName, extref.aRef.Ref1); } case svExternalDoubleRef: { - String aTabName(extref.cTabName); + rtl::OUString aTabName(extref.cTabName); return new ScExternalDoubleRefToken(extref.nFileId, aTabName, extref.aRef); } case svExternalName: { - String aName(extname.cName); + rtl::OUString aName(extname.cName); return new ScExternalNameToken( extname.nFileId, aName ); } case svJump : return new FormulaJumpToken( eOp, (short*) nJump ); case svExternal : - return new FormulaExternalToken( eOp, sbyte.cByte, String( cStr+1 ) ); + return new FormulaExternalToken( eOp, sbyte.cByte, rtl::OUString( cStr+1 ) ); case svFAP : return new FormulaFAPToken( eOp, sbyte.cByte, NULL ); case svMissing : diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx index 1ffae6a..7496db7 100644 --- a/sc/source/filter/dif/difimp.cxx +++ b/sc/source/filter/dif/difimp.cxx @@ -70,7 +70,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, sal_Bool bSyntErrWarn = false; sal_Bool bOverflowWarn = false; - String& rData = aDifParser.aData; + rtl::OUString aData = aDifParser.aData; sal_Bool bData = false; rIn.Seek( 0 ); @@ -83,7 +83,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, aPrgrsBar.Progress(); - bData = rData.Len() > 0; + bData = !aData.isEmpty(); switch( eTopic ) { @@ -92,7 +92,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, if( aDifParser.nVector != 0 || aDifParser.nVal != 1 ) bSyntErrWarn = sal_True; if( bData ) - pDoc->RenameTab( nBaseTab, rData ); + pDoc->RenameTab( nBaseTab, aData ); } break; case T_VECTORS: @@ -164,14 +164,14 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, if( ValidCol(nColCnt) && ValidRow(nRowCnt) ) { ScBaseCell* pCell; - if( DifParser::IsV( rData.GetBuffer() ) ) + if( DifParser::IsV( aData.getStr() ) ) { pCell = new ScValueCell( aDifParser.fVal ); if( !bPlain ) aAttrCache.SetNumFormat( nColCnt, nRowCnt, aDifParser.nNumFormat ); } - else if( rData == pKeyTRUE || rData == pKeyFALSE ) + else if( aData == pKeyTRUE || aData == pKeyFALSE ) { pCell = new ScValueCell( aDifParser.fVal ); if( bPlain ) @@ -180,12 +180,12 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, aAttrCache.SetNumFormat( nColCnt, nRowCnt, aDifParser.nNumFormat ); } - else if( rData == pKeyNA || rData == pKeyERROR ) - pCell = new ScStringCell( rData ); + else if( aData == pKeyNA || aData == pKeyERROR ) + pCell = new ScStringCell( aData ); else { String aTmp( RTL_CONSTASCII_USTRINGPARAM( "#IND: " )); - aTmp += rData; + aTmp += aData; aTmp += sal_Unicode('?'); pCell = new ScStringCell( aTmp ); } @@ -203,10 +203,10 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, if( ValidCol(nColCnt) && ValidRow(nRowCnt) ) { - if( rData.Len() > 0 ) + if (!aData.isEmpty()) { pDoc->PutCell( nColCnt, nRowCnt, nBaseTab, - ScBaseCell::CreateTextCell( rData, pDoc ), true ); + ScBaseCell::CreateTextCell( aData, pDoc ), true ); } } else @@ -434,7 +434,7 @@ DATASET DifParser::GetNumberDataset( const sal_Unicode* pPossibleNumericData ) else { // ...und zur Strafe mit'm Numberformatter... OSL_ENSURE( pNumFormatter, "-DifParser::GetNextDataset(): No Formatter, more fun!" ); - String aTestVal( pPossibleNumericData ); + rtl::OUString aTestVal( pPossibleNumericData ); sal_uInt32 nFormat = 0; double fTmpVal; if( pNumFormatter->IsNumberFormat( aTestVal, nFormat, fTmpVal ) ) diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 6021704..101eb6a 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -375,7 +375,7 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU { // #n382718# (and #n261623#) Convert smb notation to '\\' aFileName = aUrlObj.GetMainURL( INetURLObject::NO_DECODE ); - aFileName = String( aFileName.GetBuffer() + 4 ); // skip the 'smb:' part + aFileName = rtl::OUString( aFileName.GetBuffer() + 4 ); // skip the 'smb:' part aFileName.SearchAndReplaceAll( '/', '\\' ); } diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index c7eaf37..73015c3 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1751,16 +1751,16 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm ) switch( ch ) { case 'X': - nCol = static_cast<SCCOL>(String( p ).ToInt32()) + nStartCol - 1; + nCol = static_cast<SCCOL>(rtl::OUString(p).toInt32()) + nStartCol - 1; break; case 'Y': - nRow = String( p ).ToInt32() + nStartRow - 1; + nRow = rtl::OUString(p).toInt32() + nStartRow - 1; break; case 'C': - nRefCol = static_cast<SCCOL>(String( p ).ToInt32()) + nStartCol - 1; + nRefCol = static_cast<SCCOL>(rtl::OUString(p).toInt32()) + nStartCol - 1; break; case 'R': - nRefRow = String( p ).ToInt32() + nStartRow - 1; + nRefRow = rtl::OUString(p).toInt32() + nStartRow - 1; break; case 'K': { @@ -1871,10 +1871,10 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm ) switch( ch ) { case 'X': - nCol = static_cast<SCCOL>(String( p ).ToInt32()) + nStartCol - 1; + nCol = static_cast<SCCOL>(rtl::OUString(p).toInt32()) + nStartCol - 1; break; case 'Y': - nRow = String( p ).ToInt32() + nStartRow - 1; + nRow = rtl::OUString(p).toInt32() + nStartRow - 1; break; case 'P' : if ( bData ) @@ -1913,16 +1913,11 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm ) { if ( bData && *p == ';' && *(p+1) == 'P' ) { - String aCode( p+2 ); + rtl::OUString aCode( p+2 ); // unescape doubled semicolons - xub_StrLen nPos = 0; - String aSemicolon( RTL_CONSTASCII_USTRINGPARAM(";;")); - while ( (nPos = aCode.Search( aSemicolon, nPos )) != STRING_NOTFOUND ) - aCode.Erase( nPos++, 1 ); + aCode = aCode.replaceAll(";;", ";"); // get rid of Xcl escape characters - nPos = 0; - while ( (nPos = aCode.Search( sal_Unicode(0x1b), nPos )) != STRING_NOTFOUND ) - aCode.Erase( nPos, 1 ); + aCode = aCode.replaceAll(rtl::OUString(static_cast<sal_Unicode>(0x1b)), rtl::OUString()); xub_StrLen nCheckPos; short nType; sal_uInt32 nKey; diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx index b3c48f2..8e68506 100644 --- a/sfx2/source/appl/sfxpicklist.cxx +++ b/sfx2/source/appl/sfxpicklist.cxx @@ -330,7 +330,7 @@ void SfxPickList::ExecuteEntry( sal_uInt32 nIndex ) sal_uInt16 nPos=aFilter.Search('|'); if( nPos != STRING_NOTFOUND ) { - String aOptions(aFilter.Copy( nPos ).GetBuffer()+1); + rtl::OUString aOptions(aFilter.Copy(nPos).GetBuffer()+1); aFilter.Erase( nPos ); aReq.AppendItem( SfxStringItem(SID_FILE_FILTEROPTIONS, aOptions)); } diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index 570a1aa..674b703 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -227,7 +227,7 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri String sPath; sal_Unicode aPathBuffer[nMaxPathSize]; if ( SystemPath::GetUserTemplateLocation( aPathBuffer, nMaxPathSize )) - sPath = String( aPathBuffer ); + sPath = rtl::OUString( aPathBuffer ); ::utl::LocalFileHelper::ConvertPhysicalNameToURL( sPath, sURL ); ::rtl::OUString aUserTemplateURL( sURL ); diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx index 6a8cf46..5e768b4 100644 --- a/sfx2/source/doc/oleprops.cxx +++ b/sfx2/source/doc/oleprops.cxx @@ -361,7 +361,7 @@ String SfxOleStringHelper::ImplLoadString16( SvStream& rStrm ) const rStrm.SeekRel( 2 ); // create string from character array aBuffer.push_back( 0 ); - aValue = String( &aBuffer.front() ); + aValue = rtl::OUString( &aBuffer.front() ); } return aValue; } diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index 9f3f70b..d657893 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -193,7 +193,7 @@ void SvObjectServerList::FillInsertObjects() { if( !Get( aClassName ) ) // noch nicht eingetragen - aObjectServerList.push_back( SvObjectServer( aClassName, String( aUIName.getStr() ) ) ); + aObjectServerList.push_back( SvObjectServer( aClassName, aUIName ) ); } } } diff --git a/svtools/source/edit/svmedit.cxx b/svtools/source/edit/svmedit.cxx index fca8fc4..8dd6502 100644 --- a/svtools/source/edit/svmedit.cxx +++ b/svtools/source/edit/svmedit.cxx @@ -315,12 +315,12 @@ void ImpSvMEdit::ImpSetScrollBarRanges() void ImpSvMEdit::ImpInitScrollBars() { - static const sal_Unicode sampleText[] = { 'x', '\0' }; + static const sal_Unicode sampleChar = { 'x' }; if ( mpHScrollBar || mpVScrollBar ) { ImpSetScrollBarRanges(); Size aCharBox; - aCharBox.Width() = mpTextWindow->GetTextWidth( sampleText ); + aCharBox.Width() = mpTextWindow->GetTextWidth( rtl::OUString(sampleChar) ); aCharBox.Height() = mpTextWindow->GetTextHeight(); Size aOutSz = mpTextWindow->GetOutputSizePixel(); if ( mpHScrollBar ) @@ -673,11 +673,11 @@ Size ImpSvMEdit::CalcMinimumSize() const Size ImpSvMEdit::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const { - static const sal_Unicode sampleText[] = { 'X', '\0' }; + static const sal_Unicode sampleChar = 'X'; Size aSz; Size aCharSz; - aCharSz.Width() = mpTextWindow->GetTextWidth( sampleText ); + aCharSz.Width() = mpTextWindow->GetTextWidth( rtl::OUString(sampleChar) ); aCharSz.Height() = mpTextWindow->GetTextHeight(); if ( nLines ) @@ -700,9 +700,9 @@ Size ImpSvMEdit::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const void ImpSvMEdit::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const { - static const sal_Unicode sampleText[] = { 'x', '\0' }; + static const sal_Unicode sampleChar = { 'x' }; Size aOutSz = mpTextWindow->GetOutputSizePixel(); - Size aCharSz( mpTextWindow->GetTextWidth( sampleText ), mpTextWindow->GetTextHeight() ); + Size aCharSz( mpTextWindow->GetTextWidth( rtl::OUString(sampleChar) ), mpTextWindow->GetTextHeight() ); rnCols = (sal_uInt16) (aOutSz.Width()/aCharSz.Width()); rnLines = (sal_uInt16) (aOutSz.Height()/aCharSz.Height()); } diff --git a/svtools/source/filter/wmf/enhwmf.cxx b/svtools/source/filter/wmf/enhwmf.cxx index b81d973..cadb5e2 100644 --- a/svtools/source/filter/wmf/enhwmf.cxx +++ b/svtools/source/filter/wmf/enhwmf.cxx @@ -1095,7 +1095,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() *pWMF >> nChar; lfFaceName[ i ] = nChar; } - aLogFont.alfFaceName = UniString( lfFaceName ); + aLogFont.alfFaceName = rtl::OUString( lfFaceName ); pOut->CreateObject( nIndex, GDI_FONT, new WinMtfFontStyle( aLogFont ) ); } } diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index e4755c4..ddf5f46 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -999,7 +999,7 @@ void FmSearchEngine::SearchNextImpl() if (!m_bWildcard) { // da natuerlich in allen anderen Faellen auch * und ? im Suchstring erlaubt sind, aber nicht als WildCards zaehlen // sollen, muss ich normieren - UniString aTmp(strSearchExpression.getStr()); + UniString aTmp(strSearchExpression); static const UniString s_sStar = UniString::CreateFromAscii("\\*"); static const UniString s_sQuotation = UniString::CreateFromAscii("\\?"); aTmp.SearchAndReplaceAll('*', s_sStar); diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 40ff5d7..ce04e49 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -315,7 +315,7 @@ sal_uLong SwASCIIParser::ReadChars() if( pStt >= pEnd ) { if( pLastStt != pStt ) - InsertText( String( pLastStt )); + InsertText( rtl::OUString( pLastStt )); // Read a new block sal_uLong lGCount; @@ -438,7 +438,7 @@ sal_uLong SwASCIIParser::ReadChars() *pStt++ = 0; if( nLineLen ) { - InsertText( String( pLastStt )); + InsertText( rtl::OUString( pLastStt )); } pDoc->SplitNode( *pPam->GetPoint(), false ); pDoc->InsertPoolItem( *pPam, SvxFmtBreakItem( @@ -472,7 +472,7 @@ sal_uLong SwASCIIParser::ReadChars() { sal_Unicode c = *pStt; *pStt = 0; - InsertText( String( pLastStt )); + InsertText( rtl::OUString( pLastStt )); pDoc->SplitNode( *pPam->GetPoint(), false ); pLastStt = pStt; nLineLen = 0; @@ -484,7 +484,7 @@ sal_uLong SwASCIIParser::ReadChars() else if( bSplitNode ) { // We found a CR/LF, thus save the text - InsertText( String( pLastStt )); + InsertText( rtl::OUString( pLastStt )); pDoc->SplitNode( *pPam->GetPoint(), false ); pLastStt = pStt; nLineLen = 0; diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 1867218..1d400a8 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -773,7 +773,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue( break; case MID_GRAPHIC_FILTER: - pBrush->SetGraphicFilter( rValue.getStr() ); + pBrush->SetGraphicFilter( rValue ); bOk = sal_True; break; } diff --git a/sw/source/ui/docvw/extedit.cxx b/sw/source/ui/docvw/extedit.cxx index 98dc6aa..8b70262 100644 --- a/sw/source/ui/docvw/extedit.cxx +++ b/sw/source/ui/docvw/extedit.cxx @@ -122,7 +122,7 @@ void EditWithExternalTool(GraphicObject *pGraphicObject, SwWrtShell *rSh) GraphicFilter& rGF = GraphicFilter::GetGraphicFilter(); sal_uInt16 nFilter(rGF.GetExportFormatNumber(fExt)); String aFilter(rGF.GetExportFormatShortName(nFilter)); - String sPath(tempFileName.getStr()); + String sPath(tempFileName); // Write the Graphic to the file now XOutBitmap::WriteGraphic(pGraphic, sPath, aFilter, diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 5810789..b40562d 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -2665,7 +2665,7 @@ sal_uInt16 VCLXMultiPage::insertTab( TabPage* pPage, rtl::OUString& sTitle ) { TabControl *pTabControl = getTabControl(); sal_uInt16 id = sal::static_int_cast< sal_uInt16 >( mTabId++ ); - pTabControl->InsertPage( id, sTitle.getStr(), TAB_APPEND ); + pTabControl->InsertPage( id, sTitle, TAB_APPEND ); pTabControl->SetTabPage( id, pPage ); return id; } @@ -2711,15 +2711,15 @@ void SAL_CALL VCLXMultiPage::setTabProps( sal_Int32 ID, const uno::Sequence< bea if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL ) throw lang::IndexOutOfBoundsException(); - for ( int i = 0; i < Properties.getLength(); i++ ) + for (sal_Int32 i = 0; i < Properties.getLength(); ++i) { const rtl::OUString &name = Properties[i].Name; const uno::Any &value = Properties[i].Value; - if ( name == rtl::OUString( "Title" ) ) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Title"))) { rtl::OUString title = value.get<rtl::OUString>(); - pTabControl->SetPageText( sal::static_int_cast< sal_uInt16 >( ID ), title.getStr() ); + pTabControl->SetPageText( sal::static_int_cast< sal_uInt16 >( ID ), title ); } } } diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx index cd11d80..03a2761 100644 --- a/unotools/source/config/fontcfg.cxx +++ b/unotools/source/config/fontcfg.cxx @@ -296,15 +296,15 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const Locale& rLocale ) String aFallBackJapaneseLocalized( RTL_CONSTASCII_USTRINGPARAM( "MS UI Gothic;" ) ); aFallBackJapaneseLocalized += String( RTL_CONSTASCII_USTRINGPARAM( FALLBACKFONT_UI_SANS_JAPANESE1 ) ); - aFallBackJapaneseLocalized += String( aMSPGothic ); + aFallBackJapaneseLocalized += OUString( aMSPGothic ); aFallBackJapaneseLocalized += String(RTL_CONSTASCII_USTRINGPARAM( ";" ) ); - aFallBackJapaneseLocalized += String( aMSGothic ); + aFallBackJapaneseLocalized += OUString( aMSGothic ); aFallBackJapaneseLocalized += String(RTL_CONSTASCII_USTRINGPARAM( ";" ) ); - aFallBackJapaneseLocalized += String( aTLPGothic ); + aFallBackJapaneseLocalized += OUString( aTLPGothic ); aFallBackJapaneseLocalized += String(RTL_CONSTASCII_USTRINGPARAM( ";" ) ); - aFallBackJapaneseLocalized += String( aLXGothic ); + aFallBackJapaneseLocalized += OUString( aLXGothic ); aFallBackJapaneseLocalized += String(RTL_CONSTASCII_USTRINGPARAM( ";" ) ); - aFallBackJapaneseLocalized += String( aKochiGothic ); + aFallBackJapaneseLocalized += OUString( aKochiGothic ); aFallBackJapaneseLocalized += String(RTL_CONSTASCII_USTRINGPARAM( ";" ) ); aFallBackJapaneseLocalized += String(RTL_CONSTASCII_USTRINGPARAM( FALLBACKFONT_UI_SANS_JAPANESE2 ) ); static const OUString aFallBackJapanese( aFallBackJapaneseLocalized ); @@ -318,9 +318,9 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const Locale& rLocale ) // we need localized names for korean fonts static sal_Unicode const aSunGulim[] = { 0xC36C, 0xAD74, 0xB9BC, 0 }; static sal_Unicode const aBaekmukGulim[] = { 0xBC31, 0xBC35, 0xAD74, 0xB9BC, 0 }; - String aFallBackKoreanLocalized( aSunGulim ); + rtl::OUString aFallBackKoreanLocalized( aSunGulim ); aFallBackKoreanLocalized += String(RTL_CONSTASCII_USTRINGPARAM( ";" ) ); - aFallBackKoreanLocalized += String( aBaekmukGulim ); + aFallBackKoreanLocalized += rtl::OUString( aBaekmukGulim ); aFallBackKoreanLocalized += String(RTL_CONSTASCII_USTRINGPARAM( ";" ) ); aFallBackKoreanLocalized += String(RTL_CONSTASCII_USTRINGPARAM( FALLBACKFONT_UI_SANS_KOREAN ) ); static const OUString aFallBackKorean( aFallBackKoreanLocalized ); diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx index cca8040..ed5aa94 100644 --- a/unotools/source/misc/fontdefs.cxx +++ b/unotools/source/misc/fontdefs.cxx @@ -419,7 +419,7 @@ void GetEnglishSearchFontName( String& rName ) // translate normalized localized name to its normalized English ASCII name if( bNeedTranslation ) { - typedef boost::unordered_map<const String, const char*,FontNameHash> FontNameDictionary; + typedef boost::unordered_map<const rtl::OUString, const char*, FontNameHash> FontNameDictionary; static FontNameDictionary aDictionary( SAL_N_ELEMENTS(aImplLocalizedNamesList) ); // the font name dictionary needs to be intialized once if( aDictionary.empty() ) diff --git a/vcl/inc/vcl/font.hxx b/vcl/inc/vcl/font.hxx index 8ca4ba5..1197d1f 100644 --- a/vcl/inc/vcl/font.hxx +++ b/vcl/inc/vcl/font.hxx @@ -70,7 +70,7 @@ public: void SetAlign( FontAlign ); FontAlign GetAlign() const; - void SetName( const String& rFamilyName ); + void SetName( const rtl::OUString& rFamilyName ); const String& GetName() const; void SetStyleName( const String& rStyleName ); const String& GetStyleName() const; diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index a80c4c7..ca625fb 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -376,7 +376,7 @@ void Font::SetAlign( FontAlign eAlign ) // ----------------------------------------------------------------------- -void Font::SetName( const String& rFamilyName ) +void Font::SetName( const rtl::OUString& rFamilyName ) { DBG_CHKTHIS( Font, NULL ); diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index e26907b..627cd7d 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -1673,10 +1673,10 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference ) MetaTextLineAction* pAct = (MetaTextLineAction*) pAction; // measure a test string to get ascend and descent right static const sal_Unicode pStr[] = { 0xc4, 0x67, 0 }; - String aStr( pStr ); + rtl::OUString aStr( pStr ); Rectangle aRect; - aMapVDev.GetTextBoundRect( aRect, aStr, 0, 0, aStr.Len(), 0, NULL ); + aMapVDev.GetTextBoundRect( aRect, aStr, 0, 0, aStr.getLength(), 0, NULL ); Point aPt( pAct->GetStartPoint() ); aRect.Move( aPt.X(), aPt.Y() ); aRect.Right() = aRect.Left() + pAct->GetWidth(); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 9c1e6bb..72201ba 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -2350,7 +2350,7 @@ public: const PDFWriterImpl::BuiltinFont&, long nPixelPerEM, int nOrientation ); - void SetText( const String& rText ) { maOrigText = rText; } + void SetText( const rtl::OUString& rText ) { maOrigText = rText; } virtual bool LayoutText( ImplLayoutArgs& ); virtual void InitFont() const; virtual void DrawText( SalGraphics& ) const; diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx index 0515fab..452cc68 100644 --- a/vcl/source/helper/strhelper.cxx +++ b/vcl/source/helper/strhelper.cxx @@ -167,8 +167,7 @@ String GetCommandLineToken( int nToken, const String& rLine ) *pLeap = 0; - String aRet( pBuffer ); - return aRet; + return rtl::OUString(pBuffer); } rtl::OString GetCommandLineToken(int nToken, const rtl::OString& rLine) @@ -324,8 +323,7 @@ String WhitespaceToSpace( const String& rLine, sal_Bool bProtect ) if( *pLeap == ' ' ) *pLeap = 0; - String aRet( *pBuffer == ' ' ? pBuffer+1 : pBuffer ); - return aRet; + return rtl::OUString(*pBuffer == ' ' ? pBuffer+1 : pBuffer); } rtl::OString WhitespaceToSpace(const rtl::OString& rLine, sal_Bool bProtect) diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx index 6c4b6a2..0029953 100644 --- a/vcl/unx/generic/app/i18n_status.cxx +++ b/vcl/unx/generic/app/i18n_status.cxx @@ -606,7 +606,7 @@ void I18NStatus::setStatusText( const String& rText ) else pBuffer[i] = pCopy[i]; } - String aText( pBuffer ); + rtl::OUString aText( pBuffer ); m_pStatusWindow->setText( aText ); m_pStatusWindow->setPosition( m_pParent ); diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 2802c6f..9c825de 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1070,8 +1070,7 @@ void SvXMLNumFmtElementContext::EndElement() { case XML_TOK_STYLE_TEXT: if ( rParent.HasLongDoW() && - rParent.GetLocaleData().getLongDateDayOfWeekSep() == - String( aContent.getStr() ) ) + aContent.toString().equals(rParent.GetLocaleData().getLongDateDayOfWeekSep()) ) { // skip separator constant after long day of week // (NF_KEY_NNNN contains the separator)
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
