filter,formula: prefer passing OUString by reference

Change-Id: I332f1a593853283b72ecf4dfd82b36cc091661b4
This commit is contained in:
Noel Grandin 2014-03-14 13:23:06 +02:00
parent c58fe8c85f
commit d593f45886
11 changed files with 13 additions and 14 deletions

View File

@ -177,7 +177,7 @@ FlashExportFilter::FlashExportFilter(const Reference< XComponentContext > &rxCon
OUString exportBackground(FlashExporter &aFlashExporter, Reference< XDrawPage > xDrawPage, OUString sPath, sal_uInt32 nPage, const char* suffix)
OUString exportBackground(FlashExporter &aFlashExporter, Reference< XDrawPage > xDrawPage, const OUString& sPath, sal_uInt32 nPage, const char* suffix)
{
OUString filename = STR("slide") + VAL(nPage+1) + STR(suffix) + STR(".swf");
OUString fullpath = sPath + STR("/") + filename;

View File

@ -214,7 +214,7 @@ private:
void METFullArc(Point aCenter, double fMultiplier);
void METPartialArcAtCurPos(Point aCenter, double fMultiplier,
double fStartAngle, double fSweepAngle);
void METChrStr(Point aPt, OUString aStr);
void METChrStr(Point aPt, const OUString& aStr);
void METSetArcParams(sal_Int32 nP, sal_Int32 nQ, sal_Int32 nR, sal_Int32 nS);
void METSetColor(Color aColor);
void METSetBackgroundColor(Color aColor);
@ -1374,7 +1374,7 @@ void METWriter::METPartialArcAtCurPos(Point aCenter, double fMultiplier,
}
void METWriter::METChrStr( Point aPt, OUString aUniStr )
void METWriter::METChrStr( Point aPt, const OUString& aUniStr )
{
OString aStr(OUStringToOString(aUniStr,
osl_getThreadTextEncoding()));

View File

@ -5198,7 +5198,7 @@ void EscherEx::ReplacePersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset )
PtReplace( ESCHER_Persist_PrivateEntry | nKey, nOffset );
}
void EscherEx::SetEditAs( OUString rEditAs )
void EscherEx::SetEditAs( const OUString& rEditAs )
{
mEditAs = rEditAs;
}

View File

@ -1323,7 +1323,7 @@ const char* GetOOXMLPresetGeometry( const char* sShapeType )
typedef boost::unordered_map< const char*, MSO_SPT, rtl::CStringHash, rtl::CStringEqual> DMLToVMLTranslationHashMap;
static DMLToVMLTranslationHashMap* pDMLToVMLMap;
MSO_SPT GETVMLShapeType(OString aType)
MSO_SPT GETVMLShapeType(const OString& aType)
{
const char* pDML = GetOOXMLPresetGeometry(aType.getStr());

View File

@ -172,7 +172,7 @@ static void encodeFile( osl::File& rSourceFile, Reference< XOutputStream >& xOut
}
}
static OString convertString( OUString aInput )
static OString convertString( const OUString& aInput )
{
OString aRet( aInput.getStr(), aInput.getLength(), RTL_TEXTENCODING_ASCII_US );
aRet = aRet.replace( '\r', ' ' );

View File

@ -125,7 +125,7 @@ public:
}
virtual ~TextField() {}
protected:
void implGrowCharSet( SVGFilter::UCharSetMapMap & aTextFieldCharSets, OUString sText, OUString sTextFieldId ) const
void implGrowCharSet( SVGFilter::UCharSetMapMap & aTextFieldCharSets, const OUString& sText, const OUString& sTextFieldId ) const
{
const sal_Unicode * ustr = sText.getStr();
sal_Int32 nLength = sText.getLength();

View File

@ -75,7 +75,7 @@ using namespace com::sun::star::beans;
namespace {
OUString supportedByType( const OUString clipBoardFormat , const OUString resultString, const OUString checkType)
OUString supportedByType( const OUString& clipBoardFormat, const OUString& resultString, const OUString& checkType)
{
OUString sTypeName;
if ( clipBoardFormat.match("doctype:") )

View File

@ -102,15 +102,14 @@ static Reference< XInterface > addFolder( Reference< XInterface >& xRootFolder,
return xFolder;
}
static void _addFile( Reference< XInterface >& xRootFolder, Reference< XSingleServiceFactory >& xFactory, Reference< XInputStream >& xInput, OUString aName ) throw( Exception )
static void _addFile( Reference< XInterface >& xRootFolder, Reference< XSingleServiceFactory >& xFactory, Reference< XInputStream >& xInput, const OUString& aName ) throw( Exception )
{
Reference< XActiveDataSink > xSink( xFactory->createInstance(), UNO_QUERY );
Reference< XUnoTunnel > xTunnel( xSink, UNO_QUERY );
if( xSink.is() && xTunnel.is())
{
Reference< XNameContainer > xNameContainer(xRootFolder, UNO_QUERY );
xNameContainer->insertByName(aName = encodeZipUri( aName ), makeAny(xTunnel));
xNameContainer->insertByName(encodeZipUri( aName ), makeAny(xTunnel));
xSink->setInputStream( xInput );
}
}

View File

@ -1644,7 +1644,7 @@ public:
sal_Bool SeekToPersistOffset( sal_uInt32 nKey );
virtual sal_Bool InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue ); // nValue is being inserted into the Stream where it's appropriate (overwrite modus), without that the
// current StreamPosition changes
void SetEditAs( OUString rEditAs );
void SetEditAs( const OUString& rEditAs );
rtl::OUString GetEditAs() { return mEditAs; }
SvStream& GetStream() const { return *mpOutStrm; }
sal_uLong GetStreamPos() const { return mpOutStrm->Tell(); }

View File

@ -136,7 +136,7 @@ MSFILTER_DLLPUBLIC EquationResult ParseCombinedChars(const OUString& rStr);
MSFILTER_DLLPUBLIC const char* GetOOXMLPresetGeometry( const char* sShapeType );
/// Similar to EnhancedCustomShapeTypeNames::Get(), but returns an MSO_SPT (binary / VML type).
MSFILTER_DLLPUBLIC MSO_SPT GETVMLShapeType(OString aType);
MSFILTER_DLLPUBLIC MSO_SPT GETVMLShapeType(const OString& aType);
}

View File

@ -55,7 +55,7 @@ public:
inline void SetEdFocus( sal_uInt16 nNew ) { nEdFocus = nNew; }
inline void SetUndoStr( const OUString& rNew ) { aUndoStr = rNew; }
inline void SetMatrixFlag(bool bNew) { bMatrix=bNew;}
inline void SetUniqueId(const OString nNew) { aUniqueId=nNew;}
inline void SetUniqueId(const OString& nNew) { aUniqueId=nNew;}
inline void SetSelection(const Selection& aSel) { aSelection=aSel;}
protected:
void Reset();