diff options
author | Jean-Noël Rouvignac <jn.rouvignac@gmail.com> | 2013-02-01 09:33:19 +0100 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-02-14 13:20:14 +0000 |
commit | 77fd448d0990adc79406e13a127b2b1834984b71 (patch) | |
tree | 3b8d1b23e7029dedcb97eb1d38ba83c91dfdac51 /sfx2 | |
parent | 5502501a8848c771aff5a77448a02451e22398a4 (diff) |
Removed several useless macros: UNISTRING, USTR, USTR_ASCII, ASCII_STR, ASCII_STRING, CONST_ASCII, ASCSTR, ASCII, DEFINE_CONST_UNICODE, DEFINE_CONST_OUSTRING
Change-Id: I96d690bf9f9b319e9eeafcf218ec5ce87f21215f
Reviewed-on: https://gerrit.libreoffice.org/1954
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'sfx2')
42 files changed, 176 insertions, 189 deletions
diff --git a/sfx2/inc/sfx2/sfxuno.hxx b/sfx2/inc/sfx2/sfxuno.hxx index 103806456caf..f622116aaf53 100644 --- a/sfx2/inc/sfx2/sfxuno.hxx +++ b/sfx2/inc/sfx2/sfxuno.hxx @@ -103,11 +103,6 @@ bool GetEncryptionData_Impl( const SfxItemSet* pSet, ::com::sun::star::uno::Sequ #define S2U(STRING) ::rtl::OStringToOUString(STRING, RTL_TEXTENCODING_UTF8) #define U2S(STRING) ::rtl::OUStringToOString(STRING, RTL_TEXTENCODING_UTF8) -// Macro to define const unicode a'la "..." -// It's better then "OUString::createFromAscii(...)" !!! -#define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII)) -#define DEFINE_CONST_OUSTRING(CONSTASCII) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII)) - //________________________________________________________________________________________________________________________ // macros for declaration and definition of uno-services //________________________________________________________________________________________________________________________ diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 2c47a9d20e1d..2e0018eed17e 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -181,7 +181,7 @@ SfxApplication::SfxApplication() { RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mb93783) ::SfxApplication::SfxApplication" ); - SetName( DEFINE_CONST_UNICODE("StarOffice") ); + SetName( OUString("StarOffice") ); SvtViewOptions::AcquireOptions(); pAppData_Impl = new SfxAppData_Impl( this ); diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx index 2f28591e51e2..060ecf5227b6 100644 --- a/sfx2/source/appl/appdde.cxx +++ b/sfx2/source/appl/appdde.cxx @@ -189,7 +189,7 @@ String ImplDdeService::Topics() pShell = SfxObjectShell::GetNext( *pShell, &aType ); } if( sRet.Len() ) - sRet += DEFINE_CONST_UNICODE("\r\n"); + sRet += "\r\n"; return sRet; } @@ -203,7 +203,7 @@ class SfxDdeTriggerTopic_Impl : public DdeTopic { public: SfxDdeTriggerTopic_Impl() - : DdeTopic( DEFINE_CONST_UNICODE("TRIGGER") ) + : DdeTopic( "TRIGGER" ) {} virtual sal_Bool Execute( const String* ); @@ -307,8 +307,8 @@ long SfxApplication::DdeExecute { // Print or Open-Event? ApplicationEvent aAppEvent; - if ( SfxAppEvent_Impl( aAppEvent, rCmd, DEFINE_CONST_UNICODE("Print"), ApplicationEvent::TYPE_PRINT ) || - SfxAppEvent_Impl( aAppEvent, rCmd, DEFINE_CONST_UNICODE("Open"), ApplicationEvent::TYPE_OPEN ) ) + if ( SfxAppEvent_Impl( aAppEvent, rCmd, "Print", ApplicationEvent::TYPE_PRINT ) || + SfxAppEvent_Impl( aAppEvent, rCmd, "Open", ApplicationEvent::TYPE_OPEN ) ) GetpApp()->AppEvent( aAppEvent ); else { @@ -538,7 +538,7 @@ sal_Bool SfxApplication::InitializeDde() // Config path as a topic becauseof multiple starts INetURLObject aOfficeLockFile( SvtPathOptions().GetUserConfigPath() ); - aOfficeLockFile.insertName( DEFINE_CONST_UNICODE( "soffice.lck" ) ); + aOfficeLockFile.insertName( "soffice.lck" ); String aService( SfxDdeServiceName_Impl( aOfficeLockFile.GetMainURL(INetURLObject::DECODE_TO_IURI) ) ); aService.ToUpperAscii(); diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index fb553a6dad9e..a134957d1304 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -158,13 +158,13 @@ std::vector<sal_uInt16>* SfxApplication::GetDisabledSlotList_Impl() { // Is there a slot file? INetURLObject aUserObj( SvtPathOptions().GetUserConfigPath() ); - aUserObj.insertName( DEFINE_CONST_UNICODE( "slots.cfg" ) ); + aUserObj.insertName( "slots.cfg" ); SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aUserObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ ); if ( !pStream || pStream->GetError() == ERRCODE_IO_NOTEXISTS ) { delete pStream; INetURLObject aObj( SvtPathOptions().GetConfigPath() ); - aObj.insertName( DEFINE_CONST_UNICODE( "slots.cfg" ) ); + aObj.insertName( "slots.cfg" ); pStream = ::utl::UcbStreamHelper::CreateStream( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ ); } diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 5b9e5bef742c..1c07078f5976 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -428,7 +428,7 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String TransformItems( SID_OPENDOC, *pNew, aArgs ); sal_Int32 nLength = aArgs.getLength(); aArgs.realloc( nLength + 1 ); - aArgs[nLength].Name = DEFINE_CONST_UNICODE("Title"); + aArgs[nLength].Name = "Title"; aArgs[nLength].Value <<= ::rtl::OUString( xDoc->GetTitle( SFX_TITLE_DETECT ) ); xModel->attachResource( ::rtl::OUString(), aArgs ); delete pNew; @@ -554,8 +554,8 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq ) SfxCallMode eMode = SFX_CALLMODE_SYNCHRON; const SfxPoolItem *pRet=0; - SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE("private:user") ); - SfxStringItem aTarget( SID_TARGETNAME, DEFINE_CONST_UNICODE("_default") ); + SfxStringItem aReferer( SID_REFERER, "private:user" ); + SfxStringItem aTarget( SID_TARGETNAME, "_default" ); if ( aTemplateFileName.Len() ) { DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Illegal URL!" ); @@ -567,7 +567,7 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq ) } else { - SfxStringItem aName( SID_FILE_NAME, DEFINE_CONST_UNICODE("private:factory") ); + SfxStringItem aName( SID_FILE_NAME, "private:factory" ); pRet = GetDispatcher_Impl()->Execute( SID_OPENDOC, eMode, &aName, &aTarget, &aReferer, 0L ); } diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 646291d1b5a1..d7aeafaf5a8b 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -334,7 +334,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) } SfxStringItem aNameItem( SID_FILE_NAME, rtl::OUString("vnd.sun.star.cmd:logout") ); - SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE( "private/user" ) ); + SfxStringItem aReferer( SID_REFERER, "private/user" ); pAppData_Impl->pAppDispat->Execute( SID_OPENDOC, SFX_CALLMODE_SLOT, &aNameItem, &aReferer, 0L ); return; } diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index fb16aad45268..189bb9447f91 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -925,8 +925,8 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque else { // transform parameter "OptionsPageURL" of slot "OptionsTreeDialog" - String sSlotName( DEFINE_CONST_UNICODE( "OptionsTreeDialog" ) ); - String sPropName( DEFINE_CONST_UNICODE( "OptionsPageURL" ) ); + String sSlotName( "OptionsTreeDialog" ); + String sPropName( "OptionsPageURL" ); if ( sSlotName.EqualsAscii( pSlot->pUnoName ) ) { for ( sal_uInt16 n = 0; n < nCount; ++n ) diff --git a/sfx2/source/appl/helpinterceptor.cxx b/sfx2/source/appl/helpinterceptor.cxx index 16f1c7ea0113..cac32bf9f5c7 100644 --- a/sfx2/source/appl/helpinterceptor.cxx +++ b/sfx2/source/appl/helpinterceptor.cxx @@ -224,7 +224,7 @@ Sequence< ::rtl::OUString > SAL_CALL HelpInterceptor_Impl::getInterceptedURLs() { Sequence< ::rtl::OUString > aURLList( 1 ); - aURLList[0] = DEFINE_CONST_UNICODE("vnd.sun.star.help://*"); + aURLList[0] = "vnd.sun.star.help://*"; return aURLList; } @@ -234,8 +234,8 @@ Sequence< ::rtl::OUString > SAL_CALL HelpInterceptor_Impl::getInterceptedURLs() void SAL_CALL HelpInterceptor_Impl::dispatch( const URL& aURL, const Sequence< ::com::sun::star::beans::PropertyValue >& ) throw( RuntimeException ) { - sal_Bool bBack = ( String( DEFINE_CONST_UNICODE(".uno:Backward") ) == String( aURL.Complete ) ); - if ( bBack || String( DEFINE_CONST_UNICODE(".uno:Forward") ) == String( aURL.Complete ) ) + sal_Bool bBack = ( String( ".uno:Backward" ) == String( aURL.Complete ) ); + if ( bBack || String( ".uno:Forward" ) == String( aURL.Complete ) ) { if ( m_pHistory ) { diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 34a53e7b1949..1bf812bb29e6 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -143,24 +143,24 @@ using namespace ::comphelper; #define TBI_SELECTIONMODE 1010 #define TBI_ONSTARTUP 1011 -#define CONFIGNAME_HELPWIN DEFINE_CONST_UNICODE("OfficeHelp") -#define CONFIGNAME_INDEXWIN DEFINE_CONST_UNICODE("OfficeHelpIndex") -#define CONFIGNAME_SEARCHPAGE DEFINE_CONST_UNICODE("OfficeHelpSearch") -#define IMAGE_URL DEFINE_CONST_UNICODE("private:factory/") - -#define PROPERTY_KEYWORDLIST DEFINE_CONST_OUSTRING("KeywordList") -#define PROPERTY_KEYWORDREF DEFINE_CONST_OUSTRING("KeywordRef") -#define PROPERTY_ANCHORREF DEFINE_CONST_OUSTRING("KeywordAnchorForRef") -#define PROPERTY_TITLEREF DEFINE_CONST_OUSTRING("KeywordTitleForRef") -#define PROPERTY_TITLE DEFINE_CONST_OUSTRING("Title") -#define HELP_URL DEFINE_CONST_OUSTRING("vnd.sun.star.help://") -#define HELP_SEARCH_TAG DEFINE_CONST_OUSTRING("/?Query=") -#define USERITEM_NAME DEFINE_CONST_OUSTRING("UserItem") - -#define PACKAGE_SETUP DEFINE_CONST_OUSTRING("/org.openoffice.Setup") -#define PATH_OFFICE_FACTORIES DEFINE_CONST_OUSTRING("Office/Factories/") -#define KEY_HELP_ON_OPEN DEFINE_CONST_OUSTRING("ooSetupFactoryHelpOnOpen") -#define KEY_UI_NAME DEFINE_CONST_OUSTRING("ooSetupFactoryUIName") +#define CONFIGNAME_HELPWIN "OfficeHelp" +#define CONFIGNAME_INDEXWIN "OfficeHelpIndex" +#define CONFIGNAME_SEARCHPAGE "OfficeHelpSearch" +#define IMAGE_URL "private:factory/" + +#define PROPERTY_KEYWORDLIST "KeywordList" +#define PROPERTY_KEYWORDREF "KeywordRef" +#define PROPERTY_ANCHORREF "KeywordAnchorForRef" +#define PROPERTY_TITLEREF "KeywordTitleForRef" +#define PROPERTY_TITLE "Title" +#define HELP_URL "vnd.sun.star.help://" +#define HELP_SEARCH_TAG "/?Query=" +#define USERITEM_NAME "UserItem" + +#define PACKAGE_SETUP "/org.openoffice.Setup" +#define PATH_OFFICE_FACTORIES "Office/Factories/" +#define KEY_HELP_ON_OPEN "ooSetupFactoryHelpOnOpen" +#define KEY_UI_NAME "ooSetupFactoryUIName" #define PARSE_URL( aURL ) \ Reference< util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) ); \ @@ -311,7 +311,7 @@ ContentListBox_Impl::~ContentListBox_Impl() void ContentListBox_Impl::InitRoot() { - String aHelpTreeviewURL( DEFINE_CONST_UNICODE("vnd.sun.star.hier://com.sun.star.help.TreeView/") ); + String aHelpTreeviewURL( "vnd.sun.star.hier://com.sun.star.help.TreeView/" ); ::com::sun::star::uno::Sequence< ::rtl::OUString > aList = SfxContentHelper::GetHelpTreeViewContents( aHelpTreeviewURL ); @@ -1511,7 +1511,7 @@ void SfxHelpWindow_Impl::loadHelpContent(const ::rtl::OUString& sHelpURL, sal_Bo { try { - Reference< XComponent > xContent = xLoader->loadComponentFromURL(sHelpURL, DEFINE_CONST_UNICODE("_self"), 0, Sequence< PropertyValue >()); + Reference< XComponent > xContent = xLoader->loadComponentFromURL(sHelpURL, "_self", 0, Sequence< PropertyValue >()); if (xContent.is()) { bSuccess = sal_True; @@ -2019,7 +2019,7 @@ long TextWin_Impl::Notify( NotifyEvent& rNEvt ) // remove docking area acceptor from layoutmanager, so it will not layout anything further .-) static void lcl_disableLayoutOfFrame(const Reference< XFrame >& xFrame) { - static const ::rtl::OUString PROP_LAYOUT_MANAGER(DEFINE_CONST_UNICODE("LayoutManager")); + static const ::rtl::OUString PROP_LAYOUT_MANAGER("LayoutManager"); Reference< XPropertySet > xPropSet(xFrame, UNO_QUERY_THROW); xPropSet->setPropertyValue(PROP_LAYOUT_MANAGER, makeAny(Reference< XLayoutManager >())); @@ -2051,9 +2051,9 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) : sfx2::AddToTaskPaneList( &aToolBox ); xFrame = Reference < XFrame > ( ::comphelper::getProcessServiceFactory()->createInstance( - DEFINE_CONST_UNICODE("com.sun.star.frame.Frame") ), UNO_QUERY ); + "com.sun.star.frame.Frame" ), UNO_QUERY ); xFrame->initialize( VCLUnoHelper::GetInterface ( pTextWin ) ); - xFrame->setName( DEFINE_CONST_UNICODE("OFFICE_HELP") ); + xFrame->setName( "OFFICE_HELP" ); lcl_disableLayoutOfFrame(xFrame); aToolBox.SetHelpId( HID_HELP_TOOLBOX ); @@ -2235,7 +2235,7 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox( bool bOnlyText ) aOnStartupCB.SaveValue(); // calculate and set optimal width of the onstartup checkbox - String sCBText( DEFINE_CONST_UNICODE( "XXX" ) ); + String sCBText( "XXX" ); sCBText += aOnStartupCB.GetText(); long nTextWidth = aOnStartupCB.GetTextWidth( sCBText ); Size aSize = aOnStartupCB.GetSizePixel(); @@ -2350,10 +2350,10 @@ IMPL_LINK_NOARG(SfxHelpTextWindow_Impl, SelectHdl) // create descriptor, set string and find all words Reference < XSearchDescriptor > xSrchDesc = xSearchable->createSearchDescriptor(); Reference < XPropertySet > xPropSet( xSrchDesc, UNO_QUERY ); - xPropSet->setPropertyValue( DEFINE_CONST_OUSTRING("SearchRegularExpression"), + xPropSet->setPropertyValue( "SearchRegularExpression", makeAny( sal_Bool( sal_True ) ) ); if ( bIsFullWordSearch ) - xPropSet->setPropertyValue( DEFINE_CONST_OUSTRING("SearchWords"), + xPropSet->setPropertyValue( "SearchWords", makeAny( sal_Bool( sal_True ) ) ); String sSearchString = sfx2::PrepareSearchString( aSearchText, GetBreakIterator(), false ); @@ -2412,9 +2412,9 @@ IMPL_LINK( SfxHelpTextWindow_Impl, FindHdl, sfx2::SearchDialog*, pDlg ) // create descriptor, set string and find all words Reference < XSearchDescriptor > xSrchDesc = xSearchable->createSearchDescriptor(); Reference < XPropertySet > xPropSet( xSrchDesc, UNO_QUERY ); - xPropSet->setPropertyValue( DEFINE_CONST_OUSTRING("SearchWords"), makeAny( sal_Bool( pDlg->IsOnlyWholeWords() != false ) ) ); - xPropSet->setPropertyValue( DEFINE_CONST_OUSTRING("SearchCaseSensitive"), makeAny( sal_Bool( pDlg->IsMarchCase() != false ) ) ); - xPropSet->setPropertyValue( DEFINE_CONST_OUSTRING("SearchBackwards"), makeAny( sal_Bool( pDlg->IsSearchBackwards() != false ) ) ); + xPropSet->setPropertyValue( "SearchWords", makeAny( sal_Bool( pDlg->IsOnlyWholeWords() != false ) ) ); + xPropSet->setPropertyValue( "SearchCaseSensitive", makeAny( sal_Bool( pDlg->IsMarchCase() != false ) ) ); + xPropSet->setPropertyValue( "SearchBackwards", makeAny( sal_Bool( pDlg->IsSearchBackwards() != false ) ) ); xSrchDesc->setSearchString( sSearchText ); Reference< XInterface > xSelection; Reference< XTextRange > xCursor = getCursor(); @@ -2585,7 +2585,7 @@ long SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt ) aMenu.SetHelpId( TBI_SELECTIONMODE, HID_HELP_TEXT_SELECTION_MODE ); Reference < XDispatchProvider > xProv( xFrame, UNO_QUERY ); URL aURL; - aURL.Complete = DEFINE_CONST_UNICODE(".uno:SelectTextMode"); + aURL.Complete = ".uno:SelectTextMode"; PARSE_URL( aURL ); Reference < XDispatch > xDisp = xProv.is() ? xProv->queryDispatch( aURL, rtl::OUString(), 0 ) : Reference < XDispatch >(); @@ -2734,18 +2734,18 @@ void SfxHelpTextWindow_Impl::SetPageStyleHeaderOff() const Reference < XText > xText = xRange->getText(); Reference < XPropertySet > xProps( xText->createTextCursorByRange( xRange ), UNO_QUERY ); ::rtl::OUString sStyleName; - if ( xProps->getPropertyValue( DEFINE_CONST_OUSTRING("PageStyleName") ) >>= sStyleName ) + if ( xProps->getPropertyValue( "PageStyleName" ) >>= sStyleName ) { Reference < XStyleFamiliesSupplier > xStyles( xController->getModel(), UNO_QUERY ); Reference < XNameContainer > xContainer; - if ( xStyles->getStyleFamilies()->getByName( DEFINE_CONST_OUSTRING("PageStyles") ) + if ( xStyles->getStyleFamilies()->getByName( "PageStyles" ) >>= xContainer ) { Reference < XStyle > xStyle; if ( xContainer->getByName( sStyleName ) >>= xStyle ) { Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY ); - xPropSet->setPropertyValue( DEFINE_CONST_OUSTRING("HeaderIsOn"), + xPropSet->setPropertyValue( "HeaderIsOn", makeAny( sal_Bool( sal_False ) ) ); Reference< XModifiable > xReset(xStyles, UNO_QUERY); @@ -2796,7 +2796,7 @@ void SfxHelpTextWindow_Impl::DoSearch() if ( !pSrchDlg ) { // create the search dialog - pSrchDlg = new sfx2::SearchDialog( pTextWin, DEFINE_CONST_UNICODE("HelpSearchDialog") ); + pSrchDlg = new sfx2::SearchDialog( pTextWin, "HelpSearchDialog" ); // set handler pSrchDlg->SetFindHdl( LINK( this, SfxHelpTextWindow_Impl, FindHdl ) ); pSrchDlg->SetCloseHdl( LINK( this, SfxHelpTextWindow_Impl, CloseHdl ) ); @@ -3015,7 +3015,7 @@ void SfxHelpWindow_Impl::SaveConfig() void SfxHelpWindow_Impl::ShowStartPage() { ::rtl::OUString sHelpURL = SfxHelpWindow_Impl::buildHelpURL(pIndexWin->GetFactory(), - DEFINE_CONST_UNICODE("/start"), + "/start", ::rtl::OUString(), sal_True); loadHelpContent(sHelpURL); @@ -3080,12 +3080,10 @@ IMPL_LINK_NOARG(SfxHelpWindow_Impl, OpenHdl) IMPL_LINK( SfxHelpWindow_Impl, SelectFactoryHdl, SfxHelpIndexWindow_Impl* , pWin ) { - if ( sTitle.Len() == 0 ) + if ( sTitle.isEmpty() ) sTitle = GetParent()->GetText(); - String aNewTitle = sTitle; - aNewTitle += DEFINE_CONST_UNICODE(" - "); - aNewTitle += pIndexWin->GetActiveFactoryTitle(); + OUString aNewTitle = sTitle + " - " + pIndexWin->GetActiveFactoryTitle(); Reference< XTitle > xTitle(xFrame, UNO_QUERY); if (xTitle.is ()) @@ -3135,11 +3133,11 @@ void SfxHelpWindow_Impl::openDone(const ::rtl::OUString& sURL , Reference < XPropertySet > xViewProps = xSettings->getViewSettings(); Reference< XPropertySetInfo > xInfo = xViewProps->getPropertySetInfo(); Any aBoolAny = makeAny( sal_Bool( sal_True ) ); - xViewProps->setPropertyValue( DEFINE_CONST_OUSTRING("PreventHelpTips"), aBoolAny ); - xViewProps->setPropertyValue( DEFINE_CONST_OUSTRING("ShowGraphics"), aBoolAny ); - xViewProps->setPropertyValue( DEFINE_CONST_OUSTRING("ShowTables"), aBoolAny ); - xViewProps->setPropertyValue( DEFINE_CONST_OUSTRING("HelpURL"), makeAny( DEFINE_CONST_OUSTRING("HID:SFX2_HID_HELP_ONHELP") ) ); - ::rtl::OUString sProperty( DEFINE_CONST_OUSTRING("IsExecuteHyperlinks") ); + xViewProps->setPropertyValue( "PreventHelpTips", aBoolAny ); + xViewProps->setPropertyValue( "ShowGraphics", aBoolAny ); + xViewProps->setPropertyValue( "ShowTables", aBoolAny ); + xViewProps->setPropertyValue( "HelpURL", makeAny( OUString("HID:SFX2_HID_HELP_ONHELP") ) ); + OUString sProperty( "IsExecuteHyperlinks" ); if ( xInfo->hasPropertyByName( sProperty ) ) xViewProps->setPropertyValue( sProperty, aBoolAny ); xController->restoreViewData(pHelpInterceptor->GetViewData()); @@ -3289,9 +3287,9 @@ void SfxHelpWindow_Impl::DoAction( sal_uInt16 nActionId ) case TBI_FORWARD : { URL aURL; - aURL.Complete = DEFINE_CONST_UNICODE(".uno:Backward"); + aURL.Complete = ".uno:Backward"; if ( TBI_FORWARD == nActionId ) - aURL.Complete = DEFINE_CONST_UNICODE(".uno:Forward"); + aURL.Complete = ".uno:Forward"; PARSE_URL( aURL ); pHelpInterceptor->dispatch( aURL, Sequence < PropertyValue >() ); break; @@ -3313,15 +3311,15 @@ void SfxHelpWindow_Impl::DoAction( sal_uInt16 nActionId ) { URL aURL; if ( TBI_PRINT == nActionId ) - aURL.Complete = DEFINE_CONST_UNICODE(".uno:Print"); + aURL.Complete = ".uno:Print"; else if ( TBI_SOURCEVIEW == nActionId ) - aURL.Complete = DEFINE_CONST_UNICODE(".uno:SourceView"); + aURL.Complete = ".uno:SourceView"; else if ( TBI_COPY == nActionId ) - aURL.Complete = DEFINE_CONST_UNICODE(".uno:Copy"); + aURL.Complete = ".uno:Copy"; else if ( TBI_SELECTIONMODE == nActionId ) - aURL.Complete = DEFINE_CONST_UNICODE(".uno:SelectTextMode"); + aURL.Complete = ".uno:SelectTextMode"; else - aURL.Complete = DEFINE_CONST_UNICODE(".uno:SearchDialog"); + aURL.Complete = ".uno:SearchDialog"; PARSE_URL( aURL ); Reference < XDispatch > xDisp = xProv->queryDispatch( aURL, String(), 0 ); if ( xDisp.is() ) diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx index cd69921be5b2..a43477762a67 100644 --- a/sfx2/source/appl/newhelp.hxx +++ b/sfx2/source/appl/newhelp.hxx @@ -524,7 +524,7 @@ friend class SfxHelpIndexWindow_Impl; sal_Bool bIndex; sal_Bool bGrabFocusToToolBox; Point aWinPos; - String sTitle; + OUString sTitle; String sKeyword; virtual void Resize(); diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 5d92a18b7f85..5a995ecd2807 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -327,7 +327,7 @@ String SfxHelp_Impl::GetHelpText( const OUString& aCommandURL, const String& rMo // create help url String aHelpURL = SfxHelp::CreateHelpURL( aCommandURL, rModule ); // added 'active' parameter - aHelpURL.Insert( String( DEFINE_CONST_UNICODE("&Active=true") ), aHelpURL.SearchBackward( '#' ) ); + aHelpURL.Insert( String( "&Active=true" ), aHelpURL.SearchBackward( '#' ) ); // load help string return SfxContentHelper::GetActiveHelpString( aHelpURL ); } @@ -390,21 +390,21 @@ OUString getDefaultModule_Impl() OUString sDefaultModule; SvtModuleOptions aModOpt; if ( aModOpt.IsModuleInstalled( SvtModuleOptions::E_SWRITER ) ) - sDefaultModule = DEFINE_CONST_UNICODE("swriter"); + sDefaultModule = "swriter"; else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::E_SCALC ) ) - sDefaultModule = DEFINE_CONST_UNICODE("scalc"); + sDefaultModule = "scalc"; else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::E_SIMPRESS ) ) - sDefaultModule = DEFINE_CONST_UNICODE("simpress"); + sDefaultModule = "simpress"; else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::E_SDRAW ) ) - sDefaultModule = DEFINE_CONST_UNICODE("sdraw"); + sDefaultModule = "sdraw"; else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::E_SMATH ) ) - sDefaultModule = DEFINE_CONST_UNICODE("smath"); + sDefaultModule = "smath"; else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::E_SCHART ) ) - sDefaultModule = DEFINE_CONST_UNICODE("schart"); + sDefaultModule = "schart"; else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::E_SBASIC ) ) - sDefaultModule = DEFINE_CONST_UNICODE("sbasic"); + sDefaultModule = "sbasic"; else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::E_SDATABASE ) ) - sDefaultModule = DEFINE_CONST_UNICODE("sdatabase"); + sDefaultModule = "sdatabase"; else { SAL_WARN( "sfx2.appl", "getDefaultModule_Impl(): no module installed" ); @@ -565,7 +565,7 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame >& rHelpTask , Reference< XPropertySet > xProps(xHelpTask, UNO_QUERY); if (xProps.is()) xProps->setPropertyValue( - DEFINE_CONST_UNICODE("Title"), + "Title", makeAny(SfxResId(STR_HELP_WINDOW_TITLE).toString())); pHelpWindow->setContainerWindow( xParentWindow ); @@ -615,13 +615,13 @@ OUString SfxHelp::GetHelpText( const OUString& aCommandURL, const Window* pWindo // add some debug information? if ( bIsDebug ) { - sHelpText += DEFINE_CONST_UNICODE("\n-------------\n"); + sHelpText += "\n-------------\n"; sHelpText += String( sModuleName ); - sHelpText += DEFINE_CONST_UNICODE(": "); + sHelpText += ": "; sHelpText += aCommandURL; if ( !aNewHelpId.isEmpty() ) { - sHelpText += DEFINE_CONST_UNICODE(" - "); + sHelpText += " - "; sHelpText += String(OStringToOUString(aNewHelpId, RTL_TEXTENCODING_UTF8)); } } diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx index d62d5490217b..6597d3404bfd 100644 --- a/sfx2/source/appl/sfxpicklist.cxx +++ b/sfx2/source/appl/sfxpicklist.cxx @@ -313,8 +313,8 @@ void SfxPickList::ExecuteEntry( sal_uInt32 nIndex ) { SfxRequest aReq( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, SFX_APP()->GetPool() ); aReq.AppendItem( SfxStringItem( SID_FILE_NAME, pPick->aName )); - aReq.AppendItem( SfxStringItem( SID_REFERER, DEFINE_CONST_UNICODE( SFX_REFERER_USER ) ) ); - aReq.AppendItem( SfxStringItem( SID_TARGETNAME, DEFINE_CONST_UNICODE("_default") ) ); + aReq.AppendItem( SfxStringItem( SID_REFERER, SFX_REFERER_USER ) ); + aReq.AppendItem( SfxStringItem( SID_TARGETNAME, "_default" ) ); String aFilter( pPick->aFilter ); aGuard.clear(); diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 796ae0158c0f..049823b7f2da 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -506,7 +506,7 @@ sal_Bool SfxFilterMatcher::IsFilterInstalled_Impl( const SfxFilter* pFilter ) { #ifdef DBG_UTIL // Start Setup - InfoBox( NULL, DEFINE_CONST_UNICODE("Here should the Setup now be starting!") ).Execute(); + InfoBox( NULL, "Here should the Setup now be starting!" ).Execute(); #endif // Installation must still give feedback if it worked or not, // then the Filterflag be deleted @@ -607,7 +607,7 @@ const SfxFilter* SfxFilterMatcher::GetFilterForProps( const com::sun::star::uno: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery > xTypeCFG; if( xServiceManager.is() == sal_True ) - xTypeCFG = ::com::sun::star::uno::Reference < com::sun::star::container::XContainerQuery >( xServiceManager->createInstance( DEFINE_CONST_UNICODE( "com.sun.star.document.TypeDetection" ) ), ::com::sun::star::uno::UNO_QUERY ); + xTypeCFG = ::com::sun::star::uno::Reference < com::sun::star::container::XContainerQuery >( xServiceManager->createInstance( "com.sun.star.document.TypeDetection" ), ::com::sun::star::uno::UNO_QUERY ); if ( xTypeCFG.is() ) { // make query for all types matching the properties @@ -790,8 +790,8 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const String& rName, Sf ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xTypeCFG ; if( xServiceManager.is() == sal_True ) { - xFilterCFG = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >( xServiceManager->createInstance( DEFINE_CONST_UNICODE( "com.sun.star.document.FilterFactory" ) ), ::com::sun::star::uno::UNO_QUERY ); - xTypeCFG = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >( xServiceManager->createInstance( DEFINE_CONST_UNICODE( "com.sun.star.document.TypeDetection" ) ), ::com::sun::star::uno::UNO_QUERY ); + xFilterCFG = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >( xServiceManager->createInstance( "com.sun.star.document.FilterFactory" ), ::com::sun::star::uno::UNO_QUERY ); + xTypeCFG = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >( xServiceManager->createInstance( "com.sun.star.document.TypeDetection" ), ::com::sun::star::uno::UNO_QUERY ); } if( xFilterCFG.is() && xTypeCFG.is() ) @@ -832,8 +832,8 @@ IMPL_STATIC_LINK( SfxFilterMatcher, MaybeFileHdl_Impl, String*, pString ) { const SfxFilter* pFilter = pThis->GetFilter4Extension( *pString, SFX_FILTER_IMPORT ); if (pFilter && !pFilter->GetWildcard().Matches( String() ) && - !pFilter->GetWildcard().Matches(DEFINE_CONST_UNICODE("*.*")) && - !pFilter->GetWildcard().Matches(rtl::OUString('*')) + !pFilter->GetWildcard().Matches(OUString("*.*")) && + !pFilter->GetWildcard().Matches(OUString('*')) ) { return sal_True; @@ -1027,7 +1027,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl( { ::com::sun::star::uno::Sequence< ::rtl::OUString > lExtensions; lTypeProperties[nTypeProperty].Value >>= lExtensions; - sExtension = implc_convertStringlistToString( lExtensions, ';', DEFINE_CONST_UNICODE("*.") ); + sExtension = implc_convertStringlistToString( lExtensions, ';', "*." ); } } else if ( lTypeProperties[nTypeProperty].Name == "URLPattern" ) @@ -1058,7 +1058,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl( // register SfxFilter // first erase module name from old filter names! // e.g: "scalc: DIF" => "DIF" - sal_Int32 nStartRealName = sFilterName.indexOf( DEFINE_CONST_UNICODE(": "), 0 ); + sal_Int32 nStartRealName = sFilterName.indexOf( ": ", 0 ); if( nStartRealName != -1 ) { OSL_FAIL("Old format, not supported!"); @@ -1125,8 +1125,8 @@ void SfxFilterContainer::ReadFilters_Impl( sal_Bool bUpdate ) ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xTypeCFG ; if( xServiceManager.is() == sal_True ) { - xFilterCFG = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >( xServiceManager->createInstance( DEFINE_CONST_UNICODE( "com.sun.star.document.FilterFactory" ) ), ::com::sun::star::uno::UNO_QUERY ); - xTypeCFG = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >( xServiceManager->createInstance( DEFINE_CONST_UNICODE( "com.sun.star.document.TypeDetection" ) ), ::com::sun::star::uno::UNO_QUERY ); + xFilterCFG = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >( xServiceManager->createInstance( "com.sun.star.document.FilterFactory" ), ::com::sun::star::uno::UNO_QUERY ); + xTypeCFG = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >( xServiceManager->createInstance( "com.sun.star.document.TypeDetection" ), ::com::sun::star::uno::UNO_QUERY ); } if( diff --git a/sfx2/source/bastyp/fltlst.cxx b/sfx2/source/bastyp/fltlst.cxx index 2cc0b74f3741..4af81852e72f 100644 --- a/sfx2/source/bastyp/fltlst.cxx +++ b/sfx2/source/bastyp/fltlst.cxx @@ -92,7 +92,7 @@ SfxFilterListener::SfxFilterListener() uno::Reference< lang::XMultiServiceFactory > xSmgr = ::comphelper::getProcessServiceFactory(); if( xSmgr.is() == sal_True ) { - uno::Reference< util::XRefreshable > xNotifier( xSmgr->createInstance( DEFINE_CONST_OUSTRING("com.sun.star.document.FilterConfigRefresh") ), uno::UNO_QUERY ); + uno::Reference< util::XRefreshable > xNotifier( xSmgr->createInstance( "com.sun.star.document.FilterConfigRefresh" ), uno::UNO_QUERY ); if( xNotifier.is() == sal_True ) { m_xFilterCache = xNotifier; diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx index 66be8a6cf101..a71fa4adeee2 100644 --- a/sfx2/source/bastyp/sfxhtml.cxx +++ b/sfx2/source/bastyp/sfxhtml.cxx @@ -268,7 +268,7 @@ sal_Bool SfxHTMLParser::FinishFileDownload( String& rStr ) void SfxHTMLParser::GetScriptType_Impl( SvKeyValueIterator *pHTTPHeader ) { - aScriptType = DEFINE_CONST_UNICODE(SVX_MACRO_LANGUAGE_JAVASCRIPT); + aScriptType = SVX_MACRO_LANGUAGE_JAVASCRIPT; eScriptType = JAVASCRIPT; if( pHTTPHeader ) { @@ -299,7 +299,7 @@ void SfxHTMLParser::GetScriptType_Impl( SvKeyValueIterator *pHTTPHeader ) if( aTmp.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_LG_starbasic ) ) { eScriptType = STARBASIC; - aScriptType = DEFINE_CONST_UNICODE(SVX_MACRO_LANGUAGE_STARBASIC); + aScriptType = SVX_MACRO_LANGUAGE_STARBASIC; } if( !aTmp.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_LG_javascript ) ) { diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 09d7c5f503a4..8dcb7a455aa6 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1941,7 +1941,7 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState ) return SFX_ITEM_DISABLED; ::com::sun::star::util::URL aURL; - ::rtl::OUString aCmd( DEFINE_CONST_UNICODE(".uno:")); + OUString aCmd( ".uno:" ); aURL.Protocol = aCmd; aURL.Path = ::rtl::OUString::createFromAscii(pSlot->GetUnoName()); aCmd += aURL.Path; diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx index 9e253f0fa3cf..caf46f7c893d 100644 --- a/sfx2/source/control/objface.cxx +++ b/sfx2/source/control/objface.cxx @@ -422,7 +422,7 @@ SfxObjectUI_Impl* CreateObjectBarUI_Impl( sal_uInt16 nPos, const ResId& rResId, if( ! aResId.GetResMgr() ) aResId.SetResMgr( SfxApplication::GetOrCreate()->GetOffResManager_Impl() ); if ( !aResId.GetResMgr() || !aResId.GetResMgr()->IsAvailable(aResId) ) - pUI->pName = new String (DEFINE_CONST_UNICODE("NoName")); + pUI->pName = new String ("NoName"); else pUI->pName = new String(aResId.toString()); } diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index fb9488d33f66..d52995479406 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -182,7 +182,7 @@ void BindDispatch_Impl::Dispatch( uno::Sequence < beans::PropertyValue > aProps, { sal_Int32 nLength = aProps.getLength(); aProps.realloc(nLength+1); - aProps[nLength].Name = DEFINE_CONST_UNICODE("SynchronMode"); + aProps[nLength].Name = "SynchronMode"; aProps[nLength].Value <<= bForceSynchron ; xDisp->dispatch( aURL, aProps ); } @@ -270,7 +270,7 @@ const SfxSlotServer* SfxStateCache::GetSlotServer( SfxDispatcher &rDispat , cons // create the dispatch URL from the slot data ::com::sun::star::util::URL aURL; - ::rtl::OUString aCmd = DEFINE_CONST_UNICODE(".uno:"); + OUString aCmd = ".uno:"; aURL.Protocol = aCmd; aURL.Path = ::rtl::OUString::createFromAscii( pSlot->GetUnoName() ); aCmd += aURL.Path; diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx index 1756d3a9113f..99275f4d50b6 100644 --- a/sfx2/source/dialog/alienwarn.cxx +++ b/sfx2/source/dialog/alienwarn.cxx @@ -49,13 +49,13 @@ SfxAlienWarningDialog::SfxAlienWarningDialog( Window* pParent, const String& _rF m_aQueryImage.SetImage( QueryBox::GetStandardImage() ); // replace formatname (text) - String sInfoText = m_aInfoText.GetText(); - sInfoText.SearchAndReplaceAll( DEFINE_CONST_UNICODE("%FORMATNAME"), _rFormatName ); + OUString sInfoText = m_aInfoText.GetText(); + sInfoText = sInfoText.replaceAll( "%FORMATNAME", _rFormatName ); m_aInfoText.SetText( sInfoText ); // replace formatname (button) sInfoText = m_aKeepCurrentBtn.GetText(); - sInfoText.SearchAndReplaceAll( DEFINE_CONST_UNICODE("%FORMATNAME"), _rFormatName ); + sInfoText = sInfoText.replaceAll( "%FORMATNAME", _rFormatName ); m_aKeepCurrentBtn.SetText( sInfoText ); // load value of "warning on" checkbox from save options diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 9655c32219fe..894072f6e87a 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -160,7 +160,7 @@ String CreateSizeText( sal_uIntPtr nSize, sal_Bool bExtraBytes, sal_Bool bSmartE rLocaleWrapper.getNumDecimalSep()[0] ); aSizeStr += aUnitStr; - aSizeStr += DEFINE_CONST_UNICODE(" ("); + aSizeStr += " ("; aSizeStr += rLocaleWrapper.getNum( nSize2, 0 ); aSizeStr += ' '; aSizeStr += SfxResId(STR_BYTES).toString(); @@ -169,7 +169,7 @@ String CreateSizeText( sal_uIntPtr nSize, sal_Bool bExtraBytes, sal_Bool bSmartE else if ( bGB && bSmartExtraBytes ) { nSize1 = nSize / nMega; - aSizeStr = DEFINE_CONST_UNICODE(" ("); + aSizeStr = " ("; aSizeStr += rLocaleWrapper.getNum( nSize1, 0 ); aSizeStr += aUnitStr; aSizeStr += ')'; @@ -182,7 +182,7 @@ String ConvertDateTime_Impl( const String& rName, { Date aD(uDT.Day, uDT.Month, uDT.Year); Time aT(uDT.Hours, uDT.Minutes, uDT.Seconds, uDT.HundredthSeconds); - const String pDelim ( DEFINE_CONST_UNICODE( ", ")); + const String pDelim ( ", " ); String aStr( rWrapper.getDate( aD ) ); aStr += pDelim; aStr += rWrapper.getTime( aT, sal_True, sal_False ); diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index c8cb078ee409..e0a16237a788 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -1198,7 +1198,7 @@ void SfxDockingWindow::FillInfo(SfxChildWinInfo& rInfo) const pImp->aWinState = GetFloatingWindow()->GetWindowState(); rInfo.aWinState = pImp->aWinState; - rInfo.aExtraString = DEFINE_CONST_UNICODE("AL:("); + rInfo.aExtraString = "AL:("; rInfo.aExtraString += String::CreateFromInt32((sal_uInt16) GetAlignment()); rInfo.aExtraString += ','; rInfo.aExtraString += String::CreateFromInt32 ((sal_uInt16) pImp->GetLastAlignment()); diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index ae44fac5b8fa..d20e542b7ae0 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -111,9 +111,9 @@ using namespace ::cppu; //----------------------------------------------------------------------------- -#define IODLG_CONFIGNAME String(DEFINE_CONST_UNICODE("FilePicker_Save")) -#define IMPGRF_CONFIGNAME String(DEFINE_CONST_UNICODE("FilePicker_Graph")) -#define USERITEM_NAME ::rtl::OUString("UserItem" ) +#define IODLG_CONFIGNAME OUString("FilePicker_Save") +#define IMPGRF_CONFIGNAME OUString("FilePicker_Graph") +#define USERITEM_NAME OUString("UserItem") //----------------------------------------------------------------------------- @@ -425,7 +425,7 @@ sal_Bool FileDialogHelper_Impl::CheckFilterOptionsCapability( const SfxFilter* _ sal_Int32 nPropertyCount = aProps.getLength(); for( sal_Int32 nProperty=0; nProperty < nPropertyCount; ++nProperty ) { - if( aProps[nProperty].Name.equals( DEFINE_CONST_OUSTRING( "UIComponent") ) ) + if( aProps[nProperty].Name == "UIComponent" ) { aProps[nProperty].Value >>= aServiceName; if( !aServiceName.isEmpty() ) @@ -846,7 +846,7 @@ static bool lcl_isSystemFilePicker( const uno::Reference< XFilePicker >& _rxFP ) uno::Reference< XServiceInfo > xSI( _rxFP, UNO_QUERY ); if ( !xSI.is() ) return true; - return xSI->supportsService( DEFINE_CONST_OUSTRING( "com.sun.star.ui.dialogs.SystemFilePicker" ) ); + return xSI->supportsService( "com.sun.star.ui.dialogs.SystemFilePicker" ); } catch( const Exception& ) { @@ -985,7 +985,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( if( xFactory.is() ) { mxFilterCFG = uno::Reference< XNameAccess >( - xFactory->createInstance( DEFINE_CONST_OUSTRING( "com.sun.star.document.FilterFactory" ) ), + xFactory->createInstance( "com.sun.star.document.FilterFactory" ), UNO_QUERY ); } @@ -1001,7 +1001,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( if ( mbExport && !mxFilterCFG.is() && xFactory.is() ) { mxFilterCFG = uno::Reference< XNameAccess >( - xFactory->createInstance( DEFINE_CONST_OUSTRING( "com.sun.star.document.FilterFactory" ) ), + xFactory->createInstance( "com.sun.star.document.FilterFactory" ), UNO_QUERY ); } break; @@ -1894,7 +1894,7 @@ void FileDialogHelper_Impl::addGraphicFilter() #if defined(WNT) if ( aExtensions.Len() > 240 ) - aExtensions = DEFINE_CONST_UNICODE( FILEDIALOG_FILTER_ALL ); + aExtensions = FILEDIALOG_FILTER_ALL; #endif sal_Bool bIsInOpenMode = isInOpenMode(); @@ -1957,7 +1957,7 @@ void FileDialogHelper_Impl::saveConfig() if ( mbHasPreview ) { SvtViewOptions aDlgOpt( E_DIALOG, IMPGRF_CONFIGNAME ); - String aUserData = DEFINE_CONST_UNICODE( GRF_CONFIG_STR ); + String aUserData = OUString(GRF_CONFIG_STR); try { @@ -1984,7 +1984,7 @@ void FileDialogHelper_Impl::saveConfig() { sal_Bool bWriteConfig = sal_False; SvtViewOptions aDlgOpt( E_DIALOG, IODLG_CONFIGNAME ); - String aUserData = DEFINE_CONST_UNICODE( STD_CONFIG_STR ); + String aUserData = OUString(STD_CONFIG_STR); if ( aDlgOpt.Exists() ) { @@ -2144,7 +2144,7 @@ void FileDialogHelper_Impl::loadConfig() } if ( ! aUserData.Len() ) - aUserData = DEFINE_CONST_UNICODE( STD_CONFIG_STR ); + aUserData = STD_CONFIG_STR; if ( maPath.isEmpty() ) displayFolder( getInitPath( aUserData, 1 ) ); @@ -2757,16 +2757,16 @@ ErrCode RequestPassword(const SfxFilter* pCurrentFilter, rtl::OUString& aURL, Sf // ------------------------------------------------------------------------ String EncodeSpaces_Impl( const String& rSource ) { - String sRet( rSource ); - sRet.SearchAndReplaceAll( DEFINE_CONST_UNICODE( " " ), DEFINE_CONST_UNICODE( "%20" ) ); + OUString sRet( rSource ); + sRet = sRet.replaceAll( " ", "%20" ); return sRet; } // ------------------------------------------------------------------------ String DecodeSpaces_Impl( const String& rSource ) { - String sRet( rSource ); - sRet.SearchAndReplaceAll( DEFINE_CONST_UNICODE( "%20" ), DEFINE_CONST_UNICODE( " " ) ); + OUString sRet( rSource ); + sRet = sRet.replaceAll( "%20", " " ); return sRet; } diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx index 8b841ff8739b..46700f1c1f46 100644 --- a/sfx2/source/dialog/filtergrouping.cxx +++ b/sfx2/source/dialog/filtergrouping.cxx @@ -232,7 +232,7 @@ namespace sfx2 //================================================================ // get the list describing the order of all global classes Sequence< ::rtl::OUString > aGlobalClasses; - _rFilterClassification.getNodeValue( DEFINE_CONST_OUSTRING( "GlobalFilters/Order" ) ) >>= aGlobalClasses; + _rFilterClassification.getNodeValue( "GlobalFilters/Order" ) >>= aGlobalClasses; const ::rtl::OUString* pNames = aGlobalClasses.getConstArray(); const ::rtl::OUString* pNamesEnd = pNames + aGlobalClasses.getLength(); @@ -258,7 +258,7 @@ namespace sfx2 //================================================================ // go for all the single class entries OConfigurationNode aFilterClassesNode = - _rFilterClassification.openNode( DEFINE_CONST_OUSTRING( "GlobalFilters/Classes" ) ); + _rFilterClassification.openNode( "GlobalFilters/Classes" ); Sequence< ::rtl::OUString > aFilterClasses = aFilterClassesNode.getNodeNames(); ::std::for_each( aFilterClasses.getConstArray(), @@ -300,7 +300,7 @@ namespace sfx2 // the node for the local classes OConfigurationNode aFilterClassesNode = - _rFilterClassification.openNode( DEFINE_CONST_OUSTRING( "LocalFilters/Classes" ) ); + _rFilterClassification.openNode( "LocalFilters/Classes" ); Sequence< ::rtl::OUString > aFilterClasses = aFilterClassesNode.getNodeNames(); ::std::for_each( @@ -317,7 +317,7 @@ namespace sfx2 // open our config node OConfigurationTreeRoot aFilterClassification = OConfigurationTreeRoot::createWithComponentContext( ::comphelper::getProcessComponentContext(), - DEFINE_CONST_OUSTRING( "org.openoffice.Office.UI/FilterClassification" ), + "org.openoffice.Office.UI/FilterClassification", -1, OConfigurationTreeRoot::CM_READONLY ); @@ -790,7 +790,7 @@ namespace sfx2 if ( !_rFilters.empty() ) { FilterGroup& rGlobalClasses = *_rFilters.begin(); - rGlobalClasses.push_front( FilterDescriptor( sAllFilterName, DEFINE_CONST_UNICODE( FILEDIALOG_FILTER_ALL ) ) ); + rGlobalClasses.push_front( FilterDescriptor( sAllFilterName, FILEDIALOG_FILTER_ALL ) ); } } } @@ -989,11 +989,11 @@ namespace sfx2 std::vector< ExportFilter > aFilterGroup; Reference< XFilterGroupManager > xFilterGroupManager( _rxFilterManager, UNO_QUERY ); ::rtl::OUString sTypeName; - const ::rtl::OUString sWriterHTMLType( DEFINE_CONST_OUSTRING("generic_HTML") ); - const ::rtl::OUString sGraphicHTMLType( DEFINE_CONST_OUSTRING("graphic_HTML") ); - const ::rtl::OUString sXHTMLType( DEFINE_CONST_OUSTRING("XHTML_File") ); - const ::rtl::OUString sPDFType( DEFINE_CONST_OUSTRING("pdf_Portable_Document_Format") ); - const ::rtl::OUString sFlashType( DEFINE_CONST_OUSTRING("graphic_SWF") ); + const ::rtl::OUString sWriterHTMLType( "generic_HTML" ); + const ::rtl::OUString sGraphicHTMLType( "graphic_HTML" ); + const ::rtl::OUString sXHTMLType( "XHTML_File" ); + const ::rtl::OUString sPDFType( "pdf_Portable_Document_Format" ); + const ::rtl::OUString sFlashType( "graphic_SWF" ); for ( const SfxFilter* pFilter = _rFilterMatcher.First(); pFilter; pFilter = _rFilterMatcher.Next() ) { diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx index 2d0013b09cf5..b63e28a53006 100644 --- a/sfx2/source/dialog/partwnd.cxx +++ b/sfx2/source/dialog/partwnd.cxx @@ -107,7 +107,7 @@ SfxPartDockWnd_Impl::SfxPartDockWnd_Impl { ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > xFrame( ::comphelper::getProcessServiceFactory()->createInstance( - DEFINE_CONST_UNICODE("com.sun.star.frame.Frame") ), ::com::sun::star::uno::UNO_QUERY ); + "com.sun.star.frame.Frame" ), ::com::sun::star::uno::UNO_QUERY ); xFrame->initialize( VCLUnoHelper::GetInterface ( this ) ); ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPropSet( diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx index 4f6fe256d60c..0cf9690d9896 100644 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -34,7 +34,6 @@ using namespace ::com::sun::star::uno; namespace sfx2 { -#define USERITEM_NAME DEFINE_CONST_OUSTRING("UserItem") #define MAX_SAVE_COUNT (sal_uInt16)10 // ============================================================================ @@ -84,7 +83,7 @@ void SearchDialog::LoadConfig() if ( aViewOpt.Exists() ) { m_sWinState = rtl::OUStringToOString(aViewOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US); - Any aUserItem = aViewOpt.GetUserItem( USERITEM_NAME ); + Any aUserItem = aViewOpt.GetUserItem( "UserItem" ); ::rtl::OUString aTemp; if ( aUserItem >>= aTemp ) { @@ -129,7 +128,7 @@ void SearchDialog::SaveConfig() sUserData += String::CreateFromInt32( m_aBackwardsBox.IsChecked() ? 1 : 0 ); Any aUserItem = makeAny( ::rtl::OUString( sUserData ) ); - aViewOpt.SetUserItem( USERITEM_NAME, aUserItem ); + aViewOpt.SetUserItem( "UserItem", aUserItem ); } IMPL_LINK_NOARG(SearchDialog, FindHdl) diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index c5f2870eb67b..404f0c9bc442 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1872,7 +1872,7 @@ sal_Int32 SfxCommonTemplateDialog_Impl::LoadFactoryStyleFilter( SfxObjectShell* ::comphelper::SequenceAsHashMap aFactoryProps( xModuleManager->getByName( getModuleIdentifier( xModuleManager, i_pObjSh ) ) ); sal_Int32 nDefault = -1; - nFilter = aFactoryProps.getUnpackedValueOrDefault( DEFINE_CONST_UNICODE("ooSetupFactoryStyleFilter"), nDefault ); + nFilter = aFactoryProps.getUnpackedValueOrDefault( "ooSetupFactoryStyleFilter", nDefault ); return nFilter; } @@ -1883,7 +1883,7 @@ void SfxCommonTemplateDialog_Impl::SaveFactoryStyleFilter( SfxObjectShell* i_pOb { OSL_ENSURE( i_pObjSh, "SfxCommonTemplateDialog_Impl::LoadFactoryStyleFilter(): no ObjectShell" ); Sequence< PropertyValue > lProps(1); - lProps[0].Name = DEFINE_CONST_UNICODE("ooSetupFactoryStyleFilter"); + lProps[0].Name = "ooSetupFactoryStyleFilter"; lProps[0].Value = makeAny( i_nFilter );; xModuleManager->replaceByName( getModuleIdentifier( xModuleManager, i_pObjSh ), makeAny( lProps ) ); } diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 9aa0901c0b77..25db61b2d705 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -138,7 +138,7 @@ SfxVersionInfo::SfxVersionInfo() static String ConvertDateTime_Impl(const DateTime& rTime, const LocaleDataWrapper& rWrapper) { - const String pDelim ( DEFINE_CONST_UNICODE( ", ")); + const String pDelim (", "); String aStr(rWrapper.getDate(rTime)); aStr += pDelim; aStr += rWrapper.getTime(rTime, sal_True, sal_False); @@ -292,8 +292,8 @@ void SfxVersionDialog::Open_Impl() SvTreeListEntry *pEntry = aVersionBox.FirstSelected(); sal_uIntPtr nPos = aVersionBox.GetModel()->GetRelPos( pEntry ); SfxInt16Item aItem( SID_VERSION, (short)nPos+1 ); - SfxStringItem aTarget( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") ); - SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE("private:user") ); + SfxStringItem aTarget( SID_TARGETNAME, "_blank" ); + SfxStringItem aReferer( SID_REFERER, "private:user" ); SfxStringItem aFile( SID_FILE_NAME, pObjShell->GetMedium()->GetName() ); uno::Sequence< beans::NamedValue > aEncryptionData; diff --git a/sfx2/source/doc/QuerySaveDocument.cxx b/sfx2/source/doc/QuerySaveDocument.cxx index 49448eb5fe9e..7b24f7d55e15 100644 --- a/sfx2/source/doc/QuerySaveDocument.cxx +++ b/sfx2/source/doc/QuerySaveDocument.cxx @@ -32,9 +32,8 @@ short ExecuteQuerySaveDocument(Window* _pParent,const String& _rTitle) { // don't block Desktop::terminate() if there's no user to ask return RET_NO; } - String aText( SfxResId(STR_QUERY_SAVE_DOCUMENT).toString() ); - aText.SearchAndReplace( DEFINE_CONST_UNICODE( "$(DOC)" ), - _rTitle ); + OUString aText( SfxResId(STR_QUERY_SAVE_DOCUMENT).toString() ); + aText = aText.replaceFirst( "$(DOC)", _rTitle ); QueryBox aQBox( _pParent, WB_YES_NO_CANCEL | WB_DEF_YES, aText ); aQBox.SetText(SfxResId(STR_QUERY_SAVE_DOCUMENT_TITLE).toString()); // Window title aQBox.SetButtonText( BUTTONID_NO, SfxResId(STR_NOSAVEANDCLOSE).toString() ); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 907e0134d938..5cab6ced56d3 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -1348,7 +1348,7 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIf util::RevisionTag& rTag = pImp->aVersions[nVersion]; { // Open SubStorage for all versions - uno::Reference < embed::XStorage > xSub = pImp->xStorage->openStorageElement( DEFINE_CONST_UNICODE( "Versions" ), + uno::Reference < embed::XStorage > xSub = pImp->xStorage->openStorageElement( "Versions", embed::ElementModes::READ ); DBG_ASSERT( xSub.is(), "Version list, but no Versions!" ); @@ -2173,7 +2173,7 @@ void SfxMedium::DoBackup_Impl() // save as ".bak" file INetURLObject aDest( aBakDir ); aDest.insertName( aSource.getName() ); - aDest.setExtension( DEFINE_CONST_UNICODE( "bak" ) ); + aDest.setExtension( "bak" ); String aFileName = aDest.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); // create a content for the source file @@ -3162,8 +3162,7 @@ sal_uInt16 SfxMedium::AddVersion_Impl( util::RevisionTag& rRevision ) if ( aLongs[nKey] > ( sal_uIntPtr ) nKey+1 ) break; - String aRevName = DEFINE_CONST_UNICODE( "Version" ); - aRevName += String::CreateFromInt32( nKey + 1 ); + OUString aRevName = "Version" + OUString::number( nKey + 1 ); pImp->aVersions.realloc( nLength+1 ); rRevision.Identifier = aRevName; pImp->aVersions[nLength] = rRevision; diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx index f7d47e839573..1028f85a5a92 100644 --- a/sfx2/source/doc/docfilt.cxx +++ b/sfx2/source/doc/docfilt.cxx @@ -63,13 +63,13 @@ SfxFilter::SfxFilter( const String &rName, String aShort, aLong; String aRet; sal_uInt16 nMaxLength = USHRT_MAX; - String aTest; + OUString aTest; sal_uInt16 nPos = 0; while( ( aRet = aExts.GetToken( nPos++, ';' ) ).Len() ) { aTest = aRet; - aTest.SearchAndReplace( DEFINE_CONST_UNICODE( "*." ), String() ); - if( aTest.Len() <= nMaxLength ) + aTest = aTest.replaceFirst( "*." , "" ); + if( aTest.getLength() <= nMaxLength ) { if( aShort.Len() ) aShort += ';'; aShort += aRet; diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index e7edadcaa681..7190f73591f5 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -747,7 +747,7 @@ void SfxObjectShell::SetTitle String X(const String &rRet) { if ( !rRet.Len() ) - return DEFINE_CONST_UNICODE( "-empty-" ); + return String( "-empty-" ); return rRet; } #else @@ -817,7 +817,7 @@ String SfxObjectShell::GetTitle { static sal_Bool bRecur = sal_False; if ( bRecur ) - return DEFINE_CONST_UNICODE( "-not available-" ); + return String( "-not available-" ); bRecur = sal_True; String aTitle; @@ -909,7 +909,7 @@ String SfxObjectShell::GetTitle String aComplete( aURL.GetMainURL( INetURLObject::NO_DECODE ) ); if( aComplete.Len() > nMaxLength ) { - String aRet( DEFINE_CONST_UNICODE( "..." ) ); + String aRet( "..." ); aRet += aComplete.Copy( aComplete.Len() - nMaxLength + 3, nMaxLength - 3 ); return X( aRet ); } diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index afb115bc3bc6..73611c25d5c4 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -486,8 +486,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) } else { - aURL = DEFINE_CONST_UNICODE( "private:factory/" ); - aURL += rtl::OUString::createFromAscii( GetFactory().GetShortName() ); + aURL = "private:factory/" + OUString::createFromAscii( GetFactory().GetShortName() ); aTitle = GetTitle(); } diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 1a03a3bd0ad7..2fa99cbe058a 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -500,7 +500,7 @@ sal_Bool SfxObjectShell::DoInitNew( SfxMedium* pMed ) TransformItems( SID_OPENDOC, *pSet, aArgs ); sal_Int32 nLength = aArgs.getLength(); aArgs.realloc( nLength + 1 ); - aArgs[nLength].Name = DEFINE_CONST_UNICODE("Title"); + aArgs[nLength].Name = "Title"; aArgs[nLength].Value <<= ::rtl::OUString( GetTitle( SFX_TITLE_DETECT ) ); xModel->attachResource( ::rtl::OUString(), aArgs ); impl_addToModelCollection(xModel); @@ -2142,7 +2142,7 @@ sal_Bool SfxObjectShell::ImportFrom( SfxMedium& rMedium, bool bInsert ) uno::Reference< lang::XMultiServiceFactory > xMan = ::comphelper::getProcessServiceFactory(); uno::Reference < lang::XMultiServiceFactory > xFilterFact ( - xMan->createInstance( DEFINE_CONST_UNICODE( "com.sun.star.document.FilterFactory" ) ), uno::UNO_QUERY ); + xMan->createInstance( "com.sun.star.document.FilterFactory" ), uno::UNO_QUERY ); uno::Sequence < beans::PropertyValue > aProps; uno::Reference < container::XNameAccess > xFilters ( xFilterFact, uno::UNO_QUERY ); @@ -2254,7 +2254,7 @@ sal_Bool SfxObjectShell::ExportTo( SfxMedium& rMedium ) { uno::Reference< lang::XMultiServiceFactory > xMan = ::comphelper::getProcessServiceFactory(); uno::Reference < lang::XMultiServiceFactory > xFilterFact ( - xMan->createInstance( DEFINE_CONST_UNICODE( "com.sun.star.document.FilterFactory" ) ), uno::UNO_QUERY ); + xMan->createInstance( "com.sun.star.document.FilterFactory" ), uno::UNO_QUERY ); uno::Sequence < beans::PropertyValue > aProps; uno::Reference < container::XNameAccess > xFilters ( xFilterFact, uno::UNO_QUERY ); diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx index fdc01f6fe892..77f89faed106 100644 --- a/sfx2/source/doc/printhelper.cxx +++ b/sfx2/source/doc/printhelper.cxx @@ -274,31 +274,31 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SfxPrintHelper::getPrinter() thro uno::Sequence< beans::PropertyValue > aPrinter(8); - aPrinter.getArray()[7].Name = DEFINE_CONST_UNICODE( "CanSetPaperSize" ); + aPrinter.getArray()[7].Name = "CanSetPaperSize"; aPrinter.getArray()[7].Value <<= ( pPrinter->HasSupport( SUPPORT_SET_PAPERSIZE ) ); - aPrinter.getArray()[6].Name = DEFINE_CONST_UNICODE( "CanSetPaperFormat" ); + aPrinter.getArray()[6].Name = "CanSetPaperFormat"; aPrinter.getArray()[6].Value <<= ( pPrinter->HasSupport( SUPPORT_SET_PAPER ) ); - aPrinter.getArray()[5].Name = DEFINE_CONST_UNICODE( "CanSetPaperOrientation" ); + aPrinter.getArray()[5].Name = "CanSetPaperOrientation"; aPrinter.getArray()[5].Value <<= ( pPrinter->HasSupport( SUPPORT_SET_ORIENTATION ) ); - aPrinter.getArray()[4].Name = DEFINE_CONST_UNICODE( "IsBusy" ); + aPrinter.getArray()[4].Name = "IsBusy"; aPrinter.getArray()[4].Value <<= ( pPrinter->IsPrinting() ); - aPrinter.getArray()[3].Name = DEFINE_CONST_UNICODE( "PaperSize" ); + aPrinter.getArray()[3].Name = "PaperSize"; awt::Size aSize = impl_Size_Object2Struct(pPrinter->GetPaperSize() ); aPrinter.getArray()[3].Value <<= aSize; - aPrinter.getArray()[2].Name = DEFINE_CONST_UNICODE( "PaperFormat" ); + aPrinter.getArray()[2].Name = "PaperFormat"; view::PaperFormat eFormat = convertToPaperFormat(pPrinter->GetPaper()); aPrinter.getArray()[2].Value <<= eFormat; - aPrinter.getArray()[1].Name = DEFINE_CONST_UNICODE( "PaperOrientation" ); + aPrinter.getArray()[1].Name = "PaperOrientation"; view::PaperOrientation eOrient = (view::PaperOrientation)pPrinter->GetOrientation(); aPrinter.getArray()[1].Value <<= eOrient; - aPrinter.getArray()[0].Name = DEFINE_CONST_UNICODE( "Name" ); + aPrinter.getArray()[0].Name = "Name"; String sStringTemp = pPrinter->GetName() ; aPrinter.getArray()[0].Value <<= ::rtl::OUString( sStringTemp ); diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 8bb8035f018b..d78cbafc2295 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -760,7 +760,7 @@ void SfxTemplateManagerDlg::OnTemplateImport () // add "All" filter aFileDlg.AddFilter( String(SfxResId( STR_SFX_FILTERNAME_ALL) ), - DEFINE_CONST_UNICODE(FILEDIALOG_FILTER_ALL) ); + OUString(FILEDIALOG_FILTER_ALL) ); // add template filter OUString sFilterExt; diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx index dc450c558830..82de6fc93941 100644 --- a/sfx2/source/explorer/nochaos.cxx +++ b/sfx2/source/explorer/nochaos.cxx @@ -100,7 +100,7 @@ CntItemPool* CntItemPool::_pThePool = NULL; //------------------------------------------------------------------------- CntItemPool::CntItemPool() -: SfxItemPool( DEFINE_CONST_UNICODE("chaos"), WID_CHAOS_START, WID_CHAOS_START, NULL ), +: SfxItemPool( "chaos", WID_CHAOS_START, WID_CHAOS_START, NULL ), _nRefs( 0 ) { SetFileFormatVersion( SOFFICE_FILEFORMAT_50 ); diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index f406c189aa25..b085e37740c5 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -237,8 +237,7 @@ IMPL_LINK( SfxMenuManager, Select, Menu *, pSelMenu ) const SfxSlot* pSlot = SfxSlotPool::GetSlotPool( pBindings->GetDispatcher()->GetFrame() ).GetSlot( nId ); if ( pSlot && pSlot->pUnoName ) { - aCommand = DEFINE_CONST_UNICODE(".uno:"); - aCommand += rtl::OUString::createFromAscii( pSlot->GetUnoName() ); + aCommand = ".uno:" + OUString::createFromAscii( pSlot->GetUnoName() ); } } diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index d2c2ac8d6e0e..86beded199c0 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -1470,8 +1470,7 @@ sal_Bool Impl_ExistURLInMenu( const PopupMenu *pMenu , if (!bValidFallback) { - *pFallback = DEFINE_CONST_UNICODE("private:factory/"); - *pFallback += String(SvtModuleOptions().GetDefaultModuleName()); + *pFallback = "private:factory/" + SvtModuleOptions().GetDefaultModuleName(); } return sal_False; diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index 8d2a58218553..5b8bf1a7ff0a 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -469,10 +469,10 @@ void SfxFrame::GetTargetList( TargetList& rList ) const { // An empty string for 'No Target' rList.push_back( new String() ); - rList.push_back( new String( DEFINE_CONST_UNICODE( "_top" ) ) ); - rList.push_back( new String( DEFINE_CONST_UNICODE( "_parent" ) ) ); - rList.push_back( new String( DEFINE_CONST_UNICODE( "_blank" ) ) ); - rList.push_back( new String( DEFINE_CONST_UNICODE( "_self" ) ) ); + rList.push_back( new String( "_top" ) ); + rList.push_back( new String( "_parent" ) ); + rList.push_back( new String( "_blank" ) ); + rList.push_back( new String( "_self" ) ); } SfxViewFrame* pView = GetCurrentViewFrame(); diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index 3b4c060de69f..99ee9b5ce7df 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -229,7 +229,7 @@ Reference < XFrame > SfxFrame::CreateBlankFrame() try { Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() ); - xFrame.set( xDesktop->findFrame( DEFINE_CONST_UNICODE("_blank"), 0 ), UNO_SET_THROW ); + xFrame.set( xDesktop->findFrame( "_blank", 0 ), UNO_SET_THROW ); } catch( const Exception& ) { diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 5cdfe81dccbe..5658727c572e 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1888,7 +1888,7 @@ SfxViewFrame* SfxViewFrame::LoadViewIntoFrame_Impl_NoThrow( const SfxObjectShell } if ( !xFrame.is() ) - xFrame.set( xDesktop->findFrame( DEFINE_CONST_UNICODE("_blank"), 0 ), UNO_SET_THROW ); + xFrame.set( xDesktop->findFrame( "_blank", 0 ), UNO_SET_THROW ); bOwnFrame = true; } @@ -3104,7 +3104,7 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq ) if (!SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SDATABASE)) return; Reference < XFrame > xFrame = GetFrame().GetTopFrame().GetFrameInterface(); - Reference < XFrame > xBeamer( xFrame->findFrame( DEFINE_CONST_UNICODE("_beamer"), FrameSearchFlag::CHILDREN ) ); + Reference < XFrame > xBeamer( xFrame->findFrame( "_beamer", FrameSearchFlag::CHILDREN ) ); sal_Bool bShow = sal_False; sal_Bool bHasChild = xBeamer.is(); bShow = pShowItem ? pShowItem->GetValue() : !bHasChild; @@ -3207,7 +3207,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState ) else if ( nSID == SID_BROWSER ) { Reference < XFrame > xFrame = GetFrame().GetTopFrame().GetFrameInterface()-> - findFrame( DEFINE_CONST_UNICODE("_beamer"), FrameSearchFlag::CHILDREN ); + findFrame( "_beamer", FrameSearchFlag::CHILDREN ); if ( !xFrame.is() ) rState.DisableItem( nSID ); else if ( KnowsChildWindow(nSID) ) diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 6a0a9faf4b43..9255a3a14a01 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -659,7 +659,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) // no help button in dialogs if called from the help window // (pressing help button would exchange the current page inside the help // document that is going to be printed!) - String aHelpFilterName( DEFINE_CONST_UNICODE("writer_web_HTML_help") ); + String aHelpFilterName( "writer_web_HTML_help" ); SfxMedium* pMedium = GetViewFrame()->GetObjectShell()->GetMedium(); const SfxFilter* pFilter = pMedium ? pMedium->GetFilter() : NULL; sal_Bool bPrintOnHelp = ( pFilter && pFilter->GetFilterName() == aHelpFilterName ); |