summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-09-07 22:41:13 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-09-08 09:29:31 +0100
commit595ce66e708da9e742a2c418f013fc675ffc45a3 (patch)
tree73f17884c529596afd7b5777703c3a57b3cd33fa
parent7d1700b35b6b663af1646d3f0c54ee51db5435c6 (diff)
ByteString->rtl::OString, etc
-rw-r--r--sd/source/core/CustomAnimationPreset.cxx83
-rw-r--r--sd/source/filter/eppt/pptx-text.cxx4
-rw-r--r--sd/source/filter/html/htmlex.cxx14
-rw-r--r--sd/source/filter/ppt/pptinanimations.cxx45
-rw-r--r--sd/source/filter/ppt/propread.cxx4
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx92
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.cxx4
-rw-r--r--sd/source/ui/notes/TextLogger.cxx4
-rw-r--r--sd/source/ui/view/sdview3.cxx8
9 files changed, 131 insertions, 127 deletions
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index f62401fa8267..b053e854cda2 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -47,6 +47,7 @@
#include <tools/debug.hxx>
#include <rtl/uri.hxx>
+#include <rtl/strbuf.hxx>
#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -91,10 +92,9 @@ static Reference< XNameAccess > getNodeAccess( const Reference< XMultiServiceFac
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" )),
aArgs ));
}
- catch( Exception& e )
+ catch (const Exception&)
{
- (void)e;
- OSL_FAIL( "sd::getNodeAccess(), Exception catched!" );
+ OSL_FAIL( "sd::getNodeAccess(), Exception caught!" );
}
return xConfigAccess;
@@ -129,15 +129,13 @@ void implImportLabels( const Reference< XMultiServiceFactory >& xConfigProvider,
}
}
}
- catch( lang::WrappedTargetException& e )
+ catch (const lang::WrappedTargetException&)
{
- (void)e;
- OSL_FAIL( "sd::implImportLabels(), WrappedTargetException catched!" );
+ OSL_FAIL( "sd::implImportLabels(), WrappedTargetException caught!" );
}
- catch( Exception& e )
+ catch (const Exception&)
{
- (void)e;
- OSL_FAIL( "sd::implImportLabels(), Exception catched!" );
+ OSL_FAIL( "sd::implImportLabels(), Exception caught!" );
}
}
@@ -206,10 +204,9 @@ Reference< XAnimationNode > CustomAnimationPreset::create( const rtl::OUString&
return xNode;
}
}
- catch( Exception& e )
+ catch (const Exception&)
{
- (void)e;
- OSL_FAIL( "sd::CustomAnimationPresets::create(), exception catched!" );
+ OSL_FAIL( "sd::CustomAnimationPresets::create(), exception caught!" );
}
Reference< XAnimationNode > xNode;
@@ -301,25 +298,21 @@ Reference< XAnimationNode > implImportEffects( const Reference< XMultiServiceFac
if( xAnimationNodeSupplier.is() )
xRootNode = xAnimationNodeSupplier->getAnimationNode();
}
- catch( xml::sax::SAXParseException& r )
+ catch (const xml::sax::SAXParseException&)
{
- (void)r;
- OSL_FAIL( "sd::implImportEffects(), SAXParseException catched!" );
+ OSL_FAIL( "sd::implImportEffects(), SAXParseException caught!" );
}
- catch( xml::sax::SAXException& r )
+ catch (const xml::sax::SAXException&)
{
- (void)r;
- OSL_FAIL( "sd::implImportEffects(), SAXException catched!" );
+ OSL_FAIL( "sd::implImportEffects(), SAXException caught!" );
}
- catch( io::IOException& r )
+ catch (const io::IOException&)
{
- (void)r;
- OSL_FAIL( "sd::implImportEffects(), IOException catched!" );
+ OSL_FAIL( "sd::implImportEffects(), IOException caught!" );
}
- catch( Exception& r )
+ catch (const Exception&)
{
- (void)r;
- OSL_FAIL( "sd::importEffects(), Exception catched!" );
+ OSL_FAIL( "sd::importEffects(), Exception caught!" );
}
return xRootNode;
@@ -410,25 +403,21 @@ void CustomAnimationPresets::importEffects()
}
}
}
- catch( xml::sax::SAXParseException& r )
+ catch (const xml::sax::SAXParseException&)
{
- (void)r;
- OSL_FAIL( "sd::CustomAnimationPresets::importEffects(), SAXParseException catched!" );
+ OSL_FAIL( "sd::CustomAnimationPresets::importEffects(), SAXParseException caught!" );
}
- catch( xml::sax::SAXException& r )
+ catch (const xml::sax::SAXException&)
{
- (void)r;
- OSL_FAIL( "sd::CustomAnimationPresets::importEffects(), SAXException catched!" );
+ OSL_FAIL( "sd::CustomAnimationPresets::importEffects(), SAXException caught!" );
}
- catch( io::IOException& r )
+ catch (const io::IOException&)
{
- (void)r;
- OSL_FAIL( "sd::CustomAnimationPresets::importEffects(), IOException catched!" );
+ OSL_FAIL( "sd::CustomAnimationPresets::importEffects(), IOException caught!" );
}
- catch( Exception& r )
+ catch (const Exception&)
{
- (void)r;
- OSL_FAIL( "sd::CustomAnimationPresets::importEffects(), Exception catched!" );
+ OSL_FAIL( "sd::CustomAnimationPresets::importEffects(), Exception caught!" );
}
}
@@ -470,15 +459,13 @@ void CustomAnimationPresets::importResources()
const OUString aMiscPath( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.UI.Effects/Presets/Misc" ) );
importPresets( xConfigProvider, aMiscPath, maMiscPresets );
}
- catch( lang::WrappedTargetException& e )
+ catch (const lang::WrappedTargetException&)
{
- (void)e;
- OSL_FAIL( "sd::CustomAnimationPresets::importResources(), WrappedTargetException catched!" );
+ OSL_FAIL( "sd::CustomAnimationPresets::importResources(), WrappedTargetException caught!" );
}
- catch( Exception& e )
+ catch (const Exception&)
{
- (void)e;
- OSL_FAIL( "sd::CustomAnimationPresets::importResources(), Exception catched!" );
+ OSL_FAIL( "sd::CustomAnimationPresets::importResources(), Exception caught!" );
}
}
@@ -539,18 +526,18 @@ void CustomAnimationPresets::importPresets( const Reference< XMultiServiceFactor
}
}
}
- catch( Exception& e )
+ catch (const Exception&)
{
- (void)e;
- OSL_FAIL( "sd::CustomAnimationPresets::importPresets(), Exception catched!" );
+ OSL_FAIL( "sd::CustomAnimationPresets::importPresets(), Exception caught!" );
}
#ifdef DEBUG
if( aMissedPresetIds.Len() )
{
- ByteString aTmp( "sd::CustomAnimationPresets::importPresets(), invalid preset id!\n" );
- aTmp += ByteString( aMissedPresetIds, RTL_TEXTENCODING_ASCII_US );
- OSL_FAIL( aTmp.GetBuffer() );
+ rtl::OStringBuffer aTmp(RTL_CONSTASCII_STRINGPARAM("sd::CustomAnimationPresets::importPresets(), invalid preset id!\n"));
+ aTmp.append(rtl::OUStringToOString(aMissedPresetIds,
+ RTL_TEXTENCODING_ASCII_US));
+ OSL_FAIL(aTmp.getStr());
}
#endif
}
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index b1a38fa52482..67e3535a5a21 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -905,8 +905,8 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
nIndex++;
if ( aGraphicURL.Len() > nIndex )
{
- ByteString aUniqueId( aGraphicURL.Copy(nIndex, aGraphicURL.Len() - nIndex), RTL_TEXTENCODING_UTF8 );
- if ( aUniqueId.Len() )
+ rtl::OString aUniqueId(rtl::OUStringToOString(aGraphicURL.Copy(nIndex, aGraphicURL.Len() - nIndex), RTL_TEXTENCODING_UTF8));
+ if ( !aUniqueId.isEmpty() )
{
nBulletId = rBuProv.GetId( aUniqueId, aBuGraSize );
if ( nBulletId != 0xffff )
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 8054c1af637f..4cd903183897 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -1175,8 +1175,9 @@ bool HtmlExport::WriteHtml( const String& rFileName, bool bAddExtension, const S
nErr = aFile.createStream(aFull , pStr);
if(nErr == 0)
{
- ByteString aStr( rHtmlData , RTL_TEXTENCODING_UTF8 ) ;
- *pStr << aStr.GetBuffer();
+ rtl::OString aStr(rtl::OUStringToOString(rHtmlData,
+ RTL_TEXTENCODING_UTF8));
+ *pStr << aStr.getStr();
nErr = aFile.close();
}
@@ -2908,11 +2909,11 @@ bool HtmlExport::CopyScript( const String& rPath, const String& rSource, const S
if( pIStm )
{
- ByteString aLine;
+ rtl::OString aLine;
while( pIStm->ReadLine( aLine ) )
{
- aScript.AppendAscii( aLine.GetBuffer() );
+ aScript.AppendAscii( aLine.getStr() );
if( bUnix )
{
aScript.AppendAscii( "\n" );
@@ -2956,8 +2957,9 @@ bool HtmlExport::CopyScript( const String& rPath, const String& rSource, const S
nErr = aFile.createStream(aDest, pStr);
if(nErr == 0)
{
- ByteString aStr( aScript, RTL_TEXTENCODING_UTF8 );
- *pStr << aStr.GetBuffer();
+ rtl::OString aStr(rtl::OUStringToOString(aScript,
+ RTL_TEXTENCODING_UTF8));
+ *pStr << aStr.getStr();
nErr = aFile.close();
}
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 01d617e322cf..cd009e4f1471 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -3274,9 +3274,9 @@ void AnimationImporter::dump_atom( const Atom* pAtom, bool bNewLine )
}
else if( aValue >>= aString )
{
- UniString aTmp( aString );
- ByteString aStr( aTmp, RTL_TEXTENCODING_UTF8 );
- fprintf(mpFile, " value=\"%s\"", aStr.GetBuffer() );
+ fprintf(mpFile, " value=\"%s\"",
+ rtl::OUStringToOString(aString,
+ RTL_TEXTENCODING_UTF8).getStr());
}
else if( aValue >>= fDouble )
{
@@ -3426,9 +3426,8 @@ void AnimationImporter::dump( Any& rAny )
}
else if( rAny >>= aString )
{
- UniString aTmp(aString);
- ByteString aStr( aTmp, RTL_TEXTENCODING_UTF8 );
- fprintf( mpFile, "%s", aStr.GetBuffer() );
+ fprintf( mpFile, "%s", rtl::OUStringToOString(aString,
+ RTL_TEXTENCODING_UTF8).getStr() );
}
else if( rAny >>= nInt )
{
@@ -3642,9 +3641,9 @@ void AnimationImporter::dump( const PropertySet& rSet )
rtl::OUString aString;
if( aAny >>= aString )
{
- UniString aTmp(aString);
- ByteString aStr( aTmp, RTL_TEXTENCODING_UTF8 );
- fprintf( mpFile, " id=\"%s\"", aStr.GetBuffer() );
+ fprintf( mpFile, " id=\"%s\"",
+ rtl::OUStringToOString(aString,
+ RTL_TEXTENCODING_UTF8).getStr() );
bKnown = true;
}
}
@@ -3655,9 +3654,9 @@ void AnimationImporter::dump( const PropertySet& rSet )
rtl::OUString aString;
if( aAny >>= aString )
{
- UniString aTmp(aString);
- ByteString aStr( aTmp, RTL_TEXTENCODING_UTF8 );
- fprintf( mpFile, " eventFilter=\"%s\"", aStr.GetBuffer() );
+ fprintf( mpFile, " eventFilter=\"%s\"",
+ rtl::OUStringToOString(aString,
+ RTL_TEXTENCODING_UTF8).getStr() );
bKnown = true;
}
}
@@ -3678,9 +3677,9 @@ void AnimationImporter::dump( const PropertySet& rSet )
rtl::OUString aString;
if( aAny >>= aString )
{
- UniString aTmp(aString);
- ByteString aStr( aTmp, RTL_TEXTENCODING_UTF8 );
- fprintf( mpFile, " timeFilter=\"%s\"", aStr.GetBuffer() );
+ fprintf( mpFile, " timeFilter=\"%s\"",
+ rtl::OUStringToOString(aString,
+ RTL_TEXTENCODING_UTF8).getStr() );
bKnown = true;
}
}
@@ -3691,9 +3690,9 @@ void AnimationImporter::dump( const PropertySet& rSet )
rtl::OUString aString;
if( aAny >>= aString )
{
- UniString aTmp(aString);
- ByteString aStr( aTmp, RTL_TEXTENCODING_UTF8 );
- fprintf( mpFile, " runtimeContext=\"%s\"", aStr.GetBuffer() );
+ fprintf( mpFile, " runtimeContext=\"%s\"",
+ rtl::OUStringToOString(aString,
+ RTL_TEXTENCODING_UTF8).getStr() );
bKnown = true;
}
}
@@ -3772,9 +3771,8 @@ void AnimationImporter::dump( const char * pText )
void AnimationImporter::dump( const rtl::OUString& rString )
{
- UniString aTmp( rString );
- ByteString aStr( aTmp, RTL_TEXTENCODING_UTF8 );
- fprintf( mpFile, aStr.GetBuffer() );
+ fprintf( mpFile, rtl::OUStringToOString(rString,
+ RTL_TEXTENCODING_UTF8).getStr() );
}
void AnimationImporter::dump( const char * pText, sal_Int32 nInt )
@@ -3794,9 +3792,8 @@ void AnimationImporter::dump( const char * pText, const char * pText2 )
void AnimationImporter::dump( const char * pText, const OUString& rString )
{
- UniString aTmp( rString );
- ByteString aStr( aTmp, RTL_TEXTENCODING_UTF8 );
- fprintf( mpFile, pText, aStr.GetBuffer() );
+ fprintf( mpFile, pText, rtl::OUStringToOString(rString,
+ RTL_TEXTENCODING_UTF8).getStr() );
}
#else
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 291cf2c1e300..b16f8dca8fb1 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -130,7 +130,7 @@ sal_Bool PropItem::Read( String& rString, sal_uInt32 nStringType, sal_Bool bAlig
if ( pString[ nItemSize - 1 ] == 0 )
{
if ( nItemSize > 1 )
- rString = String( ByteString( pString ), mnTextEnc );
+ rString = rtl::OUString(pString, rtl_str_getLength(pString), mnTextEnc);
else
rString = String();
bRetValue = sal_True;
@@ -311,7 +311,7 @@ sal_Bool Section::GetDictionary( Dictionary& rDict )
aString = String( pWString, lcl_getMaxSafeStrLen(nSize) );
}
else
- aString = String( ByteString( pString, lcl_getMaxSafeStrLen(nSize) ), mnTextEnc );
+ aString = rtl::OUString(pString, lcl_getMaxSafeStrLen(nSize), mnTextEnc);
delete[] pString;
}
catch( const std::bad_alloc& )
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index eb531436424c..d384747e27e2 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -29,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
#include <rtl/logfile.hxx>
+#include <rtl/strbuf.hxx>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
@@ -261,7 +262,7 @@ sal_Int32 ReadThroughComponent(
{
xParser->parseStream( aParserInput );
}
- catch( xml::sax::SAXParseException& r )
+ catch (const xml::sax::SAXParseException& r)
{
// sax parser sends wrapped exceptions,
// try to find the original one
@@ -285,9 +286,11 @@ sal_Int32 ReadThroughComponent(
return ERRCODE_SFX_WRONGPASSWORD;
#if OSL_DEBUG_LEVEL > 1
- ByteString aError( "SAX parse exception catched while importing:\n" );
- aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
- OSL_FAIL( aError.GetBuffer() );
+ rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM(
+ "SAX parse exception caught while importing:\n"));
+ aError.append(rtl::OUStringToOString(r.Message,
+ RTL_TEXTENCODING_ASCII_US));
+ OSL_FAIL(aError.getStr());
#endif
String sErr( String::CreateFromInt32( r.LineNumber ));
@@ -309,7 +312,7 @@ sal_Int32 ReadThroughComponent(
ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR );
}
}
- catch( xml::sax::SAXException& r )
+ catch (const xml::sax::SAXException& r)
{
packages::zip::ZipIOException aBrokenPackage;
if ( r.WrappedException >>= aBrokenPackage )
@@ -319,39 +322,50 @@ sal_Int32 ReadThroughComponent(
return ERRCODE_SFX_WRONGPASSWORD;
#if OSL_DEBUG_LEVEL > 1
- ByteString aError( "SAX exception catched while importing:\n" );
- aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
- OSL_FAIL( aError.GetBuffer() );
+ rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM(
+ "SAX exception caught while importing:\n"));
+ aError.append(rtl::OUStringToOString(r.Message,
+ RTL_TEXTENCODING_ASCII_US));
+ OSL_FAIL(aError.getStr());
#endif
return SD_XML_READERROR;
}
- catch( packages::zip::ZipIOException& r )
+ catch (const packages::zip::ZipIOException& r)
{
- (void)r;
#if OSL_DEBUG_LEVEL > 1
- ByteString aError( "Zip exception catched while importing:\n" );
- aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
- OSL_FAIL( aError.GetBuffer() );
+ rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM(
+ "Zip exception caught while importing:\n"));
+ aError.append(rtl::OUStringToOString(r.Message,
+ RTL_TEXTENCODING_ASCII_US));
+ OSL_FAIL(aError.getStr());
+#else
+ (void)r;
#endif
return ERRCODE_IO_BROKENPACKAGE;
}
- catch( io::IOException& r )
+ catch (const io::IOException& r)
{
- (void)r;
#if OSL_DEBUG_LEVEL > 1
- ByteString aError( "IO exception catched while importing:\n" );
- aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
- OSL_FAIL( aError.GetBuffer() );
+ rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM(
+ "IO exception caught while importing:\n"));
+ aError.append(rtl::OUStringToOString(r.Message,
+ RTL_TEXTENCODING_ASCII_US));
+ OSL_FAIL(aError.getStr());
+#else
+ (void)r;
#endif
return SD_XML_READERROR;
}
- catch( uno::Exception& r )
+ catch (const uno::Exception& r)
{
- (void)r;
#if OSL_DEBUG_LEVEL > 1
- ByteString aError( "uno exception catched while importing:\n" );
- aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
- OSL_FAIL( aError.GetBuffer() );
+ rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM(
+ "uno exception caught while importing:\n"));
+ aError.append(rtl::OUStringToOString(r.Message,
+ RTL_TEXTENCODING_ASCII_US));
+ OSL_FAIL(aError.getStr());
+#else
+ (void)r;
#endif
return SD_XML_READERROR;
}
@@ -381,7 +395,7 @@ sal_Int32 ReadThroughComponent(
{
bContainsStream = xStorage->isStreamElement(sStreamName);
}
- catch( container::NoSuchElementException& )
+ catch (const container::NoSuchElementException&)
{
}
@@ -400,7 +414,7 @@ sal_Int32 ReadThroughComponent(
{
bContainsStream = xStorage->isStreamElement(sStreamName);
}
- catch( container::NoSuchElementException& )
+ catch (const container::NoSuchElementException&)
{
}
@@ -442,15 +456,15 @@ sal_Int32 ReadThroughComponent(
pFilterName, rFilterArguments,
rName, bMustBeSuccessfull, bEncrypted );
}
- catch ( packages::WrongPasswordException& )
+ catch (const packages::WrongPasswordException&)
{
return ERRCODE_SFX_WRONGPASSWORD;
}
- catch( packages::zip::ZipIOException& )
+ catch (const packages::zip::ZipIOException&)
{
return ERRCODE_IO_BROKENPACKAGE;
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{}
return SD_XML_READERROR;
@@ -462,8 +476,8 @@ sal_Bool SdXMLFilter::Import( ErrCode& nError )
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sd", "cl93746", "SdXMLFilter::Import" );
#ifdef TIMELOG
- ByteString aFile( mrMedium.GetName(), RTL_TEXTENCODING_ASCII_US );
- RTL_LOGFILE_CONTEXT_TRACE1( aLog, "importing %s", aFile.GetBuffer() );
+ rtl::OString aFile(rtl::OUStringToOString(mrMedium.GetName(), RTL_TEXTENCODING_ASCII_US));
+ RTL_LOGFILE_CONTEXT_TRACE1( aLog, "importing %s", aFile.getStr() );
#endif
sal_uInt32 nRet = 0;
@@ -775,7 +789,7 @@ sal_Bool SdXMLFilter::Import( ErrCode& nError )
if( xDashes.is() )
xDashes->removeByName( aName );
}
- catch( Exception& )
+ catch (const Exception&)
{
OSL_FAIL("sd::SdXMLFilter::Import(), exception during clearing of unused named items");
}
@@ -852,8 +866,8 @@ sal_Bool SdXMLFilter::Export()
{
#ifdef TIMELOG
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sd", "cl93746", "SdXMLFilter::Export" );
- ByteString aFile( mrMedium.GetName(), RTL_TEXTENCODING_ASCII_US );
- RTL_LOGFILE_CONTEXT_TRACE1( aLog, "exporting %s", aFile.GetBuffer() );
+ rtl::OString aFile(rtl::OUStringToOString(mrMedium.GetName(), RTL_TEXTENCODING_ASCII_US));
+ RTL_LOGFILE_CONTEXT_TRACE1( aLog, "exporting %s", aFile.getStr() );
#endif
SvXMLEmbeddedObjectHelper* pObjectHelper = NULL;
@@ -1104,12 +1118,16 @@ sal_Bool SdXMLFilter::Export()
}
}
}
- catch(uno::Exception &e)
+ catch (const uno::Exception &e)
{
#if OSL_DEBUG_LEVEL > 1
- ByteString aError( "uno Exception caught while exporting:\n" );
- aError += ByteString( String( e.Message), RTL_TEXTENCODING_ASCII_US );
- OSL_FAIL( aError.GetBuffer() );
+ rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM(
+ "uno Exception caught while exporting:\n"));
+ aError.append(rtl::OUStringToOString(e.Message,
+ RTL_TEXTENCODING_ASCII_US));
+ OSL_FAIL(aError.getStr());
+#else
+ (void)e;
#endif
bDocRet = sal_False;
}
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 21c9093b2405..a398e766fc32 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -671,8 +671,8 @@ void CustomAnimationCreateDialog::setPosition()
E_TABDIALOG, String::CreateFromInt32( DLG_CUSTOMANIMATION_CREATE ) );
if ( aDlgOpt.Exists() )
{
- SetWindowState( ByteString( aDlgOpt.GetWindowState().getStr(),
- RTL_TEXTENCODING_ASCII_US ) );
+ SetWindowState( rtl::OUStringToOString(aDlgOpt.GetWindowState(),
+ RTL_TEXTENCODING_ASCII_US) );
}
else
{
diff --git a/sd/source/ui/notes/TextLogger.cxx b/sd/source/ui/notes/TextLogger.cxx
index f7645ef92ea8..1aea50cc55ae 100644
--- a/sd/source/ui/notes/TextLogger.cxx
+++ b/sd/source/ui/notes/TextLogger.cxx
@@ -73,8 +73,8 @@ void TextLogger::AppendText (const char* sText)
void TextLogger::AppendText (const String& sText)
{
- ByteString s(sText, RTL_TEXTENCODING_ISO_8859_1);
- OSL_TRACE("%s", s.GetBuffer());
+ rtl::OString s(rtl::OUStringToOString(sText, RTL_TEXTENCODING_ISO_8859_1));
+ OSL_TRACE("%s", s.getStr());
if (mpEditWindow != NULL)
mpEditWindow->InsertText (sText);
}
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index a36845aeeb71..eae82f335750 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -342,11 +342,11 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
{
xStm->Seek( 0 );
- ByteString aLine;
- while( xStm->ReadLine(aLine) )
+ rtl::OString aLine;
+ while (xStm->ReadLine(aLine))
{
- xub_StrLen x = aLine.Search( "\\trowd" );
- if( x != STRING_NOTFOUND )
+ sal_Int32 x = aLine.indexOf( "\\trowd" );
+ if (x != -1)
{
bTable = true;
nFormat = FORMAT_RTF;