summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-08-28 17:46:16 +0200
committerNoel Grandin <noel@peralex.com>2013-08-29 09:30:19 +0200
commitec7c28017953c43cce2b326c63f66d8051e0b705 (patch)
tree158e6f41e22b20610e2358f8d58e0ebedfa3de6b /sfx2
parent1451499bdbe4258708334f53ea6198965159bf7f (diff)
convert sfx2/source/bastyp/* from String to OUString
Change-Id: I984ca2833d65ce37967058b1cb5800c61defe88c
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx44
-rw-r--r--sfx2/source/bastyp/frmhtml.cxx17
-rw-r--r--sfx2/source/bastyp/frmhtmlw.cxx61
-rw-r--r--sfx2/source/bastyp/helper.cxx26
-rw-r--r--sfx2/source/bastyp/progress.cxx16
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx46
6 files changed, 103 insertions, 107 deletions
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 1d13a3dddcfa..5f5285011908 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -126,7 +126,7 @@ static void CreateFilterArr()
}
//----------------------------------------------------------------
-inline String ToUpper_Impl( const String &rStr )
+inline OUString ToUpper_Impl( const OUString &rStr )
{
return SvtSysLocale().GetCharClass().uppercase( rStr );
}
@@ -198,8 +198,8 @@ const SfxFilter* SfxFilterContainer::GetDefaultFilter_Impl( const OUString& rNam
return NULL;
// For the following code we need some additional information.
- String sServiceName = aOpt.GetFactoryName(eFactory);
- String sDefaultFilter = aOpt.GetFactoryDefaultFilter(eFactory);
+ OUString sServiceName = aOpt.GetFactoryName(eFactory);
+ OUString sDefaultFilter = aOpt.GetFactoryDefaultFilter(eFactory);
// Try to get the default filter. Dont fiorget to verify it.
// May the set default filter does not exists any longer or
@@ -509,8 +509,8 @@ sal_Bool SfxFilterMatcher::IsFilterInstalled_Impl( const SfxFilter* pFilter )
if ( pFilter->GetFilterFlags() & SFX_FILTER_MUSTINSTALL )
{
// Here could a re-installation be offered
- String aText( SfxResId(STR_FILTER_NOT_INSTALLED).toString() );
- aText.SearchAndReplaceAscii( "$(FILTER)", pFilter->GetUIName() );
+ OUString aText( SfxResId(STR_FILTER_NOT_INSTALLED).toString() );
+ aText = aText.replaceFirst( "$(FILTER)", pFilter->GetUIName() );
QueryBox aQuery( NULL, WB_YES_NO | WB_DEF_YES, aText );
short nRet = aQuery.Execute();
if ( nRet == RET_YES )
@@ -527,8 +527,8 @@ sal_Bool SfxFilterMatcher::IsFilterInstalled_Impl( const SfxFilter* pFilter )
}
else if ( pFilter->GetFilterFlags() & SFX_FILTER_CONSULTSERVICE )
{
- String aText( SfxResId(STR_FILTER_CONSULT_SERVICE).toString() );
- aText.SearchAndReplaceAscii( "$(FILTER)", pFilter->GetUIName() );
+ OUString aText( SfxResId(STR_FILTER_CONSULT_SERVICE).toString() );
+ aText = aText.replaceFirst( "$(FILTER)", pFilter->GetUIName() );
InfoBox ( NULL, aText ).Execute();
return sal_False;
}
@@ -601,9 +601,9 @@ sal_uInt32 SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, const SfxFilter**
SFX_ITEMSET_ARG( rMedium.GetItemSet(), pFlags, SfxStringItem, SID_OPTIONS, sal_False);
if ( !bHidden && pFlags )
{
- String aFlags( pFlags->GetValue() );
- aFlags.ToUpperAscii();
- if( STRING_NOTFOUND != aFlags.Search( 'H' ) )
+ OUString aFlags( pFlags->GetValue() );
+ aFlags = aFlags.toAsciiUpperCase();
+ if( -1 != aFlags.indexOf( 'H' ) )
bHidden = sal_True;
}
*ppFilter = pFilter;
@@ -721,14 +721,14 @@ const SfxFilter* SfxFilterMatcher::GetFilter4Extension( const OUString& rExt, Sf
SfxFilterFlags nFlags = pFilter->GetFilterFlags();
if ( (nFlags & nMust) == nMust && !(nFlags & nDont ) )
{
- String sWildCard = ToUpper_Impl( pFilter->GetWildcard().getGlob() );
- String sExt = ToUpper_Impl( rExt );
+ OUString sWildCard = ToUpper_Impl( pFilter->GetWildcard().getGlob() );
+ OUString sExt = ToUpper_Impl( rExt );
- if (!sExt.Len())
+ if (sExt.isEmpty())
continue;
- if (sExt.GetChar(0) != (sal_Unicode)'.')
- sExt.Insert((sal_Unicode)'.', 0);
+ if (sExt[0] != (sal_Unicode)'.')
+ sExt = "." + sExt;
WildCard aCheck(sWildCard, ';');
if (aCheck.Matches(sExt))
@@ -740,9 +740,9 @@ const SfxFilter* SfxFilterMatcher::GetFilter4Extension( const OUString& rExt, Sf
}
// Use extension without dot!
- String sExt( rExt );
- if ( sExt.Len() && ( sExt.GetChar(0) == (sal_Unicode)'.' ))
- sExt.Erase(0,1);
+ OUString sExt( rExt );
+ if ( !sExt.isEmpty() && ( sExt[0] == (sal_Unicode)'.' ))
+ sExt = sExt.copy(1);
com::sun::star::uno::Sequence < com::sun::star::beans::NamedValue > aSeq(1);
aSeq[0].Name = OUString("Extensions");
@@ -786,9 +786,9 @@ const SfxFilter* SfxFilterMatcher::GetFilter4UIName( const OUString& rName, SfxF
const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const OUString& rName, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
{
- String aName( rName );
- sal_uInt16 nIndex = aName.SearchAscii(": ");
- if ( nIndex != STRING_NOTFOUND )
+ OUString aName( rName );
+ sal_Int32 nIndex = aName.indexOf(": ");
+ if ( nIndex != -1 )
{
SAL_WARN( "sfx.bastyp", "Old filter name used!");
aName = rName.copy( nIndex + 2 );
@@ -842,7 +842,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const OUString& rName,
IMPL_STATIC_LINK( SfxFilterMatcher, MaybeFileHdl_Impl, OUString*, pString )
{
const SfxFilter* pFilter = pThis->GetFilter4Extension( *pString, SFX_FILTER_IMPORT );
- if (pFilter && !pFilter->GetWildcard().Matches( String() ) &&
+ if (pFilter && !pFilter->GetWildcard().Matches( OUString() ) &&
!pFilter->GetWildcard().Matches(OUString("*.*")) &&
!pFilter->GetWildcard().Matches(OUString('*'))
)
diff --git a/sfx2/source/bastyp/frmhtml.cxx b/sfx2/source/bastyp/frmhtml.cxx
index 08daee891a87..ecdc5ee5a63b 100644
--- a/sfx2/source/bastyp/frmhtml.cxx
+++ b/sfx2/source/bastyp/frmhtml.cxx
@@ -73,9 +73,8 @@ void SfxFrameHTMLParser::ParseFrameOptions(
}
case HTML_O_SRC:
pFrame->SetURL(
- String(
INetURLObject::GetAbsURL(
- rBaseURL, aOption.GetString())) );
+ rBaseURL, aOption.GetString()) );
break;
case HTML_O_NAME:
pFrame->SetName( aOption.GetString() );
@@ -101,10 +100,10 @@ void SfxFrameHTMLParser::ParseFrameOptions(
break;
case HTML_O_FRAMEBORDER:
{
- String aStr = aOption.GetString();
+ OUString aStr = aOption.GetString();
sal_Bool bBorder = sal_True;
- if ( aStr.EqualsIgnoreCaseAscii("NO") ||
- aStr.EqualsIgnoreCaseAscii("0") )
+ if ( aStr.equalsIgnoreAsciiCase("NO") ||
+ aStr.equalsIgnoreAsciiCase("0") )
bBorder = sal_False;
pFrame->SetFrameBorder( bBorder );
break;
@@ -115,17 +114,17 @@ void SfxFrameHTMLParser::ParseFrameOptions(
default:
if (aOption.GetTokenString().equalsIgnoreAsciiCase(HTML_O_READONLY))
{
- String aStr = aOption.GetString();
+ OUString aStr = aOption.GetString();
sal_Bool bReadonly = sal_True;
- if ( aStr.EqualsIgnoreCaseAscii("FALSE") )
+ if ( aStr.equalsIgnoreAsciiCase("FALSE") )
bReadonly = sal_False;
pFrame->SetReadOnly( bReadonly );
}
else if (aOption.GetTokenString().equalsIgnoreAsciiCase(HTML_O_EDIT))
{
- String aStr = aOption.GetString();
+ OUString aStr = aOption.GetString();
sal_Bool bEdit = sal_True;
- if ( aStr.EqualsIgnoreCaseAscii("FALSE") )
+ if ( aStr.equalsIgnoreAsciiCase("FALSE") )
bEdit = sal_False;
pFrame->SetEditable( bEdit );
}
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index 7be9957c9d58..3a8a40b19e93 100644
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -96,8 +96,8 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL,
if( pCharSet )
{
- String aContentType = OUString(sHTML_MIME_text_html);
- aContentType.AppendAscii( pCharSet );
+ OUString aContentType(sHTML_MIME_text_html);
+ aContentType += OUString(pCharSet, strlen(pCharSet), RTL_TEXTENCODING_UTF8);
OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_content_type, aContentType, sal_True,
eDestEnc, pNonConvertableChars );
}
@@ -109,8 +109,8 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL,
HTMLOutFuncs::Out_AsciiTag( rStrm, OOO_STRING_SVTOOLS_HTML_title );
if( i_xDocProps.is() )
{
- const String& rTitle = i_xDocProps->getTitle();
- if( rTitle.Len() )
+ const OUString& rTitle = i_xDocProps->getTitle();
+ if( !rTitle.isEmpty() )
HTMLOutFuncs::Out_String( rStrm, rTitle, eDestEnc, pNonConvertableChars );
}
HTMLOutFuncs::Out_AsciiTag( rStrm, OOO_STRING_SVTOOLS_HTML_title, sal_False );
@@ -118,8 +118,8 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL,
// Target-Frame
if( i_xDocProps.is() )
{
- const String& rTarget = i_xDocProps->getDefaultTarget();
- if( rTarget.Len() )
+ const OUString& rTarget = i_xDocProps->getDefaultTarget();
+ if( !rTarget.isEmpty() )
{
rStrm << sNewLine;
if( pIndent )
@@ -135,10 +135,10 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL,
}
// Who we are
- String sGenerator( SfxResId(STR_HTML_GENERATOR).toString() );
+ OUString sGenerator( SfxResId(STR_HTML_GENERATOR).toString() );
OUString os( "$_OS" );
::rtl::Bootstrap::expandMacros(os);
- sGenerator.SearchAndReplaceAscii( "%1", os );
+ sGenerator = sGenerator.replaceFirst( "%1", os );
OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_generator, sGenerator, sal_False, eDestEnc, pNonConvertableChars );
if( i_xDocProps.is() )
@@ -147,16 +147,15 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL,
if( (i_xDocProps->getAutoloadSecs() != 0) ||
!i_xDocProps->getAutoloadURL().isEmpty() )
{
- String sContent = OUString::number(
+ OUString sContent = OUString::number(
i_xDocProps->getAutoloadSecs() );
- const String &rReloadURL = i_xDocProps->getAutoloadURL();
- if( rReloadURL.Len() )
+ const OUString &rReloadURL = i_xDocProps->getAutoloadURL();
+ if( !rReloadURL.isEmpty() )
{
- sContent.AppendAscii( ";URL=" );
- sContent += String(
- URIHelper::simpleNormalizedMakeRelative(
- rBaseURL, rReloadURL));
+ sContent += ";URL=";
+ sContent += URIHelper::simpleNormalizedMakeRelative(
+ rBaseURL, rReloadURL);
}
OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_refresh, sContent, sal_True,
@@ -164,8 +163,8 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL,
}
// Author
- const String& rAuthor = i_xDocProps->getAuthor();
- if( rAuthor.Len() )
+ const OUString& rAuthor = i_xDocProps->getAuthor();
+ if( !rAuthor.isEmpty() )
OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_author, rAuthor, sal_False,
eDestEnc, pNonConvertableChars );
@@ -173,15 +172,15 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL,
::util::DateTime uDT = i_xDocProps->getCreationDate();
Date aD(uDT.Day, uDT.Month, uDT.Year);
Time aT(uDT.Hours, uDT.Minutes, uDT.Seconds, uDT.NanoSeconds);
- String sOut = OUString::number(aD.GetDate());
- sOut += ';';
+ OUString sOut = OUString::number(aD.GetDate());
+ sOut += ";";
sOut += OUString::number(aT.GetTime());
OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_created, sOut, sal_False,
eDestEnc, pNonConvertableChars );
// changedby
- const String& rChangedBy = i_xDocProps->getModifiedBy();
- if( rChangedBy.Len() )
+ const OUString& rChangedBy = i_xDocProps->getModifiedBy();
+ if( !rChangedBy.isEmpty() )
OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changedby, rChangedBy, sal_False,
eDestEnc, pNonConvertableChars );
@@ -190,27 +189,27 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL,
Date aD2(uDT.Day, uDT.Month, uDT.Year);
Time aT2(uDT.Hours, uDT.Minutes, uDT.Seconds, uDT.NanoSeconds);
sOut = OUString::number(aD2.GetDate());
- sOut += ';';
+ sOut += ";";
sOut += OUString::number(aT2.GetTime());
OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changed, sOut, sal_False,
eDestEnc, pNonConvertableChars );
// Subject
- const String& rTheme = i_xDocProps->getSubject();
- if( rTheme.Len() )
+ const OUString& rTheme = i_xDocProps->getSubject();
+ if( !rTheme.isEmpty() )
OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_classification, rTheme, sal_False,
eDestEnc, pNonConvertableChars );
// Description
- const String& rComment = i_xDocProps->getDescription();
- if( rComment.Len() )
+ const OUString& rComment = i_xDocProps->getDescription();
+ if( !rComment.isEmpty() )
OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_description, rComment, sal_False,
eDestEnc, pNonConvertableChars);
// Keywords
- String Keywords = ::comphelper::string::convertCommaSeparated(
+ OUString Keywords = ::comphelper::string::convertCommaSeparated(
i_xDocProps->getKeywords());
- if( Keywords.Len() )
+ if( !Keywords.isEmpty() )
OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_keywords, Keywords, sal_False,
eDestEnc, pNonConvertableChars);
@@ -233,7 +232,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL,
uno::TypeClass_STRING);
OUString str;
aStr >>= str;
- String valstr(comphelper::string::stripEnd(str, ' '));
+ OUString valstr(comphelper::string::stripEnd(str, ' '));
OutMeta( rStrm, pIndent, name, valstr, sal_False,
eDestEnc, pNonConvertableChars );
}
@@ -257,8 +256,8 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor(
uno::Any aAny = xSet->getPropertyValue("FrameURL");
if ( (aAny >>= aStr) && !aStr.isEmpty() )
{
- String aURL = INetURLObject( aStr ).GetMainURL( INetURLObject::DECODE_TO_IURI );
- if( aURL.Len() )
+ OUString aURL = INetURLObject( aStr ).GetMainURL( INetURLObject::DECODE_TO_IURI );
+ if( !aURL.isEmpty() )
{
aURL = URIHelper::simpleNormalizedMakeRelative(
rBaseURL, aURL );
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index 3713d5462a8a..dfc3a235f344 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -94,13 +94,13 @@ std::vector<OUString> SfxContentHelper::GetResultSet( const OUString& rURL )
{
while ( xResultSet->next() )
{
- String aTitle( xRow->getString(1) );
- String aType( xRow->getString(2) );
- String aRow = aTitle;
- aRow += '\t';
+ OUString aTitle( xRow->getString(1) );
+ OUString aType( xRow->getString(2) );
+ OUString aRow = aTitle;
+ aRow += "\t";
aRow += aType;
- aRow += '\t';
- aRow += String( xContentAccess->queryContentIdentifierString() );
+ aRow += "\t";
+ aRow += xContentAccess->queryContentIdentifierString();
aList.push_back( OUString( aRow ) );
}
}
@@ -163,14 +163,14 @@ std::vector< OUString > SfxContentHelper::GetHelpTreeViewContents( const OUStrin
{
while ( xResultSet->next() )
{
- String aTitle( xRow->getString(1) );
+ OUString aTitle( xRow->getString(1) );
sal_Bool bFolder = xRow->getBoolean(2);
- String aRow = aTitle;
- aRow += '\t';
- aRow += String( xContentAccess->queryContentIdentifierString() );
- aRow += '\t';
- aRow += bFolder ? '1' : '0';
- aProperties.push_back( OUString( aRow ) );
+ OUString aRow = aTitle;
+ aRow += "\t";
+ aRow += xContentAccess->queryContentIdentifierString();
+ aRow += "\t";
+ aRow += bFolder ? "1" : "0";
+ aProperties.push_back( aRow );
}
}
catch( const ucb::CommandAbortedException& )
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index 21a234a69e0f..d3a25698ceb2 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -51,21 +51,21 @@ using namespace ::com::sun::star::task;
struct SfxProgress_Impl
{
Reference < XStatusIndicator > xStatusInd;
- String aText, aStateText;
- sal_uIntPtr nMax;
+ OUString aText, aStateText;
+ sal_uIntPtr nMax;
clock_t nCreate;
clock_t nNextReschedule;
- sal_Bool bLocked, bAllDocs;
- sal_Bool bWaitMode;
- sal_Bool bAllowRescheduling;
- sal_Bool bRunning;
+ sal_Bool bLocked, bAllDocs;
+ sal_Bool bWaitMode;
+ sal_Bool bAllowRescheduling;
+ sal_Bool bRunning;
SfxProgress* pActiveProgress;
SfxObjectShellRef xObjSh;
SfxWorkWindow* pWorkWin;
SfxViewFrame* pView;
- SfxProgress_Impl( const String& );
+ SfxProgress_Impl( const OUString& );
void Enable_Impl( sal_Bool );
};
@@ -102,7 +102,7 @@ void SfxProgress_Impl::Enable_Impl( sal_Bool bEnable )
// -----------------------------------------------------------------------
-SfxProgress_Impl::SfxProgress_Impl( const String &/*rTitle*/ )
+SfxProgress_Impl::SfxProgress_Impl( const OUString &/*rTitle*/ )
: pActiveProgress(0), pWorkWin(0), pView(0)
{
}
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index c50e0957f26b..c2c6741d803b 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -46,9 +46,9 @@
using namespace ::com::sun::star;
-sal_Char sHTML_MIME_text[] = "text/";
-sal_Char sHTML_MIME_application[] = "application/";
-sal_Char sHTML_MIME_experimental[] = "x-";
+const sal_Char sHTML_MIME_text[] = "text/";
+const sal_Char sHTML_MIME_application[] = "application/";
+const sal_Char sHTML_MIME_experimental[] = "x-";
// <INPUT TYPE=xxx>
static HTMLOptionEnum const aAreaShapeOptEnums[] =
@@ -88,7 +88,7 @@ bool SfxHTMLParser::ParseMapOptions(
{
DBG_ASSERT( pImageMap, "ParseMapOptions: No Image-Map" );
- String aName;
+ OUString aName;
for (size_t i = rOptions.size(); i; )
{
@@ -101,10 +101,10 @@ bool SfxHTMLParser::ParseMapOptions(
}
}
- if( aName.Len() )
+ if( !aName.isEmpty() )
pImageMap->SetName( aName );
- return aName.Len() > 0;
+ return !aName.isEmpty();
}
bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const OUString& rBaseURL,
@@ -116,7 +116,7 @@ bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const OUString& rBase
sal_uInt16 nShape = IMAP_OBJ_RECTANGLE;
std::vector<sal_uInt32> aCoords;
- String aName, aHRef, aAlt, aTarget, sEmpty;
+ OUString aName, aHRef, aAlt, aTarget, sEmpty;
sal_Bool bNoHRef = sal_False;
SvxMacroTableDtor aMacroTbl;
@@ -163,8 +163,8 @@ bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const OUString& rBase
IMAPOBJ_SETEVENT:
if( nEvent )
{
- String sTmp( rOption.GetString() );
- if( sTmp.Len() )
+ OUString sTmp( rOption.GetString() );
+ if( !sTmp.isEmpty() )
{
sTmp = convertLineEnd(sTmp, GetSystemLineEnd());
aMacroTbl.Insert( nEvent, SvxMacro( sTmp, sEmpty, eScrpType ));
@@ -175,7 +175,7 @@ IMAPOBJ_SETEVENT:
}
if( bNoHRef )
- aHRef.Erase();
+ aHRef = "";
sal_Bool bNewArea = sal_True;
switch( nShape )
@@ -185,7 +185,7 @@ IMAPOBJ_SETEVENT:
{
Rectangle aRect( aCoords[0], aCoords[1],
aCoords[2], aCoords[3] );
- IMapRectangleObject aMapRObj( aRect, aHRef, aAlt, String(), aTarget, aName,
+ IMapRectangleObject aMapRObj( aRect, aHRef, aAlt, OUString(), aTarget, aName,
!bNoHRef );
if( !aMacroTbl.empty() )
aMapRObj.SetMacroTable( aMacroTbl );
@@ -196,7 +196,7 @@ IMAPOBJ_SETEVENT:
if( aCoords.size() >=3 )
{
Point aPoint( aCoords[0], aCoords[1] );
- IMapCircleObject aMapCObj( aPoint, aCoords[2],aHRef, aAlt, String(),
+ IMapCircleObject aMapCObj( aPoint, aCoords[2],aHRef, aAlt, OUString(),
aTarget, aName, !bNoHRef );
if( !aMacroTbl.empty() )
aMapCObj.SetMacroTable( aMacroTbl );
@@ -210,7 +210,7 @@ IMAPOBJ_SETEVENT:
Polygon aPoly( nCount );
for( sal_uInt16 i=0; i<nCount; i++ )
aPoly[i] = Point( aCoords[2*i], aCoords[2*i+1] );
- IMapPolygonObject aMapPObj( aPoly, aHRef, aAlt, String(), aTarget, aName,
+ IMapPolygonObject aMapPObj( aPoly, aHRef, aAlt, OUString(), aTarget, aName,
!bNoHRef );
if( !aMacroTbl.empty() )
aMapPObj.SetMacroTable( aMacroTbl );
@@ -279,27 +279,25 @@ void SfxHTMLParser::GetScriptType_Impl( SvKeyValueIterator *pHTTPHeader )
{
if( !aKV.GetValue().isEmpty() )
{
- String aTmp( aKV.GetValue() );
- if( aTmp.EqualsIgnoreCaseAscii( sHTML_MIME_text, 0, 5 ) )
- aTmp.Erase( 0, 5 );
- else if( aTmp.EqualsIgnoreCaseAscii( sHTML_MIME_application,
- 0, 12 ) )
- aTmp.Erase( 0, 12 );
+ OUString aTmp( aKV.GetValue() );
+ if( aTmp.startsWithIgnoreAsciiCase( sHTML_MIME_text ) )
+ aTmp = aTmp.copy( 5 );
+ else if( aTmp.startsWithIgnoreAsciiCase( sHTML_MIME_application ) )
+ aTmp = aTmp.copy( 12 );
else
break;
- if( aTmp.EqualsIgnoreCaseAscii( sHTML_MIME_experimental, 0,
- 2 ) )
+ if( aTmp.startsWithIgnoreAsciiCase( sHTML_MIME_experimental ) )
{
- aTmp.Erase( 0, 2 );
+ aTmp = aTmp.copy( 2 );
}
- if( aTmp.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_LG_starbasic ) )
+ if( aTmp.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_LG_starbasic ) )
{
eScriptType = STARBASIC;
aScriptType = SVX_MACRO_LANGUAGE_STARBASIC;
}
- if( !aTmp.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_LG_javascript ) )
+ if( !aTmp.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_LG_javascript ) )
{
eScriptType = EXTENDED_STYPE;
aScriptType = aTmp;