summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/alienwarn.cxx6
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx6
-rw-r--r--sfx2/source/dialog/dockwin.cxx2
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx30
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx20
-rw-r--r--sfx2/source/dialog/partwnd.cxx2
-rw-r--r--sfx2/source/dialog/srchdlg.cxx5
-rw-r--r--sfx2/source/dialog/templdlg.cxx4
-rw-r--r--sfx2/source/dialog/versdlg.cxx6
9 files changed, 40 insertions, 41 deletions
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;