Kaydet (Commit) 6a7250d7 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

String to rtl::OUString & reduce indent levels.

üst 25e019f4
...@@ -58,16 +58,17 @@ void ScGlobal::InitAddIns() ...@@ -58,16 +58,17 @@ void ScGlobal::InitAddIns()
{ {
// multi paths separated by semicolons // multi paths separated by semicolons
SvtPathOptions aPathOpt; SvtPathOptions aPathOpt;
String aMultiPath = aPathOpt.GetAddinPath(); rtl::OUString aMultiPath = aPathOpt.GetAddinPath();
if ( aMultiPath.Len() > 0 ) if (aMultiPath.isEmpty())
{ return;
xub_StrLen nTokens = comphelper::string::getTokenCount(aMultiPath, ';');
xub_StrLen nIndex = 0; sal_Int32 nTokens = comphelper::string::getTokenCount(aMultiPath, ';');
for ( xub_StrLen j=0; j<nTokens; j++ ) for (sal_Int32 j = 0; j < nTokens; ++j)
{
String aPath( aMultiPath.GetToken( 0, ';', nIndex ) );
if ( aPath.Len() > 0 )
{ {
rtl::OUString aPath = comphelper::string::getToken(aMultiPath, j, ';');
if (aPath.isEmpty())
continue;
// use LocalFileHelper to convert the path to a URL that always points // use LocalFileHelper to convert the path to a URL that always points
// to the file on the server // to the file on the server
rtl::OUString aUrl; rtl::OUString aUrl;
...@@ -105,7 +106,7 @@ void ScGlobal::InitAddIns() ...@@ -105,7 +106,7 @@ void ScGlobal::InitAddIns()
{ {
do do
{ {
rtl::OUString aId( xContentAccess->queryContentIdentifierString() ); rtl::OUString aId = xContentAccess->queryContentIdentifierString();
InitExternalFunc( aId ); InitExternalFunc( aId );
} }
while ( xResultSet->next() ); while ( xResultSet->next() );
...@@ -113,22 +114,19 @@ void ScGlobal::InitAddIns() ...@@ -113,22 +114,19 @@ void ScGlobal::InitAddIns()
} }
catch ( Exception& ) catch ( Exception& )
{ {
OSL_FAIL( "ResultSetException catched!" ); OSL_FAIL( "ResultSetException caught!" );
} }
} }
} }
catch ( Exception& ) catch ( Exception& )
{ {
OSL_FAIL( "Exception catched!" ); OSL_FAIL( "Exception caught!" );
} }
catch ( ... ) catch ( ... )
{ {
OSL_FAIL( "unexpected exception caught!" ); OSL_FAIL( "unexpected exception caught!" );
} }
} }
}
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment