summaryrefslogtreecommitdiff
path: root/sw/source/ui/uno
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-03-19 09:22:44 +0100
committerThomas Arnhold <thomas@arnhold.org>2013-03-19 09:00:26 +0000
commit8b27d78b4afaa9c47ca0fda144c8060f2f14046b (patch)
tree2dbddceebf0f96492adc5652697e8efce8a8ba06 /sw/source/ui/uno
parentfe8eba5faa59ddf9ee82f3eb009daac72a0ec846 (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 'sw/source/ui/uno')
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.cxx14
-rw-r--r--sw/source/ui/uno/unoatxt.cxx2
-rw-r--r--sw/source/ui/uno/unodoc.cxx12
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx36
-rw-r--r--sw/source/ui/uno/unomodule.cxx4
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx32
-rw-r--r--sw/source/ui/uno/unotxvw.cxx38
7 files changed, 69 insertions, 69 deletions
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
index b42e90710022..211b55ffdc4e 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.cxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -309,7 +309,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
{
if (rInfo.mnAttributes & PropertyAttribute::READONLY)
- throw PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rtl::OUString::createFromAscii(rInfo.mpName), static_cast < cppu::OWeakObject * > ( 0 ) );
+ throw PropertyVetoException ( OUString( "Property is read-only: " ) + rtl::OUString::createFromAscii(rInfo.mpName), static_cast < cppu::OWeakObject * > ( 0 ) );
switch( rInfo.mnHandle )
{
@@ -706,13 +706,13 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
uno::Sequence< beans::PropertyValue > aInfo;
if ( !( rValue >>= aInfo ) )
throw lang::IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Value of type Sequence<PropertyValue> expected!" ) ),
+ ::rtl::OUString( "Value of type Sequence<PropertyValue> expected!" ),
uno::Reference< uno::XInterface >(),
2 );
if ( !mpDocSh->SetModifyPasswordInfo( aInfo ) )
throw beans::PropertyVetoException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The hash is not allowed to be changed now!" ) ),
+ ::rtl::OUString( "The hash is not allowed to be changed now!" ),
uno::Reference< uno::XInterface >() );
}
break;
@@ -1223,7 +1223,7 @@ void SwXDocumentSettings::_postGetValues ()
OUString SAL_CALL SwXDocumentSettings::getImplementationName( )
throw(RuntimeException)
{
- return OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Writer.DocumentSettings"));
+ return OUString("com.sun.star.comp.Writer.DocumentSettings");
}
sal_Bool SAL_CALL SwXDocumentSettings::supportsService( const OUString& ServiceName )
@@ -1244,9 +1244,9 @@ Sequence< OUString > SAL_CALL SwXDocumentSettings::getSupportedServiceNames( )
throw(RuntimeException)
{
Sequence< OUString > aSeq( 3 );
- aSeq[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.Settings") );
- aSeq[1] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.DocumentSettings") );
- aSeq[2] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.PrintSettings") );
+ aSeq[0] = OUString("com.sun.star.document.Settings");
+ aSeq[1] = OUString("com.sun.star.text.DocumentSettings");
+ aSeq[2] = OUString("com.sun.star.text.PrintSettings");
return aSeq;
}
diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx
index a5a598a645cd..ae971d0692c6 100644
--- a/sw/source/ui/uno/unoatxt.cxx
+++ b/sw/source/ui/uno/unoatxt.cxx
@@ -73,7 +73,7 @@ uno::Sequence< OUString > SAL_CALL SwXAutoTextContainer_getSupportedServiceNames
OUString SAL_CALL SwXAutoTextContainer_getImplementationName() throw()
{
- return OUString( RTL_CONSTASCII_USTRINGPARAM("SwXAutoTextContainer" ) );
+ return OUString("SwXAutoTextContainer" );
}
SwXAutoTextContainer::SwXAutoTextContainer()
diff --git a/sw/source/ui/uno/unodoc.cxx b/sw/source/ui/uno/unodoc.cxx
index edf20070499f..7e33fe6a7999 100644
--- a/sw/source/ui/uno/unodoc.cxx
+++ b/sw/source/ui/uno/unodoc.cxx
@@ -37,14 +37,14 @@ uno::Sequence< ::rtl::OUString > SAL_CALL SwTextDocument_getSupportedServiceName
// resolved by rtti!
uno::Sequence< ::rtl::OUString > aRet ( 1 );
::rtl::OUString* pArray = aRet.getArray();
- pArray[0] = ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.TextDocument" ) );
+ pArray[0] = ::rtl::OUString( "com.sun.star.text.TextDocument" );
return aRet;
}
::rtl::OUString SAL_CALL SwTextDocument_getImplementationName() throw()
{
- return ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.TextDocument" ) );
+ return ::rtl::OUString( "com.sun.star.comp.Writer.TextDocument" );
}
uno::Reference< uno::XInterface > SAL_CALL SwTextDocument_createInstance(
@@ -66,14 +66,14 @@ uno::Sequence< ::rtl::OUString > SAL_CALL SwWebDocument_getSupportedServiceNames
// resolved by rtti!
uno::Sequence< ::rtl::OUString > aRet ( 1 );
::rtl::OUString* pArray = aRet.getArray();
- pArray[0] = ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.WebDocument" ) );
+ pArray[0] = ::rtl::OUString( "com.sun.star.text.WebDocument" );
return aRet;
}
::rtl::OUString SAL_CALL SwWebDocument_getImplementationName() throw()
{
- return ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.WebDocument" ) );
+ return ::rtl::OUString( "com.sun.star.comp.Writer.WebDocument" );
}
uno::Reference< uno::XInterface > SAL_CALL SwWebDocument_createInstance(
@@ -93,14 +93,14 @@ uno::Sequence< ::rtl::OUString > SAL_CALL SwGlobalDocument_getSupportedServiceNa
{
uno::Sequence< ::rtl::OUString > aRet ( 1 );
::rtl::OUString* pArray = aRet.getArray();
- pArray[0] = ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.GlobalDocument" ) );
+ pArray[0] = ::rtl::OUString( "com.sun.star.text.GlobalDocument" );
return aRet;
}
::rtl::OUString SAL_CALL SwGlobalDocument_getImplementationName() throw()
{
- return ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.GlobalDocument" ) );
+ return ::rtl::OUString( "com.sun.star.comp.Writer.GlobalDocument" );
}
uno::Reference< uno::XInterface > SAL_CALL SwGlobalDocument_createInstance(
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index a089e9064f3f..7e6c4140e590 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -483,7 +483,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
else if (rName.equalsAscii( GetPropName( UNO_NAME_CONNECTION ) ))
bOK = rValue >>= xCurConnection;
else if (rName.equalsAscii( GetPropName( UNO_NAME_MODEL ) ))
- throw PropertyVetoException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rName, static_cast < cppu::OWeakObject * > ( this ) );
+ throw PropertyVetoException( OUString( "Property is read-only: " ) + rName, static_cast < cppu::OWeakObject * > ( this ) );
else if (rName.equalsAscii( GetPropName( UNO_NAME_DATA_SOURCE_NAME ) ))
bOK = rValue >>= aCurDataSourceName;
else if (rName.equalsAscii( GetPropName( UNO_NAME_DAD_COMMAND ) ))
@@ -495,7 +495,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
bOK = rValue >>= aCurDocumentURL;
if (!aCurDocumentURL.isEmpty()
&& !LoadFromURL_impl( xCurModel, xCurDocSh, aCurDocumentURL, false ))
- throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to create document from URL: " ) ) + aCurDocumentURL, static_cast < cppu::OWeakObject * > ( this ) );
+ throw RuntimeException( OUString( "Failed to create document from URL: " ) + aCurDocumentURL, static_cast < cppu::OWeakObject * > ( this ) );
}
else if (rName.equalsAscii( GetPropName( UNO_NAME_OUTPUT_URL ) ))
{
@@ -503,9 +503,9 @@ uno::Any SAL_CALL SwXMailMerge::execute(
if (!aCurOutputURL.isEmpty())
{
if (!UCB_IsDirectory(aCurOutputURL))
- throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "URL does not point to a directory: " ) ) + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 );
+ throw IllegalArgumentException( OUString( "URL does not point to a directory: " ) + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 );
if (UCB_IsReadOnlyFileName(aCurOutputURL))
- throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "URL is read-only: " ) ) + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 );
+ throw IllegalArgumentException( OUString( "URL is read-only: " ) + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 );
}
}
else if (rName.equalsAscii( GetPropName( UNO_NAME_FILE_NAME_PREFIX ) ))
@@ -553,10 +553,10 @@ uno::Any SAL_CALL SwXMailMerge::execute(
else if (rName.equalsAscii( GetPropName( UNO_NAME_OUT_SERVER_PASSWORD ) ))
bOK = rValue >>= sOutServerPassword;
else
- throw UnknownPropertyException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is unknown: " ) ) + rName, static_cast < cppu::OWeakObject * > ( this ) );
+ throw UnknownPropertyException( OUString( "Property is unknown: " ) + rName, static_cast < cppu::OWeakObject * > ( this ) );
if (!bOK)
- throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property type mismatch or property not set: " ) ) + rName, static_cast < cppu::OWeakObject * > ( this ), 0 );
+ throw IllegalArgumentException( OUString( "Property type mismatch or property not set: " ) + rName, static_cast < cppu::OWeakObject * > ( this ), 0 );
}
// need to translate the selection: the API here requires a sequence of bookmarks, but the MergeNew
@@ -596,7 +596,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
if ( !bValid )
{
throw IllegalArgumentException(
- OUString ( RTL_CONSTASCII_USTRINGPARAM ( "The current 'Selection' does not describe a valid array of bookmarks, relative to the current 'ResultSet'." ) ),
+ OUString( "The current 'Selection' does not describe a valid array of bookmarks, relative to the current 'ResultSet'." ),
static_cast < cppu::OWeakObject * > ( this ),
0
);
@@ -624,7 +624,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
if (aCurDataSourceName.isEmpty() || aCurDataCommand.isEmpty() )
{
OSL_FAIL("PropertyValues missing or unset");
- throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Either the ResultSet or DataSourceName and DataCommand must be set." ) ), static_cast < cppu::OWeakObject * > ( this ), 0 );
+ throw IllegalArgumentException( OUString( "Either the ResultSet or DataSourceName and DataCommand must be set." ), static_cast < cppu::OWeakObject * > ( this ), 0 );
}
//
@@ -677,7 +677,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
case MailMergeType::FILE : nMergeType = DBMGR_MERGE_MAILFILES; break;
case MailMergeType::MAIL : nMergeType = DBMGR_MERGE_MAILING; break;
default:
- throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Invalid value of property:" ) ) + "OutputType", static_cast < cppu::OWeakObject * > ( this ), 0 );
+ throw IllegalArgumentException( OUString( "Invalid value of property:" ) + "OutputType", static_cast < cppu::OWeakObject * > ( this ), 0 );
}
SwNewDBMgr* pMgr = rSh.GetNewDBMgr();
@@ -722,7 +722,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
else // default empty document without URL
{
if (aCurOutputURL.isEmpty())
- throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "OutputURL is not set and can not be obtained." ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw RuntimeException( OUString( "OutputURL is not set and can not be obtained." ), static_cast < cppu::OWeakObject * > ( this ) );
}
aURLObj.SetSmartURL( aCurOutputURL );
@@ -751,7 +751,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
{
pMgr->SetEMailColumn( sAddressFromColumn );
if(sAddressFromColumn.isEmpty())
- throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Mail address column not set." ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw RuntimeException( OUString( "Mail address column not set." ), static_cast < cppu::OWeakObject * > ( this ) );
aMergeDesc.sSaveToFilter = sAttachmentFilter;
aMergeDesc.sSubject = sSubject;
aMergeDesc.sMailBody = sMailBody;
@@ -769,7 +769,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
xInService,
sInServerPassword, sOutServerPassword );
if( !aMergeDesc.xSmtpServer.is() || !aMergeDesc.xSmtpServer->isConnected())
- throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to connect to mail server." ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw RuntimeException( OUString( "Failed to connect to mail server." ), static_cast < cppu::OWeakObject * > ( this ) );
}
}
@@ -796,7 +796,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
}
}
if ( !bStoredAsTemporary )
- throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to save temporary file." ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw RuntimeException( OUString( "Failed to save temporary file." ), static_cast < cppu::OWeakObject * > ( this ) );
pMgr->SetMergeSilent( sal_True ); // suppress dialogs, message boxes, etc.
const SwXMailMerge *pOldSrc = pMgr->GetMailMergeEvtSrc();
@@ -817,7 +817,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
// (in case it wasn't a temporary model, it will be closed in the dtor, at the latest)
if (!bSucc)
- throw Exception( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Mail merge failed. Sorry, no further information available." ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw Exception( OUString( "Mail merge failed. Sorry, no further information available." ), static_cast < cppu::OWeakObject * > ( this ) );
//de-initialize services
if(xInService.is() && xInService->isConnected())
@@ -941,7 +941,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
bOK = rValue >>= aText;
if (!aText.isEmpty()
&& !LoadFromURL_impl( xModel, xDocSh, aText, true ))
- throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to create document from URL: " ) ) + aText, static_cast < cppu::OWeakObject * > ( this ) );
+ throw RuntimeException( OUString( "Failed to create document from URL: " ) + aText, static_cast < cppu::OWeakObject * > ( this ) );
aDocumentURL = aText;
}
else if (pData == &aOutputURL)
@@ -951,9 +951,9 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
if (!aText.isEmpty())
{
if (!UCB_IsDirectory(aText))
- throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "URL does not point to a directory: " ) ) + aText, static_cast < cppu::OWeakObject * > ( this ), 0 );
+ throw IllegalArgumentException( OUString( "URL does not point to a directory: " ) + aText, static_cast < cppu::OWeakObject * > ( this ), 0 );
if (UCB_IsReadOnlyFileName(aText))
- throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "URL is read-only: " ) ) + aText, static_cast < cppu::OWeakObject * > ( this ), 0 );
+ throw IllegalArgumentException( OUString( "URL is read-only: " ) + aText, static_cast < cppu::OWeakObject * > ( this ), 0 );
}
aOutputURL = aText;
}
@@ -1008,7 +1008,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
bChanged = true;
}
if (!bOK)
- throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property type mismatch or property not set: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ), 0 );
+ throw IllegalArgumentException( OUString( "Property type mismatch or property not set: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ), 0 );
if (bChanged)
{
diff --git a/sw/source/ui/uno/unomodule.cxx b/sw/source/ui/uno/unomodule.cxx
index d02c595d3acf..895cc5b115f5 100644
--- a/sw/source/ui/uno/unomodule.cxx
+++ b/sw/source/ui/uno/unomodule.cxx
@@ -33,13 +33,13 @@ using namespace ::com::sun::star;
::rtl::OUString SAL_CALL SwUnoModule_getImplementationName() throw( uno::RuntimeException )
{
- return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Writer.WriterModule" ) );
+ return rtl::OUString( "com.sun.star.comp.Writer.WriterModule" );
}
uno::Sequence< rtl::OUString > SAL_CALL SwUnoModule_getSupportedServiceNames() throw( uno::RuntimeException )
{
uno::Sequence< rtl::OUString > aSeq( 1 );
- aSeq[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.ModuleDispatcher"));
+ aSeq[0] = ::rtl::OUString("com.sun.star.text.ModuleDispatcher");
return aSeq;
}
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index a26ab161b5b2..5c3aaf9e1b91 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -1713,7 +1713,7 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic
if ( bShape &&
rServiceName.compareToAscii( "com.sun.star.drawing.temporaryForXMLImportOLE2Shape" ) == 0 )
{
- aTmpServiceName = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape"));
+ aTmpServiceName = OUString("com.sun.star.drawing.OLE2Shape");
}
//here search for the draw service
Reference< XInterface > xTmp = SvxFmMSFactory::createInstance(aTmpServiceName);
@@ -2128,7 +2128,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
case WID_DOC_VBA_DOCOBJ:
{
beans::PropertyValue aProp;
- aProp.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisWordDoc") );
+ aProp.Name = rtl::OUString("ThisWordDoc");
aProp.Value <<= pDocShell->GetModel();
aAny <<= aProp;
}
@@ -2801,22 +2801,22 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
sal_Int32 nLen = 2;
aRenderer.realloc(2);
- aRenderer[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) );
+ aRenderer[0].Name = OUString( "PageSize" );
aRenderer[0].Value <<= aPageSize;
- aRenderer[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageIncludesNonprintableArea" ) );
+ aRenderer[1].Name = OUString( "PageIncludesNonprintableArea" );
aRenderer[1].Value <<= sal_True;
if (aPreferredPageSize.Width && aPreferredPageSize.Height)
{
++nLen;
aRenderer.realloc( nLen );
- aRenderer[ nLen - 1 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PreferredPageSize" ) );
+ aRenderer[ nLen - 1 ].Name = OUString( "PreferredPageSize" );
aRenderer[ nLen - 1 ].Value <<= aPreferredPageSize;
}
if (nPrinterPaperTray >= 0)
{
++nLen;
aRenderer.realloc( nLen );
- aRenderer[ nLen - 1 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PrinterPaperTray" ) );
+ aRenderer[ nLen - 1 ].Name = OUString( "PrinterPaperTray" );
aRenderer[ nLen - 1 ].Value <<= nPrinterPaperTray;
}
}
@@ -2837,22 +2837,22 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
aRenderer.realloc( nLen );
// put page print settings attribute into render data
const sal_Int32 nRow = pPagePrintSettings->GetRow();
- aRenderer[ nRenderDataIdxStart + 0 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpRows" ) );
+ aRenderer[ nRenderDataIdxStart + 0 ].Name = OUString( "NUpRows" );
aRenderer[ nRenderDataIdxStart + 0 ].Value <<= ( nRow > 1 ? nRow : 1 );
const sal_Int32 nCol = pPagePrintSettings->GetCol();
- aRenderer[ nRenderDataIdxStart + 1 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpColumns" ) );
+ aRenderer[ nRenderDataIdxStart + 1 ].Name = OUString( "NUpColumns" );
aRenderer[ nRenderDataIdxStart + 1 ].Value <<= ( nCol > 1 ? nCol : 1 );
- aRenderer[ nRenderDataIdxStart + 2 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpPageMarginLeft" ) );
+ aRenderer[ nRenderDataIdxStart + 2 ].Name = OUString( "NUpPageMarginLeft" );
aRenderer[ nRenderDataIdxStart + 2 ].Value <<= pPagePrintSettings->GetLeftSpace();
- aRenderer[ nRenderDataIdxStart + 3 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpPageMarginRight" ) );
+ aRenderer[ nRenderDataIdxStart + 3 ].Name = OUString( "NUpPageMarginRight" );
aRenderer[ nRenderDataIdxStart + 3 ].Value <<= pPagePrintSettings->GetRightSpace();
- aRenderer[ nRenderDataIdxStart + 4 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpPageMarginTop" ) );
+ aRenderer[ nRenderDataIdxStart + 4 ].Name = OUString( "NUpPageMarginTop" );
aRenderer[ nRenderDataIdxStart + 4 ].Value <<= pPagePrintSettings->GetTopSpace();
- aRenderer[ nRenderDataIdxStart + 5 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpPageMarginBottom" ) );
+ aRenderer[ nRenderDataIdxStart + 5 ].Name = OUString( "NUpPageMarginBottom" );
aRenderer[ nRenderDataIdxStart + 5 ].Value <<= pPagePrintSettings->GetBottomSpace();
- aRenderer[ nRenderDataIdxStart + 6 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpHorizontalSpacing" ) );
+ aRenderer[ nRenderDataIdxStart + 6 ].Name = OUString( "NUpHorizontalSpacing" );
aRenderer[ nRenderDataIdxStart + 6 ].Value <<= pPagePrintSettings->GetHorzSpace();
- aRenderer[ nRenderDataIdxStart + 7 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpVerticalSpacing" ) );
+ aRenderer[ nRenderDataIdxStart + 7 ].Name = OUString( "NUpVerticalSpacing" );
aRenderer[ nRenderDataIdxStart + 7 ].Value <<= pPagePrintSettings->GetVertSpace();
{
Printer* pPrinter = pDocShell->GetDoc()->getPrinter( false );
@@ -2868,7 +2868,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
{
aNewPageSize = awt::Size( aPageSize.Height(), aPageSize.Width() );
}
- aRenderer[ nRenderDataIdxStart + 8 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpPaperSize" ) );
+ aRenderer[ nRenderDataIdxStart + 8 ].Name = OUString( "NUpPaperSize" );
aRenderer[ nRenderDataIdxStart + 8 ].Value <<= aNewPageSize;
}
}
@@ -3158,7 +3158,7 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages(
const bool bComplex = 0 != (nScriptTypes & nComplex);
if (nScriptTypes < nLatin || nScriptTypes > (nLatin | nAsian | nComplex))
- throw IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nScriptTypes ranges from 1 to 7!")), Reference< XInterface >(), 1);
+ throw IllegalArgumentException(::rtl::OUString("nScriptTypes ranges from 1 to 7!"), Reference< XInterface >(), 1);
if (!pDocShell)
throw DisposedException();
SwDoc* pDoc = pDocShell->GetDoc();
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index 00c06be64d87..81061b5a7428 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -946,7 +946,7 @@ void SwXTextViewCursor::collapseToStart(void) throw( uno::RuntimeException )
if(m_pView)
{
if (!IsTextSelection())
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
SwWrtShell& rSh = m_pView->GetWrtShell();
if(rSh.HasSelection())
@@ -969,7 +969,7 @@ void SwXTextViewCursor::collapseToEnd(void) throw( uno::RuntimeException )
if(m_pView)
{
if (!IsTextSelection())
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
SwWrtShell& rSh = m_pView->GetWrtShell();
if(rSh.HasSelection())
@@ -993,7 +993,7 @@ sal_Bool SwXTextViewCursor::isCollapsed(void) throw( uno::RuntimeException )
if(m_pView)
{
if (!IsTextSelection())
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
const SwWrtShell& rSh = m_pView->GetWrtShell();
bRet = !rSh.HasSelection();
@@ -1011,7 +1011,7 @@ sal_Bool SwXTextViewCursor::goLeft(sal_Int16 nCount, sal_Bool bExpand) throw( un
if(m_pView)
{
if (!IsTextSelection())
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
for( sal_uInt16 i = 0; i < nCount; i++ )
bRet = m_pView->GetWrtShell().Left( CRSR_SKIP_CHARS, bExpand, 1, sal_True );
@@ -1028,7 +1028,7 @@ sal_Bool SwXTextViewCursor::goRight(sal_Int16 nCount, sal_Bool bExpand) throw( u
if(m_pView)
{
if (!IsTextSelection())
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
for( sal_uInt16 i = 0; i < nCount; i++ )
bRet = m_pView->GetWrtShell().Right( CRSR_SKIP_CHARS, bExpand, 1, sal_True );
@@ -1048,7 +1048,7 @@ void SwXTextViewCursor::gotoRange(
if(m_pView && xRange.is())
{
if (!IsTextSelection())
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
SwUnoInternalPaM rDestPam(*m_pView->GetDocShell()->GetDoc());
if (!::sw::XTextRangeToSwPaM(rDestPam, xRange))
@@ -1187,7 +1187,7 @@ void SwXTextViewCursor::gotoStart(sal_Bool bExpand) throw( uno::RuntimeException
if(m_pView)
{
if (!IsTextSelection())
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
m_pView->GetWrtShell().SttDoc( bExpand );
}
@@ -1201,7 +1201,7 @@ void SwXTextViewCursor::gotoEnd(sal_Bool bExpand) throw( uno::RuntimeException )
if(m_pView)
{
if (!IsTextSelection())
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
m_pView->GetWrtShell().EndDoc( bExpand );
}
@@ -1359,7 +1359,7 @@ uno::Reference< text::XText > SwXTextViewCursor::getText(void) throw( uno::Runt
if(m_pView)
{
if (!IsTextSelection( sal_False ))
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
@@ -1378,7 +1378,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getStart(void) throw( uno
if(m_pView)
{
if (!IsTextSelection())
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
@@ -1397,7 +1397,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd(void) throw( uno::
if(m_pView)
{
if (!IsTextSelection())
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
@@ -1416,7 +1416,7 @@ OUString SwXTextViewCursor::getString(void) throw( uno::RuntimeException )
if(m_pView)
{
if (!IsTextSelection( sal_False ))
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
ShellModes eSelMode = m_pView->GetShellMode();
switch(eSelMode)
@@ -1446,7 +1446,7 @@ void SwXTextViewCursor::setString(const OUString& aString) throw( uno::RuntimeEx
if(m_pView)
{
if (!IsTextSelection( sal_False ))
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
ShellModes eSelMode = m_pView->GetShellMode();
switch(eSelMode)
@@ -1604,7 +1604,7 @@ sal_Bool SwXTextViewCursor::goDown(sal_Int16 nCount, sal_Bool bExpand) throw( un
if(m_pView)
{
if (!IsTextSelection())
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
for( sal_uInt16 i = 0; i < nCount; i++ )
bRet = m_pView->GetWrtShell().Down( bExpand, 1, sal_True );
@@ -1621,7 +1621,7 @@ sal_Bool SwXTextViewCursor::goUp(sal_Int16 nCount, sal_Bool bExpand) throw( uno:
if(m_pView)
{
if (!IsTextSelection())
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
for( sal_uInt16 i = 0; i < nCount; i++ )
bRet = m_pView->GetWrtShell().Up( bExpand, 1, sal_True );
@@ -1638,7 +1638,7 @@ sal_Bool SwXTextViewCursor::isAtStartOfLine(void) throw( uno::RuntimeException )
if(m_pView)
{
if (!IsTextSelection( sal_False ))
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
bRet = m_pView->GetWrtShell().IsAtLeftMargin();
}
@@ -1654,7 +1654,7 @@ sal_Bool SwXTextViewCursor::isAtEndOfLine(void) throw( uno::RuntimeException )
if(m_pView)
{
if (!IsTextSelection( sal_False ))
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
bRet = m_pView->GetWrtShell().IsAtRightMargin(sal_True);
}
@@ -1669,7 +1669,7 @@ void SwXTextViewCursor::gotoEndOfLine(sal_Bool bExpand) throw( uno::RuntimeExcep
if(m_pView)
{
if (!IsTextSelection( sal_False ))
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
m_pView->GetWrtShell().RightMargin(bExpand, sal_True);
}
@@ -1683,7 +1683,7 @@ void SwXTextViewCursor::gotoStartOfLine(sal_Bool bExpand) throw( uno::RuntimeExc
if(m_pView)
{
if (!IsTextSelection( sal_False ))
- throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
+ throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) );
m_pView->GetWrtShell().LeftMargin(bExpand, sal_True);
}