From 6a08067902ddc0ec61a7c7b4b0035b303f643a50 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Mon, 1 Jul 2013 10:33:48 -0500 Subject: OUString convertion for unotools Change-Id: Ifae7f344e3827875e32afa3cda23c771f5735707 Reviewed-on: https://gerrit.libreoffice.org/4659 Tested-by: LibreOffice gerrit bot Reviewed-by: Fridrich Strba Tested-by: Fridrich Strba --- reportdesign/source/core/api/ReportEngineJFree.cxx | 8 +++----- reportdesign/source/ui/inspection/GeometryHandler.cxx | 14 +++++++------- 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'reportdesign') diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx index e99d1440df61..c1cf2d4ca5f1 100644 --- a/reportdesign/source/core/api/ReportEngineJFree.cxx +++ b/reportdesign/source/core/api/ReportEngineJFree.cxx @@ -172,11 +172,9 @@ OUString OReportEngineJFree::getNewOutputName() MimeConfigurationHelper aConfighelper(m_xContext); const OUString sMimeType = m_xReport->getMimeType(); const SfxFilter* pFilter = SfxFilter::GetDefaultFilter( aConfighelper.GetDocServiceNameFromMediaType(sMimeType) ); - String sExt; + OUString sExt(".rpt"); if ( pFilter ) sExt = ::comphelper::string::stripStart(pFilter->GetDefaultExtension(), '*'); - else - sExt = OUString(".rpt"); uno::Reference< embed::XStorage > xTemp = OStorageHelper::GetTemporaryStorage(/*sFileTemp,embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE,*/ m_xContext); utl::DisposableComponent aTemp(xTemp); @@ -199,11 +197,11 @@ OUString OReportEngineJFree::getNewOutputName() if ( !sName.Len() ) sName = m_xReport->getName(); { - ::utl::TempFile aTestFile(sName,sal_False,&sExt); + ::utl::TempFile aTestFile(sName, false, &sExt); if ( !aTestFile.IsValid() ) { sName = RPT_RESSTRING(RID_STR_REPORT,m_xContext->getServiceManager()); - ::utl::TempFile aFile(sName,sal_False,&sExt); + ::utl::TempFile aFile(sName, false, &sExt); sFileURL = aFile.GetURL(); } else diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index db31b307098d..1b4e5a087f8a 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -1871,13 +1871,13 @@ sal_Bool GeometryHandler::impl_isDefaultFunction_nothrow( const uno::Reference< { aSearchOptions.searchString = aIter->m_sSearchString; utl::TextSearch aTextSearch(aSearchOptions); - xub_StrLen start = 0; - xub_StrLen end = sFormula.Len(); - if ( aTextSearch.SearchFrwrd(sFormula,&start,&end) && start == 0 && end == sFormula.Len()) // default function found + sal_Int32 start = 0; + sal_Int32 end = sFormula.Len(); + if ( aTextSearch.SearchForward(sFormula,&start,&end) && start == 0 && end == sFormula.Len()) // default function found { aSearchOptions.searchString = OUString("\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]"); utl::TextSearch aDataSearch(aSearchOptions); - aDataSearch.SearchFrwrd(sFormula,&start,&end ); + aDataSearch.SearchForward(sFormula,&start,&end ); ++start; _rDataField = sFormula.Copy(start,end-start-1); _rsDefaultFunctionName = aIter->m_sName; @@ -2088,9 +2088,9 @@ bool GeometryHandler::impl_isCounterFunction_throw(const OUString& _sQuotedFunct aSearchOptions.searchFlag = 0x00000100; aSearchOptions.searchString = m_aCounterFunction.m_sSearchString; utl::TextSearch aTextSearch(aSearchOptions); - xub_StrLen start = 0; - xub_StrLen end = sFormula.Len(); - if ( aTextSearch.SearchFrwrd(sFormula,&start,&end) && start == 0 && end == sFormula.Len()) // counter function found + sal_Int32 start = 0; + sal_Int32 end = sFormula.Len(); + if ( aTextSearch.SearchForward(sFormula,&start,&end) && start == 0 && end == sFormula.Len()) // counter function found { const uno::Reference< report::XGroup > xGroup(aFind.first->second.second,uno::UNO_QUERY); if ( xGroup.is() ) -- cgit