diff options
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/config/test/test.cxx | 14 | ||||
-rw-r--r-- | svtools/source/contnr/templwin.cxx | 49 | ||||
-rw-r--r-- | svtools/source/control/collatorres.cxx | 25 | ||||
-rw-r--r-- | svtools/source/control/indexentryres.cxx | 21 | ||||
-rw-r--r-- | svtools/source/misc/imagemgr.cxx | 11 |
5 files changed, 57 insertions, 63 deletions
diff --git a/svtools/source/config/test/test.cxx b/svtools/source/config/test/test.cxx index 9fe702abe8fb..7312a5f37eb5 100644 --- a/svtools/source/config/test/test.cxx +++ b/svtools/source/config/test/test.cxx @@ -58,8 +58,6 @@ using namespace ::com::sun::star::lang ; using namespace ::com::sun::star::beans ; using namespace ::com::sun::star::registry ; -#define ASCII( STEXT ) OUString( RTL_CONSTASCII_USTRINGPARAM( STEXT )) - class TestApplication : public Application { //************************************************************************************************************* @@ -141,18 +139,18 @@ void TestApplication::impl_testDynamicMenuOptions() if( lNewMenu.getLength() < 1 ) { - aCFG.AppendItem( E_NEWMENU, ASCII("private:factory/swriter"), ASCII("new writer"), ASCII("icon_writer"), ASCII("_blank") ); - aCFG.AppendItem( E_NEWMENU, ASCII("private:factory/scalc" ), ASCII("new calc" ), ASCII("icon_calc" ), ASCII("_blank") ); - aCFG.AppendItem( E_NEWMENU, ASCII("private:factory/sdraw" ), ASCII("new draw" ), ASCII("icon_draw" ), ASCII("_blank") ); + aCFG.AppendItem( E_NEWMENU, "private:factory/swriter", "new writer", "icon_writer", "_blank"; + aCFG.AppendItem( E_NEWMENU, "private:factory/scalc", "new calc", "icon_calc", "_blank"; + aCFG.AppendItem( E_NEWMENU, "private:factory/sdraw", "new draw", "icon_draw", "_blank"; lNewMenu = aCFG.GetMenu( E_NEWMENU ); } if( lWizardMenu.getLength() < 1 ) { - aCFG.AppendItem( E_WIZARDMENU, ASCII("file://a"), ASCII("system file"), ASCII("icon_file"), ASCII("_self") ); - aCFG.AppendItem( E_WIZARDMENU, ASCII("ftp://b" ), ASCII("ftp host" ), ASCII("icon_ftp" ), ASCII("_self") ); - aCFG.AppendItem( E_WIZARDMENU, ASCII("http://c"), ASCII("www" ), ASCII("icon_www" ), ASCII("_self") ); + aCFG.AppendItem( E_WIZARDMENU, "file://a", "system file", "icon_file", "_self"; + aCFG.AppendItem( E_WIZARDMENU, "ftp://b", "ftp host", "icon_ftp", "_self"; + aCFG.AppendItem( E_WIZARDMENU, "http://c", "www", "icon_www", "_self"; lWizardMenu = aCFG.GetMenu( E_WIZARDMENU ); } diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index 676593564425..f8547c2c12b8 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -104,12 +104,11 @@ using namespace svtools; #define ICON_POS_MYDOCS 2 #define ICON_POS_SAMPLES 3 -#define ASCII_STR(s) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(s) ) -#define VIEWSETTING_NEWFROMTEMPLATE ASCII_STR("NewFromTemplate") -#define VIEWSETTING_SELECTEDGROUP ASCII_STR("SelectedGroup") -#define VIEWSETTING_SELECTEDVIEW ASCII_STR("SelectedView") -#define VIEWSETTING_SPLITRATIO ASCII_STR("SplitRatio") -#define VIEWSETTING_LASTFOLDER ASCII_STR("LastFolder") +#define VIEWSETTING_NEWFROMTEMPLATE "NewFromTemplate" +#define VIEWSETTING_SELECTEDGROUP "SelectedGroup" +#define VIEWSETTING_SELECTEDVIEW "SelectedView" +#define VIEWSETTING_SPLITRATIO "SplitRatio" +#define VIEWSETTING_LASTFOLDER "LastFolder" struct FolderHistory { @@ -156,10 +155,10 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) : aDummyHeaderBar( this ), aIconCtrl( this, WB_ICON | WB_NOCOLUMNHEADER | WB_HIGHLIGHTFRAME | /*!WB_NOSELECTION |*/ WB_NODRAGSELECTION | WB_TABSTOP | WB_CLIPCHILDREN ), - aNewDocumentRootURL( ASCII_STR("private:newdoc") ), + aNewDocumentRootURL( "private:newdoc" ), aMyDocumentsRootURL( SvtPathOptions().GetWorkPath() ), aSamplesFolderRootURL( SvtPathOptions(). - SubstituteVariable( String( ASCII_STR("$(insturl)/share/samples/$(vlang)") ) ) ), + SubstituteVariable( String( "$(insturl)/share/samples/$(vlang)" ) ) ), nMaxTextLength( 0 ) { @@ -461,8 +460,8 @@ Sequence< ::rtl::OUString > SvtFileViewWindow_Impl::GetNewDocContents() const ::rtl::OUString aTargetFrame; sal_uInt32 i, nCount = aDynamicMenuEntries.getLength(); - ::rtl::OUString sSeparator( ASCII_STR("private:separator") ); - ::rtl::OUString sSlotURL( ASCII_STR("slot:5500") ); + ::rtl::OUString sSeparator( "private:separator" ); + ::rtl::OUString sSlotURL( "slot:5500" ); for ( i = 0; i < nCount; ++i ) { @@ -471,7 +470,7 @@ Sequence< ::rtl::OUString > SvtFileViewWindow_Impl::GetNewDocContents() const continue; if( aURL == sSeparator ) { - String aSeparator( ASCII_STR( aSeparatorStr ) ); + String aSeparator( aSeparatorStr ); ::rtl::OUString* pSeparator = new ::rtl::OUString( aSeparator ); aNewDocs.push_back( pSeparator ); } @@ -610,7 +609,7 @@ SvtFrameWindow_Impl::SvtFrameWindow_Impl( Window* pParent ) : pEditWin = new ODocumentInfoPreview( this ,WB_LEFT | WB_VSCROLL | WB_READONLY | WB_BORDER | WB_3DLOOK); pTextWin = new Window( this ); xFrame = Reference < XFrame > ( ::comphelper::getProcessServiceFactory()-> - createInstance( ASCII_STR("com.sun.star.frame.Frame") ), UNO_QUERY ); + createInstance( "com.sun.star.frame.Frame" ), UNO_QUERY ); xWindow = VCLUnoHelper::GetInterface( pTextWin ); xFrame->initialize( xWindow ); @@ -710,14 +709,14 @@ void SvtFrameWindow_Impl::OpenFile( const String& rURL, sal_Bool bPreview, sal_B String aTarget; Reference < XDispatchProvider > xProv( xFrame, UNO_QUERY ); if ( bPreview ) - aTarget = ASCII_STR("_self"); + aTarget = "_self"; else { // can be removed if the database application change its URL String sServiceScheme( RTL_CONSTASCII_USTRINGPARAM( "service:" ) ); if ( rURL.Match( sServiceScheme ) != sServiceScheme.Len() ) // service URL has no default target - aTarget = ASCII_STR("_default"); + aTarget = "_default"; xProv = Reference < XDispatchProvider >( Desktop::create(::comphelper::getProcessComponentContext() ), UNO_QUERY_THROW ); } @@ -740,11 +739,11 @@ void SvtFrameWindow_Impl::OpenFile( const String& rURL, sal_Bool bPreview, sal_B { sal_Bool b = sal_True; Sequence < PropertyValue > aArgs( 4 ); - aArgs[0].Name = ASCII_STR("Preview"); + aArgs[0].Name = "Preview"; aArgs[0].Value.setValue( &b, ::getBooleanCppuType() ); - aArgs[1].Name = ASCII_STR("ReadOnly"); + aArgs[1].Name = "ReadOnly"; aArgs[1].Value.setValue( &b, ::getBooleanCppuType() ); - aArgs[2].Name = ASCII_STR("AsTemplate"); // prevents getting an empty URL with getURL()! + aArgs[2].Name = "AsTemplate"; // prevents getting an empty URL with getURL()! uno::Reference < task::XInteractionHandler2 > xInteractionHandler( task::InteractionHandler::createWithParent(::comphelper::getProcessComponentContext(), 0) ); @@ -778,7 +777,7 @@ void SvtFrameWindow_Impl::OpenFile( const String& rURL, sal_Bool bPreview, sal_B else if ( bIsTemplate ) { Sequence < PropertyValue > aArgs( 1 ); - aArgs[0].Name = ASCII_STR("AsTemplate"); + aArgs[0].Name = "AsTemplate"; aArgs[0].Value <<= bAsTemplate; xDisp->dispatch( aURL, aArgs ); m_aOpenURL = rtl::OUString(); @@ -975,14 +974,14 @@ void SvtTemplateWindow::PrintFile( const String& rURL ) { // open the file readonly and hidden Sequence < PropertyValue > aArgs( 2 ); - aArgs[0].Name = ASCII_STR("ReadOnly"); + aArgs[0].Name = "ReadOnly"; aArgs[0].Value <<= sal_True; - aArgs[1].Name = ASCII_STR("Hidden"); + aArgs[1].Name = "Hidden"; aArgs[1].Value <<= sal_True; Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() ); Reference < XModel > xModel( xDesktop->loadComponentFromURL( - rURL, ASCII_STR("_blank"), 0, aArgs ), UNO_QUERY ); + rURL, "_blank", 0, aArgs ), UNO_QUERY ); if ( xModel.is() ) { // print @@ -1570,7 +1569,7 @@ IMPL_LINK_NOARG(SvtDocumentTemplateDialog , DoubleClickHdl_Impl) IMPL_LINK_NOARG(SvtDocumentTemplateDialog , NewFolderHdl_Impl) { String aNewTitle( pImpl->aTitle ); - aNewTitle += String( ASCII_STR(" - ") ); + aNewTitle += String( " - " ); aNewTitle += pImpl->pWin->GetFolderTitle(); SetText( aNewTitle ); @@ -1623,7 +1622,7 @@ IMPL_LINK_NOARG(SvtDocumentTemplateDialog , OrganizerHdl_Impl) xFrame = Reference < XFrame >( xDesktop, UNO_QUERY ); com::sun::star::util::URL aTargetURL; - aTargetURL.Complete = ASCII_STR("slot:5540"); + aTargetURL.Complete = "slot:5540"; Reference< com::sun::star::util::XURLTransformer > xTrans( com::sun::star::util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) ); xTrans->parseStrict( aTargetURL ); @@ -1636,8 +1635,8 @@ IMPL_LINK_NOARG(SvtDocumentTemplateDialog , OrganizerHdl_Impl) { Sequence<PropertyValue> aArgs(1); PropertyValue* pArg = aArgs.getArray(); - pArg[0].Name = ASCII_STR("Referer"); - pArg[0].Value <<= ASCII_STR("private:user"); + pArg[0].Name = "Referer"; + pArg[0].Value <<= OUString("private:user"); xDisp->dispatch( aTargetURL, aArgs ); } diff --git a/svtools/source/control/collatorres.cxx b/svtools/source/control/collatorres.cxx index 2088391a904e..91e7d2c3f2e9 100644 --- a/svtools/source/control/collatorres.cxx +++ b/svtools/source/control/collatorres.cxx @@ -66,21 +66,20 @@ CollatorResource::CollatorResource() { mp_Data = new CollatorResourceData[COLLATOR_RESOURCE_COUNT]; - #define ASCSTR(str) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(str)) #define RESSTR(rid) SvtResId(rid).toString() - mp_Data[0] = CollatorResourceData (ASCSTR("alphanumeric"), RESSTR(STR_SVT_COLLATE_ALPHANUMERIC)); - mp_Data[1] = CollatorResourceData (ASCSTR("charset"), RESSTR(STR_SVT_COLLATE_CHARSET)); - mp_Data[2] = CollatorResourceData (ASCSTR("dict"), RESSTR(STR_SVT_COLLATE_DICTIONARY)); - mp_Data[3] = CollatorResourceData (ASCSTR("normal"), RESSTR(STR_SVT_COLLATE_NORMAL)); - mp_Data[4] = CollatorResourceData (ASCSTR("pinyin"), RESSTR(STR_SVT_COLLATE_PINYIN)); - mp_Data[5] = CollatorResourceData (ASCSTR("radical"), RESSTR(STR_SVT_COLLATE_RADICAL)); - mp_Data[6] = CollatorResourceData (ASCSTR("stroke"), RESSTR(STR_SVT_COLLATE_STROKE)); - mp_Data[7] = CollatorResourceData (ASCSTR("unicode"), RESSTR(STR_SVT_COLLATE_UNICODE)); - mp_Data[8] = CollatorResourceData (ASCSTR("zhuyin"), RESSTR(STR_SVT_COLLATE_ZHUYIN)); - mp_Data[9] = CollatorResourceData (ASCSTR("phonebook"), RESSTR(STR_SVT_COLLATE_PHONEBOOK)); - mp_Data[10] = CollatorResourceData (ASCSTR("phonetic (alphanumeric first)"), RESSTR(STR_SVT_COLLATE_PHONETIC_F)); - mp_Data[11] = CollatorResourceData (ASCSTR("phonetic (alphanumeric last)"), RESSTR(STR_SVT_COLLATE_PHONETIC_L)); + mp_Data[0] = CollatorResourceData ("alphanumeric", RESSTR(STR_SVT_COLLATE_ALPHANUMERIC)); + mp_Data[1] = CollatorResourceData ("charset", RESSTR(STR_SVT_COLLATE_CHARSET)); + mp_Data[2] = CollatorResourceData ("dict", RESSTR(STR_SVT_COLLATE_DICTIONARY)); + mp_Data[3] = CollatorResourceData ("normal", RESSTR(STR_SVT_COLLATE_NORMAL)); + mp_Data[4] = CollatorResourceData ("pinyin", RESSTR(STR_SVT_COLLATE_PINYIN)); + mp_Data[5] = CollatorResourceData ("radical", RESSTR(STR_SVT_COLLATE_RADICAL)); + mp_Data[6] = CollatorResourceData ("stroke", RESSTR(STR_SVT_COLLATE_STROKE)); + mp_Data[7] = CollatorResourceData ("unicode", RESSTR(STR_SVT_COLLATE_UNICODE)); + mp_Data[8] = CollatorResourceData ("zhuyin", RESSTR(STR_SVT_COLLATE_ZHUYIN)); + mp_Data[9] = CollatorResourceData ("phonebook", RESSTR(STR_SVT_COLLATE_PHONEBOOK)); + mp_Data[10] = CollatorResourceData ("phonetic (alphanumeric first)", RESSTR(STR_SVT_COLLATE_PHONETIC_F)); + mp_Data[11] = CollatorResourceData ("phonetic (alphanumeric last)", RESSTR(STR_SVT_COLLATE_PHONETIC_L)); } CollatorResource::~CollatorResource() diff --git a/svtools/source/control/indexentryres.cxx b/svtools/source/control/indexentryres.cxx index 3de91419a88f..0a495447a29d 100644 --- a/svtools/source/control/indexentryres.cxx +++ b/svtools/source/control/indexentryres.cxx @@ -66,32 +66,31 @@ IndexEntryResource::IndexEntryResource() { mp_Data = new IndexEntryResourceData[INDEXENTRY_RESOURCE_COUNT]; - #define ASCSTR(str) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(str)) #define RESSTR(rid) SvtResId(rid).toString() mp_Data[STR_SVT_INDEXENTRY_ALPHANUMERIC - STR_SVT_INDEXENTRY_START] = - IndexEntryResourceData (ASCSTR("alphanumeric"), RESSTR(STR_SVT_INDEXENTRY_ALPHANUMERIC)); + IndexEntryResourceData ("alphanumeric", RESSTR(STR_SVT_INDEXENTRY_ALPHANUMERIC)); mp_Data[STR_SVT_INDEXENTRY_DICTIONARY - STR_SVT_INDEXENTRY_START] = - IndexEntryResourceData (ASCSTR("dict"), RESSTR(STR_SVT_INDEXENTRY_DICTIONARY)); + IndexEntryResourceData ("dict", RESSTR(STR_SVT_INDEXENTRY_DICTIONARY)); mp_Data[STR_SVT_INDEXENTRY_PINYIN - STR_SVT_INDEXENTRY_START] = - IndexEntryResourceData (ASCSTR("pinyin"), RESSTR(STR_SVT_INDEXENTRY_PINYIN)); + IndexEntryResourceData ("pinyin", RESSTR(STR_SVT_INDEXENTRY_PINYIN)); mp_Data[STR_SVT_INDEXENTRY_PINYIN - STR_SVT_INDEXENTRY_START] = - IndexEntryResourceData (ASCSTR("radical"), RESSTR(STR_SVT_INDEXENTRY_RADICAL)); + IndexEntryResourceData ("radical", RESSTR(STR_SVT_INDEXENTRY_RADICAL)); mp_Data[STR_SVT_INDEXENTRY_STROKE - STR_SVT_INDEXENTRY_START] = - IndexEntryResourceData (ASCSTR("stroke"), RESSTR(STR_SVT_INDEXENTRY_STROKE)); + IndexEntryResourceData ("stroke", RESSTR(STR_SVT_INDEXENTRY_STROKE)); mp_Data[STR_SVT_INDEXENTRY_STROKE - STR_SVT_INDEXENTRY_START] = - IndexEntryResourceData (ASCSTR("zhuyin"), RESSTR(STR_SVT_INDEXENTRY_ZHUYIN)); + IndexEntryResourceData ("zhuyin", RESSTR(STR_SVT_INDEXENTRY_ZHUYIN)); mp_Data[STR_SVT_INDEXENTRY_ZHUYIN - STR_SVT_INDEXENTRY_START] = - IndexEntryResourceData (ASCSTR("phonetic (alphanumeric first) (grouped by syllable)"), + IndexEntryResourceData ("phonetic (alphanumeric first) (grouped by syllable)", RESSTR(STR_SVT_INDEXENTRY_PHONETIC_FS)); mp_Data[STR_SVT_INDEXENTRY_PHONETIC_FS - STR_SVT_INDEXENTRY_START] = - IndexEntryResourceData (ASCSTR("phonetic (alphanumeric first) (grouped by consonant)"), + IndexEntryResourceData ("phonetic (alphanumeric first) (grouped by consonant)", RESSTR(STR_SVT_INDEXENTRY_PHONETIC_FC)); mp_Data[STR_SVT_INDEXENTRY_PHONETIC_FC - STR_SVT_INDEXENTRY_START] = - IndexEntryResourceData (ASCSTR("phonetic (alphanumeric last) (grouped by syllable)"), + IndexEntryResourceData ("phonetic (alphanumeric last) (grouped by syllable)", RESSTR(STR_SVT_INDEXENTRY_PHONETIC_LS)); mp_Data[STR_SVT_INDEXENTRY_PHONETIC_LS - STR_SVT_INDEXENTRY_START] = - IndexEntryResourceData (ASCSTR("phonetic (alphanumeric last) (grouped by consonant)"), + IndexEntryResourceData ("phonetic (alphanumeric last) (grouped by consonant)", RESSTR(STR_SVT_INDEXENTRY_PHONETIC_LC)); } diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index 2a3f71492dcc..749bc20c01a7 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -46,7 +46,6 @@ #define NO_INDEX ((sal_uInt16)0xFFFF) #define CONTENT_HELPER ::utl::UCBContentHelper -#define ASCII_STRING(s) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(s) ) struct SvtExtensionResIdMapping_Impl { @@ -308,11 +307,11 @@ static sal_Bool GetVolumeProperties_Impl( ::ucbhelper::Content& rContent, svtool try { - bRet = ( ( rContent.getPropertyValue( ASCII_STRING("IsVolume") ) >>= rVolumeInfo.m_bIsVolume ) && - ( rContent.getPropertyValue( ASCII_STRING("IsRemote") ) >>= rVolumeInfo.m_bIsRemote ) && - ( rContent.getPropertyValue( ASCII_STRING("IsRemoveable") ) >>= rVolumeInfo.m_bIsRemoveable ) && - ( rContent.getPropertyValue( ASCII_STRING("IsFloppy") ) >>= rVolumeInfo.m_bIsFloppy ) && - ( rContent.getPropertyValue( ASCII_STRING("IsCompactDisc") ) >>= rVolumeInfo.m_bIsCompactDisc ) ); + bRet = ( ( rContent.getPropertyValue( "IsVolume" ) >>= rVolumeInfo.m_bIsVolume ) && + ( rContent.getPropertyValue( "IsRemote" ) >>= rVolumeInfo.m_bIsRemote ) && + ( rContent.getPropertyValue( "IsRemoveable" ) >>= rVolumeInfo.m_bIsRemoveable ) && + ( rContent.getPropertyValue( "IsFloppy" ) >>= rVolumeInfo.m_bIsFloppy ) && + ( rContent.getPropertyValue( "IsCompactDisc" ) >>= rVolumeInfo.m_bIsCompactDisc ) ); } catch( const ::com::sun::star::uno::RuntimeException& ) { |