diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:22:44 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:00:26 +0000 |
commit | 8b27d78b4afaa9c47ca0fda144c8060f2f14046b (patch) | |
tree | 2dbddceebf0f96492adc5652697e8efce8a8ba06 /sfx2/source | |
parent | fe8eba5faa59ddf9ee82f3eb009daac72a0ec846 (diff) |
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:
s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms
Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/imagemgr.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/imestatuswindow.cxx | 23 | ||||
-rw-r--r-- | sfx2/source/appl/openuriexternally.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/appl/shutdowniconunx.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/workwin.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailviewacc.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/dockwin.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/doctemplateslocal.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 106 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/frame2.cxx | 6 |
12 files changed, 78 insertions, 82 deletions
diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx index bcc47372e906..8f0447bf4689 100644 --- a/sfx2/source/appl/imagemgr.cxx +++ b/sfx2/source/appl/imagemgr.cxx @@ -98,7 +98,7 @@ Image SAL_CALL GetImage( if ( pSlot ) { - aCommandURL = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:" )); + aCommandURL = rtl::OUString( ".uno:" ); aCommandURL += rtl::OUString::createFromAscii( pSlot->GetUnoName() ); } else diff --git a/sfx2/source/appl/imestatuswindow.cxx b/sfx2/source/appl/imestatuswindow.cxx index 3ad5d2bcd8c1..cd645b7da1b4 100644 --- a/sfx2/source/appl/imestatuswindow.cxx +++ b/sfx2/source/appl/imestatuswindow.cxx @@ -95,8 +95,8 @@ void ImeStatusWindow::init() { sal_Bool bShow = sal_Bool(); if (getConfig()->getPropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "ShowStatusWindow"))) + rtl::OUString( + "ShowStatusWindow")) >>= bShow) Application::ShowImeStatusWindow(bShow); } @@ -114,7 +114,7 @@ bool ImeStatusWindow::isShowing() { sal_Bool bShow = sal_Bool(); if (getConfig()->getPropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowStatusWindow"))) + rtl::OUString("ShowStatusWindow")) >>= bShow) return bShow; } @@ -133,7 +133,7 @@ void ImeStatusWindow::show(bool bShow) { css::uno::Reference< css::beans::XPropertySet > xConfig(getConfig()); xConfig->setPropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowStatusWindow")), + rtl::OUString("ShowStatusWindow"), css::uno::makeAny(static_cast< sal_Bool >(bShow))); css::uno::Reference< css::util::XChangesBatch > xCommit( xConfig, css::uno::UNO_QUERY); @@ -162,7 +162,7 @@ ImeStatusWindow::~ImeStatusWindow() try { m_xConfig->removePropertyChangeListener( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowStatusWindow")), + rtl::OUString("ShowStatusWindow"), m_xConfigListener); } catch (css::uno::Exception &) @@ -202,17 +202,15 @@ css::uno::Reference< css::beans::XPropertySet > ImeStatusWindow::getConfig() if (!m_xContext.is()) throw css::uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "null comphelper::getProcessServiceFactory")), + "null comphelper::getProcessServiceFactory"), 0); css::uno::Reference< css::lang::XMultiServiceFactory > xProvider = css::configuration::theDefaultProvider::get( m_xContext ); css::beans::PropertyValue aArg( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")), -1, + rtl::OUString("nodepath"), -1, css::uno::makeAny( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "/org.openoffice.Office.Common/I18N/InputMethod"))), + "/org.openoffice.Office.Common/I18N/InputMethod")), css::beans::PropertyState_DIRECT_VALUE); css::uno::Sequence< css::uno::Any > aArgs(1); aArgs[0] <<= aArg; @@ -220,8 +218,7 @@ css::uno::Reference< css::beans::XPropertySet > ImeStatusWindow::getConfig() = css::uno::Reference< css::beans::XPropertySet >( xProvider->createInstanceWithArguments( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationUpdateAccess")), + "com.sun.star.configuration.ConfigurationUpdateAccess"), aArgs), css::uno::UNO_QUERY); if (!m_xConfig.is()) @@ -241,7 +238,7 @@ css::uno::Reference< css::beans::XPropertySet > ImeStatusWindow::getConfig() // no dispose notifications): m_xConfigListener = new WeakPropertyChangeListener(this); xConfig->addPropertyChangeListener( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowStatusWindow")), + rtl::OUString("ShowStatusWindow"), m_xConfigListener); } return xConfig; diff --git a/sfx2/source/appl/openuriexternally.cxx b/sfx2/source/appl/openuriexternally.cxx index 7fcc17439386..b80a1678b4db 100644 --- a/sfx2/source/appl/openuriexternally.cxx +++ b/sfx2/source/appl/openuriexternally.cxx @@ -63,8 +63,7 @@ bool sfx2::openUriExternally( if (e.ArgumentPosition != 0) { throw css::uno::RuntimeException( (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "unexpected IllegalArgumentException: ")) + "unexpected IllegalArgumentException: ") + e.Message), css::uno::Reference< css::uno::XInterface >()); } diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx index 42f0c3853553..5d3fef78480d 100644 --- a/sfx2/source/appl/shutdowniconunx.cxx +++ b/sfx2/source/appl/shutdowniconunx.cxx @@ -66,7 +66,7 @@ GFileMonitor* pMonitor = NULL; static void open_url_cb( GtkWidget *, gpointer data ) { ShutdownIcon::OpenURL( *(OUString *)data, - OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ) ); + OUString( "_default" ) ); } static void open_file_cb( GtkWidget * ) diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index e7212722add6..0a379df68e9f 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -182,7 +182,7 @@ void LayoutManagerListener::setFrame( const css::uno::Reference< css::frame::XFr if ( xPropSet.is() ) { aValue = xPropSet->getPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LockCount" )) ); + ::rtl::OUString( "LockCount" ) ); aValue >>= m_pWrkWin->m_nLock; } } diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx index ada8fbe4ae25..ee741d346949 100644 --- a/sfx2/source/control/thumbnailviewacc.cxx +++ b/sfx2/source/control/thumbnailviewacc.cxx @@ -603,7 +603,7 @@ void ThumbnailViewAcc::ThrowIfDisposed (void) { OSL_TRACE ("Calling disposed object. Throwing exception:"); throw lang::DisposedException ( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("object has been already disposed")), + ::rtl::OUString("object has been already disposed"), static_cast<uno::XWeak*>(this)); } else diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 327f76b0c617..87a20873131c 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -145,10 +145,10 @@ SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd , uno::Reference< frame::XFrame > xFrame( pDispatcher->GetFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY ); uno::Sequence< uno::Any > aArgs(2); beans::PropertyValue aPropValue; - aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); + aPropValue.Name = rtl::OUString( "Frame" ); aPropValue.Value = uno::makeAny( xFrame ); aArgs[0] <<= aPropValue; - aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceURL" )); + aPropValue.Name = rtl::OUString( "ResourceURL" ); // create a resource URL from the nId provided by the sfx2 ::rtl::OUString aResourceURL( aDockWindowResourceURL ); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 7fa12d46d11e..fa8ef1845853 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -1964,7 +1964,7 @@ void SfxMedium::Transfer_Impl() // LongName wasn't defined anywhere, only used here... get the Title instead // as it's less probably empty rtl::OUString aFileName; - Any aAny = aDestContent.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title" )) ); + Any aAny = aDestContent.getPropertyValue( ::rtl::OUString("Title" ) ); aAny >>= aFileName; if ( aFileName.isEmpty() ) aFileName = GetURLObject().getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx index 5f8f174384fc..e23229e1e491 100644 --- a/sfx2/source/doc/doctemplateslocal.cxx +++ b/sfx2/source/doc/doctemplateslocal.cxx @@ -36,7 +36,7 @@ using namespace ::com::sun::star; uno::Sequence< beans::StringPair > DocTemplLocaleHelper::ReadGroupLocalizationSequence( const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< uno::XComponentContext > xContext ) throw( uno::Exception ) { - ::rtl::OUString aStringID = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "groupuinames.xml" ) ); + ::rtl::OUString aStringID = ::rtl::OUString( "groupuinames.xml" ); return ReadLocalizationSequence_Impl( xInStream, aStringID, xContext ); } @@ -63,9 +63,9 @@ void SAL_CALL DocTemplLocaleHelper::WriteGroupLocalizationSequence( const uno::R ::comphelper::AttributeList* pRootAttrList = new ::comphelper::AttributeList; uno::Reference< xml::sax::XAttributeList > xRootAttrList( pRootAttrList ); pRootAttrList->AddAttribute( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "xmlns" ) ), + ::rtl::OUString( "xmlns" ), aCDATAString, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "http://openoffice.org/2006/groupuinames" ) ) ); + ::rtl::OUString( "http://openoffice.org/2006/groupuinames" ) ); xWriterHandler->startDocument(); xWriterHandler->startElement( aGroupListElement, xRootAttrList ); diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 45262ebedf06..bd3910ac7716 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -194,7 +194,7 @@ public: uno::Reference< lang::XMultiServiceFactory > xDocSettingsSupplier( xModel, uno::UNO_QUERY_THROW ); m_xDocumentSettings.set( xDocSettingsSupplier->createInstance( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.Settings" ) ) ), + ::rtl::OUString( "com.sun.star.document.Settings" ) ), uno::UNO_QUERY_THROW ); ::rtl::OUString aLoadReadonlyString( RTL_CONSTASCII_USTRINGPARAM( "LoadReadonly" ) ); @@ -460,19 +460,19 @@ const ::comphelper::SequenceAsHashMap& ModelData_Impl::GetModuleProps() //------------------------------------------------------------------------- ::rtl::OUString ModelData_Impl::GetDocServiceName() { - return GetModuleProps().getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryDocumentService")), ::rtl::OUString()); + return GetModuleProps().getUnpackedValueOrDefault(::rtl::OUString("ooSetupFactoryDocumentService"), ::rtl::OUString()); } //------------------------------------------------------------------------- void ModelData_Impl::CheckInteractionHandler() { ::comphelper::SequenceAsHashMap::const_iterator aInteractIter = - m_aMediaDescrHM.find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InteractionHandler")) ); + m_aMediaDescrHM.find( ::rtl::OUString("InteractionHandler") ); if ( aInteractIter == m_aMediaDescrHM.end() ) { try { - m_aMediaDescrHM[ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InteractionHandler")) ] + m_aMediaDescrHM[ ::rtl::OUString("InteractionHandler") ] <<= task::InteractionHandler::createWithParent( comphelper::getProcessComponentContext(), 0); } catch( const uno::Exception& ) @@ -492,7 +492,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceDefaultFilter uno::Sequence< beans::PropertyValue > aProps; ::rtl::OUString aFilterName = GetModuleProps().getUnpackedValueOrDefault( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryDefaultFilter")), + ::rtl::OUString("ooSetupFactoryDefaultFilter"), ::rtl::OUString() ); m_pOwner->GetFilterConfiguration()->getByName( aFilterName ) >>= aProps; @@ -509,7 +509,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceDefaultFilter if ( aProps.getLength() ) { ::comphelper::SequenceAsHashMap aFiltHM( aProps ); - sal_Int32 nFlags = aFiltHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")), + sal_Int32 nFlags = aFiltHM.getUnpackedValueOrDefault( ::rtl::OUString("Flags"), (sal_Int32)0 ); if ( ( ( nFlags & nMust ) == nMust ) && !( nFlags & nDont ) ) aFilterProps = aProps; @@ -523,7 +523,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceDefaultFilter uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceAnyFilter( sal_Int32 nMust, sal_Int32 nDont ) { uno::Sequence< beans::NamedValue > aSearchRequest( 1 ); - aSearchRequest[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentService")); + aSearchRequest[0].Name = ::rtl::OUString("DocumentService"); aSearchRequest[0].Value <<= GetDocServiceName(); return ::comphelper::MimeConfigurationHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont ); @@ -541,9 +541,9 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetPreselectedFilter_Impl( { // Preselect PDF-Filter for EXPORT uno::Sequence< beans::NamedValue > aSearchRequest( 2 ); - aSearchRequest[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type")); - aSearchRequest[0].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pdf_Portable_Document_Format")); - aSearchRequest[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentService")); + aSearchRequest[0].Name = ::rtl::OUString("Type"); + aSearchRequest[0].Value <<= ::rtl::OUString("pdf_Portable_Document_Format"); + aSearchRequest[1].Name = ::rtl::OUString("DocumentService"); aSearchRequest[1].Value <<= GetDocServiceName(); aFilterProps = ::comphelper::MimeConfigurationHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont ); @@ -647,7 +647,7 @@ sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus ) // it is done only for documents that have persistence already uno::Reference< uno::XInterface > xCommonConfig = ::comphelper::ConfigurationHelper::openConfig( comphelper::getProcessComponentContext(), - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Common" ) ), + ::rtl::OUString( "/org.openoffice.Office.Common" ), ::comphelper::ConfigurationHelper::E_STANDARD ); if ( !xCommonConfig.is() ) throw uno::RuntimeException(); // should the saving proceed as usual instead? @@ -659,11 +659,11 @@ sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus ) // the saving is acceptable // in case the configuration entry is not set or set to false // or in case of version creation - ::rtl::OUString aVersionCommentString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VersionComment")); + ::rtl::OUString aVersionCommentString = ::rtl::OUString("VersionComment"); if ( ( ::comphelper::ConfigurationHelper::readRelativeKey( xCommonConfig, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Save/Document/" ) ), - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AlwaysSaveAs" ) ) ) >>= bAlwaysSaveAs ) + ::rtl::OUString( "Save/Document/" ), + ::rtl::OUString( "AlwaysSaveAs" ) ) >>= bAlwaysSaveAs ) && bAlwaysSaveAs && GetMediaDescr().find( aVersionCommentString ) == GetMediaDescr().end() ) { @@ -765,13 +765,13 @@ sal_Int8 ModelData_Impl::CheckFilter( const ::rtl::OUString& aFilterName ) m_pOwner->GetFilterConfiguration()->getByName( aFilterName ) >>= aFilterProps; aFiltPropsHM = ::comphelper::SequenceAsHashMap( aFilterProps ); - nFiltFlags = aFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")), (sal_Int32)0 ); + nFiltFlags = aFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString("Flags"), (sal_Int32)0 ); } // only a temporary solution until default filter retrieving feature is implemented // then GetDocServiceDefaultFilter() must be used ::comphelper::SequenceAsHashMap aDefFiltPropsHM = GetDocServiceDefaultFilterCheckFlags( 3, 0 ); - sal_Int32 nDefFiltFlags = aDefFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")), (sal_Int32)0 ); + sal_Int32 nDefFiltFlags = aDefFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString("Flags"), (sal_Int32)0 ); // if the old filter is not acceptable // and there is no default filter or it is not acceptable for requested parameters then proceed with saveAs @@ -791,12 +791,12 @@ sal_Int8 ModelData_Impl::CheckFilter( const ::rtl::OUString& aFilterName ) { // the default filter is acceptable and the old filter is alian one // so ask to make a saveAs operation - ::rtl::OUString aUIName = aFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIName")), + ::rtl::OUString aUIName = aFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString("UIName"), ::rtl::OUString() ); - ::rtl::OUString aDefUIName = aDefFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIName")), + ::rtl::OUString aDefUIName = aDefFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString("UIName"), ::rtl::OUString() ); ::rtl::OUString aPreusedFilterName = GetDocProps().getUnpackedValueOrDefault( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PreusedFilterName")), + ::rtl::OUString("PreusedFilterName"), ::rtl::OUString() ); if ( !aPreusedFilterName.equals( aFilterName ) && !aUIName.equals( aDefUIName ) ) { @@ -847,7 +847,7 @@ sal_Int8 ModelData_Impl::CheckFilter( const ::rtl::OUString& aFilterName ) sal_Bool ModelData_Impl::CheckFilterOptionsDialogExistence() { uno::Sequence< beans::NamedValue > aSearchRequest( 1 ); - aSearchRequest[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentService")); + aSearchRequest[0].Name = ::rtl::OUString("DocumentService"); aSearchRequest[0].Value <<= GetDocServiceName(); uno::Reference< container::XEnumeration > xFilterEnum = @@ -860,7 +860,7 @@ sal_Bool ModelData_Impl::CheckFilterOptionsDialogExistence() { ::comphelper::SequenceAsHashMap aPropsHM( pProps ); ::rtl::OUString aUIServName = aPropsHM.getUnpackedValueOrDefault( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIComponent")), + ::rtl::OUString("UIComponent"), ::rtl::OUString() ); if ( !aUIServName.isEmpty() ) return sal_True; @@ -884,7 +884,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, sal_Bool bUseFilterOptions = sal_False; ::comphelper::SequenceAsHashMap::const_iterator aOverwriteIter = - GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Overwrite")) ); + GetMediaDescr().find( ::rtl::OUString("Overwrite") ); // the file name must be specified if overwrite option is set if ( aOverwriteIter != GetMediaDescr().end() ) @@ -938,10 +938,10 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, // this is a PDF export // the filter options has been shown already ::rtl::OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIName")), + ::rtl::OUString("UIName"), ::rtl::OUString() ); - pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aFilterUIName, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "pdf" ) ), rStandardDir, rBlackList )); + pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aFilterUIName, ::rtl::OUString( "pdf" ), rStandardDir, rBlackList )); pFileDlg->SetCurrentFilter( aFilterUIName ); } else @@ -990,7 +990,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, { // it is export, set the preselected filter ::rtl::OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIName")), + ::rtl::OUString("UIName"), ::rtl::OUString() ); pFileDlg->SetCurrentFilter( aFilterUIName ); } @@ -1006,24 +1006,24 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, m_pOwner->GetFilterConfiguration()->getByName( aOldFilterName ) >>= aOldFilterProps; ::comphelper::SequenceAsHashMap aOldFiltPropsHM( aOldFilterProps ); - sal_Int32 nOldFiltFlags = aOldFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")), (sal_Int32)0 ); + sal_Int32 nOldFiltFlags = aOldFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString("Flags"), (sal_Int32)0 ); if ( bSetStandardName || ( nOldFiltFlags & nMust ) != nMust || nOldFiltFlags & nDont ) { // the suggested type will be changed, the extension should be adjusted aAdjustToType = aPreselectedFilterPropsHM.getUnpackedValueOrDefault( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type")), + ::rtl::OUString("Type"), ::rtl::OUString() ); ::rtl::OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIName")), + ::rtl::OUString("UIName"), ::rtl::OUString() ); pFileDlg->SetCurrentFilter( aFilterUIName ); } else { pFileDlg->SetCurrentFilter( aOldFiltPropsHM.getUnpackedValueOrDefault( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIName")), + ::rtl::OUString("UIName"), ::rtl::OUString() ) ); } } @@ -1037,7 +1037,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, uno::Reference < view::XSelectionSupplier > xSel( GetModel()->getCurrentController(), uno::UNO_QUERY ); if ( xSel.is() && xSel->getSelection().hasValue() ) - GetMediaDescr()[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SelectionOnly"))] <<= sal_True; + GetMediaDescr()[::rtl::OUString("SelectionOnly")] <<= sal_True; // This is a temporary hardcoded solution must be removed when // dialogs do not need parameters in SidSet representation any more @@ -1166,7 +1166,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, } // merge in results of the dialog execution - GetMediaDescr()[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL"))] <<= + GetMediaDescr()[::rtl::OUString("URL")] <<= ::rtl::OUString( aURL.GetMainURL( INetURLObject::NO_DECODE )); GetMediaDescr()[sFilterNameString] <<= aFilterName; @@ -1186,14 +1186,14 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog() if ( xFrameDispatch.is() ) { util::URL aURL; - aURL.Complete = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SetDocumentProperties")); + aURL.Complete = ::rtl::OUString(".uno:SetDocumentProperties"); uno::Reference < util::XURLTransformer > xTransformer( util::URLTransformer::create( comphelper::getProcessComponentContext() ) ); if ( xTransformer->parseStrict( aURL ) ) { uno::Reference< frame::XDispatch > xDispatch = xFrameDispatch->queryDispatch( aURL, - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_self")), + ::rtl::OUString("_self"), 0 ); if ( xDispatch.is() ) { @@ -1217,7 +1217,7 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog() ::rtl::OUString aRecommendedDir; if ( ( !aSuggestedDir.isEmpty() || GetStorable()->hasLocation() ) - && !GetMediaDescr().getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage")), + && !GetMediaDescr().getUnpackedValueOrDefault( ::rtl::OUString("RepairPackage"), sal_False ) ) { INetURLObject aLocation; @@ -1272,18 +1272,18 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog() { // adjust the extension to the type uno::Reference< container::XNameAccess > xTypeDetection = uno::Reference< container::XNameAccess >( - comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.TypeDetection")) ), + comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString("com.sun.star.document.TypeDetection") ), uno::UNO_QUERY ); if ( xTypeDetection.is() ) { - INetURLObject aObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "file:///c:/" ) ) + aRecommendedName ); + INetURLObject aObj( ::rtl::OUString( "file:///c:/" ) + aRecommendedName ); uno::Sequence< beans::PropertyValue > aTypeNameProps; if ( ( xTypeDetection->getByName( aTypeName ) >>= aTypeNameProps ) && aTypeNameProps.getLength() ) { ::comphelper::SequenceAsHashMap aTypeNamePropsHM( aTypeNameProps ); uno::Sequence< ::rtl::OUString > aExtensions = aTypeNamePropsHM.getUnpackedValueOrDefault( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Extensions")), + ::rtl::OUString("Extensions"), ::uno::Sequence< ::rtl::OUString >() ); if ( aExtensions.getLength() ) aObj.SetExtension( aExtensions[0] ); @@ -1312,7 +1312,7 @@ uno::Reference< container::XNameAccess > SfxStoringHelper::GetFilterConfiguratio if ( !m_xFilterCFG.is() ) { m_xFilterCFG = uno::Reference< container::XNameAccess >( - comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.FilterFactory")) ), + comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString("com.sun.star.document.FilterFactory") ), uno::UNO_QUERY ); if ( !m_xFilterCFG.is() ) @@ -1371,7 +1371,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel if ( nStoreMode & SAVEAS_REQUESTED ) { ::comphelper::SequenceAsHashMap::const_iterator aSaveToIter = - aModelData.GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SaveTo")) ); + aModelData.GetMediaDescr().find( ::rtl::OUString("SaveTo") ); if ( aSaveToIter != aModelData.GetMediaDescr().end() ) { sal_Bool bWideExport = sal_False; @@ -1465,7 +1465,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel ::comphelper::SequenceAsHashMap aFilterPropsHM( aFilterProps ); ::rtl::OUString aFilterName = aFilterPropsHM.getUnpackedValueOrDefault( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), + ::rtl::OUString("Name"), ::rtl::OUString() ); const ::rtl::OUString sFilterNameString(aFilterNameString); @@ -1478,7 +1478,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel ::rtl::OUString() ); sal_Bool bUseFilterOptions = sal_False; - ::comphelper::SequenceAsHashMap::const_iterator aFileNameIter = aModelData.GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) ); + ::comphelper::SequenceAsHashMap::const_iterator aFileNameIter = aModelData.GetMediaDescr().find( ::rtl::OUString("URL") ); const ::rtl::OUString sFilterOptionsString(aFilterOptionsString); const ::rtl::OUString sFilterDataString(aFilterDataString); @@ -1502,7 +1502,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel { sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG; ::comphelper::SequenceAsHashMap::const_iterator aDlgIter = - aModelData.GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseSystemDialog")) ); + aModelData.GetMediaDescr().find( ::rtl::OUString("UseSystemDialog") ); if ( aDlgIter != aModelData.GetMediaDescr().end() ) { sal_Bool bUseSystemDialog = sal_True; @@ -1516,28 +1516,28 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel } // The Dispatch supports parameter FolderName that overwrites SuggestedSaveAsDir - ::rtl::OUString aSuggestedDir = aModelData.GetMediaDescr().getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FolderName" ) ), ::rtl::OUString() ); + ::rtl::OUString aSuggestedDir = aModelData.GetMediaDescr().getUnpackedValueOrDefault( ::rtl::OUString( "FolderName" ), ::rtl::OUString() ); if ( aSuggestedDir.isEmpty() ) { - aSuggestedDir = aModelData.GetMediaDescr().getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SuggestedSaveAsDir" ) ), ::rtl::OUString() ); + aSuggestedDir = aModelData.GetMediaDescr().getUnpackedValueOrDefault( ::rtl::OUString( "SuggestedSaveAsDir" ), ::rtl::OUString() ); if ( aSuggestedDir.isEmpty() ) - aSuggestedDir = aModelData.GetDocProps().getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SuggestedSaveAsDir" ) ), ::rtl::OUString() ); + aSuggestedDir = aModelData.GetDocProps().getUnpackedValueOrDefault( ::rtl::OUString( "SuggestedSaveAsDir" ), ::rtl::OUString() ); } - aSuggestedName = aModelData.GetMediaDescr().getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SuggestedSaveAsName" ) ), ::rtl::OUString() ); + aSuggestedName = aModelData.GetMediaDescr().getUnpackedValueOrDefault( ::rtl::OUString( "SuggestedSaveAsName" ), ::rtl::OUString() ); if ( aSuggestedName.isEmpty() ) - aSuggestedName = aModelData.GetDocProps().getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SuggestedSaveAsName" ) ), ::rtl::OUString() ); + aSuggestedName = aModelData.GetDocProps().getUnpackedValueOrDefault( ::rtl::OUString( "SuggestedSaveAsName" ), ::rtl::OUString() ); ::rtl::OUString sStandardDir; ::comphelper::SequenceAsHashMap::const_iterator aStdDirIter = - aModelData.GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StandardDir")) ); + aModelData.GetMediaDescr().find( ::rtl::OUString("StandardDir") ); if ( aStdDirIter != aModelData.GetMediaDescr().end() ) aStdDirIter->second >>= sStandardDir; ::com::sun::star::uno::Sequence< ::rtl::OUString > aBlackList; ::comphelper::SequenceAsHashMap::const_iterator aBlackListIter = - aModelData.GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BlackList")) ); + aModelData.GetMediaDescr().find( ::rtl::OUString("BlackList") ); if ( aBlackListIter != aModelData.GetMediaDescr().end() ) aBlackListIter->second >>= aBlackList; @@ -1569,7 +1569,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel } bDialogUsed = sal_True; - aFileNameIter = aModelData.GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) ); + aFileNameIter = aModelData.GetMediaDescr().find( ::rtl::OUString("URL") ); } else { @@ -1616,7 +1616,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel } ::comphelper::SequenceAsHashMap::const_iterator aIter = - aModelData.GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FilterFlags")) ); + aModelData.GetMediaDescr().find( ::rtl::OUString("FilterFlags") ); sal_Bool bFilterFlagsSet = ( aIter != aModelData.GetMediaDescr().end() ); if( !( nStoreMode & PDFEXPORT_REQUESTED ) && !bFilterFlagsSet @@ -1635,7 +1635,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel DocumentSettingsGuard aSettingsGuard( aModelData.GetModel(), aModelData.IsRecommendReadOnly(), nStoreMode & EXPORT_REQUESTED ); - OSL_ENSURE( aModelData.GetMediaDescr().find( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Password" ) ) ) == aModelData.GetMediaDescr().end(), "The Password property of MediaDescriptor should not be used here!" ); + OSL_ENSURE( aModelData.GetMediaDescr().find( ::rtl::OUString( "Password" ) ) == aModelData.GetMediaDescr().end(), "The Password property of MediaDescriptor should not be used here!" ); if ( aOptions.IsDocInfoSave() && ( !aModelData.GetStorable()->hasLocation() || INetURLObject( aModelData.GetStorable()->getLocation() ) != aURL ) ) @@ -1715,7 +1715,7 @@ sal_Bool SfxStoringHelper::CheckFilterOptionsAppearence( { ::comphelper::SequenceAsHashMap aPropsHM( aProps ); ::rtl::OUString aServiceName = aPropsHM.getUnpackedValueOrDefault( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIComponent")), + ::rtl::OUString("UIComponent"), ::rtl::OUString() ); if( !aServiceName.isEmpty() ) bUseFilterOptions = sal_True; diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 1d921c7009c5..492c366348e3 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1397,7 +1397,7 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent ) { // check the version of the document uno::Reference < beans::XPropertySet > xPropSet( GetStorage(), uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ) ) >>= aODFVersion; + xPropSet->getPropertyValue( ::rtl::OUString( "Version" ) ) >>= aODFVersion; } catch( uno::Exception& ) {} diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index 99ee9b5ce7df..abb67f5c672c 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -272,7 +272,7 @@ SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, Window& rWindow, sal_uInt16 nV Reference< XComponentLoader > xLoader( xFrame, UNO_QUERY_THROW ); xLoader->loadComponentFromURL( sLoaderURL, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_self" ) ), + ::rtl::OUString( "_self" ), 0, aLoadArgs ); @@ -339,7 +339,7 @@ void SfxFrame::SetPresentationMode( sal_Bool bSet ) if ( xPropSet.is() ) { - Any aValue = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ))); + Any aValue = xPropSet->getPropertyValue( rtl::OUString( "LayoutManager" )); aValue >>= xLayoutManager; } @@ -391,7 +391,7 @@ void SfxFrame::SetMenuBarOn_Impl( sal_Bool bOn ) if ( xPropSet.is() ) { - Any aValue = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ))); + Any aValue = xPropSet->getPropertyValue( rtl::OUString( "LayoutManager" )); aValue >>= xLayoutManager; } |