diff options
author | Noel Grandin <noel@peralex.com> | 2014-03-13 09:34:37 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-03-13 11:05:53 +0200 |
commit | 0dc38bdde056cf33a545d85f9e1211f06d579ff7 (patch) | |
tree | 311cb26b3dbafdee92fe96effecc205a7aee50df /sfx2 | |
parent | 3075b062261435d568d0680c3405ca61a7a40f39 (diff) |
sfx2,svl: prefer passing OUString and OString by reference
Change-Id: I9833265f6e635a057cea2c4a945cc73809b1e2ef
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/guisaveas.hxx | 6 | ||||
-rw-r--r-- | sfx2/source/appl/appuno.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/appl/shutdowniconunx.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/config/evntconf.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/templatelocalview.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/DocumentMetadataAccess.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/SfxDocumentMetaData.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 4 |
11 files changed, 26 insertions, 25 deletions
diff --git a/sfx2/inc/guisaveas.hxx b/sfx2/inc/guisaveas.hxx index 8bfa87653a55..0e9905ef2ec2 100644 --- a/sfx2/inc/guisaveas.hxx +++ b/sfx2/inc/guisaveas.hxx @@ -62,7 +62,7 @@ public: const OUString& aSlotName, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgsSequence, sal_Bool bPreselectPassword, - OUString aUserSelectedName, + const OUString& aUserSelectedName, sal_uInt16 nDocumentSignatureState = SIGNATURESTATE_NOSIGNATURES ); static sal_Bool CheckFilterOptionsAppearence( @@ -78,8 +78,8 @@ public: static sal_Bool WarnUnacceptableFormat( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel, - OUString aOldUIName, - OUString aDefUIName, + const OUString& aOldUIName, + const OUString& aDefUIName, sal_Bool bCanProceedFurther ); static Window* GetModelWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel ); diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index fe6a1ca0d5df..fa7d91d9a3ea 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -1720,14 +1720,14 @@ class RequestPackageReparation_Impl : public ::cppu::WeakImplHelper1< task::XInt comphelper::OInteractionDisapprove* m_pDisapprove; public: - RequestPackageReparation_Impl( OUString aName ); + RequestPackageReparation_Impl( const OUString& aName ); sal_Bool isApproved(); virtual uno::Any SAL_CALL getRequest() throw( uno::RuntimeException, std::exception ); virtual uno::Sequence< uno::Reference< task::XInteractionContinuation > > SAL_CALL getContinuations() throw( uno::RuntimeException, std::exception ); }; -RequestPackageReparation_Impl::RequestPackageReparation_Impl( OUString aName ) +RequestPackageReparation_Impl::RequestPackageReparation_Impl( const OUString& aName ) { OUString temp; uno::Reference< uno::XInterface > temp2; @@ -1760,7 +1760,7 @@ uno::Sequence< uno::Reference< task::XInteractionContinuation > > return m_lContinuations; } -RequestPackageReparation::RequestPackageReparation( OUString aName ) +RequestPackageReparation::RequestPackageReparation( const OUString& aName ) { pImp = new RequestPackageReparation_Impl( aName ); pImp->acquire(); @@ -1789,13 +1789,13 @@ class NotifyBrokenPackage_Impl : public ::cppu::WeakImplHelper1< task::XInteract comphelper::OInteractionAbort* m_pAbort; public: - NotifyBrokenPackage_Impl( OUString aName ); + NotifyBrokenPackage_Impl( const OUString& aName ); virtual uno::Any SAL_CALL getRequest() throw( uno::RuntimeException, std::exception ); virtual uno::Sequence< uno::Reference< task::XInteractionContinuation > > SAL_CALL getContinuations() throw( uno::RuntimeException, std::exception ); }; -NotifyBrokenPackage_Impl::NotifyBrokenPackage_Impl( OUString aName ) +NotifyBrokenPackage_Impl::NotifyBrokenPackage_Impl( const OUString& aName ) { OUString temp; uno::Reference< uno::XInterface > temp2; @@ -1821,7 +1821,7 @@ uno::Sequence< uno::Reference< task::XInteractionContinuation > > return m_lContinuations; } -NotifyBrokenPackage::NotifyBrokenPackage( OUString aName ) +NotifyBrokenPackage::NotifyBrokenPackage( const OUString& aName ) { pImp = new NotifyBrokenPackage_Impl( aName ); pImp->acquire(); diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx index 4d3dc95e328f..d48b5b180d88 100644 --- a/sfx2/source/appl/shutdowniconunx.cxx +++ b/sfx2/source/appl/shutdowniconunx.cxx @@ -224,7 +224,7 @@ static void add_ugly_db_item( GtkMenuShell *pMenuShell, const char *pAsciiURL, static GtkWidget * add_image_menu_item( GtkMenuShell *pMenuShell, const gchar *stock_id, - OUString aLabel, + const OUString& aLabel, GCallback activate_cb ) { OString aUtfLabel = OUStringToOString (aLabel, RTL_TEXTENCODING_UTF8 ); diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx index c422cfaa996b..c720c89d682f 100644 --- a/sfx2/source/config/evntconf.cxx +++ b/sfx2/source/config/evntconf.cxx @@ -222,7 +222,7 @@ uno::Any CreateEventData_Impl( const SvxMacro *pMacro ) } -void PropagateEvent_Impl( SfxObjectShell *pDoc, OUString aEventName, const SvxMacro* pMacro ) +void PropagateEvent_Impl( SfxObjectShell *pDoc, const OUString& aEventName, const SvxMacro* pMacro ) { uno::Reference < document::XEventsSupplier > xSupplier; if ( pDoc ) @@ -263,7 +263,7 @@ void PropagateEvent_Impl( SfxObjectShell *pDoc, OUString aEventName, const SvxMa } -void SfxEventConfiguration::ConfigureEvent( OUString aName, const SvxMacro& rMacro, SfxObjectShell *pDoc ) +void SfxEventConfiguration::ConfigureEvent( const OUString& aName, const SvxMacro& rMacro, SfxObjectShell *pDoc ) { boost::scoped_ptr<SvxMacro> pMacro; if ( rMacro.HasMacro() ) diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx index a0d5189d8f16..9b92a381e117 100644 --- a/sfx2/source/control/templatelocalview.cxx +++ b/sfx2/source/control/templatelocalview.cxx @@ -824,7 +824,7 @@ bool TemplateLocalView::isTemplateNameUnique(const sal_uInt16 nRegionItemId, con return true; } -bool TemplateLocalView::renameItem(ThumbnailViewItem* pItem, OUString sNewTitle) +bool TemplateLocalView::renameItem(ThumbnailViewItem* pItem, const OUString& sNewTitle) { sal_uInt16 nRegionId = 0; sal_uInt16 nDocId = USHRT_MAX; diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index b3e59e476673..742a66fe712c 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -1247,7 +1247,7 @@ void ThumbnailView::sortItems (const boost::function<bool (const ThumbnailViewIt Invalidate(); } -bool ThumbnailView::renameItem(ThumbnailViewItem*, OUString) +bool ThumbnailView::renameItem(ThumbnailViewItem*, const OUString&) { // Do nothing by default return false; diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index eeccc2184a37..b2d9989f8b48 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -118,7 +118,7 @@ namespace sfx2 namespace { - bool lclSupportsOOXMLEncryption(OUString aFilterName) + bool lclSupportsOOXMLEncryption(const OUString& aFilterName) { return aFilterName == "Calc MS Excel 2007 XML" || aFilterName == "MS Word 2007 XML" diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx index 47da6ce7949b..43c759d3e670 100644 --- a/sfx2/source/doc/DocumentMetadataAccess.cxx +++ b/sfx2/source/doc/DocumentMetadataAccess.cxx @@ -490,7 +490,7 @@ handleError( ucb::InteractiveAugmentedIOException const & i_rException, e.g. ODB files seem to only have content.xml */ static void collectFilesFromStorage(uno::Reference<embed::XStorage> const& i_xStorage, - OUString i_Path, + const OUString& i_Path, std::set< OUString > & o_rFiles) { static OUString content(s_content); @@ -587,7 +587,7 @@ importFile(struct DocumentMetadataAccess_Impl & i_rImpl, uno::Reference<embed::XStorage> const & i_xStorage, OUString const & i_rBaseURI, uno::Reference<task::XInteractionHandler> const & i_xHandler, - OUString i_rPath) + const OUString& i_rPath) { retry: try { diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 9a6c4b8c4317..9e4d4dadfd58 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -520,7 +520,7 @@ OUString SAL_CALL getNameSpace(const char* i_qname) throw () bool SAL_CALL textToDateOrDateTime(css::util::Date & io_rd, css::util::DateTime & io_rdt, bool & o_rIsDateTime, boost::optional<sal_Int16> & o_rTimeZone, - OUString i_text) throw () + const OUString& i_text) throw () { if (::sax::Converter::parseDateOrDateTime( &io_rd, io_rdt, o_rIsDateTime, &o_rTimeZone, i_text)) { @@ -534,7 +534,7 @@ textToDateOrDateTime(css::util::Date & io_rd, css::util::DateTime & io_rdt, // convert string to date/time bool SAL_CALL -textToDateTime(css::util::DateTime & io_rdt, OUString i_text) throw () +textToDateTime(css::util::DateTime & io_rdt, const OUString& i_text) throw () { if (::sax::Converter::parseDateTime(io_rdt, 0, i_text)) { return true; @@ -547,7 +547,7 @@ textToDateTime(css::util::DateTime & io_rdt, OUString i_text) throw () // convert string to date/time with default return value css::util::DateTime SAL_CALL -textToDateTimeDefault(OUString i_text) throw () +textToDateTimeDefault(const OUString& i_text) throw () { css::util::DateTime dt; static_cast<void> (textToDateTime(dt, i_text)); diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 72918b4174d1..af578dd599d4 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -1352,9 +1352,10 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel const OUString& aSlotName, uno::Sequence< beans::PropertyValue >& aArgsSequence, sal_Bool bPreselectPassword, - OUString aSuggestedName, + const OUString& _aSuggestedName, sal_uInt16 nDocumentSignatureState ) { + OUString aSuggestedName = _aSuggestedName; ModelData_Impl aModelData( *this, xModel, aArgsSequence ); sal_Bool bDialogUsed = sal_False; @@ -1839,8 +1840,8 @@ void SfxStoringHelper::SetDocInfoState( // static sal_Bool SfxStoringHelper::WarnUnacceptableFormat( const uno::Reference< frame::XModel >& xModel, - OUString aOldUIName, - OUString /*aDefUIName*/, + const OUString& aOldUIName, + const OUString& /*aDefUIName*/, sal_Bool /*bCanProceedFurther*/ ) { if ( !SvtSaveOptions().IsWarnAlienFormat() ) diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 59335d306af9..e64e1ec2a3d1 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -213,9 +213,9 @@ bool GetEncryptionData_Impl( const SfxItemSet* pSet, uno::Sequence< beans::Named sal_Bool SfxObjectShell::PutURLContentsToVersionStream_Impl( - OUString aURL, + const OUString& aURL, const uno::Reference< embed::XStorage >& xDocStorage, - OUString aStreamName ) + const OUString& aStreamName ) { sal_Bool bResult = sal_False; try |